Search in sources :

Example 6 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 7 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 8 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 9 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 10 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)19 RepositoryContext (org.talend.core.context.RepositoryContext)17 PersistenceException (org.talend.commons.exception.PersistenceException)8 Project (org.talend.core.model.general.Project)6 IProxyRepositoryFactory (org.talend.repository.model.IProxyRepositoryFactory)6 BeforeClass (org.junit.BeforeClass)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 AfterClass (org.junit.AfterClass)2 ConnectionBean (org.talend.core.model.general.ConnectionBean)2 ConnectionItem (org.talend.core.model.properties.ConnectionItem)2 User (org.talend.core.model.properties.User)2 ConnectionUserPerReader (org.talend.repository.ui.login.connections.ConnectionUserPerReader)2 JSONException (org.talend.utils.json.JSONException)2 FileNotFoundException (java.io.FileNotFoundException)1