diff options
author | Karsten Thoms | 2019-02-12 20:52:58 +0000 |
---|---|---|
committer | Karsten Thoms | 2019-02-14 21:56:38 +0000 |
commit | 2cc9927509ad0bc6e1bc97d1d435008c236b7d9b (patch) | |
tree | d2341fab202bae6b91ce012b436c8c23fe1cd737 /examples | |
parent | d4aa0100abd68b27bb6f7334e48330f73c2ecb91 (diff) | |
download | eclipse.platform.team-2cc9927509ad0bc6e1bc97d1d435008c236b7d9b.tar.gz eclipse.platform.team-2cc9927509ad0bc6e1bc97d1d435008c236b7d9b.tar.xz eclipse.platform.team-2cc9927509ad0bc6e1bc97d1d435008c236b7d9b.zip |
Resolve raw type warningsI20190215-0055
Change-Id: I5a66afa307f4a830c3766c2c54a8ac2a371f90be
Signed-off-by: Karsten Thoms <karsten.thoms@itemis.de>
Diffstat (limited to 'examples')
7 files changed, 25 insertions, 25 deletions
diff --git a/examples/org.eclipse.compare.examples.xml/META-INF/MANIFEST.MF b/examples/org.eclipse.compare.examples.xml/META-INF/MANIFEST.MF index 6eafd2767..98e087342 100644 --- a/examples/org.eclipse.compare.examples.xml/META-INF/MANIFEST.MF +++ b/examples/org.eclipse.compare.examples.xml/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: %pluginName Bundle-SymbolicName: org.eclipse.compare.examples.xml; singleton:=true -Bundle-Version: 3.4.400.qualifier +Bundle-Version: 3.4.500.qualifier Bundle-Activator: org.eclipse.compare.examples.xml.XMLPlugin Bundle-Vendor: %providerName Bundle-Localization: plugin diff --git a/examples/org.eclipse.compare.examples.xml/pom.xml b/examples/org.eclipse.compare.examples.xml/pom.xml index 5fcbb98ce..d93b69d75 100644 --- a/examples/org.eclipse.compare.examples.xml/pom.xml +++ b/examples/org.eclipse.compare.examples.xml/pom.xml @@ -19,6 +19,6 @@ </parent> <groupId>org.eclipse.compare</groupId> <artifactId>org.eclipse.compare.examples.xml</artifactId> - <version>3.4.400-SNAPSHOT</version> + <version>3.4.500-SNAPSHOT</version> <packaging>eclipse-plugin</packaging> </project> diff --git a/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/AbstractMatching.java b/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/AbstractMatching.java index 756c7f401..0962fe2e3 100644 --- a/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/AbstractMatching.java +++ b/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/AbstractMatching.java @@ -38,7 +38,7 @@ public abstract class AbstractMatching { /* methods used for match */ /* finds all the leaves of a tree and puts them in a vector */ - protected void findLeaves(XMLNode root, ArrayList leaves) { + protected void findLeaves(XMLNode root, ArrayList<XMLNode> leaves) { if (isLeaf(root)) { leaves.add(root); } else { @@ -55,7 +55,7 @@ public abstract class AbstractMatching { } /* Numbers all nodes of tree. The number of x is its index in the vector numbering */ - protected void numberNodes(XMLNode root, Vector numbering) { + protected void numberNodes(XMLNode root, Vector<XMLNode> numbering) { if (root != null) { numbering.add(root); Object[] children = root.getChildren(); @@ -186,7 +186,7 @@ public abstract class AbstractMatching { } } - protected int handleRangeDifferencer(Object[] xc_elements, Object[] yc_elements, ArrayList DTMatching, int distance) { + protected int handleRangeDifferencer(Object[] xc_elements, Object[] yc_elements, ArrayList<Match> DTMatching, int distance) { RangeDifference[] differences= RangeDifferencer.findDifferences(new XMLComparator(xc_elements), new XMLComparator(yc_elements)); int cur_pos_left= 0; diff --git a/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/ChooseMatcherDropDownAction.java b/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/ChooseMatcherDropDownAction.java index 7b414528f..d297f9265 100644 --- a/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/ChooseMatcherDropDownAction.java +++ b/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/ChooseMatcherDropDownAction.java @@ -58,7 +58,7 @@ class ChooseMatcherDropDownAction extends Action implements IMenuCreator { Set keySetIdMaps = IdMaps.keySet(); Set keySetIdMapsInternal = IdMapsInternal.keySet(); - ArrayList internalIdMapsAL= new ArrayList(); + ArrayList<String> internalIdMapsAL= new ArrayList<>(); for (Iterator iter_internal = keySetIdMapsInternal.iterator(); iter_internal.hasNext(); ) { String idmap_name = (String)iter_internal.next(); internalIdMapsAL.add(idmap_name); @@ -70,7 +70,7 @@ class ChooseMatcherDropDownAction extends Action implements IMenuCreator { } new MenuItem(menu, SWT.SEPARATOR); - ArrayList userIdMapsAL= new ArrayList(); + ArrayList<String> userIdMapsAL= new ArrayList<>(); for (Iterator iter_idmaps = keySetIdMaps.iterator(); iter_idmaps.hasNext(); ) { String idmap_name = (String)iter_idmaps.next(); userIdMapsAL.add(idmap_name); diff --git a/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/OrderedMatching.java b/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/OrderedMatching.java index 1b55f7609..6b362f7c1 100644 --- a/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/OrderedMatching.java +++ b/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/OrderedMatching.java @@ -31,11 +31,11 @@ public class OrderedMatching extends AbstractMatching { Object[] xc= x.getChildren(); Object[] yc= y.getChildren(); - ArrayList xc_elementsAL= new ArrayList(); - ArrayList xc_attrsAL= new ArrayList(); + ArrayList<XMLNode> xc_elementsAL= new ArrayList<>(); + ArrayList<XMLNode> xc_attrsAL= new ArrayList<>(); - ArrayList yc_elementsAL= new ArrayList(); - ArrayList yc_attrsAL= new ArrayList(); + ArrayList<XMLNode> yc_elementsAL= new ArrayList<>(); + ArrayList<XMLNode> yc_attrsAL= new ArrayList<>(); //find attributes and elements and put them in xc_elementsAL and xc_attrsAL, respectively for (int i= 0; i < xc.length; i++) { @@ -123,9 +123,9 @@ public class OrderedMatching extends AbstractMatching { boolean rightTreeIsAncestor, IProgressMonitor monitor) { - fNLeft= new Vector(); + fNLeft= new Vector<XMLNode>(); //numbering LeftTree: Mapping nodes in LeftTree to numbers to be used as array indexes - fNRight= new Vector(); + fNRight= new Vector<XMLNode>(); //numbering RightTree: Mapping nodes in RightTree to numbers to be used as array indexes numberNodes(LeftTree, fNLeft); numberNodes(RightTree, fNRight); @@ -184,16 +184,16 @@ public class OrderedMatching extends AbstractMatching { } public int handleAttributes( - ArrayList xc_attrs, - ArrayList yc_attrs, - ArrayList DTMatching) { + ArrayList<XMLNode> xc_attrs, + ArrayList<XMLNode> yc_attrs, + ArrayList<Match> DTMatching) { int distance= 0; x_for : for ( - Iterator iter_xc= xc_attrs.iterator(); iter_xc.hasNext();) { - XMLNode x_attr= (XMLNode) iter_xc.next(); + Iterator<XMLNode> iter_xc= xc_attrs.iterator(); iter_xc.hasNext();) { + XMLNode x_attr= iter_xc.next(); String x_attr_name= x_attr.getName(); - for (Iterator iter_yc= yc_attrs.iterator(); iter_yc.hasNext();) { - XMLNode y_attr= (XMLNode) iter_yc.next(); + for (Iterator<XMLNode> iter_yc= yc_attrs.iterator(); iter_yc.hasNext();) { + XMLNode y_attr= iter_yc.next(); if (y_attr.getName().equals(x_attr_name)) { if (!y_attr.getValue().equals(x_attr.getValue())) distance += 1; @@ -206,8 +206,8 @@ public class OrderedMatching extends AbstractMatching { distance += 1; } - for (Iterator iter_yc= yc_attrs.iterator(); iter_yc.hasNext();) { - DTMatching.add(new Match(null, (XMLNode) iter_yc.next())); + for (Iterator<XMLNode> iter_yc= yc_attrs.iterator(); iter_yc.hasNext();) { + DTMatching.add(new Match(null, iter_yc.next())); distance += 1; } diff --git a/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLChildren.java b/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLChildren.java index 58bf115d3..23174353e 100644 --- a/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLChildren.java +++ b/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLChildren.java @@ -21,12 +21,12 @@ import org.eclipse.jface.text.IDocument; public class XMLChildren extends XMLNode { public int children; // counts the number of children - public HashMap childElements; // maps the name of XML child elements to their # of occurence + public HashMap<String,Integer> childElements; // maps the name of XML child elements to their # of occurence public XMLChildren(String XMLType, String id, String value, String signature, IDocument doc, int start, int length) { super(XMLType, id, value, signature, doc, start, length); children= 0; - childElements = new HashMap(); + childElements = new HashMap<>(); } } diff --git a/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLStructureCreator.java b/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLStructureCreator.java index 52a4307cb..5318bbd4b 100644 --- a/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLStructureCreator.java +++ b/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLStructureCreator.java @@ -168,7 +168,7 @@ public class XMLStructureCreator implements IStructureCreator { if (!currentParent.childElements.containsKey(raw)) { currentParent.childElements.put(raw, Integer.valueOf(1)); } else { - currentParent.childElements.put(raw, Integer.valueOf(((Integer) currentParent.childElements.get(raw)).intValue() + 1)); + currentParent.childElements.put(raw, Integer.valueOf(currentParent.childElements.get(raw).intValue() + 1)); } elementId= raw + Character.valueOf(ID_SEPARATOR) + "[" + currentParent.childElements.get(raw) + "]"; //$NON-NLS-2$ //$NON-NLS-1$ elementName= MessageFormat.format("{0} [{1}]", raw, currentParent.childElements.get(raw).toString()); //$NON-NLS-1$ |