diff options
author | adaussy | 2012-03-09 16:38:11 +0000 |
---|---|---|
committer | adaussy | 2012-03-09 16:38:11 +0000 |
commit | 7d64bd642e57befdeb997f985a099487304bcc26 (patch) | |
tree | ffb437e369008e968d669f0f7b10bf2d1a4742aa | |
parent | 9a7061d5d0d0cefacb3d343940c8d3fe7433986c (diff) | |
download | org.eclipse.papyrus-7d64bd642e57befdeb997f985a099487304bcc26.tar.gz org.eclipse.papyrus-7d64bd642e57befdeb997f985a099487304bcc26.tar.xz org.eclipse.papyrus-7d64bd642e57befdeb997f985a099487304bcc26.zip |
NEW - bug 373815: [ActivityDiagram] NPE on input decision Node
https://bugs.eclipse.org/bugs/show_bug.cgi?id=373815
Correction of NPE
-rw-r--r-- | plugins/uml/org.eclipse.papyrus.diagram.activity/src/org/eclipse/papyrus/diagram/activity/edit/parts/DecisionInputEditPart.java | 28 |
1 files changed, 16 insertions, 12 deletions
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.activity/src/org/eclipse/papyrus/diagram/activity/edit/parts/DecisionInputEditPart.java b/plugins/uml/org.eclipse.papyrus.diagram.activity/src/org/eclipse/papyrus/diagram/activity/edit/parts/DecisionInputEditPart.java index 1fe84f329c7..e4cf45f34b2 100644 --- a/plugins/uml/org.eclipse.papyrus.diagram.activity/src/org/eclipse/papyrus/diagram/activity/edit/parts/DecisionInputEditPart.java +++ b/plugins/uml/org.eclipse.papyrus.diagram.activity/src/org/eclipse/papyrus/diagram/activity/edit/parts/DecisionInputEditPart.java @@ -274,20 +274,24 @@ public class DecisionInputEditPart extends LabelEditPart implements ITextAwareEd */
protected String getLabelText() {
// do not edit label if hidden
- boolean decisionSet = ((DecisionNode)resolveSemanticElement()).getDecisionInput() != null;
- if(decisionSet) {
- String text = null;
- EObject parserElement = getParserElement();
- if(parserElement != null && getParser() != null) {
- text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
- }
- if(text == null || text.length() == 0) {
- text = defaultText;
+ DecisionNode resolveSemanticElement = (DecisionNode)resolveSemanticElement();
+ if ( resolveSemanticElement != null){
+ boolean decisionSet = resolveSemanticElement.getDecisionInput() != null;
+ if(decisionSet) {
+ String text = null;
+ EObject parserElement = getParserElement();
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
+ }
+ if(text == null || text.length() == 0) {
+ text = defaultText;
+ }
+ return text;
+ } else {
+ return "";
}
- return text;
- } else {
- return "";
}
+ return "";
}
/**
|