use of org.applause.lang.applauseDsl.Application in project applause by applause.
the class AbstractBuildStrategy method build.
public void build(IProgressMonitor monitor) throws CoreException {
if (canBuildProject()) {
final IFolder folder = getPlatformProject().getFolder(getGeneratedSourcesFolderName());
// FIXME: maybe we should just create the folder if it's missing?!
if (!folder.exists())
return;
List<EObject> objects = new ArrayList<EObject>();
for (Delta d : context.getDeltas()) {
if (d.getNew() != null) {
for (IEObjectDescription desc : d.getNew().getExportedObjects()) {
EObject obj = context.getResourceSet().getEObject(desc.getEObjectURI(), true);
EcoreUtil2.resolveAll(context.getResourceSet());
objects.add(obj);
}
}
}
Iterable<Application> applicationObjects = Iterables.filter(objects, Application.class);
if (!Iterables.isEmpty(applicationObjects)) {
deletePreviouslyGeneratedFiles(monitor, folder);
}
for (Application app : applicationObjects) {
OutputImpl output = new OutputImpl();
Outlet outlet = createOutlet(folder);
configureOutlet(outlet);
output.addOutlet(outlet);
// IFolder rootFolder = (IFolder) getPlatformProject().getAdapter(IFolder.class);
// // IPath location = getPlatformProject().getFullPath();
// // IFolder rootFolder = ResourcesPlugin.getWorkspace().getRoot().getFolder(location);
// Outlet projectRootOutlet = createOutlet(rootFolder);
// projectRootOutlet.setName("ROOT");
// output.addOutlet(projectRootOutlet);
generate(app, output);
copyResources(app, getModelProject().getFolder("/Images"));
getPlatformProject().build(IncrementalProjectBuilder.CLEAN_BUILD, monitor);
return;
}
}
}
use of org.applause.lang.applauseDsl.Application in project applause by applause.
the class ModelImpl method basicSetApplication.
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public NotificationChain basicSetApplication(Application newApplication, NotificationChain msgs) {
Application oldApplication = application;
application = newApplication;
if (eNotificationRequired()) {
ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, ApplauseDslPackage.MODEL__APPLICATION, oldApplication, newApplication);
if (msgs == null)
msgs = notification;
else
msgs.add(notification);
}
return msgs;
}
Aggregations