cleanup
authorAlexey Kudravtsev <cdr@intellij.com>
Fri, 13 Aug 2010 10:04:15 +0000 (14:04 +0400)
committerAlexey Kudravtsev <cdr@intellij.com>
Fri, 13 Aug 2010 15:26:58 +0000 (19:26 +0400)
xml/dom-impl/src/com/intellij/util/xml/ui/DomUIFactoryImpl.java

index 3d47784530c26dde1486343d93f6e65c5a3a2dab..3de36f3e6c4cc05bf40329d1fd09f45a9c813532 100644 (file)
@@ -24,6 +24,7 @@ import com.intellij.openapi.editor.event.DocumentAdapter;
 import com.intellij.openapi.editor.event.DocumentEvent;
 import com.intellij.openapi.editor.impl.EditorComponentImpl;
 import com.intellij.openapi.project.Project;
 import com.intellij.openapi.editor.event.DocumentEvent;
 import com.intellij.openapi.editor.impl.EditorComponentImpl;
 import com.intellij.openapi.project.Project;
+import com.intellij.openapi.util.TextRange;
 import com.intellij.psi.PsiDocumentManager;
 import com.intellij.psi.xml.XmlFile;
 import com.intellij.ui.BooleanTableCellEditor;
 import com.intellij.psi.PsiDocumentManager;
 import com.intellij.psi.xml.XmlFile;
 import com.intellij.ui.BooleanTableCellEditor;
@@ -31,7 +32,6 @@ import com.intellij.ui.UserActivityListener;
 import com.intellij.ui.UserActivityWatcher;
 import com.intellij.util.Function;
 import com.intellij.util.ReflectionUtil;
 import com.intellij.ui.UserActivityWatcher;
 import com.intellij.util.Function;
 import com.intellij.util.ReflectionUtil;
-import com.intellij.util.SmartList;
 import com.intellij.util.containers.ClassMap;
 import com.intellij.util.xml.DomElement;
 import com.intellij.util.xml.DomUtil;
 import com.intellij.util.containers.ClassMap;
 import com.intellij.util.xml.DomElement;
 import com.intellij.util.xml.DomUtil;
@@ -45,7 +45,6 @@ import javax.swing.border.EmptyBorder;
 import javax.swing.table.TableCellEditor;
 import java.awt.*;
 import java.lang.reflect.Type;
 import javax.swing.table.TableCellEditor;
 import java.awt.*;
 import java.lang.reflect.Type;
-import java.util.List;
 
 /**
  * @author peter
 
 /**
  * @author peter
@@ -152,10 +151,9 @@ public class DomUIFactoryImpl extends DomUIFactory {
 
         psiDocumentManager.commitAllDocuments();
 
 
         psiDocumentManager.commitAllDocuments();
 
-        final List<HighlightingPass> result = new SmartList<HighlightingPass>();
-        result.add(new GeneralHighlightingPass(project, psiFile, document, 0, document.getTextLength(), true));
-        result.add(new LocalInspectionsPass(psiFile, document, 0, document.getTextLength()));
-        return result.toArray(new HighlightingPass[result.size()]);
+        GeneralHighlightingPass ghp = new GeneralHighlightingPass(project, psiFile, document, 0, document.getTextLength(), true, new TextRange(0, 0));
+        LocalInspectionsPass lip = new LocalInspectionsPass(psiFile, document, 0, document.getTextLength());
+        return new HighlightingPass[]{ghp, lip};
       }
 
       @NotNull
       }
 
       @NotNull