Search in sources :

Example 6 with ISVNProviderService

use of org.talend.core.services.ISVNProviderService in project tesb-studio-se by Talend.

the class CamelMultiPageTalendEditor method setName.

/**
     * DOC smallet Comment method "setName".
     * 
     * @param label
     */
@Override
public void setName() {
    super.setName();
    if (getEditorInput() == null) {
        return;
    }
    // if (getActivePage() == 1) {
    final IProcess2 process2 = this.getProcess();
    if (PluginChecker.isSVNProviderPluginLoaded()) {
        final ISVNProviderService service = (ISVNProviderService) GlobalServiceRegister.getDefault().getService(ISVNProviderService.class);
        if (revisionChanged && service.isProjectInSvnMode()) {
            revisionNumStr = service.getCurrentSVNRevision(process2);
            revisionChanged = false;
            if (revisionNumStr != null) {
                revisionNumStr = ".r" + revisionNumStr;
            }
        }
    }
    final String itemName = process2.getElementName();
    final String label = getEditorInput().getName();
    final String jobVersion = (process2 != null) ? process2.getVersion() : "0.1";
    //$NON-NLS-1$
    String title = MessageFormat.format("{0} {1} {2}", itemName, label, jobVersion);
    if (revisionNumStr != null) {
        title += revisionNumStr;
    }
    setPartName(title);
}
Also used : IProcess2(org.talend.core.model.process.IProcess2) ISVNProviderService(org.talend.core.services.ISVNProviderService)

Aggregations

ISVNProviderService (org.talend.core.services.ISVNProviderService)6 IProxyRepositoryFactory (org.talend.repository.model.IProxyRepositoryFactory)3 IProject (org.eclipse.core.resources.IProject)2 IWorkspace (org.eclipse.core.resources.IWorkspace)2 CoreException (org.eclipse.core.runtime.CoreException)2 NullProgressMonitor (org.eclipse.core.runtime.NullProgressMonitor)2 PersistenceException (org.talend.commons.exception.PersistenceException)2 IProcess2 (org.talend.core.model.process.IProcess2)2 IBrandingService (org.talend.core.ui.branding.IBrandingService)2 File (java.io.File)1 FileFilter (java.io.FileFilter)1 InvocationTargetException (java.lang.reflect.InvocationTargetException)1 URL (java.net.URL)1 NoSuchAlgorithmException (java.security.NoSuchAlgorithmException)1 IWorkspaceRunnable (org.eclipse.core.resources.IWorkspaceRunnable)1 IProgressMonitor (org.eclipse.core.runtime.IProgressMonitor)1 Path (org.eclipse.core.runtime.Path)1 ISchedulingRule (org.eclipse.core.runtime.jobs.ISchedulingRule)1 Shell (org.eclipse.swt.widgets.Shell)1 IEditorPart (org.eclipse.ui.IEditorPart)1