]> gerrit.simantics Code Review - simantics/sysdyn.git/commitdiff
Revised IResourceEditorInput2.getRVI spec to allow null returned values.
authorlehtonen <lehtonen@ac1ea38d-2e2b-0410-8846-a27921b304fc>
Mon, 6 Aug 2012 12:33:51 +0000 (12:33 +0000)
committerlehtonen <lehtonen@ac1ea38d-2e2b-0410-8846-a27921b304fc>
Mon, 6 Aug 2012 12:33:51 +0000 (12:33 +0000)
Fixed many places to take into account that getRVI may return null now.

refs #3583

git-svn-id: https://www.simantics.org/svn/simantics/sysdyn/trunk@25390 ac1ea38d-2e2b-0410-8846-a27921b304fc

org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/editor/SysdynEditorNamingService.java

index eba820ac43e1e890e1d9ade8195fa07a7e18f931..3ddf837909d235128b890c22dd72d9d9b1559e7a 100644 (file)
@@ -40,7 +40,7 @@ public class SysdynEditorNamingService extends EditorNamingService2 {
                if(in instanceof IResourceEditorInput2) {\r
                        IResourceEditorInput2 input = (IResourceEditorInput2) in;\r
 \r
-                       if(!input.getRVI().isEmpty()) {\r
+                       if(input.getRVI() != null && !input.getRVI().isEmpty()) {\r
                                Resource model = g.getPossibleResource(input.getModelURI());\r
                                if(model != null) {\r
                                        Resource configuration = g.getPossibleObject(model, SimulationResource.getInstance(g).HasConfiguration);\r