use of com.twinsoft.convertigo.engine.studio.views.projectexplorer.StepSourceEventWrap in project convertigo by convertigo.
the class ShowStepInPickerAction method run2.
@Override
protected void run2() throws Exception {
try {
WrapDatabaseObject treeObject = (WrapDatabaseObject) studio.getFirstSelectedTreeObject();
if (treeObject != null) {
if (treeObject.instanceOf(DatabaseObject.class)) {
DatabaseObject selectedDbo = ((DatabaseObjectView) treeObject).getObject();
if (selectedDbo != null) {
StepSourceEventWrap event = null;
if (showSource) {
if (selectedDbo instanceof Step) {
Step step = (Step) selectedDbo;
Set<StepSource> sources = step.getSources();
if (!sources.isEmpty()) {
event = new StepSourceEventWrap(sources.iterator().next());
} else {
throw new Exception("No Source defined");
}
}
} else {
event = new StepSourceEventWrap(selectedDbo);
}
if (event != null) {
SourcePickerViewWrap spv = studio.getSourcePickerView();
spv.sourceSelected(event);
}
}
}
}
} catch (Exception e) {
throw e;
// ConvertigoPlugin.logException(e, "Unable to show object in Picker!");
}
}
Aggregations