Przeglądaj źródła

Added null check because during editing feature type might not be set yet (#547).

Thomas Kutz 10 lat temu
rodzic
commit
ae942129fb

+ 1 - 1
plugins/org.yakindu.sct.generator.genmodel.ui/src/org/yakindu/sct/generator/genmodel/ui/highlighting/SGenSemanticHighlightingCalculator.java

@@ -56,7 +56,7 @@ public class SGenSemanticHighlightingCalculator implements ISemanticHighlighting
 					if (node.getSemanticElement() instanceof FeatureConfigurationImpl) {
 						FeatureConfigurationImpl feature = (FeatureConfigurationImpl) node.getSemanticElement();
 						DeprecatableElement deprecatableElement = feature.getType();
-						if (deprecatableElement.isDeprecated()) {
+						if (deprecatableElement != null && deprecatableElement.isDeprecated()) {
 							acceptor.addPosition(node.getTotalOffset(), node.getTotalLength(),
 									SGenHighlightingConfiguration.DEPRECATION);
 						}