use of org.talend.designer.core.ui.editor.process.Process in project tdi-studio-se by Talend.
the class ChangeConnTextCommand method undo.
@Override
public void undo() {
connection.setName(oldName);
IElementParameter elementParameter = connection.getElementParameter(EParameterName.UNIQUE_NAME.getName());
if (elementParameter != null) {
// if ("TABLE".equals(connection.getConnectorName())) {
if (connection.getLineStyle().hasConnectionCategory(IConnectionCategory.TABLE)) {
connection.setPropertyValue(EParameterName.UNIQUE_NAME.getName(), oldMetaName);
} else {
connection.setPropertyValue(EParameterName.UNIQUE_NAME.getName(), oldName);
}
}
if (connection.getLineStyle().hasConnectionCategory(IConnectionCategory.UNIQUE_NAME)) {
connection.getSource().getProcess().removeUniqueConnectionName(newName);
connection.getSource().getProcess().addUniqueConnectionName(oldName);
}
ConnectionListController.renameConnectionInElement(newName, oldName, connection.getSource());
IExternalNode externalNode = connection.getTarget().getExternalNode();
if (externalNode != null) {
externalNode.renameInputConnection(newName, oldName);
}
externalNode = connection.getSource().getExternalNode();
if (externalNode != null) {
externalNode.renameOutputConnection(newName, oldName);
}
UpgradeElementHelper.renameData(connection.getTarget(), newName, oldName);
((Process) connection.getSource().getProcess()).checkProcess();
}
use of org.talend.designer.core.ui.editor.process.Process in project tdi-studio-se by Talend.
the class NoteEditPolicy method createDeleteCommand.
@Override
protected Command createDeleteCommand(GroupRequest request) {
Object parent = getHost().getParent().getModel();
if (!(parent instanceof Process)) {
return null;
}
Note note = (Note) getHost().getModel();
if (note.isReadOnly()) {
return null;
}
List<Note> noteList = new ArrayList<Note>();
for (int i = 0; i < request.getEditParts().size(); i++) {
if (request.getEditParts().get(i) instanceof NoteEditPart) {
noteList.add(((Note) ((NoteEditPart) request.getEditParts().get(i)).getModel()));
}
}
DeleteNoteCommand deleteCommand = new DeleteNoteCommand((Process) parent, noteList);
return deleteCommand;
}
use of org.talend.designer.core.ui.editor.process.Process in project tdi-studio-se by Talend.
the class StatsAndLogsComposite method onReloadPreference.
@Override
protected void onReloadPreference() {
// StatsAndLogsComposite.this);
if (elem instanceof Process) {
Process process = (Process) elem;
LoadProjectSettingsCommand command = new LoadProjectSettingsCommand(process, EParameterName.STATANDLOG_USE_PROJECT_SETTINGS.getName(), Boolean.TRUE);
boolean executed = false;
IDesignerCoreUIService designerCoreUIService = CoreUIPlugin.getDefault().getDesignerCoreUIService();
if (designerCoreUIService != null) {
executed = designerCoreUIService.executeCommand(process, command);
}
if (!executed) {
command.execute();
}
}
}
use of org.talend.designer.core.ui.editor.process.Process in project tdi-studio-se by Talend.
the class StatsAndLogsView method getCurrentJob.
/**
* Gets current opened job.
*/
private void getCurrentJob() {
final IEditorPart activeEditor = getSite().getPage().getActiveEditor();
if (activeEditor != null && activeEditor instanceof AbstractMultiPageTalendEditor) {
AbstractTalendEditor talendEditor = ((AbstractMultiPageTalendEditor) activeEditor).getTalendEditor();
Process process = (Process) talendEditor.getProcess();
if (process != null) {
this.process = process;
this.title = talendEditor.getTitle();
}
}
}
use of org.talend.designer.core.ui.editor.process.Process in project tdi-studio-se by Talend.
the class AbstractMultiPageTalendEditor method isStorageVersionChanged.
private boolean isStorageVersionChanged(Item refreshedItem, Item currentItem) {
boolean isChanged = false;
if (PluginChecker.isSVNProviderPluginLoaded()) {
if (svnProviderService != null && svnProviderService.isProjectInSvnMode()) {
Process refreshedProcess = new Process(refreshedItem.getProperty());
String refreshedNumStr = svnProviderService.getCurrentSVNRevision(refreshedProcess);
refreshedProcess.dispose();
if (refreshedNumStr != null) {
refreshedNumStr = getFormattedRevisionNumStr(refreshedNumStr);
if (!refreshedNumStr.equals(revisionNumStr)) {
isChanged = true;
}
}
}
} else {
Date currentModifiedDate = currentItem.getProperty().getModificationDate();
Date refreshedModifiedDate = refreshedItem.getProperty().getModificationDate();
isChanged = !currentModifiedDate.equals(refreshedModifiedDate);
}
return isChanged;
}
Aggregations