Commit 6ca96a11 authored by Simon Barner's avatar Simon Barner
Browse files

Usability improvements

- Remember column width when new target elements are added
- Update column sorting when new target elements are added (-> use TreeViewer's column order array instead of actually shuffling the underlying collection of target elements)

Performance improvements
- Avoid full update (i.e., perform more efficient refresh) when names of source or target elements are changed
- Avoid multiple (redundant) updates when editor is opened
- Avoid updating combo boxes when selected element has not changed
- Avoid full update when an allocation is added/removed (simple refresh is enough)
refs 2950
parent 60bc9df2
......@@ -6,9 +6,9 @@ OutputPortToTaskOutputPortAllocationTableEditor.java 1080012e6dac5c5e4ea920a5df2
OutputPortToTaskOutputPortAllocationTableEditorBinding.java fc088c794bb2f19af949a83530485264827ea026 GREEN
TaskArchitectureEditor.java 4757a4f54a3ac85e33acb385d1565c917019531e GREEN
TaskArchitectureEditorBinding.java 4162f885df649b59e05f8358a995f0064eec9b6d GREEN
TaskArchitectureTimingEditor.java 364ce7e1213965b3c437f11248c0ddccf5ac2fc7 GREEN
TaskArchitectureTimingEditor.java e4812637eb0b73c86d75628e2225e2dd1dc3d5b3 YELLOW
TaskArchitectureTimingEditorBinding.java 712e8e99b08bd23ed8284b0b26339088c5b01cd7 GREEN
TaskToExecutionUnitTableEditor.java 9d1a8c93749a54fbf0c85ae41731dad72214c94a GREEN
TaskToExecutionUnitTableEditorBinding.java 7ad6f28ac297dfe14c3105960e0f0b6752dffd7e GREEN
TaskWcetTableEditor.java 5aeddd01e993e2591a890b6a1825f9bf84fcef02 GREEN
TaskWcetTableEditor.java d67195e323d6db8c3f6ac37192936b92e7985c7d YELLOW
TaskWcetTableEditorBinding.java c8d2dbb53e887764412162dc3e081b7f1a4551ee GREEN
......@@ -87,7 +87,7 @@ public class TaskArchitectureTimingEditor extends ModelListenerEditorBase<TaskAr
atc != null ? getFirstChildWithType(atc, TaskWcetTable.class) : null;
getEditedObject().setWcetTable(taskWcetTable);
if(taskWcetTableEditor != null) {
taskWcetTableEditor.refresh(taskWcetTable);
taskWcetTableEditor.update(taskWcetTable);
}
}
......@@ -187,9 +187,15 @@ public class TaskArchitectureTimingEditor extends ModelListenerEditorBase<TaskAr
taskAllocationTableCollections, selectedAtc);
final IProjectRootElement atc = selectedAtc;
runAsCommand(getEditedObject(), () -> {
setWcetTableFromRootElement(atc);
});
if(atc != null) {
TaskWcetTable taskWcetTable = getFirstChildWithType(atc, TaskWcetTable.class);
if(taskWcetTable != getEditedObject().getWcetTable()) {
runAsCommand(getEditedObject(), () -> {
setWcetTableFromRootElement(atc);
});
}
}
}
/** {@inheritDoc} */
......
......@@ -65,9 +65,10 @@ public class TaskWcetTableEditor extends ParameterTableEditor<TaskWcetTable> {
return ProjectUtils.getFileProject(taskArchitecture);
}
/** Performs a full refresh for the given {@link TaskWcetTable}. */
public void refresh(TaskWcetTable taskWcetTable) {
refresh(taskWcetTable != null ? taskWcetTable.getSourceView() : null);
refresh(taskWcetTable != null ? getEditedObject().getTargetView() : null);
/** Performs a full update for the given {@link TaskWcetTable}. */
public void update(TaskWcetTable taskWcetTable) {
update(taskWcetTable != null ? taskWcetTable.getSourceView() : null);
update(taskWcetTable != null ? getEditedObject().getTargetView() : null);
}
}
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