use of com.twinsoft.convertigo.engine.studio.views.projectexplorer.model.WrapObject in project convertigo by convertigo.
the class EnableMobileRouteEventComponentAction method run2.
@Override
protected void run2() throws Exception {
try {
WrapObject[] treeObjects = studio.getSelectedObjects().toArray(new WrapObject[0]);
for (int i = treeObjects.length - 1; i >= 0; --i) {
WrapDatabaseObject treeObject = (WrapDatabaseObject) treeObjects[i];
if (treeObject.instanceOf(RouteEventComponent.class)) {
// StepView stepTreeObject = (StepView) treeObject;
RouteEventComponent component = (RouteEventComponent) treeObject.getObject();
component.setEnabled(true);
// stepTreeObject.setEnabled(true);
// stepTreeObject.hasBeenModified(true);
// TreeObjectEvent treeObjectEvent = new TreeObjectEvent(stepTreeObject, "isEnable", false, true);
// explorerView.fireTreeObjectPropertyChanged(treeObjectEvent);
}
}
// explorerView.refreshSelectedTreeObjects();
} catch (Throwable e) {
throw e;
// ConvertigoPlugin.logException(e, "Unable to enable step!");
}
// finally {
// shell.setCursor(null);
// waitCursor.dispose();
}
use of com.twinsoft.convertigo.engine.studio.views.projectexplorer.model.WrapObject in project convertigo by convertigo.
the class CheStudio method runAction.
public void runAction(AbstractRunnableAction action) throws Exception {
try {
// Get all qnames to generate the response later
List<String> qnames = new ArrayList<>(getSelectedObjects().size());
for (WrapObject wrapObject : getSelectedObjects()) {
WrapDatabaseObject wrapDbo = (WrapDatabaseObject) wrapObject;
qnames.add(((DatabaseObject) wrapDbo.getObject()).getQName());
}
action.run();
synchronized (this) {
isActionDone = action.isDone();
// Generate responses
for (String qname : qnames) {
Element xmlResponse = action.toXml(document, qname);
createResponse(xmlResponse);
}
// End of the action: notify
notify();
}
} catch (Exception e) {
isActionDone = true;
throw e;
}
}
use of com.twinsoft.convertigo.engine.studio.views.projectexplorer.model.WrapObject in project convertigo by convertigo.
the class DatabaseObjectDeleteAction method delete.
private void delete(WrapDatabaseObject treeObject) throws ConvertigoException, IOException {
WrapDatabaseObject parentTreeObject = null;
WrapObject treeParent = treeObject.getParent();
DatabaseObject databaseObject = (DatabaseObject) treeObject.getObject();
DatabaseObject parent = databaseObject.getParent();
while ((treeParent != null) && (!(treeParent instanceof WrapDatabaseObject))) {
treeParent = treeParent.getParent();
}
if (treeParent != null) {
parentTreeObject = (WrapDatabaseObject) treeParent;
}
delete(databaseObject);
// Do not save after a deletion anymore
if (parent != null) {
parentTreeObject.hasBeenModified(true);
}
if ((parentTreeObject != null) && !treeNodesToUpdate.contains(parentTreeObject)) {
treeNodesToUpdate.add(parentTreeObject);
}
}
use of com.twinsoft.convertigo.engine.studio.views.projectexplorer.model.WrapObject in project convertigo by convertigo.
the class DisableExtractionRuleAction method run2.
@Override
protected void run2() throws Exception {
try {
WrapObject[] treeObjects = studio.getSelectedObjects().toArray(new WrapObject[0]);
for (int i = treeObjects.length - 1; i >= 0; --i) {
WrapDatabaseObject treeObject = (WrapDatabaseObject) treeObjects[i];
if (treeObject.instanceOf(ExtractionRule.class)) {
// StepView stepTreeObject = (StepView) treeObject;
ExtractionRule extractionRule = (ExtractionRule) treeObject.getObject();
extractionRule.setEnabled(false);
// stepTreeObject.setEnabled(true);
// stepTreeObject.hasBeenModified(true);
// TreeObjectEvent treeObjectEvent = new TreeObjectEvent(stepTreeObject, "isEnable", false, true);
// explorerView.fireTreeObjectPropertyChanged(treeObjectEvent);
}
}
// explorerView.refreshSelectedTreeObjects();
} catch (Throwable e) {
throw e;
// ConvertigoPlugin.logException(e, "Unable to enable step!");
}
// finally {
// shell.setCursor(null);
// waitCursor.dispose();
}
use of com.twinsoft.convertigo.engine.studio.views.projectexplorer.model.WrapObject in project convertigo by convertigo.
the class DisableListenerAction method run2.
@Override
protected void run2() throws Exception {
try {
WrapObject[] treeObjects = studio.getSelectedObjects().toArray(new WrapObject[0]);
for (int i = treeObjects.length - 1; i >= 0; --i) {
WrapDatabaseObject treeObject = (WrapDatabaseObject) treeObjects[i];
if (treeObject.instanceOf(Listener.class)) {
// StepView stepTreeObject = (StepView) treeObject;
Listener listener = (Listener) treeObject.getObject();
listener.setEnabled(false);
// stepTreeObject.setEnabled(true);
// stepTreeObject.hasBeenModified(true);
// TreeObjectEvent treeObjectEvent = new TreeObjectEvent(stepTreeObject, "isEnable", false, true);
// explorerView.fireTreeObjectPropertyChanged(treeObjectEvent);
}
}
// explorerView.refreshSelectedTreeObjects();
} catch (Throwable e) {
throw e;
// ConvertigoPlugin.logException(e, "Unable to enable step!");
}
// finally {
// shell.setCursor(null);
// waitCursor.dispose();
}
Aggregations