Search in sources :

Example 6 with MobileComponentTreeObject

use of com.twinsoft.convertigo.eclipse.views.projectexplorer.model.MobileComponentTreeObject in project convertigo by convertigo.

the class ExecuteMobileBuilderClassAction 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) {
            TreeObject treeObject = explorerView.getFirstSelectedTreeObject();
            if (treeObject instanceof MobileComponentTreeObject) {
                if (treeObject instanceof MobileApplicationComponentTreeObject) {
                    MobileApplicationComponentTreeObject mpcto = (MobileApplicationComponentTreeObject) treeObject;
                    com.twinsoft.convertigo.eclipse.editors.mobile.ApplicationComponentEditor editor = mpcto.activeEditor(false);
                    editor.launchBuilder(forceInstall, forceClean);
                }
            } else if (treeObject instanceof NgxComponentTreeObject) {
                if (treeObject instanceof NgxApplicationComponentTreeObject) {
                    NgxApplicationComponentTreeObject mpcto = (NgxApplicationComponentTreeObject) treeObject;
                    com.twinsoft.convertigo.eclipse.editors.ngx.ApplicationComponentEditor editor = mpcto.activeEditor(false);
                    editor.launchBuilder(forceInstall, forceClean);
                }
            }
        }
    } catch (Throwable e) {
        ConvertigoPlugin.logException(e, "Unable to open the mobile builder!");
    } finally {
        shell.setCursor(null);
        waitCursor.dispose();
    }
}
Also used : ProjectExplorerView(com.twinsoft.convertigo.eclipse.views.projectexplorer.ProjectExplorerView) NgxComponentTreeObject(com.twinsoft.convertigo.eclipse.views.projectexplorer.model.NgxComponentTreeObject) Cursor(org.eclipse.swt.graphics.Cursor) NgxApplicationComponentTreeObject(com.twinsoft.convertigo.eclipse.views.projectexplorer.model.NgxApplicationComponentTreeObject) Shell(org.eclipse.swt.widgets.Shell) MobileApplicationComponentTreeObject(com.twinsoft.convertigo.eclipse.views.projectexplorer.model.MobileApplicationComponentTreeObject) MobileApplicationComponentTreeObject(com.twinsoft.convertigo.eclipse.views.projectexplorer.model.MobileApplicationComponentTreeObject) TreeObject(com.twinsoft.convertigo.eclipse.views.projectexplorer.model.TreeObject) NgxComponentTreeObject(com.twinsoft.convertigo.eclipse.views.projectexplorer.model.NgxComponentTreeObject) MobileComponentTreeObject(com.twinsoft.convertigo.eclipse.views.projectexplorer.model.MobileComponentTreeObject) NgxApplicationComponentTreeObject(com.twinsoft.convertigo.eclipse.views.projectexplorer.model.NgxApplicationComponentTreeObject) MobileComponentTreeObject(com.twinsoft.convertigo.eclipse.views.projectexplorer.model.MobileComponentTreeObject) Display(org.eclipse.swt.widgets.Display)

Aggregations

MobileComponentTreeObject (com.twinsoft.convertigo.eclipse.views.projectexplorer.model.MobileComponentTreeObject)6 TreeObject (com.twinsoft.convertigo.eclipse.views.projectexplorer.model.TreeObject)5 ProjectExplorerView (com.twinsoft.convertigo.eclipse.views.projectexplorer.ProjectExplorerView)3 DatabaseObjectTreeObject (com.twinsoft.convertigo.eclipse.views.projectexplorer.model.DatabaseObjectTreeObject)3 Cursor (org.eclipse.swt.graphics.Cursor)3 Display (org.eclipse.swt.widgets.Display)3 Shell (org.eclipse.swt.widgets.Shell)3 DatabaseObject (com.twinsoft.convertigo.beans.core.DatabaseObject)2 MobileApplicationComponentTreeObject (com.twinsoft.convertigo.eclipse.views.projectexplorer.model.MobileApplicationComponentTreeObject)2 MobilePageComponentTreeObject (com.twinsoft.convertigo.eclipse.views.projectexplorer.model.MobilePageComponentTreeObject)2 MobileUIComponentTreeObject (com.twinsoft.convertigo.eclipse.views.projectexplorer.model.MobileUIComponentTreeObject)2 NgxComponentTreeObject (com.twinsoft.convertigo.eclipse.views.projectexplorer.model.NgxComponentTreeObject)2 ObjectsFolderTreeObject (com.twinsoft.convertigo.eclipse.views.projectexplorer.model.ObjectsFolderTreeObject)2 ProjectTreeObject (com.twinsoft.convertigo.eclipse.views.projectexplorer.model.ProjectTreeObject)2 EngineException (com.twinsoft.convertigo.engine.EngineException)2 IOException (java.io.IOException)2 ArrayList (java.util.ArrayList)2 IStepSourceContainer (com.twinsoft.convertigo.beans.core.IStepSourceContainer)1 Project (com.twinsoft.convertigo.beans.core.Project)1 RequestableObject (com.twinsoft.convertigo.beans.core.RequestableObject)1