Search in sources :

Example 1 with RepositoryContext

use of org.talend.core.context.RepositoryContext 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 RepositoryContext

use of org.talend.core.context.RepositoryContext 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 RepositoryContext

use of org.talend.core.context.RepositoryContext 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 RepositoryContext

use of org.talend.core.context.RepositoryContext 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 RepositoryContext

use of org.talend.core.context.RepositoryContext 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

RepositoryContext (org.talend.core.context.RepositoryContext)53 Context (org.talend.core.context.Context)28 Project (org.talend.core.model.general.Project)18 IProxyRepositoryFactory (org.talend.repository.model.IProxyRepositoryFactory)14 PersistenceException (org.talend.commons.exception.PersistenceException)11 User (org.talend.core.model.properties.User)8 ProxyRepositoryFactory (org.talend.core.repository.model.ProxyRepositoryFactory)7 IProject (org.eclipse.core.resources.IProject)6 AnalysisContext (org.talend.dataquality.analysis.AnalysisContext)6 ECodeLanguage (org.talend.core.language.ECodeLanguage)5 IRepositoryFactory (org.talend.core.repository.model.IRepositoryFactory)5 IRepositoryNodeConfiguration (org.talend.mdm.repository.core.IRepositoryNodeConfiguration)5 IRepositoryNodeResourceProvider (org.talend.mdm.repository.core.IRepositoryNodeResourceProvider)5 Property (org.talend.core.model.properties.Property)4 RecycleBinNodeConfiguration (org.talend.mdm.repository.core.impl.recyclebin.RecycleBinNodeConfiguration)4 File (java.io.File)3 IOException (java.io.IOException)3 ResourceBundle (java.util.ResourceBundle)3 NullProgressMonitor (org.eclipse.core.runtime.NullProgressMonitor)3 ImageRegistry (org.eclipse.jface.resource.ImageRegistry)3