]> gerrit.simantics Code Review - simantics/platform.git/commitdiff
Opening symbol code editor / symbol drop handler code editor fails 76/376/1
authorJussi Koskela <jussi.koskela@semantum.fi>
Wed, 22 Mar 2017 11:14:39 +0000 (13:14 +0200)
committerJussi Koskela <jussi.koskela@semantum.fi>
Wed, 22 Mar 2017 11:14:39 +0000 (13:14 +0200)
Opening symbol code editor / symbol drop handler code editor fails if
there is no existing code available.

refs #7106

Change-Id: Iceea446030237819878fda58a40a557b5f03f91a

bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/componentTypeEditor/SymbolCodeDocumentProvider2.java
bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/componentTypeEditor/SymbolDropHandlerDocumentProvider.java

index 921ee62999a7f3382849c34dfb91c379fd0f0c49..9c9ebfe9e95b90c1f1dcd6e6effa8965e485838d 100644 (file)
@@ -72,7 +72,7 @@ public class SymbolCodeDocumentProvider2 extends SCLModuleEditorDocumentProvider
                errorHappened = false;
                return graph.getRelatedValue(text, L0.SCLValue_expression, Bindings.STRING);
        }
-       throw new DatabaseException("No symbol code was defined.");
+       return "";
     }
 
     protected void updateAnnotations() {
index 7394ef410604ef3bcbbb43115f30345971deaa66..48c258d4737ec0c26aeb153b0b1d1bfc92795f3a 100644 (file)
@@ -72,7 +72,7 @@ public class SymbolDropHandlerDocumentProvider extends SCLModuleEditorDocumentPr
                errorHappened = false;
                return graph.getRelatedValue(text, L0.SCLValue_expression, Bindings.STRING);
        }
-       throw new DatabaseException("No symbol code was defined.");
+       return "";
     }
 
     protected void updateAnnotations() {