Commit 1a75c9e0 authored by Simon Barner's avatar Simon Barner
Browse files

Derive FileProjectCompositor from ModelElementCompositorBase

* This ensures that annotations are instantiated when new
  IProjectRootElement specializations are added to a file project

Issue-Ref: 3816
Issue-Url: https://af3-developer.fortiss.org/issues/3816

Signed-off-by: Simon Barner's avatarSimon Barner <barner@fortiss.org>
parent a108b91f
DevelopmentProcessConfigurationCompositor.java 575dca049c6d894febee9ffaa9275e9378b67d40 GREEN
ExecutionConfigurationStoreCompositor.java bab1bb181390f0d0d82df492113a6053aaae24e5 GREEN
FileProjectCompositor.java a6cc57929744fd3fdf85d1efe6279e6ffb9c4dc2 GREEN
FileProjectCompositor.java 4c37b0e6df0dfc97c952a3551f99f20b907de93b YELLOW
......@@ -15,12 +15,11 @@
+--------------------------------------------------------------------------*/
package org.fortiss.af3.project.compositor;
import static org.eclipse.emf.ecore.util.EcoreUtil.delete;
import org.eclipse.emf.ecore.EObject;
import org.fortiss.af3.project.model.FileProject;
import org.fortiss.af3.project.model.ProjectConfiguration;
import org.fortiss.af3.project.model.execution.ExecutionConfigurationStore;
import org.fortiss.tooling.base.compose.ModelElementCompositorBase;
import org.fortiss.tooling.kernel.extension.IElementCompositor;
import org.fortiss.tooling.kernel.extension.data.IElementCompositionContext;
import org.fortiss.tooling.kernel.extension.data.Prototype;
......@@ -31,7 +30,7 @@ import org.fortiss.tooling.kernel.model.IProjectRootElement;
*
* @author hoelzl
*/
public class FileProjectCompositor implements IElementCompositor<FileProject> {
public class FileProjectCompositor extends ModelElementCompositorBase<FileProject> {
/** {@inheritDoc} */
@Override
......@@ -50,6 +49,7 @@ public class FileProjectCompositor implements IElementCompositor<FileProject> {
@Override
public boolean compose(FileProject container, EObject contained,
IElementCompositionContext context) {
super.compose(container, contained, context);
return container.getRootElements().add((IProjectRootElement)contained);
}
......@@ -64,11 +64,4 @@ public class FileProjectCompositor implements IElementCompositor<FileProject> {
public boolean canDecompose(EObject contained) {
return isCorrectElementClass(contained);
}
/** {@inheritDoc} */
@Override
public boolean decompose(EObject contained) {
delete(contained, true);
return true;
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment