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);
}
Aggregations