Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate.editor/src/org/eclipse/papyrus/diagramtemplate/editor/provider/TypesAvailableFromEReferenceContentProvider.java')
-rw-r--r--extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate.editor/src/org/eclipse/papyrus/diagramtemplate/editor/provider/TypesAvailableFromEReferenceContentProvider.java22
1 files changed, 11 insertions, 11 deletions
diff --git a/extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate.editor/src/org/eclipse/papyrus/diagramtemplate/editor/provider/TypesAvailableFromEReferenceContentProvider.java b/extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate.editor/src/org/eclipse/papyrus/diagramtemplate/editor/provider/TypesAvailableFromEReferenceContentProvider.java
index 8a6cb154128..a8f70221611 100644
--- a/extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate.editor/src/org/eclipse/papyrus/diagramtemplate/editor/provider/TypesAvailableFromEReferenceContentProvider.java
+++ b/extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate.editor/src/org/eclipse/papyrus/diagramtemplate/editor/provider/TypesAvailableFromEReferenceContentProvider.java
@@ -1,7 +1,7 @@
/*****************************************************************************
* Copyright (c) 2010 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
@@ -24,9 +24,9 @@ import org.eclipse.jface.viewers.IStructuredContentProvider;
import org.eclipse.jface.viewers.Viewer;
/**
- *
+ *
* Content provider for the types available from a EReference
- *
+ *
*/
public class TypesAvailableFromEReferenceContentProvider implements IStructuredContentProvider {
@@ -41,18 +41,18 @@ public class TypesAvailableFromEReferenceContentProvider implements IStructuredC
}
public Object[] getElements(Object inputElement) {
- if(inputElement instanceof EReference) {
+ if (inputElement instanceof EReference) {
List<EObject> results = new ArrayList<EObject>();
- results.add(((EReference)inputElement).getEReferenceType());
+ results.add(((EReference) inputElement).getEReferenceType());
- TreeIterator<EObject> it = ((EReference)inputElement).eResource().getAllContents();
- while(it.hasNext()) {
- EObject eObject = (EObject)it.next();
- if(eObject instanceof EClass) {
- List<EClass> superTypes = ((EClass)eObject).getEAllSuperTypes();
- if(superTypes.contains(((EReference)inputElement).getEReferenceType())) {
+ TreeIterator<EObject> it = ((EReference) inputElement).eResource().getAllContents();
+ while (it.hasNext()) {
+ EObject eObject = it.next();
+ if (eObject instanceof EClass) {
+ List<EClass> superTypes = ((EClass) eObject).getEAllSuperTypes();
+ if (superTypes.contains(((EReference) inputElement).getEReferenceType())) {
results.add(eObject);
}

Back to the top