From 706ad7f73f5a6abc75585f3f0cd8e25675928d63 Mon Sep 17 00:00:00 2001 From: Jussi Koskela Date: Wed, 22 Mar 2017 13:14:39 +0200 Subject: [PATCH] Opening symbol code editor / symbol drop handler code editor fails Opening symbol code editor / symbol drop handler code editor fails if there is no existing code available. refs #7106 Change-Id: Iceea446030237819878fda58a40a557b5f03f91a --- .../ui/componentTypeEditor/SymbolCodeDocumentProvider2.java | 2 +- .../componentTypeEditor/SymbolDropHandlerDocumentProvider.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/componentTypeEditor/SymbolCodeDocumentProvider2.java b/bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/componentTypeEditor/SymbolCodeDocumentProvider2.java index 921ee6299..9c9ebfe9e 100644 --- a/bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/componentTypeEditor/SymbolCodeDocumentProvider2.java +++ b/bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/componentTypeEditor/SymbolCodeDocumentProvider2.java @@ -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() { diff --git a/bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/componentTypeEditor/SymbolDropHandlerDocumentProvider.java b/bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/componentTypeEditor/SymbolDropHandlerDocumentProvider.java index 7394ef410..48c258d47 100644 --- a/bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/componentTypeEditor/SymbolDropHandlerDocumentProvider.java +++ b/bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/componentTypeEditor/SymbolDropHandlerDocumentProvider.java @@ -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() { -- 2.47.1