Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCamille Letavernier2014-04-03 11:05:23 -0400
committerCamille Letavernier2014-04-03 11:05:23 -0400
commit1e5d27bfc973067af26f416dd32e597946b3e9b2 (patch)
treeae3c4b06bbe3c0a4e9e080bb671a2eaeb4392bf4
parent87d6e4d3da9eba0d64c7d4ba36242380c63f3059 (diff)
downloadorg.eclipse.papyrus-1e5d27bfc973067af26f416dd32e597946b3e9b2.tar.gz
org.eclipse.papyrus-1e5d27bfc973067af26f416dd32e597946b3e9b2.tar.xz
org.eclipse.papyrus-1e5d27bfc973067af26f416dd32e597946b3e9b2.zip
[Releng] Remove remaining dependencies to EMF Facet and XText GMF Glue
-rw-r--r--plugins/uml/alf/org.eclipse.papyrus.uml.alf.ui/META-INF/MANIFEST.MF2
-rw-r--r--plugins/uml/alf/org.eclipse.papyrus.uml.alf.ui/src/org/eclipse/papyrus/uml/alf/ui/contentassist/AlfProposalProvider.java182
-rw-r--r--plugins/uml/alf/org.eclipse.papyrus.uml.alf/META-INF/MANIFEST.MF1
-rw-r--r--tests/junit/plugins/core/org.eclipse.papyrus.paletteconfiguration.tests/META-INF/MANIFEST.MF3
4 files changed, 89 insertions, 99 deletions
diff --git a/plugins/uml/alf/org.eclipse.papyrus.uml.alf.ui/META-INF/MANIFEST.MF b/plugins/uml/alf/org.eclipse.papyrus.uml.alf.ui/META-INF/MANIFEST.MF
index e0d79fd6859..72cc048b816 100644
--- a/plugins/uml/alf/org.eclipse.papyrus.uml.alf.ui/META-INF/MANIFEST.MF
+++ b/plugins/uml/alf/org.eclipse.papyrus.uml.alf.ui/META-INF/MANIFEST.MF
@@ -17,7 +17,7 @@ Require-Bundle: org.eclipse.xtext.ui,
org.eclipse.papyrus.uml.alf;bundle-version="1.0.0",
org.apache.log4j;bundle-version="1.2.15",
org.eclipse.papyrus.uml.alf.common.ui;bundle-version="1.0.0",
- org.eclipse.papyrus.infra.gmfdiag.xtext.glue;bundle-version="1.0.0"
+ org.eclipse.papyrus.uml.xtext.integration.ui;bundle-version="1.0.0"
Bundle-Vendor: %providerName
Bundle-Version: 1.0.0.qualifier
Bundle-ManifestVersion: 2
diff --git a/plugins/uml/alf/org.eclipse.papyrus.uml.alf.ui/src/org/eclipse/papyrus/uml/alf/ui/contentassist/AlfProposalProvider.java b/plugins/uml/alf/org.eclipse.papyrus.uml.alf.ui/src/org/eclipse/papyrus/uml/alf/ui/contentassist/AlfProposalProvider.java
index 0b3cae704cf..d829f2afb80 100644
--- a/plugins/uml/alf/org.eclipse.papyrus.uml.alf.ui/src/org/eclipse/papyrus/uml/alf/ui/contentassist/AlfProposalProvider.java
+++ b/plugins/uml/alf/org.eclipse.papyrus.uml.alf.ui/src/org/eclipse/papyrus/uml/alf/ui/contentassist/AlfProposalProvider.java
@@ -1,7 +1,7 @@
/*****************************************************************************
* Copyright (c) 2011 CEA LIST.
*
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -19,7 +19,6 @@ import java.util.Map;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.jface.text.contentassist.ICompletionProposal;
-import org.eclipse.papyrus.infra.gmfdiag.xtext.glue.contentassist.CompletionProposalUtils;
import org.eclipse.papyrus.uml.alf.alf.SuffixExpression;
import org.eclipse.papyrus.uml.alf.scoping.AlfPartialScope;
import org.eclipse.papyrus.uml.alf.scoping.AlfScopeProvider;
@@ -28,144 +27,137 @@ import org.eclipse.papyrus.uml.alf.validation.typing.SignatureFacadeFactory;
import org.eclipse.papyrus.uml.alf.validation.typing.TypeExpression;
import org.eclipse.papyrus.uml.alf.validation.typing.TypeFacade;
import org.eclipse.papyrus.uml.alf.validation.typing.TypeUtils;
+import org.eclipse.papyrus.uml.xtext.integration.CompletionProposalUtils;
import org.eclipse.uml2.uml.Classifier;
import org.eclipse.uml2.uml.Operation;
import org.eclipse.uml2.uml.Property;
import org.eclipse.xtext.Assignment;
import org.eclipse.xtext.ui.editor.contentassist.ContentAssistContext;
import org.eclipse.xtext.ui.editor.contentassist.ICompletionProposalAcceptor;
+
/**
* see http://www.eclipse.org/Xtext/documentation/latest/xtext.html#contentAssist on how to customize content assistant
*/
public class AlfProposalProvider extends AbstractAlfProposalProvider {
-
-
+
+
@Override
- public void completeLocalNameDeclarationStatement_Type(EObject model,
- Assignment assignment, ContentAssistContext context,
- ICompletionProposalAcceptor acceptor) {
+ public void completeLocalNameDeclarationStatement_Type(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
// TODO Auto-generated method stub
- AlfPartialScope scope = AlfScopeProvider.scopingTool.getVisibleClassifiers(model) ;
- new AlfCompletionProposalUtils().classifierProposals(scope, context, acceptor) ;
- super.completeLocalNameDeclarationStatement_Type(model, assignment, context,
- acceptor);
+ AlfPartialScope scope = AlfScopeProvider.scopingTool.getVisibleClassifiers(model);
+ new AlfCompletionProposalUtils().classifierProposals(scope, context, acceptor);
+ super.completeLocalNameDeclarationStatement_Type(model, assignment, context, acceptor);
}
@Override
- public void completeOperationCallExpression_OperationName(EObject model,
- Assignment assignment, ContentAssistContext context,
- ICompletionProposalAcceptor acceptor) {
- TypeExpression typeOfModel = null ;
- if (model instanceof SuffixExpression) {
- if (context.getPrefix().equals(""))
- typeOfModel = new TypeUtils().getTypeOfCandidateExpression(model) ;
- else
- typeOfModel = new TypeUtils((SuffixExpression)model).getTypeOfCandidateExpression(model.eContainer()) ;
- }
- else {
- typeOfModel = new TypeUtils().getTypeOfCandidateExpression(model) ;
+ public void completeOperationCallExpression_OperationName(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
+ TypeExpression typeOfModel = null;
+ if(model instanceof SuffixExpression) {
+ if(context.getPrefix().equals("")) {
+ typeOfModel = new TypeUtils().getTypeOfCandidateExpression(model);
+ } else {
+ typeOfModel = new TypeUtils((SuffixExpression)model).getTypeOfCandidateExpression(model.eContainer());
+ }
+ } else {
+ typeOfModel = new TypeUtils().getTypeOfCandidateExpression(model);
}
- if (typeOfModel == null || typeOfModel.getTypeFacade() instanceof ErrorTypeFacade)
- super.completeOperationCallExpression_OperationName(model, assignment, context,
- acceptor);
- else {
- new AlfCompletionProposalUtils().operationProposals(typeOfModel.getTypeFacade(), context, acceptor) ;
- super.completeOperationCallExpression_OperationName(model, assignment, context, acceptor);
+ if(typeOfModel == null || typeOfModel.getTypeFacade() instanceof ErrorTypeFacade) {
+ super.completeOperationCallExpression_OperationName(model, assignment, context, acceptor);
+ } else {
+ new AlfCompletionProposalUtils().operationProposals(typeOfModel.getTypeFacade(), context, acceptor);
+ super.completeOperationCallExpression_OperationName(model, assignment, context, acceptor);
}
}
-
+
@Override
- public void completePropertyCallExpression_PropertyName(EObject model,
- Assignment assignment, ContentAssistContext context,
- ICompletionProposalAcceptor acceptor) {
- TypeExpression typeOfModel = null ;
- if (model instanceof SuffixExpression) {
- if (context.getPrefix().equals(""))
- typeOfModel = new TypeUtils().getTypeOfCandidateExpression(model) ;
- else
- typeOfModel = new TypeUtils((SuffixExpression)model).getTypeOfCandidateExpression(model.eContainer()) ;
- }
- else {
- typeOfModel = new TypeUtils().getTypeOfCandidateExpression(model) ;
+ public void completePropertyCallExpression_PropertyName(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
+ TypeExpression typeOfModel = null;
+ if(model instanceof SuffixExpression) {
+ if(context.getPrefix().equals("")) {
+ typeOfModel = new TypeUtils().getTypeOfCandidateExpression(model);
+ } else {
+ typeOfModel = new TypeUtils((SuffixExpression)model).getTypeOfCandidateExpression(model.eContainer());
+ }
+ } else {
+ typeOfModel = new TypeUtils().getTypeOfCandidateExpression(model);
}
- if (typeOfModel == null || typeOfModel.getTypeFacade() instanceof ErrorTypeFacade)
- super.completePropertyCallExpression_PropertyName(model, assignment, context,
- acceptor);
- else {
- new AlfCompletionProposalUtils().propertyProposals(typeOfModel.getTypeFacade(), context, acceptor) ;
+ if(typeOfModel == null || typeOfModel.getTypeFacade() instanceof ErrorTypeFacade) {
+ super.completePropertyCallExpression_PropertyName(model, assignment, context, acceptor);
+ } else {
+ new AlfCompletionProposalUtils().propertyProposals(typeOfModel.getTypeFacade(), context, acceptor);
super.completePropertyCallExpression_PropertyName(model, assignment, context, acceptor);
}
}
-
+
/**************************
- *
+ *
* Completion proposal utils
*
*/
private class AlfCompletionProposalUtils {
-
+
public void classifierProposals(AlfPartialScope scope, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
- for (List<EObject> scopingLevel : scope.getScopeDetails()) {
- String completionString = "" ;
- String displayString = "" ;
- Map<String, ICompletionProposal> completionProposals = new HashMap<String, ICompletionProposal>() ;
- ICompletionProposal proposal = null ;
- for (EObject visibleClassifier : scopingLevel) {
- completionString = scope.getElementName(visibleClassifier) ;
- displayString = "" + completionString ;
- if (completionString.startsWith(context.getPrefix())) {
- completionString = completionString.substring(context.getPrefix().length()) ;
- if (completionProposals.get(displayString)==null) {
- completionProposals.put(displayString, proposal) ;
- proposal = CompletionProposalUtils.createCompletionProposal(completionString, displayString, context) ;
- acceptor.accept(proposal) ;
+ for(List<EObject> scopingLevel : scope.getScopeDetails()) {
+ String completionString = "";
+ String displayString = "";
+ Map<String, ICompletionProposal> completionProposals = new HashMap<String, ICompletionProposal>();
+ ICompletionProposal proposal = null;
+ for(EObject visibleClassifier : scopingLevel) {
+ completionString = scope.getElementName(visibleClassifier);
+ displayString = "" + completionString;
+ if(completionString.startsWith(context.getPrefix())) {
+ completionString = completionString.substring(context.getPrefix().length());
+ if(completionProposals.get(displayString) == null) {
+ completionProposals.put(displayString, proposal);
+ proposal = CompletionProposalUtils.createCompletionProposal(completionString, displayString, context);
+ acceptor.accept(proposal);
}
}
}
}
}
-
+
public void operationProposals(TypeFacade f, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
- Classifier c = f.extractActualType() ;
- String completionString = "" ;
- String displayString = "" ;
- Map<String, ICompletionProposal> completionProposals = new HashMap<String, ICompletionProposal>() ;
- ICompletionProposal proposal = null ;
- for (Operation o : c.getAllOperations()) {
- completionString = SignatureFacadeFactory.eInstance.createSignatureFacade(o).getLabel() ;
- displayString = "" + completionString ;
- if (completionString.startsWith(context.getPrefix())) {
- completionString = completionString.substring(context.getPrefix().length()) ;
- if (completionProposals.get(displayString)==null) {
- completionProposals.put(displayString, proposal) ;
- proposal = CompletionProposalUtils.createCompletionProposal(completionString, displayString, context) ;
- acceptor.accept(proposal) ;
+ Classifier c = f.extractActualType();
+ String completionString = "";
+ String displayString = "";
+ Map<String, ICompletionProposal> completionProposals = new HashMap<String, ICompletionProposal>();
+ ICompletionProposal proposal = null;
+ for(Operation o : c.getAllOperations()) {
+ completionString = SignatureFacadeFactory.eInstance.createSignatureFacade(o).getLabel();
+ displayString = "" + completionString;
+ if(completionString.startsWith(context.getPrefix())) {
+ completionString = completionString.substring(context.getPrefix().length());
+ if(completionProposals.get(displayString) == null) {
+ completionProposals.put(displayString, proposal);
+ proposal = CompletionProposalUtils.createCompletionProposal(completionString, displayString, context);
+ acceptor.accept(proposal);
}
}
}
}
-
+
public void propertyProposals(TypeFacade f, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
- Classifier c = f.extractActualType() ;
- String completionString = "" ;
- String displayString = "" ;
- Map<String, ICompletionProposal> completionProposals = new HashMap<String, ICompletionProposal>() ;
- ICompletionProposal proposal = null ;
- for (Property p : c.getAllAttributes()) {
- displayString = p.getName() + " : " + (p.getType() == null ? "any" : p.getType().getName()) ;
- completionString = p.getName() ;
- if (completionString.startsWith(context.getPrefix())) {
- completionString = completionString.substring(context.getPrefix().length()) ;
- if (completionProposals.get(displayString)==null) {
- completionProposals.put(displayString, proposal) ;
- proposal = CompletionProposalUtils.createCompletionProposal(completionString, displayString, context) ;
- acceptor.accept(proposal) ;
+ Classifier c = f.extractActualType();
+ String completionString = "";
+ String displayString = "";
+ Map<String, ICompletionProposal> completionProposals = new HashMap<String, ICompletionProposal>();
+ ICompletionProposal proposal = null;
+ for(Property p : c.getAllAttributes()) {
+ displayString = p.getName() + " : " + (p.getType() == null ? "any" : p.getType().getName());
+ completionString = p.getName();
+ if(completionString.startsWith(context.getPrefix())) {
+ completionString = completionString.substring(context.getPrefix().length());
+ if(completionProposals.get(displayString) == null) {
+ completionProposals.put(displayString, proposal);
+ proposal = CompletionProposalUtils.createCompletionProposal(completionString, displayString, context);
+ acceptor.accept(proposal);
}
}
}
}
}
-
+
}
diff --git a/plugins/uml/alf/org.eclipse.papyrus.uml.alf/META-INF/MANIFEST.MF b/plugins/uml/alf/org.eclipse.papyrus.uml.alf/META-INF/MANIFEST.MF
index cfdd6563180..e0c30586722 100644
--- a/plugins/uml/alf/org.eclipse.papyrus.uml.alf/META-INF/MANIFEST.MF
+++ b/plugins/uml/alf/org.eclipse.papyrus.uml.alf/META-INF/MANIFEST.MF
@@ -26,7 +26,6 @@ Require-Bundle: org.eclipse.xtext,
org.eclipse.emf.common,
org.antlr.runtime,
org.eclipse.uml2.uml;bundle-version="3.2.0",
- org.eclipse.papyrus.infra.gmfdiag.xtext.glue;bundle-version="1.0.0",
org.eclipse.papyrus.uml.extensionpoints;bundle-version="1.0.0",
org.eclipse.papyrus.infra.core;bundle-version="1.0.0",
org.apache.log4j;bundle-version="1.2.15",
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.paletteconfiguration.tests/META-INF/MANIFEST.MF b/tests/junit/plugins/core/org.eclipse.papyrus.paletteconfiguration.tests/META-INF/MANIFEST.MF
index 976e9a377d9..7858ba8866b 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.paletteconfiguration.tests/META-INF/MANIFEST.MF
+++ b/tests/junit/plugins/core/org.eclipse.papyrus.paletteconfiguration.tests/META-INF/MANIFEST.MF
@@ -1,6 +1,5 @@
Manifest-Version: 1.0
-Require-Bundle: org.eclipse.papyrus.core.queries.test;bundle-version="1.0.0",
- org.junit;bundle-version="4.10.0"
+Require-Bundle: org.junit;bundle-version="4.10.0"
Bundle-Vendor: Eclipse Modeling Project
Fragment-Host: org.eclipse.papyrus.uml.diagram.paletteconfiguration;bu
ndle-version="0.10.0"

Back to the top