Search in sources :

Example 31 with MobileApplication

use of com.twinsoft.convertigo.beans.core.MobileApplication in project convertigo by convertigo.

the class NgxBuilder method pageRenamed.

@Override
public void pageRenamed(final IPageComponent pageComponent, final String oldName) throws EngineException {
    PageComponent page = (PageComponent) pageComponent;
    if (page != null && page.isEnabled() && initDone) {
        synchronized (page) {
            MobileApplication mobileApplication = project.getMobileApplication();
            if (mobileApplication != null) {
                ApplicationComponent application = (ApplicationComponent) mobileApplication.getApplicationComponent();
                if (application != null) {
                    writePageSourceFiles(page);
                    writeAppSourceFiles(application);
                    deleteUselessPageDir(oldName);
                    moveFiles();
                    Engine.logEngine.trace("(MobileBuilder) Handled 'pageRenamed'");
                }
            }
        }
    }
}
Also used : MobileApplication(com.twinsoft.convertigo.beans.core.MobileApplication) ApplicationComponent(com.twinsoft.convertigo.beans.ngx.components.ApplicationComponent) IApplicationComponent(com.twinsoft.convertigo.beans.core.IApplicationComponent) IPageComponent(com.twinsoft.convertigo.beans.core.IPageComponent) PageComponent(com.twinsoft.convertigo.beans.ngx.components.PageComponent)

Example 32 with MobileApplication

use of com.twinsoft.convertigo.beans.core.MobileApplication in project convertigo by convertigo.

the class Ionic3Builder method pageDisabled.

@Override
public void pageDisabled(final IPageComponent pageComponent) throws EngineException {
    PageComponent page = (PageComponent) pageComponent;
    if (page != null && !page.isEnabled() && initDone) {
        synchronized (page) {
            MobileApplication mobileApplication = project.getMobileApplication();
            if (mobileApplication != null) {
                ApplicationComponent application = (ApplicationComponent) mobileApplication.getApplicationComponent();
                if (application != null) {
                    writePageSourceFiles(page);
                    writeAppSourceFiles(application);
                    moveFiles();
                    Engine.logEngine.trace("(MobileBuilder) Handled 'pageDisabled'");
                }
            }
        }
    }
}
Also used : MobileApplication(com.twinsoft.convertigo.beans.core.MobileApplication) IApplicationComponent(com.twinsoft.convertigo.beans.core.IApplicationComponent) ApplicationComponent(com.twinsoft.convertigo.beans.mobile.components.ApplicationComponent) IPageComponent(com.twinsoft.convertigo.beans.core.IPageComponent) PageComponent(com.twinsoft.convertigo.beans.mobile.components.PageComponent)

Example 33 with MobileApplication

use of com.twinsoft.convertigo.beans.core.MobileApplication in project convertigo by convertigo.

the class Ionic3Builder method pageRemoved.

@Override
public void pageRemoved(final IPageComponent pageComponent) throws EngineException {
    PageComponent page = (PageComponent) pageComponent;
    if (page != null && page.isEnabled() && initDone) {
        synchronized (page) {
            MobileApplication mobileApplication = project.getMobileApplication();
            if (mobileApplication != null) {
                ApplicationComponent application = (ApplicationComponent) mobileApplication.getApplicationComponent();
                if (application != null) {
                    writeAppSourceFiles(application);
                    deleteUselessDir(page.getName());
                    moveFiles();
                    Engine.logEngine.trace("(MobileBuilder) Handled 'pageRemoved'");
                }
            }
        }
    }
}
Also used : MobileApplication(com.twinsoft.convertigo.beans.core.MobileApplication) IApplicationComponent(com.twinsoft.convertigo.beans.core.IApplicationComponent) ApplicationComponent(com.twinsoft.convertigo.beans.mobile.components.ApplicationComponent) IPageComponent(com.twinsoft.convertigo.beans.core.IPageComponent) PageComponent(com.twinsoft.convertigo.beans.mobile.components.PageComponent)

Example 34 with MobileApplication

use of com.twinsoft.convertigo.beans.core.MobileApplication in project convertigo by convertigo.

the class Ionic3Builder method pageRenamed.

@Override
public void pageRenamed(final IPageComponent pageComponent, final String oldName) throws EngineException {
    PageComponent page = (PageComponent) pageComponent;
    if (page != null && page.isEnabled() && initDone) {
        synchronized (page) {
            MobileApplication mobileApplication = project.getMobileApplication();
            if (mobileApplication != null) {
                ApplicationComponent application = (ApplicationComponent) mobileApplication.getApplicationComponent();
                if (application != null) {
                    writePageSourceFiles(page);
                    writeAppSourceFiles(application);
                    deleteUselessDir(oldName);
                    moveFiles();
                    Engine.logEngine.trace("(MobileBuilder) Handled 'pageRenamed'");
                }
            }
        }
    }
}
Also used : MobileApplication(com.twinsoft.convertigo.beans.core.MobileApplication) IApplicationComponent(com.twinsoft.convertigo.beans.core.IApplicationComponent) ApplicationComponent(com.twinsoft.convertigo.beans.mobile.components.ApplicationComponent) IPageComponent(com.twinsoft.convertigo.beans.core.IPageComponent) PageComponent(com.twinsoft.convertigo.beans.mobile.components.PageComponent)

Example 35 with MobileApplication

use of com.twinsoft.convertigo.beans.core.MobileApplication in project convertigo by convertigo.

the class LaunchMobileApplicationFullScreenProjectAction method run.

@Override
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();
            Object databaseObject = treeObject.getObject();
            if ((databaseObject != null) && (databaseObject instanceof MobileApplication)) {
                MobileApplication mobileApplication = (MobileApplication) databaseObject;
                String SERVER_C8O_URL = EnginePropertiesManager.getProperty(PropertyName.APPLICATION_SERVER_CONVERTIGO_URL);
                Program.launch(SERVER_C8O_URL + "/projects/" + mobileApplication.getProject().getName() + "/DisplayObjects/mobile/index.html");
            }
        }
    } catch (Throwable e) {
        ConvertigoPlugin.logException(e, "Unable to launch the mobile application selected!");
    } finally {
        shell.setCursor(null);
        waitCursor.dispose();
    }
}
Also used : Shell(org.eclipse.swt.widgets.Shell) ProjectExplorerView(com.twinsoft.convertigo.eclipse.views.projectexplorer.ProjectExplorerView) MobileApplication(com.twinsoft.convertigo.beans.core.MobileApplication) TreeObject(com.twinsoft.convertigo.eclipse.views.projectexplorer.model.TreeObject) TreeObject(com.twinsoft.convertigo.eclipse.views.projectexplorer.model.TreeObject) Cursor(org.eclipse.swt.graphics.Cursor) Display(org.eclipse.swt.widgets.Display)

Aggregations

MobileApplication (com.twinsoft.convertigo.beans.core.MobileApplication)36 IApplicationComponent (com.twinsoft.convertigo.beans.core.IApplicationComponent)16 ApplicationComponent (com.twinsoft.convertigo.beans.ngx.components.ApplicationComponent)12 IPageComponent (com.twinsoft.convertigo.beans.core.IPageComponent)8 MobilePlatform (com.twinsoft.convertigo.beans.core.MobilePlatform)8 IOException (java.io.IOException)8 UISharedComponent (com.twinsoft.convertigo.beans.ngx.components.UISharedComponent)7 Element (org.w3c.dom.Element)7 Project (com.twinsoft.convertigo.beans.core.Project)6 ApplicationComponent (com.twinsoft.convertigo.beans.mobile.components.ApplicationComponent)6 ServiceException (com.twinsoft.convertigo.engine.admin.services.ServiceException)6 File (java.io.File)6 EngineException (com.twinsoft.convertigo.engine.EngineException)5 IOs (com.twinsoft.convertigo.beans.mobileplatforms.IOs)4 AuthenticationException (com.twinsoft.convertigo.engine.AuthenticationException)4 PageComponent (com.twinsoft.convertigo.beans.mobile.components.PageComponent)3 Android (com.twinsoft.convertigo.beans.mobileplatforms.Android)3 PageComponent (com.twinsoft.convertigo.beans.ngx.components.PageComponent)3 ProjectExplorerView (com.twinsoft.convertigo.eclipse.views.projectexplorer.ProjectExplorerView)3 Cursor (org.eclipse.swt.graphics.Cursor)3