Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/infra/gmfdiag')
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/AbstractPapyrusGmfCreateDiagramCommandHandler.java6
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/DiagramsUtil.java27
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/GmfEditorFactory.java8
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/GmfMultiDiagramDocumentProvider.java247
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/ModelManagerEditor.java31
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/SynchronizableGmfDiagramEditor.java4
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/UMLDiagramEditorUtil.java6
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/advice/GMFDiagramDuplicateEditHelperAdvice.java2
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/editpolicies/DefaultSemanticEditPolicy.java2
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/expansion/ChildrenListRepresentation.java7
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/expansion/ExpandEditPartProvider.java8
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/expansion/ExpandViewProvider.java4
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/expansionmodel/CustomExpansionmodelResourceFactory.java2
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/expansionmodel/CustomRepresentationKindImpl.java1
-rwxr-xr-xplugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/providers/StyleBasedShapeProvider.java4
15 files changed, 63 insertions, 296 deletions
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/AbstractPapyrusGmfCreateDiagramCommandHandler.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/AbstractPapyrusGmfCreateDiagramCommandHandler.java
index 2f8ee3dff13..d71196c25ae 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/AbstractPapyrusGmfCreateDiagramCommandHandler.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/AbstractPapyrusGmfCreateDiagramCommandHandler.java
@@ -48,7 +48,7 @@ import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.jface.dialogs.InputDialog;
import org.eclipse.jface.window.Window;
-import org.eclipse.papyrus.commands.CheckedOperationHistory;
+import org.eclipse.papyrus.infra.emf.gmf.command.CheckedOperationHistory;
import org.eclipse.papyrus.commands.ICreationCommand;
import org.eclipse.papyrus.commands.OpenDiagramCommand;
import org.eclipse.papyrus.infra.core.language.ILanguageService;
@@ -127,7 +127,7 @@ public abstract class AbstractPapyrusGmfCreateDiagramCommandHandler extends Abst
private CommandResult createDiagram() throws ServiceException {
Resource notationResource = getNotationResource(modelSet, owner, element);
if (notationResource == null) {
- return CommandResult.newErrorCommandResult("Cannot create a diagram on the selected element (ReadOnly?)");
+ return CommandResult.newErrorCommandResult("Cannot create a diagram on the selected element (ReadOnly?)"); //$NON-NLS-1$
}
Resource diResource = DiModelUtils.getDiResource(modelSet);
@@ -452,7 +452,7 @@ public abstract class AbstractPapyrusGmfCreateDiagramCommandHandler extends Abst
} catch (ServiceException e) {
Activator.log.error(e);
}
- return CommandResult.newErrorCommandResult("Error during diagram creation");
+ return CommandResult.newErrorCommandResult("Error during diagram creation"); //$NON-NLS-1$
}
@Override
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/DiagramsUtil.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/DiagramsUtil.java
deleted file mode 100644
index 4b761d09c9d..00000000000
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/DiagramsUtil.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 Atos Origin.
- *
- *
- * 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:
- * Mathieu Velten (Atos Origin) mathieu.velten@atosorigin.com - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.infra.gmfdiag.common;
-
-import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
-
-/**
- * Use the standard utils {@link DiagramUtils}
- *
- */
-@Deprecated
-// use DiagramUtils
-public class DiagramsUtil extends DiagramUtils {
-
-
-}
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/GmfEditorFactory.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/GmfEditorFactory.java
index 7092088acc3..981b65a5f10 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/GmfEditorFactory.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/GmfEditorFactory.java
@@ -170,22 +170,18 @@ public class GmfEditorFactory extends AbstractEditorFactory {
// Try to get it.
// Get ServiceRegistry
- // ServicesRegistry serviceRegistry = getServicesRegistry();
ActionBarContributorRegistry registry;
try {
registry = servicesRegistry.getService(ActionBarContributorRegistry.class);
} catch (ServiceException e) {
- // Service not found
- // TODO Log the error
- e.printStackTrace();
+ Activator.log.error(e);
return null;
}
try {
return registry.getActionBarContributor(actionBarId);
} catch (BackboneException e) {
- // TODO Log the error and throw an exception instead
- e.printStackTrace();
+ Activator.log.error(e);
return null;
}
}
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/GmfMultiDiagramDocumentProvider.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/GmfMultiDiagramDocumentProvider.java
index a094056d08a..1b7ec6592b1 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/GmfMultiDiagramDocumentProvider.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/GmfMultiDiagramDocumentProvider.java
@@ -71,9 +71,6 @@ import org.eclipse.swt.widgets.Display;
import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.part.FileEditorInput;
-/**
- * @generated
- */
public class GmfMultiDiagramDocumentProvider extends AbstractDocumentProvider implements IDiagramDocumentProvider,
IEditingDomainProvider {
@@ -110,12 +107,8 @@ public class GmfMultiDiagramDocumentProvider extends AbstractDocumentProvider im
* Constructor.
*/
public GmfMultiDiagramDocumentProvider() {
- // TODO Auto-generated constructor stub
}
- /**
- * @generated
- */
@Override
protected ElementInfo createElementInfo(Object element) throws CoreException {
if (false == element instanceof FileEditorInput && false == element instanceof URIEditorInput) {
@@ -132,9 +125,6 @@ public class GmfMultiDiagramDocumentProvider extends AbstractDocumentProvider im
return info;
}
- /**
- * @generated
- */
@Override
protected IDocument createDocument(Object element) throws CoreException {
if (false == element instanceof FileEditorInput && false == element instanceof URIEditorInput) {
@@ -156,15 +146,11 @@ public class GmfMultiDiagramDocumentProvider extends AbstractDocumentProvider im
* the blue-print element
* @param document
* the document to set up
- * @generated
*/
protected void setupDocument(Object element, IDocument document) {
// for subclasses
}
- /**
- * @generated
- */
private long computeModificationStamp(ResourceSetInfo info) {
int result = 0;
for (Iterator<Resource> it = info.getResourceSet().getResources().iterator(); it.hasNext();) {
@@ -208,9 +194,6 @@ public class GmfMultiDiagramDocumentProvider extends AbstractDocumentProvider im
}
}
- /**
- * @generated
- */
@Override
protected IDocument createEmptyDocument() {
DiagramDocument document = new DiagramDocument();
@@ -223,9 +206,7 @@ public class GmfMultiDiagramDocumentProvider extends AbstractDocumentProvider im
* first creation will record the ResourceSet, other creation will use it.
*/
private TransactionalEditingDomain createEditingDomain() {
-
TransactionalEditingDomain editingDomain = null;
- // System.out.println(this.getClass().getSimpleName() + "- (" + this + ")");
// Check if edit domain exist
if (sharedEditingDomain != null) { // Already initialized
editingDomain = sharedEditingDomain;
@@ -305,9 +286,7 @@ public class GmfMultiDiagramDocumentProvider extends AbstractDocumentProvider im
});
}
- /**
- * @generated
- */
+
protected void setDocumentContent(IDocument document, IEditorInput element) throws CoreException {
IDiagramDocument diagramDocument = (IDiagramDocument) document;
TransactionalEditingDomain domain = diagramDocument.getEditingDomain();
@@ -369,9 +348,6 @@ public class GmfMultiDiagramDocumentProvider extends AbstractDocumentProvider im
}
}
- /**
- * @generated
- */
@Override
public long getModificationStamp(Object element) {
ResourceSetInfo info = getResourceSetInfo(element);
@@ -381,9 +357,6 @@ public class GmfMultiDiagramDocumentProvider extends AbstractDocumentProvider im
return super.getModificationStamp(element);
}
- /**
- * @generated
- */
@Override
public boolean isDeleted(Object element) {
IDiagramDocument document = getDiagramDocument(element);
@@ -397,16 +370,10 @@ public class GmfMultiDiagramDocumentProvider extends AbstractDocumentProvider im
return super.isDeleted(element);
}
- /**
- * @generated
- */
public ResourceSetInfo getResourceSetInfo(Object editorInput) {
return (ResourceSetInfo) super.getElementInfo(editorInput);
}
- /**
- * @generated
- */
@Override
protected void disposeElementInfo(Object element, ElementInfo info) {
if (info instanceof ResourceSetInfo) {
@@ -416,9 +383,7 @@ public class GmfMultiDiagramDocumentProvider extends AbstractDocumentProvider im
super.disposeElementInfo(element, info);
}
- /**
- * @generated
- */
+
@Override
protected void doValidateState(Object element, Object computationContext) throws CoreException {
ResourceSetInfo info = getResourceSetInfo(element);
@@ -438,9 +403,7 @@ public class GmfMultiDiagramDocumentProvider extends AbstractDocumentProvider im
super.doValidateState(element, computationContext);
}
- /**
- * @generated
- */
+
@Override
public boolean isReadOnly(Object element) {
ResourceSetInfo info = getResourceSetInfo(element);
@@ -459,9 +422,7 @@ public class GmfMultiDiagramDocumentProvider extends AbstractDocumentProvider im
return super.isReadOnly(element);
}
- /**
- * @generated
- */
+
@Override
public boolean isModifiable(Object element) {
if (!isStateValidated(element)) {
@@ -485,9 +446,6 @@ public class GmfMultiDiagramDocumentProvider extends AbstractDocumentProvider im
return super.isModifiable(element);
}
- /**
- * @generated
- */
protected void updateCache(Object element) throws CoreException {
ResourceSetInfo info = getResourceSetInfo(element);
if (info != null) {
@@ -506,9 +464,7 @@ public class GmfMultiDiagramDocumentProvider extends AbstractDocumentProvider im
}
}
- /**
- * @generated
- */
+
@Override
protected void doUpdateStateCache(Object element) throws CoreException {
ResourceSetInfo info = getResourceSetInfo(element);
@@ -518,9 +474,7 @@ public class GmfMultiDiagramDocumentProvider extends AbstractDocumentProvider im
super.doUpdateStateCache(element);
}
- /**
- * @generated
- */
+
@Override
public boolean isSynchronized(Object element) {
ResourceSetInfo info = getResourceSetInfo(element);
@@ -530,9 +484,7 @@ public class GmfMultiDiagramDocumentProvider extends AbstractDocumentProvider im
return super.isSynchronized(element);
}
- /**
- * @generated
- */
+
@Override
protected ISchedulingRule getResetRule(Object element) {
ResourceSetInfo info = getResourceSetInfo(element);
@@ -550,9 +502,7 @@ public class GmfMultiDiagramDocumentProvider extends AbstractDocumentProvider im
return null;
}
- /**
- * @generated
- */
+
@Override
protected ISchedulingRule getSaveRule(Object element) {
ResourceSetInfo info = getResourceSetInfo(element);
@@ -570,9 +520,7 @@ public class GmfMultiDiagramDocumentProvider extends AbstractDocumentProvider im
return null;
}
- /**
- * @generated
- */
+
@Override
protected ISchedulingRule getSynchronizeRule(Object element) {
ResourceSetInfo info = getResourceSetInfo(element);
@@ -590,9 +538,7 @@ public class GmfMultiDiagramDocumentProvider extends AbstractDocumentProvider im
return null;
}
- /**
- * @generated
- */
+
@Override
protected ISchedulingRule getValidateStateRule(Object element) {
ResourceSetInfo info = getResourceSetInfo(element);
@@ -611,9 +557,7 @@ public class GmfMultiDiagramDocumentProvider extends AbstractDocumentProvider im
return null;
}
- /**
- * @generated
- */
+
private ISchedulingRule computeSchedulingRule(IResource toCreateOrModify) {
if (toCreateOrModify.exists()) {
return ResourcesPlugin.getWorkspace().getRuleFactory().modifyRule(toCreateOrModify);
@@ -632,9 +576,7 @@ public class GmfMultiDiagramDocumentProvider extends AbstractDocumentProvider im
return ResourcesPlugin.getWorkspace().getRuleFactory().createRule(toCreateOrModify);
}
- /**
- * @generated
- */
+
@Override
protected void doSynchronize(Object element, IProgressMonitor monitor) throws CoreException {
ResourceSetInfo info = getResourceSetInfo(element);
@@ -648,9 +590,7 @@ public class GmfMultiDiagramDocumentProvider extends AbstractDocumentProvider im
super.doSynchronize(element, monitor);
}
- /**
- * @generated
- */
+
@Override
protected void doSaveDocument(IProgressMonitor monitor, Object element, IDocument document, boolean overwrite)
throws CoreException {
@@ -739,9 +679,7 @@ public class GmfMultiDiagramDocumentProvider extends AbstractDocumentProvider im
}
}
- /**
- * @generated
- */
+
protected void handleElementChanged(ResourceSetInfo info, Resource changedResource, IProgressMonitor monitor) {
IFile file = WorkspaceSynchronizer.getFile(changedResource);
if (file != null) {
@@ -771,9 +709,6 @@ public class GmfMultiDiagramDocumentProvider extends AbstractDocumentProvider im
fireElementContentReplaced(info.getEditorInput());
}
- /**
- * @generated
- */
protected void handleElementMoved(IEditorInput input, URI uri) {
if (input instanceof FileEditorInput) {
IFile newFile = ResourcesPlugin.getWorkspace().getRoot().getFile(
@@ -785,17 +720,13 @@ public class GmfMultiDiagramDocumentProvider extends AbstractDocumentProvider im
fireElementMoved(input, new URIEditorInput(uri));
}
- /**
- * @generated
- */
+
@Override
public IEditorInput createInputWithEditingDomain(IEditorInput editorInput, TransactionalEditingDomain domain) {
return editorInput;
}
- /**
- * @generated
- */
+
@Override
public IDiagramDocument getDiagramDocument(Object element) {
IDocument doc = getDocument(element);
@@ -805,67 +736,42 @@ public class GmfMultiDiagramDocumentProvider extends AbstractDocumentProvider im
return null;
}
- /**
- * @generated
- */
+
@Override
protected IRunnableContext getOperationRunner(IProgressMonitor monitor) {
return null;
}
- /**
- * @generated
- */
+
protected class ResourceSetInfo extends ElementInfo {
- /**
- * @generated
- */
+
private long myModificationStamp = IResource.NULL_STAMP;
- /**
- * @generated
- */
+
private WorkspaceSynchronizer mySynchronizer;
- /**
- * @generated
- */
+
private Collection myUnSynchronizedResources = new ArrayList();
- /**
- * @generated
- */
+
private IDiagramDocument myDocument;
- /**
- * @generated
- */
+
private IEditorInput myEditorInput;
- /**
- * @generated
- */
+
private boolean myUpdateCache = true;
- /**
- * @generated
- */
+
private boolean myModifiable = false;
- /**
- * @generated
- */
+
private boolean myReadOnly = true;
- /**
- * @generated
- */
+
private ResourceSetModificationListener myResourceSetListener;
- /**
- * @generated not
- */
public ResourceSetInfo(IDiagramDocument document, IEditorInput editorInput) {
super(document);
myDocument = document;
@@ -884,44 +790,26 @@ public class GmfMultiDiagramDocumentProvider extends AbstractDocumentProvider im
myResourceSetListener.addResourceSet(this);
}
- /**
- * @generated
- */
public long getModificationStamp() {
return myModificationStamp;
}
- /**
- * @generated
- */
public void setModificationStamp(long modificationStamp) {
myModificationStamp = modificationStamp;
}
- /**
- * @generated
- */
public TransactionalEditingDomain getEditingDomain() {
return myDocument.getEditingDomain();
}
- /**
- * @generated
- */
public ResourceSet getResourceSet() {
return getEditingDomain().getResourceSet();
}
- /**
- * @generated
- */
public IEditorInput getEditorInput() {
return myEditorInput;
}
- /**
- * @generated
- */
public void dispose() {
stopResourceListening();
myResourceSetListener.removeResourceSet(this);
@@ -937,101 +825,72 @@ public class GmfMultiDiagramDocumentProvider extends AbstractDocumentProvider im
// }
}
- /**
- * @generated
- */
+
public boolean isSynchronized() {
- return myUnSynchronizedResources.size() == 0;
+ return myUnSynchronizedResources.isEmpty();
}
- /**
- * @generated
- */
+
public void setUnSynchronized(Resource resource) {
myUnSynchronizedResources.add(resource);
}
- /**
- * @generated
- */
+
public void setSynchronized(Resource resource) {
myUnSynchronizedResources.remove(resource);
}
- /**
- * @generated
- */
+
public final void stopResourceListening() {
// mySynchronizer.dispose();
mySynchronizer = null;
}
- /**
- * @generated
- */
+
public final void startResourceListening() {
// Do not listen because all document use the same EditingDomain
// mySynchronizer = new WorkspaceSynchronizer(getEditingDomain(), new
// SynchronizerDelegate());
}
- /**
- * @generated
- */
public boolean isUpdateCache() {
return myUpdateCache;
}
- /**
- * @generated
- */
+
public void setUpdateCache(boolean update) {
myUpdateCache = update;
}
- /**
- * @generated
- */
+
public boolean isModifiable() {
return myModifiable;
}
- /**
- * @generated
- */
+
public void setModifiable(boolean modifiable) {
myModifiable = modifiable;
}
- /**
- * @generated
- */
+
public boolean isReadOnly() {
return myReadOnly;
}
- /**
- * @generated
- */
+
public void setReadOnly(boolean readOnly) {
myReadOnly = readOnly;
}
- /**
- * @generated
- */
+
private class SynchronizerDelegate implements WorkspaceSynchronizer.Delegate {
- /**
- * @generated
- */
+
@Override
public void dispose() {
}
- /**
- * @generated
- */
+
@Override
public boolean handleResourceChanged(final Resource resource) {
synchronized (ResourceSetInfo.this) {
@@ -1050,9 +909,7 @@ public class GmfMultiDiagramDocumentProvider extends AbstractDocumentProvider im
return true;
}
- /**
- * @generated
- */
+
@Override
public boolean handleResourceDeleted(Resource resource) {
synchronized (ResourceSetInfo.this) {
@@ -1071,9 +928,6 @@ public class GmfMultiDiagramDocumentProvider extends AbstractDocumentProvider im
return true;
}
- /**
- * @generated
- */
@Override
public boolean handleResourceMoved(Resource resource, final URI newURI) {
synchronized (ResourceSetInfo.this) {
@@ -1100,24 +954,13 @@ public class GmfMultiDiagramDocumentProvider extends AbstractDocumentProvider im
}
- /**
- * @generated not
- */
+
private class ResourceSetModificationListener extends EContentAdapter {
- /**
- * @generated
- */
private NotificationFilter myModifiedFilter;
- /**
- * @generated not
- */
private List<ResourceSetInfo> myInfos;
- /**
- * @generated not
- */
public ResourceSetModificationListener() {
myInfos = new ArrayList<GmfMultiDiagramDocumentProvider.ResourceSetInfo>();
myModifiedFilter = NotificationFilter.createEventTypeFilter(Notification.SET).or(
@@ -1137,9 +980,7 @@ public class GmfMultiDiagramDocumentProvider extends AbstractDocumentProvider im
return myInfos.isEmpty();
}
- /**
- * @generated
- */
+
@Override
public void notifyChanged(Notification notification) {
if (notification.getNotifier() instanceof ResourceSet) {
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/ModelManagerEditor.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/ModelManagerEditor.java
index 00e268ff2c5..22e5339d57a 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/ModelManagerEditor.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/ModelManagerEditor.java
@@ -105,7 +105,6 @@ public class ModelManagerEditor {
@Override
public boolean isAdapterForType(Object type) {
- // TODO Auto-generated method stub
return false;
}
@@ -322,16 +321,7 @@ public class ModelManagerEditor {
protected void updateState(IEditorInput input) {
IDocumentProvider provider = getDocumentProvider();
try {
-
provider.updateStateCache(input);
-
- // if (getDiagramEditPart() != null) {
- // if(isEditable())
- // getDiagramEditPart().enableEditMode();
- // else
- // getDiagramEditPart().disableEditMode();
- // }
-
} catch (CoreException x) {
Bundle bundle = Platform.getBundle(PlatformUI.PLUGIN_ID);
ILog log = Platform.getLog(bundle);
@@ -370,25 +360,12 @@ public class ModelManagerEditor {
return;
}
- // if (getDiagramEditPart() != null) {
- // if(isEditable())
- // getDiagramEditPart().enableEditMode();
- // else
- // getDiagramEditPart().disableEditMode();
- // }
-
}
- /**
- * @generated
- */
public boolean isSaveAsAllowed() {
return true;
}
- /**
- * @generated
- */
public void doSaveAs() {
performSaveAs(new NullProgressMonitor());
}
@@ -410,11 +387,9 @@ public class ModelManagerEditor {
}
try {
-
provider.aboutToChange(getEditorInput());
IEditorInput input = getEditorInput();
provider.saveDocument(progressMonitor, input, getDocumentProvider().getDocument(input), overwrite);
- // editorSaved();
} catch (CoreException x) {
IStatus status = x.getStatus();
@@ -426,9 +401,7 @@ public class ModelManagerEditor {
}
}
- /**
- * @generated
- */
+
protected void performSaveAs(IProgressMonitor progressMonitor) {
Shell shell = getSite().getShell();
IEditorInput input = getEditorInput();
@@ -478,8 +451,6 @@ public class ModelManagerEditor {
boolean success = false;
try {
provider.aboutToChange(newInput);
- // getDocumentProvider(newInput).saveDocument(progressMonitor, newInput,
- // getDocumentProvider().getDocument(getEditorInput()), true);
getDocumentProvider().saveDocument(progressMonitor, newInput,
getDocumentProvider().getDocument(getEditorInput()), true);
success = true;
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/SynchronizableGmfDiagramEditor.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/SynchronizableGmfDiagramEditor.java
index 176ad25d14e..329250158c6 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/SynchronizableGmfDiagramEditor.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/SynchronizableGmfDiagramEditor.java
@@ -131,8 +131,8 @@ public class SynchronizableGmfDiagramEditor extends DiagramDocumentEditor implem
// look amidst all edit part if the semantic is contained in the list
Iterator<?> iter = graphicalViewer.getEditPartRegistry().values().iterator();
IGraphicalEditPart researchedEditPart = null;
- List<?> clonedList = new ArrayList<Object>(elementList);
- List<IGraphicalEditPart> partSelection = new ArrayList<IGraphicalEditPart>();
+ List<?> clonedList = new ArrayList<>(elementList);
+ List<IGraphicalEditPart> partSelection = new ArrayList<>();
while (iter.hasNext() && !clonedList.isEmpty()) {
Object currentEditPart = iter.next();
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/UMLDiagramEditorUtil.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/UMLDiagramEditorUtil.java
index cfa022f7126..9ba8c7e52d3 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/UMLDiagramEditorUtil.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/UMLDiagramEditorUtil.java
@@ -19,14 +19,8 @@ import java.util.Map;
import org.eclipse.emf.ecore.resource.Resource;
import org.eclipse.emf.ecore.xmi.XMLResource;
-/**
- * @generated
- */
public class UMLDiagramEditorUtil {
- /**
- * @generated
- */
public static Map getSaveOptions() {
Map saveOptions = new HashMap();
saveOptions.put(XMLResource.OPTION_ENCODING, "UTF-8"); //$NON-NLS-1$
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/advice/GMFDiagramDuplicateEditHelperAdvice.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/advice/GMFDiagramDuplicateEditHelperAdvice.java
index 6729c041641..0f587549147 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/advice/GMFDiagramDuplicateEditHelperAdvice.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/advice/GMFDiagramDuplicateEditHelperAdvice.java
@@ -133,7 +133,7 @@ public class GMFDiagramDuplicateEditHelperAdvice extends AbstractEditHelperAdvic
}
Object elementToBeDuplicated = elementsToBeDuplicated.get(0);
if (elementToBeDuplicated instanceof EObject) {
- return ((EObject) elementToBeDuplicated);
+ return (EObject) elementToBeDuplicated;
}
return null;
}
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/editpolicies/DefaultSemanticEditPolicy.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/editpolicies/DefaultSemanticEditPolicy.java
index 251d9bfff56..8140da0a824 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/editpolicies/DefaultSemanticEditPolicy.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/editpolicies/DefaultSemanticEditPolicy.java
@@ -58,7 +58,6 @@ public class DefaultSemanticEditPolicy extends SemanticEditPolicy {
* It is done in those cases when it's not possible to deduce diagram
* element kind from domain element.
*
- * @generated
*/
@Override
@SuppressWarnings("unchecked")
@@ -223,7 +222,6 @@ public class DefaultSemanticEditPolicy extends SemanticEditPolicy {
/**
* Returns editing domain from the host edit part.
*
- * @generated
*/
protected TransactionalEditingDomain getEditingDomain() {
return ((IGraphicalEditPart) getHost()).getEditingDomain();
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/expansion/ChildrenListRepresentation.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/expansion/ChildrenListRepresentation.java
index 4bf33b00804..6c20cc6bf91 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/expansion/ChildrenListRepresentation.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/expansion/ChildrenListRepresentation.java
@@ -17,7 +17,6 @@ import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
-import org.eclipse.emf.ecore.EObject;
import org.eclipse.gmf.runtime.emf.type.core.ElementTypeRegistry;
import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.IHintedType;
@@ -67,7 +66,7 @@ public class ChildrenListRepresentation {
idListToAdd.add(hint);
if( IDMap.get(hint)==null){
IDMap.put(hint, representation);
- ArrayList<String> subRepresentationIDs= new ArrayList<String>();
+ ArrayList<String> subRepresentationIDs= new ArrayList<>();
//compartments
for (InducedRepresentation compartments : ((Representation)representation).getInducedRepresentations()) {
createStructure(compartments, subRepresentationIDs);
@@ -98,8 +97,8 @@ public class ChildrenListRepresentation {
protected void initStructure(){
- //init the structure by go accross the the model.
- ArrayList<String> childreen= new ArrayList<String>();
+ //init the structure by go across the the model.
+ ArrayList<String> childreen= new ArrayList<>();
for ( org.eclipse.papyrus.infra.gmfdiag.common.expansionmodel.Representation currentR : useContext.getRepresentations()) {
//Check shapes
createStructure(currentR, childreen);
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/expansion/ExpandEditPartProvider.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/expansion/ExpandEditPartProvider.java
index 07cf7f2ce67..b192964b185 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/expansion/ExpandEditPartProvider.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/expansion/ExpandEditPartProvider.java
@@ -98,7 +98,7 @@ public class ExpandEditPartProvider extends AbstractEditPartProvider {
}
String graphicalType = newView.getType();
- Activator.log.trace(Activator.EXPANSION_TRACE,""+this.getClass().getName()+" view appears with the type "+graphicalType);
+ Activator.log.trace(Activator.EXPANSION_TRACE,this.getClass().getName()+" view appears with the type "+graphicalType); //$NON-NLS-1$
if(diagramExpansionRegistry.mapChildreen.get(currentDiagramType).IDMap.get(graphicalType)!=null){
return true;
@@ -124,7 +124,7 @@ public class ExpandEditPartProvider extends AbstractEditPartProvider {
String graphicalType = view.getType();
- Activator.log.trace(Activator.EXPANSION_TRACE,""+ this.getClass().getName()+" view appears with the type "+graphicalType);
+ Activator.log.trace(Activator.EXPANSION_TRACE,this.getClass().getName()+" view appears with the type "+graphicalType);//$NON-NLS-1$
EObject eObject= diagramExpansionRegistry.mapChildreen.get(currentDiagramType).IDMap.get(graphicalType);
Class editpartClass=null;
String editpartQualifiedName=null;
@@ -145,9 +145,9 @@ public class ExpandEditPartProvider extends AbstractEditPartProvider {
}
IGraphicalEditPart graphicEditPart = createNewGraphicEditPart(editpartClass, new Object[] {view});
if( graphicEditPart==null){
- String errorMessage= "The model expand does not reference an edit part for the element "+graphicalType;
+ String errorMessage= "The model expand does not reference an edit part for the element "+graphicalType; //$NON-NLS-1$
if( editpartQualifiedName!=null){
- errorMessage= "The editpart provide does not succed to find "+editpartQualifiedName+" class for the element "+graphicalType;
+ errorMessage= "The editpart provide does not succed to find "+editpartQualifiedName+" class for the element "+graphicalType;//$NON-NLS-1$ //$NON-NLS-2$
}
org.eclipse.papyrus.infra.gmfdiag.common.Activator.log.error(errorMessage, new NullPointerException(errorMessage));
}
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/expansion/ExpandViewProvider.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/expansion/ExpandViewProvider.java
index 819bb45b535..c435632896d 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/expansion/ExpandViewProvider.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/expansion/ExpandViewProvider.java
@@ -16,7 +16,6 @@ import java.util.List;
import java.util.Map;
import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.Platform;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.gmf.runtime.diagram.core.providers.IViewProvider;
import org.eclipse.gmf.runtime.diagram.core.services.view.CreateChildViewOperation;
@@ -27,7 +26,6 @@ import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.papyrus.infra.gmfdiag.common.Activator;
import org.eclipse.papyrus.infra.gmfdiag.common.expansionmodel.AbstractRepresentation;
-import org.eclipse.papyrus.infra.gmfdiag.common.expansionmodel.Representation;
import org.eclipse.papyrus.infra.gmfdiag.common.expansionmodel.RepresentationKind;
import org.eclipse.papyrus.infra.gmfdiag.common.providers.CustomAbstractViewProvider;
import org.eclipse.papyrus.infra.tools.util.ClassLoaderHelper;
@@ -105,7 +103,7 @@ public class ExpandViewProvider extends CustomAbstractViewProvider implements IV
else{
containerType = operation.getContainerView().getType();
}
- Activator.log.trace(Activator.EXPANSION_TRACE,this.getClass().getName()+" try to create view in the container "+containerType+ " the view "+ operation.getSemanticHint());
+ Activator.log.trace(Activator.EXPANSION_TRACE,this.getClass().getName()+" try to create view in the container "+containerType+ " the view "+ operation.getSemanticHint()); //$NON-NLS-1$ //$NON-NLS-2$
//get the list of childreen Id from a parent ID
List<String> possibleChildreenIDs=diagramExpansionRegistry.mapChildreen.get(currentDiagramType).parentChildrenRelation.get(containerType);
if(possibleChildreenIDs==null){
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/expansionmodel/CustomExpansionmodelResourceFactory.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/expansionmodel/CustomExpansionmodelResourceFactory.java
index f86bebde516..0e3f127b8e1 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/expansionmodel/CustomExpansionmodelResourceFactory.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/expansionmodel/CustomExpansionmodelResourceFactory.java
@@ -25,7 +25,6 @@ public class CustomExpansionmodelResourceFactory extends ExpansionmodelResourceF
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
*
- * @generated
*/
public CustomExpansionmodelResourceFactory() {
super();
@@ -36,7 +35,6 @@ public class CustomExpansionmodelResourceFactory extends ExpansionmodelResourceF
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
*
- * @generated
*/
@Override
public Resource createResource(URI uri) {
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/expansionmodel/CustomRepresentationKindImpl.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/expansionmodel/CustomRepresentationKindImpl.java
index f8c6ac9c587..7b4baadf38c 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/expansionmodel/CustomRepresentationKindImpl.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/expansionmodel/CustomRepresentationKindImpl.java
@@ -18,7 +18,6 @@ import java.util.Map;
import org.eclipse.emf.common.util.DiagnosticChain;
/**
- * @author PT202707
*
*/
public class CustomRepresentationKindImpl extends org.eclipse.papyrus.infra.gmfdiag.common.expansionmodel.impl.RepresentationKindImpl {
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/providers/StyleBasedShapeProvider.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/providers/StyleBasedShapeProvider.java
index ed8fad227ee..26f2ca856d4 100755
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/providers/StyleBasedShapeProvider.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/providers/StyleBasedShapeProvider.java
@@ -79,14 +79,14 @@ public class StyleBasedShapeProvider extends AbstractShapeProvider {
}
SVGDocument svg = getSVGDocument(view, svgFile);
if (svg == null) {
- Activator.log.warn("Invalid SVG File path: " + svgFile);
+ Activator.log.warn("Invalid SVG File path: " + svgFile); //$NON-NLS-1$
return null;
}
RenderedImage img = null;
try {
img = renderSVGDocument(view, svg);
} catch (IOException e) {
- Activator.log.error("Failed to render the svg file: " + svgFile, e);
+ Activator.log.error("Failed to render the svg file: " + svgFile, e); //$NON-NLS-1$
}
listSingletonRendered.set(0, img);
return listSingletonRendered;

Back to the top