/*
- * Copyright (c) 2000-2006 JetBrains s.r.o. All Rights Reserved.
+ * Copyright 2000-2009 JetBrains s.r.o.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*/
package com.intellij.util.xml.ui;
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.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 javax.swing.table.TableCellEditor;
import java.awt.*;
import java.lang.reflect.Type;
-import java.util.List;
/**
* @author peter
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