]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.scl.ui/src/org/simantics/scl/ui/editor/completion/SCLCompletionProposal.java
(refs #7386) Minor SCL tools improvements
[simantics/platform.git] / bundles / org.simantics.scl.ui / src / org / simantics / scl / ui / editor / completion / SCLCompletionProposal.java
index 4c429e7fdda6ced8d40a94b7f77a9467d42f7aa6..11749a4b2b24eef1c717eec74e9129731da58ce6 100644 (file)
@@ -37,8 +37,15 @@ public class SCLCompletionProposal implements ICompletionProposal, ICompletionPr
     private final SCLCompletionType completionType;
     
     public SCLCompletionProposal(SCLValue value, int replacementOffset, String prefix) {
-        this.name = value.getName().name;
-        this.module = value.getName().module;
+        String tempName = value.getName().name;
+        String tempModule = value.getName().module;
+        int p = tempName.lastIndexOf('.');
+        if(p >= 0) {
+            tempModule = tempModule + "." + tempName.substring(0, p);
+            tempName = tempName.substring(p+1);
+        }
+        this.name = tempName;
+        this.module = tempModule;
         this.documentation = value.getDocumentation();
         this.content = name + " :: " + value.getType() + "  (" + module + ")";
         this.replacementOffset = replacementOffset;