Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/UMLDocumentProvider.java')
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/UMLDocumentProvider.java19
1 files changed, 4 insertions, 15 deletions
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/UMLDocumentProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/UMLDocumentProvider.java
index cdeeb5ec7b7..87bb35c3a42 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/UMLDocumentProvider.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/UMLDocumentProvider.java
@@ -82,7 +82,6 @@ public class UMLDocumentProvider extends AbstractDocumentProvider implements IDi
}
IEditorInput editorInput = (IEditorInput)element;
IDiagramDocument document = (IDiagramDocument)createDocument(editorInput);
-
ResourceSetInfo info = new ResourceSetInfo(document, editorInput);
info.setModificationStamp(computeModificationStamp(info));
info.fStatus = null;
@@ -175,9 +174,7 @@ public class UMLDocumentProvider extends AbstractDocumentProvider implements IDi
public void setTarget(Notifier newTarget) {
myTarger = newTarget;
}
-
});
-
return editingDomain;
}
@@ -201,7 +198,8 @@ public class UMLDocumentProvider extends AbstractDocumentProvider implements IDi
}
if(!resource.isLoaded()) {
try {
- Map options = new HashMap(GMFResourceFactory.getDefaultLoadOptions());
+ @SuppressWarnings({ "rawtypes", "unchecked" })
+ Map<?, ?> options = new HashMap(GMFResourceFactory.getDefaultLoadOptions());
// @see 171060
// options.put(org.eclipse.emf.ecore.xmi.XMLResource.OPTION_RECORD_UNKNOWN_FEATURE, Boolean.TRUE);
resource.load(options);
@@ -217,7 +215,7 @@ public class UMLDocumentProvider extends AbstractDocumentProvider implements IDi
return;
}
} else {
- for(Iterator it = resource.getContents().iterator(); it.hasNext();) {
+ for(Iterator<EObject> it = resource.getContents().iterator(); it.hasNext();) {
Object rootElement = it.next();
if(rootElement instanceof Diagram) {
document.setContent((Diagram)rootElement);
@@ -302,7 +300,6 @@ public class UMLDocumentProvider extends AbstractDocumentProvider implements IDi
}
ResourcesPlugin.getWorkspace().validateEdit((IFile[])files2Validate.toArray(new IFile[files2Validate.size()]), computationContext);
}
-
super.doValidateState(element, computationContext);
}
@@ -474,7 +471,6 @@ public class UMLDocumentProvider extends AbstractDocumentProvider implements IDi
private ISchedulingRule computeSchedulingRule(IResource toCreateOrModify) {
if(toCreateOrModify.exists())
return ResourcesPlugin.getWorkspace().getRuleFactory().modifyRule(toCreateOrModify);
-
IResource parent = toCreateOrModify;
do {
/*
@@ -486,7 +482,6 @@ public class UMLDocumentProvider extends AbstractDocumentProvider implements IDi
toCreateOrModify = parent;
parent = toCreateOrModify.getParent();
} while(parent != null && !parent.exists());
-
return ResourcesPlugin.getWorkspace().getRuleFactory().createRule(toCreateOrModify);
}
@@ -594,7 +589,6 @@ public class UMLDocumentProvider extends AbstractDocumentProvider implements IDi
}
}
changedResource.unload();
-
fireElementContentAboutToBeReplaced(info.getEditorInput());
removeUnchangedElementListeners(info.getEditorInput(), info);
info.fStatus = null;
@@ -914,9 +908,7 @@ public class UMLDocumentProvider extends AbstractDocumentProvider implements IDi
}
return true;
}
-
}
-
}
/**
@@ -954,7 +946,7 @@ public class UMLDocumentProvider extends AbstractDocumentProvider implements IDi
Resource resource = (Resource)notification.getNotifier();
if(resource.isLoaded()) {
boolean modified = false;
- for(Iterator/*<org.eclipse.emf.ecore.resource.Resource>*/it = myInfo.getLoadedResourcesIterator(); it.hasNext() && !modified;) {
+ for(Iterator<Resource> it = myInfo.getLoadedResourcesIterator(); it.hasNext() && !modified;) {
Resource nextResource = (Resource)it.next();
if(nextResource.isLoaded()) {
modified = nextResource.isModified();
@@ -972,7 +964,6 @@ public class UMLDocumentProvider extends AbstractDocumentProvider implements IDi
}
if(dirtyStateChanged) {
fireElementDirtyStateChanged(myInfo.getEditorInput(), modified);
-
if(!modified) {
myInfo.setModificationStamp(computeModificationStamp(myInfo));
}
@@ -981,7 +972,5 @@ public class UMLDocumentProvider extends AbstractDocumentProvider implements IDi
}
}
}
-
}
-
}

Back to the top