Skip to content
Snippets Groups Projects
Commit 602b8d3f authored by Andreas Bayha's avatar Andreas Bayha
Browse files

Annotations: Fixed bugs due to master merge

Editing was not able anymore due to changes in the master.

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


Signed-off-by: default avatarAndreas Bayha <bayha@fortiss.org>
parent f496fc6b
No related branches found
No related tags found
1 merge request!1254014
This commit is part of merge request !125. Comments created here will be created in the context of that merge request.
......@@ -86,6 +86,12 @@ public class AnnotationViewFXController extends CompositeFXControllerBase<SplitP
/** Option text for the annotation type filter combo box. */
private static final String SHOW_ALL_ANNOTATION_TYPES = "Show all annotation types";
/**
* Root element to be added to the tree viewer (but not displayed). Container for all
* {@link AnnotationEntry}s.
*/
ArtificialRoot root = new ArtificialRoot();
/** {@link TextField} for entering the filter pattern. */
@FXML
private TextField txtFilterText;
......@@ -227,16 +233,16 @@ public class AnnotationViewFXController extends CompositeFXControllerBase<SplitP
listElements.add((IModelElement)curentRootElement);
}
ArtificialRoot rootElement = new ArtificialRoot();
root = new ArtificialRoot();
for(IModelElement elem : listElements) {
AnnotationEntry entry = IAnnotationValueService.getInstance().getAnnotationEntry(elem);
if(entry != null && !entry.getSpecificationsList().isEmpty()) {
rootElement.elements.add(entry);
root.elements.add(entry);
}
}
sort(rootElement.elements);
sort(root.elements);
Set<AnnotationEntry> annotationEntries = new HashSet<>();
listElements.forEach(e -> annotationEntries
......@@ -260,7 +266,7 @@ public class AnnotationViewFXController extends CompositeFXControllerBase<SplitP
new AnnotationTreeTableUIProvider();
annotationViewer = new DynamicTreeTableViewer<AnnotationEntry>(annotationTreeTableView,
rootElement, showRoot, revealLevel, filterContentProvider, uiProvider);
root, showRoot, revealLevel, filterContentProvider, uiProvider);
annotationViewer.addColumn("Model Element", 200);
annotationViewer.addColumn("Comment", 250);
......@@ -542,6 +548,25 @@ public class AnnotationViewFXController extends CompositeFXControllerBase<SplitP
return false;
}
/** {@inheritDoc} */
@Override
public boolean isEditable(int column) {
// The first two columns are not supposed to be editable.
if(column <= 1) {
return false;
}
for(AnnotationEntry ae : root.elements) {
// If any cell is editable in this column, the column is editable.
if(isEditable(column, ae)) {
return true;
}
}
return false;
}
}
/**
......
ErrorViewFXLayoutController.java 382b8014acf4b0c625817d6279dfcdd670296cb2 GREEN
ErrorViewFXLayoutController.java 5549b928801393c169983c116c5a23aa19b3e291 YELLOW
ErrorViewFXViewPart.java f620022aef647d7a019be8afc5351fabde05dcee GREEN
MarkerViewFXContentProvider.java ecf92449414b2b8648ad151bc932189baa23dc12 GREEN
MarkerViewFXUIProvider.java c5719d95ac7bd5605fff65d6150eca8b9ca6fc02 GREEN
......@@ -117,7 +117,9 @@ public class ErrorViewFXLayoutController extends CompositeFXControllerBase<Node,
/** Refreshes the tree table. */
public void refresh() {
treeTable.update();
if(treeTable != null) {
treeTable.update();
}
}
/** {@inheritDoc} */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment