Search in sources :

Example 16 with IApplicationComponent

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

the class NgxBuilder method appRootChanged.

@Override
public void appRootChanged(final IApplicationComponent appComponent) throws EngineException {
    ApplicationComponent app = (ApplicationComponent) appComponent;
    if (app != null && initDone) {
        synchronized (app) {
            writeAppComponentTs(app);
            moveFiles();
            File appComponentTsFile = new File(appDir, "app.component.temp.ts");
            if (appComponentTsFile.exists()) {
                writeAppComponentTempTs(app);
            }
            Engine.logEngine.trace("(MobileBuilder) Handled 'appRootChanged'");
        }
    }
}
Also used : ApplicationComponent(com.twinsoft.convertigo.beans.ngx.components.ApplicationComponent) IApplicationComponent(com.twinsoft.convertigo.beans.core.IApplicationComponent) File(java.io.File)

Example 17 with IApplicationComponent

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

the class NgxBuilder method appCompTsChanged.

@Override
public void appCompTsChanged(final IApplicationComponent appComponent) throws EngineException {
    ApplicationComponent app = (ApplicationComponent) appComponent;
    if (app != null && initDone) {
        synchronized (app) {
            writeAppComponentTs(app);
            moveFiles();
            Engine.logEngine.trace("(MobileBuilder) Handled 'appCompTsChanged'");
        }
    }
}
Also used : ApplicationComponent(com.twinsoft.convertigo.beans.ngx.components.ApplicationComponent) IApplicationComponent(com.twinsoft.convertigo.beans.core.IApplicationComponent)

Example 18 with IApplicationComponent

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

the class Ionic3Builder method appRootChanged.

@Override
public void appRootChanged(final IApplicationComponent appComponent) throws EngineException {
    ApplicationComponent app = (ApplicationComponent) appComponent;
    if (app != null && initDone) {
        synchronized (app) {
            writeAppComponentTs(app);
            moveFiles();
            File appComponentTsFile = new File(ionicWorkDir, "src/app/app.component.temp.ts");
            if (appComponentTsFile.exists()) {
                writeAppComponentTempTs(app);
            }
            Engine.logEngine.trace("(MobileBuilder) Handled 'appRootChanged'");
        }
    }
}
Also used : IApplicationComponent(com.twinsoft.convertigo.beans.core.IApplicationComponent) ApplicationComponent(com.twinsoft.convertigo.beans.mobile.components.ApplicationComponent) File(java.io.File)

Example 19 with IApplicationComponent

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

the class NgxBuilder method appTemplateChanged.

@Override
public void appTemplateChanged(final IApplicationComponent appComponent) throws EngineException {
    ApplicationComponent app = (ApplicationComponent) appComponent;
    if (app != null && initDone) {
        synchronized (app) {
            writeAppTemplate(app);
            moveFiles();
            Engine.logEngine.trace("(MobileBuilder) Handled 'appTemplateChanged'");
        }
    }
}
Also used : ApplicationComponent(com.twinsoft.convertigo.beans.ngx.components.ApplicationComponent) IApplicationComponent(com.twinsoft.convertigo.beans.core.IApplicationComponent)

Example 20 with IApplicationComponent

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

the class Ionic3Builder method writeAppComponentTempTs.

@Override
public void writeAppComponentTempTs(final IApplicationComponent appComponent) throws EngineException {
    ApplicationComponent app = (ApplicationComponent) appComponent;
    try {
        if (app != null) {
            File appTsFile = new File(ionicWorkDir, "src/app/app.component.ts");
            synchronized (writtenFiles) {
                if (writtenFiles.contains(appTsFile)) {
                    File appTsFileTmp = toTmpFile(appTsFile);
                    if (appTsFileTmp.exists()) {
                        appTsFile = appTsFileTmp;
                    }
                }
            }
            File tempTsFile = new File(ionicWorkDir, "src/app/app.component.temp.ts");
            // Write file (do not need delay)
            FileUtils.copyFile(appTsFile, tempTsFile);
        }
    } catch (Exception e) {
        throw new EngineException("Unable to write ionic app component temp ts file", e);
    }
}
Also used : IApplicationComponent(com.twinsoft.convertigo.beans.core.IApplicationComponent) ApplicationComponent(com.twinsoft.convertigo.beans.mobile.components.ApplicationComponent) EngineException(com.twinsoft.convertigo.engine.EngineException) File(java.io.File) IOException(java.io.IOException) EngineException(com.twinsoft.convertigo.engine.EngineException)

Aggregations

IApplicationComponent (com.twinsoft.convertigo.beans.core.IApplicationComponent)27 ApplicationComponent (com.twinsoft.convertigo.beans.mobile.components.ApplicationComponent)12 ApplicationComponent (com.twinsoft.convertigo.beans.ngx.components.ApplicationComponent)12 File (java.io.File)11 EngineException (com.twinsoft.convertigo.engine.EngineException)4 IOException (java.io.IOException)4 MobileApplication (com.twinsoft.convertigo.beans.core.MobileApplication)2 Composite (org.eclipse.swt.widgets.Composite)2 Connector (com.twinsoft.convertigo.beans.core.Connector)1 MobilePlatform (com.twinsoft.convertigo.beans.core.MobilePlatform)1 Project (com.twinsoft.convertigo.beans.core.Project)1 Sequence (com.twinsoft.convertigo.beans.core.Sequence)1 Transaction (com.twinsoft.convertigo.beans.core.Transaction)1 BuildLocallyEndingDialog (com.twinsoft.convertigo.eclipse.dialogs.BuildLocallyEndingDialog)1 MobileApplicationEndpointEditorComposite (com.twinsoft.convertigo.eclipse.property_editors.MobileApplicationEndpointEditorComposite)1 ProjectExplorerView (com.twinsoft.convertigo.eclipse.views.projectexplorer.ProjectExplorerView)1 ArchiveExportOption (com.twinsoft.convertigo.engine.enums.ArchiveExportOption)1 BuildLocally (com.twinsoft.convertigo.engine.localbuild.BuildLocally)1 IProgressMonitor (org.eclipse.core.runtime.IProgressMonitor)1 Job (org.eclipse.core.runtime.jobs.Job)1