use of com.twinsoft.convertigo.beans.ngx.components.ApplicationComponent in project convertigo by convertigo.
the class NgxBuilder method appContributorsChanged.
@Override
public void appContributorsChanged(final IApplicationComponent appComponent) throws EngineException {
ApplicationComponent app = (ApplicationComponent) appComponent;
if (app != null && initDone) {
synchronized (app) {
writeAppSourceFiles(app);
moveFiles();
Engine.logEngine.trace("(MobileBuilder) Handled 'appContributorsChanged'");
}
}
}
use of com.twinsoft.convertigo.beans.ngx.components.ApplicationComponent in project convertigo by convertigo.
the class NgxBuilder 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);
deleteUselessPageDir(page.getName());
moveFiles();
Engine.logEngine.trace("(MobileBuilder) Handled 'pageRemoved'");
}
}
}
}
}
use of com.twinsoft.convertigo.beans.ngx.components.ApplicationComponent in project convertigo by convertigo.
the class NgxBuilder method getFunctionTempTsRelativePath.
@Override
public String getFunctionTempTsRelativePath(final IUIComponent uiComponent) throws EngineException {
UIComponent uic = (UIComponent) uiComponent;
IScriptComponent main = uic.getMainScriptComponent();
if (main != null) {
File tempTsDir = null;
String tempTsFileName = null;
if (main instanceof ApplicationComponent) {
UIActionStack stack = uic.getSharedAction();
tempTsDir = stack == null ? appDir : servicesDir;
tempTsFileName = stack == null ? "app.component.function.temp.ts" : "actionbeans.service.function.temp.ts";
}
if (main instanceof PageComponent) {
PageComponent page = (PageComponent) main;
String pageName = page.getName();
tempTsDir = pageDir(page);
tempTsFileName = pageName.toLowerCase() + ".function.temp.ts";
}
if (main instanceof UISharedComponent) {
UISharedComponent comp = (UISharedComponent) main;
String compName = comp.getName();
tempTsDir = compDir(comp);
tempTsFileName = compName.toLowerCase() + ".function.temp.ts";
}
if (tempTsDir != null && tempTsFileName != null) {
if (uiComponent instanceof UICustomAction) {
tempTsFileName = "CTS" + ((UICustomAction) uiComponent).priority + ".temp.ts";
}
File tempTsFile = new File(tempTsDir, tempTsFileName);
return tempTsFile.getPath().replace(projectDir.getPath(), File.separator);
}
}
return null;
}
use of com.twinsoft.convertigo.beans.ngx.components.ApplicationComponent in project convertigo by convertigo.
the class NgxBuilder method appStyleChanged.
@Override
public void appStyleChanged(final IApplicationComponent appComponent) throws EngineException {
ApplicationComponent app = (ApplicationComponent) appComponent;
if (app != null && initDone) {
synchronized (app) {
writeAppStyle(app);
moveFiles();
Engine.logEngine.trace("(MobileBuilder) Handled 'appStyleChanged'");
}
}
}
use of com.twinsoft.convertigo.beans.ngx.components.ApplicationComponent in project convertigo by convertigo.
the class NgxBuilder method getTempTsRelativePath.
@Override
public String getTempTsRelativePath(IApplicationComponent appComponent) throws EngineException {
ApplicationComponent app = (ApplicationComponent) appComponent;
try {
if (app != null) {
File appComponentTsFile = new File(appDir, "app.component.temp.ts");
String filePath = appComponentTsFile.getPath().replace(projectDir.getPath(), File.separator);
return filePath;
}
} catch (Exception e) {
}
return null;
}
Aggregations