mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-04-22 06:21:25 +07:00
fixing ant completion. just a mystery: special hacking filters for xml insertion handlers are not needed now
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
package com.intellij.codeInsight.completion;
|
||||
|
||||
import com.intellij.codeInsight.CodeInsightUtil;
|
||||
import com.intellij.codeInsight.TailType;
|
||||
import com.intellij.codeInsight.lookup.Lookup;
|
||||
import com.intellij.codeInsight.lookup.LookupItem;
|
||||
@@ -112,15 +111,15 @@ public class XmlCompletionData extends CompletionData {
|
||||
}
|
||||
|
||||
protected ElementFilter createAttributeCompletionFilter() {
|
||||
return ourNotAntElementFilter;
|
||||
return TrueFilter.INSTANCE;
|
||||
}
|
||||
|
||||
protected ElementFilter createAttributeValueCompletionFilter() {
|
||||
return ourNotAntElementFilter;
|
||||
return TrueFilter.INSTANCE;
|
||||
}
|
||||
|
||||
protected ElementFilter createTagCompletionFilter() {
|
||||
return ourNotAntElementFilter;
|
||||
return TrueFilter.INSTANCE;
|
||||
}
|
||||
|
||||
private static class XmlAttributeValueInsertHandler extends DefaultInsertHandler {
|
||||
@@ -449,16 +448,4 @@ public class XmlCompletionData extends CompletionData {
|
||||
caretModel.moveToOffset(caretModel.getOffset() + 1);
|
||||
}
|
||||
}
|
||||
|
||||
private static class NotAntElementFilter implements ElementFilter {
|
||||
public boolean isAcceptable(Object element, PsiElement context) {
|
||||
return !CodeInsightUtil.isAntFile(context.getContainingFile());
|
||||
}
|
||||
|
||||
public boolean isClassAcceptable(Class hintClass) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
private static NotAntElementFilter ourNotAntElementFilter = new NotAntElementFilter();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user