Search in sources :

Example 1 with IApplicationComponent

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

the class Ionic3Builder method appContributorsChanged.

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

Example 2 with IApplicationComponent

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

the class Ionic3Builder 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 : IApplicationComponent(com.twinsoft.convertigo.beans.core.IApplicationComponent) ApplicationComponent(com.twinsoft.convertigo.beans.mobile.components.ApplicationComponent)

Example 3 with IApplicationComponent

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

the class Ionic3Builder method appModuleTsChanged.

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

Example 4 with IApplicationComponent

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

the class NgxBuilder method appThemeChanged.

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

Example 5 with IApplicationComponent

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

the class NgxBuilder method writeAppComponentTempTs.

@Override
public void writeAppComponentTempTs(final IApplicationComponent appComponent) throws EngineException {
    ApplicationComponent app = (ApplicationComponent) appComponent;
    try {
        if (app != null) {
            File appTsFile = new File(appDir, "app.component.ts");
            synchronized (writtenFiles) {
                if (writtenFiles.contains(appTsFile)) {
                    File appTsFileTmp = toTmpFile(appTsFile);
                    if (appTsFileTmp.exists()) {
                        appTsFile = appTsFileTmp;
                    }
                }
            }
            File tempTsFile = new File(appDir, "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 : ApplicationComponent(com.twinsoft.convertigo.beans.ngx.components.ApplicationComponent) IApplicationComponent(com.twinsoft.convertigo.beans.core.IApplicationComponent) 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)24 ApplicationComponent (com.twinsoft.convertigo.beans.mobile.components.ApplicationComponent)12 ApplicationComponent (com.twinsoft.convertigo.beans.ngx.components.ApplicationComponent)12 File (java.io.File)10 EngineException (com.twinsoft.convertigo.engine.EngineException)4 IOException (java.io.IOException)4