Community
Participate
Working Groups
Currently, if outline nodes are added for attributes the outline does not behave as a user would expect. If the outline view is linked to the editor, it works to click on entries in the outline and the editor shows what was clicked on. For regular objects it works fine, but when clicking on an attribute node, the correct place is selected in the text, but then focus/selection jumps to the containing node in the outline. It is understandable that the selection needs to move in linked mode if the selected item does not have any visual representation, but if it has visual representation, the selected node should stay selected IMO. (This is also somewhat related to bug 323065). Here is how I create the node for the attribute "version" of a "unit": public ContentOutlineNode createNode(BuildUnit unit, ContentOutlineNode outlineParentNode) { ContentOutlineNode result = super.createNode(unit, outlineParentNode); if(unit.getVersion() != null) { AbstractNode versionNode = BeeLangNodeUtils.getFirstFeatureNode(unit, "version"); if(versionNode != null) { EObjectHandleImpl<EObject> handle = new EObjectHandleImpl<EObject>(unit, getResourceAccess()); StyledString label = new StyledString("version"); label.append(" : " + versionFormatManager.toString(unit.getVersion()), StyledString.DECORATIONS_STYLER); ContentOutlineNode n = new ContentOutlineNode( label, imageHelper.getImage(BeeLangLabelProvider.FEATURE), new Region( versionNode.getOffset(), versionNode.getLength()), handle, B3BuildPackage.Literals.BUILD_UNIT); result.getChildren().add(n); } } ... return result; } It was suggested that I try result.addChildren(n) instead, but this has no effect.
This is related to bug 297473
Should be fixed with bug 322656.
Closing bug which were set to RESOLVED before Eclipse Neon.0.