use of com.twinsoft.convertigo.eclipse.views.projectexplorer.model.TreeObject in project convertigo by convertigo.
the class ProjectExplorerView method objectChanged.
public void objectChanged(CompositeEvent compositeEvent) {
final Object data = compositeEvent.data;
final Object source = compositeEvent.getSource();
if (source instanceof DatabaseObject) {
Display.getDefault().syncExec(new Runnable() {
public void run() {
DatabaseObjectTreeObject databaseObjectTreeObject = (DatabaseObjectTreeObject) findTreeObjectByUserObject((DatabaseObject) source);
try {
reloadTreeObject(databaseObjectTreeObject);
if ((data != null) && (data instanceof String)) {
// case of learned Javelin transaction, expand to see newly added handlers
if (databaseObjectTreeObject instanceof TransactionTreeObject) {
viewer.expandToLevel(databaseObjectTreeObject, 2);
}
// case of we need to select a treeObject given its path
TreeObject treeObjectToSelect = findTreeObjectByPath(databaseObjectTreeObject, (String) data);
if (treeObjectToSelect != null) {
viewer.expandToLevel(treeObjectToSelect, 0);
setSelectedTreeObject(treeObjectToSelect);
StructuredSelection structuredSelection = new StructuredSelection(treeObjectToSelect);
ConvertigoPlugin.getDefault().getPropertiesView().selectionChanged((IWorkbenchPart) ProjectExplorerView.this, structuredSelection);
}
}
} catch (EngineException e) {
ConvertigoPlugin.logException(e, "Unexpected exception");
} catch (IOException e) {
ConvertigoPlugin.logException(e, "Unexpected exception");
}
}
});
}
}
use of com.twinsoft.convertigo.eclipse.views.projectexplorer.model.TreeObject in project convertigo by convertigo.
the class ProjectExplorerView method refreshFirstSelectedTreeObject.
public void refreshFirstSelectedTreeObject(boolean bRecurse) {
TreeObject object = getFirstSelectedTreeObject();
refreshTreeObject(object, bRecurse);
}
use of com.twinsoft.convertigo.eclipse.views.projectexplorer.model.TreeObject in project convertigo by convertigo.
the class ProjectExplorerView method getSelectedTreeObjects.
public TreeObject[] getSelectedTreeObjects() {
TreeObject[] treeObjects = null;
ISelection selection = viewer.getSelection();
if (!selection.isEmpty()) {
IStructuredSelection structuredSelection = (IStructuredSelection) selection;
Object[] treeArray = structuredSelection.toArray();
treeObjects = new TreeObject[structuredSelection.size()];
for (int i = 0; i < treeObjects.length; i++) {
treeObjects[i] = ((TreeObject) treeArray[i]).check();
}
}
return treeObjects;
}
use of com.twinsoft.convertigo.eclipse.views.projectexplorer.model.TreeObject in project convertigo by convertigo.
the class ProjectExplorerView method updateFirstSelectedTreeObject.
public void updateFirstSelectedTreeObject() {
TreeObject object = getFirstSelectedTreeObject();
updateTreeObject(object);
}
use of com.twinsoft.convertigo.eclipse.views.projectexplorer.model.TreeObject in project convertigo by convertigo.
the class ProjectExplorerView method makeActions.
private void makeActions() {
tracePlayAction = new TracePlayAction();
doubleClickAction = new Action() {
@Override
public void run() {
IStructuredSelection selection = (IStructuredSelection) viewer.getSelection();
TreeObject treeObject = (TreeObject) selection.getFirstElement();
if (treeObject instanceof UnloadedProjectTreeObject) {
loadProject((UnloadedProjectTreeObject) treeObject);
} else if (treeObject instanceof ConnectorTreeObject) {
((ConnectorTreeObject) treeObject).launchEditor();
} else if (treeObject instanceof SequenceTreeObject) {
((SequenceTreeObject) treeObject).launchEditor();
} else if (treeObject instanceof StepTreeObject) {
showStepInPickerAction.run();
if (treeObject instanceof IEditableTreeObject) {
((IEditableTreeObject) treeObject).launchEditor(null);
}
} else if (treeObject instanceof VariableTreeObject2) {
if (treeObject.getObject() instanceof StepVariable) {
showStepInPickerAction.run();
}
} else if (treeObject instanceof IEditableTreeObject) {
((IEditableTreeObject) treeObject).launchEditor(null);
} else if (treeObject instanceof TraceTreeObject) {
tracePlayAction.run();
}
}
};
undoAction = new UndoAction();
redoAction = new RedoAction();
copyAction = new ClipboardCopyAction();
cutAction = new ClipboardCutAction();
pasteAction = new ClipboardPasteAction();
deleteDatabaseObjectAction = new DatabaseObjectDeleteAction();
deletePropertyTableRowAction = new DeletePropertyTableRowAction();
deletePropertyTableColumnAction = new DeletePropertyTableColumnAction();
projectExplorerSaveAllAction = new ProjectExplorerSaveAllAction();
decreasePriorityAction = new DatabaseObjectDecreasePriorityAction();
increasePriorityAction = new DatabaseObjectIncreasePriorityAction();
executeTransaction = new TransactionExecuteSelectedAction();
executeDefaultTransaction = new TransactionExecuteDefaultAction();
transactionEditHandlersAction = new TransactionEditHandlersAction();
executeSequence = new SequenceExecuteSelectedAction();
executeTestCase = new TestCaseExecuteSelectedAction();
showStepInPickerAction = new ShowStepInPickerAction();
}
Aggregations