Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate.editor/src/org/eclipse/papyrus')
-rw-r--r--extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate.editor/src/org/eclipse/papyrus/diagramtemplate/editor/DiagramTemplateEditor.java18
-rw-r--r--extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate.editor/src/org/eclipse/papyrus/diagramtemplate/editor/provider/DiagramDefinitionLabelProvider.java8
-rw-r--r--extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate.editor/src/org/eclipse/papyrus/diagramtemplate/editor/provider/DiagramKindContentProvider.java8
-rw-r--r--extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate.editor/src/org/eclipse/papyrus/diagramtemplate/launcher/DiagramTemplateLauncher.java38
4 files changed, 36 insertions, 36 deletions
diff --git a/extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate.editor/src/org/eclipse/papyrus/diagramtemplate/editor/DiagramTemplateEditor.java b/extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate.editor/src/org/eclipse/papyrus/diagramtemplate/editor/DiagramTemplateEditor.java
index d700f9e0b80..f614896bdf0 100644
--- a/extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate.editor/src/org/eclipse/papyrus/diagramtemplate/editor/DiagramTemplateEditor.java
+++ b/extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate.editor/src/org/eclipse/papyrus/diagramtemplate/editor/DiagramTemplateEditor.java
@@ -74,7 +74,6 @@ import org.eclipse.jface.viewers.TreeViewer;
import org.eclipse.jface.viewers.TreeViewerColumn;
import org.eclipse.jface.viewers.Viewer;
import org.eclipse.jface.viewers.ViewerFilter;
-import org.eclipse.papyrus.core.extension.commands.CreationCommandDescriptor;
import org.eclipse.papyrus.diagramtemplate.AbstractSelection;
import org.eclipse.papyrus.diagramtemplate.DiagramDefinition;
import org.eclipse.papyrus.diagramtemplate.DiagramTemplateFactory;
@@ -95,9 +94,10 @@ import org.eclipse.papyrus.diagramtemplate.editor.provider.WhatContentProvider;
import org.eclipse.papyrus.diagramtemplate.launcher.DiagramTemplateLauncher;
import org.eclipse.papyrus.diagramtemplate.provider.DiagramTemplateItemProviderAdapterFactory;
import org.eclipse.papyrus.diagramtemplate.utils.Messages;
-import org.eclipse.papyrus.wizards.category.DiagramCategoryDescriptor;
-import org.eclipse.papyrus.wizards.category.DiagramCategoryRegistry;
-import org.eclipse.papyrus.wizards.kind.DiagramKindLabelProvider;
+import org.eclipse.papyrus.infra.core.extension.commands.CreationCommandDescriptor;
+import org.eclipse.papyrus.uml.diagram.wizards.category.DiagramCategoryDescriptor;
+import org.eclipse.papyrus.uml.diagram.wizards.category.DiagramCategoryRegistry;
+import org.eclipse.papyrus.uml.diagram.wizards.kind.DiagramKindLabelProvider;
import org.eclipse.swt.SWT;
import org.eclipse.swt.custom.SashForm;
import org.eclipse.swt.events.FocusAdapter;
@@ -448,7 +448,7 @@ public class DiagramTemplateEditor extends EditorPart {
protected void clearTemplate() {
TreeIterator<EObject> it = template.eAllContents();
while(it.hasNext()) {
- EObject eObject = (EObject)it.next();
+ EObject eObject = it.next();
if(eObject instanceof DiagramDefinition) {
((DiagramDefinition)eObject).setFromRoot(null);
} else if(eObject instanceof Selection) {
@@ -795,7 +795,7 @@ public class DiagramTemplateEditor extends EditorPart {
if(selection instanceof IStructuredSelection) {
Iterator it = ((IStructuredSelection)selection).iterator();
while(it.hasNext()) {
- Object object = (Object)it.next();
+ Object object = it.next();
RemoveCommand command = new RemoveCommand(editingDomain, template, template.eClass().getEStructuralFeature("diagramDefinitions"), object); //$NON-NLS-1$
editingDomain.getCommandStack().execute(command);
@@ -1062,14 +1062,14 @@ public class DiagramTemplateEditor extends EditorPart {
UMLPackage umlPackage = UMLPackage.eINSTANCE;
TreeIterator<EObject> it = umlPackage.eAllContents();
while(it.hasNext()) {
- EObject typeInUML = (EObject)it.next();
+ EObject typeInUML = it.next();
if(typeInUML instanceof EClass) {
if(targetModelResource != null) {
if(!targetModelResource.getContents().isEmpty()) {
//If the element is a type available in the model
TreeIterator<EObject> itTarget = targetModelResource.getAllContents();
while(itTarget.hasNext()) {
- EObject elementInTargetModel = (EObject)itTarget.next();
+ EObject elementInTargetModel = itTarget.next();
if(typeInUML == elementInTargetModel.eClass() && !listOfTypes.contains(typeInUML)) {
listOfTypes.add(typeInUML);
@@ -1163,7 +1163,7 @@ public class DiagramTemplateEditor extends EditorPart {
if(selection != null && selection instanceof ITreeSelection) {
Iterator it = ((ITreeSelection)selection).iterator();
while(it.hasNext()) {
- Object object = (Object)it.next();
+ Object object = it.next();
// removeSelection((AbstractSelection)object);
if(object instanceof Selection) {
RemoveCommand command = new RemoveCommand(editingDomain, ((Selection)object).eContainer(), ((Selection)object).eContainer().eClass().getEStructuralFeature("selection"), object); //$NON-NLS-1$
diff --git a/extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate.editor/src/org/eclipse/papyrus/diagramtemplate/editor/provider/DiagramDefinitionLabelProvider.java b/extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate.editor/src/org/eclipse/papyrus/diagramtemplate/editor/provider/DiagramDefinitionLabelProvider.java
index 7c9a21753fe..0ac88627b5a 100644
--- a/extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate.editor/src/org/eclipse/papyrus/diagramtemplate/editor/provider/DiagramDefinitionLabelProvider.java
+++ b/extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate.editor/src/org/eclipse/papyrus/diagramtemplate/editor/provider/DiagramDefinitionLabelProvider.java
@@ -15,10 +15,10 @@ package org.eclipse.papyrus.diagramtemplate.editor.provider;
import org.eclipse.jface.viewers.ILabelProvider;
import org.eclipse.jface.viewers.ILabelProviderListener;
-import org.eclipse.papyrus.core.extension.commands.CreationCommandDescriptor;
-import org.eclipse.papyrus.core.extension.commands.CreationCommandRegistry;
-import org.eclipse.papyrus.core.extension.commands.ICreationCommandRegistry;
import org.eclipse.papyrus.diagramtemplate.DiagramDefinition;
+import org.eclipse.papyrus.infra.core.extension.commands.CreationCommandDescriptor;
+import org.eclipse.papyrus.infra.core.extension.commands.CreationCommandRegistry;
+import org.eclipse.papyrus.infra.core.extension.commands.ICreationCommandRegistry;
import org.eclipse.swt.graphics.Image;
/**
@@ -92,7 +92,7 @@ public class DiagramDefinitionLabelProvider implements ILabelProvider {
* @return the creation command registry
*/
private ICreationCommandRegistry getCreationCommandRegistry() {
- return CreationCommandRegistry.getInstance(org.eclipse.papyrus.core.Activator.PLUGIN_ID);
+ return CreationCommandRegistry.getInstance(org.eclipse.papyrus.infra.core.Activator.PLUGIN_ID);
}
}
diff --git a/extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate.editor/src/org/eclipse/papyrus/diagramtemplate/editor/provider/DiagramKindContentProvider.java b/extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate.editor/src/org/eclipse/papyrus/diagramtemplate/editor/provider/DiagramKindContentProvider.java
index 861d9e2bba4..51d37dd12a8 100644
--- a/extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate.editor/src/org/eclipse/papyrus/diagramtemplate/editor/provider/DiagramKindContentProvider.java
+++ b/extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate.editor/src/org/eclipse/papyrus/diagramtemplate/editor/provider/DiagramKindContentProvider.java
@@ -18,9 +18,9 @@ import java.util.List;
import org.eclipse.jface.viewers.IStructuredContentProvider;
import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.papyrus.core.extension.commands.CreationCommandDescriptor;
-import org.eclipse.papyrus.core.extension.commands.CreationCommandRegistry;
-import org.eclipse.papyrus.core.extension.commands.ICreationCommandRegistry;
+import org.eclipse.papyrus.infra.core.extension.commands.CreationCommandDescriptor;
+import org.eclipse.papyrus.infra.core.extension.commands.CreationCommandRegistry;
+import org.eclipse.papyrus.infra.core.extension.commands.ICreationCommandRegistry;
/**
*
@@ -76,6 +76,6 @@ public class DiagramKindContentProvider implements IStructuredContentProvider {
* @return the creation command registry
*/
private ICreationCommandRegistry getCreationCommandRegistry() {
- return CreationCommandRegistry.getInstance(org.eclipse.papyrus.core.Activator.PLUGIN_ID);
+ return CreationCommandRegistry.getInstance(org.eclipse.papyrus.infra.core.Activator.PLUGIN_ID);
}
}
diff --git a/extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate.editor/src/org/eclipse/papyrus/diagramtemplate/launcher/DiagramTemplateLauncher.java b/extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate.editor/src/org/eclipse/papyrus/diagramtemplate/launcher/DiagramTemplateLauncher.java
index de106aade3f..4a6f04cd9b2 100644
--- a/extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate.editor/src/org/eclipse/papyrus/diagramtemplate/launcher/DiagramTemplateLauncher.java
+++ b/extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate.editor/src/org/eclipse/papyrus/diagramtemplate/launcher/DiagramTemplateLauncher.java
@@ -43,12 +43,6 @@ import org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants;
import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.papyrus.core.editor.BackboneException;
-import org.eclipse.papyrus.core.extension.commands.CreationCommandDescriptor;
-import org.eclipse.papyrus.core.services.ServiceException;
-import org.eclipse.papyrus.core.services.ServicesRegistry;
-import org.eclipse.papyrus.core.utils.DiResourceSet;
-import org.eclipse.papyrus.core.utils.EditorUtils;
import org.eclipse.papyrus.diagramtemplate.AbstractSelection;
import org.eclipse.papyrus.diagramtemplate.DiagramDefinition;
import org.eclipse.papyrus.diagramtemplate.Selection;
@@ -58,9 +52,15 @@ import org.eclipse.papyrus.diagramtemplate.Template;
import org.eclipse.papyrus.diagramtemplate.editor.provider.DiagramKindContentProvider;
import org.eclipse.papyrus.diagramtemplate.utils.Messages;
import org.eclipse.papyrus.editor.PapyrusMultiDiagramEditor;
-import org.eclipse.papyrus.sasheditor.contentprovider.IPageMngr;
-import org.eclipse.papyrus.wizards.category.DiagramCategoryDescriptor;
-import org.eclipse.papyrus.wizards.category.DiagramCategoryRegistry;
+import org.eclipse.papyrus.infra.core.editor.BackboneException;
+import org.eclipse.papyrus.infra.core.extension.commands.CreationCommandDescriptor;
+import org.eclipse.papyrus.infra.core.sasheditor.contentprovider.IPageMngr;
+import org.eclipse.papyrus.infra.core.services.ServiceException;
+import org.eclipse.papyrus.infra.core.services.ServicesRegistry;
+import org.eclipse.papyrus.infra.core.utils.DiResourceSet;
+import org.eclipse.papyrus.infra.core.utils.EditorUtils;
+import org.eclipse.papyrus.uml.diagram.wizards.category.DiagramCategoryDescriptor;
+import org.eclipse.papyrus.uml.diagram.wizards.category.DiagramCategoryRegistry;
import org.eclipse.ui.IEditorPart;
import org.eclipse.ui.IWorkbenchPage;
import org.eclipse.ui.PartInitException;
@@ -189,7 +189,7 @@ public class DiagramTemplateLauncher {
Iterator it = mapCopy.keySet().iterator();
boolean found = false;
while(it.hasNext() && !found) {
- Object view = (Object)it.next();
+ Object view = it.next();
Object value = mapCopy.get(view);
if(value instanceof GraphicalEditPart) {
@@ -291,7 +291,7 @@ public class DiagramTemplateLauncher {
int i = 0;
for(EObject elementToShow : resultsToShow) {
- EditPart actualEditPart = showElementIn(elementToShow, (DiagramEditor)activeEditor, editPartToShowIn, i);
+ EditPart actualEditPart = showElementIn(elementToShow, activeEditor, editPartToShowIn, i);
processRecursively(actualEditPart, elementToShow, selectionRef, activeEditor);
i++;
}
@@ -303,7 +303,7 @@ public class DiagramTemplateLauncher {
String elementID = selectionRef.getElement().eResource().getURIFragment(selectionRef.getElement());
if(eObjectID.equals(elementID)) {
// if(eObject == selectionRef.getElement()) {
- EditPart actualEditPart = showElementIn(eObject, (DiagramEditor)activeEditor, editPartToShowIn, 0);
+ EditPart actualEditPart = showElementIn(eObject, activeEditor, editPartToShowIn, 0);
processRecursively(actualEditPart, eObject, selectionRef, activeEditor);
}
}
@@ -362,7 +362,7 @@ public class DiagramTemplateLauncher {
processChildren = true;
} else {
if(commandDrop.canExecute()) {
- ((DiagramEditor)activeEditor).getDiagramEditDomain().getDiagramCommandStack().execute(commandDrop);
+ activeEditor.getDiagramEditDomain().getDiagramCommandStack().execute(commandDrop);
returnEditPart = editPart;
creationReport.put(elementToShow, CreationReportKind.SUCCESS);
} else {
@@ -381,7 +381,7 @@ public class DiagramTemplateLauncher {
Command commandDropChild = ((EditPart)child).getCommand(dropObjectsRequest);
if(commandDropChild != null) {
if(commandDropChild.canExecute()) {
- ((DiagramEditor)activeEditor).getDiagramEditDomain().getDiagramCommandStack().execute(commandDropChild);
+ activeEditor.getDiagramEditDomain().getDiagramCommandStack().execute(commandDropChild);
found = true;
returnEditPart = (EditPart)child;
creationReport.put(elementToShow, CreationReportKind.SUCCESS);
@@ -473,7 +473,7 @@ public class DiagramTemplateLauncher {
//Go through all recursively
TreeIterator<EObject> it = root.eAllContents();
while(it.hasNext()) {
- EObject eObject = (EObject)it.next();
+ EObject eObject = it.next();
content.add(eObject);
}
} else {
@@ -506,7 +506,7 @@ public class DiagramTemplateLauncher {
//Identify the new diagram
TreeIterator<EObject> it = diResourceSet.getNotationResource().getAllContents();
while(it.hasNext()) {
- EObject diagram = (EObject)it.next();
+ EObject diagram = it.next();
if(diagram instanceof Diagram) {
if(!diagramsInResource.contains(diagram.eResource().getURIFragment(diagram))) {
diagramsCreated.put(diagram.eResource().getURIFragment(diagram), selection);
@@ -533,7 +533,7 @@ public class DiagramTemplateLauncher {
//Identify the new diagram
TreeIterator<EObject> it = diResourceSet.getNotationResource().getAllContents();
while(it.hasNext()) {
- EObject diagram = (EObject)it.next();
+ EObject diagram = it.next();
if(diagram instanceof Diagram) {
if(!diagramsInResource.contains(diagram.eResource().getURIFragment(diagram))) {
diagramsCreated.put(diagram.eResource().getURIFragment(diagram), selection);
@@ -568,7 +568,7 @@ public class DiagramTemplateLauncher {
//Identify the new diagram
TreeIterator<EObject> it = diResourceSet.getNotationResource().getAllContents();
while(it.hasNext()) {
- EObject diagram = (EObject)it.next();
+ EObject diagram = it.next();
if(diagram instanceof Diagram) {
if(!diagramsInResource.contains(diagram.eResource().getURIFragment(diagram))) {
diagramsCreated.put(diagram.eResource().getURIFragment(diagram), selection);
@@ -643,7 +643,7 @@ public class DiagramTemplateLauncher {
//Identify already available diagrams
TreeIterator<EObject> it = diResourceSet.getNotationResource().getAllContents();
while(it.hasNext()) {
- EObject diagram = (EObject)it.next();
+ EObject diagram = it.next();
if(diagram instanceof Diagram) {
diagramsInResource.add(diagram.eResource().getURIFragment(diagram));
}

Back to the top