Commit 48ab867b authored by Simon Barner's avatar Simon Barner
Browse files

GREEN

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

Signed-off-by: Simon Barner's avatarSimon Barner <barner@fortiss.org>
parent c188c6e9
RefinementContentProvider.java e376db45ede8a79771a72c74d4dc0c8d7ad553ad GREEN RefinementContentProvider.java e376db45ede8a79771a72c74d4dc0c8d7ad553ad GREEN
RefinementEditor.java 1cbe75ce5e6ed002372598cb357598cebff88ebe YELLOW RefinementEditor.java c9db7d163e6d0758ec7a381a1e6a07ca977cf755 GREEN
RefinementSpecificationEditor.java 5275ef81f2c44c15057bd8698ee30677e4f87ed8 GREEN RefinementSpecificationEditor.java 5275ef81f2c44c15057bd8698ee30677e4f87ed8 GREEN
RefinementTestSuiteEditor.java 5db72b518a027c11ba73c310046e210e2f7d541a GREEN RefinementTestSuiteEditor.java 5db72b518a027c11ba73c310046e210e2f7d541a GREEN
...@@ -238,11 +238,10 @@ public class RefinementEditor extends FormsEditorBase<Refinement> { ...@@ -238,11 +238,10 @@ public class RefinementEditor extends FormsEditorBase<Refinement> {
if(sel instanceof ITreeSelection) { if(sel instanceof ITreeSelection) {
final TreePath[] paths = ((ITreeSelection)sel).getPaths(); final TreePath[] paths = ((ITreeSelection)sel).getPaths();
boolean noPath = paths.length == 0; boolean noPath = paths.length == 0;
boolean isUniquePath = paths.length == 1; // paths[0] is only accessed if there is exactly one element
if(noPath || boolean isComposite =
(isUniquePath && paths[0].getLastSegment() instanceof CompositeRule)) { paths.length == 1 && paths[0].getLastSegment() instanceof CompositeRule;
add.setEnabled(true); add.setEnabled(noPath || isComposite);
}
} }
} }
}); });
......
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