Commit 23b88358 authored by Simon Barner's avatar Simon Barner
Browse files

Model child/parent allocation entries in allocation service

* No longer configure parent allocation types in allocation table
  editors.
* Add and use addParentAllocationEntryType(), getParentEntryType(),
  getChildEntryTypes() methods to allocation service

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

Signed-off-by: Simon Barner's avatarSimon Barner <barner@fortiss.org>
parent 78d4e5db
AllocationTableEditor.java c39375fae077d6ca9634aba7d08677790a1e6cfb YELLOW
ModelListenerEditorBase.java a5a0c97923f5d08d688e8ff16b2e1d1bc10f34f8 YELLOW
ParameterTableEditor.java edbd2d0e4d97a67b7ecae584d2bda0221f6fcb54 YELLOW
ParameterTableEditor.java d7ef21b22206c9d0a3473dfcad355ecea1acca1a YELLOW
......@@ -120,17 +120,6 @@ public abstract class AllocationTableEditor<T extends AllocationTable>
/** Flag if the source view has a hidden root element that needs to be specially treated. */
private boolean hasSourceViewHiddenRootElement;
/**
* {@link AllocationEntry} type of parent elements (optional). If non-{@code null}, creating an
* {@link AllocationEntry} for a given {@code (source, target)} model element pair is only
* enabled if:
* <ul>
* <li>An allocation entry exists for {@code (parent of source, parent of target)}</li>
* <li>No allocation exists for {@code (parent of source, parent of target)}.</li>
* <ul>
*/
private Class<? extends AllocationEntry> parentEntryType;
/** The GUI element. */
private AllocationTableEditorGUI gui;
......@@ -144,26 +133,32 @@ public abstract class AllocationTableEditor<T extends AllocationTable>
/* package */ AllocationTableEditor(Class<? extends AllocationEntry> allocationEntryType,
ViewElementFilter sourceViewElementFilter, ViewElementFilter targetViewElementFilter,
boolean uniqueSourceView, boolean hasSourceViewHiddenRootElement,
Class<? extends AllocationEntry> parentEntryType,
List<EStructuralFeature> observedFeatures) {
super(union(observedFeatures, parentEntryType != null
? getEClassForClass(parentEntryType).getEAllStructuralFeatures() : emptyList()));
super(getObservableFeatures(observedFeatures, allocationEntryType));
this.allocationEntryType = allocationEntryType;
this.sourceViewElementFilter = sourceViewElementFilter;
this.targetViewElementFilter = targetViewElementFilter;
this.uniqueSourceView = uniqueSourceView;
this.hasSourceViewHiddenRootElement = hasSourceViewHiddenRootElement;
this.parentEntryType = parentEntryType;
}
/** Helper method to compute the union of two {@link EStructuralFeature} lists. */
private static List<EStructuralFeature> union(List<EStructuralFeature> list1,
List<EStructuralFeature> list2) {
/**
* To determine {@link List} of observable {@link EStructuralFeature}s for a given list of
* {@code observableFeatures} and the given {@code entryType}.
*/
private static List<EStructuralFeature> getObservableFeatures(
List<EStructuralFeature> observableFeatures,
Class<? extends AllocationEntry> entryType) {
Set<EStructuralFeature> set = new HashSet<EStructuralFeature>();
set.addAll(list1);
set.addAll(list2);
set.addAll(observableFeatures != null ? observableFeatures : emptyList());
IAllocationService as = IAllocationService.getInstance();
Class<? extends AllocationEntry> parentEntryType = as.getParentEntryType(entryType);
if(parentEntryType != null) {
set.addAll(getEClassForClass(parentEntryType).getEAllStructuralFeatures());
}
return new ArrayList<EStructuralFeature>(set);
}
......@@ -171,12 +166,10 @@ public abstract class AllocationTableEditor<T extends AllocationTable>
/** Constructor. */
protected AllocationTableEditor(Class<? extends AllocationEntry> allocationEntryType,
ViewElementFilter sourceViewElementFilter, ViewElementFilter targetViewElementFilter,
boolean uniqueSourceView, boolean hasSourceViewHiddenRootElement,
Class<? extends AllocationEntry> parentAllocationEntryType) {
boolean uniqueSourceView, boolean hasSourceViewHiddenRootElement) {
this(allocationEntryType, sourceViewElementFilter, targetViewElementFilter,
uniqueSourceView, hasSourceViewHiddenRootElement, parentAllocationEntryType,
emptyList());
uniqueSourceView, hasSourceViewHiddenRootElement, emptyList());
}
/** Constructor. */
......@@ -374,10 +367,13 @@ public abstract class AllocationTableEditor<T extends AllocationTable>
return true;
}
Class<? extends AllocationEntry> parentEntryType =
as.getParentEntryType(getAllocationEntryType());
// Case 3: 'object' refers to an AllocationEntry for a related parent model element
return getParentEntryType() != null && (getParentEntryType().isAssignableFrom(objectType) ||
isEntityType(object, as.getSourceEntityTypes(getParentEntryType())) ||
isEntityType(object, as.getTargetEntityTypes(getParentEntryType())));
return parentEntryType != null && (parentEntryType.isAssignableFrom(objectType) ||
isEntityType(object, as.getSourceEntityTypes(parentEntryType)) ||
isEntityType(object, as.getTargetEntityTypes(parentEntryType)));
}
/** {@inheritDoc} */
......@@ -406,18 +402,19 @@ public abstract class AllocationTableEditor<T extends AllocationTable>
/** Performs an update because an entity has been added or removed. */
private void updateEntityChanged(IModelElement entity) {
final IAllocationService as = IAllocationService.getInstance();
if(isEntityType(entity, as.getSourceEntityTypes(allocationEntryType))) {
Collection<Class<? extends IModelElement>> sourceEntityTypes =
IAllocationService.getInstance().getSourceEntityTypes(allocationEntryType);
Collection<Class<? extends IModelElement>> sourceEntityTypes =
IAllocationService.getInstance().getSourceEntityTypes(allocationEntryType);
Collection<Class<? extends IModelElement>> targetEntityTypes =
IAllocationService.getInstance().getTargetEntityTypes(allocationEntryType);
Class<? extends AllocationEntry> parentEntryType =
as.getParentEntryType(allocationEntryType);
if(isEntityType(entity, sourceEntityTypes)) {
updateEntityTypeComboBox(gui.getComboViewerSourceEntityType(), sourceEntityTypes,
getEditedObject().getSourceView(), this::setSourceEntityType);
} else if(isEntityType(entity, as.getTargetEntityTypes(allocationEntryType))) {
Collection<Class<? extends IModelElement>> targetEntityTypes =
IAllocationService.getInstance().getTargetEntityTypes(allocationEntryType);
} else if(isEntityType(entity, targetEntityTypes)) {
updateEntityTypeComboBox(gui.getComboViewerTargetEntityType(), targetEntityTypes,
getEditedObject().getTargetView(), this::setTargetEntityType);
} else if(getParentEntryType() != null &&
getParentEntryType().isAssignableFrom(entity.getClass())) {
} else if(parentEntryType != null && parentEntryType.isAssignableFrom(entity.getClass())) {
updateSuperOrdinateElementComboBox(gui.getComboViewerSourceSuperOrdinateElement(),
getSourceSuperOrdinateElements(), this::setSourceSuperOrdinateElement);
updateSuperOrdinateElementComboBox(gui.getComboViewerTargetSuperOrdinateElement(),
......@@ -570,14 +567,16 @@ public abstract class AllocationTableEditor<T extends AllocationTable>
* superordinate allocation.
*/
public Collection<IModelElement> getSourceSuperOrdinateElements() {
if(getParentEntryType() == null) {
Class<? extends AllocationEntry> parentEntryType =
IAllocationService.getInstance().getParentEntryType(getAllocationEntryType());
if(parentEntryType == null) {
return null;
}
Set<IModelElement> rval = new HashSet<IModelElement>();
for(IModelElement element : getSourceViewModelElements()) {
if(isAllocated(getEditedObject(), getParentEntryType(),
(IModelElement)element.eContainer(), targetSuperOrdinateElement)) {
if(isAllocated(getEditedObject(), parentEntryType, (IModelElement)element.eContainer(),
targetSuperOrdinateElement)) {
rval.add((IModelElement)element.eContainer());
}
}
......@@ -591,13 +590,15 @@ public abstract class AllocationTableEditor<T extends AllocationTable>
* superordinate allocation.
*/
public Collection<IModelElement> getTargetSuperOrdinateElements() {
if(getParentEntryType() == null) {
Class<? extends AllocationEntry> parentEntryType =
IAllocationService.getInstance().getParentEntryType(getAllocationEntryType());
if(parentEntryType == null) {
return null;
}
Set<IModelElement> rval = new HashSet<IModelElement>();
for(IModelElement element : getTargetViewModelElements()) {
if(isAllocated(getEditedObject(), getParentEntryType(), sourceSuperOrdinateElement,
if(isAllocated(getEditedObject(), parentEntryType, sourceSuperOrdinateElement,
(IModelElement)element.eContainer())) {
rval.add((IModelElement)element.eContainer());
}
......@@ -868,11 +869,6 @@ public abstract class AllocationTableEditor<T extends AllocationTable>
targetViewElementFilter);
}
/** Getter for {@link #parentEntryType}. */
public Class<? extends AllocationEntry> getParentEntryType() {
return parentEntryType;
}
/** Getter for {@link #gui}. */
public AllocationTableEditorGUI getGUI() {
return gui;
......
......@@ -74,7 +74,7 @@ public class ParameterTableEditor<T extends ParameterTable> extends AllocationTa
Collection<Class<? extends IAnnotatedSpecification>> sourceEntityAnnotationTypes,
ViewElementFilter sourceViewElementFilter, ViewElementFilter targetViewElementFilter) {
super(allocationEntryType, sourceViewElementFilter, targetViewElementFilter, false, false,
null, getStructuralFeatures(annotationType, sourceEntityAnnotationTypes));
getStructuralFeatures(annotationType, sourceEntityAnnotationTypes));
this.annotationType = annotationType;
this.sourceEntityAnnotationTypes = sourceEntityAnnotationTypes;
}
......
......@@ -7,4 +7,4 @@ TreeViewerCheckBoxEditingSupport.java e6cadef343eb7afd25fe31bdbba4a080a81b4062 Y
TreeViewerCheckBoxLabelProvider.java 97fe6771fbe09ccd16c1fe1ade862d2f95093ed1 YELLOW
TreeViewerContentProvider.java e19b353b4f7624fd38db782524fed5cdf66dff55 GREEN
TreeViewerFirstColumnLabelProvider.java 41af5aeea1c94de2deb2a024b5d0c589302b0c15 GREEN
TreeViewerManager.java 02baf9281145ee30f057e7731e5bbf99c8e7ab23 YELLOW
TreeViewerManager.java e8e6de4ffbacc651ef1183721ed17e74a3f7e4a3 YELLOW
......@@ -42,6 +42,7 @@ import org.eclipse.swt.events.ControlEvent;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.widgets.Tree;
import org.eclipse.swt.widgets.TreeColumn;
import org.fortiss.af3.allocation.IAllocationService;
import org.fortiss.af3.allocation.model.AllocationEntry;
import org.fortiss.af3.allocation.model.AllocationTable;
import org.fortiss.af3.allocation.ui.editor.AllocationTableEditor;
......@@ -385,16 +386,18 @@ public class TreeViewerManager<T extends AllocationTable> {
protected ColumnLabelProvider createColumnLabelProvider(AllocationTable allocationTable,
Class<? extends AllocationEntry> allocationEntryType,
Class<? extends IModelElement> sourceEntityType, IModelElement targetElement) {
IAllocationService as = IAllocationService.getInstance();
return new TreeViewerCheckBoxLabelProvider<T>(allocationTable, allocationEntryType,
sourceEntityType, targetElement, allocationTableEditor.getParentEntryType(),
sourceEntityType, targetElement, as.getParentEntryType(allocationEntryType),
allocationTableEditor.hasSourceViewHiddenRootElement());
}
/** Creates an {@link EditingSupport} for {@link #treeViewer}. */
protected EditingSupport createEditingSupport(AllocationTable allocationTable,
Class<? extends AllocationEntry> allocationEntryType, IModelElement targetElement) {
IAllocationService as = IAllocationService.getInstance();
return new TreeViewerCheckBoxEditingSupport<T>(allocationTable, allocationEntryType,
targetElement, allocationTableEditor.getParentEntryType(),
targetElement, as.getParentEntryType(allocationEntryType),
allocationTableEditor.hasSourceViewHiddenRootElement(), treeViewer);
}
}
AF3AllocationActivator.java fa98bbdbd34d9d3c76f7f2827f2f456105c90fa6 GREEN
IAllocationService.java af17042541848e8e5cdb600d5b901d3f79eca0b8 GREEN
IAllocationService.java 09de51c417e5cb184ab1092274204878967786ac YELLOW
......@@ -150,4 +150,26 @@ public interface IAllocationService {
* in some views).
*/
public boolean isAllocationTableInternal(Class<? extends AllocationTable> allocationTableType);
/**
* Registers a {@code parentEntryType} with the given {@code childEntryType} (see
* {@link #getParentEntryType(Class)}).
*/
public void addParentAllocationEntryType(Class<? extends AllocationEntry> childEntryType,
Class<? extends AllocationEntry> parentEntryType);
/**
* For the given {@code childEntryType}, returns the "parent" {@link AllocationEntry}, i.e. the
* allocation mapping the of the entities that own the entries whose allocation is described by
* the given {@code childEntryType}.
*/
public Class<? extends AllocationEntry>
getParentEntryType(Class<? extends AllocationEntry> childEntryType);
/**
* For the given {@code parentEntryType}, returns the "child" {@link AllocationEntry}s (see
* {@link #getParentEntryType(Class)}).
*/
public Collection<Class<? extends AllocationEntry>>
getChildEntryTypes(Class<? extends AllocationEntry> parentEntryType);
}
AllocationService.java 363f7f1ad35862ef2e0012f181e2b09234575152 GREEN
AllocationService.java b196524b59b1baa064aeb7b76480be2b96b7477c YELLOW
......@@ -145,6 +145,18 @@ public final class AllocationService implements IAllocationService, IIntrospecti
private EMFTypeMap<AllocationTable, Void> internalAllocationTableTypeMap =
new EMFTypeMap<AllocationTable, Void>();
/**
* Maps a parent allocation type entry to a child allocation type entry. Child allocations
* depend on parent allocations, i.e. a child allocation can only exist if the given parent
* allocation exits..
*/
private EMFTypeToTypeSetMap<AllocationEntry, AllocationEntry> parentChildEntryTypeMap =
new EMFTypeToTypeSetMap<AllocationEntry, AllocationEntry>();
/** Inverse of {@link #parentChildEntryTypeMap}. */
private EMFTypeToTypeMap<AllocationEntry, AllocationEntry> childParentEntryTypeMap =
new EMFTypeToTypeMap<AllocationEntry, AllocationEntry>();
/** The singleton instance. */
private static final AllocationService INSTANCE = new AllocationService();
......@@ -389,4 +401,35 @@ public final class AllocationService implements IAllocationService, IIntrospecti
public boolean isAllocationTableInternal(Class<? extends AllocationTable> allocationTableType) {
return internalAllocationTableTypeMap.containsKey(allocationTableType);
}
/** {@inheritDoc} */
@Override
public void addParentAllocationEntryType(Class<? extends AllocationEntry> childEntryType,
Class<? extends AllocationEntry> parentEntryType) {
TypeSet<AllocationEntry> childEntryTypes = parentChildEntryTypeMap.get(parentEntryType);
if(childEntryTypes == null) {
childEntryTypes = new TypeSet<AllocationEntry>();
parentChildEntryTypeMap.put(parentEntryType, childEntryTypes);
}
childEntryTypes.add(childEntryType);
childParentEntryTypeMap.put(childEntryType, parentEntryType);
}
/** {@inheritDoc} */
@Override
public Class<? extends AllocationEntry>
getParentEntryType(Class<? extends AllocationEntry> childEntryType) {
return childParentEntryTypeMap.get(childEntryType);
}
/** {@inheritDoc} */
@Override
public Collection<Class<? extends AllocationEntry>>
getChildEntryTypes(Class<? extends AllocationEntry> parentEntryType) {
TypeSet<AllocationEntry> childEntryTypes = parentChildEntryTypeMap.get(parentEntryType);
return childEntryTypes != null ? childEntryTypes : emptyList();
}
}
ComponentToPartitionAllocationTableEditor.java 15c978a9b79bf08872b242a6465869be45e74c17 YELLOW
ComponentToPartitionAllocationTableEditor.java dbb3abb28aab24dd7172c9a355cb34988b2e550e YELLOW
ComponentToPartitionAllocationTableEditorBinding.java a13c88d1b99a78c90af4825774440a4c1581c4ca YELLOW
InputPortToPartitionInputPortAllocationTableEditor.java a59472e37202a70c604147581a553f620f23144c YELLOW
InputPortToPartitionInputPortAllocationTableEditor.java ac635ad629721582f2e7f69549b6e1f80e60f559 YELLOW
InputPortToPartitionInputPortAllocationTableEditorBinding.java 521daafa50ee06ea000ea253259d88c529055530 YELLOW
OutputPortToPartitionOutputPortAllocationTableEditor.java 6da10ebb5542510ab374b9018c883b0b0503849c YELLOW
OutputPortToPartitionOutputPortAllocationTableEditor.java 88b81039f34f3eb3d7843940a1aa5af2c706f17b YELLOW
OutputPortToPartitionOutputPortAllocationTableEditorBinding.java 91db0ed8652e3332e28c3466868b57037d6dd9ae YELLOW
PartitionEditor.java 4fed91e0c230d97f3640feba61eee9f155fb81b7 YELLOW
PartitionEditorBinding.java 35a60f371793d5e449e383f8e15dfeb7e4c291ba YELLOW
PartitionInputPortToReceiverAllocationTableEditor.java c9e7e62554202b5f497845a54069183303f97ff9 YELLOW
PartitionInputPortToReceiverAllocationTableEditor.java cf904ac9be00edccbb9082b0611a2660966ea75b YELLOW
PartitionInputPortToReceiverAllocationTableEditorBinding.java cd30128b2c781585b5fde8fd5c37367172d8fd15 YELLOW
PartitionOutputPortToTransmitterAllocationTableEditor.java 410a5f432608aeefe93514fcbeb1f96aec0681fe YELLOW
PartitionOutputPortToTransmitterAllocationTableEditor.java aa00f185e339d3556411a3ff701de09726f8322b YELLOW
PartitionOutputPortToTransmitterAllocationTableEditorBinding.java 113b06acaafc8f4a436981e3c7a180fa58ac05bc YELLOW
PartitionPortToTransceiverAllocationTableEditor.java 77e3be9ee3376d7992fcc383385c3bf1a712c435 YELLOW
PartitionPortToTransceiverAllocationTableEditor.java 4c3b3cdc9e4fa769387a691f18b9d4083e7af281 YELLOW
PartitionPortToTransceiverAllocationTableEditorBinding.java f9035312ca5b655af523da5e79aee6e1a08fca5a YELLOW
PartitionToExecutionUnitAllocationTableEditor.java abdeb488238df6f9eee80d4aa00ce1931856f65c YELLOW
PartitionToExecutionUnitAllocationTableEditorBinding.java b726b66d2bcb46533af6888f8536e16cea10bcce YELLOW
TaskInputPortToPartitionInputPortAllocationTableEditor.java 0fb97a9a101fe50f9b308eebca9da1dbaaac9ae8 YELLOW
TaskInputPortToPartitionInputPortAllocationTableEditor.java 087b26f37b29318ab6282926cb4696a29ae52fd9 YELLOW
TaskInputPortToPartitionInputPortAllocationTableEditorBinding.java 3db3df737e3006d45fab3c84408e1cd70e4a4800 YELLOW
TaskOutputPortToPartitionOutputPortAllocationTableEditor.java 24d0e1463547274c3633c5548d0b21ad7f21e4ae YELLOW
TaskOutputPortToPartitionOutputPortAllocationTableEditor.java e17d7aa4733ed0d1e5780a44d59b54f99c1e11ca YELLOW
TaskOutputPortToPartitionOutputPortAllocationTableEditorBinding.java 8cc685fdae016bd4d5b3c876bf3dfb9349d22bef YELLOW
TaskToPartitionAllocationTableEditor.java ebae374f3846b4f55df64abfd09ae6d320ed941b YELLOW
TaskToPartitionAllocationTableEditorBinding.java 72b7148bdf0ca8467105d796ad65671e2c34c6ec YELLOW
......@@ -34,6 +34,6 @@ public class ComponentToPartitionAllocationTableEditor
// Sources: Components (without hidden root component that represents the system)
// Targets: Partitions
super(ComponentToPartitionAllocationEntry.class,
c -> ((Component)c).getParentComponent() != null, null, true, true, null);
c -> ((Component)c).getParentComponent() != null, null, true, true);
}
}
......@@ -18,7 +18,6 @@ package org.fortiss.af3.partition.ui.editor;
import org.fortiss.af3.allocation.ui.editor.AllocationTableEditor;
import org.fortiss.af3.component.model.InputPort;
import org.fortiss.af3.partition.model.PartitionInputPort;
import org.fortiss.af3.partition.model.allocation.ComponentToPartitionAllocationEntry;
import org.fortiss.af3.partition.model.allocation.ComponentToPartitionAllocationTable;
import org.fortiss.af3.partition.model.allocation.InputPortToPartitionInputPortAllocationEntry;
......@@ -35,7 +34,6 @@ public class InputPortToPartitionInputPortAllocationTableEditor
// Sources: Input ports (without those of hidden root component representing system inputs)
// Targets: Partition input ports
super(InputPortToPartitionInputPortAllocationEntry.class,
p -> ((InputPort)p).getComponent().getParentComponent() != null, null, true, true,
ComponentToPartitionAllocationEntry.class);
p -> ((InputPort)p).getComponent().getParentComponent() != null, null, true, true);
}
}
......@@ -18,7 +18,6 @@ package org.fortiss.af3.partition.ui.editor;
import org.fortiss.af3.allocation.ui.editor.AllocationTableEditor;
import org.fortiss.af3.component.model.OutputPort;
import org.fortiss.af3.partition.model.PartitionOutputPort;
import org.fortiss.af3.partition.model.allocation.ComponentToPartitionAllocationEntry;
import org.fortiss.af3.partition.model.allocation.ComponentToPartitionAllocationTable;
import org.fortiss.af3.partition.model.allocation.OutputPortToPartitionOutputPortAllocationEntry;
......@@ -35,7 +34,6 @@ public class OutputPortToPartitionOutputPortAllocationTableEditor
// Sources: Output ports (without those of hidden root component representing system output)
// Targets: Partition output ports
super(OutputPortToPartitionOutputPortAllocationEntry.class,
p -> ((OutputPort)p).getComponent().getParentComponent() != null, null, true, true,
ComponentToPartitionAllocationEntry.class);
p -> ((OutputPort)p).getComponent().getParentComponent() != null, null, true, true);
}
}
......@@ -18,7 +18,6 @@ package org.fortiss.af3.partition.ui.editor;
import org.fortiss.af3.allocation.ui.editor.AllocationTableEditor;
import org.fortiss.af3.partition.model.PartitionInputPort;
import org.fortiss.af3.partition.model.allocation.PartitionInputPortToReceiverAllocationEntry;
import org.fortiss.af3.partition.model.allocation.PartitionToExecutionUnitAllocationEntry;
import org.fortiss.af3.partition.model.allocation.PartitionToExecutionUnitAllocationTable;
import org.fortiss.af3.platform.model.ExecutionUnit;
import org.fortiss.af3.platform.model.Receiver;
......@@ -34,7 +33,6 @@ public class PartitionInputPortToReceiverAllocationTableEditor
/** Constructor. */
public PartitionInputPortToReceiverAllocationTableEditor() {
super(PartitionInputPortToReceiverAllocationEntry.class, null,
r -> r.eContainer() instanceof ExecutionUnit, true, false,
PartitionToExecutionUnitAllocationEntry.class);
r -> r.eContainer() instanceof ExecutionUnit, true, false);
}
}
......@@ -18,7 +18,6 @@ package org.fortiss.af3.partition.ui.editor;
import org.fortiss.af3.allocation.ui.editor.AllocationTableEditor;
import org.fortiss.af3.partition.model.PartitionOutputPort;
import org.fortiss.af3.partition.model.allocation.PartitionOutputPortToTransmitterAllocationEntry;
import org.fortiss.af3.partition.model.allocation.PartitionToExecutionUnitAllocationEntry;
import org.fortiss.af3.partition.model.allocation.PartitionToExecutionUnitAllocationTable;
import org.fortiss.af3.platform.model.ExecutionUnit;
import org.fortiss.af3.platform.model.Transmitter;
......@@ -34,7 +33,6 @@ public class PartitionOutputPortToTransmitterAllocationTableEditor
/** Constructor. */
public PartitionOutputPortToTransmitterAllocationTableEditor() {
super(PartitionOutputPortToTransmitterAllocationEntry.class, null,
r -> r.eContainer() instanceof ExecutionUnit, true, false,
PartitionToExecutionUnitAllocationEntry.class);
r -> r.eContainer() instanceof ExecutionUnit, true, false);
}
}
......@@ -18,7 +18,6 @@ package org.fortiss.af3.partition.ui.editor;
import org.fortiss.af3.allocation.ui.editor.AllocationTableEditor;
import org.fortiss.af3.partition.model.PartitionPort;
import org.fortiss.af3.partition.model.allocation.PartitionPortToTransceiverAllocationEntry;
import org.fortiss.af3.partition.model.allocation.PartitionToExecutionUnitAllocationEntry;
import org.fortiss.af3.partition.model.allocation.PartitionToExecutionUnitAllocationTable;
import org.fortiss.af3.platform.model.ExecutionUnit;
import org.fortiss.af3.platform.model.Transceiver;
......@@ -34,7 +33,6 @@ public class PartitionPortToTransceiverAllocationTableEditor
/** Constructor. */
public PartitionPortToTransceiverAllocationTableEditor() {
super(PartitionPortToTransceiverAllocationEntry.class, null,
r -> r.eContainer() instanceof ExecutionUnit, true, false,
PartitionToExecutionUnitAllocationEntry.class);
r -> r.eContainer() instanceof ExecutionUnit, true, false);
}
}
......@@ -21,7 +21,6 @@ import org.fortiss.af3.partition.model.PartitionInputPort;
import org.fortiss.af3.partition.model.allocation.TaskInputPortToPartitionInputPortAllocationEntry;
import org.fortiss.af3.partition.model.allocation.TaskToPartitionAllocationTable;
import org.fortiss.af3.task.model.TaskInputPort;
import org.fortiss.af3.task.model.allocation.TaskToExecutionUnitAllocationEntry;
/**
* Editor to assign {@link TaskInputPort}s to {@link PartitionInputPort}s.
......@@ -34,7 +33,6 @@ public class TaskInputPortToPartitionInputPortAllocationTableEditor
/** Constructor. */
public TaskInputPortToPartitionInputPortAllocationTableEditor() {
super(TaskInputPortToPartitionInputPortAllocationEntry.class, null,
r -> r.eContainer() instanceof Partition, true, false,
TaskToExecutionUnitAllocationEntry.class);
r -> r.eContainer() instanceof Partition, true, false);
}
}
......@@ -21,7 +21,6 @@ import org.fortiss.af3.partition.model.PartitionOutputPort;
import org.fortiss.af3.partition.model.allocation.TaskOutputPortToPartitionOutputPortAllocationEntry;
import org.fortiss.af3.partition.model.allocation.TaskToPartitionAllocationTable;
import org.fortiss.af3.task.model.TaskOutputPort;
import org.fortiss.af3.task.model.allocation.TaskToExecutionUnitAllocationEntry;
/**
* Editor to assign {@link TaskOutputPort}s to {@link PartitionOutputPort}s.
......@@ -34,7 +33,6 @@ public class TaskOutputPortToPartitionOutputPortAllocationTableEditor
/** Constructor. */
public TaskOutputPortToPartitionOutputPortAllocationTableEditor() {
super(TaskOutputPortToPartitionOutputPortAllocationEntry.class, null,
r -> r.eContainer() instanceof Partition, true, false,
TaskToExecutionUnitAllocationEntry.class);
r -> r.eContainer() instanceof Partition, true, false);
}
}
AF3PartitionActivator.java ccdbb9696f58ced319976d654eed3e677f27fb13 YELLOW
AF3PartitionActivator.java 33938f07e1470e468a8fdc2f6014737c427f8b67 YELLOW
......@@ -98,6 +98,10 @@ public class AF3PartitionActivator extends Plugin {
OutputPort.class);
as.addTargetEntityType(OutputPortToPartitionOutputPortAllocationEntry.class,
PartitionOutputPort.class);
as.addParentAllocationEntryType(InputPortToPartitionInputPortAllocationEntry.class,
ComponentToPartitionAllocationEntry.class);
as.addParentAllocationEntryType(OutputPortToPartitionOutputPortAllocationEntry.class,
ComponentToPartitionAllocationEntry.class);
as.addAllocationEntryType(TaskToPartitionAllocationTable.class,
TaskToPartitionAllocationEntry.class);
......@@ -117,6 +121,8 @@ public class AF3PartitionActivator extends Plugin {
TaskOutputPort.class);
as.addTargetEntityType(TaskOutputPortToPartitionOutputPortAllocationEntry.class,
PartitionOutputPort.class);
as.addParentAllocationEntryType(TaskInputPortToPartitionInputPortAllocationEntry.class,
TaskToPartitionAllocationEntry.class);
as.addAllocationEntryType(PartitionToExecutionUnitAllocationTable.class,
PartitionToExecutionUnitAllocationEntry.class);
......@@ -137,6 +143,12 @@ public class AF3PartitionActivator extends Plugin {
as.addSourceEntityType(PartitionPortToTransceiverAllocationEntry.class,
PartitionPort.class);
as.addTargetEntityType(PartitionPortToTransceiverAllocationEntry.class, Transceiver.class);
as.addParentAllocationEntryType(PartitionInputPortToReceiverAllocationEntry.class,
PartitionToExecutionUnitAllocationEntry.class);
as.addParentAllocationEntryType(PartitionOutputPortToTransmitterAllocationEntry.class,
PartitionToExecutionUnitAllocationEntry.class);
as.addParentAllocationEntryType(PartitionPortToTransceiverAllocationEntry.class,
PartitionToExecutionUnitAllocationEntry.class);
as.addCoveredModelType(ComponentToExecutionUnitAllocationTable.class,
PartitionArchitecture.class);
......
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