bug 311325 - Igor Jacy Lino Campista's 2nd patch reviewed and applied: Java 5 warnings (Generics and for-each) fixed
diff --git a/sourceediting/tests/org.eclipse.wst.xml.vex.core.tests/META-INF/MANIFEST.MF b/sourceediting/tests/org.eclipse.wst.xml.vex.core.tests/META-INF/MANIFEST.MF
index 3283174..ee36f6c 100644
--- a/sourceediting/tests/org.eclipse.wst.xml.vex.core.tests/META-INF/MANIFEST.MF
+++ b/sourceediting/tests/org.eclipse.wst.xml.vex.core.tests/META-INF/MANIFEST.MF
@@ -23,3 +23,4 @@
  org.eclipse.wst.xml.vex.core.internal.layout;x-internal:=true,
  org.eclipse.wst.xml.vex.core.internal.provisional.dom.tests;x-internal:=true,
  org.eclipse.wst.xml.vex.core.tests
+Bundle-Localization: plugin
diff --git a/sourceediting/tests/org.eclipse.wst.xml.vex.core.tests/src/org/eclipse/wst/xml/vex/core/internal/dom/DTDValidatorTest.java b/sourceediting/tests/org.eclipse.wst.xml.vex.core.tests/src/org/eclipse/wst/xml/vex/core/internal/dom/DTDValidatorTest.java
index 2e1ce22..630baf6 100644
--- a/sourceediting/tests/org.eclipse.wst.xml.vex.core.tests/src/org/eclipse/wst/xml/vex/core/internal/dom/DTDValidatorTest.java
+++ b/sourceediting/tests/org.eclipse.wst.xml.vex.core.tests/src/org/eclipse/wst/xml/vex/core/internal/dom/DTDValidatorTest.java
@@ -7,6 +7,7 @@
  * 
  * Contributors:
  *     John Krasnay - initial API and implementation
+ *     Igor Jacy Lino Campista - Java 5 warnings fixed (bug 311325)
  *******************************************************************************/
 package org.eclipse.wst.xml.vex.core.internal.dom;
 
@@ -122,8 +123,8 @@
 	private void assertValidItemsAt(VEXDocument doc, int offset,
 			String... expectedItems) {
 		Set<String> expected = new HashSet<String>(expectedItems.length);
-		for (int i = 0; i < expectedItems.length; i++) {
-			expected.add(expectedItems[i]);
+		for (String item : expectedItems) {
+			expected.add(item);
 		}
 		
 		String elementName = doc.getElementAt(offset).getName();
diff --git a/sourceediting/tests/org.eclipse.wst.xml.vex.core.tests/src/org/eclipse/wst/xml/vex/core/internal/dom/DomTest.java b/sourceediting/tests/org.eclipse.wst.xml.vex.core.tests/src/org/eclipse/wst/xml/vex/core/internal/dom/DomTest.java
index 9ee6211..20b788c 100644
--- a/sourceediting/tests/org.eclipse.wst.xml.vex.core.tests/src/org/eclipse/wst/xml/vex/core/internal/dom/DomTest.java
+++ b/sourceediting/tests/org.eclipse.wst.xml.vex.core.tests/src/org/eclipse/wst/xml/vex/core/internal/dom/DomTest.java
@@ -7,6 +7,7 @@
  * 
  * Contributors:
  *     John Krasnay - initial API and implementation
+ *     Igor Jacy Lino Campista - Java 5 warnings fixed (bug 311325)
  *******************************************************************************/
 package org.eclipse.wst.xml.vex.core.internal.dom;
 
@@ -16,7 +17,6 @@
 
 import org.eclipse.wst.sse.core.StructuredModelManager;
 import org.eclipse.wst.sse.core.internal.provisional.IModelManager;
-import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel;
 import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocument;
 import org.eclipse.wst.xml.core.internal.document.DOMModelImpl;
 import org.eclipse.wst.xml.core.internal.provisional.contenttype.ContentTypeIdForXML;
@@ -48,7 +48,6 @@
 	}
 	
 	public void testWTPStructruedDocument() throws Exception {
-		IStructuredModel model = null;
 		IModelManager modelManager = StructuredModelManager.getModelManager();
 		
 		IStructuredDocument structuredDocument = modelManager.createStructuredDocumentFor(ContentTypeIdForXML.ContentTypeID_XML);
diff --git a/sourceediting/tests/org.eclipse.wst.xml.vex.core.tests/src/org/eclipse/wst/xml/vex/core/internal/dom/SpaceNormalizerTest.java b/sourceediting/tests/org.eclipse.wst.xml.vex.core.tests/src/org/eclipse/wst/xml/vex/core/internal/dom/SpaceNormalizerTest.java
index f08a13f..39d2b35 100644
--- a/sourceediting/tests/org.eclipse.wst.xml.vex.core.tests/src/org/eclipse/wst/xml/vex/core/internal/dom/SpaceNormalizerTest.java
+++ b/sourceediting/tests/org.eclipse.wst.xml.vex.core.tests/src/org/eclipse/wst/xml/vex/core/internal/dom/SpaceNormalizerTest.java
@@ -7,6 +7,7 @@
  * 
  * Contributors:
  *     John Krasnay - initial API and implementation
+ *     Igor Jacy Lino Campista - Java 5 warnings fixed (bug 311325)
  *******************************************************************************/
 package org.eclipse.wst.xml.vex.core.internal.dom;
 
@@ -68,10 +69,10 @@
 		if (!fTestProjectInitialized) {
 			getAndCreateProject();
 
-			Enumeration<String> e = Platform.getBundle(
+			Enumeration<?> e = Platform.getBundle(
 					VEXCoreTestPlugin.PLUGIN_ID).getEntryPaths("/projectFiles");
 			while (e.hasMoreElements()) {
-				String path = e.nextElement();
+				String path = (String) e.nextElement();
 				URL url = Platform.getBundle(VEXCoreTestPlugin.PLUGIN_ID)
 						.getEntry(path);
 				if (!url.getFile().endsWith("/")) {
diff --git a/sourceediting/tests/org.eclipse.wst.xml.vex.core.tests/src/org/eclipse/wst/xml/vex/core/internal/dom/TextWrapperTest.java b/sourceediting/tests/org.eclipse.wst.xml.vex.core.tests/src/org/eclipse/wst/xml/vex/core/internal/dom/TextWrapperTest.java
index f481c3c..de1bbbc 100644
--- a/sourceediting/tests/org.eclipse.wst.xml.vex.core.tests/src/org/eclipse/wst/xml/vex/core/internal/dom/TextWrapperTest.java
+++ b/sourceediting/tests/org.eclipse.wst.xml.vex.core.tests/src/org/eclipse/wst/xml/vex/core/internal/dom/TextWrapperTest.java
@@ -7,6 +7,7 @@
  * 
  * Contributors:
  *     John Krasnay - initial API and implementation
+ *     Igor Jacy Lino Campista - Java 5 warnings fixed (bug 311325)
  *******************************************************************************/
 package org.eclipse.wst.xml.vex.core.internal.dom;
 
@@ -35,8 +36,8 @@
 				"words ",
 				"and here are some long ones. We make sure we have some short stuff and some long stuff, just to make sure it all wraps." };
 
-		for (int i = 0; i < inputs.length; i++) {
-			wrapper.add(inputs[i]);
+		for (String input : inputs) {
+			wrapper.add(input);
 		}
 		results = wrapper.wrap(40);
 		assertWidth(results, 40);
@@ -67,11 +68,11 @@
 	private void assertPreserved(String[] inputs, String[] results) {
 		StringBuffer inputSB = new StringBuffer();
 		StringBuffer resultSB = new StringBuffer();
-		for (int i = 0; i < inputs.length; i++) {
-			inputSB.append(inputs[i]);
+		for (String input : inputs) {
+			inputSB.append(input);
 		}
-		for (int i = 0; i < results.length; i++) {
-			resultSB.append(results[i]);
+		for (String result : results) {
+			resultSB.append(result);
 		}
 		assertEquals(inputSB.toString(), resultSB.toString());
 	}
diff --git a/sourceediting/tests/org.eclipse.wst.xml.vex.core.tests/src/org/eclipse/wst/xml/vex/core/internal/layout/LayoutTestSuite.java b/sourceediting/tests/org.eclipse.wst.xml.vex.core.tests/src/org/eclipse/wst/xml/vex/core/internal/layout/LayoutTestSuite.java
index 189a211..c64ab59 100644
--- a/sourceediting/tests/org.eclipse.wst.xml.vex.core.tests/src/org/eclipse/wst/xml/vex/core/internal/layout/LayoutTestSuite.java
+++ b/sourceediting/tests/org.eclipse.wst.xml.vex.core.tests/src/org/eclipse/wst/xml/vex/core/internal/layout/LayoutTestSuite.java
@@ -4,16 +4,16 @@
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
- * 
+ *
  * Contributors:
  *     John Krasnay - initial API and implementation
+ *     Igor Jacy Lino Campista - Java 5 warnings fixed (bug 311325)
  *******************************************************************************/
 package org.eclipse.wst.xml.vex.core.internal.layout;
 
 import java.io.IOException;
 import java.net.URL;
 import java.util.ArrayList;
-import java.util.Iterator;
 import java.util.List;
 import java.util.Stack;
 
@@ -28,13 +28,9 @@
 import org.eclipse.wst.xml.vex.core.internal.css.StyleSheet;
 import org.eclipse.wst.xml.vex.core.internal.css.StyleSheetReader;
 import org.eclipse.wst.xml.vex.core.internal.dom.DocumentReader;
-import org.eclipse.wst.xml.vex.core.internal.layout.Box;
-import org.eclipse.wst.xml.vex.core.internal.layout.LayoutContext;
-import org.eclipse.wst.xml.vex.core.internal.layout.RootBox;
-import org.eclipse.wst.xml.vex.core.internal.layout.TextBox;
-import org.eclipse.wst.xml.vex.core.internal.provisional.dom.I.VEXDocument;
 import org.eclipse.wst.xml.vex.core.internal.provisional.dom.IWhitespacePolicy;
 import org.eclipse.wst.xml.vex.core.internal.provisional.dom.IWhitespacePolicyFactory;
+import org.eclipse.wst.xml.vex.core.internal.provisional.dom.I.VEXDocument;
 import org.eclipse.wst.xml.vex.core.internal.widget.CssWhitespacePolicy;
 import org.xml.sax.Attributes;
 import org.xml.sax.InputSource;
@@ -48,215 +44,212 @@
  */
 public class LayoutTestSuite extends TestCase {
 
-	public String id;
-	public String doc;
-	public int layoutWidth = 100;
-	public BoxSpec result;
-	public String css;
+    public String id;
+    public String doc;
+    public int layoutWidth = 100;
+    public BoxSpec result;
+    public String css;
 
-	public static Test suite() throws ParserConfigurationException,
-			FactoryConfigurationError, IOException, SAXException {
-		TestSuite suite = new TestSuite(LayoutTestSuite.class.getName());
-		suite.addTest(loadSuite("block-inline.xml"));
-		suite.addTest(loadSuite("before-after.xml"));
-		suite.addTest(loadSuite("linebreaks.xml"));
-		suite.addTest(loadSuite("tables.xml"));
-		return suite;
-	}
+    public static Test suite() throws ParserConfigurationException,
+            FactoryConfigurationError, IOException, SAXException {
+        TestSuite suite = new TestSuite(LayoutTestSuite.class.getName());
+        suite.addTest(loadSuite("block-inline.xml"));
+        suite.addTest(loadSuite("before-after.xml"));
+        suite.addTest(loadSuite("linebreaks.xml"));
+        suite.addTest(loadSuite("tables.xml"));
+        return suite;
+    }
 
-	public static Test loadSuite(String filename)
-			throws ParserConfigurationException, FactoryConfigurationError,
-			IOException, SAXException {
-		XMLReader xmlReader = SAXParserFactory.newInstance().newSAXParser()
-				.getXMLReader();
-		TestCaseBuilder builder = new TestCaseBuilder();
-		xmlReader.setContentHandler(builder);
-		// xmlReader.setEntityResolver(builder);
-		URL url = LayoutTestSuite.class.getResource(filename);
-		xmlReader.parse(new InputSource(url.toString()));
+    public static Test loadSuite(String filename)
+            throws ParserConfigurationException, FactoryConfigurationError,
+            IOException, SAXException {
+        XMLReader xmlReader = SAXParserFactory.newInstance().newSAXParser()
+                .getXMLReader();
+        TestCaseBuilder builder = new TestCaseBuilder();
+        xmlReader.setContentHandler(builder);
+        // xmlReader.setEntityResolver(builder);
+        URL url = LayoutTestSuite.class.getResource(filename);
+        xmlReader.parse(new InputSource(url.toString()));
 
-		TestSuite suite = new TestSuite(filename);
-		for (Iterator it = builder.testCases.iterator(); it.hasNext();) {
-			LayoutTestSuite test = (LayoutTestSuite) it.next();
-			suite.addTest(test);
-		}
-		return suite;
-	}
+        TestSuite suite = new TestSuite(filename);
+        for (TestCase test : builder.testCases) {
+            suite.addTest(test);
+        }
+        return suite;
+    }
 
-	public LayoutTestSuite() {
-		super("testLayout");
-	}
+    public LayoutTestSuite() {
+        super("testLayout");
+    }
 
-	public String getName() {
-		return this.id;
-	}
+    public String getName() {
+        return this.id;
+    }
 
-	public void testLayout() throws Exception {
+    public void testLayout() throws Exception {
 
-		URL url = LayoutTestSuite.class.getResource(this.css);
-		StyleSheetReader reader = new StyleSheetReader();
-		final StyleSheet ss = reader.read(url);
+        URL url = LayoutTestSuite.class.getResource(this.css);
+        StyleSheetReader reader = new StyleSheetReader();
+        final StyleSheet ss = reader.read(url);
 
-		FakeGraphics g = new FakeGraphics();
+        FakeGraphics g = new FakeGraphics();
 
-		LayoutContext context = new LayoutContext();
-		context.setBoxFactory(new MockBoxFactory());
-		context.setGraphics(g);
-		context.setStyleSheet(ss);
+        LayoutContext context = new LayoutContext();
+        context.setBoxFactory(new MockBoxFactory());
+        context.setGraphics(g);
+        context.setStyleSheet(ss);
 
-		DocumentReader docReader = new DocumentReader();
-		docReader.setWhitespacePolicyFactory(new IWhitespacePolicyFactory() {
-			public IWhitespacePolicy getPolicy(String publicId) {
-				return new CssWhitespacePolicy(ss);
-			}
-		});
-		VEXDocument doc = docReader.read(this.doc);
-		context.setDocument(doc);
+        DocumentReader docReader = new DocumentReader();
+        docReader.setWhitespacePolicyFactory(new IWhitespacePolicyFactory() {
+            public IWhitespacePolicy getPolicy(String publicId) {
+                return new CssWhitespacePolicy(ss);
+            }
+        });
+        VEXDocument doc = docReader.read(this.doc);
+        context.setDocument(doc);
 
-		RootBox rootBox = new RootBox(context, doc.getRootElement(),
-				this.layoutWidth);
-		rootBox.layout(context, 0, Integer.MAX_VALUE);
+        RootBox rootBox = new RootBox(context, doc.getRootElement(),
+                this.layoutWidth);
+        rootBox.layout(context, 0, Integer.MAX_VALUE);
 
-		assertBox(this.result, rootBox, "");
-	}
+        assertBox(this.result, rootBox, "");
+    }
 
-	private static void assertBox(BoxSpec boxSpec, Box box, String indent) {
+    private static void assertBox(BoxSpec boxSpec, Box box, String indent) {
 
-		System.out.println(indent + boxSpec.className);
+        System.out.println(indent + boxSpec.className);
 
-		if (boxSpec.className != null) {
-			String actualClassName = box.getClass().getName();
-			if (boxSpec.className.lastIndexOf('.') == -1) {
-				// no dot in box spec classname, so strip the prefix from the
-				// actual classname
-				int lastDot = actualClassName.lastIndexOf('.');
-				actualClassName = actualClassName.substring(lastDot + 1);
-			}
-			assertEquals(boxSpec.className, actualClassName);
-		}
+        if (boxSpec.className != null) {
+            String actualClassName = box.getClass().getName();
+            if (boxSpec.className.lastIndexOf('.') == -1) {
+                // no dot in box spec classname, so strip the prefix from the
+                // actual classname
+                int lastDot = actualClassName.lastIndexOf('.');
+                actualClassName = actualClassName.substring(lastDot + 1);
+            }
+            assertEquals(boxSpec.className, actualClassName);
+        }
 
-		if (boxSpec.element != null) {
-			assertNotNull(box.getElement());
-			assertEquals(boxSpec.element, box.getElement().getName());
-		}
+        if (boxSpec.element != null) {
+            assertNotNull(box.getElement());
+            assertEquals(boxSpec.element, box.getElement().getName());
+        }
 
-		if (boxSpec.text != null && box instanceof TextBox) {
-			assertEquals(boxSpec.text, ((TextBox) box).getText());
-		}
+        if (boxSpec.text != null && box instanceof TextBox) {
+            assertEquals(boxSpec.text, ((TextBox) box).getText());
+        }
 
-		if (boxSpec.children.size() > 0 && box.getChildren() == null) {
-			fail("Expected " + boxSpec.children.size() + " children, but "
-					+ boxSpec.className + "'s children is null");
-		}
+        if (!boxSpec.children.isEmpty() && box.getChildren() == null) {
+            fail("Expected " + boxSpec.children.size() + " children, but "
+                    + boxSpec.className + "'s children is null");
+        }
 
-		if (boxSpec.children.size() != box.getChildren().length) {
-			System.out.println("Wrong number of child boxes");
-			System.out.println("  Expected:");
-			for (Iterator it = boxSpec.children.iterator(); it.hasNext();) {
-				BoxSpec childSpec = (BoxSpec) it.next();
-				System.out.print("    " + childSpec.className);
-				if (childSpec.text != null) {
-					System.out.print(" '" + childSpec.text + "'");
-				}
-				System.out.println();
-			}
-			System.out.println("  Actual:");
-			for (int i = 0; i < box.getChildren().length; i++) {
-				Box childBox = box.getChildren()[i];
-				System.out.println("    " + childBox.getClass() + ": "
-						+ childBox);
-			}
-			fail("Wrong number of child boxes.");
-		}
+        if (boxSpec.children.size() != box.getChildren().length) {
+            System.out.println("Wrong number of child boxes");
+            System.out.println("  Expected:");
+            for (BoxSpec childSpec : boxSpec.children) {
+                System.out.print("    " + childSpec.className);
+                if (childSpec.text != null) {
+                    System.out.print(" '" + childSpec.text + "'");
+                }
+                System.out.println();
+            }
+            System.out.println("  Actual:");
+            for (Box childBox : box.getChildren()) {
+                System.out.println("    " + childBox.getClass() + ": "
+                        + childBox);
+            }
+            fail("Wrong number of child boxes.");
+        }
 
-		for (int i = 0; i < boxSpec.children.size(); i++) {
-			assertBox((BoxSpec) boxSpec.children.get(i), box.getChildren()[i],
-					indent + "  ");
-		}
+        for (int i = 0; i < boxSpec.children.size(); i++) {
+            assertBox((BoxSpec) boxSpec.children.get(i), box.getChildren()[i],
+                    indent + "  ");
+        }
 
-	}
+    }
 
-	private static class TestCaseBuilder extends DefaultHandler {
+    private static class TestCaseBuilder extends DefaultHandler {
 
-		private List testCases;
-		private String css;
-		private LayoutTestSuite testCase;
-		private BoxSpec boxSpec;
-		private Stack boxSpecs;
-		private boolean inDoc;
+        private List<TestCase> testCases;
+        private String css;
+        private LayoutTestSuite testCase;
+        private BoxSpec boxSpec;
+        private Stack<BoxSpec> boxSpecs;
+        private boolean inDoc;
 
-		public void characters(char[] ch, int start, int length)
-				throws SAXException {
+        public void characters(char[] ch, int start, int length)
+                throws SAXException {
 
-			String s = new String(ch, start, length).trim();
-			if (s.length() > 0) {
-				if (inDoc) {
-					this.testCase.doc = new String(ch, start, length);
-				} else {
-					throw new IllegalStateException();
-				}
-			}
-		}
+            String s = new String(ch, start, length).trim();
+            if (s.length() > 0) {
+                if (inDoc) {
+                    this.testCase.doc = new String(ch, start, length);
+                } else {
+                    throw new IllegalStateException();
+                }
+            }
+        }
 
-		public void endElement(String uri, String localName, String qName)
-				throws SAXException {
-			if (qName.equals("box")) {
-				if (this.boxSpecs.isEmpty()) {
-					this.boxSpec = null;
-				} else {
-					this.boxSpec = (BoxSpec) this.boxSpecs.pop();
-				}
-			} else if (qName.equals("doc")) {
-				this.inDoc = false;
-			}
-		}
+        public void endElement(String uri, String localName, String qName)
+                throws SAXException {
+            if (qName.equals("box")) {
+                if (this.boxSpecs.isEmpty()) {
+                    this.boxSpec = null;
+                } else {
+                    this.boxSpec = this.boxSpecs.pop();
+                }
+            } else if (qName.equals("doc")) {
+                this.inDoc = false;
+            }
+        }
 
-		public void startElement(String uri, String localName, String qName,
-				Attributes attributes) throws SAXException {
+        public void startElement(String uri, String localName, String qName,
+                Attributes attributes) throws SAXException {
 
-			if (qName.equals("testcases")) {
-				this.testCases = new ArrayList();
-				this.css = attributes.getValue("css");
-				if (this.css == null) {
-					this.css = "test.css";
-				}
-				this.testCase = null;
-				this.boxSpecs = new Stack();
-			} else if (qName.equals("test")) {
-				this.testCase = new LayoutTestSuite();
-				this.testCase.id = attributes.getValue("id");
-				this.testCase.css = this.css;
-				String layoutWidth = attributes.getValue("layoutWidth");
-				if (layoutWidth != null) {
-					this.testCase.layoutWidth = Integer.parseInt(layoutWidth);
-				}
-				testCases.add(this.testCase);
-			} else if (qName.equals("doc")) {
-				this.inDoc = true;
-			} else if (qName.equals("result")) {
-			} else if (qName.equals("box")) {
-				BoxSpec parent = this.boxSpec;
-				this.boxSpec = new BoxSpec();
-				this.boxSpec.className = attributes.getValue("class");
-				this.boxSpec.element = attributes.getValue("element");
-				this.boxSpec.text = attributes.getValue("text");
-				if (parent == null) {
-					this.testCase.result = this.boxSpec;
-				} else {
-					this.boxSpecs.push(parent);
-					parent.children.add(this.boxSpec);
-				}
-			} else {
-				throw new SAXException("Unrecognized element: " + qName);
-			}
-		}
-	}
+            if (qName.equals("testcases")) {
+                this.testCases = new ArrayList<TestCase>();
+                this.css = attributes.getValue("css");
+                if (this.css == null) {
+                    this.css = "test.css";
+                }
+                this.testCase = null;
+                this.boxSpecs = new Stack<BoxSpec>();
+            } else if (qName.equals("test")) {
+                this.testCase = new LayoutTestSuite();
+                this.testCase.id = attributes.getValue("id");
+                this.testCase.css = this.css;
+                String layoutWidth = attributes.getValue("layoutWidth");
+                if (layoutWidth != null) {
+                    this.testCase.layoutWidth = Integer.parseInt(layoutWidth);
+                }
+                testCases.add(this.testCase);
+            } else if (qName.equals("doc")) {
+                this.inDoc = true;
+            } else if (qName.equals("result")) {
+            } else if (qName.equals("box")) {
+                BoxSpec parent = this.boxSpec;
+                this.boxSpec = new BoxSpec();
+                this.boxSpec.className = attributes.getValue("class");
+                this.boxSpec.element = attributes.getValue("element");
+                this.boxSpec.text = attributes.getValue("text");
+                if (parent == null) {
+                    this.testCase.result = this.boxSpec;
+                } else {
+                    this.boxSpecs.push(parent);
+                    parent.children.add(this.boxSpec);
+                }
+            } else {
+                throw new SAXException("Unrecognized element: " + qName);
+            }
+        }
+    }
 
-	private static class BoxSpec {
-		public String className;
-		public String element;
-		public List children = new ArrayList();
-		public String text;
-	}
+    private static class BoxSpec {
+        public String className;
+        public String element;
+        public List<BoxSpec> children = new ArrayList<BoxSpec>();
+        public String text;
+    }
 
 }
diff --git a/sourceediting/tests/org.eclipse.wst.xml.vex.core.tests/src/org/eclipse/wst/xml/vex/core/internal/layout/TableLayoutTest.java b/sourceediting/tests/org.eclipse.wst.xml.vex.core.tests/src/org/eclipse/wst/xml/vex/core/internal/layout/TableLayoutTest.java
index e3340e1..4dc2770 100644
--- a/sourceediting/tests/org.eclipse.wst.xml.vex.core.tests/src/org/eclipse/wst/xml/vex/core/internal/layout/TableLayoutTest.java
+++ b/sourceediting/tests/org.eclipse.wst.xml.vex.core.tests/src/org/eclipse/wst/xml/vex/core/internal/layout/TableLayoutTest.java
@@ -1,244 +1,244 @@
-/*******************************************************************************

- * Copyright (c) 2009 Holger Voormann and others.

- * 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

- * http://www.eclipse.org/legal/epl-v10.html

- *

- * Contributors:

- *     Holger Voormann - initial API and implementation

- *******************************************************************************/

-package org.eclipse.wst.xml.vex.core.internal.layout;

-

-import java.util.Arrays;

-import java.util.Stack;

-

-import junit.framework.TestCase;

-

-import org.eclipse.wst.xml.vex.core.internal.core.DisplayDevice;

-import org.eclipse.wst.xml.vex.core.internal.css.MockDisplayDevice;

-import org.eclipse.wst.xml.vex.core.internal.css.StyleSheet;

-import org.eclipse.wst.xml.vex.core.internal.css.StyleSheetReader;

-import org.eclipse.wst.xml.vex.core.internal.dom.Document;

-import org.eclipse.wst.xml.vex.core.internal.dom.Element;

-import org.eclipse.wst.xml.vex.core.internal.dom.RootElement;

-import org.eclipse.wst.xml.vex.core.internal.provisional.dom.I.VEXDocument;

-

-public class TableLayoutTest extends TestCase {

-

-    private static interface StackVisitor {

-        void visit(StackElement element);

-    }

-

-    private static class StackElement {

-        public final int indent;

-        public final Box box;

-        public StackElement(int indent, Box box) {

-            this.indent = indent;

-            this.box = box;

-        }

-    }

-

-    private LayoutContext context;

-    private VEXDocument document;

-    private RootBox rootBox;

-    private int caretPosition;

-

-    @Override

-    protected void setUp() throws Exception {

-

-        // display dummy

-        DisplayDevice.setCurrent(new MockDisplayDevice(90, 90));

-

-        // context dummy

-        context = new LayoutContext();

-        context.setBoxFactory(new MockBoxFactory());

-        context.setGraphics(new FakeGraphics());

-

-        // set CSS

-        String css =   "root   {display:block}"

-                     + "inline {display:inline}"

-                     + "table  {display:table}"

-                     + "tcap   {display:table-caption}"

-                     + "td     {display:table-cell}"

-                     + "tc     {display:table-column}"

-                     + "tcg    {display:table-column-group}"

-                     + "tfg    {display:table-footer-group}"

-                     + "thg    {display:table-header-group}"

-                     + "tr     {display:table-row}"

-                     + "trg    {display:table-row-group}";

-        StyleSheet styleSheet = new StyleSheetReader().read(css);

-        context.setStyleSheet(styleSheet);

-

-        resetDocument();

-    }

-

-    @Override

-    protected void tearDown() throws Exception {

-        rootBox = null;

-        document = null;

-        context = null;

-    }

-

-    private void resetDocument() {

-        document = new Document(new RootElement("root"));

-        context.setDocument(document);

-        caretPosition = 1;

-        rootBox = new RootBox(this.context, document.getRootElement(), 500);

-    }

-

-    private void insertElement(String elementName) {

-        document.insertElement(caretPosition, new Element(elementName));

-        caretPosition++;

-    }

-

-    private void insertText(String text) {

-        document.insertText(caretPosition, text);;

-        caretPosition += text.length();

-    }

-

-    public void testValidTable() throws Exception {

-

-        // single cell Table

-        insertElement("table");

-        insertElement("tr");

-        insertElement("td");

-        insertText("a");

-        assertCount(1, TableBox.class);

-        assertCount(1, TableRowBox.class);

-        assertCount(1, TableCellBox.class);

-        assertCount(1, DocumentTextBox.class);

-        assertEquals("a", contentAsText());

-

-        // 2x2 table plus text

-        resetDocument();

-        insertText("_");

-        insertElement("table");

-        insertElement("tr");

-        insertElement("td");

-        insertText("a");

-        caretPosition++;

-        insertElement("td");

-        insertText("b");

-        caretPosition+=2;

-        insertElement("tr");

-        insertElement("td");

-        insertText("c");

-        caretPosition++;

-        insertElement("td");

-        insertText("d");

-        assertCount(1, TableBox.class);

-        assertCount(2, TableRowBox.class);

-        assertCount(4, TableCellBox.class);

-        assertCount(5, DocumentTextBox.class);

-        assertEquals("_abcd", contentAsText());

-    }

-

-    // table elements outside table (separately tested to improve tracing if

-    // StackOverflowError will be thrown)

-    public void testCaptionOutsideTable()     { test("tcap"); }

-    public void testCellOutsideTable()        { test("td"); }

-    public void testColumnOutsideTable()      { test("tc"); }

-    public void testColumnGroupOutsideTable() { test("tcg"); }

-    public void testFooterGroupOutsideTable() { test("tfg"); }

-    public void testHeaderGroupOutsideTable() { test("thg"); }

-    public void testRowOutsideTable()         { test("tr"); }

-    public void testRowGroupOutsideTable()    { test("trg"); }

-    

-    // invalid nested table elements (separately tested to improve tracing if

-    // StackOverflowError will be thrown)

-    public void testInvalidNesting1() { test("inline", "tcap"); }

-    public void testInvalidNesting2() { test("table", "td"); }

-    public void testInvalidNesting3() { test("td", "tr"); }

-    public void testInvalidNesting4() { test("trg", "trg"); }

-    public void testInvalidNesting5() { test("tr", "tfg"); }

-    public void testInvalidNesting6() { test("td", "thg"); }

-    public void testInvalidNesting7() { test("table", "tc"); }

-    public void testInvalidNesting8() { test("thg", "tcg"); }

-    

-    public void test(String ... elements) {

-        resetDocument();

-        insertElement("inline");

-        for (int i = 0; i < elements.length; i++) {

-            insertElement(elements[i]);

-        }

-        insertText("x");

-        assertCount(1, DocumentTextBox.class);

-        assertEquals("x", contentAsText());

-    }

-    

-    private String contentAsText() {

-        return document.getText(0, document.getLength());

-    }

-

-    private void assertCount(int expected, Class<? extends Box> blockClass) {

-        int count = count(blockClass);

-        String message =   "expected count of <"

-                         + blockClass.getSimpleName()

-                         + ">: <"

-                         + expected

-                         + "> but was: <"

-                         + count

-                         + ">\n"

-                         + "Actual layout stack trace:\n"

-                         + layoutStackToString();

-        assertEquals(message, expected, count);

-    }

-

-    private int count(final Class<? extends Box> blockClass) {

-        final int[] mutableInteger = new int[1];

-        mutableInteger[0] = 0;

-        travelLayoutStack(new StackVisitor() {

-

-            public void visit(StackElement element) {

-                if (element.box.getClass().equals(blockClass)) {

-                    mutableInteger[0]++;

-                }

-            }

-

-        });

-        return mutableInteger[0];

-    }

-

-    private String layoutStackToString() {

-        final StringBuilder result = new StringBuilder();

-        travelLayoutStack(new StackVisitor() {

-

-            public void visit(StackElement element) {

-                if (element.indent > 0) {

-                    char[] indentChars = new char[element.indent * 2];

-                    Arrays.fill(indentChars, ' ');

-                    result.append(indentChars);

-                }

-                result.append(element.box.getClass().getSimpleName());

-                result.append('\n');

-

-            }

-

-        });

-        return result.toString();

-    }

-

-    private void travelLayoutStack(StackVisitor visitor) {

-

-        // already layouted?

-        Box[] rootElementChildren = rootBox.getChildren()[0].getChildren();

-        if (rootElementChildren == null || rootElementChildren.length == 0) {

-            rootBox.layout(this.context, 0, Integer.MAX_VALUE);

-        }

-

-        Stack<StackElement> stack = new Stack<StackElement>();

-        stack.push(new StackElement(0, rootBox));

-        while (!stack.isEmpty()) {

-            StackElement current = stack.pop();

-            visitor.visit(current);

-

-            // iterate deep-first

-            Box[] children = current.box.getChildren();

-            for (int i = 0; i < children.length; i++) {

-                stack.push(new StackElement(current.indent + 1, children[i]));

-            }

-        }

-    }

-

-}

+/*******************************************************************************
+ * Copyright (c) 2009 Holger Voormann and others.
+ * 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
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Holger Voormann - initial API and implementation
+ *     Igor Jacy Lino Campista - Java 5 warnings fixed (bug 311325)
+ *******************************************************************************/
+package org.eclipse.wst.xml.vex.core.internal.layout;
+
+import java.util.Arrays;
+import java.util.Stack;
+
+import junit.framework.TestCase;
+
+import org.eclipse.wst.xml.vex.core.internal.core.DisplayDevice;
+import org.eclipse.wst.xml.vex.core.internal.css.MockDisplayDevice;
+import org.eclipse.wst.xml.vex.core.internal.css.StyleSheet;
+import org.eclipse.wst.xml.vex.core.internal.css.StyleSheetReader;
+import org.eclipse.wst.xml.vex.core.internal.dom.Document;
+import org.eclipse.wst.xml.vex.core.internal.dom.Element;
+import org.eclipse.wst.xml.vex.core.internal.dom.RootElement;
+import org.eclipse.wst.xml.vex.core.internal.provisional.dom.I.VEXDocument;
+
+public class TableLayoutTest extends TestCase {
+
+    private static interface StackVisitor {
+        void visit(StackElement element);
+    }
+
+    private static class StackElement {
+        public final int indent;
+        public final Box box;
+        public StackElement(int indent, Box box) {
+            this.indent = indent;
+            this.box = box;
+        }
+    }
+
+    private LayoutContext context;
+    private VEXDocument document;
+    private RootBox rootBox;
+    private int caretPosition;
+
+    @Override
+    protected void setUp() throws Exception {
+
+        // display dummy
+        DisplayDevice.setCurrent(new MockDisplayDevice(90, 90));
+
+        // context dummy
+        context = new LayoutContext();
+        context.setBoxFactory(new MockBoxFactory());
+        context.setGraphics(new FakeGraphics());
+
+        // set CSS
+        String css =   "root   {display:block}"
+                     + "inline {display:inline}"
+                     + "table  {display:table}"
+                     + "tcap   {display:table-caption}"
+                     + "td     {display:table-cell}"
+                     + "tc     {display:table-column}"
+                     + "tcg    {display:table-column-group}"
+                     + "tfg    {display:table-footer-group}"
+                     + "thg    {display:table-header-group}"
+                     + "tr     {display:table-row}"
+                     + "trg    {display:table-row-group}";
+        StyleSheet styleSheet = new StyleSheetReader().read(css);
+        context.setStyleSheet(styleSheet);
+
+        resetDocument();
+    }
+
+    @Override
+    protected void tearDown() throws Exception {
+        rootBox = null;
+        document = null;
+        context = null;
+    }
+
+    private void resetDocument() {
+        document = new Document(new RootElement("root"));
+        context.setDocument(document);
+        caretPosition = 1;
+        rootBox = new RootBox(this.context, document.getRootElement(), 500);
+    }
+
+    private void insertElement(String elementName) {
+        document.insertElement(caretPosition, new Element(elementName));
+        caretPosition++;
+    }
+
+    private void insertText(String text) {
+        document.insertText(caretPosition, text);;
+        caretPosition += text.length();
+    }
+
+    public void testValidTable() throws Exception {
+
+        // single cell Table
+        insertElement("table");
+        insertElement("tr");
+        insertElement("td");
+        insertText("a");
+        assertCount(1, TableBox.class);
+        assertCount(1, TableRowBox.class);
+        assertCount(1, TableCellBox.class);
+        assertCount(1, DocumentTextBox.class);
+        assertEquals("a", contentAsText());
+
+        // 2x2 table plus text
+        resetDocument();
+        insertText("_");
+        insertElement("table");
+        insertElement("tr");
+        insertElement("td");
+        insertText("a");
+        caretPosition++;
+        insertElement("td");
+        insertText("b");
+        caretPosition+=2;
+        insertElement("tr");
+        insertElement("td");
+        insertText("c");
+        caretPosition++;
+        insertElement("td");
+        insertText("d");
+        assertCount(1, TableBox.class);
+        assertCount(2, TableRowBox.class);
+        assertCount(4, TableCellBox.class);
+        assertCount(5, DocumentTextBox.class);
+        assertEquals("_abcd", contentAsText());
+    }
+
+    // table elements outside table (separately tested to improve tracing if
+    // StackOverflowError will be thrown)
+    public void testCaptionOutsideTable()     { test("tcap"); }
+    public void testCellOutsideTable()        { test("td"); }
+    public void testColumnOutsideTable()      { test("tc"); }
+    public void testColumnGroupOutsideTable() { test("tcg"); }
+    public void testFooterGroupOutsideTable() { test("tfg"); }
+    public void testHeaderGroupOutsideTable() { test("thg"); }
+    public void testRowOutsideTable()         { test("tr"); }
+    public void testRowGroupOutsideTable()    { test("trg"); }
+    
+    // invalid nested table elements (separately tested to improve tracing if
+    // StackOverflowError will be thrown)
+    public void testInvalidNesting1() { test("inline", "tcap"); }
+    public void testInvalidNesting2() { test("table", "td"); }
+    public void testInvalidNesting3() { test("td", "tr"); }
+    public void testInvalidNesting4() { test("trg", "trg"); }
+    public void testInvalidNesting5() { test("tr", "tfg"); }
+    public void testInvalidNesting6() { test("td", "thg"); }
+    public void testInvalidNesting7() { test("table", "tc"); }
+    public void testInvalidNesting8() { test("thg", "tcg"); }
+    
+    public void test(String ... elements) {
+        resetDocument();
+        insertElement("inline");
+        for (String element : elements) {
+        	insertElement(element);
+		}
+        insertText("x");
+        assertCount(1, DocumentTextBox.class);
+        assertEquals("x", contentAsText());
+    }
+    
+    private String contentAsText() {
+        return document.getText(0, document.getLength());
+    }
+
+    private void assertCount(int expected, Class<? extends Box> blockClass) {
+        int count = count(blockClass);
+        String message =   "expected count of <"
+                         + blockClass.getSimpleName()
+                         + ">: <"
+                         + expected
+                         + "> but was: <"
+                         + count
+                         + ">\n"
+                         + "Actual layout stack trace:\n"
+                         + layoutStackToString();
+        assertEquals(message, expected, count);
+    }
+
+    private int count(final Class<? extends Box> blockClass) {
+        final int[] mutableInteger = new int[1];
+        mutableInteger[0] = 0;
+        travelLayoutStack(new StackVisitor() {
+
+            public void visit(StackElement element) {
+                if (element.box.getClass().equals(blockClass)) {
+                    mutableInteger[0]++;
+                }
+            }
+
+        });
+        return mutableInteger[0];
+    }
+
+    private String layoutStackToString() {
+        final StringBuilder result = new StringBuilder();
+        travelLayoutStack(new StackVisitor() {
+
+            public void visit(StackElement element) {
+                if (element.indent > 0) {
+                    char[] indentChars = new char[element.indent * 2];
+                    Arrays.fill(indentChars, ' ');
+                    result.append(indentChars);
+                }
+                result.append(element.box.getClass().getSimpleName());
+                result.append('\n');
+
+            }
+
+        });
+        return result.toString();
+    }
+
+    private void travelLayoutStack(StackVisitor visitor) {
+
+        // already layouted?
+        Box[] rootElementChildren = rootBox.getChildren()[0].getChildren();
+        if (rootElementChildren == null || rootElementChildren.length == 0) {
+            rootBox.layout(this.context, 0, Integer.MAX_VALUE);
+        }
+
+        Stack<StackElement> stack = new Stack<StackElement>();
+        stack.push(new StackElement(0, rootBox));
+        while (!stack.isEmpty()) {
+            StackElement current = stack.pop();
+            visitor.visit(current);
+
+            // iterate deep-first
+            for (Box child : current.box.getChildren()) {
+            	stack.push(new StackElement(current.indent + 1, child));
+			}
+        }
+    }
+
+}
\ No newline at end of file
diff --git a/sourceediting/tests/org.eclipse.wst.xml.vex.core.tests/src_emf/org/eclipse/wst/xml/vex/core/internal/provisional/dom/tests/MockCssWhitespacePolicy.java b/sourceediting/tests/org.eclipse.wst.xml.vex.core.tests/src_emf/org/eclipse/wst/xml/vex/core/internal/provisional/dom/tests/MockCssWhitespacePolicy.java
index 18b7d24..d448e84 100644
--- a/sourceediting/tests/org.eclipse.wst.xml.vex.core.tests/src_emf/org/eclipse/wst/xml/vex/core/internal/provisional/dom/tests/MockCssWhitespacePolicy.java
+++ b/sourceediting/tests/org.eclipse.wst.xml.vex.core.tests/src_emf/org/eclipse/wst/xml/vex/core/internal/provisional/dom/tests/MockCssWhitespacePolicy.java
@@ -7,6 +7,7 @@
  * 
  * Contributors:
  *     John Krasnay - initial API and implementation
+ *     Igor Jacy Lino Campista - Java 5 warnings fixed (bug 311325)
  *******************************************************************************/
 package org.eclipse.wst.xml.vex.core.internal.provisional.dom.tests;
 
@@ -15,7 +16,7 @@
 import org.eclipse.wst.xml.vex.core.internal.provisional.dom.I.VEXElement;
 
 /**
- * Implementation of WhitespacePolicy using a CSS stylesheet.
+ * Mock implementation of WhitespacePolicy using a CSS stylesheet.
  */
 public class MockCssWhitespacePolicy implements IWhitespacePolicy {
 
@@ -26,7 +27,6 @@
 	 *            The stylesheet used for the policy.
 	 */
 	public MockCssWhitespacePolicy(StyleSheet styleSheet) {
-		this.styleSheet = styleSheet;
 	}
 
 	public boolean isBlock(VEXElement element) {
@@ -37,8 +37,4 @@
 		return false;
 	}
 
-	// ===================================================== PRIVATE
-
-	private StyleSheet styleSheet;
-
 }
diff --git a/sourceediting/tests/org.eclipse.wst.xml.vex.core.tests/src_emf/org/eclipse/wst/xml/vex/core/internal/provisional/dom/tests/MockDocumentBuilder.java b/sourceediting/tests/org.eclipse.wst.xml.vex.core.tests/src_emf/org/eclipse/wst/xml/vex/core/internal/provisional/dom/tests/MockDocumentBuilder.java
index 379dd8c..42f10a4 100644
--- a/sourceediting/tests/org.eclipse.wst.xml.vex.core.tests/src_emf/org/eclipse/wst/xml/vex/core/internal/provisional/dom/tests/MockDocumentBuilder.java
+++ b/sourceediting/tests/org.eclipse.wst.xml.vex.core.tests/src_emf/org/eclipse/wst/xml/vex/core/internal/provisional/dom/tests/MockDocumentBuilder.java
@@ -128,7 +128,7 @@
 
 		try {
 			VEXElement element;
-			if (stack.size() == 0) {
+			if (stack.isEmpty()) {
 				rootElement = DomEMFFactoryImpl.eINSTANCE.createVEXElement();
 				rootElement.setName(qName);
 				element = this.rootElement;
@@ -223,8 +223,7 @@
 
 		StringBuffer sb;
 
-		StackEntry entry = this.stack.size() > 0 ? (StackEntry) this.stack
-				.getLast() : null;
+		StackEntry entry = this.stack.isEmpty() ? null : this.stack.getLast();
 
 		if (entry != null && entry.pre) {
 
diff --git a/sourceediting/tests/org.eclipse.wst.xml.vex.ui.tests/META-INF/MANIFEST.MF b/sourceediting/tests/org.eclipse.wst.xml.vex.ui.tests/META-INF/MANIFEST.MF
index 6493923..f1fe955 100644
--- a/sourceediting/tests/org.eclipse.wst.xml.vex.ui.tests/META-INF/MANIFEST.MF
+++ b/sourceediting/tests/org.eclipse.wst.xml.vex.ui.tests/META-INF/MANIFEST.MF
@@ -13,3 +13,4 @@
 Export-Package: org.eclipse.wst.xml.vex.ui.internal.editor.tests;x-internal:=true,
  org.eclipse.wst.xml.vex.ui.internal.tests;x-internal:=true,
  org.eclipse.wst.xml.vex.ui.tests
+Bundle-Localization: plugin
diff --git a/sourceediting/tests/org.eclipse.wst.xml.vex.ui.tests/build.properties b/sourceediting/tests/org.eclipse.wst.xml.vex.ui.tests/build.properties
index 34d2e4d..aa1a008 100644
--- a/sourceediting/tests/org.eclipse.wst.xml.vex.ui.tests/build.properties
+++ b/sourceediting/tests/org.eclipse.wst.xml.vex.ui.tests/build.properties
@@ -1,4 +1,5 @@
 source.. = src/
 output.. = bin/
 bin.includes = META-INF/,\
-               .
+               .,\
+               plugin.properties