Commit ab2e7928 authored by Simon Barner's avatar Simon Barner
Browse files

Allocation:

- Add Component-to-Task allocation table specialization
- Add Task-to-Partition allocation table specialization
- UI improvements
 - Better icons, names
 - Sort  table specializations: ca -> ta -> pa -> hw
 
SystemSchedule: change type of allocationTableCollection reference to AllocationTableCollection

Task:
- Cleanup (e.g., use handler in task UI)



This commit introduces new dependencies to af3.task.ui, af3.allocation[.ui]
refs 2950,3188,3067,3035
parent 50b35c1d
AF3AllocationUIActivator.java 2fd43538a95d704667675afb89be7049e968a061 YELLOW
DefaultStyle.java 4b845eb0d083d26ba604f7ff4dee9091b40ca3d9 YELLOW
......@@ -13,22 +13,18 @@
| See the License for the specific language governing permissions and |
| limitations under the License. |
+--------------------------------------------------------------------------*/
package org.fortiss.af3.partition.compositor;
import org.fortiss.af3.allocation.compose.AllocationTableCollectionCompositorBase;
import org.fortiss.af3.allocation.model.AllocationTableCollection;
import org.fortiss.af3.partition.model.allocation.ComponentToPartitionAllocationTable;
package org.fortiss.af3.allocation.ui;
/**
* Compositor to add {@link ComponentToPartitionAllocationTable}s to
* {@link AllocationTableCollection}s.
* Style definitions for allocation UI elments.
*
* @author barner
*/
public class AllocationTableCollectionCompositor extends AllocationTableCollectionCompositorBase {
public class DefaultStyle {
/** Unicode right arrow. */
public static final String RIGHT_ARROW = "\u2192";
/** Constructor. */
public AllocationTableCollectionCompositor() {
super(ComponentToPartitionAllocationTable.class, 1);
}
/** Unicode down arrow. */
public static final String DOWN_ARROW = "\u2193";
}
AllocationTableEditor.java afb15c67be426c7abb11c1a539f40c8b8757304f RED
AllocationTableEditorGUI.java 554731557c28575d5d1cc4d8d0dbbd04d3eed82d YELLOW
AllocationTableEditor.java afb15c67be426c7abb11c1a539f40c8b8757304f YELLOW
AllocationTableEditorUtils.java 3f53fc3ce279be40ca18d6d63f3f7f830ec4eb86 RED
ModelListenerEditorBase.java cc5eb6ae4ece7093d835e3a00c886a7cf813ce3c YELLOW
TreeViewerCheckBoxEditingSupport.java ae801bf9e495b983774224444549cfc8c26fee58 YELLOW
TreeViewerCheckBoxLabelProvider.java 9375a910a71ceab8c8a0dfb40d8152478f7bc707 YELLOW
TreeViewerCheckBoxLabelProvider.java 6cb338ada7c286ae7aaedc3a9f326136571daf81 YELLOW
TreeViewerContentProvider.java f323a65cf49755b9c84cd9996f77f4fa63d6d185 YELLOW
TreeViewerFirstColumnLabelProvider.java 974b095a190e6f57d437bc3b85753ac5b4ecabf6 YELLOW
TreeViewerManager.java a2c94ea93f5cbb1fdb6efc998ca0e93267720bb5 YELLOW
TreeViewerManager.java b333ad26a3a49b814835b697af070682b7fcb83c YELLOW
......@@ -15,8 +15,8 @@
+--------------------------------------------------------------------------*/
package org.fortiss.af3.allocation.ui.editor.treeviewer;
import static org.fortiss.af3.allocation.ui.DefaultStyle.RIGHT_ARROW;
import static org.fortiss.af3.allocation.ui.editor.AllocationTableEditorUtils.getName;
import static org.fortiss.af3.allocation.ui.editor.treeviewer.TreeViewerManager.RIGHT_ARROW;
import static org.fortiss.af3.allocation.utils.AllocationUtils.isAllocated;
import static org.fortiss.af3.allocation.utils.AllocationUtils.isModifiableAllocationEntry;
......
......@@ -15,6 +15,8 @@
+--------------------------------------------------------------------------*/
package org.fortiss.af3.allocation.ui.editor.treeviewer;
import static org.fortiss.af3.allocation.ui.DefaultStyle.DOWN_ARROW;
import static org.fortiss.af3.allocation.ui.DefaultStyle.RIGHT_ARROW;
import static org.fortiss.af3.allocation.ui.editor.AllocationTableEditorUtils.getImage;
import java.util.List;
......@@ -49,12 +51,6 @@ public class TreeViewerManager<T extends AllocationTable> {
/** Per-hierarchy level indentation for row labels. */
public static final int ROW_LABEL_INDENT = 25;
/** Unicode down arrow. */
public static final String DOWN_ARROW = "\u2193";
/** Unicode right arrow. */
public static final String RIGHT_ARROW = "\u2192";
/** {@link AllocationTableEditor} for which this {@link TreeViewerManager} is used. */
private final AllocationTableEditor<T> allocationTableEditor;
......
PrototypeProvider.java 981455481bed14df2b8123c43e707f0ef71bf70a YELLOW
PrototypeProvider.java dca1f17e25aeddb75d97ee391db68593d8ba8bf7 YELLOW
......@@ -30,9 +30,6 @@ public final class PrototypeProvider extends PrototypeProviderBase {
/** Stores the category to display for these prototypes. */
public final static String CATEGORY = "Allocation";
/** Unicode right arrow. */
public static final String RIGHT_ARROW = "\u2192";;
/** {@inheritDoc} */
@Override
protected void registerPrototypes() {
......
......@@ -8,7 +8,7 @@
testsDirectory="/org.fortiss.af3.exploration.tests/generated-src" testSuiteClass="org.fortiss.af3.exploration.model.tests.DesignspaceexplorationAllTests"
importerID="org.eclipse.emf.importer.ecore" complianceLevel="6.0" copyrightFields="false"
editPluginID="org.fortiss.af3.exploration.edit" editorPluginID="org.fortiss.af3.exploration.editor"
usedGenPackages="platform:/resource/org.fortiss.af3.schedule/model/schedule.genmodel#//model platform:/resource/org.fortiss.tooling.base/model/base.genmodel#//model platform:/resource/org.fortiss.af3.component/model/component.genmodel#//model platform:/resource/org.fortiss.af3.deployment/model/deployment.genmodel#//model exploration.genmodel#//model dsl_v2.genmodel#//model platform:/resource/org.fortiss.af3.expression/model/expression.genmodel#//model platform:/resource/org.fortiss.af3.platform/model/platform.genmodel#//model platform:/resource/org.fortiss.af3.project/model/project.genmodel#//model platform:/resource/org.fortiss.tooling.kernel/model/kernel.genmodel#//model platform:/resource/org.fortiss.af3.timing/model/timing.genmodel#//model">
usedGenPackages="platform:/resource/org.fortiss.af3.schedule/model/schedule.genmodel#//model platform:/resource/org.fortiss.tooling.base/model/base.genmodel#//model platform:/resource/org.fortiss.af3.component/model/component.genmodel#//model platform:/resource/org.fortiss.af3.deployment/model/deployment.genmodel#//model exploration.genmodel#//model dsl_v2.genmodel#//model platform:/resource/org.fortiss.af3.expression/model/expression.genmodel#//model platform:/resource/org.fortiss.af3.platform/model/platform.genmodel#//model platform:/resource/org.fortiss.af3.project/model/project.genmodel#//model platform:/resource/org.fortiss.tooling.kernel/model/kernel.genmodel#//model platform:/resource/org.fortiss.af3.timing/model/timing.genmodel#//model platform:/resource/org.fortiss.af3.allocation/model/allocation.genmodel#//model">
<foreignModel>designspaceexploration.ecore</foreignModel>
<genPackages prefix="DSEModel" basePackage="org.fortiss.af3.efficientdeployment"
disposableProviderFactory="true" ecorePackage="designspaceexploration.ecore#/">
......
......@@ -8,7 +8,7 @@
testsDirectory="/org.fortiss.af3.exploration.tests/generated-src" testSuiteClass="org.fortiss.af3.exploration.model.tests.DesignspaceexplorationAllTests"
importerID="org.eclipse.emf.importer.ecore" complianceLevel="6.0" copyrightFields="false"
editPluginID="org.fortiss.af3.exploration.edit" editorPluginID="org.fortiss.af3.exploration.editor"
usedGenPackages="platform:/resource/org.fortiss.af3.schedule/model/schedule.genmodel#//model platform:/resource/org.fortiss.tooling.base/model/base.genmodel#//model platform:/resource/org.fortiss.af3.component/model/component.genmodel#//model platform:/resource/org.fortiss.af3.deployment/model/deployment.genmodel#//model exploration.genmodel#//model dsl_v2.genmodel#//model platform:/resource/org.fortiss.af3.expression/model/expression.genmodel#//model platform:/resource/org.fortiss.af3.platform/model/platform.genmodel#//model platform:/resource/org.fortiss.af3.project/model/project.genmodel#//model platform:/resource/org.fortiss.tooling.kernel/model/kernel.genmodel#//model platform:/resource/org.fortiss.af3.task/model/task.genmodel#//model platform:/resource/org.fortiss.af3.timing/model/timing.genmodel#//model">
usedGenPackages="platform:/resource/org.fortiss.af3.schedule/model/schedule.genmodel#//model platform:/resource/org.fortiss.tooling.base/model/base.genmodel#//model platform:/resource/org.fortiss.af3.component/model/component.genmodel#//model platform:/resource/org.fortiss.af3.deployment/model/deployment.genmodel#//model exploration.genmodel#//model dsl_v2.genmodel#//model platform:/resource/org.fortiss.af3.expression/model/expression.genmodel#//model platform:/resource/org.fortiss.af3.platform/model/platform.genmodel#//model platform:/resource/org.fortiss.af3.project/model/project.genmodel#//model platform:/resource/org.fortiss.tooling.kernel/model/kernel.genmodel#//model platform:/resource/org.fortiss.af3.task/model/task.genmodel#//model platform:/resource/org.fortiss.af3.timing/model/timing.genmodel#//model platform:/resource/org.fortiss.af3.allocation/model/allocation.genmodel#//model">
<foreignModel>dseproject.ecore</foreignModel>
<genPackages prefix="DSEModel" basePackage="org.fortiss.af3.exploration" disposableProviderFactory="true"
ecorePackage="dseproject.ecore#/">
......
......@@ -30,6 +30,9 @@
<modelEditorBinding binding="org.fortiss.af3.partition.ui.editor.OutputPortToPartitionOutputPortAllocationTableEditorBinding">
<modelElementClass modelElementClass="org.fortiss.af3.partition.model.allocation.ComponentToPartitionAllocationTable"/>
</modelEditorBinding>
<modelEditorBinding binding="org.fortiss.af3.partition.ui.editor.TaskToPartitionAllocationTableEditorBinding">
<modelElementClass modelElementClass="org.fortiss.af3.partition.model.allocation.TaskToPartitionAllocationTable"/>
</modelEditorBinding>
</extension>
<extension point="org.fortiss.tooling.kernel.ui.modelElementHandler">
......@@ -51,6 +54,9 @@
<modelElementHandler handler="org.fortiss.af3.partition.ui.handler.ComponentToPartitionAllocationTableHandler">
<modelElementClass modelElementClass="org.fortiss.af3.partition.model.allocation.ComponentToPartitionAllocationTable"/>
</modelElementHandler>
<modelElementHandler handler="org.fortiss.af3.partition.ui.handler.TaskToPartitionAllocationTableHandler">
<modelElementClass modelElementClass="org.fortiss.af3.partition.model.allocation.TaskToPartitionAllocationTable"/>
</modelElementHandler>
</extension>
<!-- Property Section Contributions -->
......
ComponentToPartitionAllocationTableEditor.java da4a8258922118a3b6cf41a6ace589e8273c7ec3 YELLOW
ComponentToPartitionAllocationTableEditorBinding.java 7ec0a23e94b161cac19ca59926d52a3970814cb2 YELLOW
ComponentToPartitionAllocationTableEditorBinding.java d584ee15de7444e0d997f4f5bf7f9f5033ea2cdf YELLOW
InputPortToPartitionInputPortAllocationTableEditor.java fc0b3718bebe5701e1402b598fa06aa47b72e488 YELLOW
InputPortToPartitionInputPortAllocationTableEditorBinding.java 18d0523447d6480496bc91b60d5c839fca695546 YELLOW
InputPortToPartitionInputPortAllocationTableEditorBinding.java ae8629823c3e491c9c3b78be6d9f46df266f6206 YELLOW
OutputPortToPartitionOutputPortAllocationTableEditor.java 1fe156991715718ab4d488e13c8d6940fac18a96 YELLOW
OutputPortToPartitionOutputPortAllocationTableEditorBinding.java d1da6c036508fb2ba03cb82000a23a0ffb2cc2e0 YELLOW
OutputPortToPartitionOutputPortAllocationTableEditorBinding.java 991bf811c23817bd0044f25112bc4fc909b36c6a YELLOW
PartitionEditor.java 815fb9d8a13da071bc78db91b8fde14c5e3655ed YELLOW
PartitionEditorBinding.java f4b71e645ff651361dba803f9abf2bb06f19052d YELLOW
TaskToPartitionAllocationTableEditor.java 11000e0246f8f4f99456fd9ac04854ecdf65aca1 YELLOW
TaskToPartitionAllocationTableEditorBinding.java 5feda399f7523552bb4d2e84333494e7d0b532be YELLOW
......@@ -15,6 +15,8 @@
+--------------------------------------------------------------------------*/
package org.fortiss.af3.partition.ui.editor;
import static org.fortiss.af3.allocation.ui.DefaultStyle.RIGHT_ARROW;
import org.eclipse.ui.IEditorPart;
import org.fortiss.af3.partition.model.allocation.ComponentToPartitionAllocationTable;
import org.fortiss.tooling.kernel.ui.extension.base.ModelEditorBindingBase;
......@@ -35,7 +37,7 @@ public class ComponentToPartitionAllocationTableEditorBinding extends
/** {@inheritDoc} */
@Override
public String getLabel() {
return "Components \u2192 Partitions";
return "Components " + RIGHT_ARROW + " Partitions";
}
/** {@inheritDoc} */
......
......@@ -15,18 +15,19 @@
+--------------------------------------------------------------------------*/
package org.fortiss.af3.partition.ui.editor;
import static org.fortiss.af3.allocation.ui.DefaultStyle.RIGHT_ARROW;
import org.eclipse.ui.IEditorPart;
import org.fortiss.af3.partition.model.allocation.ComponentToPartitionAllocationTable;
import org.fortiss.tooling.kernel.ui.extension.base.ModelEditorBindingBase;
/**
* Editor binding for
* {@link InputPortToPartitionInputPortAllocationTableEditor}.
* Editor binding for {@link InputPortToPartitionInputPortAllocationTableEditor}.
*
* @author zverlov
*/
public class InputPortToPartitionInputPortAllocationTableEditorBinding
extends ModelEditorBindingBase<ComponentToPartitionAllocationTable> {
public class InputPortToPartitionInputPortAllocationTableEditorBinding extends
ModelEditorBindingBase<ComponentToPartitionAllocationTable> {
/** {@inheritDoc} */
@Override
public Class<? extends IEditorPart> getEditorClass() {
......@@ -36,7 +37,7 @@ public class InputPortToPartitionInputPortAllocationTableEditorBinding
/** {@inheritDoc} */
@Override
public String getLabel() {
return "Logical \u2192 Partition Input Ports";
return "Logical " + RIGHT_ARROW + " Partition Input Ports";
}
/** {@inheritDoc} */
......
......@@ -15,18 +15,19 @@
+--------------------------------------------------------------------------*/
package org.fortiss.af3.partition.ui.editor;
import static org.fortiss.af3.allocation.ui.DefaultStyle.RIGHT_ARROW;
import org.eclipse.ui.IEditorPart;
import org.fortiss.af3.partition.model.allocation.ComponentToPartitionAllocationTable;
import org.fortiss.tooling.kernel.ui.extension.base.ModelEditorBindingBase;
/**
* Editor binding for
* {@link OutputPortToPartitionOutputPortAllocationTableEditor}.
* Editor binding for {@link OutputPortToPartitionOutputPortAllocationTableEditor}.
*
* @author zverlov
*/
public class OutputPortToPartitionOutputPortAllocationTableEditorBinding
extends ModelEditorBindingBase<ComponentToPartitionAllocationTable> {
public class OutputPortToPartitionOutputPortAllocationTableEditorBinding extends
ModelEditorBindingBase<ComponentToPartitionAllocationTable> {
/** {@inheritDoc} */
@Override
public Class<? extends IEditorPart> getEditorClass() {
......@@ -36,7 +37,7 @@ public class OutputPortToPartitionOutputPortAllocationTableEditorBinding
/** {@inheritDoc} */
@Override
public String getLabel() {
return "Logical \u2192 Partition Output Ports";
return "Logical " + RIGHT_ARROW + " Partition Output Ports";
}
/** {@inheritDoc} */
......
/*-------------------------------------------------------------------------+
| Copyright 2017 fortiss GmbH |
| |
| Licensed under the Apache License, Version 2.0 (the "License"); |
| you may not use this file except in compliance with the License. |
| You may obtain a copy of the License at |
| |
| http://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, software |
| distributed under the License is distributed on an "AS IS" BASIS, |
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| See the License for the specific language governing permissions and |
| limitations under the License. |
+--------------------------------------------------------------------------*/
package org.fortiss.af3.partition.ui.editor;
import org.fortiss.af3.allocation.ui.editor.AllocationTableEditor;
import org.fortiss.af3.partition.model.Partition;
import org.fortiss.af3.partition.model.PartitionArchitecture;
import org.fortiss.af3.partition.model.allocation.TaskToPartitionAllocationEntry;
import org.fortiss.af3.partition.model.allocation.TaskToPartitionAllocationTable;
import org.fortiss.af3.task.model.Task;
import org.fortiss.af3.task.model.TaskArchitecture;
/**
* Editor to assign {@link Task}s to {@link Partition}s.
*
* @author barner
*/
public class TaskToPartitionAllocationTableEditor extends
AllocationTableEditor<TaskToPartitionAllocationTable> {
/** Constructor. */
public TaskToPartitionAllocationTableEditor() {
super(TaskToPartitionAllocationEntry.class, TaskArchitecture.class,
PartitionArchitecture.class, Task.class, Partition.class, null, null);
}
}
/*-------------------------------------------------------------------------+
| Copyright 2017 fortiss GmbH |
| |
| Licensed under the Apache License, Version 2.0 (the "License"); |
| you may not use this file except in compliance with the License. |
| You may obtain a copy of the License at |
| |
| http://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, software |
| distributed under the License is distributed on an "AS IS" BASIS, |
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| See the License for the specific language governing permissions and |
| limitations under the License. |
+--------------------------------------------------------------------------*/
package org.fortiss.af3.partition.ui.editor;
import static org.fortiss.af3.allocation.ui.DefaultStyle.RIGHT_ARROW;
import org.eclipse.ui.IEditorPart;
import org.fortiss.af3.partition.model.allocation.TaskToPartitionAllocationTable;
import org.fortiss.tooling.kernel.ui.extension.base.ModelEditorBindingBase;
/**
* Editor binding for {@link TaskToPartitionAllocationTableEditor}.
*
* @author barner
*/
public class TaskToPartitionAllocationTableEditorBinding extends
ModelEditorBindingBase<TaskToPartitionAllocationTable> {
/** {@inheritDoc} */
@Override
public Class<? extends IEditorPart> getEditorClass() {
return TaskToPartitionAllocationTableEditor.class;
}
/** {@inheritDoc} */
@Override
public String getLabel() {
return "Components " + RIGHT_ARROW + " Partitions";
}
/** {@inheritDoc} */
@Override
public int getPriority() {
return 5;
}
}
Supports Markdown
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