Search in sources :

Example 1 with Context

use of org.talend.core.context.Context in project tdi-studio-se by Talend.

the class LoginProjectPage method revertUpdateStatus.

private void revertUpdateStatus() {
    Context ctx = CoreRuntimePlugin.getInstance().getContext();
    RepositoryContext repositoryContext = (RepositoryContext) ctx.getProperty(Context.REPOSITORY_CONTEXT_KEY);
    repositoryContext.setNoUpdateWhenLogon(false);
}
Also used : RepositoryContext(org.talend.core.context.RepositoryContext) Context(org.talend.core.context.Context) RepositoryContext(org.talend.core.context.RepositoryContext)

Example 2 with Context

use of org.talend.core.context.Context in project tdi-studio-se by Talend.

the class DemosImportTest method recordOriginalProject.

@BeforeClass
public static void recordOriginalProject() throws PersistenceException, CoreException, LoginException {
    Context ctx = CoreRuntimePlugin.getInstance().getContext();
    RepositoryContext repositoryContext = (RepositoryContext) ctx.getProperty(Context.REPOSITORY_CONTEXT_KEY);
    originalProject = repositoryContext.getProject();
}
Also used : Context(org.talend.core.context.Context) RepositoryContext(org.talend.core.context.RepositoryContext) RepositoryContext(org.talend.core.context.RepositoryContext) BeforeClass(org.junit.BeforeClass)

Example 3 with Context

use of org.talend.core.context.Context in project tdi-studio-se by Talend.

the class AddContextCommentValueMigrationTaskTest method afterAllTests.

@AfterClass
public static void afterAllTests() throws PersistenceException, CoreException {
    removeTempProject();
    Context ctx = CoreRuntimePlugin.getInstance().getContext();
    RepositoryContext repositoryContext = (RepositoryContext) ctx.getProperty(Context.REPOSITORY_CONTEXT_KEY);
    repositoryContext.setProject(originalProject);
    originalProject = null;
    sampleProject = null;
}
Also used : Context(org.talend.core.context.Context) RepositoryContext(org.talend.core.context.RepositoryContext) RepositoryContext(org.talend.core.context.RepositoryContext) AfterClass(org.junit.AfterClass)

Example 4 with Context

use of org.talend.core.context.Context in project tdi-studio-se by Talend.

the class AddContextCommentValueMigrationTaskTest method beforeAllTests.

@BeforeClass
public static void beforeAllTests() throws PersistenceException, LoginException, CoreException {
    createTempProject();
    Context ctx = CoreRuntimePlugin.getInstance().getContext();
    RepositoryContext repositoryContext = (RepositoryContext) ctx.getProperty(Context.REPOSITORY_CONTEXT_KEY);
    originalProject = repositoryContext.getProject();
    repositoryContext.setProject(sampleProject);
}
Also used : Context(org.talend.core.context.Context) RepositoryContext(org.talend.core.context.RepositoryContext) RepositoryContext(org.talend.core.context.RepositoryContext) BeforeClass(org.junit.BeforeClass)

Example 5 with Context

use of org.talend.core.context.Context in project tdi-studio-se by Talend.

the class FixUnevenItemContextParametersMigrationTaskTest method beforeAllTests.

@BeforeClass
public static void beforeAllTests() throws PersistenceException, LoginException, CoreException {
    createTempProject();
    Context ctx = CoreRuntimePlugin.getInstance().getContext();
    RepositoryContext repositoryContext = (RepositoryContext) ctx.getProperty(Context.REPOSITORY_CONTEXT_KEY);
    originalProject = repositoryContext.getProject();
    repositoryContext.setProject(sampleProject);
}
Also used : Context(org.talend.core.context.Context) RepositoryContext(org.talend.core.context.RepositoryContext) RepositoryContext(org.talend.core.context.RepositoryContext) BeforeClass(org.junit.BeforeClass)

Aggregations

Context (org.talend.core.context.Context)31 RepositoryContext (org.talend.core.context.RepositoryContext)28 PersistenceException (org.talend.commons.exception.PersistenceException)8 Project (org.talend.core.model.general.Project)6 AnalysisContext (org.talend.dataquality.analysis.AnalysisContext)6 IProxyRepositoryFactory (org.talend.repository.model.IProxyRepositoryFactory)6 BeforeClass (org.junit.BeforeClass)4 AfterClass (org.junit.AfterClass)3 IRepositoryViewObject (org.talend.core.model.repository.IRepositoryViewObject)3 ProxyRepositoryFactory (org.talend.core.repository.model.ProxyRepositoryFactory)3 InvocationTargetException (java.lang.reflect.InvocationTargetException)2 HashMap (java.util.HashMap)2 List (java.util.List)2 CoreException (org.eclipse.core.runtime.CoreException)2 NullProgressMonitor (org.eclipse.core.runtime.NullProgressMonitor)2 EList (org.eclipse.emf.common.util.EList)2 ActionContext (org.eclipse.ui.actions.ActionContext)2 ConnectionBean (org.talend.core.model.general.ConnectionBean)2 ConnectionItem (org.talend.core.model.properties.ConnectionItem)2 Item (org.talend.core.model.properties.Item)2