A massive organize imports and formatting of the sources using default Eclipse code...
[phpeclipse.git] / net.sourceforge.phpeclipse.xml.ui / src / net / sourceforge / phpeclipse / xml / ui / internal / outline / XMLOutlinePage.java
index a07f25a..0daae7d 100644 (file)
@@ -8,13 +8,19 @@
  * Contributors:
  *     Christopher Lenz - initial API and implementation
  * 
- * $Id: XMLOutlinePage.java,v 1.1 2004-09-02 18:28:05 jsurfer Exp $
+ * $Id: XMLOutlinePage.java,v 1.3 2006-10-21 23:14:14 pombredanne Exp $
  */
 
 package net.sourceforge.phpeclipse.xml.ui.internal.outline;
 
 import java.util.List;
 
+import net.sourceforge.phpeclipse.core.model.ISourceReference;
+import net.sourceforge.phpeclipse.ui.views.outline.ProblemsLabelDecorator;
+import net.sourceforge.phpeclipse.xml.core.model.IXMLDocument;
+import net.sourceforge.phpeclipse.xml.ui.internal.editor.XMLDocumentProvider;
+import net.sourceforge.phpeclipse.xml.ui.internal.editor.XMLEditor;
+
 import org.eclipse.jface.viewers.DecoratingLabelProvider;
 import org.eclipse.jface.viewers.ISelection;
 import org.eclipse.jface.viewers.IStructuredSelection;
@@ -25,12 +31,6 @@ import org.eclipse.swt.widgets.Control;
 import org.eclipse.ui.texteditor.IDocumentProvider;
 import org.eclipse.ui.views.contentoutline.ContentOutlinePage;
 
-import net.sourceforge.phpeclipse.core.model.ISourceReference;
-import net.sourceforge.phpeclipse.ui.views.outline.ProblemsLabelDecorator;
-import net.sourceforge.phpeclipse.xml.core.model.IXMLDocument;
-import net.sourceforge.phpeclipse.xml.ui.internal.editor.XMLDocumentProvider;
-import net.sourceforge.phpeclipse.xml.ui.internal.editor.XMLEditor;
-
 /**
  * Implements the outline page associated with the XML editor.
  */
@@ -48,7 +48,8 @@ public class XMLOutlinePage extends ContentOutlinePage {
        /**
         * Constructor.
         * 
-        * @param editor The associated text editor
+        * @param editor
+        *            The associated text editor
         */
        public XMLOutlinePage(XMLEditor editor) {
                this.editor = editor;
@@ -64,8 +65,8 @@ public class XMLOutlinePage extends ContentOutlinePage {
                TreeViewer viewer = getTreeViewer();
                viewer.setContentProvider(new XMLOutlineContentProvider());
                viewer.setLabelProvider(new DecoratingLabelProvider(
-                               new XMLOutlineLabelProvider(),
-                               new ProblemsLabelDecorator(editor)));
+                               new XMLOutlineLabelProvider(), new ProblemsLabelDecorator(
+                                               editor)));
                viewer.setInput(getDocument());
        }
 
@@ -74,15 +75,15 @@ public class XMLOutlinePage extends ContentOutlinePage {
        /**
         * Selects a specific element in the outline page.
         * 
-        * @param element the element to select
+        * @param element
+        *            the element to select
         */
        public void select(ISourceReference element) {
                TreeViewer viewer = getTreeViewer();
                if (viewer != null) {
                        ISelection selection = viewer.getSelection();
                        if (selection instanceof IStructuredSelection) {
-                               IStructuredSelection structuredSelection =
-                                       (IStructuredSelection) selection;
+                               IStructuredSelection structuredSelection = (IStructuredSelection) selection;
                                List elements = structuredSelection.toList();
                                if (!elements.contains(element)) {
                                        if (element == null) {
@@ -118,7 +119,7 @@ public class XMLOutlinePage extends ContentOutlinePage {
        // Private Methods ---------------------------------------------------------
 
        /**
-        * Returns the parsed model of the XML document that is loaded into the 
+        * Returns the parsed model of the XML document that is loaded into the
         * associated editor.
         * 
         * @return the parsed XML document