Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnsgar Radermacher2014-03-11 12:07:36 +0000
committerAnsgar Radermacher2014-03-11 12:28:53 +0000
commite6e5f0e360117e271e761d1e345d266f4479c5a0 (patch)
tree4757a4b82bbbc5dd7a9abc9147c89b3375c9f3bb /plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.property.xtext.ui
parent7189e085bbe7e64f027d4465bd92f1717c17d76b (diff)
downloadorg.eclipse.papyrus-e6e5f0e360117e271e761d1e345d266f4479c5a0.tar.gz
org.eclipse.papyrus-e6e5f0e360117e271e761d1e345d266f4479c5a0.tar.xz
org.eclipse.papyrus-e6e5f0e360117e271e761d1e345d266f4479c5a0.zip
Bug 315231 - [All Diagrams] Direct Edit : Xtext / Papyrus integration: xtext property editor - support not-impored scoped names
Diffstat (limited to 'plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.property.xtext.ui')
-rw-r--r--plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.property.xtext.ui/src/org/eclipse/papyrus/uml/textedit/property/xtext/ui/contentassist/UmlPropertyProposalProvider.java9
-rw-r--r--plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.property.xtext.ui/src/org/eclipse/papyrus/uml/textedit/property/xtext/ui/contributions/UMLPropertyEditorPropertyUtil.java1
2 files changed, 6 insertions, 4 deletions
diff --git a/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.property.xtext.ui/src/org/eclipse/papyrus/uml/textedit/property/xtext/ui/contentassist/UmlPropertyProposalProvider.java b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.property.xtext.ui/src/org/eclipse/papyrus/uml/textedit/property/xtext/ui/contentassist/UmlPropertyProposalProvider.java
index a8b0fc909e8..cb97ac01a50 100644
--- a/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.property.xtext.ui/src/org/eclipse/papyrus/uml/textedit/property/xtext/ui/contentassist/UmlPropertyProposalProvider.java
+++ b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.property.xtext.ui/src/org/eclipse/papyrus/uml/textedit/property/xtext/ui/contentassist/UmlPropertyProposalProvider.java
@@ -28,6 +28,7 @@ import org.eclipse.papyrus.uml.textedit.property.xtext.umlProperty.MultiplicityR
import org.eclipse.papyrus.uml.textedit.property.xtext.umlProperty.PropertyRule;
import org.eclipse.papyrus.uml.textedit.property.xtext.umlProperty.QualifiedName;
import org.eclipse.papyrus.uml.textedit.property.xtext.umlProperty.TypeRule;
+import org.eclipse.papyrus.uml.tools.utils.PackageUtil;
import org.eclipse.papyrus.uml.xtext.integration.CompletionProposalUtils;
import org.eclipse.papyrus.uml.xtext.integration.CustomCompletionProposal;
import org.eclipse.papyrus.uml.xtext.integration.core.ContextElementUtil;
@@ -50,7 +51,7 @@ import org.eclipse.xtext.ui.editor.contentassist.ICompletionProposalAcceptor;
* http://www.eclipse.org/Xtext/documentation/latest/xtext.html#contentAssist on
* how to customize content assistant
*/
-
+@SuppressWarnings("nls")
public class UmlPropertyProposalProvider extends AbstractUmlPropertyProposalProvider {
/**
@@ -96,9 +97,9 @@ public class UmlPropertyProposalProvider extends AbstractUmlPropertyProposalProv
CustomCompletionProposal completionProposal = CompletionProposalUtils.createCompletionProposalWithReplacementOfPrefix(root, completionString, displayString, context);
acceptor.accept(completionProposal);
- // then accepts all packages imported by Model
- List<Package> importedPackages = root.getImportedPackages();
- for(Package p : importedPackages) {
+ // then accept all packages imported by Model
+ List<Package> topLevelPackages = PackageUtil.getTopLevelPackages(root);
+ for(Package p : topLevelPackages) {
if(p.getName().toLowerCase().contains(context.getPrefix().toLowerCase())) {
completionString = p.getName() + "::";
displayString = p.getName() + "::";
diff --git a/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.property.xtext.ui/src/org/eclipse/papyrus/uml/textedit/property/xtext/ui/contributions/UMLPropertyEditorPropertyUtil.java b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.property.xtext.ui/src/org/eclipse/papyrus/uml/textedit/property/xtext/ui/contributions/UMLPropertyEditorPropertyUtil.java
index 4db9abc488e..726b7618a16 100644
--- a/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.property.xtext.ui/src/org/eclipse/papyrus/uml/textedit/property/xtext/ui/contributions/UMLPropertyEditorPropertyUtil.java
+++ b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.property.xtext.ui/src/org/eclipse/papyrus/uml/textedit/property/xtext/ui/contributions/UMLPropertyEditorPropertyUtil.java
@@ -23,6 +23,7 @@ import org.eclipse.uml2.uml.Property;
public class UMLPropertyEditorPropertyUtil extends PropertyUtil {
+ @SuppressWarnings("nls")
public static String getLabel(Property property) {
StringBuffer buffer = new StringBuffer();
// visibility

Back to the top