diff options
257 files changed, 3412 insertions, 1519 deletions
diff --git a/extraplugins/EFFBD/org.eclipse.papyrus.effbd/META-INF/MANIFEST.MF b/extraplugins/EFFBD/org.eclipse.papyrus.effbd/META-INF/MANIFEST.MF index f288e71d01d..a1a5c31bcad 100644 --- a/extraplugins/EFFBD/org.eclipse.papyrus.effbd/META-INF/MANIFEST.MF +++ b/extraplugins/EFFBD/org.eclipse.papyrus.effbd/META-INF/MANIFEST.MF @@ -30,7 +30,8 @@ Require-Bundle: org.eclipse.ui, org.eclipse.papyrus.uml.tools.utils, org.eclipse.papyrus.extensionpoints.editors, org.eclipse.papyrus.infra.emf.appearance, - org.eclipse.papyrus.infra.ui;bundle-version="1.2.0" + org.eclipse.papyrus.infra.ui;bundle-version="1.2.0", + org.eclipse.papyrus.infra.ui.emf;bundle-version="1.2.0" Bundle-RequiredExecutionEnvironment: JavaSE-1.8 Bundle-ActivationPolicy: lazy Bundle-Vendor: %providerName diff --git a/extraplugins/layers/org.eclipse.papyrus.layers.stackmodel.diagram/src/org/eclipse/papyrus/layers/stackmodel/diagram/ui/handlers/AbstractLayerCommand.java b/extraplugins/layers/org.eclipse.papyrus.layers.stackmodel.diagram/src/org/eclipse/papyrus/layers/stackmodel/diagram/ui/handlers/AbstractLayerCommand.java index 1a9b80dc549..814a3c88824 100644 --- a/extraplugins/layers/org.eclipse.papyrus.layers.stackmodel.diagram/src/org/eclipse/papyrus/layers/stackmodel/diagram/ui/handlers/AbstractLayerCommand.java +++ b/extraplugins/layers/org.eclipse.papyrus.layers.stackmodel.diagram/src/org/eclipse/papyrus/layers/stackmodel/diagram/ui/handlers/AbstractLayerCommand.java @@ -26,7 +26,7 @@ import org.eclipse.gmf.runtime.diagram.ui.resources.editor.parts.DiagramDocument import org.eclipse.gmf.runtime.notation.Diagram; import org.eclipse.papyrus.infra.core.sasheditor.editor.ISashWindowsContainer; import org.eclipse.papyrus.infra.core.services.ServiceException; -import org.eclipse.papyrus.infra.emf.utils.ServiceUtilsForIEvaluationContext; +import org.eclipse.papyrus.infra.ui.util.ServiceUtilsForIEvaluationContext; import org.eclipse.papyrus.layers.runtime.NotationDiagramHelper; import org.eclipse.papyrus.layers.runtime.model.LayersModel; import org.eclipse.papyrus.layers.stackmodel.NotFoundException; diff --git a/extraplugins/layers/org.eclipse.papyrus.layers.ui/src/org/eclipse/papyrus/layers3/ui/commands/AbstractLayerStackCommand.java b/extraplugins/layers/org.eclipse.papyrus.layers.ui/src/org/eclipse/papyrus/layers3/ui/commands/AbstractLayerStackCommand.java index 0abe0660f4a..36aff65c90a 100644 --- a/extraplugins/layers/org.eclipse.papyrus.layers.ui/src/org/eclipse/papyrus/layers3/ui/commands/AbstractLayerStackCommand.java +++ b/extraplugins/layers/org.eclipse.papyrus.layers.ui/src/org/eclipse/papyrus/layers3/ui/commands/AbstractLayerStackCommand.java @@ -26,7 +26,7 @@ import org.eclipse.gmf.runtime.diagram.ui.resources.editor.parts.DiagramDocument import org.eclipse.gmf.runtime.notation.Diagram; import org.eclipse.papyrus.infra.core.sasheditor.editor.ISashWindowsContainer; import org.eclipse.papyrus.infra.core.services.ServiceException; -import org.eclipse.papyrus.infra.emf.utils.ServiceUtilsForIEvaluationContext; +import org.eclipse.papyrus.infra.ui.util.ServiceUtilsForIEvaluationContext; import org.eclipse.papyrus.layers.runtime.NotationDiagramHelper; import org.eclipse.papyrus.layers.runtime.model.LayersModel; import org.eclipse.papyrus.layers.stackmodel.NotFoundException; diff --git a/extraplugins/layers/org.eclipse.papyrus.layers.ui/src/org/eclipse/papyrus/layers3/ui/commands/AbstractLayersCommand.java b/extraplugins/layers/org.eclipse.papyrus.layers.ui/src/org/eclipse/papyrus/layers3/ui/commands/AbstractLayersCommand.java index 967aa5e65a5..49e6305b357 100644 --- a/extraplugins/layers/org.eclipse.papyrus.layers.ui/src/org/eclipse/papyrus/layers3/ui/commands/AbstractLayersCommand.java +++ b/extraplugins/layers/org.eclipse.papyrus.layers.ui/src/org/eclipse/papyrus/layers3/ui/commands/AbstractLayersCommand.java @@ -31,7 +31,7 @@ import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.papyrus.infra.core.resource.ModelSet; import org.eclipse.papyrus.infra.core.sasheditor.editor.ISashWindowsContainer; import org.eclipse.papyrus.infra.core.services.ServiceException; -import org.eclipse.papyrus.infra.emf.utils.ServiceUtilsForIEvaluationContext; +import org.eclipse.papyrus.infra.ui.util.ServiceUtilsForIEvaluationContext; import org.eclipse.papyrus.layers.runtime.NotationDiagramHelper; import org.eclipse.papyrus.layers.runtime.model.LayersModel; import org.eclipse.papyrus.layers.stackmodel.NotFoundException; diff --git a/extraplugins/layers/org.eclipse.papyrus.layers.ui/src/org/eclipse/papyrus/layers3/ui/handlers/AttachDiagramSelectedItemsToCurrentLayer.java b/extraplugins/layers/org.eclipse.papyrus.layers.ui/src/org/eclipse/papyrus/layers3/ui/handlers/AttachDiagramSelectedItemsToCurrentLayer.java index 85ef692b7a3..b33ede85147 100644 --- a/extraplugins/layers/org.eclipse.papyrus.layers.ui/src/org/eclipse/papyrus/layers3/ui/handlers/AttachDiagramSelectedItemsToCurrentLayer.java +++ b/extraplugins/layers/org.eclipse.papyrus.layers.ui/src/org/eclipse/papyrus/layers3/ui/handlers/AttachDiagramSelectedItemsToCurrentLayer.java @@ -32,7 +32,7 @@ import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.jface.viewers.ITreeSelection; import org.eclipse.papyrus.infra.core.sasheditor.editor.ISashWindowsContainer; import org.eclipse.papyrus.infra.core.services.ServiceException; -import org.eclipse.papyrus.infra.emf.utils.ServiceUtilsForIEvaluationContext; +import org.eclipse.papyrus.infra.ui.util.ServiceUtilsForIEvaluationContext; import org.eclipse.papyrus.layers.stackmodel.NotFoundException; import org.eclipse.papyrus.layers.stackmodel.layers.Layer; import org.eclipse.papyrus.layers3.ui.commands.AbstractLayersCommand; diff --git a/extraplugins/layers/org.eclipse.papyrus.layers.ui/src/org/eclipse/papyrus/layers3/ui/handlers/RemoveDiagramSelectedItemsFromCurrentLayer.java b/extraplugins/layers/org.eclipse.papyrus.layers.ui/src/org/eclipse/papyrus/layers3/ui/handlers/RemoveDiagramSelectedItemsFromCurrentLayer.java index decec23faec..65fec475c3b 100644 --- a/extraplugins/layers/org.eclipse.papyrus.layers.ui/src/org/eclipse/papyrus/layers3/ui/handlers/RemoveDiagramSelectedItemsFromCurrentLayer.java +++ b/extraplugins/layers/org.eclipse.papyrus.layers.ui/src/org/eclipse/papyrus/layers3/ui/handlers/RemoveDiagramSelectedItemsFromCurrentLayer.java @@ -32,7 +32,7 @@ import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.jface.viewers.ITreeSelection; import org.eclipse.papyrus.infra.core.sasheditor.editor.ISashWindowsContainer; import org.eclipse.papyrus.infra.core.services.ServiceException; -import org.eclipse.papyrus.infra.emf.utils.ServiceUtilsForIEvaluationContext; +import org.eclipse.papyrus.infra.ui.util.ServiceUtilsForIEvaluationContext; import org.eclipse.papyrus.layers.stackmodel.NotFoundException; import org.eclipse.papyrus.layers.stackmodel.layers.Layer; import org.eclipse.papyrus.layers3.ui.commands.AbstractLayersCommand; diff --git a/extraplugins/qompass/codegen/cpp/org.eclipse.papyrus.texteditor.cdt/src/org/eclipse/papyrus/texteditor/cdt/handler/PapyrusCDTEditorHandler.java b/extraplugins/qompass/codegen/cpp/org.eclipse.papyrus.texteditor.cdt/src/org/eclipse/papyrus/texteditor/cdt/handler/PapyrusCDTEditorHandler.java index 5131d325044..0fc7988ca58 100644 --- a/extraplugins/qompass/codegen/cpp/org.eclipse.papyrus.texteditor.cdt/src/org/eclipse/papyrus/texteditor/cdt/handler/PapyrusCDTEditorHandler.java +++ b/extraplugins/qompass/codegen/cpp/org.eclipse.papyrus.texteditor.cdt/src/org/eclipse/papyrus/texteditor/cdt/handler/PapyrusCDTEditorHandler.java @@ -41,7 +41,7 @@ import org.eclipse.papyrus.infra.core.sashwindows.di.service.IPageManager; import org.eclipse.papyrus.infra.core.services.ServiceException;
import org.eclipse.papyrus.infra.core.services.ServicesRegistry;
import org.eclipse.papyrus.infra.core.utils.ServiceUtils;
-import org.eclipse.papyrus.infra.emf.utils.ServiceUtilsForHandlers;
+import org.eclipse.papyrus.infra.ui.util.ServiceUtilsForHandlers;
import org.eclipse.papyrus.texteditor.cdt.Activator;
import org.eclipse.papyrus.texteditor.cdt.TextEditorConstants;
import org.eclipse.papyrus.texteditor.cdt.editor.PapyrusCDTEditor;
diff --git a/extraplugins/qompass/designer/org.eclipse.papyrus.qompass.designer.core/META-INF/MANIFEST.MF b/extraplugins/qompass/designer/org.eclipse.papyrus.qompass.designer.core/META-INF/MANIFEST.MF index 9228e09c908..b8bcf9e2ee4 100644 --- a/extraplugins/qompass/designer/org.eclipse.papyrus.qompass.designer.core/META-INF/MANIFEST.MF +++ b/extraplugins/qompass/designer/org.eclipse.papyrus.qompass.designer.core/META-INF/MANIFEST.MF @@ -35,7 +35,8 @@ Require-Bundle: org.eclipse.core.runtime, org.eclipse.papyrus.infra.core.log;bundle-version="1.2.0",
org.eclipse.ui,
org.eclipse.papyrus.codegen.extensionpoints;bundle-version="1.2.0",
- org.eclipse.uml2.uml.profile.standard;bundle-version="1.0.100"
+ org.eclipse.uml2.uml.profile.standard;bundle-version="1.0.100",
+ org.eclipse.papyrus.infra.ui;bundle-version="1.2.0"
Bundle-Vendor: %providerName
Bundle-ActivationPolicy: lazy
Bundle-Version: 1.2.0.qualifier
diff --git a/extraplugins/qompass/designer/org.eclipse.papyrus.qompass.designer.core/src/org/eclipse/papyrus/qompass/designer/core/CommandSupport.java b/extraplugins/qompass/designer/org.eclipse.papyrus.qompass.designer.core/src/org/eclipse/papyrus/qompass/designer/core/CommandSupport.java index 1ec058df103..6a3bb2e68ec 100644 --- a/extraplugins/qompass/designer/org.eclipse.papyrus.qompass.designer.core/src/org/eclipse/papyrus/qompass/designer/core/CommandSupport.java +++ b/extraplugins/qompass/designer/org.eclipse.papyrus.qompass.designer.core/src/org/eclipse/papyrus/qompass/designer/core/CommandSupport.java @@ -29,7 +29,7 @@ import org.eclipse.emf.transaction.TransactionalEditingDomain; import org.eclipse.gmf.runtime.common.core.command.CommandResult; import org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTransactionalCommand; import org.eclipse.papyrus.infra.core.services.ServiceException; -import org.eclipse.papyrus.infra.emf.utils.ServiceUtilsForHandlers; +import org.eclipse.papyrus.infra.ui.util.ServiceUtilsForHandlers; /** * Utility function. Allow execution of commands on a transactional command stack @@ -89,8 +89,7 @@ public class CommandSupport { public static void exec(TransactionalEditingDomain domain, String label, final Runnable command) { if (domain == null) { command.run(); - } - else { + } else { IOperationHistory history = OperationHistoryFactory.getOperationHistory(); try { history.execute(new AbstractTransactionalCommand(domain, label, Collections.EMPTY_LIST) { diff --git a/extraplugins/qompass/designer/org.eclipse.papyrus.qompass.designer.ui/META-INF/MANIFEST.MF b/extraplugins/qompass/designer/org.eclipse.papyrus.qompass.designer.ui/META-INF/MANIFEST.MF index e34e95512eb..b5e652c6ee3 100644 --- a/extraplugins/qompass/designer/org.eclipse.papyrus.qompass.designer.ui/META-INF/MANIFEST.MF +++ b/extraplugins/qompass/designer/org.eclipse.papyrus.qompass.designer.ui/META-INF/MANIFEST.MF @@ -21,7 +21,8 @@ Require-Bundle: org.eclipse.ui, org.eclipse.papyrus.uml.tools.utils;bundle-version="1.2.0",
org.eclipse.papyrus.infra.widgets.toolbox;bundle-version="1.2.0",
org.eclipse.papyrus.qompass.designer.core;bundle-version="1.2.0",
- org.eclipse.papyrus.qompass.ui;bundle-version="1.2.0"
+ org.eclipse.papyrus.qompass.ui;bundle-version="1.2.0",
+ org.eclipse.papyrus.infra.ui.emf;bundle-version="1.2.0"
Bundle-Vendor: %providerName
Bundle-ActivationPolicy: lazy
Bundle-Version: 1.2.0.qualifier
diff --git a/extraplugins/qompass/designer/tracing/org.eclipse.papyrus.infra.services.tracepoints/META-INF/MANIFEST.MF b/extraplugins/qompass/designer/tracing/org.eclipse.papyrus.infra.services.tracepoints/META-INF/MANIFEST.MF index 36e9fe9b7ba..3f019c3f448 100644 --- a/extraplugins/qompass/designer/tracing/org.eclipse.papyrus.infra.services.tracepoints/META-INF/MANIFEST.MF +++ b/extraplugins/qompass/designer/tracing/org.eclipse.papyrus.infra.services.tracepoints/META-INF/MANIFEST.MF @@ -14,7 +14,8 @@ Require-Bundle: org.eclipse.ui, org.eclipse.papyrus.infra.core.log;bundle-version="1.2.0",
org.eclipse.papyrus.infra.emf;bundle-version="1.2.0",
org.eclipse.papyrus.infra.gmfdiag.commands;bundle-version="1.2.0",
- org.eclipse.papyrus.infra.services.markerlistener;bundle-version="1.2.0"
+ org.eclipse.papyrus.infra.services.markerlistener;bundle-version="1.2.0",
+ org.eclipse.papyrus.infra.ui;bundle-version="1.2.0"
Export-Package: org.eclipse.papyrus.infra.services.tracepoints,
org.eclipse.papyrus.infra.services.tracepoints.commands,
org.eclipse.papyrus.infra.services.tracepoints.dialogs,
diff --git a/extraplugins/qompass/designer/tracing/org.eclipse.papyrus.infra.services.tracepoints/src/org/eclipse/papyrus/infra/services/tracepoints/handler/AbstractCommandHandler.java b/extraplugins/qompass/designer/tracing/org.eclipse.papyrus.infra.services.tracepoints/src/org/eclipse/papyrus/infra/services/tracepoints/handler/AbstractCommandHandler.java index 5f4c6281690..38a5e2884b8 100644 --- a/extraplugins/qompass/designer/tracing/org.eclipse.papyrus.infra.services.tracepoints/src/org/eclipse/papyrus/infra/services/tracepoints/handler/AbstractCommandHandler.java +++ b/extraplugins/qompass/designer/tracing/org.eclipse.papyrus.infra.services.tracepoints/src/org/eclipse/papyrus/infra/services/tracepoints/handler/AbstractCommandHandler.java @@ -27,8 +27,8 @@ import org.eclipse.jface.viewers.ISelection; import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.papyrus.infra.core.services.ServiceException;
import org.eclipse.papyrus.infra.emf.utils.BusinessModelResolver;
-import org.eclipse.papyrus.infra.emf.utils.ServiceUtilsForHandlers;
import org.eclipse.papyrus.infra.services.tracepoints.Activator;
+import org.eclipse.papyrus.infra.ui.util.ServiceUtilsForHandlers;
import org.eclipse.ui.PlatformUI;
/**
@@ -50,7 +50,7 @@ public abstract class AbstractCommandHandler extends AbstractHandler { * Returns the command to execute (to be implemented
* in children implementing this class)
*
- * @return the command to execute
+ * @return the command to execute
*
* </pre>
*/
@@ -111,14 +111,14 @@ public abstract class AbstractCommandHandler extends AbstractHandler { for (Object current : structuredSelection.toArray()) {
// Adapt current selection to EObject
if (current instanceof IAdaptable) {
- selectedEObjects.add((EObject) ((IAdaptable) current).getAdapter(EObject.class));
+ selectedEObjects.add(((IAdaptable) current).getAdapter(EObject.class));
}
}
} else { // Not a IStructuredSelection
if (selection != null) {
// Adapt current selection to EObject
if (selection instanceof IAdaptable) {
- selectedEObjects.add((EObject) ((IAdaptable) selection).getAdapter(EObject.class));
+ selectedEObjects.add(((IAdaptable) selection).getAdapter(EObject.class));
}
}
}
diff --git a/extraplugins/req/org.eclipse.papyrus.req.domainModel2Profile/src/org/eclipse/papyrus/req/domainModel2Profile/handler/PapyrusAbstractHandler.java b/extraplugins/req/org.eclipse.papyrus.req.domainModel2Profile/src/org/eclipse/papyrus/req/domainModel2Profile/handler/PapyrusAbstractHandler.java index 04451a3d718..1cca6515f1f 100644 --- a/extraplugins/req/org.eclipse.papyrus.req.domainModel2Profile/src/org/eclipse/papyrus/req/domainModel2Profile/handler/PapyrusAbstractHandler.java +++ b/extraplugins/req/org.eclipse.papyrus.req.domainModel2Profile/src/org/eclipse/papyrus/req/domainModel2Profile/handler/PapyrusAbstractHandler.java @@ -26,8 +26,8 @@ import org.eclipse.gmf.runtime.notation.View; import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.papyrus.infra.core.services.ServiceException;
-import org.eclipse.papyrus.infra.emf.utils.ServiceUtilsForHandlers;
import org.eclipse.papyrus.infra.ui.editor.IMultiDiagramEditor;
+import org.eclipse.papyrus.infra.ui.util.ServiceUtilsForHandlers;
import org.eclipse.ui.ISelectionService;
import org.eclipse.ui.PlatformUI;
import org.eclipse.uml2.uml.Element;
@@ -38,79 +38,85 @@ import org.eclipse.uml2.uml.Element; */
public abstract class PapyrusAbstractHandler extends AbstractHandler {
- protected TransactionalEditingDomain transactionalEditingDomain=null;
+ protected TransactionalEditingDomain transactionalEditingDomain = null;
protected IMultiDiagramEditor papyrusEditor;
/**
* install element of Papyrus in order to execute commands
- * @param event the context of the execution
+ *
+ * @param event
+ * the context of the execution
*/
- protected void setPapyrusEnvironment(ExecutionEvent event){
- //look for papyrus
+ protected void setPapyrusEnvironment(ExecutionEvent event) {
+ // look for papyrus
try {
papyrusEditor = ServiceUtilsForHandlers.getInstance().getService(IMultiDiagramEditor.class, event);
- transactionalEditingDomain= ServiceUtilsForHandlers.getInstance().getService(org.eclipse.emf.transaction.TransactionalEditingDomain.class, event);
+ transactionalEditingDomain = ServiceUtilsForHandlers.getInstance().getService(org.eclipse.emf.transaction.TransactionalEditingDomain.class, event);
} catch (ServiceException ex) {
System.err.println(ex);
}
}
+
/**
* getSelected element in the diagram or in the model explorer
+ *
* @return Element or null
*/
- protected Element getSelection(){
- org.eclipse.uml2.uml.Element selectedElement =null;
+ protected Element getSelection() {
+ org.eclipse.uml2.uml.Element selectedElement = null;
ISelectionService selectionService = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getSelectionService();
ISelection selection = selectionService.getSelection();
- //look for papyrus
- if(selection instanceof IStructuredSelection) {
- Object selectedobject = ((IStructuredSelection)selection).getFirstElement();
- if(selectedobject instanceof GraphicalEditPart) {
- Object graphicalElement = ((GraphicalEditPart)selectedobject).getModel();
- if((graphicalElement instanceof View) && ((View)graphicalElement).getElement() instanceof org.eclipse.uml2.uml.Element) {
- selectedElement = (org.eclipse.uml2.uml.Element)((View)graphicalElement).getElement();
+ // look for papyrus
+ if (selection instanceof IStructuredSelection) {
+ Object selectedobject = ((IStructuredSelection) selection).getFirstElement();
+ if (selectedobject instanceof GraphicalEditPart) {
+ Object graphicalElement = ((GraphicalEditPart) selectedobject).getModel();
+ if ((graphicalElement instanceof View) && ((View) graphicalElement).getElement() instanceof org.eclipse.uml2.uml.Element) {
+ selectedElement = (org.eclipse.uml2.uml.Element) ((View) graphicalElement).getElement();
}
- }
- else if(selectedobject instanceof IAdaptable) {
- EObject selectedEObject = (EObject)((IAdaptable)selectedobject).getAdapter(EObject.class);
- if (selectedEObject instanceof org.eclipse.uml2.uml.Element){
- selectedElement=(Element)selectedEObject;
+ } else if (selectedobject instanceof IAdaptable) {
+ EObject selectedEObject = ((IAdaptable) selectedobject).getAdapter(EObject.class);
+ if (selectedEObject instanceof org.eclipse.uml2.uml.Element) {
+ selectedElement = (Element) selectedEObject;
}
}
}
return selectedElement;
}
- public Object execute(ExecutionEvent event) throws ExecutionException {
+
+ @Override
+ public Object execute(ExecutionEvent event) throws ExecutionException {
setPapyrusEnvironment(event);
return null;
}
+
/**
* getSelected element in the diagram or in the model explorer
+ *
* @return Element or null
*/
- protected ArrayList<Element> getSelectionSet(){
- ArrayList<Element> selectedSet =new ArrayList<Element>();
+ protected ArrayList<Element> getSelectionSet() {
+ ArrayList<Element> selectedSet = new ArrayList<Element>();
ISelectionService selectionService = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getSelectionService();
ISelection selection = selectionService.getSelection();
- if(selection instanceof IStructuredSelection) {
+ if (selection instanceof IStructuredSelection) {
@SuppressWarnings("rawtypes")
- Iterator selectedobjectIteractor = ((IStructuredSelection)selection).iterator();
+ Iterator selectedobjectIteractor = ((IStructuredSelection) selection).iterator();
while (selectedobjectIteractor.hasNext()) {
Object currentSelection = selectedobjectIteractor.next();
- if(currentSelection instanceof GraphicalEditPart) {
- Object graphicalElement = ((GraphicalEditPart)currentSelection).getModel();
- if((graphicalElement instanceof View) && ((View)graphicalElement).getElement() instanceof org.eclipse.uml2.uml.Element) {
- selectedSet.add( (org.eclipse.uml2.uml.Element)((View)graphicalElement).getElement());
+ if (currentSelection instanceof GraphicalEditPart) {
+ Object graphicalElement = ((GraphicalEditPart) currentSelection).getModel();
+ if ((graphicalElement instanceof View) && ((View) graphicalElement).getElement() instanceof org.eclipse.uml2.uml.Element) {
+ selectedSet.add((org.eclipse.uml2.uml.Element) ((View) graphicalElement).getElement());
}
- }
- else if(currentSelection instanceof IAdaptable) {
- EObject selectedEObject = (EObject)((IAdaptable)currentSelection).getAdapter(EObject.class);
- if (selectedEObject instanceof org.eclipse.uml2.uml.Element){
- selectedSet.add((Element)selectedEObject);
+ } else if (currentSelection instanceof IAdaptable) {
+ EObject selectedEObject = ((IAdaptable) currentSelection).getAdapter(EObject.class);
+ if (selectedEObject instanceof org.eclipse.uml2.uml.Element) {
+ selectedSet.add((Element) selectedEObject);
}
}
}
diff --git a/extraplugins/req/org.eclipse.papyrus.req.reqif/META-INF/MANIFEST.MF b/extraplugins/req/org.eclipse.papyrus.req.reqif/META-INF/MANIFEST.MF index 0094ab34909..2b0b12345d6 100644 --- a/extraplugins/req/org.eclipse.papyrus.req.reqif/META-INF/MANIFEST.MF +++ b/extraplugins/req/org.eclipse.papyrus.req.reqif/META-INF/MANIFEST.MF @@ -36,7 +36,8 @@ Require-Bundle: org.eclipse.ui, org.eclipse.papyrus.emf.facet.efacet.core, org.eclipse.papyrus.emf.facet.efacet.metamodel, org.eclipse.papyrus.emf.facet.query.java.core, - org.eclipse.papyrus.infra.widgets.toolbox + org.eclipse.papyrus.infra.widgets.toolbox, + org.eclipse.papyrus.infra.ui;bundle-version="1.2.0" Bundle-RequiredExecutionEnvironment: JavaSE-1.7 Bundle-ActivationPolicy: lazy Export-Package: org.eclipse.papyrus.req.reqif;uses:="org.osgi.framework,org.eclipse.ui.plugin", diff --git a/extraplugins/req/org.eclipse.papyrus.req.reqif/src/org/eclipse/papyrus/req/reqif/integration/assistant/AbstractWizardForPapyrus.java b/extraplugins/req/org.eclipse.papyrus.req.reqif/src/org/eclipse/papyrus/req/reqif/integration/assistant/AbstractWizardForPapyrus.java index a94a6785488..b132e6fb77e 100644 --- a/extraplugins/req/org.eclipse.papyrus.req.reqif/src/org/eclipse/papyrus/req/reqif/integration/assistant/AbstractWizardForPapyrus.java +++ b/extraplugins/req/org.eclipse.papyrus.req.reqif/src/org/eclipse/papyrus/req/reqif/integration/assistant/AbstractWizardForPapyrus.java @@ -27,7 +27,7 @@ import org.eclipse.papyrus.infra.core.resource.ModelSet; import org.eclipse.papyrus.infra.core.services.ServiceException;
import org.eclipse.papyrus.infra.core.services.ServicesRegistry;
import org.eclipse.papyrus.infra.emf.utils.EMFHelper;
-import org.eclipse.papyrus.infra.emf.utils.ServiceUtilsForSelection;
+import org.eclipse.papyrus.infra.ui.util.ServiceUtilsForSelection;
import org.eclipse.ui.IEditorPart;
import org.eclipse.ui.ISelectionService;
import org.eclipse.ui.IWorkbench;
diff --git a/extraplugins/req/org.eclipse.papyrus.req.sysml.assistant/META-INF/MANIFEST.MF b/extraplugins/req/org.eclipse.papyrus.req.sysml.assistant/META-INF/MANIFEST.MF index b6e4bbef5f7..e067a571143 100644 --- a/extraplugins/req/org.eclipse.papyrus.req.sysml.assistant/META-INF/MANIFEST.MF +++ b/extraplugins/req/org.eclipse.papyrus.req.sysml.assistant/META-INF/MANIFEST.MF @@ -14,7 +14,8 @@ Require-Bundle: org.eclipse.gmf.runtime.diagram.ui;bundle-version="1.6.0", org.eclipse.core.expressions;bundle-version="3.5.0", org.eclipse.papyrus.req.domainModel2Profile;bundle-version="0.7.0", org.eclipse.papyrus.uml.profile.drafter;bundle-version="1.2.0", - org.eclipse.papyrus.infra.ui;bundle-version="1.2.0" + org.eclipse.papyrus.infra.ui;bundle-version="1.2.0", + org.eclipse.papyrus.infra.ui.emf;bundle-version="1.2.0" Bundle-RequiredExecutionEnvironment: JavaSE-1.6 Bundle-ActivationPolicy: lazy Export-Package: org.eclipse.papyrus.req.sysml.assistant, diff --git a/extraplugins/req/org.eclipse.papyrus.req.sysml.assistant/src/org/eclipse/papyrus/req/sysml/assistant/handler/PapyrusAbstractHandler.java b/extraplugins/req/org.eclipse.papyrus.req.sysml.assistant/src/org/eclipse/papyrus/req/sysml/assistant/handler/PapyrusAbstractHandler.java index 2f5c089dd9f..dd999d97ba2 100644 --- a/extraplugins/req/org.eclipse.papyrus.req.sysml.assistant/src/org/eclipse/papyrus/req/sysml/assistant/handler/PapyrusAbstractHandler.java +++ b/extraplugins/req/org.eclipse.papyrus.req.sysml.assistant/src/org/eclipse/papyrus/req/sysml/assistant/handler/PapyrusAbstractHandler.java @@ -26,8 +26,8 @@ import org.eclipse.gmf.runtime.notation.View; import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.papyrus.infra.core.services.ServiceException;
-import org.eclipse.papyrus.infra.emf.utils.ServiceUtilsForHandlers;
import org.eclipse.papyrus.infra.ui.editor.IMultiDiagramEditor;
+import org.eclipse.papyrus.infra.ui.util.ServiceUtilsForHandlers;
import org.eclipse.ui.ISelectionService;
import org.eclipse.ui.PlatformUI;
import org.eclipse.uml2.uml.Element;
diff --git a/extraplugins/req/org.eclipse.papyrus.req.sysml.traceabilityassistant/META-INF/MANIFEST.MF b/extraplugins/req/org.eclipse.papyrus.req.sysml.traceabilityassistant/META-INF/MANIFEST.MF index 864a4f7d717..158611f060a 100644 --- a/extraplugins/req/org.eclipse.papyrus.req.sysml.traceabilityassistant/META-INF/MANIFEST.MF +++ b/extraplugins/req/org.eclipse.papyrus.req.sysml.traceabilityassistant/META-INF/MANIFEST.MF @@ -14,7 +14,8 @@ Require-Bundle: org.eclipse.ui, org.eclipse.papyrus.infra.emf;bundle-version="1.0.0", org.eclipse.papyrus.infra.core, org.eclipse.papyrus.uml.extensionpoints, - org.eclipse.papyrus.infra.ui;bundle-version="1.2.0" + org.eclipse.papyrus.infra.ui;bundle-version="1.2.0", + org.eclipse.papyrus.infra.ui.emf;bundle-version="1.2.0" Bundle-ActivationPolicy: lazy Export-Package: org.eclipse.papyrus.req.sysml.traceabilityassistant.analysis, org.eclipse.papyrus.req.sysml.traceabilityassistant.command diff --git a/extraplugins/req/org.eclipse.papyrus.req.sysml.traceabilityassistant/src/org/eclipse/papyrus/req/sysml/traceabilityassistant/handler/ApplyTracabilityHandler.java b/extraplugins/req/org.eclipse.papyrus.req.sysml.traceabilityassistant/src/org/eclipse/papyrus/req/sysml/traceabilityassistant/handler/ApplyTracabilityHandler.java index b188b25eeec..18ae6fe85b8 100644 --- a/extraplugins/req/org.eclipse.papyrus.req.sysml.traceabilityassistant/src/org/eclipse/papyrus/req/sysml/traceabilityassistant/handler/ApplyTracabilityHandler.java +++ b/extraplugins/req/org.eclipse.papyrus.req.sysml.traceabilityassistant/src/org/eclipse/papyrus/req/sysml/traceabilityassistant/handler/ApplyTracabilityHandler.java @@ -26,8 +26,8 @@ import org.eclipse.emf.transaction.TransactionalEditingDomain; import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.papyrus.infra.emf.utils.EMFHelper;
-import org.eclipse.papyrus.infra.emf.utils.ServiceUtilsForHandlers;
import org.eclipse.papyrus.infra.ui.util.EditorUtils;
+import org.eclipse.papyrus.infra.ui.util.ServiceUtilsForHandlers;
import org.eclipse.papyrus.req.sysml.traceabilityassistant.analysis.TracabilityAnalyzer;
import org.eclipse.papyrus.uml.extensionpoints.profile.RegisteredProfile;
import org.eclipse.papyrus.uml.extensionpoints.utils.Util;
diff --git a/extraplugins/revision/org.eclipse.papyrus.revisiontool/META-INF/MANIFEST.MF b/extraplugins/revision/org.eclipse.papyrus.revisiontool/META-INF/MANIFEST.MF index 2f58390c8e4..61d2c2eaab4 100644 --- a/extraplugins/revision/org.eclipse.papyrus.revisiontool/META-INF/MANIFEST.MF +++ b/extraplugins/revision/org.eclipse.papyrus.revisiontool/META-INF/MANIFEST.MF @@ -33,7 +33,8 @@ Require-Bundle: org.eclipse.ui, org.eclipse.papyrus.infra.gmfdiag.common;bundle-version="1.1.0", org.eclipse.papyrus.infra.gmfdiag.commands;bundle-version="1.1.0", org.eclipse.papyrus.infra.services.edit, - org.eclipse.papyrus.infra.ui;bundle-version="1.2.0" + org.eclipse.papyrus.infra.ui;bundle-version="1.2.0", + org.eclipse.papyrus.infra.ui.emf;bundle-version="1.2.0" Bundle-RequiredExecutionEnvironment: JavaSE-1.6 Export-Package: org.eclipse.papyrus.revision.tool, org.eclipse.papyrus.revision.tool.core, diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.common/src/org/eclipse/papyrus/robotml/diagram/common/utils/RobotmlSelectionTester.java b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.common/src/org/eclipse/papyrus/robotml/diagram/common/utils/RobotmlSelectionTester.java index eee9e4b07a2..46642f05607 100644 --- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.common/src/org/eclipse/papyrus/robotml/diagram/common/utils/RobotmlSelectionTester.java +++ b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.common/src/org/eclipse/papyrus/robotml/diagram/common/utils/RobotmlSelectionTester.java @@ -21,8 +21,8 @@ import org.eclipse.jface.viewers.ISelection; import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.papyrus.infra.core.resource.ModelSet;
import org.eclipse.papyrus.infra.core.resource.ModelsReader;
-import org.eclipse.papyrus.infra.emf.utils.ServiceUtilsForSelection;
import org.eclipse.papyrus.infra.ui.editor.IMultiDiagramEditor;
+import org.eclipse.papyrus.infra.ui.util.ServiceUtilsForSelection;
import org.eclipse.papyrus.uml.tools.model.UmlModel;
import org.eclipse.ui.IEditorPart;
import org.eclipse.ui.PlatformUI;
diff --git a/extraplugins/soaml/org.eclipse.papyrus.soaml.diagram.common/src/org/eclipse/papyrus/soaml/diagram/common/utils/SoamlSelectionTester.java b/extraplugins/soaml/org.eclipse.papyrus.soaml.diagram.common/src/org/eclipse/papyrus/soaml/diagram/common/utils/SoamlSelectionTester.java index 2af9390d38b..ffd04dc050d 100644 --- a/extraplugins/soaml/org.eclipse.papyrus.soaml.diagram.common/src/org/eclipse/papyrus/soaml/diagram/common/utils/SoamlSelectionTester.java +++ b/extraplugins/soaml/org.eclipse.papyrus.soaml.diagram.common/src/org/eclipse/papyrus/soaml/diagram/common/utils/SoamlSelectionTester.java @@ -24,8 +24,8 @@ import org.eclipse.papyrus.infra.core.resource.ModelSet; import org.eclipse.papyrus.infra.core.resource.ModelsReader;
import org.eclipse.papyrus.infra.core.resource.NotFoundException;
import org.eclipse.papyrus.infra.core.services.ServiceException;
-import org.eclipse.papyrus.infra.emf.utils.ServiceUtilsForSelection;
import org.eclipse.papyrus.infra.ui.editor.IMultiDiagramEditor;
+import org.eclipse.papyrus.infra.ui.util.ServiceUtilsForSelection;
import org.eclipse.papyrus.soaml.diagram.common.Activator;
import org.eclipse.papyrus.uml.tools.model.UmlModel;
import org.eclipse.ui.IEditorPart;
diff --git a/extraplugins/umlrt/org.eclipse.papyrus.umlrt.ui/META-INF/MANIFEST.MF b/extraplugins/umlrt/org.eclipse.papyrus.umlrt.ui/META-INF/MANIFEST.MF index 07c15ecf974..0cd52338d3e 100644 --- a/extraplugins/umlrt/org.eclipse.papyrus.umlrt.ui/META-INF/MANIFEST.MF +++ b/extraplugins/umlrt/org.eclipse.papyrus.umlrt.ui/META-INF/MANIFEST.MF @@ -27,7 +27,8 @@ Require-Bundle: org.eclipse.ui, org.eclipse.papyrus.infra.sync;bundle-version="1.2.0",
org.eclipse.papyrus.infra.gmfdiag.common;bundle-version="1.2.0",
org.eclipse.papyrus.infra.core;bundle-version="1.2.0",
- com.google.guava;bundle-version="11.0.0"
+ com.google.guava;bundle-version="11.0.0",
+ org.eclipse.papyrus.infra.ui.emf;bundle-version="1.2.0"
Bundle-Vendor: Eclipse Modeling Project
Bundle-ActivationPolicy: lazy
Bundle-Version: 1.2.0.qualifier
diff --git a/features/papyrus-main-features/org.eclipse.papyrus.infra.feature/feature.xml b/features/papyrus-main-features/org.eclipse.papyrus.infra.feature/feature.xml index 72f6801d351..b2f2d1de5a2 100644 --- a/features/papyrus-main-features/org.eclipse.papyrus.infra.feature/feature.xml +++ b/features/papyrus-main-features/org.eclipse.papyrus.infra.feature/feature.xml @@ -21,8 +21,6 @@ http://www.eclipse.org/legal/epl-v10.html <plugin download-size="0" id="org.eclipse.papyrus.infra.onefile" install-size="0" unpack="false" version="0.0.0"/> - <plugin download-size="0" id="org.eclipse.papyrus.infra.ui.resources" install-size="0" unpack="false" version="0.0.0"/> - <plugin download-size="0" id="org.eclipse.papyrus.infra.tools" install-size="0" unpack="false" version="0.0.0"/> <plugin download-size="0" id="org.eclipse.papyrus.infra.constraints" install-size="0" unpack="false" version="0.0.0"/> @@ -55,6 +53,4 @@ http://www.eclipse.org/legal/epl-v10.html <plugin download-size="0" id="org.eclipse.papyrus.infra.filters.edit" install-size="0" unpack="false" version="0.0.0"/> - <plugin download-size="0" id="org.eclipse.papyrus.infra.ui" install-size="0" unpack="false" version="0.0.0"/> - </feature>
\ No newline at end of file diff --git a/features/papyrus-main-features/org.eclipse.papyrus.infra.ui.feature/.project b/features/papyrus-main-features/org.eclipse.papyrus.infra.ui.feature/.project new file mode 100644 index 00000000000..d670d01258b --- /dev/null +++ b/features/papyrus-main-features/org.eclipse.papyrus.infra.ui.feature/.project @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="UTF-8"?> +<projectDescription> + <name>org.eclipse.papyrus.infra.ui.feature</name> + <comment></comment> + <projects> + </projects> + <buildSpec> + <buildCommand> + <name>org.eclipse.pde.FeatureBuilder</name> + <arguments> + </arguments> + </buildCommand> + </buildSpec> + <natures> + <nature>org.eclipse.pde.FeatureNature</nature> + </natures> +</projectDescription> diff --git a/features/papyrus-main-features/org.eclipse.papyrus.infra.ui.feature/build.properties b/features/papyrus-main-features/org.eclipse.papyrus.infra.ui.feature/build.properties new file mode 100644 index 00000000000..cff2bd50c57 --- /dev/null +++ b/features/papyrus-main-features/org.eclipse.papyrus.infra.ui.feature/build.properties @@ -0,0 +1,6 @@ +bin.includes = feature.xml,\ + epl-v10.html,\ + license.html,\ + feature.properties +src.includes = epl-v10.html,\ + license.html diff --git a/features/papyrus-main-features/org.eclipse.papyrus.infra.ui.feature/epl-v10.html b/features/papyrus-main-features/org.eclipse.papyrus.infra.ui.feature/epl-v10.html new file mode 100644 index 00000000000..cb1073a4bad --- /dev/null +++ b/features/papyrus-main-features/org.eclipse.papyrus.infra.ui.feature/epl-v10.html @@ -0,0 +1,304 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN"> +<html xmlns:o="urn:schemas-microsoft-com:office:office" +xmlns:w="urn:schemas-microsoft-com:office:word" +xmlns="http://www.w3.org/TR/REC-html40"> + +<head> +<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> +<link rel=File-List +href="./Eclipse%20EPL%202003_11_10%20Final_files/filelist.xml"> +<title>Eclipse Public License - Version 1.0</title> +<style> +<!-- + /* Font Definitions */ +@font-face + { + panose-1:2 11 6 4 3 5 4 4 2 4; + mso-font-charset:0; + mso-font-pitch:variable; + mso-font-signature:553679495 -2147483648 8 0 66047 0;} + /* Style Definitions */ +p.MsoNormal, li.MsoNormal, div.MsoNormal + {mso-style-parent:""; + margin:0in; + margin-bottom:.0001pt; + mso-pagination:widow-orphan; + font-size:12.0pt; + } +p + {margin-right:0in; + mso-margin-top-alt:auto; + mso-margin-bottom-alt:auto; + margin-left:0in; + mso-pagination:widow-orphan; + font-size:12.0pt; + } +p.BalloonText, li.BalloonText, div.BalloonText + {mso-style-name:"Balloon Text"; + margin:0in; + margin-bottom:.0001pt; + mso-pagination:widow-orphan; + font-size:8.0pt; + + } +@page Section1 + {size:8.5in 11.0in; + margin:1.0in 1.25in 1.0in 1.25in; + mso-header-margin:.5in; + mso-footer-margin:.5in; + mso-paper-source:0;} +div.Section1 + {page:Section1;} +--> +</style> +</head> + +<body lang="EN-US" style='tab-interval:.5in'> + +<div class=Section1> + +<p align=center style='text-align:center'><b>Eclipse Public License - v 1.0</b> +</p> + +<p><span style='font-size:10.0pt'>THE ACCOMPANYING PROGRAM IS PROVIDED UNDER +THE TERMS OF THIS ECLIPSE PUBLIC LICENSE ("AGREEMENT"). ANY USE, +REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE +OF THIS AGREEMENT.</span> </p> + +<p><b><span style='font-size:10.0pt'>1. DEFINITIONS</span></b> </p> + +<p><span style='font-size:10.0pt'>"Contribution" means:</span> </p> + +<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a) +in the case of the initial Contributor, the initial code and documentation +distributed under this Agreement, and<br clear=left> +b) in the case of each subsequent Contributor:</span></p> + +<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i) +changes to the Program, and</span></p> + +<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii) +additions to the Program;</span></p> + +<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>where +such changes and/or additions to the Program originate from and are distributed +by that particular Contributor. A Contribution 'originates' from a Contributor +if it was added to the Program by such Contributor itself or anyone acting on +such Contributor's behalf. Contributions do not include additions to the +Program which: (i) are separate modules of software distributed in conjunction +with the Program under their own license agreement, and (ii) are not derivative +works of the Program. </span></p> + +<p><span style='font-size:10.0pt'>"Contributor" means any person or +entity that distributes the Program.</span> </p> + +<p><span style='font-size:10.0pt'>"Licensed Patents " mean patent +claims licensable by a Contributor which are necessarily infringed by the use +or sale of its Contribution alone or when combined with the Program. </span></p> + +<p><span style='font-size:10.0pt'>"Program" means the Contributions +distributed in accordance with this Agreement.</span> </p> + +<p><span style='font-size:10.0pt'>"Recipient" means anyone who +receives the Program under this Agreement, including all Contributors.</span> </p> + +<p><b><span style='font-size:10.0pt'>2. GRANT OF RIGHTS</span></b> </p> + +<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a) +Subject to the terms of this Agreement, each Contributor hereby grants Recipient +a non-exclusive, worldwide, royalty-free copyright license to<span +style='color:red'> </span>reproduce, prepare derivative works of, publicly +display, publicly perform, distribute and sublicense the Contribution of such +Contributor, if any, and such derivative works, in source code and object code +form.</span></p> + +<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b) +Subject to the terms of this Agreement, each Contributor hereby grants +Recipient a non-exclusive, worldwide,<span style='color:green'> </span>royalty-free +patent license under Licensed Patents to make, use, sell, offer to sell, import +and otherwise transfer the Contribution of such Contributor, if any, in source +code and object code form. This patent license shall apply to the combination +of the Contribution and the Program if, at the time the Contribution is added +by the Contributor, such addition of the Contribution causes such combination +to be covered by the Licensed Patents. The patent license shall not apply to +any other combinations which include the Contribution. No hardware per se is +licensed hereunder. </span></p> + +<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>c) +Recipient understands that although each Contributor grants the licenses to its +Contributions set forth herein, no assurances are provided by any Contributor +that the Program does not infringe the patent or other intellectual property +rights of any other entity. Each Contributor disclaims any liability to Recipient +for claims brought by any other entity based on infringement of intellectual +property rights or otherwise. As a condition to exercising the rights and +licenses granted hereunder, each Recipient hereby assumes sole responsibility +to secure any other intellectual property rights needed, if any. For example, +if a third party patent license is required to allow Recipient to distribute +the Program, it is Recipient's responsibility to acquire that license before +distributing the Program.</span></p> + +<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>d) +Each Contributor represents that to its knowledge it has sufficient copyright +rights in its Contribution, if any, to grant the copyright license set forth in +this Agreement. </span></p> + +<p><b><span style='font-size:10.0pt'>3. REQUIREMENTS</span></b> </p> + +<p><span style='font-size:10.0pt'>A Contributor may choose to distribute the +Program in object code form under its own license agreement, provided that:</span> +</p> + +<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a) +it complies with the terms and conditions of this Agreement; and</span></p> + +<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b) +its license agreement:</span></p> + +<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i) +effectively disclaims on behalf of all Contributors all warranties and +conditions, express and implied, including warranties or conditions of title +and non-infringement, and implied warranties or conditions of merchantability +and fitness for a particular purpose; </span></p> + +<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii) +effectively excludes on behalf of all Contributors all liability for damages, +including direct, indirect, special, incidental and consequential damages, such +as lost profits; </span></p> + +<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iii) +states that any provisions which differ from this Agreement are offered by that +Contributor alone and not by any other party; and</span></p> + +<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iv) +states that source code for the Program is available from such Contributor, and +informs licensees how to obtain it in a reasonable manner on or through a +medium customarily used for software exchange.<span style='color:blue'> </span></span></p> + +<p><span style='font-size:10.0pt'>When the Program is made available in source +code form:</span> </p> + +<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a) +it must be made available under this Agreement; and </span></p> + +<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b) a +copy of this Agreement must be included with each copy of the Program. </span></p> + +<p><span style='font-size:10.0pt'>Contributors may not remove or alter any +copyright notices contained within the Program. </span></p> + +<p><span style='font-size:10.0pt'>Each Contributor must identify itself as the +originator of its Contribution, if any, in a manner that reasonably allows +subsequent Recipients to identify the originator of the Contribution. </span></p> + +<p><b><span style='font-size:10.0pt'>4. COMMERCIAL DISTRIBUTION</span></b> </p> + +<p><span style='font-size:10.0pt'>Commercial distributors of software may +accept certain responsibilities with respect to end users, business partners +and the like. While this license is intended to facilitate the commercial use +of the Program, the Contributor who includes the Program in a commercial +product offering should do so in a manner which does not create potential +liability for other Contributors. Therefore, if a Contributor includes the +Program in a commercial product offering, such Contributor ("Commercial +Contributor") hereby agrees to defend and indemnify every other +Contributor ("Indemnified Contributor") against any losses, damages and +costs (collectively "Losses") arising from claims, lawsuits and other +legal actions brought by a third party against the Indemnified Contributor to +the extent caused by the acts or omissions of such Commercial Contributor in +connection with its distribution of the Program in a commercial product +offering. The obligations in this section do not apply to any claims or Losses +relating to any actual or alleged intellectual property infringement. In order +to qualify, an Indemnified Contributor must: a) promptly notify the Commercial +Contributor in writing of such claim, and b) allow the Commercial Contributor +to control, and cooperate with the Commercial Contributor in, the defense and +any related settlement negotiations. The Indemnified Contributor may participate +in any such claim at its own expense.</span> </p> + +<p><span style='font-size:10.0pt'>For example, a Contributor might include the +Program in a commercial product offering, Product X. That Contributor is then a +Commercial Contributor. If that Commercial Contributor then makes performance +claims, or offers warranties related to Product X, those performance claims and +warranties are such Commercial Contributor's responsibility alone. Under this +section, the Commercial Contributor would have to defend claims against the +other Contributors related to those performance claims and warranties, and if a +court requires any other Contributor to pay any damages as a result, the +Commercial Contributor must pay those damages.</span> </p> + +<p><b><span style='font-size:10.0pt'>5. NO WARRANTY</span></b> </p> + +<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS +AGREEMENT, THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT +WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, +WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, +MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely +responsible for determining the appropriateness of using and distributing the +Program and assumes all risks associated with its exercise of rights under this +Agreement , including but not limited to the risks and costs of program errors, +compliance with applicable laws, damage to or loss of data, programs or +equipment, and unavailability or interruption of operations. </span></p> + +<p><b><span style='font-size:10.0pt'>6. DISCLAIMER OF LIABILITY</span></b> </p> + +<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS +AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY +OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF +THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF +THE POSSIBILITY OF SUCH DAMAGES.</span> </p> + +<p><b><span style='font-size:10.0pt'>7. GENERAL</span></b> </p> + +<p><span style='font-size:10.0pt'>If any provision of this Agreement is invalid +or unenforceable under applicable law, it shall not affect the validity or +enforceability of the remainder of the terms of this Agreement, and without +further action by the parties hereto, such provision shall be reformed to the +minimum extent necessary to make such provision valid and enforceable.</span> </p> + +<p><span style='font-size:10.0pt'>If Recipient institutes patent litigation +against any entity (including a cross-claim or counterclaim in a lawsuit) +alleging that the Program itself (excluding combinations of the Program with +other software or hardware) infringes such Recipient's patent(s), then such +Recipient's rights granted under Section 2(b) shall terminate as of the date +such litigation is filed. </span></p> + +<p><span style='font-size:10.0pt'>All Recipient's rights under this Agreement +shall terminate if it fails to comply with any of the material terms or +conditions of this Agreement and does not cure such failure in a reasonable +period of time after becoming aware of such noncompliance. If all Recipient's +rights under this Agreement terminate, Recipient agrees to cease use and +distribution of the Program as soon as reasonably practicable. However, +Recipient's obligations under this Agreement and any licenses granted by +Recipient relating to the Program shall continue and survive. </span></p> + +<p><span style='font-size:10.0pt'>Everyone is permitted to copy and distribute +copies of this Agreement, but in order to avoid inconsistency the Agreement is +copyrighted and may only be modified in the following manner. The Agreement +Steward reserves the right to publish new versions (including revisions) of +this Agreement from time to time. No one other than the Agreement Steward has +the right to modify this Agreement. The Eclipse Foundation is the initial +Agreement Steward. The Eclipse Foundation may assign the responsibility to +serve as the Agreement Steward to a suitable separate entity. Each new version +of the Agreement will be given a distinguishing version number. The Program +(including Contributions) may always be distributed subject to the version of +the Agreement under which it was received. In addition, after a new version of +the Agreement is published, Contributor may elect to distribute the Program +(including its Contributions) under the new version. Except as expressly stated +in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to +the intellectual property of any Contributor under this Agreement, whether +expressly, by implication, estoppel or otherwise. All rights in the Program not +expressly granted under this Agreement are reserved.</span> </p> + +<p><span style='font-size:10.0pt'>This Agreement is governed by the laws of the +State of New York and the intellectual property laws of the United States of +America. No party to this Agreement will bring a legal action under this +Agreement more than one year after the cause of action arose. Each party waives +its rights to a jury trial in any resulting litigation.</span> </p> + +<p class=MsoNormal></p> + +</div> + +</body> + +</html>
\ No newline at end of file diff --git a/features/papyrus-main-features/org.eclipse.papyrus.infra.ui.feature/feature.properties b/features/papyrus-main-features/org.eclipse.papyrus.infra.ui.feature/feature.properties new file mode 100644 index 00000000000..e0e60c71b77 --- /dev/null +++ b/features/papyrus-main-features/org.eclipse.papyrus.infra.ui.feature/feature.properties @@ -0,0 +1,135 @@ +# NLS_MESSAGEFORMAT_VAR + +featureName=Papyrus Infrastructure UI +featureProvider=Eclipse Modeling Project + +# "licenseURL" property - URL of the "Feature License" +# do not translate value - just change to point to a locale-specific HTML page +licenseURL=license.html + +# "license" property - text of the "Feature Update License" +# should be plain text version of license agreement pointed to be "licenseURL" +license=\ +Eclipse Foundation Software User Agreement\n\ +April 9, 2014\n\ +\n\ +Usage Of Content\n\ +\n\ +THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR\n\ +OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\ +USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\ +AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\ +NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\n\ +AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\ +AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\ +OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\ +TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\ +OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\ +BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\ +\n\ +Applicable Licenses\n\ +\n\ +Unless otherwise indicated, all Content made available by the\n\ +Eclipse Foundation is provided to you under the terms and conditions of\n\ +the Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is\n\ +provided with this Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\ +For purposes of the EPL, "Program" will mean the Content.\n\ +\n\ +Content includes, but is not limited to, source code, object code,\n\ +documentation and other files maintained in the Eclipse Foundation source code\n\ +repository ("Repository") in software modules ("Modules") and made available\n\ +as downloadable archives ("Downloads").\n\ +\n\ +\t- Content may be structured and packaged into modules to facilitate delivering,\n\ +\t extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\ +\t plug-in fragments ("Fragments"), and features ("Features").\n\ +\t- Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java(TM) ARchive)\n\ +\t in a directory named "plugins".\n\ +\t- A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\ +\t Each Feature may be packaged as a sub-directory in a directory named "features".\n\ +\t Within a Feature, files named "feature.xml" may contain a list of the names and version\n\ +\t numbers of the Plug-ins and/or Fragments associated with that Feature.\n\ +\t- Features may also include other Features ("Included Features"). Within a Feature, files\n\ +\t named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\ +\n\ +The terms and conditions governing Plug-ins and Fragments should be\n\ +contained in files named "about.html" ("Abouts"). The terms and\n\ +conditions governing Features and Included Features should be contained\n\ +in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\ +Licenses may be located in any directory of a Download or Module\n\ +including, but not limited to the following locations:\n\ +\n\ +\t- The top-level (root) directory\n\ +\t- Plug-in and Fragment directories\n\ +\t- Inside Plug-ins and Fragments packaged as JARs\n\ +\t- Sub-directories of the directory named "src" of certain Plug-ins\n\ +\t- Feature directories\n\ +\n\ +Note: if a Feature made available by the Eclipse Foundation is installed using the\n\ +Provisioning Technology (as defined below), you must agree to a license ("Feature \n\ +Update License") during the installation process. If the Feature contains\n\ +Included Features, the Feature Update License should either provide you\n\ +with the terms and conditions governing the Included Features or inform\n\ +you where you can locate them. Feature Update Licenses may be found in\n\ +the "license" property of files named "feature.properties" found within a Feature.\n\ +Such Abouts, Feature Licenses, and Feature Update Licenses contain the\n\ +terms and conditions (or references to such terms and conditions) that\n\ +govern your use of the associated Content in that directory.\n\ +\n\ +THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER\n\ +TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\ +SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\ +\n\ +\t- Eclipse Distribution License Version 1.0 (available at http://www.eclipse.org/licenses/edl-v1.0.html)\n\ +\t- Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\ +\t- Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\ +\t- Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\ +\t- Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\ +\n\ +IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\ +TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License\n\ +is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\ +govern that particular Content.\n\ +\n\ +\n\Use of Provisioning Technology\n\ +\n\ +The Eclipse Foundation makes available provisioning software, examples of which include,\n\ +but are not limited to, p2 and the Eclipse Update Manager ("Provisioning Technology") for\n\ +the purpose of allowing users to install software, documentation, information and/or\n\ +other materials (collectively "Installable Software"). This capability is provided with\n\ +the intent of allowing such users to install, extend and update Eclipse-based products.\n\ +Information about packaging Installable Software is available at\n\ +http://eclipse.org/equinox/p2/repository_packaging.html ("Specification").\n\ +\n\ +You may use Provisioning Technology to allow other parties to install Installable Software.\n\ +You shall be responsible for enabling the applicable license agreements relating to the\n\ +Installable Software to be presented to, and accepted by, the users of the Provisioning Technology\n\ +in accordance with the Specification. By using Provisioning Technology in such a manner and\n\ +making it available in accordance with the Specification, you further acknowledge your\n\ +agreement to, and the acquisition of all necessary rights to permit the following:\n\ +\n\ +\t1. A series of actions may occur ("Provisioning Process") in which a user may execute\n\ +\t the Provisioning Technology on a machine ("Target Machine") with the intent of installing,\n\ +\t extending or updating the functionality of an Eclipse-based product.\n\ +\t2. During the Provisioning Process, the Provisioning Technology may cause third party\n\ +\t Installable Software or a portion thereof to be accessed and copied to the Target Machine.\n\ +\t3. Pursuant to the Specification, you will provide to the user the terms and conditions that\n\ +\t govern the use of the Installable Software ("Installable Software Agreement") and such\n\ +\t Installable Software Agreement shall be accessed from the Target Machine in accordance\n\ +\t with the Specification. Such Installable Software Agreement must inform the user of the\n\ +\t terms and conditions that govern the Installable Software and must solicit acceptance by\n\ +\t the end user in the manner prescribed in such Installable Software Agreement. Upon such\n\ +\t indication of agreement by the user, the provisioning Technology will complete installation\n\ +\t of the Installable Software.\n\ +\n\ +Cryptography\n\ +\n\ +Content may contain encryption software. The country in which you are\n\ +currently may have restrictions on the import, possession, and use,\n\ +and/or re-export to another country, of encryption software. BEFORE\n\ +using any encryption software, please check the country's laws,\n\ +regulations and policies concerning the import, possession, or use, and\n\ +re-export of encryption software, to see if this is permitted.\n\ +\n\ +Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.\n +########### end of license property ########################################## diff --git a/features/papyrus-main-features/org.eclipse.papyrus.infra.ui.feature/feature.xml b/features/papyrus-main-features/org.eclipse.papyrus.infra.ui.feature/feature.xml new file mode 100644 index 00000000000..064500d24e2 --- /dev/null +++ b/features/papyrus-main-features/org.eclipse.papyrus.infra.ui.feature/feature.xml @@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?><feature id="org.eclipse.papyrus.infra.ui.feature" label="%featureName" provider-name="%featureProvider" version="1.2.0.qualifier"> + + <copyright url="http://www.eclipse.org/legal/epl-v10.html"> + Copyright (c) 2012, 2016 CEA LIST, Christian W. Damus, and others. +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 +http://www.eclipse.org/legal/epl-v10.html + </copyright> + + <license url="%licenseURL"> + %license + </license> + + <plugin download-size="0" id="org.eclipse.papyrus.infra.ui" install-size="0" unpack="false" version="0.0.0"/> + + <plugin download-size="0" id="org.eclipse.papyrus.infra.ui.emf" install-size="0" unpack="false" version="0.0.0"/> + + <plugin download-size="0" id="org.eclipse.papyrus.infra.ui.resources" install-size="0" unpack="false" version="0.0.0"/> + +</feature> diff --git a/features/papyrus-main-features/org.eclipse.papyrus.infra.ui.feature/license.html b/features/papyrus-main-features/org.eclipse.papyrus.infra.ui.feature/license.html new file mode 100644 index 00000000000..c3d34c3c21e --- /dev/null +++ b/features/papyrus-main-features/org.eclipse.papyrus.infra.ui.feature/license.html @@ -0,0 +1,107 @@ +<?xml version="1.0" encoding="ISO-8859-1" ?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /> +<title>Eclipse Foundation Software User Agreement</title> +</head> + +<body lang="EN-US"> +<h2>Eclipse Foundation Software User Agreement</h2> +<p>April 9, 2014</p> + +<h3>Usage Of Content</h3> + +<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS + (COLLECTIVELY "CONTENT"). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND + CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE + OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR + NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND + CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p> + +<h3>Applicable Licenses</h3> + +<p>Unless otherwise indicated, all Content made available by the Eclipse Foundation is provided to you under the terms and conditions of the Eclipse Public License Version 1.0 + ("EPL"). A copy of the EPL is provided with this Content and is also available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>. + For purposes of the EPL, "Program" will mean the Content.</p> + +<p>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse Foundation source code + repository ("Repository") in software modules ("Modules") and made available as downloadable archives ("Downloads").</p> + +<ul> + <li>Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"), plug-in fragments ("Fragments"), and features ("Features").</li> + <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java™ ARchive) in a directory named "plugins".</li> + <li>A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material. Each Feature may be packaged as a sub-directory in a directory named "features". Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of the Plug-ins + and/or Fragments associated with that Feature.</li> + <li>Features may also include other Features ("Included Features"). Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of Included Features.</li> +</ul> + +<p>The terms and conditions governing Plug-ins and Fragments should be contained in files named "about.html" ("Abouts"). The terms and conditions governing Features and +Included Features should be contained in files named "license.html" ("Feature Licenses"). Abouts and Feature Licenses may be located in any directory of a Download or Module +including, but not limited to the following locations:</p> + +<ul> + <li>The top-level (root) directory</li> + <li>Plug-in and Fragment directories</li> + <li>Inside Plug-ins and Fragments packaged as JARs</li> + <li>Sub-directories of the directory named "src" of certain Plug-ins</li> + <li>Feature directories</li> +</ul> + +<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Provisioning Technology (as defined below), you must agree to a license ("Feature Update License") during the +installation process. If the Feature contains Included Features, the Feature Update License should either provide you with the terms and conditions governing the Included Features or +inform you where you can locate them. Feature Update Licenses may be found in the "license" property of files named "feature.properties" found within a Feature. +Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in +that directory.</p> + +<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS. SOME OF THESE +OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p> + +<ul> + <li>Eclipse Distribution License Version 1.0 (available at <a href="http://www.eclipse.org/licenses/edl-v10.html">http://www.eclipse.org/licenses/edl-v1.0.html</a>)</li> + <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li> + <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li> + <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li> + <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li> +</ul> + +<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License is provided, please +contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.</p> + + +<h3>Use of Provisioning Technology</h3> + +<p>The Eclipse Foundation makes available provisioning software, examples of which include, but are not limited to, p2 and the Eclipse + Update Manager ("Provisioning Technology") for the purpose of allowing users to install software, documentation, information and/or + other materials (collectively "Installable Software"). This capability is provided with the intent of allowing such users to + install, extend and update Eclipse-based products. Information about packaging Installable Software is available at <a + href="http://eclipse.org/equinox/p2/repository_packaging.html">http://eclipse.org/equinox/p2/repository_packaging.html</a> + ("Specification").</p> + +<p>You may use Provisioning Technology to allow other parties to install Installable Software. You shall be responsible for enabling the + applicable license agreements relating to the Installable Software to be presented to, and accepted by, the users of the Provisioning Technology + in accordance with the Specification. By using Provisioning Technology in such a manner and making it available in accordance with the + Specification, you further acknowledge your agreement to, and the acquisition of all necessary rights to permit the following:</p> + +<ol> + <li>A series of actions may occur ("Provisioning Process") in which a user may execute the Provisioning Technology + on a machine ("Target Machine") with the intent of installing, extending or updating the functionality of an Eclipse-based + product.</li> + <li>During the Provisioning Process, the Provisioning Technology may cause third party Installable Software or a portion thereof to be + accessed and copied to the Target Machine.</li> + <li>Pursuant to the Specification, you will provide to the user the terms and conditions that govern the use of the Installable + Software ("Installable Software Agreement") and such Installable Software Agreement shall be accessed from the Target + Machine in accordance with the Specification. Such Installable Software Agreement must inform the user of the terms and conditions that govern + the Installable Software and must solicit acceptance by the end user in the manner prescribed in such Installable Software Agreement. Upon such + indication of agreement by the user, the provisioning Technology will complete installation of the Installable Software.</li> +</ol> + +<h3>Cryptography</h3> + +<p>Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to + another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import, + possession, or use, and re-export of encryption software, to see if this is permitted.</p> + +<p><small>Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.</small></p> +</body> +</html> diff --git a/features/papyrus-main-features/org.eclipse.papyrus.infra.ui.feature/pom.xml b/features/papyrus-main-features/org.eclipse.papyrus.infra.ui.feature/pom.xml new file mode 100644 index 00000000000..2967468e81e --- /dev/null +++ b/features/papyrus-main-features/org.eclipse.papyrus.infra.ui.feature/pom.xml @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project> + <modelVersion>4.0.0</modelVersion> + <parent> + <artifactId>org.eclipse.papyrus.releng</artifactId> + <groupId>org.eclipse.papyrus</groupId> + <version>1.2.0-SNAPSHOT</version> + <relativePath>../../../releng/main</relativePath> + </parent> + <artifactId>org.eclipse.papyrus.infra.ui.feature</artifactId> + <groupId>org.eclipse.papyrus</groupId> + <version>1.2.0-SNAPSHOT</version> + <packaging>eclipse-feature</packaging> +</project>
\ No newline at end of file diff --git a/features/papyrus-main-features/org.eclipse.papyrus.sdk.feature/feature.xml b/features/papyrus-main-features/org.eclipse.papyrus.sdk.feature/feature.xml index 8b2748f372e..9235862b5c0 100644 --- a/features/papyrus-main-features/org.eclipse.papyrus.sdk.feature/feature.xml +++ b/features/papyrus-main-features/org.eclipse.papyrus.sdk.feature/feature.xml @@ -24,6 +24,8 @@ http://www.eclipse.org/legal/epl-v10.html <includes id="org.eclipse.papyrus.infra.services.feature" version="0.0.0"/> + <includes id="org.eclipse.papyrus.infra.ui.feature" version="0.0.0"/> + <includes id="org.eclipse.papyrus.infra.widget.feature" version="0.0.0"/> <includes id="org.eclipse.papyrus.sysml.diagram.feature" version="0.0.0"/> diff --git a/features/papyrus-tests-features/org.eclipse.papyrus.tests.infra.feature/feature.xml b/features/papyrus-tests-features/org.eclipse.papyrus.tests.infra.feature/feature.xml index b75df8562a2..6d2093e4b39 100644 --- a/features/papyrus-tests-features/org.eclipse.papyrus.tests.infra.feature/feature.xml +++ b/features/papyrus-tests-features/org.eclipse.papyrus.tests.infra.feature/feature.xml @@ -28,6 +28,8 @@ http://www.eclipse.org/legal/epl-v10.html <plugin download-size="0" id="org.eclipse.papyrus.infra.ui.tests" install-size="0" unpack="false" version="0.0.0"/> + <plugin download-size="0" id="org.eclipse.papyrus.infra.ui.emf.tests" install-size="0" unpack="false" version="0.0.0"/> + <plugin download-size="0" id="org.eclipse.papyrus.infra.gmfdiag.menu.tests" install-size="0" unpack="false" version="0.0.0"/> <plugin download-size="0" id="org.eclipse.papyrus.infra.filters.tests" install-size="0" unpack="false" version="0.0.0"/> diff --git a/plugins/customization/org.eclipse.papyrus.customization.properties.generation/META-INF/MANIFEST.MF b/plugins/customization/org.eclipse.papyrus.customization.properties.generation/META-INF/MANIFEST.MF index be5f9c7489d..8a736422f41 100644 --- a/plugins/customization/org.eclipse.papyrus.customization.properties.generation/META-INF/MANIFEST.MF +++ b/plugins/customization/org.eclipse.papyrus.customization.properties.generation/META-INF/MANIFEST.MF @@ -29,7 +29,8 @@ Require-Bundle: org.eclipse.ui;bundle-version="3.6.1", org.eclipse.papyrus.infra.emf;bundle-version="1.2.0",
org.eclipse.jface.databinding;bundle-version="1.6.200",
org.eclipse.papyrus.emf.facet.custom.core;bundle-version="1.2.0",
- org.eclipse.papyrus.emf.facet.custom.ui;bundle-version="1.2.0"
+ org.eclipse.papyrus.emf.facet.custom.ui;bundle-version="1.2.0",
+ org.eclipse.papyrus.infra.ui.emf;bundle-version="1.2.0"
Bundle-Vendor: %Bundle-Vendor
Bundle-ActivationPolicy: lazy
Bundle-ClassPath: .,
diff --git a/plugins/customization/org.eclipse.papyrus.customization.properties/META-INF/MANIFEST.MF b/plugins/customization/org.eclipse.papyrus.customization.properties/META-INF/MANIFEST.MF index b28b913d547..64c06e09cf0 100644 --- a/plugins/customization/org.eclipse.papyrus.customization.properties/META-INF/MANIFEST.MF +++ b/plugins/customization/org.eclipse.papyrus.customization.properties/META-INF/MANIFEST.MF @@ -21,7 +21,8 @@ Require-Bundle: org.eclipse.core.runtime, org.eclipse.papyrus.infra.services.labelprovider;bundle-version="1.2.0",
org.eclipse.papyrus.emf.facet.custom.ui;bundle-version="1.2.0",
org.eclipse.papyrus.emf.facet.custom.core;bundle-version="1.2.0",
- org.eclipse.papyrus.emf.facet.query.java.core;bundle-version="1.2.0"
+ org.eclipse.papyrus.emf.facet.query.java.core;bundle-version="1.2.0",
+ org.eclipse.papyrus.infra.ui.emf;bundle-version="1.2.0"
Bundle-Vendor: %Bundle-Vendor
Bundle-ActivationPolicy: lazy
Bundle-ClassPath: .,
diff --git a/plugins/customization/org.eclipse.papyrus.customization.properties/src/org/eclipse/papyrus/customization/properties/modelelement/CustomizationModelElement.java b/plugins/customization/org.eclipse.papyrus.customization.properties/src/org/eclipse/papyrus/customization/properties/modelelement/CustomizationModelElement.java index f53f3f88b25..75fc5283a86 100644 --- a/plugins/customization/org.eclipse.papyrus.customization.properties/src/org/eclipse/papyrus/customization/properties/modelelement/CustomizationModelElement.java +++ b/plugins/customization/org.eclipse.papyrus.customization.properties/src/org/eclipse/papyrus/customization/properties/modelelement/CustomizationModelElement.java @@ -32,9 +32,9 @@ import org.eclipse.papyrus.customization.properties.providers.PropertyEditorType import org.eclipse.papyrus.customization.properties.providers.TabContentProvider;
import org.eclipse.papyrus.infra.constraints.ConstraintsPackage;
import org.eclipse.papyrus.infra.constraints.providers.ConstraintTypeContentProvider;
-import org.eclipse.papyrus.infra.emf.providers.EMFGraphicalContentProvider;
-import org.eclipse.papyrus.infra.emf.providers.strategy.ContainmentBrowseStrategy;
import org.eclipse.papyrus.infra.emf.utils.EMFHelper;
+import org.eclipse.papyrus.infra.ui.emf.providers.EMFGraphicalContentProvider;
+import org.eclipse.papyrus.infra.ui.emf.providers.strategy.ContainmentBrowseStrategy;
import org.eclipse.papyrus.infra.widgets.creation.ReferenceValueFactory;
import org.eclipse.papyrus.infra.widgets.providers.EmptyContentProvider;
import org.eclipse.papyrus.infra.widgets.providers.IStaticContentProvider;
diff --git a/plugins/customization/org.eclipse.papyrus.customization.properties/src/org/eclipse/papyrus/customization/properties/modelelement/SectionNameObservableValue.java b/plugins/customization/org.eclipse.papyrus.customization.properties/src/org/eclipse/papyrus/customization/properties/modelelement/SectionNameObservableValue.java index 965c3a087a8..eea6ec478da 100644 --- a/plugins/customization/org.eclipse.papyrus.customization.properties/src/org/eclipse/papyrus/customization/properties/modelelement/SectionNameObservableValue.java +++ b/plugins/customization/org.eclipse.papyrus.customization.properties/src/org/eclipse/papyrus/customization/properties/modelelement/SectionNameObservableValue.java @@ -20,7 +20,7 @@ import org.eclipse.emf.ecore.resource.Resource; import org.eclipse.emf.ecore.resource.ResourceSet;
import org.eclipse.emf.edit.command.SetCommand;
import org.eclipse.emf.edit.domain.EditingDomain;
-import org.eclipse.papyrus.infra.emf.databinding.EMFObservableValue;
+import org.eclipse.papyrus.infra.ui.emf.databinding.EMFObservableValue;
import org.eclipse.papyrus.views.properties.contexts.ContextsPackage;
import org.eclipse.papyrus.views.properties.contexts.Section;
diff --git a/plugins/customization/org.eclipse.papyrus.customization.properties/src/org/eclipse/papyrus/customization/properties/providers/AbstractContextualContentProvider.java b/plugins/customization/org.eclipse.papyrus.customization.properties/src/org/eclipse/papyrus/customization/properties/providers/AbstractContextualContentProvider.java index d4e2a00be41..0957d66017b 100644 --- a/plugins/customization/org.eclipse.papyrus.customization.properties/src/org/eclipse/papyrus/customization/properties/providers/AbstractContextualContentProvider.java +++ b/plugins/customization/org.eclipse.papyrus.customization.properties/src/org/eclipse/papyrus/customization/properties/providers/AbstractContextualContentProvider.java @@ -1,5 +1,5 @@ /*****************************************************************************
- * Copyright (c) 2010 CEA LIST.
+ * Copyright (c) 2010, 2016 CEA LIST, Christian W. Damus, and others.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
@@ -8,6 +8,8 @@ *
* Contributors:
* Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ * Christian W. Damus - bug 485220
+ *
*****************************************************************************/
package org.eclipse.papyrus.customization.properties.providers;
@@ -17,8 +19,9 @@ import java.util.List; import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.papyrus.infra.emf.providers.strategy.SemanticEMFContentProvider;
import org.eclipse.papyrus.infra.tools.util.ListHelper;
+import org.eclipse.papyrus.infra.ui.emf.providers.strategy.SemanticEMFContentProvider;
+import org.eclipse.papyrus.infra.ui.emf.utils.ProviderHelper;
import org.eclipse.papyrus.infra.widgets.providers.IStaticContentProvider;
import org.eclipse.papyrus.views.properties.contexts.Context;
import org.eclipse.papyrus.views.properties.util.PropertiesUtil;
@@ -46,7 +49,7 @@ public abstract class AbstractContextualContentProvider extends SemanticEMFConte * The EObject used to retrieve the available contexts
*/
protected AbstractContextualContentProvider(EObject source) {
- super(findContexts(source).toArray(new Context[0]), org.eclipse.papyrus.infra.emf.Activator.getDefault().getCustomizationManager());
+ super(findContexts(source).toArray(new Context[0]), ProviderHelper.getCustomizationManager());
contexts = ListHelper.asList((Context[]) roots);
}
diff --git a/plugins/customization/org.eclipse.papyrus.customization.properties/src/org/eclipse/papyrus/customization/properties/providers/ContextContentProvider.java b/plugins/customization/org.eclipse.papyrus.customization.properties/src/org/eclipse/papyrus/customization/properties/providers/ContextContentProvider.java index c7c5f0e1e67..b27d37a50c4 100644 --- a/plugins/customization/org.eclipse.papyrus.customization.properties/src/org/eclipse/papyrus/customization/properties/providers/ContextContentProvider.java +++ b/plugins/customization/org.eclipse.papyrus.customization.properties/src/org/eclipse/papyrus/customization/properties/providers/ContextContentProvider.java @@ -1,5 +1,5 @@ /*****************************************************************************
- * Copyright (c) 2010 CEA LIST.
+ * Copyright (c) 2010, 2016 CEA LIST, Christian W. Damus, and others.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
@@ -8,6 +8,8 @@ *
* Contributors:
* Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ * Christian W. Damus - bug 485220
+ *
*****************************************************************************/
package org.eclipse.papyrus.customization.properties.providers;
@@ -17,6 +19,7 @@ import java.util.Set; import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.resource.ResourceSet;
import org.eclipse.papyrus.emf.facet.custom.ui.internal.CustomizedTreeContentProvider;
+import org.eclipse.papyrus.infra.ui.emf.utils.ProviderHelper;
import org.eclipse.papyrus.views.properties.contexts.Context;
import org.eclipse.papyrus.views.properties.util.PropertiesUtil;
@@ -32,7 +35,7 @@ public class ContextContentProvider extends CustomizedTreeContentProvider { * Constructor.
*/
public ContextContentProvider() {
- super(org.eclipse.papyrus.infra.emf.Activator.getDefault().getCustomizationManager());
+ super(ProviderHelper.getCustomizationManager());
}
/**
diff --git a/plugins/customization/org.eclipse.papyrus.customization.properties/src/org/eclipse/papyrus/customization/properties/providers/ContextLabelProvider.java b/plugins/customization/org.eclipse.papyrus.customization.properties/src/org/eclipse/papyrus/customization/properties/providers/ContextLabelProvider.java index cfb09185180..54270175f5c 100644 --- a/plugins/customization/org.eclipse.papyrus.customization.properties/src/org/eclipse/papyrus/customization/properties/providers/ContextLabelProvider.java +++ b/plugins/customization/org.eclipse.papyrus.customization.properties/src/org/eclipse/papyrus/customization/properties/providers/ContextLabelProvider.java @@ -1,5 +1,5 @@ /*****************************************************************************
- * Copyright (c) 2010 CEA LIST.
+ * Copyright (c) 2010, 2016 CEA LIST, Christian W. Damus, and others.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
@@ -8,6 +8,8 @@ *
* Contributors:
* Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ * Christian W. Damus - bug 485220
+ *
*****************************************************************************/
package org.eclipse.papyrus.customization.properties.providers;
@@ -16,6 +18,7 @@ import org.eclipse.papyrus.customization.properties.Activator; import org.eclipse.papyrus.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.EObjectTreeElement;
import org.eclipse.papyrus.emf.facet.custom.ui.internal.DecoratingCustomizedLabelProvider;
import org.eclipse.papyrus.emf.facet.custom.ui.internal.ResolvingCustomizedLabelProvider;
+import org.eclipse.papyrus.infra.ui.emf.utils.ProviderHelper;
import org.eclipse.swt.graphics.Image;
/**
@@ -30,14 +33,14 @@ public class ContextLabelProvider extends ResolvingCustomizedLabelProvider { * Constructor.
*/
public ContextLabelProvider() {
- super(new DecoratingCustomizedLabelProvider(org.eclipse.papyrus.infra.emf.Activator.getDefault().getCustomizationManager()));
+ super(new DecoratingCustomizedLabelProvider(ProviderHelper.getCustomizationManager()));
}
@Override
public String getText(Object element) {
if (!(element instanceof EObjectTreeElement) && element instanceof EObject) {
try {
- // Method method = CustomizationManager.class.getDeclaredMethod("getAppearanceConfiguration");//$NON-NLS-1$
+ // Method method = CustomizationManager.class.getDeclaredMethod("getAppearanceConfiguration");//$NON-NLS-1$
// method.setAccessible(true);
// AppearanceConfiguration result = (AppearanceConfiguration)method.invoke(Activator.getDefault().getCustomizationManager());
// ITreeElement treeElement = new ModelElementItem((EObject)element, null, result);
@@ -69,7 +72,7 @@ public class ContextLabelProvider extends ResolvingCustomizedLabelProvider { public Image getImage(Object element) {
if (!(element instanceof EObjectTreeElement) && element instanceof EObject) {
try {
- // Method method = CustomizationManager.class.getDeclaredMethod("getAppearanceConfiguration");//$NON-NLS-1$
+ // Method method = CustomizationManager.class.getDeclaredMethod("getAppearanceConfiguration");//$NON-NLS-1$
// method.setAccessible(true);
// AppearanceConfiguration result = (AppearanceConfiguration)method.invoke(Activator.getDefault().getCustomizationManager());
// ITreeElement treeElement = new ModelElementItem((EObject)element, null, result);
diff --git a/plugins/customization/org.eclipse.papyrus.customization.properties/src/org/eclipse/papyrus/customization/properties/providers/EnvironmentContentProvider.java b/plugins/customization/org.eclipse.papyrus.customization.properties/src/org/eclipse/papyrus/customization/properties/providers/EnvironmentContentProvider.java index 9dbbfe7eccb..0c0985435d3 100644 --- a/plugins/customization/org.eclipse.papyrus.customization.properties/src/org/eclipse/papyrus/customization/properties/providers/EnvironmentContentProvider.java +++ b/plugins/customization/org.eclipse.papyrus.customization.properties/src/org/eclipse/papyrus/customization/properties/providers/EnvironmentContentProvider.java @@ -1,5 +1,5 @@ /*****************************************************************************
- * Copyright (c) 2010 CEA LIST.
+ * Copyright (c) 2010, 2016 CEA LIST, Christian W. Damus, and others.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
@@ -8,6 +8,8 @@ *
* Contributors:
* Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ * Christian W. Damus - bug 485220
+ *
*****************************************************************************/
package org.eclipse.papyrus.customization.properties.providers;
@@ -18,7 +20,8 @@ import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EStructuralFeature;
import org.eclipse.papyrus.customization.properties.Activator;
-import org.eclipse.papyrus.infra.emf.providers.strategy.SemanticEMFContentProvider;
+import org.eclipse.papyrus.infra.ui.emf.providers.strategy.SemanticEMFContentProvider;
+import org.eclipse.papyrus.infra.ui.emf.utils.ProviderHelper;
import org.eclipse.papyrus.infra.widgets.providers.IStaticContentProvider;
import org.eclipse.papyrus.views.properties.environment.Environment;
import org.eclipse.papyrus.views.properties.runtime.ConfigurationManager;
@@ -38,7 +41,7 @@ public class EnvironmentContentProvider extends SemanticEMFContentProvider imple * different environments.
*/
public EnvironmentContentProvider(EStructuralFeature feature) {
- super(null, feature, getRoots(feature), org.eclipse.papyrus.infra.emf.Activator.getDefault().getCustomizationManager());
+ super(null, feature, getRoots(feature), ProviderHelper.getCustomizationManager());
}
private static EObject[] getRoots(EStructuralFeature feature) {
diff --git a/plugins/customization/org.eclipse.papyrus.customization.properties/src/org/eclipse/papyrus/customization/properties/providers/PropertyEditorTypeContentProvider.java b/plugins/customization/org.eclipse.papyrus.customization.properties/src/org/eclipse/papyrus/customization/properties/providers/PropertyEditorTypeContentProvider.java index 43d55dfa0fb..4e76beac33a 100644 --- a/plugins/customization/org.eclipse.papyrus.customization.properties/src/org/eclipse/papyrus/customization/properties/providers/PropertyEditorTypeContentProvider.java +++ b/plugins/customization/org.eclipse.papyrus.customization.properties/src/org/eclipse/papyrus/customization/properties/providers/PropertyEditorTypeContentProvider.java @@ -13,7 +13,7 @@ package org.eclipse.papyrus.customization.properties.providers; import org.eclipse.jface.viewers.IStructuredContentProvider;
import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.papyrus.infra.emf.providers.EMFGraphicalContentProvider;
+import org.eclipse.papyrus.infra.ui.emf.providers.EMFGraphicalContentProvider;
import org.eclipse.papyrus.infra.widgets.editors.AbstractEditor;
import org.eclipse.papyrus.infra.widgets.editors.BooleanToggle;
import org.eclipse.papyrus.infra.widgets.editors.ICommitListener;
diff --git a/plugins/developer/org.eclipse.papyrus.uml.developer.mde/src/org/eclipse/papyrus/uml/developper/mde/handler/IDMAbstractHandler.java b/plugins/developer/org.eclipse.papyrus.uml.developer.mde/src/org/eclipse/papyrus/uml/developper/mde/handler/IDMAbstractHandler.java index bd09f994fc3..b642e8a4c45 100644 --- a/plugins/developer/org.eclipse.papyrus.uml.developer.mde/src/org/eclipse/papyrus/uml/developper/mde/handler/IDMAbstractHandler.java +++ b/plugins/developer/org.eclipse.papyrus.uml.developer.mde/src/org/eclipse/papyrus/uml/developper/mde/handler/IDMAbstractHandler.java @@ -35,8 +35,8 @@ import org.eclipse.jface.viewers.ISelection; import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.papyrus.editor.PapyrusMultiDiagramEditor;
import org.eclipse.papyrus.infra.emf.utils.EMFHelper;
-import org.eclipse.papyrus.infra.emf.utils.ServiceUtilsForHandlers;
import org.eclipse.papyrus.infra.ui.editor.IMultiDiagramEditor;
+import org.eclipse.papyrus.infra.ui.util.ServiceUtilsForHandlers;
import org.eclipse.ui.ISelectionService;
import org.eclipse.ui.PlatformUI;
import org.eclipse.uml2.uml.Element;
diff --git a/plugins/infra/emf/org.eclipse.papyrus.infra.emf.diagram.common/src/org/eclipse/papyrus/infra/emf/diagram/common/handler/CreateDiagramHandler.java b/plugins/infra/emf/org.eclipse.papyrus.infra.emf.diagram.common/src/org/eclipse/papyrus/infra/emf/diagram/common/handler/CreateDiagramHandler.java index 65cc2685b15..ae4978c24d0 100644 --- a/plugins/infra/emf/org.eclipse.papyrus.infra.emf.diagram.common/src/org/eclipse/papyrus/infra/emf/diagram/common/handler/CreateDiagramHandler.java +++ b/plugins/infra/emf/org.eclipse.papyrus.infra.emf.diagram.common/src/org/eclipse/papyrus/infra/emf/diagram/common/handler/CreateDiagramHandler.java @@ -27,9 +27,9 @@ import org.eclipse.papyrus.infra.core.sashwindows.di.service.IPageManager; import org.eclipse.papyrus.infra.core.services.ServiceException;
import org.eclipse.papyrus.infra.core.services.ServicesRegistry;
import org.eclipse.papyrus.infra.core.utils.ServiceUtils;
-import org.eclipse.papyrus.infra.emf.utils.ServiceUtilsForHandlers;
import org.eclipse.papyrus.infra.gmfdiag.common.model.NotationUtils;
import org.eclipse.papyrus.infra.ui.extension.diagrameditor.IPluggableEditorFactory;
+import org.eclipse.papyrus.infra.ui.util.ServiceUtilsForHandlers;
/**
* Base class for create diagram Handlers.
diff --git a/plugins/infra/emf/org.eclipse.papyrus.infra.emf.readonly/.classpath b/plugins/infra/emf/org.eclipse.papyrus.infra.emf.readonly/.classpath index 2d1a4302f04..eca7bdba8f0 100644 --- a/plugins/infra/emf/org.eclipse.papyrus.infra.emf.readonly/.classpath +++ b/plugins/infra/emf/org.eclipse.papyrus.infra.emf.readonly/.classpath @@ -1,7 +1,7 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
+<?xml version="1.0" encoding="UTF-8"?> +<classpath> + <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/> + <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> + <classpathentry kind="src" path="src"/> + <classpathentry kind="output" path="bin"/> +</classpath> diff --git a/plugins/infra/emf/org.eclipse.papyrus.infra.emf.readonly/.settings/org.eclipse.jdt.core.prefs b/plugins/infra/emf/org.eclipse.papyrus.infra.emf.readonly/.settings/org.eclipse.jdt.core.prefs index 4759947300a..62a08f4494d 100644 --- a/plugins/infra/emf/org.eclipse.papyrus.infra.emf.readonly/.settings/org.eclipse.jdt.core.prefs +++ b/plugins/infra/emf/org.eclipse.papyrus.infra.emf.readonly/.settings/org.eclipse.jdt.core.prefs @@ -1,10 +1,10 @@ eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
-org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.5
+org.eclipse.jdt.core.compiler.source=1.8
org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
diff --git a/plugins/infra/emf/org.eclipse.papyrus.infra.emf.readonly/META-INF/MANIFEST.MF b/plugins/infra/emf/org.eclipse.papyrus.infra.emf.readonly/META-INF/MANIFEST.MF index 5f652aca106..ea8d0941c57 100644 --- a/plugins/infra/emf/org.eclipse.papyrus.infra.emf.readonly/META-INF/MANIFEST.MF +++ b/plugins/infra/emf/org.eclipse.papyrus.infra.emf.readonly/META-INF/MANIFEST.MF @@ -1,18 +1,17 @@ Manifest-Version: 1.0
Export-Package: org.eclipse.papyrus.infra.emf.readonly,
- org.eclipse.papyrus.infra.emf.readonly.handlers
+ org.eclipse.papyrus.infra.emf.readonly.internal;x-friends:="org.eclipse.papyrus.infra.ui.emf",
+ org.eclipse.papyrus.infra.emf.readonly.spi
Require-Bundle: org.eclipse.papyrus.infra.onefile;bundle-version="1.2.0",
org.eclipse.core.expressions;bundle-version="3.4.300",
org.eclipse.emf.workspace;bundle-version="1.4.0",
org.eclipse.gmf.runtime.common.core;bundle-version="1.4.1",
- org.eclipse.ui,
org.eclipse.papyrus.infra.core.log;bundle-version="1.2.0",
org.eclipse.papyrus.infra.gmfdiag.commands;bundle-version="1.2.0",
org.eclipse.papyrus.infra.core;bundle-version="1.2.0",
org.eclipse.papyrus.infra.emf;bundle-version="1.2.0",
com.google.guava;bundle-version="11.0.0",
- org.eclipse.papyrus.infra.tools;bundle-version="1.2.0",
- org.eclipse.papyrus.infra.ui;bundle-version="1.2.0"
+ org.eclipse.papyrus.infra.tools;bundle-version="1.2.0"
Bundle-Vendor: %providerName
Bundle-ActivationPolicy: lazy
Bundle-Version: 1.2.0.qualifier
@@ -21,4 +20,4 @@ Bundle-Localization: plugin Bundle-ManifestVersion: 2
Bundle-Activator: org.eclipse.papyrus.infra.emf.readonly.Activator
Bundle-SymbolicName: org.eclipse.papyrus.infra.emf.readonly;singleton:=true
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Bundle-RequiredExecutionEnvironment: JavaSE-1.8
diff --git a/plugins/infra/emf/org.eclipse.papyrus.infra.emf.readonly/build.properties b/plugins/infra/emf/org.eclipse.papyrus.infra.emf.readonly/build.properties index f4a44a8a2a1..89c53054ee2 100644 --- a/plugins/infra/emf/org.eclipse.papyrus.infra.emf.readonly/build.properties +++ b/plugins/infra/emf/org.eclipse.papyrus.infra.emf.readonly/build.properties @@ -5,6 +5,5 @@ bin.includes = META-INF/,\ plugin.xml,\
plugin.properties,\
about.html,\
- schema/,\
- icons/
+ schema/
src.includes = about.html
diff --git a/plugins/infra/emf/org.eclipse.papyrus.infra.emf.readonly/plugin.xml b/plugins/infra/emf/org.eclipse.papyrus.infra.emf.readonly/plugin.xml index 3d9bc8ca18f..9d985cdebac 100644 --- a/plugins/infra/emf/org.eclipse.papyrus.infra.emf.readonly/plugin.xml +++ b/plugins/infra/emf/org.eclipse.papyrus.infra.emf.readonly/plugin.xml @@ -5,22 +5,6 @@ <extension
point="org.eclipse.papyrus.infra.emf.readonly.readOnlyHandler">
<readOnlyHandler
- class="org.eclipse.papyrus.infra.emf.readonly.ReferencedModelReadOnlyHandler"
- id="org.eclipse.papyrus.infra.emf.readonly.ReferencedModelReadOnlyHandler"
- priority="15">
- <affinity
- axis="discretion">
- </affinity>
- </readOnlyHandler>
- <readOnlyHandler
- class="org.eclipse.papyrus.infra.emf.readonly.FSReadOnlyHandler"
- id="org.eclipse.papyrus.infra.emf.readonly.FSReadOnlyHandler"
- priority="10">
- <affinity
- axis="permission">
- </affinity>
- </readOnlyHandler>
- <readOnlyHandler
class="org.eclipse.papyrus.infra.emf.readonly.EMFReadOnlyHandler"
id="org.eclipse.papyrus.infra.emf.readonly.EMFReadOnlyHandler"
priority="5">
@@ -36,84 +20,6 @@ </affinity>
</readOnlyHandler>
</extension>
- <extension
- point="org.eclipse.ui.handlers">
- <handler
- class="org.eclipse.papyrus.infra.emf.readonly.handlers.EnableWriteCommandHandler"
- commandId="org.eclipse.papyrus.infra.emf.readonly.EnableWriteCommand">
- <enabledWhen>
- <and>
- <with variable="activeEditorId">
- <equals value="org.eclipse.papyrus.infra.core.papyrusEditor"/>
- </with>
- <with
- variable="selection">
- <test
- property="org.eclipse.papyrus.infra.emf.readonly.tester.isReadOnly"
- value="true">
- </test>
- <count
- value="1">
- </count>
- </with>
- </and>
- </enabledWhen>
- </handler>
- </extension>
- <extension
- point="org.eclipse.ui.commands">
- <command
- description="Enable write"
- categoryId="org.eclipse.papyrus.editor.category"
- id="org.eclipse.papyrus.infra.emf.readonly.EnableWriteCommand"
- name="Enable write">
- </command>
- </extension>
-
-<extension
- point="org.eclipse.ui.menus">
-
- <menuContribution
- allPopups="false"
- locationURI="popup:org.eclipse.papyrus.views.modelexplorer.modelexplorer.popup?after=tools">
- <command commandId="org.eclipse.papyrus.infra.emf.readonly.EnableWriteCommand"
- icon="icons/enable_write.png"
- label="Enable write"
- style="push"
- tooltip="Enable write">
- <visibleWhen>
- <reference definitionId="org.eclipse.papyrus.uml.diagram.common.IsPapyrusActiveWithUMLModel"/>
- </visibleWhen>
- </command>
- </menuContribution>
-
- <menuContribution locationURI="popup:org.eclipse.gmf.runtime.diagram.ui.DiagramEditorContextMenu?endof=fileMenu"
- allPopups="false">
- <command commandId="org.eclipse.papyrus.infra.emf.readonly.EnableWriteCommand"
- icon="icons/enable_write.png"
- label="Enable write"
- style="push"
- tooltip="Enable write">
- <visibleWhen>
- <reference definitionId="org.eclipse.papyrus.uml.diagram.common.IsPapyrusActiveWithUMLModel"/>
- </visibleWhen>
- </command>
- </menuContribution>
-
- <menuContribution locationURI="toolbar:org.eclipse.ui.main.toolbar?after=additions">
- <toolbar id="org.eclipse.papyrus.infra.emf.readonly.toolbar">
- <command commandId="org.eclipse.papyrus.infra.emf.readonly.EnableWriteCommand"
- icon="icons/enable_write.png"
- label="Enable write"
- style="push"
- tooltip="Enable write">
- <visibleWhen>
- <reference definitionId="org.eclipse.papyrus.uml.diagram.common.IsPapyrusActiveWithUMLModel"/>
- </visibleWhen>
- </command>
- </toolbar>
- </menuContribution>
- </extension>
<extension
point="org.eclipse.papyrus.infra.core.transactionalEditingDomainProvider">
<transactionalEditingDomainProvider
@@ -128,7 +34,7 @@ id="org.eclipse.papyrus.infra.emf.readonly.tester"
namespace="org.eclipse.papyrus.infra.emf.readonly.tester"
properties="isReadOnly,canMakeWritable"
- type="org.eclipse.jface.viewers.IStructuredSelection">
+ type="org.eclipse.emf.ecore.EObject">
</propertyTester>
</extension>
<extension
diff --git a/plugins/infra/emf/org.eclipse.papyrus.infra.emf.readonly/src/org/eclipse/papyrus/infra/emf/readonly/Activator.java b/plugins/infra/emf/org.eclipse.papyrus.infra.emf.readonly/src/org/eclipse/papyrus/infra/emf/readonly/Activator.java index eebb9793f98..5edfee6fab2 100644 --- a/plugins/infra/emf/org.eclipse.papyrus.infra.emf.readonly/src/org/eclipse/papyrus/infra/emf/readonly/Activator.java +++ b/plugins/infra/emf/org.eclipse.papyrus.infra.emf.readonly/src/org/eclipse/papyrus/infra/emf/readonly/Activator.java @@ -14,13 +14,17 @@ *****************************************************************************/
package org.eclipse.papyrus.infra.emf.readonly;
+import java.util.Arrays;
+import java.util.Collections;
import java.util.concurrent.Executor;
import org.eclipse.core.runtime.Plugin;
import org.eclipse.papyrus.infra.core.log.LogHelper;
import org.eclipse.papyrus.infra.core.resource.AbstractReadOnlyHandler;
+import org.eclipse.papyrus.infra.emf.readonly.spi.IReadOnlyManagerProcessor;
import org.eclipse.papyrus.infra.tools.util.CoreExecutors;
import org.osgi.framework.BundleContext;
+import org.osgi.util.tracker.ServiceTracker;
/**
* The activator class controls the plug-in life cycle
@@ -37,8 +41,12 @@ public class Activator extends Plugin { public static LogHelper log;
+ private static final IReadOnlyManagerProcessor[] NO_PROCESSORS = {};
+
private Executor readOnlyCacheExecutor;
+ private ServiceTracker<IReadOnlyManagerProcessor, IReadOnlyManagerProcessor> roManagerProcessorTracker;
+
/**
* The constructor
*/
@@ -50,10 +58,16 @@ public class Activator extends Plugin { super.start(context);
plugin = this;
log = new LogHelper(this);
+
+ roManagerProcessorTracker = new ServiceTracker<>(context, IReadOnlyManagerProcessor.class, null);
+ roManagerProcessorTracker.open();
}
@Override
public void stop(BundleContext context) throws Exception {
+ roManagerProcessorTracker.close();
+ roManagerProcessorTracker = null;
+
plugin = null;
super.stop(context);
}
@@ -97,4 +111,10 @@ public class Activator extends Plugin { return result;
}
+
+ Iterable<IReadOnlyManagerProcessor> getReadOnlyManagerProcessors() {
+ IReadOnlyManagerProcessor[] processors = roManagerProcessorTracker.getServices(NO_PROCESSORS);
+
+ return (processors == null) ? Collections.emptyList() : Arrays.asList(processors);
+ }
}
diff --git a/plugins/infra/emf/org.eclipse.papyrus.infra.emf.readonly/src/org/eclipse/papyrus/infra/emf/readonly/PapyrusROTransactionalEditingDomain.java b/plugins/infra/emf/org.eclipse.papyrus.infra.emf.readonly/src/org/eclipse/papyrus/infra/emf/readonly/PapyrusROTransactionalEditingDomain.java index b8423baf54d..80912555eb0 100644 --- a/plugins/infra/emf/org.eclipse.papyrus.infra.emf.readonly/src/org/eclipse/papyrus/infra/emf/readonly/PapyrusROTransactionalEditingDomain.java +++ b/plugins/infra/emf/org.eclipse.papyrus.infra.emf.readonly/src/org/eclipse/papyrus/infra/emf/readonly/PapyrusROTransactionalEditingDomain.java @@ -61,6 +61,7 @@ import org.eclipse.papyrus.infra.core.resource.ResourceAdapter; import org.eclipse.papyrus.infra.core.resource.RollbackStatus;
import org.eclipse.papyrus.infra.core.utils.TransactionHelper;
import org.eclipse.papyrus.infra.emf.edit.domain.PapyrusTransactionalEditingDomain;
+import org.eclipse.papyrus.infra.emf.readonly.internal.ControlledResourceTracker;
import org.eclipse.papyrus.infra.onefile.model.IPapyrusFile;
import org.eclipse.papyrus.infra.onefile.model.PapyrusModelHelper;
import org.eclipse.papyrus.infra.onefile.utils.OneFileUtils;
diff --git a/plugins/infra/emf/org.eclipse.papyrus.infra.emf.readonly/src/org/eclipse/papyrus/infra/emf/readonly/ReadOnlyManager.java b/plugins/infra/emf/org.eclipse.papyrus.infra.emf.readonly/src/org/eclipse/papyrus/infra/emf/readonly/ReadOnlyManager.java index 1377317e949..83d35ab9af5 100644 --- a/plugins/infra/emf/org.eclipse.papyrus.infra.emf.readonly/src/org/eclipse/papyrus/infra/emf/readonly/ReadOnlyManager.java +++ b/plugins/infra/emf/org.eclipse.papyrus.infra.emf.readonly/src/org/eclipse/papyrus/infra/emf/readonly/ReadOnlyManager.java @@ -1,6 +1,5 @@ /*****************************************************************************
- * Copyright (c) 2011, 2015 Atos Origin, CEA, Christian W. Damus, and others.
- *
+ * Copyright (c) 2011, 2016 Atos Origin, CEA, Christian W. Damus, and others.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
@@ -10,12 +9,8 @@ * Contributors:
* Mathieu Velten (Atos Origin) mathieu.velten@atosorigin.com - Initial API and implementation
* Christian W. Damus (CEA) - support non-IFile resources and object-level permissions (CDO)
- * Christian W. Damus (CEA) - bug 323802
- * Christian W. Damus (CEA) - bug 429826
- * Christian W. Damus (CEA) - bug 422257
- * Christian W. Damus (CEA) - bug 437217
- * Christian W. Damus - bug 457560
- * Christian W. Damus - bug 463564
+ * Christian W. Damus (CEA) - bugs 323802, 429826, 422257, 437217
+ * Christian W. Damus - bugs 457560, 463564, 485220
*
*****************************************************************************/
package org.eclipse.papyrus.infra.emf.readonly;
@@ -24,6 +19,7 @@ import static org.eclipse.papyrus.infra.core.resource.ReadOnlyAxis.permissionAxe import java.lang.reflect.Constructor;
import java.util.ArrayList;
+import java.util.Collection;
import java.util.Collections;
import java.util.EnumMap;
import java.util.EnumSet;
@@ -41,29 +37,20 @@ import org.eclipse.core.runtime.Platform; import org.eclipse.emf.common.util.URI;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.edit.domain.EditingDomain;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
import org.eclipse.papyrus.infra.core.resource.AbstractReadOnlyHandler;
import org.eclipse.papyrus.infra.core.resource.IReadOnlyHandler;
import org.eclipse.papyrus.infra.core.resource.IReadOnlyHandler2;
import org.eclipse.papyrus.infra.core.resource.IReadOnlyListener;
import org.eclipse.papyrus.infra.core.resource.ReadOnlyAxis;
import org.eclipse.papyrus.infra.core.resource.ReadOnlyEvent;
-import org.eclipse.papyrus.infra.core.services.ServiceException;
-import org.eclipse.papyrus.infra.core.utils.AdapterUtils;
-import org.eclipse.papyrus.infra.emf.utils.ServiceUtilsForResourceSet;
-import org.eclipse.papyrus.infra.ui.editor.IMultiDiagramEditor;
-import org.eclipse.papyrus.infra.ui.editor.IReloadableEditor;
-import org.eclipse.papyrus.infra.ui.editor.reload.EditorReloadEvent;
-import org.eclipse.papyrus.infra.ui.editor.reload.IEditorReloadListener;
-import org.eclipse.papyrus.infra.ui.editor.reload.IReloadContextProvider;
import com.google.common.base.Optional;
import com.google.common.collect.ImmutableSet;
+import com.google.common.collect.Lists;
import com.google.common.collect.MapMaker;
-import com.google.common.collect.Maps;
-public class ReadOnlyManager implements IReadOnlyHandler2, IEditorReloadListener {
+public class ReadOnlyManager implements IReadOnlyHandler2 {
// Use weak values because the values otherwise retain the keys (indirectly)
protected static final ConcurrentMap<EditingDomain, IReadOnlyHandler2> roHandlers = new MapMaker().weakKeys().weakValues().makeMap();
@@ -81,6 +68,7 @@ public class ReadOnlyManager implements IReadOnlyHandler2, IEditorReloadListener roHandler = roHandlers.get(editingDomain);
if (roHandler == null) {
roHandler = new ReadOnlyManager(editingDomain);
+ process((ReadOnlyManager) roHandler, editingDomain);
IReadOnlyHandler2 existing = roHandlers.putIfAbsent(editingDomain, roHandler);
if (existing != null) {
// Another thread beat us to it since we checked for an existing instance
@@ -93,6 +81,10 @@ public class ReadOnlyManager implements IReadOnlyHandler2, IEditorReloadListener return roHandler;
}
+ private static void process(ReadOnlyManager manager, EditingDomain domain) {
+ Activator.getDefault().getReadOnlyManagerProcessors().forEach(p -> p.processReadOnlyManager(manager, domain));
+ }
+
protected static class HandlerPriorityPair implements Comparable<HandlerPriorityPair> {
public Class<?> handlerClass;
@@ -101,6 +93,7 @@ public class ReadOnlyManager implements IReadOnlyHandler2, IEditorReloadListener public Set<ReadOnlyAxis> axes;
+ @Override
public int compareTo(HandlerPriorityPair o) {
if (o.priority > priority) {
return 1;
@@ -216,6 +209,7 @@ public class ReadOnlyManager implements IReadOnlyHandler2, IEditorReloadListener final Map<ReadOnlyAxis, List<IReadOnlyHandler2>> handlers = new EnumMap<ReadOnlyAxis, List<IReadOnlyHandler2>>(ReadOnlyAxis.class);
cache.run(new Runnable() {
+ @Override
public void run() {
for (Map.Entry<Class<?>, Set<ReadOnlyAxis>> roClass : orderedHandlerClasses.entrySet()) {
IReadOnlyHandler2 h = create(roClass.getKey(), editingDomain);
@@ -245,21 +239,9 @@ public class ReadOnlyManager implements IReadOnlyHandler2, IEditorReloadListener orderedHandlersByAxis.put(axis, list.toArray(new IReadOnlyHandler2[list.size()]));
}
}
-
- // Is this editing domain associated with an editor?
- try {
- IMultiDiagramEditor editor = ServiceUtilsForResourceSet.getInstance().getService(IMultiDiagramEditor.class, editingDomain.getResourceSet());
- if (editor != null) {
- IReloadableEditor reloadable = IReloadableEditor.Adapter.getAdapter(editor);
- if (reloadable != null) {
- reloadable.addEditorReloadListener(this);
- }
- }
- } catch (ServiceException e) {
- // That's OK. We're not in the context of an editor
- }
}
+ @Override
public Optional<Boolean> anyReadOnly(Set<ReadOnlyAxis> axes, URI[] uris) {
final Set<URI> uriSet = ImmutableSet.copyOf(uris);
Optional<Boolean> result = cache.getResources(axes, uriSet);
@@ -297,6 +279,7 @@ public class ReadOnlyManager implements IReadOnlyHandler2, IEditorReloadListener return result.isPresent() ? result : Optional.of(Boolean.FALSE);
}
+ @Override
public Optional<Boolean> isReadOnly(Set<ReadOnlyAxis> axes, EObject eObject) {
Optional<Boolean> result = cache.getObject(axes, eObject);
if (result == null) {
@@ -332,6 +315,7 @@ public class ReadOnlyManager implements IReadOnlyHandler2, IEditorReloadListener return result.isPresent() ? result : Optional.of(Boolean.FALSE);
}
+ @Override
public Optional<Boolean> makeWritable(Set<ReadOnlyAxis> axes, URI[] uris) {
Boolean finalResult = true;
@@ -370,6 +354,7 @@ public class ReadOnlyManager implements IReadOnlyHandler2, IEditorReloadListener return finalResult;
}
+ @Override
public Optional<Boolean> makeWritable(Set<ReadOnlyAxis> axes, EObject eObject) {
Boolean finalResult = true;
@@ -408,6 +393,7 @@ public class ReadOnlyManager implements IReadOnlyHandler2, IEditorReloadListener return finalResult;
}
+ @Override
public Optional<Boolean> canMakeWritable(Set<ReadOnlyAxis> axes, URI[] uris) {
Boolean result = false;
@@ -440,6 +426,7 @@ public class ReadOnlyManager implements IReadOnlyHandler2, IEditorReloadListener return result;
}
+ @Override
public Optional<Boolean> canMakeWritable(Set<ReadOnlyAxis> axes, EObject object) {
Boolean result = false;
@@ -472,10 +459,12 @@ public class ReadOnlyManager implements IReadOnlyHandler2, IEditorReloadListener return result;
}
+ @Override
public void addReadOnlyListener(IReadOnlyListener listener) {
listeners.addIfAbsent(listener);
}
+ @Override
public void removeReadOnlyListener(IReadOnlyListener listener) {
listeners.remove(listener);
}
@@ -484,6 +473,7 @@ public class ReadOnlyManager implements IReadOnlyHandler2, IEditorReloadListener if (forwardingListener == null) {
forwardingListener = new IReadOnlyListener() {
+ @Override
public void readOnlyStateChanged(ReadOnlyEvent event) {
ReadOnlyEvent myEvent;
@@ -516,74 +506,44 @@ public class ReadOnlyManager implements IReadOnlyHandler2, IEditorReloadListener }
}
- public void editorAboutToReload(EditorReloadEvent event) {
- Map<Class<? extends IReadOnlyHandler2>, Object> reloadContexts = Maps.newHashMap();
-
- for (IReadOnlyHandler2[] partition : orderedHandlersByAxis.values()) {
- for (IReadOnlyHandler2 next : partition) {
- if (!reloadContexts.containsKey(next.getClass())) {
- IReloadContextProvider provider = AdapterUtils.adapt(next, IReloadContextProvider.class, null);
- if (provider != null) {
- reloadContexts.put(next.getClass(), provider.createReloadContext());
- }
- }
- }
- }
-
- if (!reloadContexts.isEmpty()) {
- event.putContext(reloadContexts);
- }
- }
+ /**
+ * Obtains a snapshot of the read-only handlers currently registered with me.
+ *
+ * @return my read-only handlers, by axis of affiliation. Changes to this collection
+ * do not affect my registered handlers
+ */
+ public final Map<ReadOnlyAxis, Collection<IReadOnlyHandler2>> getReadOnlyHandlers() {
+ Map<ReadOnlyAxis, Collection<IReadOnlyHandler2>> result = new HashMap<>();
- public void editorReloaded(EditorReloadEvent event) {
- // I will have been replaced by a new read-only manager
- ReadOnlyManager manager = this;
- try {
- manager = (ReadOnlyManager) getReadOnlyHandler(event.getEditor().getServicesRegistry().getService(TransactionalEditingDomain.class));
- IReloadableEditor reloadable = IReloadableEditor.Adapter.getAdapter(event.getEditor());
- reloadable.removeEditorReloadListener(this);
- reloadable.addEditorReloadListener(manager);
- } catch (ServiceException e) {
- Activator.log.error(e);
- }
+ // Be sure not to provide lists that are actually backed by the arrays!
+ orderedHandlersByAxis.forEach((axis, handlers) -> result.put(axis, Lists.newArrayList(handlers)));
- Object context = event.getContext();
- if (context instanceof Map<?, ?>) {
- @SuppressWarnings("unchecked")
- Map<Class<? extends IReadOnlyHandler2>, Object> reloadContexts = (Map<Class<? extends IReadOnlyHandler2>, Object>) context;
- for (IReadOnlyHandler2[] partition : manager.orderedHandlersByAxis.values()) {
- for (IReadOnlyHandler2 next : partition) {
- Object reloadContext = reloadContexts.get(next.getClass());
- if (reloadContext != null) {
- IReloadContextProvider provider = AdapterUtils.adapt(next, IReloadContextProvider.class, null);
- if (provider != null) {
- provider.restore(reloadContext);
- }
- }
- }
- }
- }
+ return result;
}
//
// Deprecated API
//
+ @Override
@Deprecated
public Optional<Boolean> anyReadOnly(URI[] uris) {
return anyReadOnly(permissionAxes(), uris);
}
+ @Override
@Deprecated
public Optional<Boolean> isReadOnly(EObject eObject) {
return isReadOnly(permissionAxes(), eObject);
}
+ @Override
@Deprecated
public Optional<Boolean> makeWritable(URI[] uris) {
return makeWritable(permissionAxes(), uris);
}
+ @Override
@Deprecated
public Optional<Boolean> makeWritable(EObject eObject) {
return makeWritable(permissionAxes(), eObject);
@@ -604,6 +564,7 @@ public class ReadOnlyManager implements IReadOnlyHandler2, IEditorReloadListener this.delegate = handler;
}
+ @Override
public Optional<Boolean> anyReadOnly(Set<ReadOnlyAxis> axes, URI[] uris) {
// the old API contract is that handlers only return true if they
@@ -613,6 +574,7 @@ public class ReadOnlyManager implements IReadOnlyHandler2, IEditorReloadListener return delegateResult ? Optional.of(Boolean.TRUE) : Optional.<Boolean> absent();
}
+ @Override
public Optional<Boolean> makeWritable(Set<ReadOnlyAxis> axes, URI[] uris) {
// the old API contract is that handlers only return false if they
diff --git a/plugins/infra/emf/org.eclipse.papyrus.infra.emf.readonly/src/org/eclipse/papyrus/infra/emf/readonly/ReadOnlyTester.java b/plugins/infra/emf/org.eclipse.papyrus.infra.emf.readonly/src/org/eclipse/papyrus/infra/emf/readonly/ReadOnlyTester.java index b476fd095b7..60e0f213ce9 100644 --- a/plugins/infra/emf/org.eclipse.papyrus.infra.emf.readonly/src/org/eclipse/papyrus/infra/emf/readonly/ReadOnlyTester.java +++ b/plugins/infra/emf/org.eclipse.papyrus.infra.emf.readonly/src/org/eclipse/papyrus/infra/emf/readonly/ReadOnlyTester.java @@ -21,13 +21,13 @@ import java.util.Iterator; import org.eclipse.core.expressions.PropertyTester;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.edit.domain.EditingDomain;
-import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.papyrus.infra.core.resource.IReadOnlyHandler2;
import org.eclipse.papyrus.infra.core.resource.ReadOnlyAxis;
import org.eclipse.papyrus.infra.emf.utils.BusinessModelResolver;
import org.eclipse.papyrus.infra.emf.utils.EMFHelper;
import com.google.common.base.Objects;
+import com.google.common.collect.Iterators;
public class ReadOnlyTester extends PropertyTester {
@@ -35,15 +35,21 @@ public class ReadOnlyTester extends PropertyTester { public static final String CAN_MAKE_WRITABLE = "canMakeWritable"; //$NON-NLS-1$
+ @Override
public boolean test(Object receiver, String property, Object[] args, Object expectedValue) {
- if (receiver instanceof IStructuredSelection) {
- Iterator<?> objects = ((IStructuredSelection) receiver).iterator();
+ Iterator<?> objects;
+ if (receiver instanceof Iterator<?>) {
+ objects = (Iterator<?>) receiver;
+ } else if (receiver instanceof Iterable<?>) {
+ objects = ((Iterable<?>) receiver).iterator();
+ } else {
+ objects = Iterators.singletonIterator(receiver);
+ }
- if (IS_READ_ONLY.equals(property)) {
- return testIsReadOnly(objects, asBoolean(expectedValue));
- } else if (CAN_MAKE_WRITABLE.equals(property)) {
- return canMakeWritable(objects, asBoolean(expectedValue));
- }
+ if (IS_READ_ONLY.equals(property)) {
+ return testIsReadOnly(objects, asBoolean(expectedValue));
+ } else if (CAN_MAKE_WRITABLE.equals(property)) {
+ return canMakeWritable(objects, asBoolean(expectedValue));
}
return false;
diff --git a/plugins/infra/emf/org.eclipse.papyrus.infra.emf.readonly/src/org/eclipse/papyrus/infra/emf/readonly/ControlledResourceTracker.java b/plugins/infra/emf/org.eclipse.papyrus.infra.emf.readonly/src/org/eclipse/papyrus/infra/emf/readonly/internal/ControlledResourceTracker.java index 4903cc6ba44..d99fc22337e 100644 --- a/plugins/infra/emf/org.eclipse.papyrus.infra.emf.readonly/src/org/eclipse/papyrus/infra/emf/readonly/ControlledResourceTracker.java +++ b/plugins/infra/emf/org.eclipse.papyrus.infra.emf.readonly/src/org/eclipse/papyrus/infra/emf/readonly/internal/ControlledResourceTracker.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2015 CEA, Christian W. Damus, and others. + * Copyright (c) 2014, 2016 CEA, Christian W. Damus, and others. * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 @@ -8,10 +8,10 @@ * * Contributors: * Christian W. Damus (CEA) - Initial API and implementation - * Christian W. Damus - bug 463631 + * Christian W. Damus - bugs 463631, 485220 * */ -package org.eclipse.papyrus.infra.emf.readonly; +package org.eclipse.papyrus.infra.emf.readonly.internal; import java.util.Collection; import java.util.Queue; @@ -45,7 +45,7 @@ import com.google.common.collect.Sets; * is necessary to ensure that the ephemeral states during controlling and uncontrolling a sub-model don't fool the editing domain into thinking * we're making changes to a read-only resource, triggering roll-back. */ -class ControlledResourceTracker extends AdapterImpl implements TransactionalEditingDomainListener { +public class ControlledResourceTracker extends AdapterImpl implements TransactionalEditingDomainListener { // A resource may be a sub-unit of multiple parent units (it can have multiple roots that are // cross-resource-contained by elements in multiple other resources, or all in the same resource, @@ -65,7 +65,7 @@ class ControlledResourceTracker extends AdapterImpl implements TransactionalEdit * * @return its tracker */ - static ControlledResourceTracker getInstance(EditingDomain domain) { + public static ControlledResourceTracker getInstance(EditingDomain domain) { ControlledResourceTracker result = null; for (Object next : domain.getResourceSet().eAdapters()) { @@ -101,7 +101,7 @@ class ControlledResourceTracker extends AdapterImpl implements TransactionalEdit * * @return the URI of the corresponding resource in the model's root unit, which could be the same {@code uri} if this is the root unit */ - Set<URI> getRootResourceURIs(URI uri) { + public Set<URI> getRootResourceURIs(URI uri) { Set<URI> result = Sets.newHashSet(); Queue<URI> units = Lists.newLinkedList(); units.add(uri.trimFileExtension()); @@ -238,7 +238,7 @@ class ControlledResourceTracker extends AdapterImpl implements TransactionalEdit * @param crossResourceContained * an object that is in the contents list of a resource and also has a container */ - protected void handleCrossResourceContainment(InternalEObject crossResourceContained) { + public void handleCrossResourceContainment(InternalEObject crossResourceContained) { URI resourceURI = crossResourceContained.eIsProxy() ? crossResourceContained.eProxyURI().trimFragment() : crossResourceContained.eDirectResource().getURI(); InternalEObject container = crossResourceContained.eInternalContainer(); URI parentURI = container.eIsProxy() ? container.eProxyURI().trimFragment() : container.eResource().getURI(); @@ -317,6 +317,7 @@ class ControlledResourceTracker extends AdapterImpl implements TransactionalEdit // TransactionalEditingDomainListener protocol // + @Override public void transactionClosed(TransactionalEditingDomainEvent event) { if (event.getTransaction().getStatus().getSeverity() >= IStatus.ERROR) { // Transaction rolled back @@ -327,22 +328,27 @@ class ControlledResourceTracker extends AdapterImpl implements TransactionalEdit } } + @Override public void editingDomainDisposing(TransactionalEditingDomainEvent event) { removeAdapter(event.getSource().getResourceSet()); } + @Override public void transactionStarting(TransactionalEditingDomainEvent event) { // pass } + @Override public void transactionInterrupted(TransactionalEditingDomainEvent event) { // pass } + @Override public void transactionStarted(TransactionalEditingDomainEvent event) { // pass } + @Override public void transactionClosing(TransactionalEditingDomainEvent event) { // pass } diff --git a/plugins/infra/emf/org.eclipse.papyrus.infra.emf.readonly/src/org/eclipse/papyrus/infra/emf/readonly/internal/messages/Messages.java b/plugins/infra/emf/org.eclipse.papyrus.infra.emf.readonly/src/org/eclipse/papyrus/infra/emf/readonly/internal/messages/Messages.java deleted file mode 100644 index e856765739a..00000000000 --- a/plugins/infra/emf/org.eclipse.papyrus.infra.emf.readonly/src/org/eclipse/papyrus/infra/emf/readonly/internal/messages/Messages.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright (c) 2014 CEA and others. - * - * 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 - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Christian W. Damus (CEA) - Initial API and implementation - * - */ -package org.eclipse.papyrus.infra.emf.readonly.internal.messages; - -import org.eclipse.osgi.util.NLS; - -/** - * This is the Messages type. Enjoy. - */ -public class Messages extends NLS { - - private static final String BUNDLE_NAME = "org.eclipse.papyrus.infra.emf.readonly.internal.messages.messages"; //$NON-NLS-1$ - - public static String ReferencedModelReadOnlyHandler_promptMsg; - - public static String ReferencedModelReadOnlyHandler_promptTitle; - static { - // initialize resource bundle - NLS.initializeMessages(BUNDLE_NAME, Messages.class); - } - - private Messages() { - } -} diff --git a/plugins/infra/emf/org.eclipse.papyrus.infra.emf.readonly/src/org/eclipse/papyrus/infra/emf/readonly/internal/messages/messages.properties b/plugins/infra/emf/org.eclipse.papyrus.infra.emf.readonly/src/org/eclipse/papyrus/infra/emf/readonly/internal/messages/messages.properties deleted file mode 100644 index 92baf6bdc1c..00000000000 --- a/plugins/infra/emf/org.eclipse.papyrus.infra.emf.readonly/src/org/eclipse/papyrus/infra/emf/readonly/internal/messages/messages.properties +++ /dev/null @@ -1,14 +0,0 @@ -# -# Copyright (c) 2014 CEA and others. -# -# 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 -# http://www.eclipse.org/legal/epl-v10.html -# -# Contributors: -# Christian W. Damus (CEA) - Initial API and implementation -# - -ReferencedModelReadOnlyHandler_promptMsg=Do you want to make these referenced library model files writable?\n\n -ReferencedModelReadOnlyHandler_promptTitle=Enable Write diff --git a/plugins/infra/emf/org.eclipse.papyrus.infra.emf.readonly/src/org/eclipse/papyrus/infra/emf/readonly/spi/IReadOnlyManagerProcessor.java b/plugins/infra/emf/org.eclipse.papyrus.infra.emf.readonly/src/org/eclipse/papyrus/infra/emf/readonly/spi/IReadOnlyManagerProcessor.java new file mode 100644 index 00000000000..e56620c8fec --- /dev/null +++ b/plugins/infra/emf/org.eclipse.papyrus.infra.emf.readonly/src/org/eclipse/papyrus/infra/emf/readonly/spi/IReadOnlyManagerProcessor.java @@ -0,0 +1,41 @@ +/***************************************************************************** + * Copyright (c) 2016 Christian W. Damus and others. + * + * 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 + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Christian W. Damus - Initial API and implementation + * + *****************************************************************************/ + +package org.eclipse.papyrus.infra.emf.readonly.spi; + +import org.eclipse.emf.edit.domain.EditingDomain; +import org.eclipse.papyrus.infra.emf.readonly.ReadOnlyManager; + +/** + * <p> + * An OSGi service interface for hooks to process the a new {@link ReadOnlyManager} + * upon its creation. There is no special provision for notification of when the + * manager is no longer being used. + * </p> + * <p> + * Any number of of implementations of this service may be registered; all will be + * invoked for each read-only manager. + * </p> + */ +@FunctionalInterface +public interface IReadOnlyManagerProcessor { + /** + * Process a newly instantiated read-only manager. + * + * @param readOnlyManager + * the new read-only manager + * @param editingDomain + * the editing domain for which the manager provides read-only services + */ + void processReadOnlyManager(ReadOnlyManager readOnlyManager, EditingDomain editingDomain); +} diff --git a/plugins/infra/emf/org.eclipse.papyrus.infra.emf/.classpath b/plugins/infra/emf/org.eclipse.papyrus.infra.emf/.classpath index 098194ca4b7..eca7bdba8f0 100644 --- a/plugins/infra/emf/org.eclipse.papyrus.infra.emf/.classpath +++ b/plugins/infra/emf/org.eclipse.papyrus.infra.emf/.classpath @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> <classpath> - <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/> + <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/> <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> <classpathentry kind="src" path="src"/> <classpathentry kind="output" path="bin"/> diff --git a/plugins/infra/emf/org.eclipse.papyrus.infra.emf/.settings/org.eclipse.jdt.core.prefs b/plugins/infra/emf/org.eclipse.papyrus.infra.emf/.settings/org.eclipse.jdt.core.prefs index 9ca8e68231b..62a08f4494d 100644 --- a/plugins/infra/emf/org.eclipse.papyrus.infra.emf/.settings/org.eclipse.jdt.core.prefs +++ b/plugins/infra/emf/org.eclipse.papyrus.infra.emf/.settings/org.eclipse.jdt.core.prefs @@ -1,10 +1,10 @@ eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
-org.eclipse.jdt.core.compiler.compliance=1.7
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.7
+org.eclipse.jdt.core.compiler.source=1.8
org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
diff --git a/plugins/infra/emf/org.eclipse.papyrus.infra.emf/META-INF/MANIFEST.MF b/plugins/infra/emf/org.eclipse.papyrus.infra.emf/META-INF/MANIFEST.MF index 95ded3a267b..a12f69a073d 100644 --- a/plugins/infra/emf/org.eclipse.papyrus.infra.emf/META-INF/MANIFEST.MF +++ b/plugins/infra/emf/org.eclipse.papyrus.infra.emf/META-INF/MANIFEST.MF @@ -3,29 +3,18 @@ Export-Package: org.eclipse.papyrus.infra.emf, org.eclipse.papyrus.infra.emf.adapters,
org.eclipse.papyrus.infra.emf.advice,
org.eclipse.papyrus.infra.emf.commands,
- org.eclipse.papyrus.infra.emf.databinding,
- org.eclipse.papyrus.infra.emf.dialog,
org.eclipse.papyrus.infra.emf.edit.domain,
- org.eclipse.papyrus.infra.emf.providers,
- org.eclipse.papyrus.infra.emf.providers.strategy,
org.eclipse.papyrus.infra.emf.requests,
org.eclipse.papyrus.infra.emf.resource,
org.eclipse.papyrus.infra.emf.resource.index,
org.eclipse.papyrus.infra.emf.utils
Require-Bundle: org.eclipse.papyrus.infra.core.log;bundle-version="1.2.0",
- org.eclipse.papyrus.infra.widgets;bundle-version="1.2.0",
- org.eclipse.emf.edit.ui;bundle-version="2.8.0",
- org.eclipse.emf.databinding;bundle-version="1.2.0",
org.eclipse.papyrus.infra.tools;bundle-version="1.2.0",
org.eclipse.papyrus.infra.core;bundle-version="1.2.0",
- org.eclipse.papyrus.infra.services.labelprovider;bundle-version="1.2.0",
- org.eclipse.gmf.runtime.notation;bundle-version="1.5.0",
org.eclipse.core.expressions;bundle-version="3.4.400",
org.eclipse.gmf.runtime.emf.type.core;bundle-version="1.7.0",
com.google.guava;bundle-version="11.0.0",
- org.eclipse.papyrus.emf.facet.custom.ui;bundle-version="1.2.0",
org.eclipse.papyrus.emf.facet.custom.core;bundle-version="1.2.0",
- org.eclipse.papyrus.infra.core.sasheditor;bundle-version="1.2.0",
org.eclipse.papyrus.infra.core.sashwindows.di;bundle-version="1.2.0"
Bundle-Vendor: Eclipse Modeling Project
Bundle-ActivationPolicy: lazy
@@ -35,4 +24,4 @@ Bundle-Activator: org.eclipse.papyrus.infra.emf.Activator Bundle-ManifestVersion: 2
Bundle-Description: %pluginDescription
Bundle-SymbolicName: org.eclipse.papyrus.infra.emf;singleton:=true
-Bundle-RequiredExecutionEnvironment: JavaSE-1.7
+Bundle-RequiredExecutionEnvironment: JavaSE-1.8
diff --git a/plugins/infra/emf/org.eclipse.papyrus.infra.emf/plugin.xml b/plugins/infra/emf/org.eclipse.papyrus.infra.emf/plugin.xml index bf405510fb0..da851f5c7b3 100644 --- a/plugins/infra/emf/org.eclipse.papyrus.infra.emf/plugin.xml +++ b/plugins/infra/emf/org.eclipse.papyrus.infra.emf/plugin.xml @@ -19,21 +19,6 @@ <plugin>
<extension-point id="dependencyUpdateParticipant" name="Dependency Update Participants" schema="schema/dependencyUpdateParticipant.exsd"/>
<extension
- point="org.eclipse.papyrus.infra.services.labelprovider.labelProvider">
- <labelProvider
- priority="110"
- provider="org.eclipse.papyrus.infra.emf.providers.ResourceFilteredLabelProvider">
- </labelProvider>
- <labelProvider
- priority="100"
- provider="org.eclipse.papyrus.infra.emf.providers.EMFFilteredLabelProvider">
- </labelProvider>
- <labelProvider
- priority="50"
- provider="org.eclipse.papyrus.infra.emf.providers.AnyTypeLabelProvider">
- </labelProvider>
- </extension>
- <extension
point="org.eclipse.gmf.runtime.emf.type.core.elementTypes">
<metamodel
nsURI="http://www.eclipse.org/emf/2002/Ecore">
@@ -71,15 +56,5 @@ </advice>
</binding>
</extension>
- <extension
- point="org.eclipse.core.runtime.adapters">
- <factory
- adaptableType="org.eclipse.emf.ecore.EObject"
- class="org.eclipse.papyrus.infra.emf.adapters.EObjectAdapterFactory">
- <adapter
- type="org.eclipse.papyrus.infra.widgets.creation.IAtomicOperationExecutor">
- </adapter>
- </factory>
- </extension>
</plugin>
diff --git a/plugins/infra/emf/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/Activator.java b/plugins/infra/emf/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/Activator.java index 3165476293b..4841a9fd239 100644 --- a/plugins/infra/emf/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/Activator.java +++ b/plugins/infra/emf/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/Activator.java @@ -1,6 +1,5 @@ /*****************************************************************************
- * Copyright (c) 2013 CEA LIST.
- *
+ * Copyright (c) 2013, 2016 CEA LIST, Christian W. Damus, and others.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
@@ -9,35 +8,27 @@ *
* Contributors:
* Camille Letavernier (camille.letavernier@cea.fr) - Initial API and implementation
+ * Christian W. Damus - bug 485220
*
*****************************************************************************/
package org.eclipse.papyrus.infra.emf;
import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.Plugin;
import org.eclipse.emf.ecore.EClassifier;
import org.eclipse.emf.ecore.EPackage;
import org.eclipse.emf.ecore.resource.ResourceSet;
import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
-import org.eclipse.jface.dialogs.DialogSettings;
-import org.eclipse.jface.dialogs.IDialogSettings;
-import org.eclipse.papyrus.emf.facet.custom.core.ICustomizationCatalogManager;
-import org.eclipse.papyrus.emf.facet.custom.core.ICustomizationCatalogManagerFactory;
import org.eclipse.papyrus.emf.facet.custom.core.ICustomizationManager;
import org.eclipse.papyrus.emf.facet.custom.core.ICustomizationManagerFactory;
-import org.eclipse.papyrus.emf.facet.custom.metamodel.v0_2_0.custom.Customization;
import org.eclipse.papyrus.infra.core.log.LogHelper;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.osgi.framework.BundleContext;
/**
* The activator class controls the plug-in life cycle
*/
-public class Activator extends AbstractUIPlugin {
+public class Activator extends Plugin {
/**
* The plug-in ID
@@ -62,11 +53,6 @@ public class Activator extends AbstractUIPlugin { public Activator() {
}
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
- */
@Override
public void start(final BundleContext context) throws Exception {
super.start(context);
@@ -74,11 +60,6 @@ public class Activator extends AbstractUIPlugin { log = new LogHelper(this);
}
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
- */
@Override
public void stop(final BundleContext context) throws Exception {
plugin = null;
@@ -101,179 +82,10 @@ public class Activator extends AbstractUIPlugin { public ICustomizationManager getCustomizationManager() {
if (this.fCustomizationManager == null) {
this.fCustomizationManager = ICustomizationManagerFactory.DEFAULT.getOrCreateICustomizationManager(facetRecsourceSet);
- init(this.fCustomizationManager);
}
return this.fCustomizationManager;
}
- /**
- * Saves the current Customization Manager settings to the preferences
- */
- public void saveCustomizationManagerState() {
- IDialogSettings dialogSettings = getBrowserCustomizationDialogSettings();
- List<Customization> appliedCustomizations = getCustomizationManager().getManagedCustomizations();
-
- final List<Customization> registeredCustomizations = ICustomizationCatalogManagerFactory.DEFAULT.getOrCreateCustomizationCatalogManager(getCustomizationManager().getResourceSet()).getRegisteredCustomizations();
-
- for (Customization customization : registeredCustomizations) {
-
- boolean isApplied = appliedCustomizations.contains(customization);
- String settingKey = getSettingKey(customization);
-
- dialogSettings.put(settingKey, isApplied);
- }
- }
-
- private String getSettingKey(Customization customization) {
- // do not exist anymore
- return customization.eResource().getURI().toString();
- // return "";
- }
-
- protected IDialogSettings getBrowserCustomizationDialogSettings() {
- String sectionId = CUSTOMIZATION_MANAGER_SECTION;
-
- IDialogSettings settings = Activator.getDefault().getDialogSettings().getSection(sectionId);
- if (settings == null) {
- settings = Activator.getDefault().getDialogSettings().addNewSection(sectionId);
- }
- return settings;
- }
-
- private void init(final ICustomizationManager customizationManager) {
- // the appearance can be customized here:
-
- IDialogSettings settings = getBrowserCustomizationDialogSettings();
-
- try {
-
- // load customizations defined as default through the customization
- // extension
- ICustomizationCatalogManager customCatalog = ICustomizationCatalogManagerFactory.DEFAULT.getOrCreateCustomizationCatalogManager(customizationManager.getResourceSet());
- // no possibility to get default customization
-
- List<Customization> registryAllCustomizations = customCatalog.getRegisteredCustomizations();
- ArrayList<Customization> orderedCustomizationList = new ArrayList<Customization>();
- for (Customization customization : registryAllCustomizations) {
- String settingKey = getSettingKey(customization);
-
- boolean isActive = false;
- if (settings.get(settingKey) == null) { // Never customized
- isActive = customization.isMustBeLoadedByDefault(); // Loaded by default
-
- } else {
- isActive = settings.getBoolean(settingKey);
- }
-
- if (isActive) {
- orderedCustomizationList.add(customization);
-
- }
- }
-
- Collections.sort(orderedCustomizationList, new CustomizationComparator());
- customizationManager.getManagedCustomizations().addAll(orderedCustomizationList);
-
-
-
- } catch (Throwable e) {
- Activator.getDefault().getLog().log(new Status(IStatus.ERROR, Activator.PLUGIN_ID, "Error initializing customizations", e)); //$NON-NLS-1$
- }
- }
-
- /**
- * The section name of the Dialog Settings for storing Customization Manager settings
- */
- public static final String CUSTOMIZATION_MANAGER_SECTION = PLUGIN_ID + ".customizationManager";//$NON-NLS-1$
-
- /**
- * Restores the default Customization Manager configuration
- */
- public void restoreDefaultCustomizationManager() {
- ICustomizationManager manager = getCustomizationManager();
-
- DialogSettings settings = (DialogSettings) getDialogSettings();
- settings.removeSection(CUSTOMIZATION_MANAGER_SECTION);
-
- // List<MetamodelView> registryDefaultCustomizations = CustomizationsCatalog.getInstance().getRegistryDefaultCustomizations();
- //
- // manager.clearCustomizations();
- // for(MetamodelView customization : registryDefaultCustomizations) {
- // manager.registerCustomization(customization);
- // }
- // manager.loadCustomizations();
- }
-
- /**
- * load the facets
- *
- * @param customizations
- * list of customization
- * @param customizationManager
- * the Customization Manager
- */
- // protected void loadFacetsForCustomizations(final List<MetamodelView> customizations, final CustomizationManager customizationManager) {
- // final Set<Facet> referencedFacets = new HashSet<Facet>();
- // final Collection<FacetSet> facetSets = FacetSetCatalog.getSingleton().getAllFacetSets();
- //
- // for(MetamodelView customization : customizations) {
- // String metamodelURI = customization.getMetamodelURI();
- // // find customized FacetSet
- // FacetSet customizedFacetSet = null;
- // if(metamodelURI != null) {
- // for(FacetSet facetSet : facetSets) {
- // if(metamodelURI.equals(facetSet.getNsURI())) {
- // customizedFacetSet = facetSet;
- // break;
- // }
- // }
- // }
- // if(customizedFacetSet == null) {
- // continue;
- // }
- //
- // // find customized Facets
- // EList<TypeView> types = customization.getTypes();
- // for(TypeView typeView : types) {
- // String metaclassName = typeView.getMetaclassName();
- // Facet facet = findFacetWithFullyQualifiedName(metaclassName, customizedFacetSet);
- // if(facet != null) {
- // referencedFacets.add(facet);
- // } else {
- // Activator.log.warn(String.format("Missing required facet \"%s\" in FacetSet \"%s\" for customization \"%s\"", metaclassName, customizedFacetSet.getName(), customization.getName()));
- // }
- // }
- //
- // for(Facet referencedFacet : referencedFacets) {
- // customizationManager.loadFacet(referencedFacet);
- // }
- // }
- //
- // //
- // // for modified facets
- // // customizationManager.getInstancesForMetaclasses().buildDerivationTree();
- // // customizationManager.getAppearanceConfiguration().touch();
- // // customizationManager.refreshDelayed(true);
- // }
-
- // /**
- // * fin a facet from
- // *
- // * @param metaclassName
- // * @param customizedFacetSet
- // * @return
- // */
- // private Facet findFacetWithFullyQualifiedName(final String metaclassName, final FacetSet customizedFacetSet) {
- // EList<Facet> facets = customizedFacetSet.getFacets();
- // for(Facet facet : facets) {
- // String facetName = getMetaclassQualifiedName(facet);
- // if(metaclassName.equals(facetName)) {
- // return facet;
- // }
- // }
- // return null;
- // }
-
/** @return the qualified name of the given metaclass */
public static String getMetaclassQualifiedName(final EClassifier eClass) {
final ArrayList<String> qualifiedNameParts = new ArrayList<String>();
diff --git a/plugins/infra/emf/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/messages/Messages.java b/plugins/infra/emf/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/messages/Messages.java index 3b3f75dcb1b..96df1225f6b 100644 --- a/plugins/infra/emf/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/messages/Messages.java +++ b/plugins/infra/emf/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/messages/Messages.java @@ -1,5 +1,5 @@ /************************************************************* - * Copyright (c) 2012, 2014 CEA and others. + * Copyright (c) 2012, 2016 CEA, Christian W. Damus, and others. * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 @@ -9,6 +9,7 @@ * Contributors: * Vincent Lorenzo (CEA LIST) - Initial API and implementation * Christian W. Damus (CEA) - bug 323802 + * Christian W. Damus - bug 485220 * */ @@ -20,18 +21,6 @@ public class Messages extends NLS { private static final String BUNDLE_NAME = "org.eclipse.papyrus.infra.emf.messages.messages"; //$NON-NLS-1$ - public static String ResourceFilteredLabelProvider_local; - - public static String ResourceFilteredLabelProvider_localExt; - - public static String ResourceFilteredLabelProvider_system; - - public static String ResourceFilteredLabelProvider_systemExt; - - public static String ResourceFilteredLabelProvider_workspace; - - public static String ResourceFilteredLabelProvider_workspaceExt; - public static String UnsetCommand_UnsetCommand; static { diff --git a/plugins/infra/emf/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/messages/messages.properties b/plugins/infra/emf/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/messages/messages.properties index 7a50929b818..379d3dfb6a6 100644 --- a/plugins/infra/emf/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/messages/messages.properties +++ b/plugins/infra/emf/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/messages/messages.properties @@ -1,5 +1,5 @@ #
-# Copyright (c) 2012, 2014 CEA and others.
+# Copyright (c) 2012, 2016 CEA, Christian W. Damus, and others.
#
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Eclipse Public License v1.0
@@ -9,12 +9,7 @@ # Contributors:
# Vincent Lorenzo (CEA LIST) - Initial API and implementation
# Christian W. Damus (CEA) - bug 323802
+# Christian W. Damus - bug 485220
#
-ResourceFilteredLabelProvider_local=Local model file "{0}"
-ResourceFilteredLabelProvider_localExt=Local model file "{0}" ({1} component)
-ResourceFilteredLabelProvider_system=System resource "{0}"
-ResourceFilteredLabelProvider_systemExt=Resource "{0}"
-ResourceFilteredLabelProvider_workspace=Workspace model file "{0}"
-ResourceFilteredLabelProvider_workspaceExt=Workspace model file "{0}" ({1} component)
UnsetCommand_UnsetCommand=Unset Command
diff --git a/plugins/infra/emf/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/utils/EMFFileUtil.java b/plugins/infra/emf/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/utils/EMFFileUtil.java index cc62944a7a5..5acd8eeb22d 100644 --- a/plugins/infra/emf/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/utils/EMFFileUtil.java +++ b/plugins/infra/emf/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/utils/EMFFileUtil.java @@ -20,7 +20,7 @@ import org.eclipse.core.resources.ResourcesPlugin; import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.Path;
import org.eclipse.emf.common.util.URI;
-import org.eclipse.papyrus.infra.widgets.Activator;
+import org.eclipse.papyrus.infra.emf.Activator;
//TODO
public class EMFFileUtil {
diff --git a/plugins/infra/emf/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/utils/EMFHelper.java b/plugins/infra/emf/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/utils/EMFHelper.java index 49ea6eeb2d9..b0ebdee7994 100644 --- a/plugins/infra/emf/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/utils/EMFHelper.java +++ b/plugins/infra/emf/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/utils/EMFHelper.java @@ -49,7 +49,6 @@ import org.eclipse.emf.ecore.util.EcoreUtil; import org.eclipse.emf.ecore.xmi.XMIResource;
import org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain;
import org.eclipse.emf.edit.domain.EditingDomain;
-import org.eclipse.papyrus.emf.facet.custom.ui.CustomizedContentProviderUtils;
import org.eclipse.papyrus.infra.core.resource.IReadOnlyHandler;
import org.eclipse.papyrus.infra.core.resource.IReadOnlyHandler2;
import org.eclipse.papyrus.infra.core.resource.ReadOnlyAxis;
@@ -221,24 +220,24 @@ public class EMFHelper { */
public static EObject getEObject(final Object source) {
- // Support for EMF 0.2 CustomizedTree: The TreeElements are EObjects, and do not implement IAdatapble.
- // FIXME: Use an AdapterFactory instead, to remove the dependency to EMF Facet 0.2
- Object resolved = CustomizedContentProviderUtils.resolve(source);
- if (resolved != source && isEMFModelElement(resolved)) {
- return (EObject) resolved;
- }
-
// General case
if (isEMFModelElement(source)) {
return (EObject) source;
- } else if (source instanceof IAdaptable) {
+ }
+
+ // Try to get an intrinsic adapter
+ if (source instanceof IAdaptable) {
EObject eObject = ((IAdaptable) source).getAdapter(EObject.class);
if (eObject == null) { // EMF Facet 0.1
eObject = ((IAdaptable) source).getAdapter(EReference.class);
}
- return asEMFModelElement(eObject); // in case the adapter is a CDOResource
+
+ if (eObject != null) {
+ return asEMFModelElement(eObject); // in case the adapter is a CDOResource
+ }
}
+ // External adapter (last ditch case)
if (source != null) {
return asEMFModelElement(Platform.getAdapterManager().getAdapter(source, EObject.class));
}
diff --git a/plugins/infra/emf/org.eclipse.papyrus.infra.ui.emf/.classpath b/plugins/infra/emf/org.eclipse.papyrus.infra.ui.emf/.classpath new file mode 100644 index 00000000000..eca7bdba8f0 --- /dev/null +++ b/plugins/infra/emf/org.eclipse.papyrus.infra.ui.emf/.classpath @@ -0,0 +1,7 @@ +<?xml version="1.0" encoding="UTF-8"?> +<classpath> + <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/> + <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> + <classpathentry kind="src" path="src"/> + <classpathentry kind="output" path="bin"/> +</classpath> diff --git a/plugins/infra/emf/org.eclipse.papyrus.infra.ui.emf/.project b/plugins/infra/emf/org.eclipse.papyrus.infra.ui.emf/.project new file mode 100644 index 00000000000..16fd397042a --- /dev/null +++ b/plugins/infra/emf/org.eclipse.papyrus.infra.ui.emf/.project @@ -0,0 +1,28 @@ +<?xml version="1.0" encoding="UTF-8"?> +<projectDescription> + <name>org.eclipse.papyrus.infra.ui.emf</name> + <comment></comment> + <projects> + </projects> + <buildSpec> + <buildCommand> + <name>org.eclipse.jdt.core.javabuilder</name> + <arguments> + </arguments> + </buildCommand> + <buildCommand> + <name>org.eclipse.pde.ManifestBuilder</name> + <arguments> + </arguments> + </buildCommand> + <buildCommand> + <name>org.eclipse.pde.SchemaBuilder</name> + <arguments> + </arguments> + </buildCommand> + </buildSpec> + <natures> + <nature>org.eclipse.pde.PluginNature</nature> + <nature>org.eclipse.jdt.core.javanature</nature> + </natures> +</projectDescription> diff --git a/plugins/infra/emf/org.eclipse.papyrus.infra.ui.emf/.settings/org.eclipse.jdt.core.prefs b/plugins/infra/emf/org.eclipse.papyrus.infra.ui.emf/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 00000000000..b3aa6d60f94 --- /dev/null +++ b/plugins/infra/emf/org.eclipse.papyrus.infra.ui.emf/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,291 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.source=1.8 +org.eclipse.jdt.core.formatter.align_type_members_on_columns=false +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16 +org.eclipse.jdt.core.formatter.alignment_for_assignment=0 +org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16 +org.eclipse.jdt.core.formatter.alignment_for_compact_if=16 +org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80 +org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0 +org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16 +org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0 +org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16 +org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80 +org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16 +org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16 +org.eclipse.jdt.core.formatter.blank_lines_after_imports=1 +org.eclipse.jdt.core.formatter.blank_lines_after_package=1 +org.eclipse.jdt.core.formatter.blank_lines_before_field=0 +org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0 +org.eclipse.jdt.core.formatter.blank_lines_before_imports=1 +org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1 +org.eclipse.jdt.core.formatter.blank_lines_before_method=1 +org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1 +org.eclipse.jdt.core.formatter.blank_lines_before_package=0 +org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1 +org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1 +org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_lambda_body=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line +org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false +org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false +org.eclipse.jdt.core.formatter.comment.format_block_comments=true +org.eclipse.jdt.core.formatter.comment.format_header=false +org.eclipse.jdt.core.formatter.comment.format_html=true +org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true +org.eclipse.jdt.core.formatter.comment.format_line_comments=true +org.eclipse.jdt.core.formatter.comment.format_source_code=true +org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true +org.eclipse.jdt.core.formatter.comment.indent_root_tags=true +org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert +org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert +org.eclipse.jdt.core.formatter.comment.line_length=260 +org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true +org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true +org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false +org.eclipse.jdt.core.formatter.compact_else_if=true +org.eclipse.jdt.core.formatter.continuation_indentation=2 +org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2 +org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off +org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on +org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false +org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true +org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true +org.eclipse.jdt.core.formatter.indent_empty_lines=false +org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true +org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true +org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true +org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false +org.eclipse.jdt.core.formatter.indentation.size=4 +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_after_type_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert +org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert +org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert +org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert +org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert +org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert +org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert +org.eclipse.jdt.core.formatter.insert_space_after_lambda_arrow=insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert +org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert +org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert +org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_lambda_arrow=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert +org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert +org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert +org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.join_lines_in_comments=false +org.eclipse.jdt.core.formatter.join_wrapped_lines=false +org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false +org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false +org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false +org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false +org.eclipse.jdt.core.formatter.lineSplit=260 +org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false +org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false +org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0 +org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=5 +org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true +org.eclipse.jdt.core.formatter.tabulation.char=tab +org.eclipse.jdt.core.formatter.tabulation.size=4 +org.eclipse.jdt.core.formatter.use_on_off_tags=false +org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false +org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true +org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true +org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true diff --git a/plugins/infra/emf/org.eclipse.papyrus.infra.ui.emf/.settings/org.eclipse.jdt.ui.prefs b/plugins/infra/emf/org.eclipse.papyrus.infra.ui.emf/.settings/org.eclipse.jdt.ui.prefs new file mode 100644 index 00000000000..954281dbc31 --- /dev/null +++ b/plugins/infra/emf/org.eclipse.papyrus.infra.ui.emf/.settings/org.eclipse.jdt.ui.prefs @@ -0,0 +1,68 @@ +cleanup.add_default_serial_version_id=true +cleanup.add_generated_serial_version_id=false +cleanup.add_missing_annotations=true +cleanup.add_missing_deprecated_annotations=true +cleanup.add_missing_methods=false +cleanup.add_missing_nls_tags=false +cleanup.add_missing_override_annotations=true +cleanup.add_missing_override_annotations_interface_methods=true +cleanup.add_serial_version_id=false +cleanup.always_use_blocks=true +cleanup.always_use_parentheses_in_expressions=false +cleanup.always_use_this_for_non_static_field_access=false +cleanup.always_use_this_for_non_static_method_access=false +cleanup.convert_functional_interfaces=false +cleanup.convert_to_enhanced_for_loop=false +cleanup.correct_indentation=false +cleanup.format_source_code=false +cleanup.format_source_code_changes_only=false +cleanup.insert_inferred_type_arguments=false +cleanup.make_local_variable_final=true +cleanup.make_parameters_final=false +cleanup.make_private_fields_final=true +cleanup.make_type_abstract_if_missing_method=false +cleanup.make_variable_declarations_final=false +cleanup.never_use_blocks=false +cleanup.never_use_parentheses_in_expressions=true +cleanup.organize_imports=false +cleanup.qualify_static_field_accesses_with_declaring_class=false +cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true +cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true +cleanup.qualify_static_member_accesses_with_declaring_class=true +cleanup.qualify_static_method_accesses_with_declaring_class=false +cleanup.remove_private_constructors=true +cleanup.remove_redundant_type_arguments=true +cleanup.remove_trailing_whitespaces=true +cleanup.remove_trailing_whitespaces_all=true +cleanup.remove_trailing_whitespaces_ignore_empty=false +cleanup.remove_unnecessary_casts=true +cleanup.remove_unnecessary_nls_tags=true +cleanup.remove_unused_imports=true +cleanup.remove_unused_local_variables=false +cleanup.remove_unused_private_fields=true +cleanup.remove_unused_private_members=false +cleanup.remove_unused_private_methods=true +cleanup.remove_unused_private_types=true +cleanup.sort_members=false +cleanup.sort_members_all=false +cleanup.use_anonymous_class_creation=false +cleanup.use_blocks=true +cleanup.use_blocks_only_for_return_and_throw=false +cleanup.use_lambda=true +cleanup.use_parentheses_in_expressions=false +cleanup.use_this_for_non_static_field_access=false +cleanup.use_this_for_non_static_field_access_only_if_necessary=true +cleanup.use_this_for_non_static_method_access=false +cleanup.use_this_for_non_static_method_access_only_if_necessary=true +cleanup.use_type_arguments=false +cleanup_profile=_Papyrus +cleanup_settings_version=2 +eclipse.preferences.version=1 +formatter_profile=_Papyrus +formatter_settings_version=12 +org.eclipse.jdt.ui.ignorelowercasenames=true +org.eclipse.jdt.ui.importorder=java;javax;org;com; +org.eclipse.jdt.ui.javadoc=true +org.eclipse.jdt.ui.ondemandthreshold=99 +org.eclipse.jdt.ui.staticondemandthreshold=99 +org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\n * @return the ${bare_field_name}\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\n * @param ${param} the ${bare_field_name} to set\n */</template><template autoinsert\="false" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\n * Constructor.\n *\n * ${tags}\n */</template><template autoinsert\="false" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/*****************************************************************************\n * Copyright (c) ${year} CEA LIST and others.\n * \n * All rights reserved. This program and the accompanying materials\n * are made available under the terms of the Eclipse Public License v1.0\n * which accompanies this distribution, and is available at\n * http\://www.eclipse.org/legal/epl-v10.html\n *\n * Contributors\:\n * CEA LIST - Initial API and implementation\n * \n *****************************************************************************/\n</template><template autoinsert\="true" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\n * @author ${user}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\n * \n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\n * ${tags}\n */</template><template autoinsert\="false" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/**\n * ${see_to_overridden}\n *\n * ${tags}\n */</template><template autoinsert\="false" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\n * ${see_to_target}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">${filecomment}\n${package_declaration}\n\n${typecomment}\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\n</template><template autoinsert\="true" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\n${exception_var}.printStackTrace();</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">// ${todo} Auto-generated method stub\n${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\n// ${todo} Auto-generated constructor stub</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></templates> diff --git a/plugins/infra/emf/org.eclipse.papyrus.infra.ui.emf/META-INF/MANIFEST.MF b/plugins/infra/emf/org.eclipse.papyrus.infra.ui.emf/META-INF/MANIFEST.MF new file mode 100644 index 00000000000..cddde77a32d --- /dev/null +++ b/plugins/infra/emf/org.eclipse.papyrus.infra.ui.emf/META-INF/MANIFEST.MF @@ -0,0 +1,38 @@ +Manifest-Version: 1.0 +Export-Package: org.eclipse.papyrus.infra.ui.emf.adapters, + org.eclipse.papyrus.infra.ui.emf.databinding, + org.eclipse.papyrus.infra.ui.emf.dialog, + org.eclipse.papyrus.infra.ui.emf.providers, + org.eclipse.papyrus.infra.ui.emf.providers.strategy, + org.eclipse.papyrus.infra.ui.emf.utils, + org.eclipse.papyrus.infra.ui.internal.emf;x-internal:=true, + org.eclipse.papyrus.infra.ui.internal.emf.expressions;x-internal:=true, + org.eclipse.papyrus.infra.ui.internal.emf.readonly.handlers +Require-Bundle: org.eclipse.papyrus.infra.core.log;bundle-version="1.2.0", + org.eclipse.papyrus.infra.widgets;bundle-version="1.2.0", + org.eclipse.emf.edit.ui;bundle-version="2.8.0", + org.eclipse.emf.databinding;bundle-version="1.2.0", + org.eclipse.papyrus.infra.core;bundle-version="1.2.0", + org.eclipse.papyrus.infra.services.labelprovider;bundle-version="1.2.0", + org.eclipse.gmf.runtime.notation;bundle-version="1.5.0", + org.eclipse.core.expressions;bundle-version="3.4.400", + org.eclipse.gmf.runtime.emf.type.core;bundle-version="1.7.0", + com.google.guava;bundle-version="11.0.0", + org.eclipse.papyrus.emf.facet.custom.ui;bundle-version="1.2.0", + org.eclipse.papyrus.emf.facet.custom.core;bundle-version="1.2.0", + org.eclipse.papyrus.infra.core.sasheditor.di;bundle-version="1.2.0", + org.eclipse.papyrus.infra.emf;bundle-version="1.2.0", + org.eclipse.papyrus.infra.emf.readonly;bundle-version="1.2.0", + org.eclipse.papyrus.infra.onefile;bundle-version="1.2.0", + org.eclipse.papyrus.infra.ui;bundle-version="1.2.0", + org.eclipse.papyrus.infra.tools;bundle-version="1.2.0", + org.eclipse.papyrus.infra.core.sashwindows.di;bundle-version="1.2.0" +Bundle-Vendor: %pluginProvider +Bundle-ActivationPolicy: lazy +Bundle-Version: 1.2.0.qualifier +Bundle-Name: %pluginName +Bundle-Localization: plugin +Bundle-Activator: org.eclipse.papyrus.infra.ui.internal.emf.Activator +Bundle-ManifestVersion: 2 +Bundle-SymbolicName: org.eclipse.papyrus.infra.ui.emf;singleton:=true +Bundle-RequiredExecutionEnvironment: JavaSE-1.8 diff --git a/plugins/infra/emf/org.eclipse.papyrus.infra.ui.emf/about.html b/plugins/infra/emf/org.eclipse.papyrus.infra.ui.emf/about.html new file mode 100644 index 00000000000..dd3c089a94c --- /dev/null +++ b/plugins/infra/emf/org.eclipse.papyrus.infra.ui.emf/about.html @@ -0,0 +1,28 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/> +<title>About</title> +</head> +<body lang="EN-US"> +<h2>About This Content</h2> + +<p>November 14, 2008</p> +<h3>License</h3> + +<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise +indicated below, the Content is provided to you under the terms and conditions of the +Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available +at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>. +For purposes of the EPL, "Program" will mean the Content.</p> + +<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is +being redistributed by another party ("Redistributor") and different terms and conditions may +apply to your use of any object code in the Content. Check the Redistributor's license that was +provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise +indicated below, the terms and conditions of the EPL still apply to any source code in the Content +and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p> + +</body> +</html>
\ No newline at end of file diff --git a/plugins/infra/emf/org.eclipse.papyrus.infra.ui.emf/build.properties b/plugins/infra/emf/org.eclipse.papyrus.infra.ui.emf/build.properties new file mode 100644 index 00000000000..46a2df5a2a4 --- /dev/null +++ b/plugins/infra/emf/org.eclipse.papyrus.infra.ui.emf/build.properties @@ -0,0 +1,10 @@ +source.. = src/ +output.. = bin/ +bin.includes = META-INF/,\ + .,\ + about.html,\ + build.properties,\ + plugin.xml,\ + plugin.properties,\ + icons/ +src.includes = about.html diff --git a/plugins/infra/emf/org.eclipse.papyrus.infra.emf.readonly/icons/enable_write.png b/plugins/infra/emf/org.eclipse.papyrus.infra.ui.emf/icons/enable_write.png Binary files differindex d4e55293f11..d4e55293f11 100644 --- a/plugins/infra/emf/org.eclipse.papyrus.infra.emf.readonly/icons/enable_write.png +++ b/plugins/infra/emf/org.eclipse.papyrus.infra.ui.emf/icons/enable_write.png diff --git a/plugins/infra/emf/org.eclipse.papyrus.infra.ui.emf/plugin.properties b/plugins/infra/emf/org.eclipse.papyrus.infra.ui.emf/plugin.properties new file mode 100644 index 00000000000..d2fe5aea31d --- /dev/null +++ b/plugins/infra/emf/org.eclipse.papyrus.infra.ui.emf/plugin.properties @@ -0,0 +1,13 @@ +# +# Copyright (c) 2016 Christian W. Damus and others. +# 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 +# http://www.eclipse.org/legal/epl-v10.html +# +# Contributors: +# Christian W. Damus - initial API and implementation +# + +pluginName = Papyrus Infrastructural UI for EMF +pluginProvider = Eclipse Modeling Project diff --git a/plugins/infra/emf/org.eclipse.papyrus.infra.ui.emf/plugin.xml b/plugins/infra/emf/org.eclipse.papyrus.infra.ui.emf/plugin.xml new file mode 100644 index 00000000000..05435f04a85 --- /dev/null +++ b/plugins/infra/emf/org.eclipse.papyrus.infra.ui.emf/plugin.xml @@ -0,0 +1,153 @@ +<?xml version="1.0" encoding="UTF-8"?> +<?eclipse version="3.4"?> +<!-- + Copyright (c) 2012, 2016 CEA, Christian W. Damus, and others. + + 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 + http://www.eclipse.org/legal/epl-v10.html + + Contributors: + CEA - Initial API and implementation + Christian W. Damus (CEA) - bug 323802 + Christian W. Damus (CEA) - bug 408491 + Christian W. Damus (CEA) - bug 431953 (pre-requisite refactoring of ModelSet service start-up) + Christian W. Damus - bug 485220 + +--> +<plugin> + <extension + point="org.eclipse.papyrus.infra.services.labelprovider.labelProvider"> + <labelProvider + priority="110" + provider="org.eclipse.papyrus.infra.ui.emf.providers.ResourceFilteredLabelProvider"> + </labelProvider> + <labelProvider + priority="100" + provider="org.eclipse.papyrus.infra.ui.emf.providers.EMFFilteredLabelProvider"> + </labelProvider> + <labelProvider + priority="50" + provider="org.eclipse.papyrus.infra.ui.emf.providers.AnyTypeLabelProvider"> + </labelProvider> + </extension> + <extension + point="org.eclipse.core.runtime.adapters"> + <factory + adaptableType="org.eclipse.emf.ecore.EObject" + class="org.eclipse.papyrus.infra.ui.emf.adapters.EObjectAdapterFactory"> + <adapter + type="org.eclipse.papyrus.infra.widgets.creation.IAtomicOperationExecutor"> + </adapter> + </factory> + </extension> + + <extension + point="org.eclipse.ui.commands"> + <command + description="Enable write" + categoryId="org.eclipse.papyrus.editor.category" + id="org.eclipse.papyrus.infra.emf.readonly.EnableWriteCommand" + name="Enable write"> + </command> + </extension> + + <extension + point="org.eclipse.ui.menus"> + <menuContribution + allPopups="false" + locationURI="popup:org.eclipse.papyrus.views.modelexplorer.modelexplorer.popup?after=tools"> + <command commandId="org.eclipse.papyrus.infra.emf.readonly.EnableWriteCommand" + icon="icons/enable_write.png" + label="Enable write" + style="push" + tooltip="Enable write"> + <visibleWhen> + <reference definitionId="org.eclipse.papyrus.uml.diagram.common.IsPapyrusActiveWithUMLModel"/> + </visibleWhen> + </command> + </menuContribution> + + <menuContribution locationURI="popup:org.eclipse.gmf.runtime.diagram.ui.DiagramEditorContextMenu?endof=fileMenu" + allPopups="false"> + <command commandId="org.eclipse.papyrus.infra.emf.readonly.EnableWriteCommand" + icon="icons/enable_write.png" + label="Enable write" + style="push" + tooltip="Enable write"> + <visibleWhen> + <reference definitionId="org.eclipse.papyrus.uml.diagram.common.IsPapyrusActiveWithUMLModel"/> + </visibleWhen> + </command> + </menuContribution> + + <menuContribution locationURI="toolbar:org.eclipse.ui.main.toolbar?after=additions"> + <toolbar id="org.eclipse.papyrus.infra.emf.readonly.toolbar"> + <command commandId="org.eclipse.papyrus.infra.emf.readonly.EnableWriteCommand" + icon="icons/enable_write.png" + label="Enable write" + style="push" + tooltip="Enable write"> + <visibleWhen> + <reference definitionId="org.eclipse.papyrus.uml.diagram.common.IsPapyrusActiveWithUMLModel"/> + </visibleWhen> + </command> + </toolbar> + </menuContribution> + </extension> + <extension + point="org.eclipse.ui.handlers"> + <handler + class="org.eclipse.papyrus.infra.ui.internal.emf.readonly.handlers.EnableWriteCommandHandler" + commandId="org.eclipse.papyrus.infra.emf.readonly.EnableWriteCommand"> + <enabledWhen> + <and> + <with variable="activeEditorId"> + <equals value="org.eclipse.papyrus.infra.core.papyrusEditor"/> + </with> + <with + variable="selection"> + <test + property="org.eclipse.papyrus.infra.emf.readonly.tester.isReadOnly" + value="true"> + </test> + <count + value="1"> + </count> + </with> + </and> + </enabledWhen> + </handler> + </extension> + <extension + point="org.eclipse.core.expressions.propertyTesters"> + <propertyTester + class="org.eclipse.papyrus.infra.ui.internal.emf.expressions.ReadOnlyTester" + id="org.eclipse.papyrus.infra.ui.emf.readonly.tester" + namespace="org.eclipse.papyrus.infra.emf.readonly.tester" + properties="isReadOnly,canMakeWritable" + type="org.eclipse.jface.viewers.IStructuredSelection"> + </propertyTester> + </extension> + + <extension + point="org.eclipse.papyrus.infra.emf.readonly.readOnlyHandler"> + <readOnlyHandler + class="org.eclipse.papyrus.infra.ui.internal.emf.readonly.handlers.ReferencedModelReadOnlyHandler" + id="org.eclipse.papyrus.infra.ui.emf.readonly.ReferencedModelReadOnlyHandler" + priority="15"> + <affinity + axis="discretion"> + </affinity> + </readOnlyHandler> + <readOnlyHandler + class="org.eclipse.papyrus.infra.ui.internal.emf.readonly.handlers.FSReadOnlyHandler" + id="org.eclipse.papyrus.infra.ui.emf.readonly.FSReadOnlyHandler" + priority="10"> + <affinity + axis="permission"> + </affinity> + </readOnlyHandler> + </extension> +</plugin> diff --git a/plugins/infra/emf/org.eclipse.papyrus.infra.ui.emf/pom.xml b/plugins/infra/emf/org.eclipse.papyrus.infra.ui.emf/pom.xml new file mode 100644 index 00000000000..8e34b9157d6 --- /dev/null +++ b/plugins/infra/emf/org.eclipse.papyrus.infra.ui.emf/pom.xml @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project> + <modelVersion>4.0.0</modelVersion> + <parent> + <artifactId>org.eclipse.papyrus.releng</artifactId> + <groupId>org.eclipse.papyrus</groupId> + <version>1.2.0-SNAPSHOT</version> + <relativePath>../../../../releng/main</relativePath> + </parent> + <artifactId>org.eclipse.papyrus.infra.ui.emf</artifactId> + <groupId>org.eclipse.papyrus</groupId> + <version>1.2.0-SNAPSHOT</version> + <packaging>eclipse-plugin</packaging> +</project>
\ No newline at end of file diff --git a/plugins/infra/emf/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/adapters/EObjectAdapterFactory.java b/plugins/infra/emf/org.eclipse.papyrus.infra.ui.emf/src/org/eclipse/papyrus/infra/ui/emf/adapters/EObjectAdapterFactory.java index 6db9f56e76c..68c7bac1f97 100644 --- a/plugins/infra/emf/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/adapters/EObjectAdapterFactory.java +++ b/plugins/infra/emf/org.eclipse.papyrus.infra.ui.emf/src/org/eclipse/papyrus/infra/ui/emf/adapters/EObjectAdapterFactory.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014 CEA and others. + * Copyright (c) 2014, 2016 CEA, Christian W. Damus, and others. * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 @@ -8,9 +8,10 @@ * * Contributors: * Christian W. Damus (CEA) - Initial API and implementation + * Christian W. Damus - bug 485220 * */ -package org.eclipse.papyrus.infra.emf.adapters; +package org.eclipse.papyrus.infra.ui.emf.adapters; import org.eclipse.core.runtime.IAdapterFactory; import org.eclipse.emf.ecore.EObject; @@ -18,7 +19,7 @@ import org.eclipse.emf.ecore.resource.ResourceSet; import org.eclipse.emf.transaction.RecordingCommand; import org.eclipse.emf.transaction.TransactionalEditingDomain; import org.eclipse.emf.transaction.util.TransactionUtil; -import org.eclipse.papyrus.infra.emf.dialog.NestedEditingDialogContext; +import org.eclipse.papyrus.infra.ui.emf.dialog.NestedEditingDialogContext; import org.eclipse.papyrus.infra.widgets.creation.IAtomicOperationExecutor; @@ -33,8 +34,9 @@ public class EObjectAdapterFactory implements IAdapterFactory { super(); } - public Object getAdapter(Object adaptable, @SuppressWarnings("rawtypes") Class adapterType) { - Object result = null; + @Override + public <T> T getAdapter(Object adaptable, Class<T> adapterType) { + T result = null; if (adaptable instanceof EObject) { if (adapterType == IAtomicOperationExecutor.class) { @@ -46,7 +48,7 @@ public class EObjectAdapterFactory implements IAdapterFactory { } } if (domain != null) { - result = new EMFAtomicOperationExecutor(domain); + result = adapterType.cast(new EMFAtomicOperationExecutor(domain)); } } } @@ -54,8 +56,8 @@ public class EObjectAdapterFactory implements IAdapterFactory { return result; } - @SuppressWarnings("rawtypes") - public Class[] getAdapterList() { + @Override + public Class<?>[] getAdapterList() { return adapterTypes; } diff --git a/plugins/infra/emf/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/databinding/AnnotationObservableValue.java b/plugins/infra/emf/org.eclipse.papyrus.infra.ui.emf/src/org/eclipse/papyrus/infra/ui/emf/databinding/AnnotationObservableValue.java index dda2b90e684..392dd431538 100644 --- a/plugins/infra/emf/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/databinding/AnnotationObservableValue.java +++ b/plugins/infra/emf/org.eclipse.papyrus.infra.ui.emf/src/org/eclipse/papyrus/infra/ui/emf/databinding/AnnotationObservableValue.java @@ -9,7 +9,7 @@ * Contributors: * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation *****************************************************************************/ -package org.eclipse.papyrus.infra.emf.databinding; +package org.eclipse.papyrus.infra.ui.emf.databinding; import org.eclipse.core.databinding.observable.value.AbstractObservableValue; import org.eclipse.emf.common.command.AbstractCommand; diff --git a/plugins/infra/emf/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/databinding/EMFObservableList.java b/plugins/infra/emf/org.eclipse.papyrus.infra.ui.emf/src/org/eclipse/papyrus/infra/ui/emf/databinding/EMFObservableList.java index 7e524ae2ded..97a5c2cca9b 100644 --- a/plugins/infra/emf/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/databinding/EMFObservableList.java +++ b/plugins/infra/emf/org.eclipse.papyrus.infra.ui.emf/src/org/eclipse/papyrus/infra/ui/emf/databinding/EMFObservableList.java @@ -1,405 +1,405 @@ -/*****************************************************************************
- * Copyright (c) 2010, 2014 CEA LIST and others.
- *
- * 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
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
- * Christian W. Damus (CEA) - bug 402525
- *
- *****************************************************************************/
-package org.eclipse.papyrus.infra.emf.databinding;
-
-import java.util.Collection;
-import java.util.LinkedList;
-import java.util.List;
-
-import org.eclipse.core.databinding.observable.ChangeEvent;
-import org.eclipse.core.databinding.observable.IChangeListener;
-import org.eclipse.core.databinding.observable.IObserving;
-import org.eclipse.core.databinding.observable.list.IObservableList;
-import org.eclipse.core.databinding.observable.list.ObservableList;
-import org.eclipse.emf.common.command.Command;
-import org.eclipse.emf.common.command.CompoundCommand;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EReference;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.edit.command.AddCommand;
-import org.eclipse.emf.edit.command.DeleteCommand;
-import org.eclipse.emf.edit.command.RemoveCommand;
-import org.eclipse.emf.edit.command.SetCommand;
-import org.eclipse.emf.edit.domain.EditingDomain;
-import org.eclipse.papyrus.infra.widgets.editors.AbstractEditor;
-import org.eclipse.papyrus.infra.widgets.editors.ICommitListener;
-
-/**
- * An ObservableList using EMF Commands to edit the underlying list.
- * The commands are executed when the {@link #commit(AbstractEditor)} method is called.
- * However, the read operations (such as get, size, ...) return up-to-date
- * results, even when {@link #commit(AbstractEditor)} hasn't been called.
- *
- * @author Camille Letavernier
- */
-@SuppressWarnings({ "unchecked", "rawtypes" })
-public class EMFObservableList extends ObservableList implements ICommitListener, IChangeListener, IObserving {
-
- /**
- * The list of commands that haven't been executed yet
- */
- protected List<Command> commands = new LinkedList<Command>();
-
- /**
- * The editing domain on which the commands will be executed
- */
- protected EditingDomain editingDomain;
-
- /**
- * The edited EObject
- */
- protected EObject source;
-
- /**
- * The feature being edited
- */
- protected EStructuralFeature feature;
-
- /**
- * The list to be updated only on #commit() calls
- */
- protected List<?> concreteList;
-
- /**
- *
- * Constructor.
- *
- * @param wrappedList
- * The list to be edited when #commit() is called
- * @param domain
- * The editing domain on which the commands will be executed
- * @param source
- * The EObject from which the list will be retrieved
- * @param feature
- * The feature from which the list will be retrieved
- */
- public EMFObservableList(List<?> wrappedList, EditingDomain domain, EObject source, EStructuralFeature feature) {
- super(new LinkedList<Object>(wrappedList), Object.class);
- this.concreteList = wrappedList;
- this.editingDomain = domain;
- this.source = source;
- this.feature = feature;
-
- if (concreteList instanceof IObservableList) {
- ((IObservableList) concreteList).addChangeListener(this);
- }
- }
-
- protected boolean isCommitting;
-
- public void handleChange(ChangeEvent event) {
- if (isCommitting) {
- return; // We're modifying the wrapped Observable list, which sends us change events. Ignore them.
- }
-
- // Refresh if we don't have pending changes
- if (commands.isEmpty()) {
- refreshCacheList();
- }
- }
-
- public Object getObserved() {
- return source;
- }
-
- @Override
- public synchronized void dispose() {
- if (concreteList instanceof IObservableList) {
- ((IObservableList) concreteList).removeChangeListener(this);
- }
- super.dispose();
- }
-
- /**
- * Forces this list to commit all the pending commands. Only one composite command will
- * be executed, and can be undone in a single operation.
- *
- * @see org.eclipse.papyrus.infra.widgets.editors.ICommitListener#commit(AbstractEditor)
- *
- */
- public synchronized void commit(AbstractEditor editor) {
-
- isCommitting = true;
-
- if (commands.isEmpty()) {
- return;
- }
-
- CompoundCommand compoundCommand = new CompoundCommand() {
-
- @Override
- public void execute() {
- super.execute();
- refreshCacheList();
- }
-
- @Override
- public void undo() {
- super.undo();
- refreshCacheList();
- }
-
- @Override
- public void redo() {
- super.redo();
- refreshCacheList();
- }
-
- @Override
- protected boolean prepare() {
- if (commandList.isEmpty()) {
- return false;
- } else {
- // We only test the first command, as the following ones might depend
- // on the first command's execution. StrictCompoundCommands don't seem
- // to be compatible with emf transaction (execute() is called by
- // canExecute(), before the transaction is started)
- return commandList.get(0).canExecute();
- }
- }
- };
-
- for (Command cmd : commands) {
- compoundCommand.append(cmd);
- }
-
- editingDomain.getCommandStack().execute(compoundCommand);
- refreshCacheList();
- commands.clear();
-
- isCommitting = false;
- }
-
- /**
- * Refresh the cached list by copying the real list
- */
- protected void refreshCacheList() {
- if (isDisposed()) {
- // This observable can be disposed, but the commands might still be
- // in the command stack. Undo() or Redo() will call this method, which
- // should be ignored. The command should probably not call refresh directly ;
- // we should have listeners on the concrete list... but it is not necessarily
- // observable
- return;
- }
- wrappedList.clear();
- wrappedList.addAll(concreteList);
- fireListChange(null);
- }
-
- @Override
- public void add(int index, Object value) {
- Command command = getAddCommand(index, value);
- commands.add(command);
-
- wrappedList.add(index, value);
- fireListChange(null);
- }
-
- @Override
- public void clear() {
- Command command = getClearCommand();
- commands.add(command);
-
- wrappedList.clear();
- fireListChange(null);
- }
-
- @Override
- public boolean add(Object o) {
- Command command = getAddCommand(o);
- commands.add(command);
-
- boolean result = wrappedList.add(o);
- fireListChange(null);
- return result;
- }
-
- @Override
- public boolean remove(Object o) {
- Command command = getRemoveCommand(o);
-
- commands.add(command);
-
- boolean result = wrappedList.remove(o);
- fireListChange(null);
- return result;
- }
-
- @Override
- public boolean addAll(Collection c) {
- Command command = getAddAllCommand(c);
- commands.add(command);
-
- boolean result = wrappedList.addAll(c);
- fireListChange(null);
- return result;
- }
-
- @Override
- public boolean addAll(int index, Collection c) {
- Command command = getAddAllCommand(index, c);
- commands.add(command);
-
- boolean result = wrappedList.addAll(index, c);
- fireListChange(null);
- return result;
- }
-
- @Override
- public boolean removeAll(Collection c) {
- Command command = getRemoveCommand(c);
- commands.add(command);
-
- boolean result = wrappedList.removeAll(c);
- fireListChange(null);
- return result;
- }
-
- @Override
- public boolean retainAll(Collection c) {
- Command command = getRetainAllCommand(c);
- commands.add(command);
-
- boolean result = wrappedList.retainAll(c);
- fireListChange(null);
- return result;
- }
-
- @Override
- public Object set(int index, Object element) {
- Command command = getSetCommand(index, element);
- commands.add(command);
-
- Object result = wrappedList.set(index, element);
- fireListChange(null);
- return result;
- }
-
- @Override
- public Object move(int oldIndex, int newIndex) {
- commands.addAll(getMoveCommands(oldIndex, newIndex));
-
- Object value = get(oldIndex);
- wrappedList.remove(oldIndex);
- wrappedList.add(newIndex, value);
-
- fireListChange(null);
-
- return value;
- }
-
- @Override
- public Object remove(int index) {
- Object value = get(index);
- if (value != null) {
- Command command = getRemoveCommand(index);
- commands.add(command);
- }
-
- Object result = wrappedList.remove(index);
- fireListChange(null);
- return result;
- }
-
- public Command getAddCommand(int index, Object value) {
- return AddCommand.create(editingDomain, source, feature, value, index);
- }
-
- public Command getAddCommand(Object value) {
- return AddCommand.create(editingDomain, source, feature, value);
- }
-
- public Command getAddAllCommand(Collection<?> values) {
- return AddCommand.create(editingDomain, source, feature, values);
- }
-
- public Command getAddAllCommand(int index, Collection<?> values) {
- return AddCommand.create(editingDomain, source, feature, values, index);
- }
-
- public Command getClearCommand() {
- return getRemoveAllCommand(new LinkedList<Object>(wrappedList));
- }
-
- public Command getRemoveCommand(int index) {
- Object value = get(index);
- return getRemoveCommand(value);
- }
-
- public Command getRemoveCommand(Object value) {
- Command cmd = RemoveCommand.create(editingDomain, source, feature, value);
- if (value instanceof EObject && feature instanceof EReference && ((EReference) feature).isContainment()) {
- addDestroyCommand(cmd, (EObject) value);
- }
- return cmd;
- }
-
- public Command getRemoveAllCommand(Collection<?> values) {
- CompoundCommand cc = new CompoundCommand("Edit list");
-
- if (feature instanceof EReference && ((EReference) feature).isContainment() && values != null) {
- for (Object o : values) {
- if (o instanceof EObject) {
- addDestroyCommand(cc, (EObject) o);
- }
- }
- }
-
- cc.append(RemoveCommand.create(editingDomain, source, feature, values));
- return cc;
- }
-
- public List<Command> getMoveCommands(int oldIndex, int newIndex) {
- Object value = get(oldIndex);
- List<Command> commands = new LinkedList<Command>();
- commands.add(getRemoveCommand(value));
- commands.add(getAddCommand(newIndex, value));
- return commands;
- }
-
- public Command getRetainAllCommand(Collection<?> values) {
- List<Object> objectsToRemove = new LinkedList<Object>();
- for (Object object : values) {
- if (!contains(object)) {
- objectsToRemove.add(object);
- }
- }
- if (!objectsToRemove.isEmpty()) {
- return getRemoveAllCommand(objectsToRemove);
- } else {
- return null;
- }
- }
-
- public Command getSetCommand(int index, Object value) {
- Object oldValue = get(index);
- Command command = SetCommand.create(editingDomain, source, feature, value, index);
- if (oldValue instanceof EObject && feature instanceof EReference && ((EReference) feature).isContainment()) {
- addDestroyCommand(command, (EObject) oldValue);
- }
- return command;
- }
-
- protected void addDestroyCommand(Command cmd, EObject objToDestroy) {
- Command destroyCmd = DeleteCommand.create(editingDomain, objToDestroy);
-
- if (cmd instanceof CompoundCommand) {
- ((CompoundCommand) cmd).append(destroyCmd);
- } else {
- cmd.chain(destroyCmd);
- }
- }
-
-}
+/***************************************************************************** + * Copyright (c) 2010, 2014 CEA LIST and others. + * + * 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 + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation + * Christian W. Damus (CEA) - bug 402525 + * + *****************************************************************************/ +package org.eclipse.papyrus.infra.ui.emf.databinding; + +import java.util.Collection; +import java.util.LinkedList; +import java.util.List; + +import org.eclipse.core.databinding.observable.ChangeEvent; +import org.eclipse.core.databinding.observable.IChangeListener; +import org.eclipse.core.databinding.observable.IObserving; +import org.eclipse.core.databinding.observable.list.IObservableList; +import org.eclipse.core.databinding.observable.list.ObservableList; +import org.eclipse.emf.common.command.Command; +import org.eclipse.emf.common.command.CompoundCommand; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EReference; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.edit.command.AddCommand; +import org.eclipse.emf.edit.command.DeleteCommand; +import org.eclipse.emf.edit.command.RemoveCommand; +import org.eclipse.emf.edit.command.SetCommand; +import org.eclipse.emf.edit.domain.EditingDomain; +import org.eclipse.papyrus.infra.widgets.editors.AbstractEditor; +import org.eclipse.papyrus.infra.widgets.editors.ICommitListener; + +/** + * An ObservableList using EMF Commands to edit the underlying list. + * The commands are executed when the {@link #commit(AbstractEditor)} method is called. + * However, the read operations (such as get, size, ...) return up-to-date + * results, even when {@link #commit(AbstractEditor)} hasn't been called. + * + * @author Camille Letavernier + */ +@SuppressWarnings({ "unchecked", "rawtypes" }) +public class EMFObservableList extends ObservableList implements ICommitListener, IChangeListener, IObserving { + + /** + * The list of commands that haven't been executed yet + */ + protected List<Command> commands = new LinkedList<Command>(); + + /** + * The editing domain on which the commands will be executed + */ + protected EditingDomain editingDomain; + + /** + * The edited EObject + */ + protected EObject source; + + /** + * The feature being edited + */ + protected EStructuralFeature feature; + + /** + * The list to be updated only on #commit() calls + */ + protected List<?> concreteList; + + /** + * + * Constructor. + * + * @param wrappedList + * The list to be edited when #commit() is called + * @param domain + * The editing domain on which the commands will be executed + * @param source + * The EObject from which the list will be retrieved + * @param feature + * The feature from which the list will be retrieved + */ + public EMFObservableList(List<?> wrappedList, EditingDomain domain, EObject source, EStructuralFeature feature) { + super(new LinkedList<Object>(wrappedList), Object.class); + this.concreteList = wrappedList; + this.editingDomain = domain; + this.source = source; + this.feature = feature; + + if (concreteList instanceof IObservableList) { + ((IObservableList) concreteList).addChangeListener(this); + } + } + + protected boolean isCommitting; + + public void handleChange(ChangeEvent event) { + if (isCommitting) { + return; // We're modifying the wrapped Observable list, which sends us change events. Ignore them. + } + + // Refresh if we don't have pending changes + if (commands.isEmpty()) { + refreshCacheList(); + } + } + + public Object getObserved() { + return source; + } + + @Override + public synchronized void dispose() { + if (concreteList instanceof IObservableList) { + ((IObservableList) concreteList).removeChangeListener(this); + } + super.dispose(); + } + + /** + * Forces this list to commit all the pending commands. Only one composite command will + * be executed, and can be undone in a single operation. + * + * @see org.eclipse.papyrus.infra.widgets.editors.ICommitListener#commit(AbstractEditor) + * + */ + public synchronized void commit(AbstractEditor editor) { + + isCommitting = true; + + if (commands.isEmpty()) { + return; + } + + CompoundCommand compoundCommand = new CompoundCommand() { + + @Override + public void execute() { + super.execute(); + refreshCacheList(); + } + + @Override + public void undo() { + super.undo(); + refreshCacheList(); + } + + @Override + public void redo() { + super.redo(); + refreshCacheList(); + } + + @Override + protected boolean prepare() { + if (commandList.isEmpty()) { + return false; + } else { + // We only test the first command, as the following ones might depend + // on the first command's execution. StrictCompoundCommands don't seem + // to be compatible with emf transaction (execute() is called by + // canExecute(), before the transaction is started) + return commandList.get(0).canExecute(); + } + } + }; + + for (Command cmd : commands) { + compoundCommand.append(cmd); + } + + editingDomain.getCommandStack().execute(compoundCommand); + refreshCacheList(); + commands.clear(); + + isCommitting = false; + } + + /** + * Refresh the cached list by copying the real list + */ + protected void refreshCacheList() { + if (isDisposed()) { + // This observable can be disposed, but the commands might still be + // in the command stack. Undo() or Redo() will call this method, which + // should be ignored. The command should probably not call refresh directly ; + // we should have listeners on the concrete list... but it is not necessarily + // observable + return; + } + wrappedList.clear(); + wrappedList.addAll(concreteList); + fireListChange(null); + } + + @Override + public void add(int index, Object value) { + Command command = getAddCommand(index, value); + commands.add(command); + + wrappedList.add(index, value); + fireListChange(null); + } + + @Override + public void clear() { + Command command = getClearCommand(); + commands.add(command); + + wrappedList.clear(); + fireListChange(null); + } + + @Override + public boolean add(Object o) { + Command command = getAddCommand(o); + commands.add(command); + + boolean result = wrappedList.add(o); + fireListChange(null); + return result; + } + + @Override + public boolean remove(Object o) { + Command command = getRemoveCommand(o); + + commands.add(command); + + boolean result = wrappedList.remove(o); + fireListChange(null); + return result; + } + + @Override + public boolean addAll(Collection c) { + Command command = getAddAllCommand(c); + commands.add(command); + + boolean result = wrappedList.addAll(c); + fireListChange(null); + return result; + } + + @Override + public boolean addAll(int index, Collection c) { + Command command = getAddAllCommand(index, c); + commands.add(command); + + boolean result = wrappedList.addAll(index, c); + fireListChange(null); + return result; + } + + @Override + public boolean removeAll(Collection c) { + Command command = getRemoveCommand(c); + commands.add(command); + + boolean result = wrappedList.removeAll(c); + fireListChange(null); + return result; + } + + @Override + public boolean retainAll(Collection c) { + Command command = getRetainAllCommand(c); + commands.add(command); + + boolean result = wrappedList.retainAll(c); + fireListChange(null); + return result; + } + + @Override + public Object set(int index, Object element) { + Command command = getSetCommand(index, element); + commands.add(command); + + Object result = wrappedList.set(index, element); + fireListChange(null); + return result; + } + + @Override + public Object move(int oldIndex, int newIndex) { + commands.addAll(getMoveCommands(oldIndex, newIndex)); + + Object value = get(oldIndex); + wrappedList.remove(oldIndex); + wrappedList.add(newIndex, value); + + fireListChange(null); + + return value; + } + + @Override + public Object remove(int index) { + Object value = get(index); + if (value != null) { + Command command = getRemoveCommand(index); + commands.add(command); + } + + Object result = wrappedList.remove(index); + fireListChange(null); + return result; + } + + public Command getAddCommand(int index, Object value) { + return AddCommand.create(editingDomain, source, feature, value, index); + } + + public Command getAddCommand(Object value) { + return AddCommand.create(editingDomain, source, feature, value); + } + + public Command getAddAllCommand(Collection<?> values) { + return AddCommand.create(editingDomain, source, feature, values); + } + + public Command getAddAllCommand(int index, Collection<?> values) { + return AddCommand.create(editingDomain, source, feature, values, index); + } + + public Command getClearCommand() { + return getRemoveAllCommand(new LinkedList<Object>(wrappedList)); + } + + public Command getRemoveCommand(int index) { + Object value = get(index); + return getRemoveCommand(value); + } + + public Command getRemoveCommand(Object value) { + Command cmd = RemoveCommand.create(editingDomain, source, feature, value); + if (value instanceof EObject && feature instanceof EReference && ((EReference) feature).isContainment()) { + addDestroyCommand(cmd, (EObject) value); + } + return cmd; + } + + public Command getRemoveAllCommand(Collection<?> values) { + CompoundCommand cc = new CompoundCommand("Edit list"); + + if (feature instanceof EReference && ((EReference) feature).isContainment() && values != null) { + for (Object o : values) { + if (o instanceof EObject) { + addDestroyCommand(cc, (EObject) o); + } + } + } + + cc.append(RemoveCommand.create(editingDomain, source, feature, values)); + return cc; + } + + public List<Command> getMoveCommands(int oldIndex, int newIndex) { + Object value = get(oldIndex); + List<Command> commands = new LinkedList<Command>(); + commands.add(getRemoveCommand(value)); + commands.add(getAddCommand(newIndex, value)); + return commands; + } + + public Command getRetainAllCommand(Collection<?> values) { + List<Object> objectsToRemove = new LinkedList<Object>(); + for (Object object : values) { + if (!contains(object)) { + objectsToRemove.add(object); + } + } + if (!objectsToRemove.isEmpty()) { + return getRemoveAllCommand(objectsToRemove); + } else { + return null; + } + } + + public Command getSetCommand(int index, Object value) { + Object oldValue = get(index); + Command command = SetCommand.create(editingDomain, source, feature, value, index); + if (oldValue instanceof EObject && feature instanceof EReference && ((EReference) feature).isContainment()) { + addDestroyCommand(command, (EObject) oldValue); + } + return command; + } + + protected void addDestroyCommand(Command cmd, EObject objToDestroy) { + Command destroyCmd = DeleteCommand.create(editingDomain, objToDestroy); + + if (cmd instanceof CompoundCommand) { + ((CompoundCommand) cmd).append(destroyCmd); + } else { + cmd.chain(destroyCmd); + } + } + +} diff --git a/plugins/infra/emf/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/databinding/EMFObservableValue.java b/plugins/infra/emf/org.eclipse.papyrus.infra.ui.emf/src/org/eclipse/papyrus/infra/ui/emf/databinding/EMFObservableValue.java index 402ce4f1927..c054715c44e 100644 --- a/plugins/infra/emf/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/databinding/EMFObservableValue.java +++ b/plugins/infra/emf/org.eclipse.papyrus.infra.ui.emf/src/org/eclipse/papyrus/infra/ui/emf/databinding/EMFObservableValue.java @@ -9,7 +9,7 @@ * Contributors: * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation *****************************************************************************/ -package org.eclipse.papyrus.infra.emf.databinding; +package org.eclipse.papyrus.infra.ui.emf.databinding; import org.eclipse.core.databinding.observable.Realm; import org.eclipse.emf.common.command.Command; diff --git a/plugins/infra/emf/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/dialog/CommandCreationProgressMonitorDialog.java b/plugins/infra/emf/org.eclipse.papyrus.infra.ui.emf/src/org/eclipse/papyrus/infra/ui/emf/dialog/CommandCreationProgressMonitorDialog.java index 5cf29109ab7..0ad9634633a 100644 --- a/plugins/infra/emf/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/dialog/CommandCreationProgressMonitorDialog.java +++ b/plugins/infra/emf/org.eclipse.papyrus.infra.ui.emf/src/org/eclipse/papyrus/infra/ui/emf/dialog/CommandCreationProgressMonitorDialog.java @@ -1,102 +1,102 @@ -/*****************************************************************************
- * Copyright (c) 2012 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
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Vincent Lorenzo (CEA LIST) Vincent.Lorenzo@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.infra.emf.dialog;
-
-import org.eclipse.emf.common.command.Command;
-import org.eclipse.jface.dialogs.ProgressMonitorDialog;
-import org.eclipse.swt.widgets.Shell;
-
-
-/**
- *
- * This dialog allows to create a command using a progress bar dialog
- * Typical usage is:
- *
- * <pre>
- * CreationCommandProgressMonitorDialog commandCreationDialog = new CreationCommandProgressMonitorDialog(Display.getShell());
- *
- * try {
- * commandCreationDialog.run(true, true, new IRunnableWithProgress() {
- *
- * public void run(final IProgressMonitor cancelProvider) throws InvocationTargetException, InterruptedException {
- * final Command cmd = commandProvider.getCommand();
- * commandCreationDialog.setCreatedCommand(cmd);
- * }
- * });
- * } catch (final InvocationTargetException e) {
- * Activator.log.error(e);
- * } catch (final InterruptedException e) {
- * Activator.log.error(e);
- * }
- * final int returnCode = commandCreationDialog.getReturnCode();
- * if(returnCode == Window.OK) {
- * final Command createdCommand = commandCreationDialog.getCreatedCommand();
- * ...
- * }
- * </pre>
- */
-public class CommandCreationProgressMonitorDialog extends ProgressMonitorDialog {
-
- /** the created command */
- private Command createdCommand = null;
-
- /** an exception threw by the command creation */
- private Exception exception;
-
- /**
- *
- * Constructor.
- *
- * @param parent
- */
- public CommandCreationProgressMonitorDialog(final Shell parent) {
- super(parent);
-
- }
-
- /**
- * Setter for {@link #createdCommand}
- *
- * @param cmd
- * the created command
- */
- public void setCreatedCommand(final Command cmd) {
- this.createdCommand = cmd;
- }
-
- /**
- * Getter for {@link #createdCommand}
- *
- * @return
- * the created command
- */
- public Command getCreatedCommand() {
- return this.createdCommand;
- }
-
- public void setCaughtException(final Exception e) {
- this.exception = e;
- }
-
- /**
- *
- * @return
- * the exception throwed by the command creation
- */
- public Exception getCaughtException() {
- return this.exception;
- }
-
-
-}
+/***************************************************************************** + * Copyright (c) 2012 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 + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Vincent Lorenzo (CEA LIST) Vincent.Lorenzo@cea.fr - Initial API and implementation + * + *****************************************************************************/ +package org.eclipse.papyrus.infra.ui.emf.dialog; + +import org.eclipse.emf.common.command.Command; +import org.eclipse.jface.dialogs.ProgressMonitorDialog; +import org.eclipse.swt.widgets.Shell; + + +/** + * + * This dialog allows to create a command using a progress bar dialog + * Typical usage is: + * + * <pre> + * CreationCommandProgressMonitorDialog commandCreationDialog = new CreationCommandProgressMonitorDialog(Display.getShell()); + * + * try { + * commandCreationDialog.run(true, true, new IRunnableWithProgress() { + * + * public void run(final IProgressMonitor cancelProvider) throws InvocationTargetException, InterruptedException { + * final Command cmd = commandProvider.getCommand(); + * commandCreationDialog.setCreatedCommand(cmd); + * } + * }); + * } catch (final InvocationTargetException e) { + * Activator.log.error(e); + * } catch (final InterruptedException e) { + * Activator.log.error(e); + * } + * final int returnCode = commandCreationDialog.getReturnCode(); + * if(returnCode == Window.OK) { + * final Command createdCommand = commandCreationDialog.getCreatedCommand(); + * ... + * } + * </pre> + */ +public class CommandCreationProgressMonitorDialog extends ProgressMonitorDialog { + + /** the created command */ + private Command createdCommand = null; + + /** an exception threw by the command creation */ + private Exception exception; + + /** + * + * Constructor. + * + * @param parent + */ + public CommandCreationProgressMonitorDialog(final Shell parent) { + super(parent); + + } + + /** + * Setter for {@link #createdCommand} + * + * @param cmd + * the created command + */ + public void setCreatedCommand(final Command cmd) { + this.createdCommand = cmd; + } + + /** + * Getter for {@link #createdCommand} + * + * @return + * the created command + */ + public Command getCreatedCommand() { + return this.createdCommand; + } + + public void setCaughtException(final Exception e) { + this.exception = e; + } + + /** + * + * @return + * the exception throwed by the command creation + */ + public Exception getCaughtException() { + return this.exception; + } + + +} diff --git a/plugins/infra/emf/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/dialog/NestedEditingDialogContext.java b/plugins/infra/emf/org.eclipse.papyrus.infra.ui.emf/src/org/eclipse/papyrus/infra/ui/emf/dialog/NestedEditingDialogContext.java index 2ba17a5167d..ae0965f85d2 100644 --- a/plugins/infra/emf/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/dialog/NestedEditingDialogContext.java +++ b/plugins/infra/emf/org.eclipse.papyrus.infra.ui.emf/src/org/eclipse/papyrus/infra/ui/emf/dialog/NestedEditingDialogContext.java @@ -10,7 +10,7 @@ * Christian W. Damus (CEA) - Initial API and implementation * */ -package org.eclipse.papyrus.infra.emf.dialog; +package org.eclipse.papyrus.infra.ui.emf.dialog; import org.eclipse.emf.ecore.EObject; import org.eclipse.emf.ecore.resource.Resource; diff --git a/plugins/infra/emf/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/providers/AdapterFactoryHierarchicContentProvider.java b/plugins/infra/emf/org.eclipse.papyrus.infra.ui.emf/src/org/eclipse/papyrus/infra/ui/emf/providers/AdapterFactoryHierarchicContentProvider.java index 5a1653e88c2..d7363e6fd1f 100644 --- a/plugins/infra/emf/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/providers/AdapterFactoryHierarchicContentProvider.java +++ b/plugins/infra/emf/org.eclipse.papyrus.infra.ui.emf/src/org/eclipse/papyrus/infra/ui/emf/providers/AdapterFactoryHierarchicContentProvider.java @@ -10,7 +10,7 @@ * Christian W. Damus (CEA) - Initial API and implementation * */ -package org.eclipse.papyrus.infra.emf.providers; +package org.eclipse.papyrus.infra.ui.emf.providers; import org.eclipse.emf.common.notify.AdapterFactory; import org.eclipse.emf.edit.ui.provider.AdapterFactoryContentProvider; diff --git a/plugins/infra/emf/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/providers/AnyTypeLabelProvider.java b/plugins/infra/emf/org.eclipse.papyrus.infra.ui.emf/src/org/eclipse/papyrus/infra/ui/emf/providers/AnyTypeLabelProvider.java index d6b55f7c363..d4336218ccf 100644 --- a/plugins/infra/emf/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/providers/AnyTypeLabelProvider.java +++ b/plugins/infra/emf/org.eclipse.papyrus.infra.ui.emf/src/org/eclipse/papyrus/infra/ui/emf/providers/AnyTypeLabelProvider.java @@ -11,7 +11,7 @@ * Camille Letavernier (camille.letavernier@cea.fr) - Initial API and implementation
*
*****************************************************************************/
-package org.eclipse.papyrus.infra.emf.providers;
+package org.eclipse.papyrus.infra.ui.emf.providers;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EObject;
diff --git a/plugins/infra/emf/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/providers/EMFContentProvider.java b/plugins/infra/emf/org.eclipse.papyrus.infra.ui.emf/src/org/eclipse/papyrus/infra/ui/emf/providers/EMFContentProvider.java index f2f3e4361a2..ebcfec4c357 100644 --- a/plugins/infra/emf/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/providers/EMFContentProvider.java +++ b/plugins/infra/emf/org.eclipse.papyrus.infra.ui.emf/src/org/eclipse/papyrus/infra/ui/emf/providers/EMFContentProvider.java @@ -9,7 +9,7 @@ * Contributors:
* Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
*****************************************************************************/
-package org.eclipse.papyrus.infra.emf.providers;
+package org.eclipse.papyrus.infra.ui.emf.providers;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EClassifier;
@@ -19,9 +19,9 @@ import org.eclipse.emf.ecore.EStructuralFeature; import org.eclipse.emf.ecore.resource.ResourceSet;
import org.eclipse.jface.viewers.IStructuredContentProvider;
import org.eclipse.jface.viewers.ITreeContentProvider;
-import org.eclipse.papyrus.infra.emf.providers.strategy.ContainmentBrowseStrategy;
-import org.eclipse.papyrus.infra.emf.providers.strategy.SemanticEMFContentProvider;
import org.eclipse.papyrus.infra.emf.utils.HistoryUtil;
+import org.eclipse.papyrus.infra.ui.emf.providers.strategy.ContainmentBrowseStrategy;
+import org.eclipse.papyrus.infra.ui.emf.providers.strategy.SemanticEMFContentProvider;
import org.eclipse.papyrus.infra.widgets.providers.EmptyContentProvider;
import org.eclipse.papyrus.infra.widgets.providers.EncapsulatedContentProvider;
import org.eclipse.papyrus.infra.widgets.strategy.IStrategyBasedContentProvider;
diff --git a/plugins/infra/emf/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/providers/EMFEnumeratorContentProvider.java b/plugins/infra/emf/org.eclipse.papyrus.infra.ui.emf/src/org/eclipse/papyrus/infra/ui/emf/providers/EMFEnumeratorContentProvider.java index aed1a94544f..5333a5ce5d1 100644 --- a/plugins/infra/emf/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/providers/EMFEnumeratorContentProvider.java +++ b/plugins/infra/emf/org.eclipse.papyrus.infra.ui.emf/src/org/eclipse/papyrus/infra/ui/emf/providers/EMFEnumeratorContentProvider.java @@ -9,7 +9,7 @@ * Contributors:
* Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
*****************************************************************************/
-package org.eclipse.papyrus.infra.emf.providers;
+package org.eclipse.papyrus.infra.ui.emf.providers;
import org.eclipse.emf.common.util.Enumerator;
import org.eclipse.emf.ecore.EClassifier;
diff --git a/plugins/infra/emf/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/providers/EMFFilteredLabelProvider.java b/plugins/infra/emf/org.eclipse.papyrus.infra.ui.emf/src/org/eclipse/papyrus/infra/ui/emf/providers/EMFFilteredLabelProvider.java index c36d6592798..80f175559f3 100644 --- a/plugins/infra/emf/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/providers/EMFFilteredLabelProvider.java +++ b/plugins/infra/emf/org.eclipse.papyrus.infra.ui.emf/src/org/eclipse/papyrus/infra/ui/emf/providers/EMFFilteredLabelProvider.java @@ -9,7 +9,7 @@ * Contributors:
* Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
*****************************************************************************/
-package org.eclipse.papyrus.infra.emf.providers;
+package org.eclipse.papyrus.infra.ui.emf.providers;
import java.util.Iterator;
diff --git a/plugins/infra/emf/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/providers/EMFGraphicalContentProvider.java b/plugins/infra/emf/org.eclipse.papyrus.infra.ui.emf/src/org/eclipse/papyrus/infra/ui/emf/providers/EMFGraphicalContentProvider.java index aa0761772e3..fe34bbb7d20 100644 --- a/plugins/infra/emf/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/providers/EMFGraphicalContentProvider.java +++ b/plugins/infra/emf/org.eclipse.papyrus.infra.ui.emf/src/org/eclipse/papyrus/infra/ui/emf/providers/EMFGraphicalContentProvider.java @@ -14,7 +14,7 @@ * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - History integration * *****************************************************************************/ -package org.eclipse.papyrus.infra.emf.providers; +package org.eclipse.papyrus.infra.ui.emf.providers; import java.util.ArrayList; import java.util.Arrays; @@ -40,8 +40,8 @@ import org.eclipse.jface.viewers.StructuredViewer; import org.eclipse.jface.viewers.TableViewer; import org.eclipse.jface.viewers.Viewer; import org.eclipse.jface.viewers.ViewerFilter; -import org.eclipse.papyrus.infra.emf.Activator; import org.eclipse.papyrus.infra.services.labelprovider.service.IDetailLabelProvider; +import org.eclipse.papyrus.infra.ui.internal.emf.Activator; import org.eclipse.papyrus.infra.widgets.editors.AbstractEditor; import org.eclipse.papyrus.infra.widgets.editors.ICommitListener; import org.eclipse.papyrus.infra.widgets.editors.StringEditor; diff --git a/plugins/infra/emf/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/providers/EMFLabelProvider.java b/plugins/infra/emf/org.eclipse.papyrus.infra.ui.emf/src/org/eclipse/papyrus/infra/ui/emf/providers/EMFLabelProvider.java index 746d71885de..20e055e6a78 100644 --- a/plugins/infra/emf/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/providers/EMFLabelProvider.java +++ b/plugins/infra/emf/org.eclipse.papyrus.infra.ui.emf/src/org/eclipse/papyrus/infra/ui/emf/providers/EMFLabelProvider.java @@ -9,7 +9,7 @@ * Contributors:
* Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
*****************************************************************************/
-package org.eclipse.papyrus.infra.emf.providers;
+package org.eclipse.papyrus.infra.ui.emf.providers;
import java.util.Collection;
import java.util.HashSet;
@@ -23,10 +23,10 @@ import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.papyrus.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.TreeElement;
import org.eclipse.papyrus.emf.facet.custom.ui.internal.DecoratingCustomizedLabelProvider;
import org.eclipse.papyrus.emf.facet.custom.ui.internal.ResolvingCustomizedLabelProvider;
-import org.eclipse.papyrus.infra.emf.Activator;
import org.eclipse.papyrus.infra.emf.utils.EMFHelper;
import org.eclipse.papyrus.infra.services.labelprovider.service.IDetailLabelProvider;
import org.eclipse.papyrus.infra.services.labelprovider.service.IQualifierLabelProvider;
+import org.eclipse.papyrus.infra.ui.internal.emf.Activator;
import org.eclipse.swt.graphics.Image;
/**
diff --git a/plugins/infra/emf/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/providers/HistoryContentProvider.java b/plugins/infra/emf/org.eclipse.papyrus.infra.ui.emf/src/org/eclipse/papyrus/infra/ui/emf/providers/HistoryContentProvider.java index e6691a33267..dbcab29ca92 100644 --- a/plugins/infra/emf/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/providers/HistoryContentProvider.java +++ b/plugins/infra/emf/org.eclipse.papyrus.infra.ui.emf/src/org/eclipse/papyrus/infra/ui/emf/providers/HistoryContentProvider.java @@ -9,7 +9,7 @@ * Contributors:
* Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
*****************************************************************************/
-package org.eclipse.papyrus.infra.emf.providers;
+package org.eclipse.papyrus.infra.ui.emf.providers;
import java.util.List;
diff --git a/plugins/infra/emf/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/providers/MoDiscoContentProvider.java b/plugins/infra/emf/org.eclipse.papyrus.infra.ui.emf/src/org/eclipse/papyrus/infra/ui/emf/providers/MoDiscoContentProvider.java index 035bce4ac83..39aa8fe4a3e 100644 --- a/plugins/infra/emf/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/providers/MoDiscoContentProvider.java +++ b/plugins/infra/emf/org.eclipse.papyrus.infra.ui.emf/src/org/eclipse/papyrus/infra/ui/emf/providers/MoDiscoContentProvider.java @@ -8,7 +8,7 @@ * Contributors:
* Nicolas Bros (Mia-Software) - initial API and implementation
*******************************************************************************/
-package org.eclipse.papyrus.infra.emf.providers;
+package org.eclipse.papyrus.infra.ui.emf.providers;
import java.util.ArrayList;
import java.util.Iterator;
@@ -22,7 +22,7 @@ import org.eclipse.papyrus.infra.core.resource.ModelSet; import org.eclipse.papyrus.infra.core.resource.ModelUtils;
import org.eclipse.papyrus.infra.core.sashwindows.di.service.IPageManager;
import org.eclipse.papyrus.infra.core.services.ServicesRegistry;
-import org.eclipse.papyrus.infra.emf.Activator;
+import org.eclipse.papyrus.infra.ui.internal.emf.Activator;
/**
* the content provider that inherits of modisco properties
diff --git a/plugins/infra/emf/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/providers/ResourceFilteredLabelProvider.java b/plugins/infra/emf/org.eclipse.papyrus.infra.ui.emf/src/org/eclipse/papyrus/infra/ui/emf/providers/ResourceFilteredLabelProvider.java index 6440770e64f..6b2c37d22d1 100644 --- a/plugins/infra/emf/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/providers/ResourceFilteredLabelProvider.java +++ b/plugins/infra/emf/org.eclipse.papyrus.infra.ui.emf/src/org/eclipse/papyrus/infra/ui/emf/providers/ResourceFilteredLabelProvider.java @@ -10,7 +10,7 @@ * Christian W. Damus (CEA) - Initial API and implementation * */ -package org.eclipse.papyrus.infra.emf.providers; +package org.eclipse.papyrus.infra.ui.emf.providers; import java.io.IOException; import java.util.Map; @@ -26,9 +26,9 @@ import org.eclipse.jface.resource.JFaceResources; import org.eclipse.jface.resource.LocalResourceManager; import org.eclipse.jface.resource.ResourceManager; import org.eclipse.osgi.util.NLS; -import org.eclipse.papyrus.infra.emf.Activator; -import org.eclipse.papyrus.infra.emf.messages.Messages; import org.eclipse.papyrus.infra.services.labelprovider.service.IFilteredLabelProvider; +import org.eclipse.papyrus.infra.ui.internal.emf.Activator; +import org.eclipse.papyrus.infra.ui.internal.emf.messages.Messages; import org.eclipse.swt.graphics.Image; import org.eclipse.ui.IEditorDescriptor; import org.eclipse.ui.PlatformUI; diff --git a/plugins/infra/emf/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/providers/SemanticFromModelExplorer.java b/plugins/infra/emf/org.eclipse.papyrus.infra.ui.emf/src/org/eclipse/papyrus/infra/ui/emf/providers/SemanticFromModelExplorer.java index 3c69f464f68..440c5efd9a9 100644 --- a/plugins/infra/emf/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/providers/SemanticFromModelExplorer.java +++ b/plugins/infra/emf/org.eclipse.papyrus.infra.ui.emf/src/org/eclipse/papyrus/infra/ui/emf/providers/SemanticFromModelExplorer.java @@ -11,7 +11,7 @@ * Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - Initial API and implementation
*
*****************************************************************************/
-package org.eclipse.papyrus.infra.emf.providers;
+package org.eclipse.papyrus.infra.ui.emf.providers;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.gmf.runtime.notation.Diagram;
diff --git a/plugins/infra/emf/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/providers/StandardEMFLabelProvider.java b/plugins/infra/emf/org.eclipse.papyrus.infra.ui.emf/src/org/eclipse/papyrus/infra/ui/emf/providers/StandardEMFLabelProvider.java index 96e25e91955..d659ec48007 100644 --- a/plugins/infra/emf/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/providers/StandardEMFLabelProvider.java +++ b/plugins/infra/emf/org.eclipse.papyrus.infra.ui.emf/src/org/eclipse/papyrus/infra/ui/emf/providers/StandardEMFLabelProvider.java @@ -10,7 +10,7 @@ * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Added support for enum literals * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Implementation of IDetailLabelProvider *******************************************************************************/ -package org.eclipse.papyrus.infra.emf.providers; +package org.eclipse.papyrus.infra.ui.emf.providers; import java.util.Arrays; import java.util.HashMap; diff --git a/plugins/infra/emf/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/providers/strategy/ContainmentBrowseStrategy.java b/plugins/infra/emf/org.eclipse.papyrus.infra.ui.emf/src/org/eclipse/papyrus/infra/ui/emf/providers/strategy/ContainmentBrowseStrategy.java index 6306cf57dc4..f92cec5d8c4 100644 --- a/plugins/infra/emf/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/providers/strategy/ContainmentBrowseStrategy.java +++ b/plugins/infra/emf/org.eclipse.papyrus.infra.ui.emf/src/org/eclipse/papyrus/infra/ui/emf/providers/strategy/ContainmentBrowseStrategy.java @@ -9,7 +9,7 @@ * Contributors:
* Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
*****************************************************************************/
-package org.eclipse.papyrus.infra.emf.providers.strategy;
+package org.eclipse.papyrus.infra.ui.emf.providers.strategy;
import java.util.ArrayList;
import java.util.Arrays;
diff --git a/plugins/infra/emf/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/providers/strategy/SemanticEMFContentProvider.java b/plugins/infra/emf/org.eclipse.papyrus.infra.ui.emf/src/org/eclipse/papyrus/infra/ui/emf/providers/strategy/SemanticEMFContentProvider.java index ab94a10c59c..7d3f273b9e1 100644 --- a/plugins/infra/emf/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/providers/strategy/SemanticEMFContentProvider.java +++ b/plugins/infra/emf/org.eclipse.papyrus.infra.ui.emf/src/org/eclipse/papyrus/infra/ui/emf/providers/strategy/SemanticEMFContentProvider.java @@ -11,7 +11,7 @@ * Christian W. Damus (CEA) - bug 410346 * *****************************************************************************/ -package org.eclipse.papyrus.infra.emf.providers.strategy; +package org.eclipse.papyrus.infra.ui.emf.providers.strategy; import java.util.Collections; import java.util.LinkedList; @@ -29,8 +29,8 @@ import org.eclipse.emf.edit.provider.IDisposable; import org.eclipse.papyrus.emf.facet.custom.core.ICustomizationManager; import org.eclipse.papyrus.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.TreeElement; import org.eclipse.papyrus.emf.facet.custom.ui.internal.CustomizedTreeContentProvider; -import org.eclipse.papyrus.infra.emf.Activator; import org.eclipse.papyrus.infra.emf.utils.EMFHelper; +import org.eclipse.papyrus.infra.ui.internal.emf.Activator; import org.eclipse.papyrus.infra.widgets.providers.IAdaptableContentProvider; import org.eclipse.papyrus.infra.widgets.providers.IHierarchicContentProvider; import org.eclipse.papyrus.infra.widgets.providers.IStaticContentProvider; diff --git a/plugins/infra/emf/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/utils/ProviderHelper.java b/plugins/infra/emf/org.eclipse.papyrus.infra.ui.emf/src/org/eclipse/papyrus/infra/ui/emf/utils/ProviderHelper.java index 52df1d82b23..77704b242af 100644 --- a/plugins/infra/emf/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/utils/ProviderHelper.java +++ b/plugins/infra/emf/org.eclipse.papyrus.infra.ui.emf/src/org/eclipse/papyrus/infra/ui/emf/utils/ProviderHelper.java @@ -1,59 +1,73 @@ -/*****************************************************************************
- * Copyright (c) 2012 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
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
- *****************************************************************************/
-package org.eclipse.papyrus.infra.emf.utils;
-
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.ecore.resource.ResourceSet;
-import org.eclipse.jface.viewers.IStructuredContentProvider;
-import org.eclipse.jface.viewers.ITreeContentProvider;
-import org.eclipse.papyrus.infra.emf.providers.EMFGraphicalContentProvider;
-import org.eclipse.papyrus.infra.emf.providers.strategy.ContainmentBrowseStrategy;
-import org.eclipse.papyrus.infra.widgets.strategy.ProviderBasedBrowseStrategy;
-import org.eclipse.papyrus.infra.widgets.strategy.StrategyBasedContentProvider;
-import org.eclipse.papyrus.infra.widgets.strategy.TreeBrowseStrategy;
-
-
-public class ProviderHelper {
-
- /**
- * Encapsulates the given content provider in a higher-level content provider
- * The returned provider uses two different strategies to display and search
- * elements, and adds a pattern filter and an History
- *
- * @param provider
- * The ContentProvider to encapsulate
- * @return
- */
- public static EMFGraphicalContentProvider encapsulateProvider(ITreeContentProvider provider, ResourceSet resourceSet, String historyId) {
- TreeBrowseStrategy browseStrategy = new ProviderBasedBrowseStrategy(provider);
- TreeBrowseStrategy revealStrategy = new ContainmentBrowseStrategy(provider);
- IStructuredContentProvider strategyProvider = new StrategyBasedContentProvider(browseStrategy, revealStrategy);
- EMFGraphicalContentProvider graphicalProvider = new EMFGraphicalContentProvider(strategyProvider, resourceSet, historyId);
-
- return graphicalProvider;
- }
-
- /**
- * Encapsulates the given content provider in a higher-level content provider
- * The returned provider uses two different strategies to display and search
- * elements, and adds a pattern filter and an History
- *
- * @param provider
- * The ContentProvider to encapsulate
- * @return
- */
- public static EMFGraphicalContentProvider encapsulateProvider(ITreeContentProvider provider, EObject editedEObject, EStructuralFeature feature) {
- ResourceSet rs = editedEObject == null ? null : editedEObject.eResource() == null ? null : editedEObject.eResource().getResourceSet();
- return encapsulateProvider(provider, rs, HistoryUtil.getHistoryID(editedEObject, feature));
- }
-}
+/***************************************************************************** + * Copyright (c) 2012, 2016 CEA LIST, Christian W. Damus, and others. + * + * 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 + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation + * Christian W. Damus - bug 485220 + * + *****************************************************************************/ +package org.eclipse.papyrus.infra.ui.emf.utils; + +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.ecore.resource.ResourceSet; +import org.eclipse.jface.viewers.IStructuredContentProvider; +import org.eclipse.jface.viewers.ITreeContentProvider; +import org.eclipse.papyrus.emf.facet.custom.core.ICustomizationManager; +import org.eclipse.papyrus.infra.emf.utils.HistoryUtil; +import org.eclipse.papyrus.infra.ui.emf.providers.EMFGraphicalContentProvider; +import org.eclipse.papyrus.infra.ui.emf.providers.strategy.ContainmentBrowseStrategy; +import org.eclipse.papyrus.infra.ui.internal.emf.Activator; +import org.eclipse.papyrus.infra.widgets.strategy.ProviderBasedBrowseStrategy; +import org.eclipse.papyrus.infra.widgets.strategy.StrategyBasedContentProvider; +import org.eclipse.papyrus.infra.widgets.strategy.TreeBrowseStrategy; + + +public class ProviderHelper { + + /** + * Obtains the customization manager used by Papyrus's EMFFacet-based content providers. + * + * @return the customization manager + */ + public static ICustomizationManager getCustomizationManager() { + return Activator.getDefault().getCustomizationManager(); + } + + /** + * Encapsulates the given content provider in a higher-level content provider + * The returned provider uses two different strategies to display and search + * elements, and adds a pattern filter and an History + * + * @param provider + * The ContentProvider to encapsulate + * @return + */ + public static EMFGraphicalContentProvider encapsulateProvider(ITreeContentProvider provider, ResourceSet resourceSet, String historyId) { + TreeBrowseStrategy browseStrategy = new ProviderBasedBrowseStrategy(provider); + TreeBrowseStrategy revealStrategy = new ContainmentBrowseStrategy(provider); + IStructuredContentProvider strategyProvider = new StrategyBasedContentProvider(browseStrategy, revealStrategy); + EMFGraphicalContentProvider graphicalProvider = new EMFGraphicalContentProvider(strategyProvider, resourceSet, historyId); + + return graphicalProvider; + } + + /** + * Encapsulates the given content provider in a higher-level content provider + * The returned provider uses two different strategies to display and search + * elements, and adds a pattern filter and an History + * + * @param provider + * The ContentProvider to encapsulate + * @return + */ + public static EMFGraphicalContentProvider encapsulateProvider(ITreeContentProvider provider, EObject editedEObject, EStructuralFeature feature) { + ResourceSet rs = editedEObject == null ? null : editedEObject.eResource() == null ? null : editedEObject.eResource().getResourceSet(); + return encapsulateProvider(provider, rs, HistoryUtil.getHistoryID(editedEObject, feature)); + } +} diff --git a/plugins/infra/emf/org.eclipse.papyrus.infra.ui.emf/src/org/eclipse/papyrus/infra/ui/internal/emf/Activator.java b/plugins/infra/emf/org.eclipse.papyrus.infra.ui.emf/src/org/eclipse/papyrus/infra/ui/internal/emf/Activator.java new file mode 100644 index 00000000000..ca3d404c299 --- /dev/null +++ b/plugins/infra/emf/org.eclipse.papyrus.infra.ui.emf/src/org/eclipse/papyrus/infra/ui/internal/emf/Activator.java @@ -0,0 +1,196 @@ +/***************************************************************************** + * Copyright (c) 2013, 2016 CEA LIST, Christian W. Damus, and others. + * + * 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 + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Camille Letavernier (camille.letavernier@cea.fr) - Initial API and implementation + * Christian W. Damus - bug 485220 + * + *****************************************************************************/ +package org.eclipse.papyrus.infra.ui.internal.emf; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; + +import org.eclipse.core.runtime.IStatus; +import org.eclipse.core.runtime.Status; +import org.eclipse.jface.dialogs.DialogSettings; +import org.eclipse.jface.dialogs.IDialogSettings; +import org.eclipse.papyrus.emf.facet.custom.core.ICustomizationCatalogManager; +import org.eclipse.papyrus.emf.facet.custom.core.ICustomizationCatalogManagerFactory; +import org.eclipse.papyrus.emf.facet.custom.core.ICustomizationManager; +import org.eclipse.papyrus.emf.facet.custom.metamodel.v0_2_0.custom.Customization; +import org.eclipse.papyrus.infra.core.log.LogHelper; +import org.eclipse.papyrus.infra.emf.CustomizationComparator; +import org.eclipse.papyrus.infra.emf.readonly.spi.IReadOnlyManagerProcessor; +import org.eclipse.papyrus.infra.ui.internal.emf.readonly.EditorReloadProcessor; +import org.eclipse.ui.plugin.AbstractUIPlugin; +import org.osgi.framework.BundleContext; +import org.osgi.framework.ServiceRegistration; + +/** + * The activator class controls the plug-in life cycle + */ +public class Activator extends AbstractUIPlugin { + + /** + * The plug-in ID + */ + public static final String PLUGIN_ID = "org.eclipse.papyrus.infra.ui.emf"; //$NON-NLS-1$ + + // The shared instance + private static Activator plugin; + + /** + * The plug-in's logger + */ + public static LogHelper log; + + private ServiceRegistration<IReadOnlyManagerProcessor> roManagerProcessorReg; + + private ICustomizationManager customizationManager; + + /** + * The constructor + */ + public Activator() { + } + + @Override + public void start(final BundleContext context) throws Exception { + super.start(context); + plugin = this; + log = new LogHelper(this); + + roManagerProcessorReg = context.registerService(IReadOnlyManagerProcessor.class, new EditorReloadProcessor(), null); + } + + @Override + public void stop(final BundleContext context) throws Exception { + if (roManagerProcessorReg != null) { + roManagerProcessorReg.unregister(); + roManagerProcessorReg = null; + } + + plugin = null; + super.stop(context); + } + + /** + * Returns the shared instance + * + * @return the shared instance + */ + public static Activator getDefault() { + return plugin; + } + + /** + * Saves the current Customization Manager settings to the preferences + */ + public void saveCustomizationManagerState() { + IDialogSettings dialogSettings = getBrowserCustomizationDialogSettings(); + List<Customization> appliedCustomizations = getCustomizationManager().getManagedCustomizations(); + + final List<Customization> registeredCustomizations = ICustomizationCatalogManagerFactory.DEFAULT.getOrCreateCustomizationCatalogManager(getCustomizationManager().getResourceSet()).getRegisteredCustomizations(); + + for (Customization customization : registeredCustomizations) { + + boolean isApplied = appliedCustomizations.contains(customization); + String settingKey = getSettingKey(customization); + + dialogSettings.put(settingKey, isApplied); + } + } + + private String getSettingKey(Customization customization) { + // do not exist anymore + return customization.eResource().getURI().toString(); + // return ""; + } + + protected IDialogSettings getBrowserCustomizationDialogSettings() { + String sectionId = CUSTOMIZATION_MANAGER_SECTION; + + IDialogSettings settings = Activator.getDefault().getDialogSettings().getSection(sectionId); + if (settings == null) { + settings = Activator.getDefault().getDialogSettings().addNewSection(sectionId); + } + return settings; + } + + private void init(final ICustomizationManager customizationManager) { + // the appearance can be customized here: + + IDialogSettings settings = getBrowserCustomizationDialogSettings(); + + try { + + // load customizations defined as default through the customization + // extension + ICustomizationCatalogManager customCatalog = ICustomizationCatalogManagerFactory.DEFAULT.getOrCreateCustomizationCatalogManager(customizationManager.getResourceSet()); + // no possibility to get default customization + + List<Customization> registryAllCustomizations = customCatalog.getRegisteredCustomizations(); + ArrayList<Customization> orderedCustomizationList = new ArrayList<Customization>(); + for (Customization customization : registryAllCustomizations) { + String settingKey = getSettingKey(customization); + + boolean isActive = false; + if (settings.get(settingKey) == null) { // Never customized + isActive = customization.isMustBeLoadedByDefault(); // Loaded by default + + } else { + isActive = settings.getBoolean(settingKey); + } + + if (isActive) { + orderedCustomizationList.add(customization); + + } + } + + Collections.sort(orderedCustomizationList, new CustomizationComparator()); + customizationManager.getManagedCustomizations().addAll(orderedCustomizationList); + + } catch (Throwable e) { + log.log(new Status(IStatus.ERROR, Activator.PLUGIN_ID, "Error initializing customizations", e)); //$NON-NLS-1$ + } + } + + /** + * The section name of the Dialog Settings for storing Customization Manager settings + */ + public static final String CUSTOMIZATION_MANAGER_SECTION = PLUGIN_ID + ".customizationManager";//$NON-NLS-1$ + + /** + * Restores the default Customization Manager configuration + */ + public void restoreDefaultCustomizationManager() { + // ICustomizationManager manager = getCustomizationManager(); + + DialogSettings settings = (DialogSettings) getDialogSettings(); + settings.removeSection(CUSTOMIZATION_MANAGER_SECTION); + + // List<MetamodelView> registryDefaultCustomizations = CustomizationsCatalog.getInstance().getRegistryDefaultCustomizations(); + // + // manager.clearCustomizations(); + // for(MetamodelView customization : registryDefaultCustomizations) { + // manager.registerCustomization(customization); + // } + // manager.loadCustomizations(); + } + + public ICustomizationManager getCustomizationManager() { + if (customizationManager == null) { + customizationManager = org.eclipse.papyrus.infra.emf.Activator.getDefault().getCustomizationManager(); + init(getCustomizationManager()); + } + return customizationManager; + } +} diff --git a/plugins/infra/emf/org.eclipse.papyrus.infra.ui.emf/src/org/eclipse/papyrus/infra/ui/internal/emf/expressions/ReadOnlyTester.java b/plugins/infra/emf/org.eclipse.papyrus.infra.ui.emf/src/org/eclipse/papyrus/infra/ui/internal/emf/expressions/ReadOnlyTester.java new file mode 100644 index 00000000000..eb503b636c0 --- /dev/null +++ b/plugins/infra/emf/org.eclipse.papyrus.infra.ui.emf/src/org/eclipse/papyrus/infra/ui/internal/emf/expressions/ReadOnlyTester.java @@ -0,0 +1,39 @@ +/***************************************************************************** + * Copyright (c) 2016 Christian W. Damus and others. + * + * 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 + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Christian W. Damus - Initial API and implementation + * + *****************************************************************************/ +package org.eclipse.papyrus.infra.ui.internal.emf.expressions; + +import java.util.Iterator; + +import org.eclipse.core.expressions.PropertyTester; +import org.eclipse.jface.viewers.IStructuredSelection; + +/** + * A provider of the same properties as the core tester, for selections. + */ +public class ReadOnlyTester extends PropertyTester { + + private final PropertyTester delegate = new org.eclipse.papyrus.infra.emf.readonly.ReadOnlyTester(); + + @Override + public boolean test(Object receiver, String property, Object[] args, Object expectedValue) { + boolean result = false; + + if (receiver instanceof IStructuredSelection) { + Iterator<?> objects = ((IStructuredSelection) receiver).iterator(); + + result = delegate.test(objects, property, args, expectedValue); + } + + return result; + } +} diff --git a/plugins/infra/emf/org.eclipse.papyrus.infra.ui.emf/src/org/eclipse/papyrus/infra/ui/internal/emf/messages/Messages.java b/plugins/infra/emf/org.eclipse.papyrus.infra.ui.emf/src/org/eclipse/papyrus/infra/ui/internal/emf/messages/Messages.java new file mode 100644 index 00000000000..15e09760eb5 --- /dev/null +++ b/plugins/infra/emf/org.eclipse.papyrus.infra.ui.emf/src/org/eclipse/papyrus/infra/ui/internal/emf/messages/Messages.java @@ -0,0 +1,47 @@ +/************************************************************* + * Copyright (c) 2012, 2016 CEA, Christian W. Damus, and others. + * + * 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 + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Vincent Lorenzo (CEA LIST) - Initial API and implementation + * Christian W. Damus (CEA) - bug 323802 + * Christian W. Damus - bug 485220 + * + */ + +package org.eclipse.papyrus.infra.ui.internal.emf.messages; + +import org.eclipse.osgi.util.NLS; + +public class Messages extends NLS { + + private static final String BUNDLE_NAME = "org.eclipse.papyrus.infra.ui.internal.emf.messages.messages"; //$NON-NLS-1$ + + public static String ResourceFilteredLabelProvider_local; + + public static String ResourceFilteredLabelProvider_localExt; + + public static String ResourceFilteredLabelProvider_system; + + public static String ResourceFilteredLabelProvider_systemExt; + + public static String ResourceFilteredLabelProvider_workspace; + + public static String ResourceFilteredLabelProvider_workspaceExt; + + public static String ReferencedModelReadOnlyHandler_promptMsg; + + public static String ReferencedModelReadOnlyHandler_promptTitle; + + static { + // initialize resource bundle + NLS.initializeMessages(BUNDLE_NAME, Messages.class); + } + + private Messages() { + } +} diff --git a/plugins/infra/emf/org.eclipse.papyrus.infra.ui.emf/src/org/eclipse/papyrus/infra/ui/internal/emf/messages/messages.properties b/plugins/infra/emf/org.eclipse.papyrus.infra.ui.emf/src/org/eclipse/papyrus/infra/ui/internal/emf/messages/messages.properties new file mode 100644 index 00000000000..82ee5c28163 --- /dev/null +++ b/plugins/infra/emf/org.eclipse.papyrus.infra.ui.emf/src/org/eclipse/papyrus/infra/ui/internal/emf/messages/messages.properties @@ -0,0 +1,22 @@ +# +# Copyright (c) 2012, 2016 CEA, Christian W. Damus, and others. +# +# 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 +# http://www.eclipse.org/legal/epl-v10.html +# +# Contributors: +# Vincent Lorenzo (CEA LIST) - Initial API and implementation +# Christian W. Damus (CEA) - bug 323802 +# Christian W. Damus - bug 485220 +# + +ResourceFilteredLabelProvider_local=Local model file "{0}" +ResourceFilteredLabelProvider_localExt=Local model file "{0}" ({1} component) +ResourceFilteredLabelProvider_system=System resource "{0}" +ResourceFilteredLabelProvider_systemExt=Resource "{0}" +ResourceFilteredLabelProvider_workspace=Workspace model file "{0}" +ResourceFilteredLabelProvider_workspaceExt=Workspace model file "{0}" ({1} component) +ReferencedModelReadOnlyHandler_promptMsg=Do you want to make these referenced library model files writable?\n\n +ReferencedModelReadOnlyHandler_promptTitle=Enable Write diff --git a/plugins/infra/emf/org.eclipse.papyrus.infra.ui.emf/src/org/eclipse/papyrus/infra/ui/internal/emf/readonly/EditorReloadProcessor.java b/plugins/infra/emf/org.eclipse.papyrus.infra.ui.emf/src/org/eclipse/papyrus/infra/ui/internal/emf/readonly/EditorReloadProcessor.java new file mode 100644 index 00000000000..20bd03ab22d --- /dev/null +++ b/plugins/infra/emf/org.eclipse.papyrus.infra.ui.emf/src/org/eclipse/papyrus/infra/ui/internal/emf/readonly/EditorReloadProcessor.java @@ -0,0 +1,131 @@ +/***************************************************************************** + * Copyright (c) 2016 Christian W. Damus and others. + * + * 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 + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Christian W. Damus - Initial API and implementation + * + *****************************************************************************/ + +package org.eclipse.papyrus.infra.ui.internal.emf.readonly; + +import java.util.Map; + +import org.eclipse.emf.edit.domain.EditingDomain; +import org.eclipse.emf.transaction.TransactionalEditingDomain; +import org.eclipse.papyrus.infra.core.resource.IReadOnlyHandler; +import org.eclipse.papyrus.infra.core.resource.IReadOnlyHandler2; +import org.eclipse.papyrus.infra.core.services.ServiceException; +import org.eclipse.papyrus.infra.emf.readonly.ReadOnlyManager; +import org.eclipse.papyrus.infra.emf.readonly.spi.IReadOnlyManagerProcessor; +import org.eclipse.papyrus.infra.emf.utils.ServiceUtilsForResourceSet; +import org.eclipse.papyrus.infra.tools.util.PlatformHelper; +import org.eclipse.papyrus.infra.ui.editor.IMultiDiagramEditor; +import org.eclipse.papyrus.infra.ui.editor.IReloadableEditor; +import org.eclipse.papyrus.infra.ui.editor.reload.EditorReloadEvent; +import org.eclipse.papyrus.infra.ui.editor.reload.IEditorReloadListener; +import org.eclipse.papyrus.infra.ui.editor.reload.IReloadContextProvider; +import org.eclipse.papyrus.infra.ui.internal.emf.Activator; + +import com.google.common.collect.Maps; + +/** + * Implementation of the {@link ReadOnlyManager} processor service that attaches an + * editor reload listener that lets {@link IReadOnlyHandler}s contribute + * {@linkplain IReloadContextProvider reload contexts} to the editor re-load procedure. + */ +public class EditorReloadProcessor implements IReadOnlyManagerProcessor { + + public EditorReloadProcessor() { + super(); + } + + @Override + public void processReadOnlyManager(ReadOnlyManager readOnlyManager, EditingDomain editingDomain) { + // Is this editing domain associated with an editor? + try { + IMultiDiagramEditor editor = ServiceUtilsForResourceSet.getInstance().getService(IMultiDiagramEditor.class, editingDomain.getResourceSet()); + if (editor != null) { + IReloadableEditor reloadable = IReloadableEditor.Adapter.getAdapter(editor); + if (reloadable != null) { + reloadable.addEditorReloadListener(new ReadOnlyEditorReloadListener(readOnlyManager)); + } + } + } catch (ServiceException e) { + // That's OK. We're not in the context of an editor + } + } + + // + // Nested types + // + + private static class ReadOnlyEditorReloadListener implements IEditorReloadListener { + private ReadOnlyManager readOnlyManager; + + ReadOnlyEditorReloadListener(ReadOnlyManager readOnlyManager) { + super(); + + this.readOnlyManager = readOnlyManager; + } + + // + // Get and store a reload context from each read-only handler that can provide one + // + @Override + public void editorAboutToReload(EditorReloadEvent event) { + Map<Class<? extends IReadOnlyHandler2>, Object> reloadContexts = Maps.newHashMap(); + + for (Iterable<IReadOnlyHandler2> partition : readOnlyManager.getReadOnlyHandlers().values()) { + for (IReadOnlyHandler2 next : partition) { + if (!reloadContexts.containsKey(next.getClass())) { + IReloadContextProvider provider = PlatformHelper.getAdapter(next, IReloadContextProvider.class); + if (provider != null) { + reloadContexts.put(next.getClass(), provider.createReloadContext()); + } + } + } + } + + if (!reloadContexts.isEmpty()) { + event.putContext(reloadContexts); + } + } + + // + // Ask available read-only handlers to restore the reload contexts that their + // counterparts in the editor's previous manager had provided + // + @Override + public void editorReloaded(EditorReloadEvent event) { + // It will have been replaced by a new read-only manager + try { + readOnlyManager = (ReadOnlyManager) ReadOnlyManager.getReadOnlyHandler(event.getEditor().getServicesRegistry().getService(TransactionalEditingDomain.class)); + } catch (ServiceException e) { + Activator.log.error(e); + } + + Object context = event.getContext(); + if (context instanceof Map<?, ?>) { + @SuppressWarnings("unchecked") + Map<Class<? extends IReadOnlyHandler2>, Object> reloadContexts = (Map<Class<? extends IReadOnlyHandler2>, Object>) context; + for (Iterable<IReadOnlyHandler2> partition : readOnlyManager.getReadOnlyHandlers().values()) { + for (IReadOnlyHandler2 next : partition) { + Object reloadContext = reloadContexts.get(next.getClass()); + if (reloadContext != null) { + IReloadContextProvider provider = PlatformHelper.getAdapter(next, IReloadContextProvider.class); + if (provider != null) { + provider.restore(reloadContext); + } + } + } + } + } + } + + } +} diff --git a/plugins/infra/emf/org.eclipse.papyrus.infra.emf.readonly/src/org/eclipse/papyrus/infra/emf/readonly/handlers/EnableWriteCommandHandler.java b/plugins/infra/emf/org.eclipse.papyrus.infra.ui.emf/src/org/eclipse/papyrus/infra/ui/internal/emf/readonly/handlers/EnableWriteCommandHandler.java index b8c8cc32f70..1d9c8eeb204 100644 --- a/plugins/infra/emf/org.eclipse.papyrus.infra.emf.readonly/src/org/eclipse/papyrus/infra/emf/readonly/handlers/EnableWriteCommandHandler.java +++ b/plugins/infra/emf/org.eclipse.papyrus.infra.ui.emf/src/org/eclipse/papyrus/infra/ui/internal/emf/readonly/handlers/EnableWriteCommandHandler.java @@ -12,7 +12,7 @@ * Christian W. Damus (CEA) - bug 429826 * *****************************************************************************/ -package org.eclipse.papyrus.infra.emf.readonly.handlers; +package org.eclipse.papyrus.infra.ui.internal.emf.readonly.handlers; import org.eclipse.core.commands.AbstractHandler; import org.eclipse.core.commands.ExecutionEvent; diff --git a/plugins/infra/emf/org.eclipse.papyrus.infra.emf.readonly/src/org/eclipse/papyrus/infra/emf/readonly/FSReadOnlyHandler.java b/plugins/infra/emf/org.eclipse.papyrus.infra.ui.emf/src/org/eclipse/papyrus/infra/ui/internal/emf/readonly/handlers/FSReadOnlyHandler.java index 034dabfa6a4..f4c5c82bfbf 100644 --- a/plugins/infra/emf/org.eclipse.papyrus.infra.emf.readonly/src/org/eclipse/papyrus/infra/emf/readonly/FSReadOnlyHandler.java +++ b/plugins/infra/emf/org.eclipse.papyrus.infra.ui.emf/src/org/eclipse/papyrus/infra/ui/internal/emf/readonly/handlers/FSReadOnlyHandler.java @@ -14,7 +14,7 @@ * Christian W. Damus - bug 463564
*
*****************************************************************************/
-package org.eclipse.papyrus.infra.emf.readonly;
+package org.eclipse.papyrus.infra.ui.internal.emf.readonly.handlers;
import java.io.File;
import java.util.LinkedHashMap;
diff --git a/plugins/infra/emf/org.eclipse.papyrus.infra.emf.readonly/src/org/eclipse/papyrus/infra/emf/readonly/ReferencedModelReadOnlyHandler.java b/plugins/infra/emf/org.eclipse.papyrus.infra.ui.emf/src/org/eclipse/papyrus/infra/ui/internal/emf/readonly/handlers/ReferencedModelReadOnlyHandler.java index 4f627676eff..d08fdc7296f 100644 --- a/plugins/infra/emf/org.eclipse.papyrus.infra.emf.readonly/src/org/eclipse/papyrus/infra/emf/readonly/ReferencedModelReadOnlyHandler.java +++ b/plugins/infra/emf/org.eclipse.papyrus.infra.ui.emf/src/org/eclipse/papyrus/infra/ui/internal/emf/readonly/handlers/ReferencedModelReadOnlyHandler.java @@ -11,7 +11,7 @@ * Christian W. Damus - bug 463631 * */ -package org.eclipse.papyrus.infra.emf.readonly; +package org.eclipse.papyrus.infra.ui.internal.emf.readonly.handlers; import java.util.ArrayList; import java.util.HashSet; @@ -27,8 +27,9 @@ import org.eclipse.papyrus.infra.core.resource.AbstractReadOnlyHandler; import org.eclipse.papyrus.infra.core.resource.IReadOnlyHandler2; import org.eclipse.papyrus.infra.core.resource.ModelSet; import org.eclipse.papyrus.infra.core.resource.ReadOnlyAxis; -import org.eclipse.papyrus.infra.emf.readonly.internal.messages.Messages; +import org.eclipse.papyrus.infra.emf.readonly.internal.ControlledResourceTracker; import org.eclipse.papyrus.infra.ui.editor.reload.IReloadContextProvider; +import org.eclipse.papyrus.infra.ui.internal.emf.messages.Messages; import org.eclipse.swt.widgets.Display; import com.google.common.base.Optional; @@ -71,6 +72,7 @@ public class ReferencedModelReadOnlyHandler extends AbstractReadOnlyHandler impl this.interactive = interactive; } + @Override public Optional<Boolean> anyReadOnly(Set<ReadOnlyAxis> axes, URI[] uris) { Optional<Boolean> result = Optional.absent(); @@ -115,6 +117,7 @@ public class ReferencedModelReadOnlyHandler extends AbstractReadOnlyHandler impl return result; } + @Override public Optional<Boolean> makeWritable(Set<ReadOnlyAxis> axes, URI[] uris) { Optional<Boolean> result = Optional.absent(); @@ -140,6 +143,7 @@ public class ReferencedModelReadOnlyHandler extends AbstractReadOnlyHandler impl } currentDisplay.syncExec(new Runnable() { + @Override public void run() { StringBuilder message = new StringBuilder(Messages.ReferencedModelReadOnlyHandler_promptMsg); for (URI uri : toMakeWritable) { @@ -206,10 +210,12 @@ public class ReferencedModelReadOnlyHandler extends AbstractReadOnlyHandler impl return controlledResourceTracker.getRootResourceURIs(uri); } + @Override public Object createReloadContext() { return writableReferencedModels; } + @Override @SuppressWarnings("unchecked") public void restore(Object reloadContext) { writableReferencedModels.addAll((Set<URI>) reloadContext); diff --git a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.configuration/META-INF/MANIFEST.MF b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.configuration/META-INF/MANIFEST.MF index 345813596a6..acc8686722e 100644 --- a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.configuration/META-INF/MANIFEST.MF +++ b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.configuration/META-INF/MANIFEST.MF @@ -19,7 +19,9 @@ Require-Bundle: org.eclipse.ui, org.eclipse.papyrus.emf.facet.custom.core;bundle-version="1.2.0",
org.eclipse.papyrus.emf.facet.custom.ui;bundle-version="1.2.0",
org.eclipse.xtext.common.types,
- org.eclipse.papyrus.infra.gmfdiag.css3.xtext;bundle-version="1.2.0"
+ org.eclipse.papyrus.infra.gmfdiag.css3.xtext;bundle-version="1.2.0",
+ org.eclipse.papyrus.infra.ui.emf;bundle-version="1.2.0",
+ org.eclipse.papyrus.infra.ui;bundle-version="1.2.0"
Bundle-Vendor: Eclipse Modeling Project
Bundle-ActivationPolicy: lazy
Bundle-Version: 1.2.0.qualifier
diff --git a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.configuration/src/org/eclipse/papyrus/infra/gmfdiag/css/configuration/handler/AbstractStyleHandler.java b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.configuration/src/org/eclipse/papyrus/infra/gmfdiag/css/configuration/handler/AbstractStyleHandler.java index 58248b4530f..3321c206296 100644 --- a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.configuration/src/org/eclipse/papyrus/infra/gmfdiag/css/configuration/handler/AbstractStyleHandler.java +++ b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.configuration/src/org/eclipse/papyrus/infra/gmfdiag/css/configuration/handler/AbstractStyleHandler.java @@ -43,7 +43,6 @@ import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.jface.window.Window;
import org.eclipse.papyrus.infra.core.services.ServiceException;
import org.eclipse.papyrus.infra.emf.appearance.helper.VisualInformationPapyrusConstants;
-import org.eclipse.papyrus.infra.emf.utils.ServiceUtilsForHandlers;
import org.eclipse.papyrus.infra.gmfdiag.common.helper.DiagramHelper;
import org.eclipse.papyrus.infra.gmfdiag.common.helper.NotationHelper;
import org.eclipse.papyrus.infra.gmfdiag.css.configuration.Activator;
@@ -62,6 +61,7 @@ import org.eclipse.papyrus.infra.gmfdiag.css3.cSS.ruleset; import org.eclipse.papyrus.infra.gmfdiag.css3.cSS.selector;
import org.eclipse.papyrus.infra.gmfdiag.css3.cSS.simple_selector;
import org.eclipse.papyrus.infra.gmfdiag.css3.cSS.stylesheet;
+import org.eclipse.papyrus.infra.ui.util.ServiceUtilsForHandlers;
import org.eclipse.swt.SWT;
import org.eclipse.swt.graphics.Color;
import org.eclipse.swt.widgets.Event;
diff --git a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.configuration/src/org/eclipse/papyrus/infra/gmfdiag/css/configuration/providers/StylesheetLabelProvider.java b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.configuration/src/org/eclipse/papyrus/infra/gmfdiag/css/configuration/providers/StylesheetLabelProvider.java index cd5f351fbd5..2bfaede57ca 100644 --- a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.configuration/src/org/eclipse/papyrus/infra/gmfdiag/css/configuration/providers/StylesheetLabelProvider.java +++ b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.configuration/src/org/eclipse/papyrus/infra/gmfdiag/css/configuration/providers/StylesheetLabelProvider.java @@ -11,11 +11,11 @@ *****************************************************************************/
package org.eclipse.papyrus.infra.gmfdiag.css.configuration.providers;
-import org.eclipse.papyrus.infra.emf.providers.EMFLabelProvider;
import org.eclipse.papyrus.infra.gmfdiag.css.stylesheets.EmbeddedStyleSheet;
import org.eclipse.papyrus.infra.gmfdiag.css.stylesheets.StyleSheetReference;
import org.eclipse.papyrus.infra.gmfdiag.css3.CSSRuntimeModule;
import org.eclipse.papyrus.infra.gmfdiag.css3.cSS.ruleset;
+import org.eclipse.papyrus.infra.ui.emf.providers.EMFLabelProvider;
import org.eclipse.swt.SWT;
import org.eclipse.swt.graphics.Color;
import org.eclipse.swt.graphics.Image;
diff --git a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/META-INF/MANIFEST.MF b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/META-INF/MANIFEST.MF index 5cae6c8a0cb..bbc7812306d 100644 --- a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/META-INF/MANIFEST.MF +++ b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/META-INF/MANIFEST.MF @@ -28,7 +28,8 @@ Require-Bundle: org.eclipse.ui, org.eclipse.papyrus.infra.gmfdiag.dnd;bundle-version="1.2.0",
com.google.guava;bundle-version="11.0.0",
org.eclipse.papyrus.infra.gmfdiag.commands;bundle-version="1.2.0",
- org.eclipse.papyrus.infra.ui;bundle-version="1.2.0"
+ org.eclipse.papyrus.infra.ui;bundle-version="1.2.0",
+ org.eclipse.papyrus.infra.ui.emf;bundle-version="1.2.0"
Bundle-Vendor: Eclipse Modeling Project
Bundle-ActivationPolicy: lazy
Bundle-Version: 1.2.0.qualifier
diff --git a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/databinding/ModelStyleSheetObservableList.java b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/databinding/ModelStyleSheetObservableList.java index 1b3a7028b62..9069087ccbc 100644 --- a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/databinding/ModelStyleSheetObservableList.java +++ b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/databinding/ModelStyleSheetObservableList.java @@ -26,12 +26,12 @@ import org.eclipse.emf.ecore.resource.Resource; import org.eclipse.emf.transaction.RecordingCommand;
import org.eclipse.emf.transaction.TransactionalEditingDomain;
import org.eclipse.gmf.runtime.notation.EObjectListValueStyle;
-import org.eclipse.papyrus.infra.emf.databinding.EMFObservableList;
import org.eclipse.papyrus.infra.gmfdiag.css.engine.ExtendedCSSEngine;
import org.eclipse.papyrus.infra.gmfdiag.css.engine.ModelCSSEngine;
import org.eclipse.papyrus.infra.gmfdiag.css.notation.CSSDiagram;
import org.eclipse.papyrus.infra.gmfdiag.css.resource.CSSNotationResource;
import org.eclipse.papyrus.infra.gmfdiag.css.stylesheets.ModelStyleSheets;
+import org.eclipse.papyrus.infra.ui.emf.databinding.EMFObservableList;
/**
@@ -80,7 +80,7 @@ public class ModelStyleSheetObservableList extends EMFObservableList implements * @param values
* the values
* @return the command to add values
- * @see org.eclipse.papyrus.infra.emf.databinding.EMFObservableList#getAddAllCommand(java.util.Collection)
+ * @see org.eclipse.papyrus.infra.ui.emf.databinding.EMFObservableList#getAddAllCommand(java.util.Collection)
*/
@Override
public Command getAddAllCommand(Collection<?> values) {
@@ -157,7 +157,7 @@ public class ModelStyleSheetObservableList extends EMFObservableList implements * @param value
* the value
* @return the removes command
- * @see org.eclipse.papyrus.infra.emf.databinding.EMFObservableList#getRemoveCommand(java.lang.Object)
+ * @see org.eclipse.papyrus.infra.ui.emf.databinding.EMFObservableList#getRemoveCommand(java.lang.Object)
*/
@Override
public Command getRemoveCommand(Object value) {
@@ -193,7 +193,7 @@ public class ModelStyleSheetObservableList extends EMFObservableList implements * @param values
* the values
* @return the removes the all command
- * @see org.eclipse.papyrus.infra.emf.databinding.EMFObservableList#getRemoveAllCommand(java.util.Collection)
+ * @see org.eclipse.papyrus.infra.ui.emf.databinding.EMFObservableList#getRemoveAllCommand(java.util.Collection)
*/
@Override
public Command getRemoveAllCommand(Collection<?> values) {
@@ -201,7 +201,7 @@ public class ModelStyleSheetObservableList extends EMFObservableList implements }
/**
- * @see org.eclipse.papyrus.infra.emf.databinding.EMFObservableList#dispose()
+ * @see org.eclipse.papyrus.infra.ui.emf.databinding.EMFObservableList#dispose()
*
*/
@Override
diff --git a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/dialog/CSSThemeCreationDialog.java b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/dialog/CSSThemeCreationDialog.java index d14bc9ae308..ad47a1e5a3b 100644 --- a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/dialog/CSSThemeCreationDialog.java +++ b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/dialog/CSSThemeCreationDialog.java @@ -27,13 +27,13 @@ import org.eclipse.jface.viewers.IStructuredContentProvider; import org.eclipse.jface.viewers.TreeViewer; import org.eclipse.jface.window.Window; import org.eclipse.papyrus.infra.core.services.ServiceException; -import org.eclipse.papyrus.infra.emf.providers.EMFContentProvider; import org.eclipse.papyrus.infra.gmfdiag.css.Activator; import org.eclipse.papyrus.infra.gmfdiag.css.stylesheets.StyleSheetReference; import org.eclipse.papyrus.infra.gmfdiag.css.stylesheets.StylesheetsPackage; import org.eclipse.papyrus.infra.gmfdiag.css.stylesheets.Theme; import org.eclipse.papyrus.infra.services.labelprovider.service.LabelProviderService; import org.eclipse.papyrus.infra.services.labelprovider.service.impl.LabelProviderServiceImpl; +import org.eclipse.papyrus.infra.ui.emf.providers.EMFContentProvider; import org.eclipse.papyrus.infra.ui.util.PapyrusImageUtils; import org.eclipse.papyrus.infra.widgets.editors.TreeSelectorDialog; import org.eclipse.papyrus.infra.widgets.providers.AbstractStaticContentProvider; diff --git a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/dialog/CSSThemeEditionDialog.java b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/dialog/CSSThemeEditionDialog.java index f7f5a176574..101605646f7 100644 --- a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/dialog/CSSThemeEditionDialog.java +++ b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/dialog/CSSThemeEditionDialog.java @@ -38,7 +38,6 @@ import org.eclipse.jface.viewers.SelectionChangedEvent; import org.eclipse.jface.viewers.TreeViewer; import org.eclipse.jface.window.Window; import org.eclipse.papyrus.infra.core.services.ServiceException; -import org.eclipse.papyrus.infra.emf.providers.EMFContentProvider; import org.eclipse.papyrus.infra.gmfdiag.css.Activator; import org.eclipse.papyrus.infra.gmfdiag.css.stylesheets.EmbeddedStyleSheet; import org.eclipse.papyrus.infra.gmfdiag.css.stylesheets.StyleSheet; @@ -49,6 +48,7 @@ import org.eclipse.papyrus.infra.gmfdiag.css.stylesheets.Theme; import org.eclipse.papyrus.infra.gmfdiag.css.stylesheets.WorkspaceThemes; import org.eclipse.papyrus.infra.services.labelprovider.service.LabelProviderService; import org.eclipse.papyrus.infra.services.labelprovider.service.impl.LabelProviderServiceImpl; +import org.eclipse.papyrus.infra.ui.emf.providers.EMFContentProvider; import org.eclipse.papyrus.infra.ui.util.PapyrusImageUtils; import org.eclipse.papyrus.infra.widgets.editors.MultipleValueSelectorDialog; import org.eclipse.papyrus.infra.widgets.editors.TreeSelectorDialog; @@ -351,7 +351,7 @@ public class CSSThemeEditionDialog extends Dialog { comboViewer.setContentProvider(new EMFContentProvider(workspaceThemes, StylesheetsPackage.eINSTANCE.getWorkspaceThemes_Themes()) { /** - * @see org.eclipse.papyrus.infra.emf.providers.EMFContentProvider#getSemanticProvider(org.eclipse.emf.ecore.EObject, org.eclipse.emf.ecore.EStructuralFeature) + * @see org.eclipse.papyrus.infra.ui.emf.providers.EMFContentProvider#getSemanticProvider(org.eclipse.emf.ecore.EObject, org.eclipse.emf.ecore.EStructuralFeature) * * @param editedEObject * @param feature diff --git a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/preferences/ThemePreferencesPage.java b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/preferences/ThemePreferencesPage.java index 2e1beec4696..2db99a62dcc 100644 --- a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/preferences/ThemePreferencesPage.java +++ b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/preferences/ThemePreferencesPage.java @@ -38,7 +38,6 @@ import org.eclipse.jface.viewers.LabelProvider; import org.eclipse.jface.viewers.TreeViewer; import org.eclipse.jface.window.Window; import org.eclipse.papyrus.infra.core.services.ServiceException; -import org.eclipse.papyrus.infra.emf.providers.EMFContentProvider; import org.eclipse.papyrus.infra.gmfdiag.common.helper.DiagramHelper; import org.eclipse.papyrus.infra.gmfdiag.css.Activator; import org.eclipse.papyrus.infra.gmfdiag.css.engine.WorkspaceCSSEngine; @@ -54,6 +53,7 @@ import org.eclipse.papyrus.infra.gmfdiag.css.stylesheets.Theme; import org.eclipse.papyrus.infra.gmfdiag.css.theme.ThemeManager; import org.eclipse.papyrus.infra.services.labelprovider.service.LabelProviderService; import org.eclipse.papyrus.infra.services.labelprovider.service.impl.LabelProviderServiceImpl; +import org.eclipse.papyrus.infra.ui.emf.providers.EMFContentProvider; import org.eclipse.papyrus.infra.widgets.editors.MultipleValueSelectorDialog; import org.eclipse.papyrus.infra.widgets.editors.TreeSelectorDialog; import org.eclipse.papyrus.infra.widgets.providers.AbstractStaticContentProvider; diff --git a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/property/StyleSheetsPropertyPage.java b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/property/StyleSheetsPropertyPage.java index f0f2914d1f2..a42b1b740f0 100644 --- a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/property/StyleSheetsPropertyPage.java +++ b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/property/StyleSheetsPropertyPage.java @@ -39,7 +39,6 @@ import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.jface.viewers.SelectionChangedEvent; import org.eclipse.jface.viewers.TreeViewer; import org.eclipse.jface.window.Window; -import org.eclipse.papyrus.infra.emf.providers.EMFContentProvider; import org.eclipse.papyrus.infra.gmfdiag.css.Activator; import org.eclipse.papyrus.infra.gmfdiag.css.engine.ProjectCSSEngine; import org.eclipse.papyrus.infra.gmfdiag.css.properties.messages.Messages; @@ -47,6 +46,7 @@ import org.eclipse.papyrus.infra.gmfdiag.css.properties.provider.CSSStyleSheetLa import org.eclipse.papyrus.infra.gmfdiag.css.stylesheets.ModelStyleSheets; import org.eclipse.papyrus.infra.gmfdiag.css.stylesheets.StyleSheet; import org.eclipse.papyrus.infra.gmfdiag.css.stylesheets.StylesheetsPackage; +import org.eclipse.papyrus.infra.ui.emf.providers.EMFContentProvider; import org.eclipse.papyrus.infra.widgets.creation.ReferenceValueFactory; import org.eclipse.papyrus.infra.widgets.editors.MultipleValueSelectorDialog; import org.eclipse.papyrus.infra.widgets.providers.AbstractStaticContentProvider; diff --git a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/provider/CSSStyleSheetContentProvider.java b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/provider/CSSStyleSheetContentProvider.java index a0e22b1551d..6ec9d987cc0 100644 --- a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/provider/CSSStyleSheetContentProvider.java +++ b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/provider/CSSStyleSheetContentProvider.java @@ -20,10 +20,10 @@ import org.eclipse.emf.ecore.EObject; import org.eclipse.emf.ecore.EStructuralFeature;
import org.eclipse.emf.ecore.resource.Resource;
import org.eclipse.jface.viewers.IStructuredContentProvider;
-import org.eclipse.papyrus.infra.emf.providers.EMFContentProvider;
import org.eclipse.papyrus.infra.gmfdiag.css.stylesheets.ModelStyleSheets;
import org.eclipse.papyrus.infra.gmfdiag.css.stylesheets.StyleSheet;
import org.eclipse.papyrus.infra.gmfdiag.css.stylesheets.StylesheetsPackage;
+import org.eclipse.papyrus.infra.ui.emf.providers.EMFContentProvider;
import org.eclipse.papyrus.infra.widgets.providers.AbstractStaticContentProvider;
diff --git a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/provider/CSSStyleSheetLabelProvider.java b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/provider/CSSStyleSheetLabelProvider.java index ce602e7f09a..d32fe961370 100644 --- a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/provider/CSSStyleSheetLabelProvider.java +++ b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/provider/CSSStyleSheetLabelProvider.java @@ -11,9 +11,9 @@ *****************************************************************************/
package org.eclipse.papyrus.infra.gmfdiag.css.properties.provider;
-import org.eclipse.papyrus.infra.emf.providers.EMFLabelProvider;
import org.eclipse.papyrus.infra.gmfdiag.css.stylesheets.EmbeddedStyleSheet;
import org.eclipse.papyrus.infra.gmfdiag.css.stylesheets.StyleSheetReference;
+import org.eclipse.papyrus.infra.ui.emf.providers.EMFLabelProvider;
public class CSSStyleSheetLabelProvider extends EMFLabelProvider {
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.commands/src/org/eclipse/papyrus/commands/RenameDiagramHandler.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.commands/src/org/eclipse/papyrus/commands/RenameDiagramHandler.java index b931070322a..2ed0050da80 100644 --- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.commands/src/org/eclipse/papyrus/commands/RenameDiagramHandler.java +++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.commands/src/org/eclipse/papyrus/commands/RenameDiagramHandler.java @@ -27,7 +27,7 @@ import org.eclipse.jface.window.Window; import org.eclipse.papyrus.commands.messages.Messages;
import org.eclipse.papyrus.infra.core.sasheditor.editor.ISashWindowsContainer;
import org.eclipse.papyrus.infra.core.services.ServiceException;
-import org.eclipse.papyrus.infra.emf.utils.ServiceUtilsForIEvaluationContext;
+import org.eclipse.papyrus.infra.ui.util.ServiceUtilsForIEvaluationContext;
import org.eclipse.swt.widgets.Display;
import org.eclipse.ui.IEditorPart;
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/META-INF/MANIFEST.MF b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/META-INF/MANIFEST.MF index 1b434afd5d8..974f758c11d 100644 --- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/META-INF/MANIFEST.MF +++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/META-INF/MANIFEST.MF @@ -90,7 +90,8 @@ Require-Bundle: org.eclipse.emf.edit.ui;bundle-version="2.5.0", org.eclipse.papyrus.infra.sync;bundle-version="1.2.0",
org.eclipse.papyrus.infra.ui;bundle-version="1.2.0",
org.eclipse.papyrus.infra.core.sasheditor.di;bundle-version="1.2.0",
- org.eclipse.papyrus.infra.core.sashwindows.di;bundle-version="1.2.0"
+ org.eclipse.papyrus.infra.core.sashwindows.di;bundle-version="1.2.0",
+ org.eclipse.papyrus.infra.ui.emf;bundle-version="1.2.0"
Bundle-Vendor: %providerName
Bundle-ActivationPolicy: lazy
Bundle-ClassPath: .
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/databinding/custom/CustomStyleObservableList.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/databinding/custom/CustomStyleObservableList.java index fe27da1e055..d0169dc2981 100644 --- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/databinding/custom/CustomStyleObservableList.java +++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/databinding/custom/CustomStyleObservableList.java @@ -26,8 +26,8 @@ import org.eclipse.emf.edit.domain.EditingDomain; import org.eclipse.gmf.runtime.notation.NamedStyle;
import org.eclipse.gmf.runtime.notation.Style;
import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.infra.emf.databinding.EMFObservableList;
import org.eclipse.papyrus.infra.gmfdiag.common.listener.CustomStyleListener;
+import org.eclipse.papyrus.infra.ui.emf.databinding.EMFObservableList;
import org.eclipse.papyrus.infra.widgets.editors.AbstractEditor;
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/handler/RefreshHandler.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/handler/RefreshHandler.java index d979918d754..4e16c534f1f 100644 --- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/handler/RefreshHandler.java +++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/handler/RefreshHandler.java @@ -28,10 +28,10 @@ import org.eclipse.gmf.runtime.notation.View; import org.eclipse.jface.viewers.ISelection; import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.papyrus.infra.core.services.ServiceException; -import org.eclipse.papyrus.infra.emf.utils.ServiceUtilsForHandlers; import org.eclipse.papyrus.infra.gmfdiag.common.Activator; import org.eclipse.papyrus.infra.gmfdiag.common.helper.DiagramHelper; import org.eclipse.papyrus.infra.ui.editor.IMultiDiagramEditor; +import org.eclipse.papyrus.infra.ui.util.ServiceUtilsForHandlers; import org.eclipse.ui.IEditorPart; import org.eclipse.ui.PlatformUI; diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/listener/RollbackNotificationHistoryListener.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/listener/RollbackNotificationHistoryListener.java index 4b2e7b2c3df..cc82c7b5738 100644 --- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/listener/RollbackNotificationHistoryListener.java +++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/listener/RollbackNotificationHistoryListener.java @@ -30,11 +30,11 @@ import org.eclipse.osgi.util.NLS; import org.eclipse.papyrus.infra.core.resource.IRollbackStatus; import org.eclipse.papyrus.infra.core.resource.RollbackStatus; import org.eclipse.papyrus.infra.core.services.ServiceException; -import org.eclipse.papyrus.infra.emf.providers.EMFLabelProvider; import org.eclipse.papyrus.infra.emf.utils.ServiceUtilsForEObject; import org.eclipse.papyrus.infra.emf.utils.ServiceUtilsForResource; import org.eclipse.papyrus.infra.gmfdiag.common.messages.Messages; import org.eclipse.papyrus.infra.services.labelprovider.service.LabelProviderService; +import org.eclipse.papyrus.infra.ui.emf.providers.EMFLabelProvider; import org.eclipse.ui.statushandlers.IStatusAdapterConstants; import org.eclipse.ui.statushandlers.StatusAdapter; import org.eclipse.ui.statushandlers.StatusManager; diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/providers/NotationLabelProvider.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/providers/NotationLabelProvider.java index f8c191908af..8a33dd14ea1 100644 --- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/providers/NotationLabelProvider.java +++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/providers/NotationLabelProvider.java @@ -19,10 +19,10 @@ import org.eclipse.gmf.runtime.notation.BasicCompartment; import org.eclipse.gmf.runtime.notation.DecorationNode;
import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.infra.emf.providers.EMFLabelProvider;
import org.eclipse.papyrus.infra.gmfdiag.common.Activator;
import org.eclipse.papyrus.infra.gmfdiag.common.types.NotationTypesMap;
import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
+import org.eclipse.papyrus.infra.ui.emf.providers.EMFLabelProvider;
import org.eclipse.papyrus.infra.viewpoints.policy.ViewPrototype;
import org.eclipse.swt.graphics.Image;
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.export/src/org/eclipse/papyrus/infra/gmfdiag/export/actions/ExportAllDiagramsAction.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.export/src/org/eclipse/papyrus/infra/gmfdiag/export/actions/ExportAllDiagramsAction.java index 35268885c47..727a6bb4b97 100644 --- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.export/src/org/eclipse/papyrus/infra/gmfdiag/export/actions/ExportAllDiagramsAction.java +++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.export/src/org/eclipse/papyrus/infra/gmfdiag/export/actions/ExportAllDiagramsAction.java @@ -27,10 +27,10 @@ import org.eclipse.papyrus.infra.core.resource.ModelSet; import org.eclipse.papyrus.infra.core.resource.sasheditor.DiModel; import org.eclipse.papyrus.infra.core.services.ServiceException; import org.eclipse.papyrus.infra.emf.utils.ResourceUtils; -import org.eclipse.papyrus.infra.emf.utils.ServiceUtilsForSelection; import org.eclipse.papyrus.infra.gmfdiag.export.Activator; import org.eclipse.papyrus.infra.gmfdiag.export.engine.ExportAllDiagramsEngine; import org.eclipse.papyrus.infra.gmfdiag.export.utils.SelectionHelper; +import org.eclipse.papyrus.infra.ui.util.ServiceUtilsForSelection; import org.eclipse.ui.handlers.HandlerUtil; @@ -107,11 +107,11 @@ public class ExportAllDiagramsAction extends AbstractHandler { if (file != null) { IContainer parentResource = file.getParent(); IContainer containerForParentLocation = ResourcesPlugin.getWorkspace().getRoot().getContainerForLocation(parentResource.getLocation()); - if (containerForParentLocation != null) { + if (containerForParentLocation != null) { parentResource = containerForParentLocation; uriFile = URI.createPlatformResourceURI(parentResource.getLocation().toString(), true); } else { - //linked resource + // linked resource uriFile = URI.createPlatformResourceURI(parentResource.getFullPath().toString(), true); } diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.export/src/org/eclipse/papyrus/infra/gmfdiag/export/utils/SelectionHelper.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.export/src/org/eclipse/papyrus/infra/gmfdiag/export/utils/SelectionHelper.java index 772f3b50d35..4eb9c5196da 100644 --- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.export/src/org/eclipse/papyrus/infra/gmfdiag/export/utils/SelectionHelper.java +++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.export/src/org/eclipse/papyrus/infra/gmfdiag/export/utils/SelectionHelper.java @@ -28,8 +28,8 @@ import org.eclipse.papyrus.infra.core.resource.sasheditor.DiModel; import org.eclipse.papyrus.infra.core.sashwindows.di.service.ILocalPageService; import org.eclipse.papyrus.infra.core.sashwindows.di.service.IPageManager; import org.eclipse.papyrus.infra.core.services.ServiceException; -import org.eclipse.papyrus.infra.emf.utils.ServiceUtilsForSelection; import org.eclipse.papyrus.infra.gmfdiag.export.engine.ExportDiagramLocalPageService; +import org.eclipse.papyrus.infra.ui.util.ServiceUtilsForSelection; import org.eclipse.papyrus.uml.tools.model.UmlUtils; /** diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.export/src/org/eclipse/papyrus/infra/gmfdiag/export/wizard/ExportAllWizard.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.export/src/org/eclipse/papyrus/infra/gmfdiag/export/wizard/ExportAllWizard.java index 02f9db4f143..0bf0faa0795 100644 --- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.export/src/org/eclipse/papyrus/infra/gmfdiag/export/wizard/ExportAllWizard.java +++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.export/src/org/eclipse/papyrus/infra/gmfdiag/export/wizard/ExportAllWizard.java @@ -24,12 +24,12 @@ import org.eclipse.papyrus.infra.core.resource.ModelSet; import org.eclipse.papyrus.infra.core.resource.sasheditor.DiModel; import org.eclipse.papyrus.infra.core.services.ServiceException; import org.eclipse.papyrus.infra.emf.utils.ResourceUtils; -import org.eclipse.papyrus.infra.emf.utils.ServiceUtilsForSelection; import org.eclipse.papyrus.infra.gmfdiag.export.actions.ExportAllDiagramsParameter; import org.eclipse.papyrus.infra.gmfdiag.export.actions.ExportComposite; import org.eclipse.papyrus.infra.gmfdiag.export.engine.ExportAllDiagramsEngine; import org.eclipse.papyrus.infra.gmfdiag.export.messages.Messages; import org.eclipse.papyrus.infra.gmfdiag.export.utils.SelectionHelper; +import org.eclipse.papyrus.infra.ui.util.ServiceUtilsForSelection; import org.eclipse.ui.IExportWizard; import org.eclipse.ui.IWorkbench; diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.gmfmenu.filter/META-INF/MANIFEST.MF b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.gmfmenu.filter/META-INF/MANIFEST.MF index c404b211c33..155e2278b2b 100644 --- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.gmfmenu.filter/META-INF/MANIFEST.MF +++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.gmfmenu.filter/META-INF/MANIFEST.MF @@ -2,8 +2,8 @@ Manifest-Version: 1.0 Require-Bundle: org.eclipse.gmf.runtime.common.ui.services.action,
org.eclipse.gmf.runtime.diagram.ui.providers;bundle-version="1.7.0",
org.eclipse.papyrus.infra.gmfdiag.common;bundle-version="1.2.0",
- org.eclipse.papyrus.infra.emf;bundle-version="1.2.0",
- org.eclipse.papyrus.infra.core;bundle-version="1.2.0"
+ org.eclipse.papyrus.infra.core;bundle-version="1.2.0",
+ org.eclipse.papyrus.infra.ui;bundle-version="1.2.0"
Export-Package: org.eclipse.papyrus.infra.gmfdiag.gmfmenu.filter
Bundle-Vendor: %Bundle-Vendor
Bundle-Version: 1.2.0.qualifier
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.gmfmenu.filter/src/org/eclipse/papyrus/infra/gmfdiag/gmfmenu/filter/GMFMenuFilterPolicy.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.gmfmenu.filter/src/org/eclipse/papyrus/infra/gmfdiag/gmfmenu/filter/GMFMenuFilterPolicy.java index aa3022866ab..d676b2dc824 100644 --- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.gmfmenu.filter/src/org/eclipse/papyrus/infra/gmfdiag/gmfmenu/filter/GMFMenuFilterPolicy.java +++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.gmfmenu.filter/src/org/eclipse/papyrus/infra/gmfdiag/gmfmenu/filter/GMFMenuFilterPolicy.java @@ -15,7 +15,7 @@ import org.eclipse.core.runtime.IConfigurationElement; import org.eclipse.gmf.runtime.common.ui.services.action.contributionitem.IPopupMenuContributionPolicy;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.papyrus.infra.core.services.ServiceException;
-import org.eclipse.papyrus.infra.emf.utils.ServiceUtilsForSelection;
+import org.eclipse.papyrus.infra.ui.util.ServiceUtilsForSelection;
/**
*
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.menu/src/org/eclipse/papyrus/infra/gmfdiag/menu/handlers/AbstractGraphicalCommandHandler.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.menu/src/org/eclipse/papyrus/infra/gmfdiag/menu/handlers/AbstractGraphicalCommandHandler.java index 4bb2e32b307..e8b5519d184 100644 --- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.menu/src/org/eclipse/papyrus/infra/gmfdiag/menu/handlers/AbstractGraphicalCommandHandler.java +++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.menu/src/org/eclipse/papyrus/infra/gmfdiag/menu/handlers/AbstractGraphicalCommandHandler.java @@ -34,8 +34,8 @@ import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.papyrus.commands.wrappers.GEFtoEMFCommandWrapper; import org.eclipse.papyrus.infra.core.services.ServiceException; import org.eclipse.papyrus.infra.core.utils.TransactionHelper; -import org.eclipse.papyrus.infra.emf.utils.ServiceUtilsForHandlers; import org.eclipse.papyrus.infra.gmfdiag.common.utils.ServiceUtilsForEditPart; +import org.eclipse.papyrus.infra.ui.util.ServiceUtilsForHandlers; import org.eclipse.ui.ISources; import org.eclipse.ui.handlers.HandlerUtil; @@ -48,9 +48,9 @@ import org.eclipse.ui.handlers.HandlerUtil; public abstract class AbstractGraphicalCommandHandler extends AbstractHandler { protected abstract Command getCommand(); - - protected Command getCommand(ExecutionEvent event){ - return getCommand(); //Implement an overridable, default behavior. Extend it only when you actually need the ExecutionEvent (i.e. for your own contribution) + + protected Command getCommand(ExecutionEvent event) { + return getCommand(); // Implement an overridable, default behavior. Extend it only when you actually need the ExecutionEvent (i.e. for your own contribution) } /** diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/META-INF/MANIFEST.MF b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/META-INF/MANIFEST.MF index 8239d51eb0c..36f585befda 100644 --- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/META-INF/MANIFEST.MF +++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/META-INF/MANIFEST.MF @@ -25,7 +25,8 @@ Require-Bundle: org.eclipse.ui, org.eclipse.papyrus.infra.viewpoints.policy;bundle-version="1.2.0",
com.google.guava;bundle-version="11.0.0",
org.eclipse.papyrus.infra.gmfdiag.commands;bundle-version="1.2.0",
- org.eclipse.papyrus.infra.gmfdiag.canonical;bundle-version="1.2.0"
+ org.eclipse.papyrus.infra.gmfdiag.canonical;bundle-version="1.2.0",
+ org.eclipse.papyrus.infra.ui.emf;bundle-version="1.2.0"
Bundle-Vendor: %Bundle-Vendor
Bundle-ActivationPolicy: lazy;exclude:="org.eclipse.papyrus.infra.gmfdiag.properties.constraint"
Bundle-Version: 1.2.0.qualifier
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.welcome/META-INF/MANIFEST.MF b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.welcome/META-INF/MANIFEST.MF index 24ca397693b..4efe9316855 100644 --- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.welcome/META-INF/MANIFEST.MF +++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.welcome/META-INF/MANIFEST.MF @@ -28,7 +28,8 @@ Require-Bundle: org.eclipse.core.runtime;bundle-version="3.12.0", org.eclipse.core.databinding.property;bundle-version="1.6.0", org.eclipse.papyrus.infra.editor.welcome.nattable;bundle-version="1.2.0", org.eclipse.nebula.widgets.nattable.core;bundle-version="1.4.0", - org.eclipse.papyrus.infra.nattable.model;bundle-version="1.2.0" + org.eclipse.papyrus.infra.nattable.model;bundle-version="1.2.0", + org.eclipse.papyrus.infra.ui.emf;bundle-version="1.2.0" Bundle-Vendor: %providerName Bundle-ActivationPolicy: lazy Bundle-Version: 1.2.0.qualifier diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.welcome/src/org/eclipse/papyrus/infra/gmfdiag/welcome/internal/widgets/CreateNewNotationButton.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.welcome/src/org/eclipse/papyrus/infra/gmfdiag/welcome/internal/widgets/CreateNewNotationButton.java index 12646987a96..2f590e1e49b 100644 --- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.welcome/src/org/eclipse/papyrus/infra/gmfdiag/welcome/internal/widgets/CreateNewNotationButton.java +++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.welcome/src/org/eclipse/papyrus/infra/gmfdiag/welcome/internal/widgets/CreateNewNotationButton.java @@ -23,11 +23,11 @@ import org.eclipse.jface.viewers.LabelProvider; import org.eclipse.jface.window.Window; import org.eclipse.papyrus.infra.core.resource.ModelSet; import org.eclipse.papyrus.infra.core.services.ServiceException; -import org.eclipse.papyrus.infra.emf.providers.strategy.SemanticEMFContentProvider; import org.eclipse.papyrus.infra.emf.utils.EMFHelper; import org.eclipse.papyrus.infra.emf.utils.ServiceUtilsForEObject; import org.eclipse.papyrus.infra.emf.utils.ServiceUtilsForResourceSet; import org.eclipse.papyrus.infra.services.labelprovider.service.LabelProviderService; +import org.eclipse.papyrus.infra.ui.emf.providers.strategy.SemanticEMFContentProvider; import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker; import org.eclipse.papyrus.infra.viewpoints.policy.ViewPrototype; import org.eclipse.papyrus.infra.widgets.editors.TreeSelectorDialog; diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.emf.nattable/META-INF/MANIFEST.MF b/plugins/infra/nattable/org.eclipse.papyrus.infra.emf.nattable/META-INF/MANIFEST.MF index b86228db55b..8f76e495478 100644 --- a/plugins/infra/nattable/org.eclipse.papyrus.infra.emf.nattable/META-INF/MANIFEST.MF +++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.emf.nattable/META-INF/MANIFEST.MF @@ -30,7 +30,8 @@ Require-Bundle: org.eclipse.ui, com.google.guava;bundle-version="15.0.0", org.eclipse.nebula.widgets.nattable.extension.glazedlists;bundle-version="[1.4.0,2.0.0)", org.eclipse.papyrus.infra.ui;bundle-version="1.2.0", - org.eclipse.papyrus.infra.core.sashwindows.di;bundle-version="1.2.0" + org.eclipse.papyrus.infra.core.sashwindows.di;bundle-version="1.2.0", + org.eclipse.papyrus.infra.ui.emf;bundle-version="1.2.0" Bundle-Vendor: Eclipse Modeling Project Bundle-ActivationPolicy: lazy Bundle-Version: 1.2.0.qualifier diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.emf.nattable/src/org/eclipse/papyrus/infra/emf/nattable/celleditor/config/SingleEEnumTypeCellEditorConfiguration.java b/plugins/infra/nattable/org.eclipse.papyrus.infra.emf.nattable/src/org/eclipse/papyrus/infra/emf/nattable/celleditor/config/SingleEEnumTypeCellEditorConfiguration.java index a904b149d82..7cca8cf91f3 100644 --- a/plugins/infra/nattable/org.eclipse.papyrus.infra.emf.nattable/src/org/eclipse/papyrus/infra/emf/nattable/celleditor/config/SingleEEnumTypeCellEditorConfiguration.java +++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.emf.nattable/src/org/eclipse/papyrus/infra/emf/nattable/celleditor/config/SingleEEnumTypeCellEditorConfiguration.java @@ -25,10 +25,10 @@ import org.eclipse.nebula.widgets.nattable.edit.editor.ComboBoxCellEditor; import org.eclipse.nebula.widgets.nattable.painter.cell.ComboBoxPainter;
import org.eclipse.nebula.widgets.nattable.style.DisplayMode;
import org.eclipse.papyrus.infra.emf.nattable.dataprovider.EEnumComboBoxDataProvider;
-import org.eclipse.papyrus.infra.emf.providers.EMFLabelProvider;
import org.eclipse.papyrus.infra.nattable.celleditor.config.ICellAxisConfiguration;
import org.eclipse.papyrus.infra.nattable.model.nattable.Table;
import org.eclipse.papyrus.infra.nattable.utils.AxisUtils;
+import org.eclipse.papyrus.infra.ui.emf.providers.EMFLabelProvider;
/**
* @author MA244259
diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.common/src/org/eclipse/papyrus/infra/nattable/common/handlers/AbstractCreateNattableEditorHandler.java b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.common/src/org/eclipse/papyrus/infra/nattable/common/handlers/AbstractCreateNattableEditorHandler.java index aa0d3355fa9..2d2bf3568d2 100644 --- a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.common/src/org/eclipse/papyrus/infra/nattable/common/handlers/AbstractCreateNattableEditorHandler.java +++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.common/src/org/eclipse/papyrus/infra/nattable/common/handlers/AbstractCreateNattableEditorHandler.java @@ -42,7 +42,6 @@ import org.eclipse.papyrus.infra.core.services.ServicesRegistry; import org.eclipse.papyrus.infra.core.utils.EditorNameInitializer;
import org.eclipse.papyrus.infra.core.utils.ServiceUtils;
import org.eclipse.papyrus.infra.emf.utils.EMFHelper;
-import org.eclipse.papyrus.infra.emf.utils.ServiceUtilsForHandlers;
import org.eclipse.papyrus.infra.nattable.Activator;
import org.eclipse.papyrus.infra.nattable.common.modelresource.PapyrusNattableModel;
import org.eclipse.papyrus.infra.nattable.messages.Messages;
@@ -51,6 +50,7 @@ import org.eclipse.papyrus.infra.nattable.model.nattable.Table; import org.eclipse.papyrus.infra.nattable.model.nattable.nattableconfiguration.NattableconfigurationPackage;
import org.eclipse.papyrus.infra.nattable.model.nattable.nattableconfiguration.TableConfiguration;
import org.eclipse.papyrus.infra.nattable.utils.TableHelper;
+import org.eclipse.papyrus.infra.ui.util.ServiceUtilsForHandlers;
import org.eclipse.swt.widgets.Display;
import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.PlatformUI;
diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.common/src/org/eclipse/papyrus/infra/nattable/common/handlers/CreateNatTableFromCatalogHandler.java b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.common/src/org/eclipse/papyrus/infra/nattable/common/handlers/CreateNatTableFromCatalogHandler.java index e8bf7217996..29aea00f822 100644 --- a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.common/src/org/eclipse/papyrus/infra/nattable/common/handlers/CreateNatTableFromCatalogHandler.java +++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.common/src/org/eclipse/papyrus/infra/nattable/common/handlers/CreateNatTableFromCatalogHandler.java @@ -31,11 +31,11 @@ import org.eclipse.papyrus.infra.core.services.ServiceException; import org.eclipse.papyrus.infra.core.services.ServicesRegistry; import org.eclipse.papyrus.infra.core.utils.ServiceUtils; import org.eclipse.papyrus.infra.emf.utils.EMFHelper; -import org.eclipse.papyrus.infra.emf.utils.ServiceUtilsForHandlers; import org.eclipse.papyrus.infra.nattable.common.Activator; import org.eclipse.papyrus.infra.nattable.common.helper.TableViewPrototype; import org.eclipse.papyrus.infra.nattable.common.wizards.CreateNattableFromCatalogWizard; import org.eclipse.papyrus.infra.nattable.nattableconfiguration.NattableConfigurationRegistry; +import org.eclipse.papyrus.infra.ui.util.ServiceUtilsForHandlers; import org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusSyncTable; import org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusTable; import org.eclipse.papyrus.infra.viewpoints.policy.ViewPrototype; diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.common/src/org/eclipse/papyrus/infra/nattable/common/handlers/RenameTableHandler.java b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.common/src/org/eclipse/papyrus/infra/nattable/common/handlers/RenameTableHandler.java index 20f8884f96f..b59a54eb150 100644 --- a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.common/src/org/eclipse/papyrus/infra/nattable/common/handlers/RenameTableHandler.java +++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.common/src/org/eclipse/papyrus/infra/nattable/common/handlers/RenameTableHandler.java @@ -22,10 +22,10 @@ import org.eclipse.emf.transaction.TransactionalEditingDomain; import org.eclipse.jface.dialogs.InputDialog;
import org.eclipse.jface.window.Window;
import org.eclipse.papyrus.infra.core.services.ServiceException;
-import org.eclipse.papyrus.infra.emf.utils.ServiceUtilsForIEvaluationContext;
import org.eclipse.papyrus.infra.nattable.common.messages.Messages;
import org.eclipse.papyrus.infra.nattable.manager.table.INattableModelManager;
import org.eclipse.papyrus.infra.ui.editor.IMultiDiagramEditor;
+import org.eclipse.papyrus.infra.ui.util.ServiceUtilsForIEvaluationContext;
import org.eclipse.swt.widgets.Display;
import org.eclipse.ui.IEditorPart;
@@ -39,7 +39,7 @@ import org.eclipse.ui.IEditorPart; public class RenameTableHandler extends AbstractHandler {
public static final String NEW_TABLE_NAME = Messages.RenameTableHandler_NewName;
-
+
public static final String RENAME_AN_EXISTING_TABLE = Messages.RenameTableHandler_RenameAnExistingTable;
/**
@@ -121,7 +121,7 @@ public class RenameTableHandler extends AbstractHandler { protected INattableModelManager lookupTableManager(IEvaluationContext context) throws ServiceException {
IEditorPart editor = ServiceUtilsForIEvaluationContext.getInstance().getService(IMultiDiagramEditor.class, context);
- INattableModelManager tableManager = (INattableModelManager) editor.getAdapter(INattableModelManager.class);
+ INattableModelManager tableManager = editor.getAdapter(INattableModelManager.class);
return tableManager;
}
diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.modelexplorer/src/org/eclipse/papyrus/infra/nattable/modelexplorer/handlers/AbstractGenericCommandHandler.java b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.modelexplorer/src/org/eclipse/papyrus/infra/nattable/modelexplorer/handlers/AbstractGenericCommandHandler.java index b8e11bc27ae..b8f97673cd5 100644 --- a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.modelexplorer/src/org/eclipse/papyrus/infra/nattable/modelexplorer/handlers/AbstractGenericCommandHandler.java +++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.modelexplorer/src/org/eclipse/papyrus/infra/nattable/modelexplorer/handlers/AbstractGenericCommandHandler.java @@ -29,8 +29,8 @@ import org.eclipse.jface.viewers.ISelection; import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.papyrus.infra.core.services.ServiceException; import org.eclipse.papyrus.infra.emf.utils.EMFHelper; -import org.eclipse.papyrus.infra.emf.utils.ServiceUtilsForHandlers; import org.eclipse.papyrus.infra.nattable.model.nattable.nattableconfiguration.TableNamedElement; +import org.eclipse.papyrus.infra.ui.util.ServiceUtilsForHandlers; import org.eclipse.ui.ISources; import org.eclipse.ui.handlers.HandlerUtil; @@ -52,9 +52,9 @@ public abstract class AbstractGenericCommandHandler extends AbstractHandler { protected List<EObject> getSelectedElements() { List<EObject> result = new LinkedList<EObject>(); for (Object element : getSelection()) { - EObject elementi = EMFHelper.getEObject(element) ; - if(elementi instanceof TableNamedElement){ - result.add( elementi); + EObject elementi = EMFHelper.getEObject(element); + if (elementi instanceof TableNamedElement) { + result.add(elementi); } } return result; @@ -68,6 +68,7 @@ public abstract class AbstractGenericCommandHandler extends AbstractHandler { * @return null * @throws ExecutionException */ + @Override public Object execute(ExecutionEvent event) throws ExecutionException { try { ISelection selection = HandlerUtil.getCurrentSelection(event); @@ -107,8 +108,8 @@ public abstract class AbstractGenericCommandHandler extends AbstractHandler { protected boolean computeEnabled() { boolean result = true; List<EObject> elts = getSelectedElements(); - if(elts.size()==0){ - result=false; + if (elts.size() == 0) { + result = false; } return result; diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.properties/META-INF/MANIFEST.MF b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.properties/META-INF/MANIFEST.MF index 9c98ded3607..36a83d192c0 100644 --- a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.properties/META-INF/MANIFEST.MF +++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.properties/META-INF/MANIFEST.MF @@ -18,13 +18,13 @@ Require-Bundle: org.eclipse.ui, org.eclipse.papyrus.infra.constraints;bundle-version="1.2.0", org.eclipse.papyrus.infra.core;bundle-version="1.2.0", org.eclipse.papyrus.infra.services.edit;bundle-version="1.2.0", - org.eclipse.nebula.widgets.nattable.core;bundle-version="[1.4.0, - 2.0.0)", + org.eclipse.nebula.widgets.nattable.core;bundle-version="[1.4.0,2.0.0)", org.eclipse.emf.databinding, org.eclipse.core.databinding.property;bundle-version="1.4.200", org.eclipse.papyrus.infra.viewpoints.policy;bundle-version="1.2.0", org.eclipse.papyrus.infra.emf.nattable;bundle-version="1.2.0", - org.eclipse.papyrus.infra.services.labelprovider;bundle-version="1.2.0" + org.eclipse.papyrus.infra.services.labelprovider;bundle-version="1.2.0", + org.eclipse.papyrus.infra.ui.emf;bundle-version="1.2.0" Bundle-Vendor: %Bundle-Vendor Bundle-ActivationPolicy: lazy Bundle-Version: 1.2.0.qualifier diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.properties/src/org/eclipse/papyrus/infra/nattable/properties/observable/AbstractPasteObjectPostActionsObservableValue.java b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.properties/src/org/eclipse/papyrus/infra/nattable/properties/observable/AbstractPasteObjectPostActionsObservableValue.java index 3bfad68b2f3..01f93bfdd62 100644 --- a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.properties/src/org/eclipse/papyrus/infra/nattable/properties/observable/AbstractPasteObjectPostActionsObservableValue.java +++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.properties/src/org/eclipse/papyrus/infra/nattable/properties/observable/AbstractPasteObjectPostActionsObservableValue.java @@ -29,13 +29,13 @@ import org.eclipse.emf.edit.command.RemoveCommand; import org.eclipse.emf.edit.domain.EditingDomain;
import org.eclipse.gmf.runtime.common.core.command.ICommand;
import org.eclipse.papyrus.commands.wrappers.GMFtoEMFCommandWrapper;
-import org.eclipse.papyrus.infra.emf.databinding.EMFObservableList;
import org.eclipse.papyrus.infra.nattable.command.TableCommands;
import org.eclipse.papyrus.infra.nattable.model.nattable.Table;
import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.NattableaxisconfigurationFactory;
import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.NattableaxisconfigurationPackage;
import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.PasteEObjectConfiguration;
import org.eclipse.papyrus.infra.nattable.utils.AxisConfigurationUtils;
+import org.eclipse.papyrus.infra.ui.emf.databinding.EMFObservableList;
/**
* Observable value for the element type id
@@ -97,7 +97,7 @@ public abstract class AbstractPasteObjectPostActionsObservableValue extends EMFO /**
*
- * @see org.eclipse.papyrus.infra.emf.databinding.EMFObservableList#getAddAllCommand(java.util.Collection)
+ * @see org.eclipse.papyrus.infra.ui.emf.databinding.EMFObservableList#getAddAllCommand(java.util.Collection)
*
* @param values
* @return
@@ -118,7 +118,7 @@ public abstract class AbstractPasteObjectPostActionsObservableValue extends EMFO /**
*
- * @see org.eclipse.papyrus.infra.emf.databinding.EMFObservableList#getAddAllCommand(int, java.util.Collection)
+ * @see org.eclipse.papyrus.infra.ui.emf.databinding.EMFObservableList#getAddAllCommand(int, java.util.Collection)
*
* @param index
* @param values
@@ -141,7 +141,7 @@ public abstract class AbstractPasteObjectPostActionsObservableValue extends EMFO /**
*
- * @see org.eclipse.papyrus.infra.emf.databinding.EMFObservableList#getAddCommand(int, java.lang.Object)
+ * @see org.eclipse.papyrus.infra.ui.emf.databinding.EMFObservableList#getAddCommand(int, java.lang.Object)
*
* @param index
* @param value
@@ -191,7 +191,7 @@ public abstract class AbstractPasteObjectPostActionsObservableValue extends EMFO /**
*
- * @see org.eclipse.papyrus.infra.emf.databinding.EMFObservableList#getAddCommand(java.lang.Object)
+ * @see org.eclipse.papyrus.infra.ui.emf.databinding.EMFObservableList#getAddCommand(java.lang.Object)
*
* @param value
* @return
@@ -211,7 +211,7 @@ public abstract class AbstractPasteObjectPostActionsObservableValue extends EMFO /**
*
- * @see org.eclipse.papyrus.infra.emf.databinding.EMFObservableList#getRemoveAllCommand(java.util.Collection)
+ * @see org.eclipse.papyrus.infra.ui.emf.databinding.EMFObservableList#getRemoveAllCommand(java.util.Collection)
*
* @param values
* @return
@@ -244,7 +244,7 @@ public abstract class AbstractPasteObjectPostActionsObservableValue extends EMFO /**
*
- * @see org.eclipse.papyrus.infra.emf.databinding.EMFObservableList#getSetCommand(int, java.lang.Object)
+ * @see org.eclipse.papyrus.infra.ui.emf.databinding.EMFObservableList#getSetCommand(int, java.lang.Object)
*
* @param index
* @param value
@@ -266,7 +266,7 @@ public abstract class AbstractPasteObjectPostActionsObservableValue extends EMFO /**
*
- * @see org.eclipse.papyrus.infra.emf.databinding.EMFObservableList#getRemoveCommand(java.lang.Object)
+ * @see org.eclipse.papyrus.infra.ui.emf.databinding.EMFObservableList#getRemoveCommand(java.lang.Object)
*
* @param value
* @return
diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/META-INF/MANIFEST.MF b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/META-INF/MANIFEST.MF index b8429354fa1..c48e23c43e8 100644 --- a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/META-INF/MANIFEST.MF +++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/META-INF/MANIFEST.MF @@ -69,7 +69,8 @@ Require-Bundle: org.eclipse.papyrus.infra.widgets;bundle-version="1.2.0", ca.odell.glazedlists;bundle-version="1.9.0", org.eclipse.papyrus.infra.gmfdiag.common;bundle-version="1.2.0", org.eclipse.papyrus.infra.services.decoration;bundle-version="1.2.0", - org.eclipse.papyrus.infra.ui;bundle-version="1.2.0" + org.eclipse.papyrus.infra.ui;bundle-version="1.2.0", + org.eclipse.papyrus.infra.ui.emf;bundle-version="1.2.0" Bundle-Vendor: %Bundle-Vendor Bundle-ActivationPolicy: lazy Bundle-Version: 1.2.0.qualifier diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/celleditor/config/AbstractCellAxisConfiguration.java b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/celleditor/config/AbstractCellAxisConfiguration.java index a21efe2e945..65fa3d96216 100644 --- a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/celleditor/config/AbstractCellAxisConfiguration.java +++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/celleditor/config/AbstractCellAxisConfiguration.java @@ -22,10 +22,10 @@ import org.eclipse.nebula.widgets.nattable.edit.EditConfigAttributes; import org.eclipse.nebula.widgets.nattable.edit.editor.ICellEditor; import org.eclipse.nebula.widgets.nattable.painter.cell.ICellPainter; import org.eclipse.nebula.widgets.nattable.style.DisplayMode; -import org.eclipse.papyrus.infra.emf.providers.EMFLabelProvider; import org.eclipse.papyrus.infra.nattable.manager.table.INattableModelManager; import org.eclipse.papyrus.infra.nattable.model.nattable.Table; import org.eclipse.papyrus.infra.nattable.utils.NattableConfigAttributes; +import org.eclipse.papyrus.infra.ui.emf.providers.EMFLabelProvider; /** * Bridge between the old {@link IAxisCellEditorConfiguration} and the new {@link ICellAxisConfiguration} diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/configuration/CellEditorAxisConfiguration.java b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/configuration/CellEditorAxisConfiguration.java index bf72b29d904..59ab820eae5 100755 --- a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/configuration/CellEditorAxisConfiguration.java +++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/configuration/CellEditorAxisConfiguration.java @@ -30,7 +30,6 @@ import org.eclipse.nebula.widgets.nattable.layer.cell.ColumnOverrideLabelAccumul import org.eclipse.nebula.widgets.nattable.painter.cell.ICellPainter; import org.eclipse.nebula.widgets.nattable.style.DisplayMode; import org.eclipse.osgi.util.NLS; -import org.eclipse.papyrus.infra.emf.providers.EMFLabelProvider; import org.eclipse.papyrus.infra.nattable.Activator; import org.eclipse.papyrus.infra.nattable.accumulator.CustomRowOverrideLabelAccumulator; import org.eclipse.papyrus.infra.nattable.celleditor.config.CellAxisConfigurationRegistry; @@ -45,6 +44,7 @@ import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxis.IAxis; import org.eclipse.papyrus.infra.nattable.model.nattable.nattableconfiguration.CellEditorDeclaration; import org.eclipse.papyrus.infra.nattable.utils.NattableConfigAttributes; import org.eclipse.papyrus.infra.nattable.utils.TableHelper; +import org.eclipse.papyrus.infra.ui.emf.providers.EMFLabelProvider; /** * This class allows to configure cell editors by Axis diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/provider/ProblemLabelProvider.java b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/provider/ProblemLabelProvider.java index eda9082a386..fb55bb166f8 100644 --- a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/provider/ProblemLabelProvider.java +++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/provider/ProblemLabelProvider.java @@ -18,11 +18,11 @@ import java.util.List; import org.eclipse.emf.ecore.EObject;
import org.eclipse.osgi.util.NLS;
-import org.eclipse.papyrus.infra.emf.providers.EMFLabelProvider;
import org.eclipse.papyrus.infra.nattable.messages.Messages;
import org.eclipse.papyrus.infra.nattable.model.nattable.nattableproblem.Problem;
import org.eclipse.papyrus.infra.nattable.model.nattable.nattableproblem.StringResolutionProblem;
import org.eclipse.papyrus.infra.services.labelprovider.service.IFilteredLabelProvider;
+import org.eclipse.papyrus.infra.ui.emf.providers.EMFLabelProvider;
/**
* Label Provider for problem
@@ -46,7 +46,7 @@ public class ProblemLabelProvider extends EMFLabelProvider implements IFilteredL /**
*
- * @see org.eclipse.papyrus.infra.emf.providers.EMFLabelProvider#getText(org.eclipse.emf.ecore.EObject)
+ * @see org.eclipse.papyrus.infra.ui.emf.providers.EMFLabelProvider#getText(org.eclipse.emf.ecore.EObject)
*
* @param element
* @return
diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/provider/TableLabelProvider.java b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/provider/TableLabelProvider.java index a4450bce1d0..794a90418a7 100644 --- a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/provider/TableLabelProvider.java +++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/provider/TableLabelProvider.java @@ -14,10 +14,10 @@ package org.eclipse.papyrus.infra.nattable.provider; import java.util.Collection;
import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.papyrus.infra.emf.providers.EMFLabelProvider;
import org.eclipse.papyrus.infra.emf.utils.EMFHelper;
import org.eclipse.papyrus.infra.nattable.model.nattable.Table;
import org.eclipse.papyrus.infra.services.labelprovider.service.IFilteredLabelProvider;
+import org.eclipse.papyrus.infra.ui.emf.providers.EMFLabelProvider;
import org.eclipse.papyrus.infra.widgets.Activator;
import org.eclipse.swt.graphics.Image;
@@ -30,7 +30,7 @@ public class TableLabelProvider extends EMFLabelProvider implements IFilteredLab /**
*
- * @see org.eclipse.papyrus.infra.emf.providers.EMFLabelProvider#getText(java.lang.Object)
+ * @see org.eclipse.papyrus.infra.ui.emf.providers.EMFLabelProvider#getText(java.lang.Object)
*
* @param table
* @return
@@ -51,7 +51,7 @@ public class TableLabelProvider extends EMFLabelProvider implements IFilteredLab /**
*
- * @see org.eclipse.papyrus.infra.emf.providers.EMFLabelProvider#getImage(java.lang.Object)
+ * @see org.eclipse.papyrus.infra.ui.emf.providers.EMFLabelProvider#getImage(java.lang.Object)
*
* @param table
* @return
@@ -114,7 +114,7 @@ public class TableLabelProvider extends EMFLabelProvider implements IFilteredLab /**
*
- * @see org.eclipse.papyrus.infra.emf.providers.EMFLabelProvider#hasCommonImage(java.util.Collection)
+ * @see org.eclipse.papyrus.infra.ui.emf.providers.EMFLabelProvider#hasCommonImage(java.util.Collection)
*
* @param objects
* @return
@@ -144,7 +144,7 @@ public class TableLabelProvider extends EMFLabelProvider implements IFilteredLab /**
*
- * @see org.eclipse.papyrus.infra.emf.providers.EMFLabelProvider#getNonCommonIcon(java.lang.Object)
+ * @see org.eclipse.papyrus.infra.ui.emf.providers.EMFLabelProvider#getNonCommonIcon(java.lang.Object)
*
* @param commonObject
* @return
diff --git a/plugins/infra/org.eclipse.papyrus.infra.hyperlink/META-INF/MANIFEST.MF b/plugins/infra/org.eclipse.papyrus.infra.hyperlink/META-INF/MANIFEST.MF index 3f92730aae5..865c06b76c1 100644 --- a/plugins/infra/org.eclipse.papyrus.infra.hyperlink/META-INF/MANIFEST.MF +++ b/plugins/infra/org.eclipse.papyrus.infra.hyperlink/META-INF/MANIFEST.MF @@ -22,7 +22,8 @@ Require-Bundle: org.eclipse.emf.transaction, org.eclipse.papyrus.emf.facet.custom.core;bundle-version="1.2.0", org.eclipse.papyrus.infra.ui;bundle-version="1.2.0", org.eclipse.papyrus.infra.core.sasheditor.di;bundle-version="1.2.0", - org.eclipse.papyrus.infra.core.sashwindows.di;bundle-version="1.2.0" + org.eclipse.papyrus.infra.core.sashwindows.di;bundle-version="1.2.0", + org.eclipse.papyrus.infra.ui.emf;bundle-version="1.2.0" Bundle-Vendor: %providerName Bundle-ActivationPolicy: lazy Bundle-Version: 1.2.0.qualifier diff --git a/plugins/infra/org.eclipse.papyrus.infra.hyperlink/src/org/eclipse/papyrus/infra/hyperlink/helper/ObjectHyperLinkHelper.java b/plugins/infra/org.eclipse.papyrus.infra.hyperlink/src/org/eclipse/papyrus/infra/hyperlink/helper/ObjectHyperLinkHelper.java index 8acfff5abd6..f52e4158fda 100644 --- a/plugins/infra/org.eclipse.papyrus.infra.hyperlink/src/org/eclipse/papyrus/infra/hyperlink/helper/ObjectHyperLinkHelper.java +++ b/plugins/infra/org.eclipse.papyrus.infra.hyperlink/src/org/eclipse/papyrus/infra/hyperlink/helper/ObjectHyperLinkHelper.java @@ -32,7 +32,6 @@ import org.eclipse.papyrus.infra.core.resource.ModelSet; import org.eclipse.papyrus.infra.core.sashwindows.di.service.IPageManager; import org.eclipse.papyrus.infra.core.services.ServiceException; import org.eclipse.papyrus.infra.core.services.ServicesRegistry; -import org.eclipse.papyrus.infra.emf.providers.EMFGraphicalContentProvider; import org.eclipse.papyrus.infra.emf.utils.ServiceUtilsForEObject; import org.eclipse.papyrus.infra.hyperlink.Activator; import org.eclipse.papyrus.infra.hyperlink.commands.CreateHyperLinkObjectCommand; @@ -40,6 +39,7 @@ import org.eclipse.papyrus.infra.hyperlink.object.HyperLinkObject; import org.eclipse.papyrus.infra.hyperlink.object.HyperLinkSpecificObject; import org.eclipse.papyrus.infra.hyperlink.util.HyperLinkConstants; import org.eclipse.papyrus.infra.services.labelprovider.service.LabelProviderService; +import org.eclipse.papyrus.infra.ui.emf.providers.EMFGraphicalContentProvider; import org.eclipse.papyrus.infra.widgets.editors.TreeSelectorDialog; import org.eclipse.papyrus.infra.widgets.providers.CompositeContentProvider; import org.eclipse.papyrus.infra.widgets.providers.ICompositeContentProvider; diff --git a/plugins/infra/org.eclipse.papyrus.infra.hyperlink/src/org/eclipse/papyrus/infra/hyperlink/ui/EditorLookForEditorShell.java b/plugins/infra/org.eclipse.papyrus.infra.hyperlink/src/org/eclipse/papyrus/infra/hyperlink/ui/EditorLookForEditorShell.java index 15703793585..8a2d9edefec 100644 --- a/plugins/infra/org.eclipse.papyrus.infra.hyperlink/src/org/eclipse/papyrus/infra/hyperlink/ui/EditorLookForEditorShell.java +++ b/plugins/infra/org.eclipse.papyrus.infra.hyperlink/src/org/eclipse/papyrus/infra/hyperlink/ui/EditorLookForEditorShell.java @@ -39,8 +39,6 @@ import org.eclipse.papyrus.infra.core.resource.ModelSet; import org.eclipse.papyrus.infra.core.sashwindows.di.service.IPageManager; import org.eclipse.papyrus.infra.core.services.ServiceException; import org.eclipse.papyrus.infra.core.services.ServicesRegistry; -import org.eclipse.papyrus.infra.emf.providers.EMFGraphicalContentProvider; -import org.eclipse.papyrus.infra.emf.providers.strategy.ContainmentBrowseStrategy; import org.eclipse.papyrus.infra.emf.utils.EMFHelper; import org.eclipse.papyrus.infra.emf.utils.ServiceUtilsForEObject; import org.eclipse.papyrus.infra.hyperlink.Activator; @@ -48,6 +46,8 @@ import org.eclipse.papyrus.infra.hyperlink.util.EditorListContentProvider; import org.eclipse.papyrus.infra.hyperlink.util.TreeViewContentProvider; import org.eclipse.papyrus.infra.services.labelprovider.service.LabelProviderService; import org.eclipse.papyrus.infra.ui.editorsfactory.IPageIconsRegistry; +import org.eclipse.papyrus.infra.ui.emf.providers.EMFGraphicalContentProvider; +import org.eclipse.papyrus.infra.ui.emf.providers.strategy.ContainmentBrowseStrategy; import org.eclipse.papyrus.infra.widgets.editors.ICommitListener; import org.eclipse.papyrus.infra.widgets.providers.IGraphicalContentProvider; import org.eclipse.papyrus.infra.widgets.providers.IHierarchicContentProvider; diff --git a/plugins/infra/org.eclipse.papyrus.infra.hyperlink/src/org/eclipse/papyrus/infra/hyperlink/util/TreeViewContentProvider.java b/plugins/infra/org.eclipse.papyrus.infra.hyperlink/src/org/eclipse/papyrus/infra/hyperlink/util/TreeViewContentProvider.java index 3cf4100e961..fd52a6222bf 100644 --- a/plugins/infra/org.eclipse.papyrus.infra.hyperlink/src/org/eclipse/papyrus/infra/hyperlink/util/TreeViewContentProvider.java +++ b/plugins/infra/org.eclipse.papyrus.infra.hyperlink/src/org/eclipse/papyrus/infra/hyperlink/util/TreeViewContentProvider.java @@ -20,8 +20,8 @@ import java.util.Set; import org.eclipse.emf.ecore.EObject; import org.eclipse.jface.viewers.Viewer; -import org.eclipse.papyrus.infra.emf.providers.strategy.SemanticEMFContentProvider; import org.eclipse.papyrus.infra.emf.utils.EMFHelper; +import org.eclipse.papyrus.infra.ui.emf.providers.strategy.SemanticEMFContentProvider; /** * Specific content provider for the tree view of the "views" dialog to choose a diagram for a hyperlink @@ -38,7 +38,7 @@ public class TreeViewContentProvider extends SemanticEMFContentProvider { /** * - * @see org.eclipse.papyrus.infra.emf.providers.MoDiscoContentProvider#getChildren(java.lang.Object) + * @see org.eclipse.papyrus.infra.ui.emf.providers.MoDiscoContentProvider#getChildren(java.lang.Object) * * @param parentElement * @return diff --git a/plugins/infra/org.eclipse.papyrus.infra.newchild/META-INF/MANIFEST.MF b/plugins/infra/org.eclipse.papyrus.infra.newchild/META-INF/MANIFEST.MF index fa787ba142e..b63869cd4ef 100644 --- a/plugins/infra/org.eclipse.papyrus.infra.newchild/META-INF/MANIFEST.MF +++ b/plugins/infra/org.eclipse.papyrus.infra.newchild/META-INF/MANIFEST.MF @@ -16,7 +16,8 @@ Require-Bundle: org.eclipse.ui, org.eclipse.papyrus.infra.widgets;bundle-version="1.2.0", org.eclipse.papyrus.infra.emf;bundle-version="1.2.0", org.eclipse.papyrus.infra.core;bundle-version="1.2.0", - org.eclipse.papyrus.uml.tools;bundle-version="1.2.0" + org.eclipse.papyrus.uml.tools;bundle-version="1.2.0", + org.eclipse.papyrus.infra.ui.emf;bundle-version="1.2.0" Bundle-Vendor: %providerName Bundle-ActivationPolicy: lazy Bundle-ClassPath: . diff --git a/plugins/infra/org.eclipse.papyrus.infra.ui/src/org/eclipse/papyrus/infra/ui/menu/AbstractCommonCommandHandler.java b/plugins/infra/org.eclipse.papyrus.infra.ui/src/org/eclipse/papyrus/infra/ui/menu/AbstractCommonCommandHandler.java index 0dde1df49b9..deb6799a923 100644 --- a/plugins/infra/org.eclipse.papyrus.infra.ui/src/org/eclipse/papyrus/infra/ui/menu/AbstractCommonCommandHandler.java +++ b/plugins/infra/org.eclipse.papyrus.infra.ui/src/org/eclipse/papyrus/infra/ui/menu/AbstractCommonCommandHandler.java @@ -25,7 +25,7 @@ import org.eclipse.emf.ecore.EObject; import org.eclipse.emf.transaction.TransactionalEditingDomain; import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.papyrus.infra.core.services.ServiceException; -import org.eclipse.papyrus.infra.emf.utils.ServiceUtilsForHandlers; +import org.eclipse.papyrus.infra.ui.util.ServiceUtilsForHandlers; import org.eclipse.ui.ISources; /** @@ -51,6 +51,7 @@ public abstract class AbstractCommonCommandHandler extends AbstractHandler { * @return null * @throws ExecutionException */ + @Override public abstract Object execute(ExecutionEvent event) throws ExecutionException; protected TransactionalEditingDomain getEditingDomain(ExecutionEvent event) { @@ -78,7 +79,7 @@ public abstract class AbstractCommonCommandHandler extends AbstractHandler { protected boolean computeEnabled() { List<EObject> elts = getSelectedElements(); - return !(elts.size()==0); + return !(elts.size() == 0); } protected List<?> getSelection() { diff --git a/plugins/infra/emf/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/utils/ServiceUtilsForHandlers.java b/plugins/infra/org.eclipse.papyrus.infra.ui/src/org/eclipse/papyrus/infra/ui/util/ServiceUtilsForHandlers.java index 6c853bfe9f2..c6b5742312e 100644 --- a/plugins/infra/emf/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/utils/ServiceUtilsForHandlers.java +++ b/plugins/infra/org.eclipse.papyrus.infra.ui/src/org/eclipse/papyrus/infra/ui/util/ServiceUtilsForHandlers.java @@ -11,7 +11,7 @@ * Christian W. Damus - bug 485220 * *****************************************************************************/ -package org.eclipse.papyrus.infra.emf.utils; +package org.eclipse.papyrus.infra.ui.util; import org.eclipse.core.commands.ExecutionEvent; import org.eclipse.core.expressions.IEvaluationContext; diff --git a/plugins/infra/emf/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/utils/ServiceUtilsForIEvaluationContext.java b/plugins/infra/org.eclipse.papyrus.infra.ui/src/org/eclipse/papyrus/infra/ui/util/ServiceUtilsForIEvaluationContext.java index 469d835f6fc..eda497bdc83 100644 --- a/plugins/infra/emf/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/utils/ServiceUtilsForIEvaluationContext.java +++ b/plugins/infra/org.eclipse.papyrus.infra.ui/src/org/eclipse/papyrus/infra/ui/util/ServiceUtilsForIEvaluationContext.java @@ -9,7 +9,7 @@ * Contributors: * Cedric Dumoulin - Initial API and implementation *****************************************************************************/ -package org.eclipse.papyrus.infra.emf.utils; +package org.eclipse.papyrus.infra.ui.util; import org.eclipse.core.commands.AbstractHandler; import org.eclipse.core.expressions.IEvaluationContext; diff --git a/plugins/infra/emf/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/utils/ServiceUtilsForSelection.java b/plugins/infra/org.eclipse.papyrus.infra.ui/src/org/eclipse/papyrus/infra/ui/util/ServiceUtilsForSelection.java index c79aba34c57..f3a799d303a 100644 --- a/plugins/infra/emf/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/utils/ServiceUtilsForSelection.java +++ b/plugins/infra/org.eclipse.papyrus.infra.ui/src/org/eclipse/papyrus/infra/ui/util/ServiceUtilsForSelection.java @@ -9,7 +9,7 @@ * Contributors: * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation *****************************************************************************/ -package org.eclipse.papyrus.infra.emf.utils; +package org.eclipse.papyrus.infra.ui.util; import java.util.Iterator; @@ -19,6 +19,8 @@ import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.papyrus.infra.core.services.ServiceException; import org.eclipse.papyrus.infra.core.services.ServicesRegistry; import org.eclipse.papyrus.infra.core.utils.AbstractServiceUtils; +import org.eclipse.papyrus.infra.emf.utils.EMFHelper; +import org.eclipse.papyrus.infra.emf.utils.ServiceUtilsForEObject; /** * ServiceUtils based on an ISelection. diff --git a/plugins/infra/services/org.eclipse.papyrus.infra.services.controlmode/src/org/eclipse/papyrus/infra/services/controlmode/handler/UncontrolCommandHandler.java b/plugins/infra/services/org.eclipse.papyrus.infra.services.controlmode/src/org/eclipse/papyrus/infra/services/controlmode/handler/UncontrolCommandHandler.java index 3a4af35eb4b..d4659e5c77b 100644 --- a/plugins/infra/services/org.eclipse.papyrus.infra.services.controlmode/src/org/eclipse/papyrus/infra/services/controlmode/handler/UncontrolCommandHandler.java +++ b/plugins/infra/services/org.eclipse.papyrus.infra.services.controlmode/src/org/eclipse/papyrus/infra/services/controlmode/handler/UncontrolCommandHandler.java @@ -25,11 +25,11 @@ import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.papyrus.commands.wrappers.GMFtoEMFCommandWrapper; import org.eclipse.papyrus.infra.core.services.ServiceException; import org.eclipse.papyrus.infra.emf.utils.EMFHelper; -import org.eclipse.papyrus.infra.emf.utils.ServiceUtilsForSelection; import org.eclipse.papyrus.infra.services.controlmode.ControlModeManager; import org.eclipse.papyrus.infra.services.controlmode.ControlModeRequest; import org.eclipse.papyrus.infra.services.controlmode.IControlModeManager; import org.eclipse.papyrus.infra.services.controlmode.messages.Messages; +import org.eclipse.papyrus.infra.ui.util.ServiceUtilsForSelection; import org.eclipse.papyrus.infra.widgets.toolbox.notification.builders.NotificationBuilder; import org.eclipse.ui.handlers.HandlerUtil; diff --git a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/META-INF/MANIFEST.MF b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/META-INF/MANIFEST.MF index aa2829730af..3944fe6d343 100644 --- a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/META-INF/MANIFEST.MF +++ b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/META-INF/MANIFEST.MF @@ -65,7 +65,8 @@ Require-Bundle: org.eclipse.ui, org.eclipse.papyrus.emf.facet.custom.core;bundle-version="1.2.0",
org.eclipse.core.databinding.observable,
org.eclipse.papyrus.uml.diagram.clazz;bundle-version="1.2.0",
- org.eclipse.papyrus.infra.ui;bundle-version="1.2.0"
+ org.eclipse.papyrus.infra.ui;bundle-version="1.2.0",
+ org.eclipse.papyrus.infra.ui.emf;bundle-version="1.2.0"
Bundle-Vendor: %providerName
Bundle-ActivationPolicy: lazy
Bundle-Version: 1.2.0.qualifier
diff --git a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src/org/eclipse/papyrus/sysml/diagram/common/utils/SysMLSelectionTester.java b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src/org/eclipse/papyrus/sysml/diagram/common/utils/SysMLSelectionTester.java index 3a514c70f76..fc6b90e4aff 100644 --- a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src/org/eclipse/papyrus/sysml/diagram/common/utils/SysMLSelectionTester.java +++ b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src/org/eclipse/papyrus/sysml/diagram/common/utils/SysMLSelectionTester.java @@ -18,7 +18,7 @@ import org.eclipse.emf.ecore.EObject; import org.eclipse.jface.viewers.ISelection; import org.eclipse.papyrus.infra.core.resource.NotFoundException; import org.eclipse.papyrus.infra.core.services.ServiceException; -import org.eclipse.papyrus.infra.emf.utils.ServiceUtilsForSelection; +import org.eclipse.papyrus.infra.ui.util.ServiceUtilsForSelection; import org.eclipse.papyrus.sysml.diagram.common.Activator; import org.eclipse.papyrus.uml.tools.model.UmlModel; import org.eclipse.uml2.uml.Package; diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/META-INF/MANIFEST.MF b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/META-INF/MANIFEST.MF index 811d3649cfa..4c8259e7d37 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/META-INF/MANIFEST.MF +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/META-INF/MANIFEST.MF @@ -114,7 +114,8 @@ Require-Bundle: org.eclipse.papyrus.infra.core;bundle-version="1.2.0", org.eclipse.papyrus.infra.services.viewersearch;bundle-version="1.2.0", org.eclipse.papyrus.infra.hyperlink;bundle-version="1.2.0", org.eclipse.papyrus.infra.ui;bundle-version="1.2.0", - org.eclipse.papyrus.infra.core.sashwindows.di;bundle-version="1.2.0" + org.eclipse.papyrus.infra.core.sashwindows.di;bundle-version="1.2.0", + org.eclipse.papyrus.infra.ui.emf;bundle-version="1.2.0" Bundle-Vendor: %providerName Bundle-Version: 1.2.0.qualifier Eclipse-BuddyPolicy: dependent diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/actions/AbstractShowHideAction.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/actions/AbstractShowHideAction.java index fb46976fcdd..901176f5ca0 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/actions/AbstractShowHideAction.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/actions/AbstractShowHideAction.java @@ -45,7 +45,7 @@ import org.eclipse.jface.viewers.LabelProvider; import org.eclipse.jface.viewers.StructuredSelection; import org.eclipse.jface.window.Window; import org.eclipse.papyrus.commands.wrappers.GEFtoEMFCommandWrapper; -import org.eclipse.papyrus.infra.emf.providers.EMFLabelProvider; +import org.eclipse.papyrus.infra.ui.emf.providers.EMFLabelProvider; import org.eclipse.papyrus.uml.diagram.common.Activator; import org.eclipse.swt.graphics.Image; import org.eclipse.ui.IActionDelegate; diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/handlers/GraphicalCommandHandler.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/handlers/GraphicalCommandHandler.java index b43e2976750..baf610ecd33 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/handlers/GraphicalCommandHandler.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/handlers/GraphicalCommandHandler.java @@ -31,8 +31,8 @@ import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.papyrus.commands.wrappers.GEFtoEMFCommandWrapper; import org.eclipse.papyrus.infra.core.services.ServiceException; import org.eclipse.papyrus.infra.core.utils.TransactionHelper; -import org.eclipse.papyrus.infra.emf.utils.ServiceUtilsForHandlers; import org.eclipse.papyrus.infra.gmfdiag.common.utils.ServiceUtilsForEditPart; +import org.eclipse.papyrus.infra.ui.util.ServiceUtilsForHandlers; import org.eclipse.ui.handlers.HandlerUtil; /** diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/service/palette/SemanticPostAction.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/service/palette/SemanticPostAction.java index 26eeb6ad9ba..4e678b896df 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/service/palette/SemanticPostAction.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/service/palette/SemanticPostAction.java @@ -58,8 +58,8 @@ import org.eclipse.papyrus.infra.core.resource.ModelSet; import org.eclipse.papyrus.infra.core.resource.NotFoundException; import org.eclipse.papyrus.infra.core.services.ServiceException; import org.eclipse.papyrus.infra.core.utils.ServiceUtils; -import org.eclipse.papyrus.infra.emf.utils.ProviderHelper; import org.eclipse.papyrus.infra.services.labelprovider.service.LabelProviderService; +import org.eclipse.papyrus.infra.ui.emf.utils.ProviderHelper; import org.eclipse.papyrus.infra.ui.util.EditorUtils; import org.eclipse.papyrus.infra.widgets.editors.TreeSelectorDialog; import org.eclipse.papyrus.uml.diagram.common.Activator; diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/util/UMLSelectionTester.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/util/UMLSelectionTester.java index 43b1414b39c..fc77bf13f79 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/util/UMLSelectionTester.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/util/UMLSelectionTester.java @@ -19,9 +19,9 @@ import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.papyrus.infra.core.resource.ModelSet; import org.eclipse.papyrus.infra.core.resource.NotFoundException; import org.eclipse.papyrus.infra.core.services.ServiceException; -import org.eclipse.papyrus.infra.emf.utils.ServiceUtilsForSelection; import org.eclipse.papyrus.infra.ui.editor.IMultiDiagramEditor; import org.eclipse.papyrus.infra.ui.util.EditorUtils; +import org.eclipse.papyrus.infra.ui.util.ServiceUtilsForSelection; import org.eclipse.papyrus.uml.tools.model.UmlModel; import org.eclipse.uml2.uml.Package; import org.eclipse.uml2.uml.Profile; diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/META-INF/MANIFEST.MF b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/META-INF/MANIFEST.MF index d2356144a22..ce803fec621 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/META-INF/MANIFEST.MF +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/META-INF/MANIFEST.MF @@ -66,7 +66,8 @@ Require-Bundle: org.eclipse.ui, org.eclipse.papyrus.infra.viewpoints.policy;bundle-version="1.2.0", org.eclipse.papyrus.infra.viewpoints.configuration;bundle-version="1.2.0", org.eclipse.core.databinding.observable, - org.eclipse.papyrus.infra.ui;bundle-version="1.2.0" + org.eclipse.papyrus.infra.ui;bundle-version="1.2.0", + org.eclipse.papyrus.infra.ui.emf;bundle-version="1.2.0" Bundle-Vendor: %providerName Eclipse-LazyStart: true Bundle-Version: 1.2.0.qualifier diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.dnd/META-INF/MANIFEST.MF b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.dnd/META-INF/MANIFEST.MF index 95532bc1560..02c51fd531b 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.dnd/META-INF/MANIFEST.MF +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.dnd/META-INF/MANIFEST.MF @@ -16,7 +16,8 @@ Require-Bundle: org.eclipse.ui, org.eclipse.papyrus.infra.services.labelprovider;bundle-version="1.2.0",
org.eclipse.papyrus.uml.diagram.composite;bundle-version="1.2.0",
org.eclipse.papyrus.emf.facet.custom.ui;bundle-version="1.2.0",
- org.eclipse.papyrus.infra.gmfdiag.common;bundle-version="1.2.0"
+ org.eclipse.papyrus.infra.gmfdiag.common;bundle-version="1.2.0",
+ org.eclipse.papyrus.infra.ui.emf;bundle-version="1.2.0"
Bundle-Vendor: Eclipse Modeling Project
Bundle-RequiredExecutionEnvironment: JavaSE-1.7
Bundle-ActivationPolicy: lazy
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.interactionoverview/META-INF/MANIFEST.MF b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.interactionoverview/META-INF/MANIFEST.MF index 53211c1c39b..cfa727152e4 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.interactionoverview/META-INF/MANIFEST.MF +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.interactionoverview/META-INF/MANIFEST.MF @@ -58,7 +58,8 @@ Require-Bundle: org.eclipse.ui, org.eclipse.papyrus.infra.elementtypesconfigurations;bundle-version="1.2.0",
org.eclipse.papyrus.infra.gmfdiag.css;bundle-version="1.2.0",
org.eclipse.papyrus.infra.ui;bundle-version="1.2.0",
- org.eclipse.papyrus.infra.core.sashwindows.di;bundle-version="1.2.0"
+ org.eclipse.papyrus.infra.core.sashwindows.di;bundle-version="1.2.0",
+ org.eclipse.papyrus.infra.ui.emf;bundle-version="1.2.0"
Bundle-Vendor: %providerName
Bundle-ActivationPolicy: lazy
Bundle-Version: 1.2.0.qualifier
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.interactionoverview/src/org/eclipse/papyrus/uml/diagram/interactionoverview/provider/DiagramContentProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.interactionoverview/src/org/eclipse/papyrus/uml/diagram/interactionoverview/provider/DiagramContentProvider.java index 166f4c4c313..16e5730b921 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.interactionoverview/src/org/eclipse/papyrus/uml/diagram/interactionoverview/provider/DiagramContentProvider.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.interactionoverview/src/org/eclipse/papyrus/uml/diagram/interactionoverview/provider/DiagramContentProvider.java @@ -18,8 +18,8 @@ import org.eclipse.gmf.runtime.notation.Diagram; import org.eclipse.papyrus.infra.core.resource.ModelUtils;
import org.eclipse.papyrus.infra.core.sashwindows.di.service.IPageManager;
import org.eclipse.papyrus.infra.core.services.ServicesRegistry;
-import org.eclipse.papyrus.infra.emf.providers.MoDiscoContentProvider;
import org.eclipse.papyrus.infra.emf.utils.EMFHelper;
+import org.eclipse.papyrus.infra.ui.emf.providers.MoDiscoContentProvider;
import org.eclipse.papyrus.infra.widgets.providers.IHierarchicContentProvider;
import org.eclipse.papyrus.uml.diagram.communication.edit.parts.ModelEditPart;
import org.eclipse.papyrus.uml.diagram.interactionoverview.Activator;
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.menu/META-INF/MANIFEST.MF b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.menu/META-INF/MANIFEST.MF index 644933aa82f..00273717956 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.menu/META-INF/MANIFEST.MF +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.menu/META-INF/MANIFEST.MF @@ -30,7 +30,8 @@ Require-Bundle: org.eclipse.ui, org.eclipse.papyrus.infra.gmfdiag.menu;bundle-version="1.2.0",
org.eclipse.papyrus.uml.tools.utils;bundle-version="1.2.0",
org.eclipse.papyrus.infra.ui;bundle-version="1.2.0",
- com.google.guava;bundle-version="11.0.0"
+ com.google.guava;bundle-version="11.0.0",
+ org.eclipse.papyrus.infra.ui.emf;bundle-version="1.2.0"
Bundle-Vendor: %providerName
Bundle-ActivationPolicy: lazy
Bundle-Version: 1.2.0.qualifier
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.modelexplorer/META-INF/MANIFEST.MF b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.modelexplorer/META-INF/MANIFEST.MF index 4b011a52af0..9ce93ecec5b 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.modelexplorer/META-INF/MANIFEST.MF +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.modelexplorer/META-INF/MANIFEST.MF @@ -19,7 +19,8 @@ Require-Bundle: org.eclipse.ui, org.eclipse.papyrus.uml.tools;bundle-version="1.2.0",
org.eclipse.papyrus.emf.facet.custom.ui;bundle-version="1.2.0",
org.eclipse.papyrus.emf.facet.custom.core;bundle-version="1.2.0",
- org.eclipse.papyrus.infra.core.sashwindows.di;bundle-version="1.2.0"
+ org.eclipse.papyrus.infra.core.sashwindows.di;bundle-version="1.2.0",
+ org.eclipse.papyrus.infra.ui.emf;bundle-version="1.2.0"
Bundle-Vendor: %providerName
Bundle-ActivationPolicy: lazy
Bundle-Version: 1.2.0.qualifier
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.modelexplorer/src/org/eclipse/papyrus/uml/diagram/modelexplorer/provider/DiagramContentProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.modelexplorer/src/org/eclipse/papyrus/uml/diagram/modelexplorer/provider/DiagramContentProvider.java index 47cab8ab0f3..bc595c1ec40 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.modelexplorer/src/org/eclipse/papyrus/uml/diagram/modelexplorer/provider/DiagramContentProvider.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.modelexplorer/src/org/eclipse/papyrus/uml/diagram/modelexplorer/provider/DiagramContentProvider.java @@ -19,7 +19,7 @@ import org.eclipse.emf.ecore.EObject; import org.eclipse.papyrus.infra.core.resource.ModelUtils;
import org.eclipse.papyrus.infra.core.sashwindows.di.service.IPageManager;
import org.eclipse.papyrus.infra.core.services.ServicesRegistry;
-import org.eclipse.papyrus.infra.emf.providers.MoDiscoContentProvider;
+import org.eclipse.papyrus.infra.ui.emf.providers.MoDiscoContentProvider;
import org.eclipse.papyrus.uml.diagram.modelexplorer.Activator;
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/META-INF/MANIFEST.MF b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/META-INF/MANIFEST.MF index c49f02f1787..67986d05497 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/META-INF/MANIFEST.MF +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/META-INF/MANIFEST.MF @@ -80,8 +80,8 @@ Bundle-Version: 1.2.0.qualifier Bundle-ManifestVersion: 2 Bundle-Activator: org.eclipse.papyrus.uml.diagram.sequence.part.UMLDiagramEditorPlugin Import-Package: org.eclipse.core.databinding.observable, - org.eclipse.papyrus.infra.emf.databinding, org.eclipse.papyrus.infra.tools.databinding, + org.eclipse.papyrus.infra.ui.emf.databinding, org.eclipse.papyrus.uml.tools.databinding, org.eclipse.papyrus.views.properties.contexts, org.eclipse.papyrus.views.properties.modelelement diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/BehaviorDisplayHelper.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/BehaviorDisplayHelper.java index 04d074b38e5..874721ffe14 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/BehaviorDisplayHelper.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/BehaviorDisplayHelper.java @@ -28,9 +28,9 @@ import org.eclipse.emf.transaction.TransactionalEditingDomain; import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.jface.util.Util;
import org.eclipse.papyrus.infra.emf.commands.CreateEAnnotationCommand;
-import org.eclipse.papyrus.infra.emf.databinding.AnnotationObservableValue;
import org.eclipse.papyrus.infra.emf.utils.EMFHelper;
import org.eclipse.papyrus.infra.gmfdiag.common.helper.NotationHelper;
+import org.eclipse.papyrus.infra.ui.emf.databinding.AnnotationObservableValue;
import org.eclipse.papyrus.views.properties.Activator;
import org.eclipse.papyrus.views.properties.contexts.DataContextElement;
import org.eclipse.papyrus.views.properties.modelelement.AnnotationModelElement;
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/GateModelElementFactory.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/GateModelElementFactory.java index 38d8400c6a2..adeff66c184 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/GateModelElementFactory.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/GateModelElementFactory.java @@ -21,9 +21,9 @@ import org.eclipse.emf.edit.domain.EditingDomain; import org.eclipse.emf.transaction.TransactionalEditingDomain;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.papyrus.infra.emf.commands.CreateEAnnotationCommand;
-import org.eclipse.papyrus.infra.emf.databinding.AnnotationObservableValue;
import org.eclipse.papyrus.infra.emf.utils.EMFHelper;
import org.eclipse.papyrus.infra.gmfdiag.common.helper.NotationHelper;
+import org.eclipse.papyrus.infra.ui.emf.databinding.AnnotationObservableValue;
import org.eclipse.papyrus.views.properties.Activator;
import org.eclipse.papyrus.views.properties.contexts.DataContextElement;
import org.eclipse.papyrus.views.properties.modelelement.AnnotationModelElement;
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/InteractionOperandModelElementFactory.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/InteractionOperandModelElementFactory.java index b766ed1f3db..e01020fd871 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/InteractionOperandModelElementFactory.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/InteractionOperandModelElementFactory.java @@ -22,9 +22,9 @@ import org.eclipse.emf.edit.domain.EditingDomain; import org.eclipse.emf.transaction.TransactionalEditingDomain;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.papyrus.infra.emf.commands.CreateEAnnotationCommand;
-import org.eclipse.papyrus.infra.emf.databinding.AnnotationObservableValue;
import org.eclipse.papyrus.infra.emf.utils.EMFHelper;
import org.eclipse.papyrus.infra.gmfdiag.common.helper.NotationHelper;
+import org.eclipse.papyrus.infra.ui.emf.databinding.AnnotationObservableValue;
import org.eclipse.papyrus.uml.diagram.sequence.part.UMLDiagramEditorPlugin;
import org.eclipse.papyrus.uml.diagram.sequence.preferences.CustomInteractionOperandPreferencePage;
import org.eclipse.papyrus.views.properties.Activator;
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/LinkRouteModelElementFactory.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/LinkRouteModelElementFactory.java index 608e6d21986..581c03023a3 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/LinkRouteModelElementFactory.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/LinkRouteModelElementFactory.java @@ -29,9 +29,9 @@ import org.eclipse.gmf.runtime.notation.Edge; import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.jface.viewers.ILabelProvider;
import org.eclipse.papyrus.infra.emf.commands.CreateEAnnotationCommand;
-import org.eclipse.papyrus.infra.emf.databinding.AnnotationObservableValue;
import org.eclipse.papyrus.infra.emf.utils.EMFHelper;
import org.eclipse.papyrus.infra.gmfdiag.common.helper.NotationHelper;
+import org.eclipse.papyrus.infra.ui.emf.databinding.AnnotationObservableValue;
import org.eclipse.papyrus.infra.widgets.providers.AbstractStaticContentProvider;
import org.eclipse.papyrus.infra.widgets.providers.EmptyContentProvider;
import org.eclipse.papyrus.infra.widgets.providers.IStaticContentProvider;
diff --git a/plugins/uml/modelexplorer/org.eclipse.papyrus.uml.modelexplorer/META-INF/MANIFEST.MF b/plugins/uml/modelexplorer/org.eclipse.papyrus.uml.modelexplorer/META-INF/MANIFEST.MF index 674001c61a8..44baa0d6bab 100644 --- a/plugins/uml/modelexplorer/org.eclipse.papyrus.uml.modelexplorer/META-INF/MANIFEST.MF +++ b/plugins/uml/modelexplorer/org.eclipse.papyrus.uml.modelexplorer/META-INF/MANIFEST.MF @@ -36,7 +36,8 @@ Require-Bundle: org.eclipse.ui, org.eclipse.papyrus.infra.newchild;bundle-version="1.2.0",
org.eclipse.emf.edit.ui;bundle-version="2.11.0",
org.eclipse.papyrus.infra.ui;bundle-version="1.2.0",
- org.eclipse.core.expressions
+ org.eclipse.core.expressions,
+ org.eclipse.papyrus.infra.ui.emf;bundle-version="1.2.0"
Bundle-Vendor: %providerName
Bundle-ActivationPolicy: lazy
Bundle-ClassPath: .,
diff --git a/plugins/uml/modelexplorer/org.eclipse.papyrus.uml.modelexplorer/src/org/eclipse/papyrus/uml/modelexplorer/handler/ToggleAdvancedModelExplorerHandler.java b/plugins/uml/modelexplorer/org.eclipse.papyrus.uml.modelexplorer/src/org/eclipse/papyrus/uml/modelexplorer/handler/ToggleAdvancedModelExplorerHandler.java index 0807296f978..260a99553d5 100644 --- a/plugins/uml/modelexplorer/org.eclipse.papyrus.uml.modelexplorer/src/org/eclipse/papyrus/uml/modelexplorer/handler/ToggleAdvancedModelExplorerHandler.java +++ b/plugins/uml/modelexplorer/org.eclipse.papyrus.uml.modelexplorer/src/org/eclipse/papyrus/uml/modelexplorer/handler/ToggleAdvancedModelExplorerHandler.java @@ -52,6 +52,7 @@ public class ToggleAdvancedModelExplorerHandler extends AbstractHandler { super.setEnabled(evaluationContext);
}
+ @Override
public Object execute(ExecutionEvent event) throws ExecutionException {
ICustomizationManager customizationManager = Activator.getDefault().getCustomizationManager();
@@ -94,7 +95,7 @@ public class ToggleAdvancedModelExplorerHandler extends AbstractHandler { }
// Save the current state of the customizations
- org.eclipse.papyrus.infra.emf.Activator.getDefault().saveCustomizationManagerState();
+ org.eclipse.papyrus.infra.ui.internal.emf.Activator.getDefault().saveCustomizationManagerState();
}
}
diff --git a/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable/META-INF/MANIFEST.MF b/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable/META-INF/MANIFEST.MF index c932aac44ae..c9ce2b53278 100644 --- a/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable/META-INF/MANIFEST.MF +++ b/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable/META-INF/MANIFEST.MF @@ -36,7 +36,8 @@ Require-Bundle: org.eclipse.ui, org.eclipse.papyrus.emf.facet.custom.ui;bundle-version="1.2.0", ca.odell.glazedlists;bundle-version="1.9.0", org.eclipse.jface.text;bundle-version="3.10.0", - org.eclipse.papyrus.infra.ui;bundle-version="1.2.0" + org.eclipse.papyrus.infra.ui;bundle-version="1.2.0", + org.eclipse.papyrus.infra.ui.emf;bundle-version="1.2.0" Bundle-Vendor: %Bundle-Vendor Bundle-ActivationPolicy: lazy Bundle-Version: 1.2.0.qualifier diff --git a/plugins/uml/org.eclipse.papyrus.uml.commands/src/org/eclipse/papyrus/uml/commands/handler/AbstractEMFCommandHandler.java b/plugins/uml/org.eclipse.papyrus.uml.commands/src/org/eclipse/papyrus/uml/commands/handler/AbstractEMFCommandHandler.java index b3a7dab09a3..5bca8e4506e 100644 --- a/plugins/uml/org.eclipse.papyrus.uml.commands/src/org/eclipse/papyrus/uml/commands/handler/AbstractEMFCommandHandler.java +++ b/plugins/uml/org.eclipse.papyrus.uml.commands/src/org/eclipse/papyrus/uml/commands/handler/AbstractEMFCommandHandler.java @@ -31,7 +31,7 @@ import org.eclipse.papyrus.infra.core.services.ServicesRegistry; import org.eclipse.papyrus.infra.core.utils.ServiceUtils; import org.eclipse.papyrus.infra.emf.utils.EMFHelper; import org.eclipse.papyrus.infra.emf.utils.ServiceUtilsForEObject; -import org.eclipse.papyrus.infra.emf.utils.ServiceUtilsForHandlers; +import org.eclipse.papyrus.infra.ui.util.ServiceUtilsForHandlers; import org.eclipse.papyrus.uml.commands.Activator; import org.eclipse.swt.widgets.Display; import org.eclipse.ui.IWorkbenchWindow; @@ -56,7 +56,7 @@ public abstract class AbstractEMFCommandHandler extends AbstractHandler { * Returns the current editing domain * * @return - * the current editing domain + * the current editing domain */ protected TransactionalEditingDomain getEditingDomain() { TransactionalEditingDomain editingDomain = null; @@ -75,7 +75,7 @@ public abstract class AbstractEMFCommandHandler extends AbstractHandler { * Returns the command to execute (to be implemented * in children implementing this class) * - * @return the command to execute + * @return the command to execute * * </pre> */ diff --git a/plugins/uml/org.eclipse.papyrus.uml.modelrepair/META-INF/MANIFEST.MF b/plugins/uml/org.eclipse.papyrus.uml.modelrepair/META-INF/MANIFEST.MF index 1fba60d0277..d0a66692331 100644 --- a/plugins/uml/org.eclipse.papyrus.uml.modelrepair/META-INF/MANIFEST.MF +++ b/plugins/uml/org.eclipse.papyrus.uml.modelrepair/META-INF/MANIFEST.MF @@ -30,7 +30,8 @@ Require-Bundle: org.eclipse.ui, org.eclipse.emf.edit.ui;bundle-version="2.10.0",
org.eclipse.uml2.uml.edit;bundle-version="5.0.0",
org.eclipse.ui.ide;bundle-version="3.10.100",
- org.eclipse.papyrus.infra.ui;bundle-version="1.2.0"
+ org.eclipse.papyrus.infra.ui;bundle-version="1.2.0",
+ org.eclipse.papyrus.infra.ui.emf;bundle-version="1.2.0"
Bundle-Vendor: Eclipse Modeling Project
Bundle-ActivationPolicy: lazy
Bundle-Version: 1.2.0.qualifier
diff --git a/plugins/uml/org.eclipse.papyrus.uml.modelrepair/src/org/eclipse/papyrus/uml/modelrepair/ui/ZombieStereotypeDialogPresenter.java b/plugins/uml/org.eclipse.papyrus.uml.modelrepair/src/org/eclipse/papyrus/uml/modelrepair/ui/ZombieStereotypeDialogPresenter.java index 9a0b4de9b5e..5e2ba9d2de3 100644 --- a/plugins/uml/org.eclipse.papyrus.uml.modelrepair/src/org/eclipse/papyrus/uml/modelrepair/ui/ZombieStereotypeDialogPresenter.java +++ b/plugins/uml/org.eclipse.papyrus.uml.modelrepair/src/org/eclipse/papyrus/uml/modelrepair/ui/ZombieStereotypeDialogPresenter.java @@ -33,11 +33,11 @@ import org.eclipse.jface.viewers.ILabelProvider; import org.eclipse.jface.viewers.ITreeContentProvider; import org.eclipse.jface.window.Window; import org.eclipse.papyrus.infra.core.services.ServiceException; -import org.eclipse.papyrus.infra.emf.providers.AdapterFactoryHierarchicContentProvider; import org.eclipse.papyrus.infra.emf.utils.EMFHelper; import org.eclipse.papyrus.infra.emf.utils.ServiceUtilsForResourceSet; import org.eclipse.papyrus.infra.services.labelprovider.service.LabelProviderService; import org.eclipse.papyrus.infra.services.labelprovider.service.impl.LabelProviderServiceImpl; +import org.eclipse.papyrus.infra.ui.emf.providers.AdapterFactoryHierarchicContentProvider; import org.eclipse.papyrus.infra.ui.util.UIUtil; import org.eclipse.papyrus.infra.widgets.editors.TreeSelectorDialog; import org.eclipse.papyrus.uml.modelrepair.Activator; diff --git a/plugins/uml/org.eclipse.papyrus.uml.profile/META-INF/MANIFEST.MF b/plugins/uml/org.eclipse.papyrus.uml.profile/META-INF/MANIFEST.MF index 839905b88f7..b53fddad024 100644 --- a/plugins/uml/org.eclipse.papyrus.uml.profile/META-INF/MANIFEST.MF +++ b/plugins/uml/org.eclipse.papyrus.uml.profile/META-INF/MANIFEST.MF @@ -35,7 +35,8 @@ Require-Bundle: org.eclipse.papyrus.uml.tools.utils;bundle-version="1.2.0", org.eclipse.papyrus.emf.facet.custom.ui;bundle-version="1.2.0",
org.eclipse.papyrus.infra.viewpoints.policy;bundle-version="1.2.0",
org.eclipse.papyrus.uml.modelrepair;bundle-version="1.2.0",
- org.eclipse.papyrus.infra.ui;bundle-version="1.2.0"
+ org.eclipse.papyrus.infra.ui;bundle-version="1.2.0",
+ org.eclipse.papyrus.infra.ui.emf;bundle-version="1.2.0"
Bundle-Vendor: %providerName
Bundle-ActivationPolicy: lazy
Bundle-Version: 1.2.0.qualifier
diff --git a/plugins/uml/org.eclipse.papyrus.uml.profile/src/org/eclipse/papyrus/uml/profile/providers/ProfileDefinitionLabelProvider.java b/plugins/uml/org.eclipse.papyrus.uml.profile/src/org/eclipse/papyrus/uml/profile/providers/ProfileDefinitionLabelProvider.java index 0909f47f58a..180d101b7ed 100644 --- a/plugins/uml/org.eclipse.papyrus.uml.profile/src/org/eclipse/papyrus/uml/profile/providers/ProfileDefinitionLabelProvider.java +++ b/plugins/uml/org.eclipse.papyrus.uml.profile/src/org/eclipse/papyrus/uml/profile/providers/ProfileDefinitionLabelProvider.java @@ -13,9 +13,9 @@ package org.eclipse.papyrus.uml.profile.providers; import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EPackage;
-import org.eclipse.papyrus.infra.emf.providers.EMFLabelProvider;
import org.eclipse.papyrus.infra.emf.utils.EMFHelper;
import org.eclipse.papyrus.infra.services.labelprovider.service.IFilteredLabelProvider;
+import org.eclipse.papyrus.infra.ui.emf.providers.EMFLabelProvider;
import org.eclipse.papyrus.uml.profile.utils.Util;
import org.eclipse.uml2.uml.util.UMLUtil;
diff --git a/plugins/uml/org.eclipse.papyrus.uml.profile/src/org/eclipse/papyrus/uml/profile/providers/UnknownSchemaEPackageLabelProvider.java b/plugins/uml/org.eclipse.papyrus.uml.profile/src/org/eclipse/papyrus/uml/profile/providers/UnknownSchemaEPackageLabelProvider.java index 869593dbab9..5d9d7edf8ea 100644 --- a/plugins/uml/org.eclipse.papyrus.uml.profile/src/org/eclipse/papyrus/uml/profile/providers/UnknownSchemaEPackageLabelProvider.java +++ b/plugins/uml/org.eclipse.papyrus.uml.profile/src/org/eclipse/papyrus/uml/profile/providers/UnknownSchemaEPackageLabelProvider.java @@ -15,9 +15,9 @@ package org.eclipse.papyrus.uml.profile.providers; import org.eclipse.emf.ecore.EObject; import org.eclipse.emf.ecore.EPackage; import org.eclipse.osgi.util.NLS; -import org.eclipse.papyrus.infra.emf.providers.EMFLabelProvider; import org.eclipse.papyrus.infra.emf.utils.EMFHelper; import org.eclipse.papyrus.infra.services.labelprovider.service.IFilteredLabelProvider; +import org.eclipse.papyrus.infra.ui.emf.providers.EMFLabelProvider; /** diff --git a/plugins/uml/profile/org.eclipse.papyrus.uml.profile.drafter/META-INF/MANIFEST.MF b/plugins/uml/profile/org.eclipse.papyrus.uml.profile.drafter/META-INF/MANIFEST.MF index cb97ce8810e..859a9085f13 100644 --- a/plugins/uml/profile/org.eclipse.papyrus.uml.profile.drafter/META-INF/MANIFEST.MF +++ b/plugins/uml/profile/org.eclipse.papyrus.uml.profile.drafter/META-INF/MANIFEST.MF @@ -25,7 +25,8 @@ Require-Bundle: org.eclipse.ui, org.eclipse.jface.databinding, com.ibm.icu, org.eclipse.papyrus.uml.extensionpoints;bundle-version="1.2.0", - org.eclipse.papyrus.infra.core.sasheditor;bundle-version="1.2.0" + org.eclipse.papyrus.infra.core.sasheditor;bundle-version="1.2.0", + org.eclipse.papyrus.infra.ui;bundle-version="1.2.0" Export-Package: org.eclipse.papyrus.uml.profile.drafter, org.eclipse.papyrus.uml.profile.drafter.exceptions, org.eclipse.papyrus.uml.profile.drafter.ui.handler, diff --git a/plugins/uml/profile/org.eclipse.papyrus.uml.profile.drafter/src/org/eclipse/papyrus/uml/profile/drafter/ui/handler/AbstractBaseHandler.java b/plugins/uml/profile/org.eclipse.papyrus.uml.profile.drafter/src/org/eclipse/papyrus/uml/profile/drafter/ui/handler/AbstractBaseHandler.java index d272df89b06..3ba3056100d 100644 --- a/plugins/uml/profile/org.eclipse.papyrus.uml.profile.drafter/src/org/eclipse/papyrus/uml/profile/drafter/ui/handler/AbstractBaseHandler.java +++ b/plugins/uml/profile/org.eclipse.papyrus.uml.profile.drafter/src/org/eclipse/papyrus/uml/profile/drafter/ui/handler/AbstractBaseHandler.java @@ -34,7 +34,7 @@ import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.papyrus.infra.core.sasheditor.editor.ISashWindowsContainer; import org.eclipse.papyrus.infra.core.services.ServiceException; import org.eclipse.papyrus.infra.core.services.ServicesRegistry; -import org.eclipse.papyrus.infra.emf.utils.ServiceUtilsForIEvaluationContext; +import org.eclipse.papyrus.infra.ui.util.ServiceUtilsForIEvaluationContext; import org.eclipse.papyrus.uml.profile.drafter.exceptions.NotFoundException; import org.eclipse.ui.IEditorPart; diff --git a/plugins/uml/profile/org.eclipse.papyrus.uml.profile.drafter/src/org/eclipse/papyrus/uml/profile/drafter/ui/handler/AbstractProfileBaseHandler.java b/plugins/uml/profile/org.eclipse.papyrus.uml.profile.drafter/src/org/eclipse/papyrus/uml/profile/drafter/ui/handler/AbstractProfileBaseHandler.java index f0408e44974..9e15736418a 100644 --- a/plugins/uml/profile/org.eclipse.papyrus.uml.profile.drafter/src/org/eclipse/papyrus/uml/profile/drafter/ui/handler/AbstractProfileBaseHandler.java +++ b/plugins/uml/profile/org.eclipse.papyrus.uml.profile.drafter/src/org/eclipse/papyrus/uml/profile/drafter/ui/handler/AbstractProfileBaseHandler.java @@ -17,7 +17,7 @@ package org.eclipse.papyrus.uml.profile.drafter.ui.handler; import org.eclipse.core.expressions.IEvaluationContext;
import org.eclipse.papyrus.infra.core.services.ServiceException;
import org.eclipse.papyrus.infra.core.services.ServicesRegistry;
-import org.eclipse.papyrus.infra.emf.utils.ServiceUtilsForIEvaluationContext;
+import org.eclipse.papyrus.infra.ui.util.ServiceUtilsForIEvaluationContext;
import org.eclipse.papyrus.uml.profile.drafter.UserProfileCatalog;
import org.eclipse.papyrus.uml.profile.drafter.exceptions.DraftProfileException;
import org.eclipse.papyrus.uml.profile.drafter.services.ProfileCatalogService;
@@ -37,9 +37,10 @@ public abstract class AbstractProfileBaseHandler extends AbstractBaseHandler { * The class can be shared by code acting on the same UML model.
*/
protected UMLMetamodelUtils umlMetamodelUtils;
-
+
/**
* Reset the values homd by the handler.
+ *
* @see org.eclipse.papyrus.uml.profile.drafter.ui.handler.AbstractBaseHandler#resetCachedValues()
*
*/
@@ -48,7 +49,7 @@ public abstract class AbstractProfileBaseHandler extends AbstractBaseHandler { umlMetamodelUtils = null;
super.resetCachedValues();
}
-
+
/**
* Lookup the {@link ProfileCatalogService} service.
*
@@ -57,16 +58,17 @@ public abstract class AbstractProfileBaseHandler extends AbstractBaseHandler { * @throws ServiceException
*/
public ProfileCatalogService getProfileCatalogService(IEvaluationContext context) throws ServiceException {
-
- ServicesRegistry servicesRegistry = ServiceUtilsForIEvaluationContext.getInstance().getServiceRegistry(context);
+
+ ServicesRegistry servicesRegistry = ServiceUtilsForIEvaluationContext.getInstance().getServiceRegistry(context);
return servicesRegistry.getService(ProfileCatalogService.class);
}
-
+
/**
* Lookup the {@link UserProfileCatalog}.
*
* @return
- * @throws ServiceException If the Editing domain can't be found.
+ * @throws ServiceException
+ * If the Editing domain can't be found.
*/
protected UserProfileCatalog getProfileCatalog(IEvaluationContext context) throws ServiceException {
@@ -79,23 +81,24 @@ public abstract class AbstractProfileBaseHandler extends AbstractBaseHandler { * initialize the value.
*
* @return the umlMetamodelUtils
- * @throws DraftProfileException
+ * @throws DraftProfileException
*/
public UMLMetamodelUtils getCachedUmlMetamodelUtils(IEvaluationContext context) throws DraftProfileException {
- if( umlMetamodelUtils == null) {
+ if (umlMetamodelUtils == null) {
umlMetamodelUtils = getUmlMetamodelUtils(context);
}
-
+
return umlMetamodelUtils;
}
/**
* @return the umlMetamodelUtils
- * @throws DraftProfileException If the {@link UMLMetamodelUtils} object can't be created. A nested exception indicate the root cause.
+ * @throws DraftProfileException
+ * If the {@link UMLMetamodelUtils} object can't be created. A nested exception indicate the root cause.
*
*/
public UMLMetamodelUtils getUmlMetamodelUtils(IEvaluationContext context) throws DraftProfileException {
-
+
try {
return new UMLMetamodelUtils(lookupServicesRegistry(context));
} catch (ServiceException e) {
diff --git a/plugins/uml/properties/org.eclipse.papyrus.uml.properties.xtext/META-INF/MANIFEST.MF b/plugins/uml/properties/org.eclipse.papyrus.uml.properties.xtext/META-INF/MANIFEST.MF index 3702cf1009d..2499ed8ce65 100644 --- a/plugins/uml/properties/org.eclipse.papyrus.uml.properties.xtext/META-INF/MANIFEST.MF +++ b/plugins/uml/properties/org.eclipse.papyrus.uml.properties.xtext/META-INF/MANIFEST.MF @@ -18,7 +18,8 @@ Require-Bundle: org.eclipse.ui;bundle-version="3.105.0", org.eclipse.papyrus.infra.widgets;bundle-version="1.2.0",
org.eclipse.core.databinding;bundle-version="1.4.100",
org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui;bundle-version="1.2.0",
- org.eclipse.papyrus.infra.core.log;bundle-version="1.2.0"
+ org.eclipse.papyrus.infra.core.log;bundle-version="1.2.0",
+ org.eclipse.papyrus.infra.ui.emf;bundle-version="1.2.0"
Bundle-Vendor: %providerName
Bundle-ActivationPolicy: lazy
Bundle-Version: 1.2.0.qualifier
diff --git a/plugins/uml/properties/org.eclipse.papyrus.uml.properties.xtext/src/org/eclipse/papyrus/uml/properties/xtext/XtextLanguageEditor.java b/plugins/uml/properties/org.eclipse.papyrus.uml.properties.xtext/src/org/eclipse/papyrus/uml/properties/xtext/XtextLanguageEditor.java index 4ce0fd39fc3..c823e132e75 100644 --- a/plugins/uml/properties/org.eclipse.papyrus.uml.properties.xtext/src/org/eclipse/papyrus/uml/properties/xtext/XtextLanguageEditor.java +++ b/plugins/uml/properties/org.eclipse.papyrus.uml.properties.xtext/src/org/eclipse/papyrus/uml/properties/xtext/XtextLanguageEditor.java @@ -13,7 +13,7 @@ import org.eclipse.papyrus.extensionpoints.editors.Activator; import org.eclipse.papyrus.extensionpoints.editors.configuration.IDirectEditorConfiguration; import org.eclipse.papyrus.extensionpoints.editors.utils.DirectEditorsUtil; import org.eclipse.papyrus.extensionpoints.editors.utils.IDirectEditorsIds; -import org.eclipse.papyrus.infra.emf.dialog.NestedEditingDialogContext; +import org.eclipse.papyrus.infra.ui.emf.dialog.NestedEditingDialogContext; import org.eclipse.papyrus.uml.properties.modelelement.UMLModelElement; import org.eclipse.papyrus.uml.properties.widgets.BodyEditor; import org.eclipse.papyrus.uml.xtext.integration.DefaultXtextDirectEditorConfiguration; diff --git a/plugins/uml/properties/org.eclipse.papyrus.uml.properties.xtext/src/org/eclipse/papyrus/uml/properties/xtext/widget/UMLXtextReferenceValueEditor.java b/plugins/uml/properties/org.eclipse.papyrus.uml.properties.xtext/src/org/eclipse/papyrus/uml/properties/xtext/widget/UMLXtextReferenceValueEditor.java index d7b69c6b1c6..9caa2f36097 100644 --- a/plugins/uml/properties/org.eclipse.papyrus.uml.properties.xtext/src/org/eclipse/papyrus/uml/properties/xtext/widget/UMLXtextReferenceValueEditor.java +++ b/plugins/uml/properties/org.eclipse.papyrus.uml.properties.xtext/src/org/eclipse/papyrus/uml/properties/xtext/widget/UMLXtextReferenceValueEditor.java @@ -21,7 +21,7 @@ import org.eclipse.gmf.runtime.common.core.command.ICommand; import org.eclipse.gmf.runtime.common.ui.services.parser.IParser; import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter; import org.eclipse.papyrus.commands.wrappers.GMFtoEMFCommandWrapper; -import org.eclipse.papyrus.infra.emf.dialog.NestedEditingDialogContext; +import org.eclipse.papyrus.infra.ui.emf.dialog.NestedEditingDialogContext; import org.eclipse.papyrus.infra.widgets.editors.StyledTextReferenceDialog; import org.eclipse.papyrus.infra.widgets.editors.StyledTextStringEditor; import org.eclipse.papyrus.infra.widgets.selectors.StringSelector; diff --git a/plugins/uml/properties/org.eclipse.papyrus.uml.properties/META-INF/MANIFEST.MF b/plugins/uml/properties/org.eclipse.papyrus.uml.properties/META-INF/MANIFEST.MF index f6500709f0b..ebfcd8d0b30 100644 --- a/plugins/uml/properties/org.eclipse.papyrus.uml.properties/META-INF/MANIFEST.MF +++ b/plugins/uml/properties/org.eclipse.papyrus.uml.properties/META-INF/MANIFEST.MF @@ -54,10 +54,10 @@ Require-Bundle: org.eclipse.core.runtime, org.eclipse.papyrus.uml.diagram.stereotype.edition;bundle-version="1.2.0", org.eclipse.papyrus.infra.nattable.model;bundle-version="1.2.0", org.eclipse.papyrus.infra.nattable;bundle-version="1.2.0", - org.eclipse.nebula.widgets.nattable.core;bundle-version="[1.4.0, - 2.0.0)", + org.eclipse.nebula.widgets.nattable.core;bundle-version="[1.4.0,2.0.0)", org.eclipse.papyrus.infra.emf.nattable;bundle-version="1.2.0", - org.eclipse.papyrus.uml.nattable.stereotype.display;bundle-version="1.2.0" + org.eclipse.papyrus.uml.nattable.stereotype.display;bundle-version="1.2.0", + org.eclipse.papyrus.infra.ui.emf;bundle-version="1.2.0" Bundle-Vendor: %providerName Bundle-ActivationPolicy: lazy;exclude:="org.eclipse.papyrus.uml.properties.constraints" Bundle-Version: 1.2.0.qualifier diff --git a/plugins/uml/properties/org.eclipse.papyrus.uml.properties/src/org/eclipse/papyrus/uml/properties/databinding/AppliedCommentsObservableList.java b/plugins/uml/properties/org.eclipse.papyrus.uml.properties/src/org/eclipse/papyrus/uml/properties/databinding/AppliedCommentsObservableList.java index 920e6b5cd90..7a5550e0f27 100644 --- a/plugins/uml/properties/org.eclipse.papyrus.uml.properties/src/org/eclipse/papyrus/uml/properties/databinding/AppliedCommentsObservableList.java +++ b/plugins/uml/properties/org.eclipse.papyrus.uml.properties/src/org/eclipse/papyrus/uml/properties/databinding/AppliedCommentsObservableList.java @@ -91,7 +91,7 @@ public class AppliedCommentsObservableList extends PapyrusObservableList { * Redefine refresh cache because applied comments list is a subset of {@link Element#getOwnedComments <em>Owned Comments</em>}. * </p> * - * @see org.eclipse.papyrus.infra.emf.databinding.EMFObservableList#refreshCacheList() + * @see org.eclipse.papyrus.infra.ui.emf.databinding.EMFObservableList#refreshCacheList() * */ @Override diff --git a/plugins/uml/properties/org.eclipse.papyrus.uml.properties/src/org/eclipse/papyrus/uml/properties/databinding/OwnedCommentsObservableList.java b/plugins/uml/properties/org.eclipse.papyrus.uml.properties/src/org/eclipse/papyrus/uml/properties/databinding/OwnedCommentsObservableList.java index 9cb7b037e82..f17817ce348 100644 --- a/plugins/uml/properties/org.eclipse.papyrus.uml.properties/src/org/eclipse/papyrus/uml/properties/databinding/OwnedCommentsObservableList.java +++ b/plugins/uml/properties/org.eclipse.papyrus.uml.properties/src/org/eclipse/papyrus/uml/properties/databinding/OwnedCommentsObservableList.java @@ -79,7 +79,7 @@ public class OwnedCommentsObservableList extends PapyrusObservableList { * Redefine method to add filtered list. * </p> * - * @see org.eclipse.papyrus.infra.emf.databinding.EMFObservableList#refreshCacheList() + * @see org.eclipse.papyrus.infra.ui.emf.databinding.EMFObservableList#refreshCacheList() * */ @Override diff --git a/plugins/uml/properties/org.eclipse.papyrus.uml.properties/src/org/eclipse/papyrus/uml/properties/modelelement/UMLModelElement.java b/plugins/uml/properties/org.eclipse.papyrus.uml.properties/src/org/eclipse/papyrus/uml/properties/modelelement/UMLModelElement.java index 8b389153782..0e0248d5af2 100644 --- a/plugins/uml/properties/org.eclipse.papyrus.uml.properties/src/org/eclipse/papyrus/uml/properties/modelelement/UMLModelElement.java +++ b/plugins/uml/properties/org.eclipse.papyrus.uml.properties/src/org/eclipse/papyrus/uml/properties/modelelement/UMLModelElement.java @@ -37,10 +37,10 @@ import org.eclipse.emf.ecore.EStructuralFeature; import org.eclipse.emf.ecore.resource.ResourceSet; import org.eclipse.emf.edit.domain.EditingDomain; import org.eclipse.jface.viewers.ITreeContentProvider; -import org.eclipse.papyrus.infra.emf.providers.EMFGraphicalContentProvider; -import org.eclipse.papyrus.infra.emf.providers.EMFLabelProvider; import org.eclipse.papyrus.infra.emf.utils.HistoryUtil; -import org.eclipse.papyrus.infra.emf.utils.ProviderHelper; +import org.eclipse.papyrus.infra.ui.emf.providers.EMFGraphicalContentProvider; +import org.eclipse.papyrus.infra.ui.emf.providers.EMFLabelProvider; +import org.eclipse.papyrus.infra.ui.emf.utils.ProviderHelper; import org.eclipse.papyrus.infra.widgets.creation.ReferenceValueFactory; import org.eclipse.papyrus.infra.widgets.providers.EmptyContentProvider; import org.eclipse.papyrus.infra.widgets.providers.IStaticContentProvider; diff --git a/plugins/uml/properties/org.eclipse.papyrus.uml.properties/src/org/eclipse/papyrus/uml/properties/widgets/CommentBodyEditor.java b/plugins/uml/properties/org.eclipse.papyrus.uml.properties/src/org/eclipse/papyrus/uml/properties/widgets/CommentBodyEditor.java index 7c6d05c5355..0aca91a7afb 100644 --- a/plugins/uml/properties/org.eclipse.papyrus.uml.properties/src/org/eclipse/papyrus/uml/properties/widgets/CommentBodyEditor.java +++ b/plugins/uml/properties/org.eclipse.papyrus.uml.properties/src/org/eclipse/papyrus/uml/properties/widgets/CommentBodyEditor.java @@ -19,7 +19,7 @@ import java.util.Collections; import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.resource.Resource;
import org.eclipse.emf.ecore.resource.ResourceSet;
-import org.eclipse.papyrus.infra.emf.providers.EMFGraphicalContentProvider;
+import org.eclipse.papyrus.infra.ui.emf.providers.EMFGraphicalContentProvider;
import org.eclipse.papyrus.uml.tools.namereferences.NameReferencesHelper;
import org.eclipse.papyrus.uml.tools.providers.SemanticUMLContentProvider;
import org.eclipse.papyrus.uml.tools.util.UMLProviderHelper;
diff --git a/plugins/uml/properties/org.eclipse.papyrus.uml.properties/src/org/eclipse/papyrus/uml/properties/widgets/EObjectContentsEditor.java b/plugins/uml/properties/org.eclipse.papyrus.uml.properties/src/org/eclipse/papyrus/uml/properties/widgets/EObjectContentsEditor.java index 8422173c237..eaf2e9e0e83 100644 --- a/plugins/uml/properties/org.eclipse.papyrus.uml.properties/src/org/eclipse/papyrus/uml/properties/widgets/EObjectContentsEditor.java +++ b/plugins/uml/properties/org.eclipse.papyrus.uml.properties/src/org/eclipse/papyrus/uml/properties/widgets/EObjectContentsEditor.java @@ -24,12 +24,12 @@ import org.eclipse.emf.ecore.EReference; import org.eclipse.emf.ecore.EStructuralFeature; import org.eclipse.jface.viewers.ILabelProvider; import org.eclipse.jface.viewers.ITreeContentProvider; -import org.eclipse.papyrus.infra.emf.providers.EMFGraphicalContentProvider; -import org.eclipse.papyrus.infra.emf.providers.EMFLabelProvider; import org.eclipse.papyrus.infra.emf.utils.HistoryUtil; -import org.eclipse.papyrus.infra.emf.utils.ProviderHelper; import org.eclipse.papyrus.infra.emf.utils.ServiceUtilsForEObject; import org.eclipse.papyrus.infra.services.labelprovider.service.LabelProviderService; +import org.eclipse.papyrus.infra.ui.emf.providers.EMFGraphicalContentProvider; +import org.eclipse.papyrus.infra.ui.emf.providers.EMFLabelProvider; +import org.eclipse.papyrus.infra.ui.emf.utils.ProviderHelper; import org.eclipse.papyrus.uml.properties.Activator; import org.eclipse.papyrus.uml.properties.creation.UMLPropertyEditorFactory; import org.eclipse.papyrus.uml.tools.providers.UMLContainerContentProvider; diff --git a/plugins/uml/properties/org.eclipse.papyrus.uml.properties/src/org/eclipse/papyrus/uml/properties/widgets/EStructuralFeatureEditor.java b/plugins/uml/properties/org.eclipse.papyrus.uml.properties/src/org/eclipse/papyrus/uml/properties/widgets/EStructuralFeatureEditor.java index 1bc7bf12494..f128ae21695 100644 --- a/plugins/uml/properties/org.eclipse.papyrus.uml.properties/src/org/eclipse/papyrus/uml/properties/widgets/EStructuralFeatureEditor.java +++ b/plugins/uml/properties/org.eclipse.papyrus.uml.properties/src/org/eclipse/papyrus/uml/properties/widgets/EStructuralFeatureEditor.java @@ -31,8 +31,8 @@ import org.eclipse.emf.ecore.EObject; import org.eclipse.emf.ecore.EReference; import org.eclipse.emf.ecore.EStructuralFeature; import org.eclipse.jface.viewers.ILabelProvider; -import org.eclipse.papyrus.infra.emf.providers.EMFEnumeratorContentProvider; import org.eclipse.papyrus.infra.emf.utils.EMFHelper; +import org.eclipse.papyrus.infra.ui.emf.providers.EMFEnumeratorContentProvider; import org.eclipse.papyrus.infra.widgets.creation.ReferenceValueFactory; import org.eclipse.papyrus.infra.widgets.editors.AbstractValueEditor; import org.eclipse.papyrus.infra.widgets.editors.BooleanCombo; diff --git a/plugins/uml/properties/org.eclipse.papyrus.uml.properties/src/org/eclipse/papyrus/uml/properties/widgets/GenericUMLDatatypeEditor.java b/plugins/uml/properties/org.eclipse.papyrus.uml.properties/src/org/eclipse/papyrus/uml/properties/widgets/GenericUMLDatatypeEditor.java index 7c93a929877..d6e049af47d 100644 --- a/plugins/uml/properties/org.eclipse.papyrus.uml.properties/src/org/eclipse/papyrus/uml/properties/widgets/GenericUMLDatatypeEditor.java +++ b/plugins/uml/properties/org.eclipse.papyrus.uml.properties/src/org/eclipse/papyrus/uml/properties/widgets/GenericUMLDatatypeEditor.java @@ -20,12 +20,12 @@ import org.eclipse.emf.ecore.EStructuralFeature; import org.eclipse.jface.viewers.ILabelProvider; import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.jface.viewers.ITreeContentProvider; -import org.eclipse.papyrus.infra.emf.providers.EMFGraphicalContentProvider; -import org.eclipse.papyrus.infra.emf.providers.EMFLabelProvider; import org.eclipse.papyrus.infra.emf.utils.HistoryUtil; -import org.eclipse.papyrus.infra.emf.utils.ProviderHelper; import org.eclipse.papyrus.infra.emf.utils.ServiceUtilsForEObject; import org.eclipse.papyrus.infra.services.labelprovider.service.LabelProviderService; +import org.eclipse.papyrus.infra.ui.emf.providers.EMFGraphicalContentProvider; +import org.eclipse.papyrus.infra.ui.emf.providers.EMFLabelProvider; +import org.eclipse.papyrus.infra.ui.emf.utils.ProviderHelper; import org.eclipse.papyrus.uml.properties.Activator; import org.eclipse.papyrus.uml.properties.creation.UMLPropertyEditorFactory; import org.eclipse.papyrus.uml.tools.providers.UMLContainerContentProvider; diff --git a/plugins/uml/properties/org.eclipse.papyrus.uml.properties/src/org/eclipse/papyrus/uml/properties/widgets/StereotypePropertyEditor.java b/plugins/uml/properties/org.eclipse.papyrus.uml.properties/src/org/eclipse/papyrus/uml/properties/widgets/StereotypePropertyEditor.java index 56181142c05..a6aa6bd0713 100644 --- a/plugins/uml/properties/org.eclipse.papyrus.uml.properties/src/org/eclipse/papyrus/uml/properties/widgets/StereotypePropertyEditor.java +++ b/plugins/uml/properties/org.eclipse.papyrus.uml.properties/src/org/eclipse/papyrus/uml/properties/widgets/StereotypePropertyEditor.java @@ -24,12 +24,12 @@ import org.eclipse.jface.viewers.ISelectionChangedListener; import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.jface.viewers.ITreeContentProvider; import org.eclipse.jface.viewers.SelectionChangedEvent; -import org.eclipse.papyrus.infra.emf.providers.EMFGraphicalContentProvider; -import org.eclipse.papyrus.infra.emf.providers.EMFLabelProvider; import org.eclipse.papyrus.infra.emf.utils.HistoryUtil; -import org.eclipse.papyrus.infra.emf.utils.ProviderHelper; import org.eclipse.papyrus.infra.emf.utils.ServiceUtilsForEObject; import org.eclipse.papyrus.infra.services.labelprovider.service.LabelProviderService; +import org.eclipse.papyrus.infra.ui.emf.providers.EMFGraphicalContentProvider; +import org.eclipse.papyrus.infra.ui.emf.providers.EMFLabelProvider; +import org.eclipse.papyrus.infra.ui.emf.utils.ProviderHelper; import org.eclipse.papyrus.uml.profile.tree.objects.AppliedStereotypePropertyTreeObject; import org.eclipse.papyrus.uml.properties.creation.UMLPropertyEditorFactory; import org.eclipse.papyrus.uml.properties.profile.ui.compositeforview.AppliedStereotypeCompositeWithView; diff --git a/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.constraintwithessentialocl.xtext/META-INF/MANIFEST.MF b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.constraintwithessentialocl.xtext/META-INF/MANIFEST.MF index ed18e27de27..d0e53d70d53 100644 --- a/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.constraintwithessentialocl.xtext/META-INF/MANIFEST.MF +++ b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.constraintwithessentialocl.xtext/META-INF/MANIFEST.MF @@ -12,7 +12,8 @@ Require-Bundle: org.eclipse.ui, org.eclipse.papyrus.uml.xtext.integration.ui;bundle-version="1.2.0",
org.eclipse.papyrus.infra.services.validation;bundle-version="1.2.0",
org.eclipse.papyrus.uml.service.validation;bundle-version="1.2.0",
- org.eclipse.ocl.pivot.ui;bundle-version="1.0.0"
+ org.eclipse.ocl.pivot.ui;bundle-version="1.0.0",
+ org.eclipse.papyrus.infra.ui.emf;bundle-version="1.2.0"
Bundle-Vendor: %providerName
Bundle-ActivationPolicy: lazy
Bundle-Version: 1.2.0.qualifier
diff --git a/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.constraintwithessentialocl.xtext/src/org/eclipse/papyrus/uml/textedit/constraintwithessentialocl/xtext/EssentialOCLEditorConfiguration.java b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.constraintwithessentialocl.xtext/src/org/eclipse/papyrus/uml/textedit/constraintwithessentialocl/xtext/EssentialOCLEditorConfiguration.java index 7ad615e2084..d09eab8ad16 100644 --- a/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.constraintwithessentialocl.xtext/src/org/eclipse/papyrus/uml/textedit/constraintwithessentialocl/xtext/EssentialOCLEditorConfiguration.java +++ b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.constraintwithessentialocl.xtext/src/org/eclipse/papyrus/uml/textedit/constraintwithessentialocl/xtext/EssentialOCLEditorConfiguration.java @@ -40,9 +40,9 @@ import org.eclipse.ocl.pivot.resource.CSResource; import org.eclipse.ocl.pivot.ui.OCLUI;
import org.eclipse.ocl.pivot.utilities.PivotConstants;
import org.eclipse.ocl.pivot.utilities.PivotUtil;
-import org.eclipse.papyrus.infra.emf.dialog.NestedEditingDialogContext;
import org.eclipse.papyrus.infra.services.validation.commands.AbstractValidateCommand;
import org.eclipse.papyrus.infra.services.validation.commands.AsyncValidateSubtreeCommand;
+import org.eclipse.papyrus.infra.ui.emf.dialog.NestedEditingDialogContext;
import org.eclipse.papyrus.uml.xtext.integration.DefaultXtextDirectEditorConfiguration;
import org.eclipse.papyrus.uml.xtext.integration.core.ContextElementAdapter.IContextElementProvider;
import org.eclipse.papyrus.uml.xtext.integration.core.ContextElementAdapter.IContextElementProviderWithInit;
diff --git a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.utils/src/org/eclipse/papyrus/uml/tools/utils/PackageUtil.java b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.utils/src/org/eclipse/papyrus/uml/tools/utils/PackageUtil.java index 4a3feb5b4a8..c779540538b 100644 --- a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.utils/src/org/eclipse/papyrus/uml/tools/utils/PackageUtil.java +++ b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.utils/src/org/eclipse/papyrus/uml/tools/utils/PackageUtil.java @@ -38,7 +38,7 @@ import org.eclipse.emf.ecore.resource.Resource; import org.eclipse.emf.ecore.resource.ResourceSet; import org.eclipse.emf.ecore.util.EcoreUtil; import org.eclipse.papyrus.infra.core.services.ServiceException; -import org.eclipse.papyrus.infra.emf.utils.ServiceUtilsForHandlers; +import org.eclipse.papyrus.infra.ui.util.ServiceUtilsForHandlers; import org.eclipse.uml2.uml.Collaboration; import org.eclipse.uml2.uml.Element; import org.eclipse.uml2.uml.NamedElement; @@ -486,8 +486,8 @@ public class PackageUtil { while (it.hasNext()) { NamedElement element = it.next(); if ((element instanceof Type) /* - * && (!(element instanceof Relationship)) - */) { + * && (!(element instanceof Relationship)) + */) { // Check for redundant type // if (!umlTypeQNames.contains(element.getQualifiedName())) { // /umlTypeQNames.add(element.getQualifiedName()); diff --git a/plugins/uml/tools/org.eclipse.papyrus.uml.tools/META-INF/MANIFEST.MF b/plugins/uml/tools/org.eclipse.papyrus.uml.tools/META-INF/MANIFEST.MF index 86a267b24ce..20e031fb9ac 100644 --- a/plugins/uml/tools/org.eclipse.papyrus.uml.tools/META-INF/MANIFEST.MF +++ b/plugins/uml/tools/org.eclipse.papyrus.uml.tools/META-INF/MANIFEST.MF @@ -40,7 +40,8 @@ Require-Bundle: org.eclipse.ui, org.eclipse.uml2.uml.validation;bundle-version="5.0.0",
com.google.guava;bundle-version="11.0.0",
org.eclipse.jface.text;bundle-version="3.10.0",
- org.eclipse.papyrus.infra.ui;bundle-version="1.2.0"
+ org.eclipse.papyrus.infra.ui;bundle-version="1.2.0",
+ org.eclipse.papyrus.infra.ui.emf;bundle-version="1.2.0"
Bundle-Vendor: Eclipse Modeling Project
Bundle-ActivationPolicy: lazy
Bundle-Version: 1.2.0.qualifier
diff --git a/plugins/uml/tools/org.eclipse.papyrus.uml.tools/src/org/eclipse/papyrus/uml/tools/databinding/PapyrusObservableList.java b/plugins/uml/tools/org.eclipse.papyrus.uml.tools/src/org/eclipse/papyrus/uml/tools/databinding/PapyrusObservableList.java index ffb48543aa6..d761c5de889 100644 --- a/plugins/uml/tools/org.eclipse.papyrus.uml.tools/src/org/eclipse/papyrus/uml/tools/databinding/PapyrusObservableList.java +++ b/plugins/uml/tools/org.eclipse.papyrus.uml.tools/src/org/eclipse/papyrus/uml/tools/databinding/PapyrusObservableList.java @@ -28,9 +28,9 @@ import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest; import org.eclipse.gmf.runtime.emf.type.core.requests.IEditCommandRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.SetRequest;
import org.eclipse.papyrus.commands.wrappers.GMFtoEMFCommandWrapper;
-import org.eclipse.papyrus.infra.emf.databinding.EMFObservableList;
import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
+import org.eclipse.papyrus.infra.ui.emf.databinding.EMFObservableList;
/**
* An ObservableList used to edit collections of EObjects through
diff --git a/plugins/uml/tools/org.eclipse.papyrus.uml.tools/src/org/eclipse/papyrus/uml/tools/databinding/PapyrusObservableValue.java b/plugins/uml/tools/org.eclipse.papyrus.uml.tools/src/org/eclipse/papyrus/uml/tools/databinding/PapyrusObservableValue.java index 379da9600a1..5a9ae85e9c6 100644 --- a/plugins/uml/tools/org.eclipse.papyrus.uml.tools/src/org/eclipse/papyrus/uml/tools/databinding/PapyrusObservableValue.java +++ b/plugins/uml/tools/org.eclipse.papyrus.uml.tools/src/org/eclipse/papyrus/uml/tools/databinding/PapyrusObservableValue.java @@ -30,12 +30,12 @@ import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest; import org.eclipse.gmf.runtime.emf.type.core.requests.IEditCommandRequest; import org.eclipse.gmf.runtime.emf.type.core.requests.SetRequest; import org.eclipse.papyrus.commands.wrappers.GMFtoEMFCommandWrapper; -import org.eclipse.papyrus.infra.emf.databinding.EMFObservableValue; import org.eclipse.papyrus.infra.emf.utils.EMFHelper; import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils; import org.eclipse.papyrus.infra.services.edit.service.IElementEditService; import org.eclipse.papyrus.infra.tools.databinding.AggregatedObservable; import org.eclipse.papyrus.infra.tools.databinding.ReferenceCountedObservable; +import org.eclipse.papyrus.infra.ui.emf.databinding.EMFObservableValue; import org.eclipse.papyrus.uml.tools.Activator; /** diff --git a/plugins/uml/tools/org.eclipse.papyrus.uml.tools/src/org/eclipse/papyrus/uml/tools/databinding/ProvidedInterfaceObservableList.java b/plugins/uml/tools/org.eclipse.papyrus.uml.tools/src/org/eclipse/papyrus/uml/tools/databinding/ProvidedInterfaceObservableList.java index 72e45035624..057340aaae6 100644 --- a/plugins/uml/tools/org.eclipse.papyrus.uml.tools/src/org/eclipse/papyrus/uml/tools/databinding/ProvidedInterfaceObservableList.java +++ b/plugins/uml/tools/org.eclipse.papyrus.uml.tools/src/org/eclipse/papyrus/uml/tools/databinding/ProvidedInterfaceObservableList.java @@ -233,7 +233,7 @@ public class ProvidedInterfaceObservableList extends PapyrusObservableList { /** - * @see org.eclipse.papyrus.infra.emf.databinding.EMFObservableList#dispose() + * @see org.eclipse.papyrus.infra.ui.emf.databinding.EMFObservableList#dispose() * */ @Override diff --git a/plugins/uml/tools/org.eclipse.papyrus.uml.tools/src/org/eclipse/papyrus/uml/tools/databinding/RequiredInterfaceObservableList.java b/plugins/uml/tools/org.eclipse.papyrus.uml.tools/src/org/eclipse/papyrus/uml/tools/databinding/RequiredInterfaceObservableList.java index e0fd9291efd..6f1a78874a7 100644 --- a/plugins/uml/tools/org.eclipse.papyrus.uml.tools/src/org/eclipse/papyrus/uml/tools/databinding/RequiredInterfaceObservableList.java +++ b/plugins/uml/tools/org.eclipse.papyrus.uml.tools/src/org/eclipse/papyrus/uml/tools/databinding/RequiredInterfaceObservableList.java @@ -218,7 +218,7 @@ public class RequiredInterfaceObservableList extends PapyrusObservableList { } /** - * @see org.eclipse.papyrus.infra.emf.databinding.EMFObservableList#dispose() + * @see org.eclipse.papyrus.infra.ui.emf.databinding.EMFObservableList#dispose() * */ @Override diff --git a/plugins/uml/tools/org.eclipse.papyrus.uml.tools/src/org/eclipse/papyrus/uml/tools/providers/ConstrainedElementContentProvider.java b/plugins/uml/tools/org.eclipse.papyrus.uml.tools/src/org/eclipse/papyrus/uml/tools/providers/ConstrainedElementContentProvider.java index 3be83d85df1..076c6ab8bea 100644 --- a/plugins/uml/tools/org.eclipse.papyrus.uml.tools/src/org/eclipse/papyrus/uml/tools/providers/ConstrainedElementContentProvider.java +++ b/plugins/uml/tools/org.eclipse.papyrus.uml.tools/src/org/eclipse/papyrus/uml/tools/providers/ConstrainedElementContentProvider.java @@ -16,8 +16,8 @@ import org.eclipse.emf.ecore.EStructuralFeature; import org.eclipse.emf.ecore.resource.ResourceSet;
import org.eclipse.jface.viewers.IStructuredContentProvider;
import org.eclipse.jface.viewers.ITreeContentProvider;
-import org.eclipse.papyrus.infra.emf.providers.EMFGraphicalContentProvider;
import org.eclipse.papyrus.infra.emf.utils.HistoryUtil;
+import org.eclipse.papyrus.infra.ui.emf.providers.EMFGraphicalContentProvider;
import org.eclipse.papyrus.infra.widgets.strategy.IStrategyBasedContentProvider;
import org.eclipse.papyrus.infra.widgets.strategy.StrategyBasedContentProvider;
import org.eclipse.papyrus.infra.widgets.strategy.TreeBrowseStrategy;
diff --git a/plugins/uml/tools/org.eclipse.papyrus.uml.tools/src/org/eclipse/papyrus/uml/tools/providers/GenericDataTypeLabelProvider.java b/plugins/uml/tools/org.eclipse.papyrus.uml.tools/src/org/eclipse/papyrus/uml/tools/providers/GenericDataTypeLabelProvider.java index 269914c68bb..47614472d00 100644 --- a/plugins/uml/tools/org.eclipse.papyrus.uml.tools/src/org/eclipse/papyrus/uml/tools/providers/GenericDataTypeLabelProvider.java +++ b/plugins/uml/tools/org.eclipse.papyrus.uml.tools/src/org/eclipse/papyrus/uml/tools/providers/GenericDataTypeLabelProvider.java @@ -19,9 +19,9 @@ import java.util.Set; import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EObject;
-import org.eclipse.papyrus.infra.emf.providers.EMFLabelProvider;
import org.eclipse.papyrus.infra.emf.utils.EMFHelper;
import org.eclipse.papyrus.infra.services.labelprovider.service.IFilteredLabelProvider;
+import org.eclipse.papyrus.infra.ui.emf.providers.EMFLabelProvider;
import org.eclipse.papyrus.uml.tools.utils.DataTypeUtil;
import org.eclipse.swt.graphics.Image;
diff --git a/plugins/uml/tools/org.eclipse.papyrus.uml.tools/src/org/eclipse/papyrus/uml/tools/providers/InteractionOperatorContentProvider.java b/plugins/uml/tools/org.eclipse.papyrus.uml.tools/src/org/eclipse/papyrus/uml/tools/providers/InteractionOperatorContentProvider.java index 49e3c9b986a..7a09bddfd96 100644 --- a/plugins/uml/tools/org.eclipse.papyrus.uml.tools/src/org/eclipse/papyrus/uml/tools/providers/InteractionOperatorContentProvider.java +++ b/plugins/uml/tools/org.eclipse.papyrus.uml.tools/src/org/eclipse/papyrus/uml/tools/providers/InteractionOperatorContentProvider.java @@ -15,8 +15,8 @@ import java.util.List; import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.papyrus.infra.emf.providers.EMFEnumeratorContentProvider;
import org.eclipse.papyrus.infra.tools.util.ListHelper;
+import org.eclipse.papyrus.infra.ui.emf.providers.EMFEnumeratorContentProvider;
import org.eclipse.uml2.uml.CombinedFragment;
import org.eclipse.uml2.uml.ConsiderIgnoreFragment;
import org.eclipse.uml2.uml.InteractionOperatorKind;
diff --git a/plugins/uml/tools/org.eclipse.papyrus.uml.tools/src/org/eclipse/papyrus/uml/tools/providers/PortInterfaceContentProvider.java b/plugins/uml/tools/org.eclipse.papyrus.uml.tools/src/org/eclipse/papyrus/uml/tools/providers/PortInterfaceContentProvider.java index 670ba3b2e29..1c7b28268cc 100644 --- a/plugins/uml/tools/org.eclipse.papyrus.uml.tools/src/org/eclipse/papyrus/uml/tools/providers/PortInterfaceContentProvider.java +++ b/plugins/uml/tools/org.eclipse.papyrus.uml.tools/src/org/eclipse/papyrus/uml/tools/providers/PortInterfaceContentProvider.java @@ -44,7 +44,7 @@ public class PortInterfaceContentProvider extends SemanticUMLContentProvider { } /** - * @see org.eclipse.papyrus.infra.emf.providers.strategy.SemanticEMFContentProvider#getElements() + * @see org.eclipse.papyrus.infra.ui.emf.providers.strategy.SemanticEMFContentProvider#getElements() * * @return */ diff --git a/plugins/uml/tools/org.eclipse.papyrus.uml.tools/src/org/eclipse/papyrus/uml/tools/providers/ProfileLabelProvider.java b/plugins/uml/tools/org.eclipse.papyrus.uml.tools/src/org/eclipse/papyrus/uml/tools/providers/ProfileLabelProvider.java index b4404ab85a0..485748af11c 100644 --- a/plugins/uml/tools/org.eclipse.papyrus.uml.tools/src/org/eclipse/papyrus/uml/tools/providers/ProfileLabelProvider.java +++ b/plugins/uml/tools/org.eclipse.papyrus.uml.tools/src/org/eclipse/papyrus/uml/tools/providers/ProfileLabelProvider.java @@ -12,7 +12,7 @@ package org.eclipse.papyrus.uml.tools.providers;
import org.eclipse.jface.viewers.ILabelProvider;
-import org.eclipse.papyrus.infra.emf.providers.EMFLabelProvider;
+import org.eclipse.papyrus.infra.ui.emf.providers.EMFLabelProvider;
import org.eclipse.papyrus.uml.tools.utils.ProfileUtil;
import org.eclipse.uml2.uml.Package;
import org.eclipse.uml2.uml.Profile;
diff --git a/plugins/uml/tools/org.eclipse.papyrus.uml.tools/src/org/eclipse/papyrus/uml/tools/providers/SemanticUMLContentProvider.java b/plugins/uml/tools/org.eclipse.papyrus.uml.tools/src/org/eclipse/papyrus/uml/tools/providers/SemanticUMLContentProvider.java index f4937a40a56..5345394c484 100644 --- a/plugins/uml/tools/org.eclipse.papyrus.uml.tools/src/org/eclipse/papyrus/uml/tools/providers/SemanticUMLContentProvider.java +++ b/plugins/uml/tools/org.eclipse.papyrus.uml.tools/src/org/eclipse/papyrus/uml/tools/providers/SemanticUMLContentProvider.java @@ -35,7 +35,7 @@ import org.eclipse.papyrus.infra.core.resource.NotFoundException; import org.eclipse.papyrus.infra.core.services.ServicesRegistry;
import org.eclipse.papyrus.infra.core.utils.ServiceUtils;
import org.eclipse.papyrus.infra.emf.adapters.ResourceSetRootsAdapter;
-import org.eclipse.papyrus.infra.emf.providers.strategy.SemanticEMFContentProvider;
+import org.eclipse.papyrus.infra.ui.emf.providers.strategy.SemanticEMFContentProvider;
import org.eclipse.papyrus.infra.widgets.Activator;
import org.eclipse.papyrus.uml.tools.model.UmlModel;
import org.eclipse.papyrus.uml.tools.utils.UMLUtil;
diff --git a/plugins/uml/tools/org.eclipse.papyrus.uml.tools/src/org/eclipse/papyrus/uml/tools/providers/UMLContainmentBrowseStrategy.java b/plugins/uml/tools/org.eclipse.papyrus.uml.tools/src/org/eclipse/papyrus/uml/tools/providers/UMLContainmentBrowseStrategy.java index f00c2d5c54e..32e75f5b207 100644 --- a/plugins/uml/tools/org.eclipse.papyrus.uml.tools/src/org/eclipse/papyrus/uml/tools/providers/UMLContainmentBrowseStrategy.java +++ b/plugins/uml/tools/org.eclipse.papyrus.uml.tools/src/org/eclipse/papyrus/uml/tools/providers/UMLContainmentBrowseStrategy.java @@ -17,8 +17,8 @@ import java.util.List; import org.eclipse.emf.ecore.EObject;
import org.eclipse.jface.viewers.ITreeContentProvider;
import org.eclipse.jface.viewers.TreePath;
-import org.eclipse.papyrus.infra.emf.providers.strategy.ContainmentBrowseStrategy;
import org.eclipse.papyrus.infra.emf.utils.EMFHelper;
+import org.eclipse.papyrus.infra.ui.emf.providers.strategy.ContainmentBrowseStrategy;
import org.eclipse.uml2.uml.Element;
import org.eclipse.uml2.uml.UMLPackage;
import org.eclipse.uml2.uml.util.UMLUtil;
diff --git a/plugins/uml/tools/org.eclipse.papyrus.uml.tools/src/org/eclipse/papyrus/uml/tools/providers/UMLContentProvider.java b/plugins/uml/tools/org.eclipse.papyrus.uml.tools/src/org/eclipse/papyrus/uml/tools/providers/UMLContentProvider.java index aa91d1c5b93..5a4bd0257df 100644 --- a/plugins/uml/tools/org.eclipse.papyrus.uml.tools/src/org/eclipse/papyrus/uml/tools/providers/UMLContentProvider.java +++ b/plugins/uml/tools/org.eclipse.papyrus.uml.tools/src/org/eclipse/papyrus/uml/tools/providers/UMLContentProvider.java @@ -27,8 +27,8 @@ import org.eclipse.jface.viewers.Viewer; import org.eclipse.papyrus.infra.core.services.ServiceException; import org.eclipse.papyrus.infra.core.services.ServicesRegistry; import org.eclipse.papyrus.infra.core.utils.ServiceUtils; -import org.eclipse.papyrus.infra.emf.providers.EMFEnumeratorContentProvider; import org.eclipse.papyrus.infra.emf.utils.ServiceUtilsForResource; +import org.eclipse.papyrus.infra.ui.emf.providers.EMFEnumeratorContentProvider; import org.eclipse.papyrus.infra.ui.util.ServiceUtilsForActionHandlers; import org.eclipse.papyrus.infra.widgets.providers.EmptyContentProvider; import org.eclipse.papyrus.infra.widgets.providers.EncapsulatedContentProvider; diff --git a/plugins/uml/tools/org.eclipse.papyrus.uml.tools/src/org/eclipse/papyrus/uml/tools/providers/UMLLabelProvider.java b/plugins/uml/tools/org.eclipse.papyrus.uml.tools/src/org/eclipse/papyrus/uml/tools/providers/UMLLabelProvider.java index ade18424000..371c9efe2ab 100644 --- a/plugins/uml/tools/org.eclipse.papyrus.uml.tools/src/org/eclipse/papyrus/uml/tools/providers/UMLLabelProvider.java +++ b/plugins/uml/tools/org.eclipse.papyrus.uml.tools/src/org/eclipse/papyrus/uml/tools/providers/UMLLabelProvider.java @@ -18,9 +18,9 @@ import java.util.Iterator; import org.eclipse.emf.ecore.EObject; import org.eclipse.emf.edit.provider.IItemLabelProvider; import org.eclipse.jface.viewers.ILabelProvider; -import org.eclipse.papyrus.infra.emf.providers.EMFLabelProvider; import org.eclipse.papyrus.infra.emf.utils.EMFHelper; import org.eclipse.papyrus.infra.emf.utils.TextReferencesHelper; +import org.eclipse.papyrus.infra.ui.emf.providers.EMFLabelProvider; import org.eclipse.papyrus.uml.tools.Activator; import org.eclipse.papyrus.uml.tools.namereferences.NameReferencesHelper; import org.eclipse.papyrus.uml.tools.utils.ImageUtil; diff --git a/plugins/uml/tools/org.eclipse.papyrus.uml.tools/src/org/eclipse/papyrus/uml/tools/util/UMLProviderHelper.java b/plugins/uml/tools/org.eclipse.papyrus.uml.tools/src/org/eclipse/papyrus/uml/tools/util/UMLProviderHelper.java index 3406fd5ffef..3471c1ba29c 100644 --- a/plugins/uml/tools/org.eclipse.papyrus.uml.tools/src/org/eclipse/papyrus/uml/tools/util/UMLProviderHelper.java +++ b/plugins/uml/tools/org.eclipse.papyrus.uml.tools/src/org/eclipse/papyrus/uml/tools/util/UMLProviderHelper.java @@ -16,8 +16,8 @@ import org.eclipse.emf.ecore.EStructuralFeature; import org.eclipse.emf.ecore.resource.ResourceSet;
import org.eclipse.jface.viewers.IStructuredContentProvider;
import org.eclipse.jface.viewers.ITreeContentProvider;
-import org.eclipse.papyrus.infra.emf.providers.EMFGraphicalContentProvider;
import org.eclipse.papyrus.infra.emf.utils.HistoryUtil;
+import org.eclipse.papyrus.infra.ui.emf.providers.EMFGraphicalContentProvider;
import org.eclipse.papyrus.infra.widgets.strategy.IStrategyBasedContentProvider;
import org.eclipse.papyrus.infra.widgets.strategy.ProviderBasedBrowseStrategy;
import org.eclipse.papyrus.infra.widgets.strategy.StrategyBasedContentProvider;
diff --git a/plugins/views/modelexplorer/org.eclipse.papyrus.views.modelexplorer/META-INF/MANIFEST.MF b/plugins/views/modelexplorer/org.eclipse.papyrus.views.modelexplorer/META-INF/MANIFEST.MF index 2845497ce6d..1c3ea1c36da 100644 --- a/plugins/views/modelexplorer/org.eclipse.papyrus.views.modelexplorer/META-INF/MANIFEST.MF +++ b/plugins/views/modelexplorer/org.eclipse.papyrus.views.modelexplorer/META-INF/MANIFEST.MF @@ -54,7 +54,8 @@ Require-Bundle: org.eclipse.ui, org.eclipse.papyrus.emf.facet.util.emf.core;bundle-version="1.2.0", org.eclipse.papyrus.infra.viewpoints.policy;bundle-version="1.2.0", org.eclipse.papyrus.infra.ui;bundle-version="1.2.0", - org.eclipse.papyrus.infra.core.sashwindows.di;bundle-version="1.2.0" + org.eclipse.papyrus.infra.core.sashwindows.di;bundle-version="1.2.0", + org.eclipse.papyrus.infra.ui.emf;bundle-version="1.2.0" Bundle-Vendor: %providerName Bundle-ActivationPolicy: lazy Bundle-Version: 1.2.0.qualifier diff --git a/plugins/views/modelexplorer/org.eclipse.papyrus.views.modelexplorer/plugin.xml b/plugins/views/modelexplorer/org.eclipse.papyrus.views.modelexplorer/plugin.xml index c1d38f6b4ba..f21882a6c8f 100644 --- a/plugins/views/modelexplorer/org.eclipse.papyrus.views.modelexplorer/plugin.xml +++ b/plugins/views/modelexplorer/org.eclipse.papyrus.views.modelexplorer/plugin.xml @@ -38,7 +38,7 @@ </viewerActionBinding> </extension> <extension point="org.eclipse.ui.navigator.navigatorContent"> - <navigatorContent activeByDefault="false" contentProvider="org.eclipse.papyrus.infra.emf.providers.MoDiscoContentProvider" id="org.eclipse.papyrus.views.modelexplorer.navigatorContent" labelProvider="org.eclipse.jface.viewers.LabelProvider" name="Model Contents" priority="lowest"> + <navigatorContent activeByDefault="false" contentProvider="org.eclipse.papyrus.infra.ui.emf.providers.MoDiscoContentProvider" id="org.eclipse.papyrus.views.modelexplorer.navigatorContent" labelProvider="org.eclipse.jface.viewers.LabelProvider" name="Model Contents" priority="lowest"> <triggerPoints> <or> <instanceof value="org.eclipse.emf.ecore.EObject"> diff --git a/plugins/views/modelexplorer/org.eclipse.papyrus.views.modelexplorer/src/org/eclipse/papyrus/views/modelexplorer/Activator.java b/plugins/views/modelexplorer/org.eclipse.papyrus.views.modelexplorer/src/org/eclipse/papyrus/views/modelexplorer/Activator.java index 7d4ef2d0232..bd3850b16e9 100644 --- a/plugins/views/modelexplorer/org.eclipse.papyrus.views.modelexplorer/src/org/eclipse/papyrus/views/modelexplorer/Activator.java +++ b/plugins/views/modelexplorer/org.eclipse.papyrus.views.modelexplorer/src/org/eclipse/papyrus/views/modelexplorer/Activator.java @@ -1,6 +1,5 @@ /*****************************************************************************
- * Copyright (c) 2010 CEA LIST.
- *
+ * Copyright (c) 2010, 2016 CEA LIST, Christian W. Damus, and others.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
@@ -9,6 +8,7 @@ *
* Contributors:
* Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - Initial API and implementation
+ * Christian W. Damus - bug 485220
*
*****************************************************************************/
package org.eclipse.papyrus.views.modelexplorer;
@@ -25,13 +25,13 @@ import org.eclipse.emf.edit.EMFEditPlugin; import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.papyrus.emf.facet.custom.core.ICustomizationManager;
import org.eclipse.papyrus.infra.core.log.LogHelper;
+import org.eclipse.papyrus.infra.ui.emf.utils.ProviderHelper;
import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.osgi.framework.BundleContext;
/**
* The activator class controls the plug-in life cycle
*/
-@SuppressWarnings("restriction")
public class Activator extends AbstractUIPlugin {
/** The plug-in ID */
@@ -47,15 +47,6 @@ public class Activator extends AbstractUIPlugin { public Activator() {
}
- private ICustomizationManager fCustomizationManager;
-
- /*
- * (non-Javadoc)
- *
- * @see
- * org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext
- * )
- */
@Override
public void start(BundleContext context) throws Exception {
super.start(context);
@@ -87,13 +78,6 @@ public class Activator extends AbstractUIPlugin { return ImageDescriptor.createFromURL(uri);
}
- /*
- * (non-Javadoc)
- *
- * @see
- * org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext
- * )
- */
@Override
public void stop(BundleContext context) throws Exception {
plugin = null;
@@ -114,100 +98,9 @@ public class Activator extends AbstractUIPlugin { * @return the customization manager in charge to adapt element in modisco
*/
public ICustomizationManager getCustomizationManager() {
- return org.eclipse.papyrus.infra.emf.Activator.getDefault().getCustomizationManager();
- }
-
- private void init(final ICustomizationManager customizationManager) {
- // the appearance can be customized here:
-
- // customizationManager.setShowDerivedLinks(true);
- //
- // try {
- //
- // // load customizations defined as default through the customization
- // // extension
- // List<MetamodelView> registryDefaultCustomizations = CustomizationsCatalog.getInstance().getRegistryDefaultCustomizations();
- // for(MetamodelView metamodelView : registryDefaultCustomizations) {
- // customizationManager.registerCustomization(metamodelView);
- // }
- // customizationManager.loadCustomizations();
- // loadFacetsForCustomizations(registryDefaultCustomizations, customizationManager);
- //
- // } catch (Throwable e) {
- // Activator.getDefault().getLog().log(new Status(IStatus.ERROR, Activator.PLUGIN_ID, "Error initializing customizations", e)); //$NON-NLS-1$
- // }
+ return ProviderHelper.getCustomizationManager();
}
- // /**
- // * load the facets
- // *
- // * @param customizations
- // * list of customization
- // * @param customizationManager
- // * the Customization Manager
- // */
- // protected void loadFacetsForCustomizations(final List<MetamodelView> customizations, final CustomizationManager customizationManager) {
- // final Set<Facet> referencedFacets = new HashSet<Facet>();
- // final Collection<FacetSet> facetSets = FacetSetCatalog.getSingleton().getAllFacetSets();
- //
- // for(MetamodelView customization : customizations) {
- // String metamodelURI = customization.getMetamodelURI();
- // // find customized FacetSet
- // FacetSet customizedFacetSet = null;
- // if(metamodelURI != null) {
- // for(FacetSet facetSet : facetSets) {
- // if(metamodelURI.equals(facetSet.getNsURI())) {
- // customizedFacetSet = facetSet;
- // break;
- // }
- // }
- // }
- // if(customizedFacetSet == null) {
- // continue;
- // }
- //
- // // find customized Facets
- // EList<TypeView> types = customization.getTypes();
- // for(TypeView typeView : types) {
- // String metaclassName = typeView.getMetaclassName();
- // Facet facet = findFacetWithFullyQualifiedName(metaclassName, customizedFacetSet);
- // if(facet != null) {
- // referencedFacets.add(facet);
- // } else {
- // Activator.log.warn(NLS.bind(Messages.BrowserActionBarContributor_missingRequiredFacet, new Object[]{ metaclassName, customizedFacetSet.getName(), customization.getName() }));
- // }
- // }
- //
- // for(Facet referencedFacet : referencedFacets) {
- // customizationManager.loadFacet(referencedFacet);
- // }
- // }
- //
- // //
- // // for modified facets
- // // customizationManager.getInstancesForMetaclasses().buildDerivationTree();
- // // customizationManager.getAppearanceConfiguration().touch();
- // // customizationManager.refreshDelayed(true);
- // }
-
- // /**
- // * fin a facet from
- // *
- // * @param metaclassName
- // * @param customizedFacetSet
- // * @return
- // */
- // private Facet findFacetWithFullyQualifiedName(final String metaclassName, final FacetSet customizedFacetSet) {
- // EList<Facet> facets = customizedFacetSet.getFacets();
- // for(Facet facet : facets) {
- // String facetName = getMetaclassQualifiedName(facet);
- // if(metaclassName.equals(facetName)) {
- // return facet;
- // }
- // }
- // return null;
- // }
-
/**
* @return the qualified name of the given metaclass
*/
diff --git a/plugins/views/modelexplorer/org.eclipse.papyrus.views.modelexplorer/src/org/eclipse/papyrus/views/modelexplorer/ModelExplorerView.java b/plugins/views/modelexplorer/org.eclipse.papyrus.views.modelexplorer/src/org/eclipse/papyrus/views/modelexplorer/ModelExplorerView.java index 61daef45ed0..fe72adfb35c 100644 --- a/plugins/views/modelexplorer/org.eclipse.papyrus.views.modelexplorer/src/org/eclipse/papyrus/views/modelexplorer/ModelExplorerView.java +++ b/plugins/views/modelexplorer/org.eclipse.papyrus.views.modelexplorer/src/org/eclipse/papyrus/views/modelexplorer/ModelExplorerView.java @@ -61,7 +61,6 @@ import org.eclipse.papyrus.infra.core.services.ServiceException; import org.eclipse.papyrus.infra.core.services.ServicesRegistry; import org.eclipse.papyrus.infra.core.utils.AdapterUtils; import org.eclipse.papyrus.infra.core.utils.ServiceUtils; -import org.eclipse.papyrus.infra.emf.providers.SemanticFromModelExplorer; import org.eclipse.papyrus.infra.emf.utils.EMFHelper; import org.eclipse.papyrus.infra.services.labelprovider.service.LabelProviderService; import org.eclipse.papyrus.infra.services.navigation.service.NavigableElement; @@ -72,6 +71,7 @@ import org.eclipse.papyrus.infra.ui.editor.IReloadableEditor; import org.eclipse.papyrus.infra.ui.editor.reload.EditorReloadAdapter; import org.eclipse.papyrus.infra.ui.editor.reload.EditorReloadEvent; import org.eclipse.papyrus.infra.ui.editor.reload.TreeViewerContext; +import org.eclipse.papyrus.infra.ui.emf.providers.SemanticFromModelExplorer; import org.eclipse.papyrus.infra.ui.lifecycleevents.IEditorInputChangedListener; import org.eclipse.papyrus.infra.ui.lifecycleevents.ISaveAndDirtyService; import org.eclipse.papyrus.infra.widgets.util.IRevealSemanticElement; diff --git a/plugins/views/modelexplorer/org.eclipse.papyrus.views.modelexplorer/src/org/eclipse/papyrus/views/modelexplorer/handler/AbstractCommandHandler.java b/plugins/views/modelexplorer/org.eclipse.papyrus.views.modelexplorer/src/org/eclipse/papyrus/views/modelexplorer/handler/AbstractCommandHandler.java index a88413906bc..6e89d41b6f9 100644 --- a/plugins/views/modelexplorer/org.eclipse.papyrus.views.modelexplorer/src/org/eclipse/papyrus/views/modelexplorer/handler/AbstractCommandHandler.java +++ b/plugins/views/modelexplorer/org.eclipse.papyrus.views.modelexplorer/src/org/eclipse/papyrus/views/modelexplorer/handler/AbstractCommandHandler.java @@ -31,7 +31,7 @@ import org.eclipse.jface.viewers.ISelection; import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.papyrus.infra.core.services.ServiceException;
import org.eclipse.papyrus.infra.emf.utils.EMFHelper;
-import org.eclipse.papyrus.infra.emf.utils.ServiceUtilsForHandlers;
+import org.eclipse.papyrus.infra.ui.util.ServiceUtilsForHandlers;
import org.eclipse.papyrus.views.modelexplorer.Activator;
import org.eclipse.ui.handlers.HandlerUtil;
@@ -56,7 +56,7 @@ public abstract class AbstractCommandHandler extends AbstractModelExplorerHandle * Returns the command to execute (to be implemented
* in children implementing this class)
*
- * @return the command to execute
+ * @return the command to execute
*
* </pre>
*/
@@ -140,6 +140,7 @@ public abstract class AbstractCommandHandler extends AbstractModelExplorerHandle * @return null
* @throws ExecutionException
*/
+ @Override
public Object execute(ExecutionEvent event) throws ExecutionException {
try {
ISelection selection = HandlerUtil.getCurrentSelection(event);
diff --git a/plugins/views/modelexplorer/org.eclipse.papyrus.views.modelexplorer/src/org/eclipse/papyrus/views/modelexplorer/handler/CloseHandler.java b/plugins/views/modelexplorer/org.eclipse.papyrus.views.modelexplorer/src/org/eclipse/papyrus/views/modelexplorer/handler/CloseHandler.java index f1aecd3601a..17d5aa9ba23 100644 --- a/plugins/views/modelexplorer/org.eclipse.papyrus.views.modelexplorer/src/org/eclipse/papyrus/views/modelexplorer/handler/CloseHandler.java +++ b/plugins/views/modelexplorer/org.eclipse.papyrus.views.modelexplorer/src/org/eclipse/papyrus/views/modelexplorer/handler/CloseHandler.java @@ -25,7 +25,7 @@ import org.eclipse.emf.ecore.EObject; import org.eclipse.papyrus.infra.core.sashwindows.di.service.IPageManager;
import org.eclipse.papyrus.infra.core.services.ServiceException;
import org.eclipse.papyrus.infra.core.services.ServicesRegistry;
-import org.eclipse.papyrus.infra.emf.utils.ServiceUtilsForHandlers;
+import org.eclipse.papyrus.infra.ui.util.ServiceUtilsForHandlers;
/**
* This handler allows to Close Diagrams and Tables
@@ -60,6 +60,7 @@ public class CloseHandler extends AbstractModelExplorerHandler implements IExecu * @return
* @throws ExecutionException
*/
+ @Override
public Object execute(ExecutionEvent event) throws ExecutionException {
final IPageManager pageMngr;
@@ -106,6 +107,7 @@ public class CloseHandler extends AbstractModelExplorerHandler implements IExecu * @param data
* @throws CoreException
*/
+ @Override
public void setInitializationData(IConfigurationElement config, String propertyName, Object data) throws CoreException {
if (data instanceof Hashtable && this.parameterID != null) {
this.parameter = (String) ((Hashtable) data).get(this.parameterID);
diff --git a/plugins/views/modelexplorer/org.eclipse.papyrus.views.modelexplorer/src/org/eclipse/papyrus/views/modelexplorer/handler/LoadBrowserCustomization.java b/plugins/views/modelexplorer/org.eclipse.papyrus.views.modelexplorer/src/org/eclipse/papyrus/views/modelexplorer/handler/LoadBrowserCustomization.java index d45b9051c64..21409f56a11 100644 --- a/plugins/views/modelexplorer/org.eclipse.papyrus.views.modelexplorer/src/org/eclipse/papyrus/views/modelexplorer/handler/LoadBrowserCustomization.java +++ b/plugins/views/modelexplorer/org.eclipse.papyrus.views.modelexplorer/src/org/eclipse/papyrus/views/modelexplorer/handler/LoadBrowserCustomization.java @@ -113,7 +113,7 @@ public class LoadBrowserCustomization extends AbstractHandler { // Save the current state of the customizations
- org.eclipse.papyrus.infra.emf.Activator.getDefault().saveCustomizationManagerState();
+ org.eclipse.papyrus.infra.ui.internal.emf.Activator.getDefault().saveCustomizationManagerState();
}
// // load customizations defined as default through the customization
diff --git a/plugins/views/modelexplorer/org.eclipse.papyrus.views.modelexplorer/src/org/eclipse/papyrus/views/modelexplorer/provider/PropertyTester.java b/plugins/views/modelexplorer/org.eclipse.papyrus.views.modelexplorer/src/org/eclipse/papyrus/views/modelexplorer/provider/PropertyTester.java index f4bee137ce2..3183863f25e 100644 --- a/plugins/views/modelexplorer/org.eclipse.papyrus.views.modelexplorer/src/org/eclipse/papyrus/views/modelexplorer/provider/PropertyTester.java +++ b/plugins/views/modelexplorer/org.eclipse.papyrus.views.modelexplorer/src/org/eclipse/papyrus/views/modelexplorer/provider/PropertyTester.java @@ -27,7 +27,7 @@ import org.eclipse.papyrus.infra.core.sasheditor.di.contentprovider.IOpenable; import org.eclipse.papyrus.infra.core.sashwindows.di.service.IPageManager;
import org.eclipse.papyrus.infra.core.services.ServiceException;
import org.eclipse.papyrus.infra.emf.utils.EMFHelper;
-import org.eclipse.papyrus.infra.emf.utils.ServiceUtilsForSelection;
+import org.eclipse.papyrus.infra.ui.util.ServiceUtilsForSelection;
import org.eclipse.papyrus.views.modelexplorer.ModelExplorerPageBookView;
import org.eclipse.ui.IWorkbenchPart;
diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties/META-INF/MANIFEST.MF b/plugins/views/properties/org.eclipse.papyrus.views.properties/META-INF/MANIFEST.MF index ce85d396c2a..402d12d42a1 100644 --- a/plugins/views/properties/org.eclipse.papyrus.views.properties/META-INF/MANIFEST.MF +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties/META-INF/MANIFEST.MF @@ -48,7 +48,8 @@ Require-Bundle: org.eclipse.emf;bundle-version="2.6.0", org.eclipse.papyrus.infra.widgets.toolbox;bundle-version="1.2.0",
org.eclipse.papyrus.emf.facet.custom.ui;bundle-version="1.2.0",
org.eclipse.papyrus.emf.facet.custom.core;bundle-version="1.2.0",
- org.eclipse.xwt;bundle-version="1.1.0"
+ org.eclipse.xwt;bundle-version="1.1.0",
+ org.eclipse.papyrus.infra.ui.emf;bundle-version="1.2.0"
Bundle-Vendor: %Bundle-Vendor
Bundle-Version: 1.2.0.qualifier
Eclipse-BuddyPolicy: dependent
diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties/plugin.xml b/plugins/views/properties/org.eclipse.papyrus.views.properties/plugin.xml index b379cd1e9f5..13fcc5e210f 100644 --- a/plugins/views/properties/org.eclipse.papyrus.views.properties/plugin.xml +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties/plugin.xml @@ -62,7 +62,7 @@ <extension
point="org.eclipse.papyrus.views.properties.labelprovider">
<labelProvider
- labelProvider="org.eclipse.papyrus.infra.emf.providers.EMFFilteredLabelProvider"
+ labelProvider="org.eclipse.papyrus.infra.ui.emf.providers.EMFFilteredLabelProvider"
priority="100">
</labelProvider>
</extension>
diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties/src/org/eclipse/papyrus/views/properties/creation/EcorePropertyEditorFactory.java b/plugins/views/properties/org.eclipse.papyrus.views.properties/src/org/eclipse/papyrus/views/properties/creation/EcorePropertyEditorFactory.java index 78fb0a1245d..0f482e07f9e 100644 --- a/plugins/views/properties/org.eclipse.papyrus.views.properties/src/org/eclipse/papyrus/views/properties/creation/EcorePropertyEditorFactory.java +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties/src/org/eclipse/papyrus/views/properties/creation/EcorePropertyEditorFactory.java @@ -35,9 +35,9 @@ import org.eclipse.emf.ecore.resource.ResourceSet; import org.eclipse.emf.ecore.util.EcoreUtil;
import org.eclipse.jface.viewers.ILabelProvider;
import org.eclipse.jface.window.Window;
-import org.eclipse.papyrus.infra.emf.dialog.NestedEditingDialogContext;
import org.eclipse.papyrus.infra.emf.utils.EClassNameComparator;
import org.eclipse.papyrus.infra.emf.utils.EMFHelper;
+import org.eclipse.papyrus.infra.ui.emf.dialog.NestedEditingDialogContext;
import org.eclipse.papyrus.infra.widgets.providers.IStaticContentProvider;
import org.eclipse.papyrus.views.properties.Activator;
import org.eclipse.papyrus.views.properties.contexts.View;
diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties/src/org/eclipse/papyrus/views/properties/modelelement/AnnotationModelElement.java b/plugins/views/properties/org.eclipse.papyrus.views.properties/src/org/eclipse/papyrus/views/properties/modelelement/AnnotationModelElement.java index d595d851b1d..f87493d778e 100644 --- a/plugins/views/properties/org.eclipse.papyrus.views.properties/src/org/eclipse/papyrus/views/properties/modelelement/AnnotationModelElement.java +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties/src/org/eclipse/papyrus/views/properties/modelelement/AnnotationModelElement.java @@ -16,8 +16,8 @@ package org.eclipse.papyrus.views.properties.modelelement; import org.eclipse.core.databinding.observable.IObservable;
import org.eclipse.emf.ecore.EModelElement;
import org.eclipse.emf.edit.domain.EditingDomain;
-import org.eclipse.papyrus.infra.emf.databinding.AnnotationObservableValue;
import org.eclipse.papyrus.infra.emf.utils.EMFHelper;
+import org.eclipse.papyrus.infra.ui.emf.databinding.AnnotationObservableValue;
/**
* A ModelElement for handling EAnnotations
diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties/src/org/eclipse/papyrus/views/properties/modelelement/EMFModelElement.java b/plugins/views/properties/org.eclipse.papyrus.views.properties/src/org/eclipse/papyrus/views/properties/modelelement/EMFModelElement.java index 6e5daf70755..d0cb3a43985 100644 --- a/plugins/views/properties/org.eclipse.papyrus.views.properties/src/org/eclipse/papyrus/views/properties/modelelement/EMFModelElement.java +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties/src/org/eclipse/papyrus/views/properties/modelelement/EMFModelElement.java @@ -28,15 +28,15 @@ import org.eclipse.emf.ecore.EStructuralFeature; import org.eclipse.emf.edit.domain.EditingDomain;
import org.eclipse.jface.viewers.ILabelProvider;
import org.eclipse.papyrus.infra.core.services.ServiceException;
-import org.eclipse.papyrus.infra.emf.databinding.EMFObservableList;
-import org.eclipse.papyrus.infra.emf.databinding.EMFObservableValue;
-import org.eclipse.papyrus.infra.emf.dialog.NestedEditingDialogContext;
-import org.eclipse.papyrus.infra.emf.providers.EMFContentProvider;
-import org.eclipse.papyrus.infra.emf.providers.EMFLabelProvider;
import org.eclipse.papyrus.infra.emf.utils.EMFHelper;
import org.eclipse.papyrus.infra.emf.utils.ServiceUtilsForEObject;
import org.eclipse.papyrus.infra.emf.utils.ServiceUtilsForResourceSet;
import org.eclipse.papyrus.infra.services.labelprovider.service.LabelProviderService;
+import org.eclipse.papyrus.infra.ui.emf.databinding.EMFObservableList;
+import org.eclipse.papyrus.infra.ui.emf.databinding.EMFObservableValue;
+import org.eclipse.papyrus.infra.ui.emf.dialog.NestedEditingDialogContext;
+import org.eclipse.papyrus.infra.ui.emf.providers.EMFContentProvider;
+import org.eclipse.papyrus.infra.ui.emf.providers.EMFLabelProvider;
import org.eclipse.papyrus.infra.widgets.creation.ReferenceValueFactory;
import org.eclipse.papyrus.infra.widgets.providers.IStaticContentProvider;
import org.eclipse.papyrus.views.properties.Activator;
diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties/src/org/eclipse/papyrus/views/properties/providers/ContainerContentProvider.java b/plugins/views/properties/org.eclipse.papyrus.views.properties/src/org/eclipse/papyrus/views/properties/providers/ContainerContentProvider.java index 5f29614e03d..353173db0cb 100644 --- a/plugins/views/properties/org.eclipse.papyrus.views.properties/src/org/eclipse/papyrus/views/properties/providers/ContainerContentProvider.java +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties/src/org/eclipse/papyrus/views/properties/providers/ContainerContentProvider.java @@ -15,8 +15,8 @@ import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EReference;
import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.papyrus.infra.emf.providers.strategy.SemanticEMFContentProvider;
import org.eclipse.papyrus.infra.emf.utils.EMFHelper;
+import org.eclipse.papyrus.infra.ui.emf.providers.strategy.SemanticEMFContentProvider;
public class ContainerContentProvider extends SemanticEMFContentProvider {
diff --git a/releng/main-tests/pom.xml b/releng/main-tests/pom.xml index de5005fb6fa..bd014b0cd21 100644 --- a/releng/main-tests/pom.xml +++ b/releng/main-tests/pom.xml @@ -45,6 +45,7 @@ <module>../../tests/junit/plugins/infra/editor/org.eclipse.papyrus.infra.editor.welcome.tests</module> <module>../../tests/junit/plugins/infra/emf/org.eclipse.papyrus.infra.emf.readonly.tests</module> <module>../../tests/junit/plugins/infra/emf/org.eclipse.papyrus.infra.emf.tests</module> + <module>../../tests/junit/plugins/infra/emf/org.eclipse.papyrus.infra.ui.emf.tests</module> <module>../../tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical.tests</module> <module>../../tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.commands.tests</module> <module>../../tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common.tests</module> diff --git a/releng/main/pom.xml b/releng/main/pom.xml index 42be8632e13..a02505c1c15 100755 --- a/releng/main/pom.xml +++ b/releng/main/pom.xml @@ -19,6 +19,7 @@ <module>../../features/papyrus-main-features/org.eclipse.papyrus.infra.core.feature</module> <module>../../features/papyrus-main-features/org.eclipse.papyrus.infra.discovery.feature</module> <module>../../features/papyrus-main-features/org.eclipse.papyrus.infra.emf.feature</module> + <module>../../features/papyrus-main-features/org.eclipse.papyrus.infra.ui.feature</module> <module>../../features/papyrus-main-features/org.eclipse.papyrus.infra.feature</module> <module>../../features/papyrus-main-features/org.eclipse.papyrus.infra.gmfdiag.css.feature</module> <module>../../features/papyrus-main-features/org.eclipse.papyrus.infra.gmfdiag.feature</module> @@ -120,6 +121,7 @@ <module>../../plugins/infra/emf/org.eclipse.papyrus.infra.emf.appearance</module> <module>../../plugins/infra/emf/org.eclipse.papyrus.infra.emf.diagram.common</module> <module>../../plugins/infra/emf/org.eclipse.papyrus.infra.emf.readonly</module> + <module>../../plugins/infra/emf/org.eclipse.papyrus.infra.ui.emf</module> <module>../../plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.export</module> <module>../../plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.welcome</module> <module>../../plugins/infra/org.eclipse.papyrus.infra.extendedtypes</module> diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.tests/META-INF/MANIFEST.MF b/tests/junit/plugins/core/org.eclipse.papyrus.tests/META-INF/MANIFEST.MF index eb7e27a58be..6864695e84c 100644 --- a/tests/junit/plugins/core/org.eclipse.papyrus.tests/META-INF/MANIFEST.MF +++ b/tests/junit/plugins/core/org.eclipse.papyrus.tests/META-INF/MANIFEST.MF @@ -84,7 +84,8 @@ Require-Bundle: org.eclipse.ui, org.eclipse.papyrus.infra.editor.welcome.tests;bundle-version="1.2.0",
org.eclipse.papyrus.infra.gmfdiag.welcome.tests;bundle-version="1.2.0",
org.eclipse.papyrus.uml.validation.tests;bundle-version="1.2.0",
- org.eclipse.papyrus.infra.ui.tests;bundle-version="1.2.0"
+ org.eclipse.papyrus.infra.ui.tests;bundle-version="1.2.0",
+ org.eclipse.papyrus.infra.ui.emf;bundle-version="1.2.0"
Bundle-Vendor: %providerName
Bundle-ActivationPolicy: lazy
Bundle-Version: 1.2.0.qualifier
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.tests/test/org/eclipse/papyrus/tests/AllTests.java b/tests/junit/plugins/core/org.eclipse.papyrus.tests/test/org/eclipse/papyrus/tests/AllTests.java index 0b9d823fd06..811202631a1 100644 --- a/tests/junit/plugins/core/org.eclipse.papyrus.tests/test/org/eclipse/papyrus/tests/AllTests.java +++ b/tests/junit/plugins/core/org.eclipse.papyrus.tests/test/org/eclipse/papyrus/tests/AllTests.java @@ -28,6 +28,7 @@ import org.junit.runner.RunWith; /**
* Test class for all tests for Papyrus
*/
+@SuppressWarnings("restriction")
@RunWith(AllTestsRunner.class)
public class AllTests {
@@ -54,6 +55,7 @@ public class AllTests { suiteClasses.add(new FragmentTestSuiteClass(org.eclipse.papyrus.infra.services.edit.Activator.PLUGIN_ID, "org.eclipse.papyrus.infra.services.edit.tests.suites.AllTests"));
suiteClasses.add(new PluginTestSuiteClass(org.eclipse.papyrus.infra.services.labelprovider.tests.AllTests.class));
suiteClasses.add(new FragmentTestSuiteClass(org.eclipse.papyrus.infra.emf.Activator.PLUGIN_ID, "org.eclipse.papyrus.infra.emf.tests.AllTests"));
+ suiteClasses.add(new FragmentTestSuiteClass(org.eclipse.papyrus.infra.ui.internal.emf.Activator.PLUGIN_ID, "org.eclipse.papyrus.infra.ui.emf.tests.AllTests"));
suiteClasses.add(new PluginTestSuiteClass(org.eclipse.papyrus.infra.extendedtypes.tests.AllTests.class));
suiteClasses.add(new PluginTestSuiteClass(org.eclipse.papyrus.infra.elementtypesconfigurations.tests.AllTests.class));
// suiteClasses.add(new PluginTestSuiteClass(org.eclipse.papyrus.infra.services.openelement.tests.AllTests.class));
diff --git a/tests/junit/plugins/infra/emf/org.eclipse.papyrus.infra.emf.readonly.tests/build.properties b/tests/junit/plugins/infra/emf/org.eclipse.papyrus.infra.emf.readonly.tests/build.properties index 412030aeabe..c905634491b 100644 --- a/tests/junit/plugins/infra/emf/org.eclipse.papyrus.infra.emf.readonly.tests/build.properties +++ b/tests/junit/plugins/infra/emf/org.eclipse.papyrus.infra.emf.readonly.tests/build.properties @@ -1,4 +1,4 @@ -# Copyright (c) 2014 CEA and others. +# Copyright (c) 2014, 2016 CEA, Christian W. Damus, and others. # # All rights reserved. This program and the accompanying materials # are made available under the terms of the Eclipse Public License v1.0 @@ -7,6 +7,7 @@ # # Contributors: # Christian W. Damus (CEA) - Initial API and implementation +# Christian W. Damus - bug 485220 # source.. = src/ @@ -14,7 +15,6 @@ output.. = bin/ bin.includes = META-INF/,\ .,\ fragment.properties,\ - about.html,\ - resources/ + about.html src.includes = about.html,\ org.eclipse.papyrus.infra.emf.readonly.tests.launch diff --git a/tests/junit/plugins/infra/emf/org.eclipse.papyrus.infra.emf.readonly.tests/src/org/eclipse/papyrus/infra/emf/readonly/tests/AllTests.java b/tests/junit/plugins/infra/emf/org.eclipse.papyrus.infra.emf.readonly.tests/src/org/eclipse/papyrus/infra/emf/readonly/tests/AllTests.java index 8f08d017b92..c5d7075a04c 100644 --- a/tests/junit/plugins/infra/emf/org.eclipse.papyrus.infra.emf.readonly.tests/src/org/eclipse/papyrus/infra/emf/readonly/tests/AllTests.java +++ b/tests/junit/plugins/infra/emf/org.eclipse.papyrus.infra.emf.readonly.tests/src/org/eclipse/papyrus/infra/emf/readonly/tests/AllTests.java @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014 CEA and others. + * Copyright (c) 2014, 2016 CEA, Christian W. Damus, and others. * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 @@ -15,9 +15,8 @@ package org.eclipse.papyrus.infra.emf.readonly.tests; import org.eclipse.papyrus.infra.emf.readonly.PapyrusROTransactionalEditingDomainTest; import org.eclipse.papyrus.infra.emf.readonly.ReadOnlyManagerTest; import org.eclipse.papyrus.infra.emf.readonly.ReadOnlyTesterTest; -import org.eclipse.papyrus.infra.emf.readonly.ReferencedModelReadOnlyHandlerTest; -import org.junit.runner.RunWith; import org.eclipse.papyrus.junit.framework.classification.ClassificationSuite; +import org.junit.runner.RunWith; import org.junit.runners.Suite.SuiteClasses; @@ -26,7 +25,7 @@ import org.junit.runners.Suite.SuiteClasses; */ @RunWith(ClassificationSuite.class) @SuiteClasses({ -PapyrusROTransactionalEditingDomainTest.class, ReferencedModelReadOnlyHandlerTest.class, ReadOnlyManagerTest.class, ReadOnlyTesterTest.class + PapyrusROTransactionalEditingDomainTest.class, ReadOnlyManagerTest.class, ReadOnlyTesterTest.class }) public class AllTests { diff --git a/tests/junit/plugins/infra/emf/org.eclipse.papyrus.infra.ui.emf.tests/.classpath b/tests/junit/plugins/infra/emf/org.eclipse.papyrus.infra.ui.emf.tests/.classpath new file mode 100644 index 00000000000..64c5e31b7a2 --- /dev/null +++ b/tests/junit/plugins/infra/emf/org.eclipse.papyrus.infra.ui.emf.tests/.classpath @@ -0,0 +1,7 @@ +<?xml version="1.0" encoding="UTF-8"?> +<classpath> + <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/> + <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> + <classpathentry kind="src" path="src"/> + <classpathentry kind="output" path="bin"/> +</classpath> diff --git a/tests/junit/plugins/infra/emf/org.eclipse.papyrus.infra.ui.emf.tests/.project b/tests/junit/plugins/infra/emf/org.eclipse.papyrus.infra.ui.emf.tests/.project new file mode 100644 index 00000000000..144f3a99882 --- /dev/null +++ b/tests/junit/plugins/infra/emf/org.eclipse.papyrus.infra.ui.emf.tests/.project @@ -0,0 +1,28 @@ +<?xml version="1.0" encoding="UTF-8"?> +<projectDescription> + <name>org.eclipse.papyrus.infra.ui.emf.tests</name> + <comment></comment> + <projects> + </projects> + <buildSpec> + <buildCommand> + <name>org.eclipse.jdt.core.javabuilder</name> + <arguments> + </arguments> + </buildCommand> + <buildCommand> + <name>org.eclipse.pde.ManifestBuilder</name> + <arguments> + </arguments> + </buildCommand> + <buildCommand> + <name>org.eclipse.pde.SchemaBuilder</name> + <arguments> + </arguments> + </buildCommand> + </buildSpec> + <natures> + <nature>org.eclipse.pde.PluginNature</nature> + <nature>org.eclipse.jdt.core.javanature</nature> + </natures> +</projectDescription> diff --git a/tests/junit/plugins/infra/emf/org.eclipse.papyrus.infra.ui.emf.tests/.settings/org.eclipse.jdt.core.prefs b/tests/junit/plugins/infra/emf/org.eclipse.papyrus.infra.ui.emf.tests/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 00000000000..c585cc455ae --- /dev/null +++ b/tests/junit/plugins/infra/emf/org.eclipse.papyrus.infra.ui.emf.tests/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,291 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5 +org.eclipse.jdt.core.compiler.compliance=1.5 +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.source=1.5 +org.eclipse.jdt.core.formatter.align_type_members_on_columns=false +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16 +org.eclipse.jdt.core.formatter.alignment_for_assignment=0 +org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16 +org.eclipse.jdt.core.formatter.alignment_for_compact_if=16 +org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80 +org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0 +org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16 +org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0 +org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16 +org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80 +org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16 +org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16 +org.eclipse.jdt.core.formatter.blank_lines_after_imports=1 +org.eclipse.jdt.core.formatter.blank_lines_after_package=1 +org.eclipse.jdt.core.formatter.blank_lines_before_field=0 +org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0 +org.eclipse.jdt.core.formatter.blank_lines_before_imports=1 +org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1 +org.eclipse.jdt.core.formatter.blank_lines_before_method=1 +org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1 +org.eclipse.jdt.core.formatter.blank_lines_before_package=0 +org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1 +org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1 +org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_lambda_body=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line +org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false +org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false +org.eclipse.jdt.core.formatter.comment.format_block_comments=true +org.eclipse.jdt.core.formatter.comment.format_header=false +org.eclipse.jdt.core.formatter.comment.format_html=true +org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true +org.eclipse.jdt.core.formatter.comment.format_line_comments=true +org.eclipse.jdt.core.formatter.comment.format_source_code=true +org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true +org.eclipse.jdt.core.formatter.comment.indent_root_tags=true +org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert +org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert +org.eclipse.jdt.core.formatter.comment.line_length=260 +org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true +org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true +org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false +org.eclipse.jdt.core.formatter.compact_else_if=true +org.eclipse.jdt.core.formatter.continuation_indentation=2 +org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2 +org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off +org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on +org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false +org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true +org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true +org.eclipse.jdt.core.formatter.indent_empty_lines=false +org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true +org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true +org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true +org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false +org.eclipse.jdt.core.formatter.indentation.size=4 +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_after_type_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert +org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert +org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert +org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert +org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert +org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert +org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert +org.eclipse.jdt.core.formatter.insert_space_after_lambda_arrow=insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert +org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert +org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert +org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_lambda_arrow=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert +org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert +org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert +org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.join_lines_in_comments=false +org.eclipse.jdt.core.formatter.join_wrapped_lines=false +org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false +org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false +org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false +org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false +org.eclipse.jdt.core.formatter.lineSplit=260 +org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false +org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false +org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0 +org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=5 +org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true +org.eclipse.jdt.core.formatter.tabulation.char=tab +org.eclipse.jdt.core.formatter.tabulation.size=4 +org.eclipse.jdt.core.formatter.use_on_off_tags=false +org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false +org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true +org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true +org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true diff --git a/tests/junit/plugins/infra/emf/org.eclipse.papyrus.infra.ui.emf.tests/.settings/org.eclipse.jdt.ui.prefs b/tests/junit/plugins/infra/emf/org.eclipse.papyrus.infra.ui.emf.tests/.settings/org.eclipse.jdt.ui.prefs new file mode 100644 index 00000000000..954281dbc31 --- /dev/null +++ b/tests/junit/plugins/infra/emf/org.eclipse.papyrus.infra.ui.emf.tests/.settings/org.eclipse.jdt.ui.prefs @@ -0,0 +1,68 @@ +cleanup.add_default_serial_version_id=true +cleanup.add_generated_serial_version_id=false +cleanup.add_missing_annotations=true +cleanup.add_missing_deprecated_annotations=true +cleanup.add_missing_methods=false +cleanup.add_missing_nls_tags=false +cleanup.add_missing_override_annotations=true +cleanup.add_missing_override_annotations_interface_methods=true +cleanup.add_serial_version_id=false +cleanup.always_use_blocks=true +cleanup.always_use_parentheses_in_expressions=false +cleanup.always_use_this_for_non_static_field_access=false +cleanup.always_use_this_for_non_static_method_access=false +cleanup.convert_functional_interfaces=false +cleanup.convert_to_enhanced_for_loop=false +cleanup.correct_indentation=false +cleanup.format_source_code=false +cleanup.format_source_code_changes_only=false +cleanup.insert_inferred_type_arguments=false +cleanup.make_local_variable_final=true +cleanup.make_parameters_final=false +cleanup.make_private_fields_final=true +cleanup.make_type_abstract_if_missing_method=false +cleanup.make_variable_declarations_final=false +cleanup.never_use_blocks=false +cleanup.never_use_parentheses_in_expressions=true +cleanup.organize_imports=false +cleanup.qualify_static_field_accesses_with_declaring_class=false +cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true +cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true +cleanup.qualify_static_member_accesses_with_declaring_class=true +cleanup.qualify_static_method_accesses_with_declaring_class=false +cleanup.remove_private_constructors=true +cleanup.remove_redundant_type_arguments=true +cleanup.remove_trailing_whitespaces=true +cleanup.remove_trailing_whitespaces_all=true +cleanup.remove_trailing_whitespaces_ignore_empty=false +cleanup.remove_unnecessary_casts=true +cleanup.remove_unnecessary_nls_tags=true +cleanup.remove_unused_imports=true +cleanup.remove_unused_local_variables=false +cleanup.remove_unused_private_fields=true +cleanup.remove_unused_private_members=false +cleanup.remove_unused_private_methods=true +cleanup.remove_unused_private_types=true +cleanup.sort_members=false +cleanup.sort_members_all=false +cleanup.use_anonymous_class_creation=false +cleanup.use_blocks=true +cleanup.use_blocks_only_for_return_and_throw=false +cleanup.use_lambda=true +cleanup.use_parentheses_in_expressions=false +cleanup.use_this_for_non_static_field_access=false +cleanup.use_this_for_non_static_field_access_only_if_necessary=true +cleanup.use_this_for_non_static_method_access=false +cleanup.use_this_for_non_static_method_access_only_if_necessary=true +cleanup.use_type_arguments=false +cleanup_profile=_Papyrus +cleanup_settings_version=2 +eclipse.preferences.version=1 +formatter_profile=_Papyrus +formatter_settings_version=12 +org.eclipse.jdt.ui.ignorelowercasenames=true +org.eclipse.jdt.ui.importorder=java;javax;org;com; +org.eclipse.jdt.ui.javadoc=true +org.eclipse.jdt.ui.ondemandthreshold=99 +org.eclipse.jdt.ui.staticondemandthreshold=99 +org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\n * @return the ${bare_field_name}\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\n * @param ${param} the ${bare_field_name} to set\n */</template><template autoinsert\="false" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\n * Constructor.\n *\n * ${tags}\n */</template><template autoinsert\="false" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/*****************************************************************************\n * Copyright (c) ${year} CEA LIST and others.\n * \n * All rights reserved. This program and the accompanying materials\n * are made available under the terms of the Eclipse Public License v1.0\n * which accompanies this distribution, and is available at\n * http\://www.eclipse.org/legal/epl-v10.html\n *\n * Contributors\:\n * CEA LIST - Initial API and implementation\n * \n *****************************************************************************/\n</template><template autoinsert\="true" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\n * @author ${user}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\n * \n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\n * ${tags}\n */</template><template autoinsert\="false" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/**\n * ${see_to_overridden}\n *\n * ${tags}\n */</template><template autoinsert\="false" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\n * ${see_to_target}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">${filecomment}\n${package_declaration}\n\n${typecomment}\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\n</template><template autoinsert\="true" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\n${exception_var}.printStackTrace();</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">// ${todo} Auto-generated method stub\n${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\n// ${todo} Auto-generated constructor stub</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></templates> diff --git a/tests/junit/plugins/infra/emf/org.eclipse.papyrus.infra.ui.emf.tests/META-INF/MANIFEST.MF b/tests/junit/plugins/infra/emf/org.eclipse.papyrus.infra.ui.emf.tests/META-INF/MANIFEST.MF new file mode 100644 index 00000000000..7c2dcfc3436 --- /dev/null +++ b/tests/junit/plugins/infra/emf/org.eclipse.papyrus.infra.ui.emf.tests/META-INF/MANIFEST.MF @@ -0,0 +1,19 @@ +Manifest-Version: 1.0 +Require-Bundle: org.junit;bundle-version="4.10.0", + org.eclipse.uml2.uml;bundle-version="5.0.0", + com.google.guava;bundle-version="11.0.0", + org.eclipse.papyrus.infra.services.controlmode;bundle-version="1.2.0", + org.eclipse.gmf.runtime.notation;bundle-version="1.7.0", + org.eclipse.papyrus.junit.framework;bundle-version="1.2.0", + org.eclipse.papyrus.junit.utils;bundle-version="1.2.0", + org.eclipse.gmf.runtime.emf.type.core;bundle-version="1.9.0" +Export-Package: org.eclipse.papyrus.infra.ui.emf.tests, + org.eclipse.papyrus.infra.ui.internal.emf.readonly.handlers +Bundle-Vendor: %providerName +Fragment-Host: org.eclipse.papyrus.infra.ui.emf;bundle-version="1.2.0" +Bundle-Version: 1.2.0.qualifier +Bundle-Name: %pluginName +Bundle-Localization: fragment +Bundle-ManifestVersion: 2 +Bundle-SymbolicName: org.eclipse.papyrus.infra.ui.emf.tests +Bundle-RequiredExecutionEnvironment: J2SE-1.5 diff --git a/tests/junit/plugins/infra/emf/org.eclipse.papyrus.infra.ui.emf.tests/about.html b/tests/junit/plugins/infra/emf/org.eclipse.papyrus.infra.ui.emf.tests/about.html new file mode 100644 index 00000000000..d35d5aed64c --- /dev/null +++ b/tests/junit/plugins/infra/emf/org.eclipse.papyrus.infra.ui.emf.tests/about.html @@ -0,0 +1,28 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/> +<title>About</title> +</head> +<body lang="EN-US"> +<h2>About This Content</h2> + +<p>June 5, 2007</p> +<h3>License</h3> + +<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise +indicated below, the Content is provided to you under the terms and conditions of the +Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available +at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>. +For purposes of the EPL, "Program" will mean the Content.</p> + +<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is +being redistributed by another party ("Redistributor") and different terms and conditions may +apply to your use of any object code in the Content. Check the Redistributor's license that was +provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise +indicated below, the terms and conditions of the EPL still apply to any source code in the Content +and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p> + +</body> +</html> diff --git a/tests/junit/plugins/infra/emf/org.eclipse.papyrus.infra.ui.emf.tests/build.properties b/tests/junit/plugins/infra/emf/org.eclipse.papyrus.infra.ui.emf.tests/build.properties new file mode 100644 index 00000000000..ce5d0aee6cf --- /dev/null +++ b/tests/junit/plugins/infra/emf/org.eclipse.papyrus.infra.ui.emf.tests/build.properties @@ -0,0 +1,20 @@ +# Copyright (c) 2016 Christian W. Damus and others. +# +# 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 +# http://www.eclipse.org/legal/epl-v10.html +# +# Contributors: +# Christian W. Damus - Initial API and implementation +# + +source.. = src/ +output.. = bin/ +bin.includes = META-INF/,\ + .,\ + fragment.properties,\ + about.html,\ + resources/ +src.includes = about.html,\ + org.eclipse.papyrus.infra.ui.emf.tests.launch diff --git a/tests/junit/plugins/infra/emf/org.eclipse.papyrus.infra.ui.emf.tests/fragment.properties b/tests/junit/plugins/infra/emf/org.eclipse.papyrus.infra.ui.emf.tests/fragment.properties new file mode 100644 index 00000000000..2acc6750200 --- /dev/null +++ b/tests/junit/plugins/infra/emf/org.eclipse.papyrus.infra.ui.emf.tests/fragment.properties @@ -0,0 +1,13 @@ +################################################################################# +# Copyright (c) 2016 Christian W. Damus and others. +# 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 +# http://www.eclipse.org/legal/epl-v10.html +# +# Contributors: +# Christian W. Damus - Initial API and implementation +# +################################################################################## +pluginName=Papyrus Instructure UI EMF Tests +providerName=Eclipse Modeling Project diff --git a/tests/junit/plugins/infra/emf/org.eclipse.papyrus.infra.ui.emf.tests/org.eclipse.papyrus.infra.ui.emf.tests.launch b/tests/junit/plugins/infra/emf/org.eclipse.papyrus.infra.ui.emf.tests/org.eclipse.papyrus.infra.ui.emf.tests.launch new file mode 100644 index 00000000000..5aa09b0fa3f --- /dev/null +++ b/tests/junit/plugins/infra/emf/org.eclipse.papyrus.infra.ui.emf.tests/org.eclipse.papyrus.infra.ui.emf.tests.launch @@ -0,0 +1,43 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<launchConfiguration type="org.eclipse.pde.ui.JunitLaunchConfig"> +<booleanAttribute key="append.args" value="true"/> +<booleanAttribute key="askclear" value="false"/> +<booleanAttribute key="automaticAdd" value="true"/> +<booleanAttribute key="automaticValidate" value="false"/> +<stringAttribute key="bootstrap" value=""/> +<stringAttribute key="checked" value="[NONE]"/> +<booleanAttribute key="clearConfig" value="true"/> +<booleanAttribute key="clearws" value="true"/> +<booleanAttribute key="clearwslog" value="false"/> +<stringAttribute key="configLocation" value="${workspace_loc}/.metadata/.plugins/org.eclipse.pde.core/pde-junit"/> +<booleanAttribute key="default" value="true"/> +<booleanAttribute key="includeOptional" value="true"/> +<stringAttribute key="location" value="${workspace_loc}/../junit-workspace"/> +<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS"> +<listEntry value="/org.eclipse.papyrus.infra.ui.emf.tests/src/org/eclipse/papyrus/infra/ui/emf/tests/AllTests.java"/> +</listAttribute> +<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES"> +<listEntry value="1"/> +</listAttribute> +<stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value=""/> +<booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/> +<stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/> +<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit4"/> +<booleanAttribute key="org.eclipse.jdt.launching.ATTR_USE_START_ON_FIRST_THREAD" value="true"/> +<stringAttribute key="org.eclipse.jdt.launching.JAVA_COMMAND" value="java"/> +<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/> +<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.eclipse.papyrus.infra.ui.emf.tests.AllTests"/> +<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl} -consoleLog"/> +<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.papyrus.infra.ui.emf.tests"/> +<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/> +<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Dosgi.requiredJavaVersion=1.5 -Xms768m -Xmx1024m -XX:PermSize=256M -XX:MaxPermSize=512M"/> +<stringAttribute key="pde.version" value="3.3"/> +<stringAttribute key="product" value="org.eclipse.platform.ide"/> +<booleanAttribute key="run_in_ui_thread" value="true"/> +<booleanAttribute key="show_selected_only" value="false"/> +<booleanAttribute key="tracing" value="false"/> +<booleanAttribute key="useCustomFeatures" value="false"/> +<booleanAttribute key="useDefaultConfig" value="true"/> +<booleanAttribute key="useDefaultConfigArea" value="false"/> +<booleanAttribute key="useProduct" value="true"/> +</launchConfiguration> diff --git a/tests/junit/plugins/infra/emf/org.eclipse.papyrus.infra.ui.emf.tests/pom.xml b/tests/junit/plugins/infra/emf/org.eclipse.papyrus.infra.ui.emf.tests/pom.xml new file mode 100644 index 00000000000..61532094d16 --- /dev/null +++ b/tests/junit/plugins/infra/emf/org.eclipse.papyrus.infra.ui.emf.tests/pom.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + <modelVersion>4.0.0</modelVersion> + <parent> + <groupId>org.eclipse.papyrus</groupId> + <artifactId>org.eclipse.papyrus.tests.releng</artifactId> + <version>1.2.0-SNAPSHOT</version> + <relativePath>../../../../../../releng/main-tests</relativePath> + </parent> + <groupId>org.eclipse.papyrus</groupId> + <artifactId>org.eclipse.papyrus.infra.ui.emf.tests</artifactId> + <version>1.2.0-SNAPSHOT</version> + <packaging>eclipse-test-plugin</packaging> +</project> diff --git a/tests/junit/plugins/infra/emf/org.eclipse.papyrus.infra.emf.readonly.tests/resources/referenced.di b/tests/junit/plugins/infra/emf/org.eclipse.papyrus.infra.ui.emf.tests/resources/referenced.di index c225e67b58e..c225e67b58e 100644 --- a/tests/junit/plugins/infra/emf/org.eclipse.papyrus.infra.emf.readonly.tests/resources/referenced.di +++ b/tests/junit/plugins/infra/emf/org.eclipse.papyrus.infra.ui.emf.tests/resources/referenced.di diff --git a/tests/junit/plugins/infra/emf/org.eclipse.papyrus.infra.emf.readonly.tests/resources/referenced.notation b/tests/junit/plugins/infra/emf/org.eclipse.papyrus.infra.ui.emf.tests/resources/referenced.notation index 128575d9a2b..128575d9a2b 100644 --- a/tests/junit/plugins/infra/emf/org.eclipse.papyrus.infra.emf.readonly.tests/resources/referenced.notation +++ b/tests/junit/plugins/infra/emf/org.eclipse.papyrus.infra.ui.emf.tests/resources/referenced.notation diff --git a/tests/junit/plugins/infra/emf/org.eclipse.papyrus.infra.emf.readonly.tests/resources/referenced.uml b/tests/junit/plugins/infra/emf/org.eclipse.papyrus.infra.ui.emf.tests/resources/referenced.uml index 8cde5f2052d..8cde5f2052d 100644 --- a/tests/junit/plugins/infra/emf/org.eclipse.papyrus.infra.emf.readonly.tests/resources/referenced.uml +++ b/tests/junit/plugins/infra/emf/org.eclipse.papyrus.infra.ui.emf.tests/resources/referenced.uml diff --git a/tests/junit/plugins/infra/emf/org.eclipse.papyrus.infra.emf.readonly.tests/resources/referencing.di b/tests/junit/plugins/infra/emf/org.eclipse.papyrus.infra.ui.emf.tests/resources/referencing.di index 1615b760e8e..1615b760e8e 100644 --- a/tests/junit/plugins/infra/emf/org.eclipse.papyrus.infra.emf.readonly.tests/resources/referencing.di +++ b/tests/junit/plugins/infra/emf/org.eclipse.papyrus.infra.ui.emf.tests/resources/referencing.di diff --git a/tests/junit/plugins/infra/emf/org.eclipse.papyrus.infra.emf.readonly.tests/resources/referencing.notation b/tests/junit/plugins/infra/emf/org.eclipse.papyrus.infra.ui.emf.tests/resources/referencing.notation index 767464d829f..767464d829f 100644 --- a/tests/junit/plugins/infra/emf/org.eclipse.papyrus.infra.emf.readonly.tests/resources/referencing.notation +++ b/tests/junit/plugins/infra/emf/org.eclipse.papyrus.infra.ui.emf.tests/resources/referencing.notation diff --git a/tests/junit/plugins/infra/emf/org.eclipse.papyrus.infra.emf.readonly.tests/resources/referencing.uml b/tests/junit/plugins/infra/emf/org.eclipse.papyrus.infra.ui.emf.tests/resources/referencing.uml index 2e3b45f8cc7..2e3b45f8cc7 100644 --- a/tests/junit/plugins/infra/emf/org.eclipse.papyrus.infra.emf.readonly.tests/resources/referencing.uml +++ b/tests/junit/plugins/infra/emf/org.eclipse.papyrus.infra.ui.emf.tests/resources/referencing.uml diff --git a/tests/junit/plugins/infra/emf/org.eclipse.papyrus.infra.ui.emf.tests/src/org/eclipse/papyrus/infra/ui/emf/tests/AllTests.java b/tests/junit/plugins/infra/emf/org.eclipse.papyrus.infra.ui.emf.tests/src/org/eclipse/papyrus/infra/ui/emf/tests/AllTests.java new file mode 100644 index 00000000000..77fc856002d --- /dev/null +++ b/tests/junit/plugins/infra/emf/org.eclipse.papyrus.infra.ui.emf.tests/src/org/eclipse/papyrus/infra/ui/emf/tests/AllTests.java @@ -0,0 +1,31 @@ +/***************************************************************************** + * Copyright (c) 2014, 2016 CEA, Christian W. Damus, and others. + * + * 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 + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Christian W. Damus (CEA) - Initial API and implementation + * Christian W. Damus - bug 485220 + * + *****************************************************************************/ +package org.eclipse.papyrus.infra.ui.emf.tests; + +import org.eclipse.papyrus.infra.ui.internal.emf.readonly.handlers.ReferencedModelReadOnlyHandlerTest; +import org.eclipse.papyrus.junit.framework.classification.ClassificationSuite; +import org.junit.runner.RunWith; +import org.junit.runners.Suite.SuiteClasses; + + +/** + * Master test suite. + */ +@RunWith(ClassificationSuite.class) +@SuiteClasses({ + ReferencedModelReadOnlyHandlerTest.class, +}) +public class AllTests { + +} diff --git a/tests/junit/plugins/infra/emf/org.eclipse.papyrus.infra.emf.readonly.tests/src/org/eclipse/papyrus/infra/emf/readonly/ReferencedModelReadOnlyHandlerTest.java b/tests/junit/plugins/infra/emf/org.eclipse.papyrus.infra.ui.emf.tests/src/org/eclipse/papyrus/infra/ui/internal/emf/readonly/handlers/ReferencedModelReadOnlyHandlerTest.java index f7c6f520814..8108ce73fdb 100644 --- a/tests/junit/plugins/infra/emf/org.eclipse.papyrus.infra.emf.readonly.tests/src/org/eclipse/papyrus/infra/emf/readonly/ReferencedModelReadOnlyHandlerTest.java +++ b/tests/junit/plugins/infra/emf/org.eclipse.papyrus.infra.ui.emf.tests/src/org/eclipse/papyrus/infra/ui/internal/emf/readonly/handlers/ReferencedModelReadOnlyHandlerTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2015 CEA, Christian W. Damus, and others. + * Copyright (c) 2014, 2016 CEA, Christian W. Damus, and others. * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 @@ -8,10 +8,10 @@ * * Contributors: * Christian W. Damus (CEA) - Initial API and implementation - * Christian W. Damus - bug 463631 + * Christian W. Damus - bugs 463631, 485220 * */ -package org.eclipse.papyrus.infra.emf.readonly; +package org.eclipse.papyrus.infra.ui.internal.emf.readonly.handlers; import static org.eclipse.papyrus.infra.core.resource.ReadOnlyAxis.discretionAxes; import static org.hamcrest.CoreMatchers.is; @@ -47,6 +47,7 @@ import org.eclipse.papyrus.infra.core.services.ServiceDescriptor; import org.eclipse.papyrus.infra.core.services.ServiceDescriptor.ServiceTypeKind; import org.eclipse.papyrus.infra.core.services.ServiceStartKind; import org.eclipse.papyrus.infra.core.services.ServicesRegistry; +import org.eclipse.papyrus.infra.emf.readonly.internal.ControlledResourceTracker; import org.eclipse.papyrus.infra.services.controlmode.ControlModeManager; import org.eclipse.papyrus.infra.services.controlmode.ControlModeRequest; import org.eclipse.papyrus.junit.framework.classification.tests.AbstractPapyrusTest; @@ -269,7 +270,7 @@ public class ReferencedModelReadOnlyHandlerTest extends AbstractPapyrusTest { } void importModel(ModelSet rset, String name) throws Exception { - URI source = URI.createPlatformPluginURI("org.eclipse.papyrus.infra.emf.readonly.tests/resources/" + name, true); + URI source = URI.createPlatformPluginURI("org.eclipse.papyrus.infra.ui.emf.tests/resources/" + name, true); URI destination = URI.createPlatformResourceURI(project.getName(), true); for (String component : ImmutableList.of("uml", "notation", "di")) { diff --git a/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.labelprovider.tests/META-INF/MANIFEST.MF b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.labelprovider.tests/META-INF/MANIFEST.MF index 51ad7f7a9e7..eb05408b73d 100644 --- a/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.labelprovider.tests/META-INF/MANIFEST.MF +++ b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.labelprovider.tests/META-INF/MANIFEST.MF @@ -12,7 +12,8 @@ Require-Bundle: org.eclipse.ui, org.junit;bundle-version="4.10.0",
org.eclipse.papyrus.emf.facet.custom.ui;bundle-version="1.2.0",
org.eclipse.papyrus.emf.facet.custom.core;bundle-version="1.2.0",
- org.eclipse.papyrus.junit.framework;bundle-version="1.2.0"
+ org.eclipse.papyrus.junit.framework;bundle-version="1.2.0",
+ org.eclipse.papyrus.infra.ui.emf;bundle-version="1.2.0"
Export-Package: org.eclipse.papyrus.infra.services.labelprovider.tests
Bundle-Vendor: Eclipse Modeling Project
Bundle-ActivationPolicy: lazy
diff --git a/tests/junit/plugins/uml/tools/org.eclipse.papyrus.uml.tools.tests/META-INF/MANIFEST.MF b/tests/junit/plugins/uml/tools/org.eclipse.papyrus.uml.tools.tests/META-INF/MANIFEST.MF index 27904e51979..a6bc47fd03e 100644 --- a/tests/junit/plugins/uml/tools/org.eclipse.papyrus.uml.tools.tests/META-INF/MANIFEST.MF +++ b/tests/junit/plugins/uml/tools/org.eclipse.papyrus.uml.tools.tests/META-INF/MANIFEST.MF @@ -17,7 +17,8 @@ Require-Bundle: org.eclipse.ui, org.eclipse.papyrus.sysml;bundle-version="1.2.0",
com.google.guava;bundle-version="11.0.0",
org.eclipse.papyrus.uml.tools.utils;bundle-version="1.2.0",
- org.eclipse.jface.text;bundle-version="3.10.0"
+ org.eclipse.jface.text;bundle-version="3.10.0",
+ org.eclipse.papyrus.infra.ui.emf;bundle-version="1.2.0"
Export-Package: org.eclipse.papyrus.uml.tools.tests,
org.eclipse.papyrus.uml.tools.tests.tests
Bundle-Vendor: Eclipse Modeling Project
diff --git a/tests/junit/plugins/uml/tools/org.eclipse.papyrus.uml.tools.tests/src/org/eclipse/papyrus/uml/tools/tests/tests/ContentProviderTest.java b/tests/junit/plugins/uml/tools/org.eclipse.papyrus.uml.tools.tests/src/org/eclipse/papyrus/uml/tools/tests/tests/ContentProviderTest.java index 18de8ad4b9e..8d48f309ea2 100644 --- a/tests/junit/plugins/uml/tools/org.eclipse.papyrus.uml.tools.tests/src/org/eclipse/papyrus/uml/tools/tests/tests/ContentProviderTest.java +++ b/tests/junit/plugins/uml/tools/org.eclipse.papyrus.uml.tools.tests/src/org/eclipse/papyrus/uml/tools/tests/tests/ContentProviderTest.java @@ -27,9 +27,9 @@ import org.eclipse.emf.ecore.EObject; import org.eclipse.emf.ecore.EPackage;
import org.eclipse.emf.ecore.EReference;
import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.papyrus.infra.emf.providers.EMFContentProvider;
-import org.eclipse.papyrus.infra.emf.providers.strategy.SemanticEMFContentProvider;
import org.eclipse.papyrus.infra.emf.utils.EMFHelper;
+import org.eclipse.papyrus.infra.ui.emf.providers.EMFContentProvider;
+import org.eclipse.papyrus.infra.ui.emf.providers.strategy.SemanticEMFContentProvider;
import org.eclipse.papyrus.infra.widgets.providers.IAdaptableContentProvider;
import org.eclipse.papyrus.infra.widgets.providers.IHierarchicContentProvider;
import org.eclipse.papyrus.junit.framework.classification.tests.AbstractPapyrusTest;
|