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 / text / XMLReconcileStep.java
index 3b54d70..4bfbac7 100644 (file)
@@ -8,7 +8,7 @@
  * Contributors:
  *     Christopher Lenz - initial API and implementation
  * 
- * $Id: XMLReconcileStep.java,v 1.1 2004-09-02 18:28:03 jsurfer Exp $
+ * $Id: XMLReconcileStep.java,v 1.2 2006-10-21 23:14:13 pombredanne Exp $
  */
 
 package net.sourceforge.phpeclipse.xml.ui.internal.text;
@@ -95,13 +95,14 @@ public class XMLReconcileStep extends AbstractReconcileStep {
         */
        private class ProblemAdapter extends AnnotationAdapter {
                private IProblem problem;
+
                private Position position;
 
-               public ProblemAdapter(IProblem problem)  {
+               public ProblemAdapter(IProblem problem) {
                        this.problem = problem;
                }
 
-               public Position getPosition()  {
+               public Position getPosition() {
                        if (position == null) {
                                position = createPositionFromProblem();
                        }
@@ -168,8 +169,10 @@ public class XMLReconcileStep extends AbstractReconcileStep {
        /**
         * Constructor.
         * 
-        * @param step the step to add to the pipe
-        * @param editor the associated text editor
+        * @param step
+        *            the step to add to the pipe
+        * @param editor
+        *            the associated text editor
         */
        public XMLReconcileStep(IReconcileStep step, ITextEditor editor) {
                super(step);
@@ -184,21 +187,19 @@ public class XMLReconcileStep extends AbstractReconcileStep {
        /*
         * @see AbstractReconcileStep#reconcileModel(DirtyRegion, IRegion)
         */
-       protected IReconcileResult[] reconcileModel(
-               DirtyRegion dirtyRegion, IRegion subRegion
-       ) {
+       protected IReconcileResult[] reconcileModel(DirtyRegion dirtyRegion,
+                       IRegion subRegion) {
                IXMLDocument model = xmlDocumentAdapter.getDocument();
 
-               
                IEditorInput editorInput = null;
                IFile file = null;
-           if (editor != null) {
-             editorInput = editor.getEditorInput();
-           }
+               if (editor != null) {
+                       editorInput = editor.getEditorInput();
+               }
 
-           if (editorInput instanceof IFileEditorInput)
-             file = ((IFileEditorInput) editorInput).getFile();
-           ProblemCollector problemCollector = new ProblemCollector();
+               if (editorInput instanceof IFileEditorInput)
+                       file = ((IFileEditorInput) editorInput).getFile();
+               ProblemCollector problemCollector = new ProblemCollector();
                model.reconcile(problemCollector, file);
 
                List problems = problemCollector.getProblems();
@@ -226,8 +227,7 @@ public class XMLReconcileStep extends AbstractReconcileStep {
        private IXMLDocument getXMLDocument() {
                IDocumentProvider documentProvider = editor.getDocumentProvider();
                if (documentProvider instanceof XMLDocumentProvider) {
-                       XMLDocumentProvider xmlDocumentProvider =
-                                       (XMLDocumentProvider) documentProvider;
+                       XMLDocumentProvider xmlDocumentProvider = (XMLDocumentProvider) documentProvider;
                        return xmlDocumentProvider.getModel(editor.getEditorInput());
                }