use of com.twinsoft.convertigo.beans.ngx.components.ApplicationComponent 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'");
}
}
}
use of com.twinsoft.convertigo.beans.ngx.components.ApplicationComponent in project convertigo by convertigo.
the class NgxBuilder method compRemoved.
@Override
public void compRemoved(final ISharedComponent sharedComponent) throws EngineException {
UISharedComponent comp = (UISharedComponent) sharedComponent;
if (comp != null && initDone) {
synchronized (comp) {
MobileApplication mobileApplication = project.getMobileApplication();
if (mobileApplication != null) {
ApplicationComponent application = (ApplicationComponent) mobileApplication.getApplicationComponent();
if (application != null) {
writeAppSourceFiles(application);
deleteUselessCompDir(comp.getName(), comp.getQName());
moveFiles();
Engine.logEngine.trace("(MobileBuilder) Handled 'compRemoved'");
ComponentRefManager.get(Mode.use).removeKey(comp.getQName());
}
}
}
}
}
use of com.twinsoft.convertigo.beans.ngx.components.ApplicationComponent 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'");
}
}
}
use of com.twinsoft.convertigo.beans.ngx.components.ApplicationComponent in project convertigo by convertigo.
the class SharedComponentWizard method sharedComponentAlreadyExists.
protected boolean sharedComponentAlreadyExists(String sharedComponentName) {
UIComponent uic = (UIComponent) getFirstInList();
MobileApplication ma = uic.getProject().getMobileApplication();
ApplicationComponent app = (ApplicationComponent) ma.getApplicationComponent();
for (UISharedComponent uisc : app.getSharedComponentList()) {
if (uisc.getName().equals(sharedComponentName)) {
return true;
}
}
return false;
}
use of com.twinsoft.convertigo.beans.ngx.components.ApplicationComponent in project convertigo by convertigo.
the class SharedComponentWizard method createUseShared.
private UIUseShared createUseShared(String qname) throws Exception {
UIUseShared uius = new UIUseShared();
uius.setSharedComponentQName(qname);
uius.hasChanged = true;
uius.bNew = true;
for (String name : dlg_map.keySet()) {
String value = ovarMap.get(name).keySet().iterator().next();
uius.add(createUseVariable(dlg_map.get(name), value));
}
UIComponent uic = (UIComponent) getLastInList();
MobileComponent mc = (MobileComponent) uic.getParent();
if (mc instanceof ApplicationComponent) {
ApplicationComponent parent = (ApplicationComponent) mc;
parent.add((DatabaseObject) uius, uic.priority);
} else if (mc instanceof PageComponent) {
PageComponent parent = (PageComponent) mc;
parent.add((DatabaseObject) uius, uic.priority);
} else if (mc instanceof UIComponent) {
UIComponent parent = (UIComponent) mc;
parent.add((DatabaseObject) uius, uic.priority);
}
return uius;
}
Aggregations