use of com.twinsoft.convertigo.beans.mobile.components.RouteComponent in project convertigo by convertigo.
the class EnableMobileRouteComponentAction 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(RouteComponent.class)) {
// StepView stepTreeObject = (StepView) treeObject;
RouteComponent component = (RouteComponent) 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.beans.mobile.components.RouteComponent in project convertigo by convertigo.
the class EnableMobileRouteComponentAction method run.
public void run() {
Display display = Display.getDefault();
Cursor waitCursor = new Cursor(display, SWT.CURSOR_WAIT);
Shell shell = getParentShell();
shell.setCursor(waitCursor);
try {
ProjectExplorerView explorerView = getProjectExplorerView();
if (explorerView != null) {
DatabaseObjectTreeObject treeObject = null;
RouteComponent component = null;
TreeObject[] treeObjects = explorerView.getSelectedTreeObjects();
for (int i = treeObjects.length - 1; i >= 0; i--) {
treeObject = (DatabaseObjectTreeObject) treeObjects[i];
if (treeObject instanceof MobileRouteComponentTreeObject) {
MobileRouteComponentTreeObject componentTreeObject = (MobileRouteComponentTreeObject) treeObject;
component = (RouteComponent) componentTreeObject.getObject();
component.setEnabled(true);
componentTreeObject.setEnabled(true);
componentTreeObject.hasBeenModified(true);
TreeObjectEvent treeObjectEvent = new TreeObjectEvent(componentTreeObject, "isEnabled", false, true);
explorerView.fireTreeObjectPropertyChanged(treeObjectEvent);
}
}
explorerView.refreshSelectedTreeObjects();
}
} catch (Throwable e) {
ConvertigoPlugin.logException(e, "Unable to enable route!");
} finally {
shell.setCursor(null);
waitCursor.dispose();
}
}
use of com.twinsoft.convertigo.beans.mobile.components.RouteComponent in project convertigo by convertigo.
the class DisableMobileRouteComponentAction method run.
public void run() {
Display display = Display.getDefault();
Cursor waitCursor = new Cursor(display, SWT.CURSOR_WAIT);
Shell shell = getParentShell();
shell.setCursor(waitCursor);
try {
ProjectExplorerView explorerView = getProjectExplorerView();
if (explorerView != null) {
DatabaseObjectTreeObject treeObject = null;
RouteComponent component = null;
TreeObject[] treeObjects = explorerView.getSelectedTreeObjects();
for (int i = treeObjects.length - 1; i >= 0; i--) {
treeObject = (DatabaseObjectTreeObject) treeObjects[i];
if (treeObject instanceof MobileRouteComponentTreeObject) {
MobileRouteComponentTreeObject componentTreeObject = (MobileRouteComponentTreeObject) treeObject;
component = (RouteComponent) componentTreeObject.getObject();
component.setEnabled(false);
componentTreeObject.setEnabled(false);
componentTreeObject.hasBeenModified(true);
TreeObjectEvent treeObjectEvent = new TreeObjectEvent(componentTreeObject, "isEnabled", true, false);
explorerView.fireTreeObjectPropertyChanged(treeObjectEvent);
}
}
explorerView.refreshSelectedTreeObjects();
}
} catch (Throwable e) {
ConvertigoPlugin.logException(e, "Unable to disable route!");
} finally {
shell.setCursor(null);
waitCursor.dispose();
}
}
use of com.twinsoft.convertigo.beans.mobile.components.RouteComponent in project convertigo by convertigo.
the class DisableMobileRouteComponentAction 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(RouteComponent.class)) {
// StepView stepTreeObject = (StepView) treeObject;
RouteComponent component = (RouteComponent) treeObject.getObject();
component.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