Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoratikhomirov2007-02-27 19:11:49 +0000
committeratikhomirov2007-02-27 19:11:49 +0000
commit6dceeca9a796638c6bad3525a01e31a0b9b0eb23 (patch)
tree8749de3f95e03cb36e48d4882dcd4d147b97d175 /plugins/org.eclipse.gmf.graphdef.codegen
parent8cec45e9f262f59a59c879f21b3a410f9d8f2a9d (diff)
downloadorg.eclipse.gmf-tooling-6dceeca9a796638c6bad3525a01e31a0b9b0eb23.tar.gz
org.eclipse.gmf-tooling-6dceeca9a796638c6bad3525a01e31a0b9b0eb23.tar.xz
org.eclipse.gmf-tooling-6dceeca9a796638c6bad3525a01e31a0b9b0eb23.zip
use generics wherever possible
Diffstat (limited to 'plugins/org.eclipse.gmf.graphdef.codegen')
-rw-r--r--plugins/org.eclipse.gmf.graphdef.codegen/src/org/eclipse/gmf/internal/graphdef/codegen/CanvasProcessor.java9
1 files changed, 4 insertions, 5 deletions
diff --git a/plugins/org.eclipse.gmf.graphdef.codegen/src/org/eclipse/gmf/internal/graphdef/codegen/CanvasProcessor.java b/plugins/org.eclipse.gmf.graphdef.codegen/src/org/eclipse/gmf/internal/graphdef/codegen/CanvasProcessor.java
index d8061315f..f0c530975 100644
--- a/plugins/org.eclipse.gmf.graphdef.codegen/src/org/eclipse/gmf/internal/graphdef/codegen/CanvasProcessor.java
+++ b/plugins/org.eclipse.gmf.graphdef.codegen/src/org/eclipse/gmf/internal/graphdef/codegen/CanvasProcessor.java
@@ -83,12 +83,12 @@ public class CanvasProcessor extends Processor {
}
public String[] getRequiredBundles(FigureQualifiedNameSwitch fqnSwitch) {
- ArrayList/*<String>*/ rv = new ArrayList();
+ ArrayList<String> rv = new ArrayList<String>();
for (Iterator galleries = myInput.getFigures().iterator(); galleries.hasNext();) {
FigureGallery next = (FigureGallery) galleries.next();
rv.addAll(Arrays.asList(fqnSwitch.getDependencies(next)));
}
- return (String[]) rv.toArray(new String[rv.size()]);
+ return rv.toArray(new String[rv.size()]);
}
private void handleNodes() throws InterruptedException {
@@ -181,7 +181,7 @@ public class CanvasProcessor extends Processor {
if (!figure.getChildren().isEmpty()) {
return false;
}
- final Collection featuresToCheck = new LinkedList(figure.eClass().getEAllStructuralFeatures());
+ final LinkedList<EStructuralFeature> featuresToCheck = new LinkedList<EStructuralFeature>(figure.eClass().getEAllStructuralFeatures());
featuresToCheck.remove(GMFGraphPackage.eINSTANCE.getIdentity_Name());
featuresToCheck.remove(GMFGraphPackage.eINSTANCE.getFigure_Children());
featuresToCheck.remove(GMFGraphPackage.eINSTANCE.getFigureMarker_Parent());
@@ -191,8 +191,7 @@ public class CanvasProcessor extends Processor {
featuresToCheck.remove(GMFGraphPackage.eINSTANCE.getCustomClass_QualifiedClassName());
featuresToCheck.remove(GMFGraphPackage.eINSTANCE.getCustomFigure_CustomChildren());
- for(Iterator it = featuresToCheck.iterator(); it.hasNext();) {
- final EStructuralFeature next = (EStructuralFeature) it.next();
+ for(EStructuralFeature next : featuresToCheck) {
if (next.isDerived()) {
continue;
}

Back to the top