mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Merge remote branch 'origin/master'
This commit is contained in:
@@ -4,7 +4,13 @@ import com.intellij.openapi.util.text.StringUtil;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
final class DefaultRegExpPropertiesProvider implements RegExpPropertiesProvider {
|
||||
public final class DefaultRegExpPropertiesProvider {
|
||||
private static final DefaultRegExpPropertiesProvider INSTANCE = new DefaultRegExpPropertiesProvider();
|
||||
|
||||
public static DefaultRegExpPropertiesProvider getInstance() {
|
||||
return INSTANCE;
|
||||
}
|
||||
|
||||
private final String[][] myPropertyNames = {
|
||||
{ "Cn", "UNASSIGNED" },
|
||||
{ "Lu", "UPPERCASE_LETTER" },
|
||||
@@ -98,10 +104,9 @@ final class DefaultRegExpPropertiesProvider implements RegExpPropertiesProvider
|
||||
{"e", "escape character ('\\u001B')"}
|
||||
};
|
||||
|
||||
public DefaultRegExpPropertiesProvider() {
|
||||
private DefaultRegExpPropertiesProvider() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isValidCategory(@NotNull String category) {
|
||||
if (category.startsWith("In")) {
|
||||
try {
|
||||
@@ -121,7 +126,6 @@ final class DefaultRegExpPropertiesProvider implements RegExpPropertiesProvider
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Nullable
|
||||
public String getPropertyDescription(@Nullable final String name) {
|
||||
if (StringUtil.isEmptyOrSpaces(name)) {
|
||||
@@ -135,14 +139,12 @@ final class DefaultRegExpPropertiesProvider implements RegExpPropertiesProvider
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
@NotNull
|
||||
public String[][] getAllKnownProperties() {
|
||||
return myPropertyNames;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public String[][] getKnownCharacterClasses() {
|
||||
return myCharacterClasses;
|
||||
}
|
||||
|
||||
@@ -90,7 +90,7 @@ public final class RegExpCompletionContributor extends CompletionContributor {
|
||||
public void addCompletions(@NotNull final CompletionParameters parameters,
|
||||
final ProcessingContext context,
|
||||
@NotNull final CompletionResultSet result) {
|
||||
for (String[] stringArray : getProvider(parameters).getAllKnownProperties()) {
|
||||
for (String[] stringArray : RegExpLanguageHosts.getInstance().getAllKnownProperties(parameters.getPosition())) {
|
||||
result.addElement(
|
||||
TailTypeDecorator.withTail(createLookupElement(stringArray[0], null, emptyIcon), TailType.createSimpleTailType('}')));
|
||||
}
|
||||
@@ -102,7 +102,7 @@ public final class RegExpCompletionContributor extends CompletionContributor {
|
||||
public void addCompletions(@NotNull final CompletionParameters parameters,
|
||||
final ProcessingContext context,
|
||||
@NotNull final CompletionResultSet result) {
|
||||
for (String[] stringArray : getProvider(parameters).getAllKnownProperties()) {
|
||||
for (String[] stringArray : RegExpLanguageHosts.getInstance().getAllKnownProperties(parameters.getPosition())) {
|
||||
addLookupElement(result, "{" + stringArray[0] + "}", stringArray.length > 1 ? stringArray[1]:null, PlatformIcons.PROPERTY_ICON);
|
||||
}
|
||||
}
|
||||
@@ -114,19 +114,13 @@ public final class RegExpCompletionContributor extends CompletionContributor {
|
||||
final ProcessingContext context,
|
||||
@NotNull final CompletionResultSet result)
|
||||
{
|
||||
final RegExpPropertiesProvider provider = getProvider(parameters);
|
||||
for (final String[] completion : provider.getKnownCharacterClasses()) {
|
||||
for (final String[] completion : RegExpLanguageHosts.getInstance().getKnownCharacterClasses(parameters.getPosition())) {
|
||||
addLookupElement(result, completion[0], completion[1], emptyIcon);
|
||||
}
|
||||
|
||||
for (String[] stringArray : provider.getAllKnownProperties()) {
|
||||
for (String[] stringArray : RegExpLanguageHosts.getInstance().getAllKnownProperties(parameters.getPosition())) {
|
||||
addLookupElement(result, "p{" + stringArray[0] + "}", stringArray.length > 1? stringArray[1]:null, PlatformIcons.PROPERTY_ICON);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@NotNull
|
||||
private static RegExpPropertiesProvider getProvider(@NotNull final CompletionParameters parameters) {
|
||||
return RegExpPropertiesProviders.getInstance().forLanguage(parameters.getOriginalFile().getLanguage());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -34,7 +34,7 @@ public final class RegExpDocumentationProvider extends AbstractDocumentationProv
|
||||
final RegExpProperty prop = (RegExpProperty)element;
|
||||
final ASTNode node = prop.getCategoryNode();
|
||||
if (node != null) {
|
||||
final String description = RegExpPropertiesProviders.forNode(node).getPropertyDescription(node.getText());
|
||||
final String description = RegExpLanguageHosts.getInstance().getPropertyDescription(node.getPsi(), node.getText());
|
||||
if (description != null) {
|
||||
if (prop.isNegated()) {
|
||||
return "Property block stands for characters not matching " + description;
|
||||
|
||||
@@ -16,6 +16,8 @@
|
||||
package org.intellij.lang.regexp;
|
||||
|
||||
import org.intellij.lang.regexp.psi.RegExpGroup;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
/**
|
||||
* @author yole
|
||||
@@ -26,4 +28,12 @@ public interface RegExpLanguageHost {
|
||||
boolean supportsPossessiveQuantifiers();
|
||||
boolean supportsPythonConditionalRefs();
|
||||
boolean supportsNamedGroupSyntax(RegExpGroup group);
|
||||
|
||||
boolean isValidCategory(@NotNull String category);
|
||||
@NotNull
|
||||
String[][] getAllKnownProperties();
|
||||
@Nullable
|
||||
String getPropertyDescription(@Nullable final String name);
|
||||
@NotNull
|
||||
String[][] getKnownCharacterClasses();
|
||||
}
|
||||
|
||||
@@ -15,15 +15,110 @@
|
||||
*/
|
||||
package org.intellij.lang.regexp;
|
||||
|
||||
import com.intellij.lang.injection.InjectedLanguageManager;
|
||||
import com.intellij.openapi.util.ClassExtension;
|
||||
import com.intellij.psi.PsiComment;
|
||||
import com.intellij.psi.PsiElement;
|
||||
import com.intellij.psi.PsiLanguageInjectionHost;
|
||||
import org.intellij.lang.regexp.psi.RegExpChar;
|
||||
import org.intellij.lang.regexp.psi.RegExpGroup;
|
||||
import org.intellij.lang.regexp.psi.RegExpPyCondRef;
|
||||
import org.intellij.lang.regexp.psi.RegExpQuantifier;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
/**
|
||||
* @author yole
|
||||
*/
|
||||
public class RegExpLanguageHosts extends ClassExtension<RegExpLanguageHost> {
|
||||
public static final RegExpLanguageHosts INSTANCE = new RegExpLanguageHosts();
|
||||
public final class RegExpLanguageHosts extends ClassExtension<RegExpLanguageHost> {
|
||||
private static final RegExpLanguageHosts INSTANCE = new RegExpLanguageHosts();
|
||||
private final DefaultRegExpPropertiesProvider myDefaultProvider;
|
||||
|
||||
public static RegExpLanguageHosts getInstance() {
|
||||
return INSTANCE;
|
||||
}
|
||||
|
||||
private RegExpLanguageHosts() {
|
||||
super("com.intellij.regExpLanguageHost");
|
||||
myDefaultProvider = DefaultRegExpPropertiesProvider.getInstance();
|
||||
}
|
||||
|
||||
@Nullable
|
||||
private static RegExpLanguageHost findRegExpHost(@Nullable final PsiElement element) {
|
||||
if (element == null) {
|
||||
return null;
|
||||
}
|
||||
PsiLanguageInjectionHost host = InjectedLanguageManager.getInstance(element.getProject()).getInjectionHost(element);
|
||||
if (host instanceof RegExpLanguageHost) {
|
||||
return (RegExpLanguageHost)host;
|
||||
}
|
||||
if (host != null) {
|
||||
return INSTANCE.forClass(host.getClass());
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public boolean isRedundantEscape(@NotNull final RegExpChar ch, @NotNull final String text) {
|
||||
if (text.length() <= 1) {
|
||||
return false;
|
||||
}
|
||||
final RegExpLanguageHost host = findRegExpHost(ch);
|
||||
if (host != null) {
|
||||
final char c = text.charAt(1);
|
||||
final boolean needsEscaping = host.characterNeedsEscaping(c);
|
||||
return !needsEscaping;
|
||||
}
|
||||
else {
|
||||
return !("\\]".equals(text) || "\\}".equals(text));
|
||||
}
|
||||
}
|
||||
|
||||
public boolean supportsNamedGroupSyntax(@Nullable final RegExpGroup group) {
|
||||
final RegExpLanguageHost host = findRegExpHost(group);
|
||||
return host != null && host.supportsNamedGroupSyntax(group);
|
||||
}
|
||||
|
||||
public boolean supportsPerl5EmbeddedComments(@Nullable final PsiComment comment) {
|
||||
final RegExpLanguageHost host = findRegExpHost(comment);
|
||||
return host != null && host.supportsPerl5EmbeddedComments();
|
||||
}
|
||||
|
||||
public boolean supportsPythonConditionalRefs(@Nullable final RegExpPyCondRef condRef) {
|
||||
final RegExpLanguageHost host = findRegExpHost(condRef);
|
||||
return host != null && host.supportsPythonConditionalRefs();
|
||||
}
|
||||
|
||||
public boolean supportsPossessiveQuantifiers(@Nullable final RegExpQuantifier quantifier) {
|
||||
final RegExpLanguageHost host = findRegExpHost(quantifier);
|
||||
return host != null && host.supportsPossessiveQuantifiers();
|
||||
}
|
||||
|
||||
public boolean isValidCategory(@NotNull final PsiElement element, @NotNull String category) {
|
||||
final RegExpLanguageHost host = findRegExpHost(element);
|
||||
if (host == null) {
|
||||
return false;
|
||||
}
|
||||
return host.isValidCategory(category);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public String[][] getAllKnownProperties(@NotNull final PsiElement element) {
|
||||
final RegExpLanguageHost host = findRegExpHost(element);
|
||||
if (host != null) {
|
||||
return host.getAllKnownProperties();
|
||||
}
|
||||
return myDefaultProvider.getAllKnownProperties();
|
||||
}
|
||||
|
||||
@Nullable
|
||||
String getPropertyDescription(@NotNull final PsiElement element, @Nullable final String name) {
|
||||
final RegExpLanguageHost host = findRegExpHost(element);
|
||||
return host == null ? null : host.getPropertyDescription(name);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
String[][] getKnownCharacterClasses(@NotNull final PsiElement element) {
|
||||
final RegExpLanguageHost host = findRegExpHost(element);
|
||||
return host != null ? host.getKnownCharacterClasses() : myDefaultProvider.getKnownCharacterClasses();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,17 +0,0 @@
|
||||
package org.intellij.lang.regexp;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
public interface RegExpPropertiesProvider {
|
||||
boolean isValidCategory(@NotNull String category);
|
||||
|
||||
@Nullable
|
||||
String getPropertyDescription(@Nullable final String name);
|
||||
|
||||
@NotNull
|
||||
String[][] getAllKnownProperties();
|
||||
|
||||
@NotNull
|
||||
String[][] getKnownCharacterClasses();
|
||||
}
|
||||
@@ -1,21 +0,0 @@
|
||||
package org.intellij.lang.regexp;
|
||||
|
||||
import com.intellij.lang.ASTNode;
|
||||
import com.intellij.lang.LanguageExtension;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
public final class RegExpPropertiesProviders extends LanguageExtension<RegExpPropertiesProvider> {
|
||||
private static final RegExpPropertiesProviders INSTANCE = new RegExpPropertiesProviders();
|
||||
|
||||
public static RegExpPropertiesProviders getInstance() {
|
||||
return INSTANCE;
|
||||
}
|
||||
|
||||
public RegExpPropertiesProviders() {
|
||||
super("com.intellij.regExpPropertiesProvider", new DefaultRegExpPropertiesProvider());
|
||||
}
|
||||
|
||||
public static RegExpPropertiesProvider forNode(@NotNull final ASTNode node) {
|
||||
return getInstance().forLanguage(node.getPsi().getContainingFile().getLanguage());
|
||||
}
|
||||
}
|
||||
@@ -25,7 +25,7 @@ import com.intellij.psi.PsiReference;
|
||||
import com.intellij.util.ArrayUtil;
|
||||
import com.intellij.util.IncorrectOperationException;
|
||||
import com.intellij.util.PlatformIcons;
|
||||
import org.intellij.lang.regexp.RegExpPropertiesProviders;
|
||||
import org.intellij.lang.regexp.RegExpLanguageHosts;
|
||||
import org.intellij.lang.regexp.RegExpTT;
|
||||
import org.intellij.lang.regexp.psi.RegExpElementVisitor;
|
||||
import org.intellij.lang.regexp.psi.RegExpProperty;
|
||||
@@ -106,7 +106,7 @@ public class RegExpPropertyImpl extends RegExpElementImpl implements RegExpPrope
|
||||
if (categoryNode != null && categoryNode.getText().startsWith("In") && !categoryNode.getText().startsWith("Intelli")) {
|
||||
return UNICODE_BLOCKS;
|
||||
} else {
|
||||
final String[][] knownProperties = RegExpPropertiesProviders.forNode(getNode()).getAllKnownProperties();
|
||||
final String[][] knownProperties = RegExpLanguageHosts.getInstance().getAllKnownProperties(getElement());
|
||||
final Object[] objects = new Object[knownProperties.length];
|
||||
for (int i = 0; i < objects.length; i++) {
|
||||
final String[] prop = knownProperties[i];
|
||||
|
||||
@@ -21,20 +21,22 @@ import com.intellij.lang.ASTNode;
|
||||
import com.intellij.lang.annotation.Annotation;
|
||||
import com.intellij.lang.annotation.AnnotationHolder;
|
||||
import com.intellij.lang.annotation.Annotator;
|
||||
import com.intellij.lang.injection.InjectedLanguageManager;
|
||||
import com.intellij.psi.PsiComment;
|
||||
import com.intellij.psi.PsiElement;
|
||||
import com.intellij.psi.PsiLanguageInjectionHost;
|
||||
import com.intellij.psi.util.PsiTreeUtil;
|
||||
import org.intellij.lang.regexp.*;
|
||||
import org.intellij.lang.regexp.psi.*;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import java.math.BigInteger;
|
||||
|
||||
public final class RegExpAnnotator extends RegExpElementVisitor implements Annotator {
|
||||
private AnnotationHolder myHolder;
|
||||
private final RegExpLanguageHosts myLanguageHosts;
|
||||
|
||||
public RegExpAnnotator() {
|
||||
myLanguageHosts = RegExpLanguageHosts.getInstance();
|
||||
}
|
||||
|
||||
public void annotate(@NotNull PsiElement psiElement, @NotNull AnnotationHolder holder) {
|
||||
assert myHolder == null : "unsupported concurrent annotator invocation";
|
||||
@@ -95,7 +97,7 @@ public final class RegExpAnnotator extends RegExpElementVisitor implements Annot
|
||||
}
|
||||
else {
|
||||
final String text = ch.getUnescapedText();
|
||||
if (text.startsWith("\\") && isRedundantEscape(ch, text)) {
|
||||
if (text.startsWith("\\") && myLanguageHosts.isRedundantEscape(ch, text)) {
|
||||
final ASTNode astNode = ch.getNode().getFirstChildNode();
|
||||
if (astNode != null && astNode.getElementType() == RegExpTT.REDUNDANT_ESCAPE) {
|
||||
final Annotation a = myHolder.createWeakWarningAnnotation(ch, "Redundant character escape");
|
||||
@@ -105,38 +107,12 @@ public final class RegExpAnnotator extends RegExpElementVisitor implements Annot
|
||||
}
|
||||
}
|
||||
|
||||
private static boolean isRedundantEscape(RegExpChar ch, String text) {
|
||||
if (text.length() <= 1) return false;
|
||||
RegExpLanguageHost host = findRegExpHost(ch);
|
||||
if (host != null) {
|
||||
final char c = text.charAt(1);
|
||||
final boolean needsEscaping = host.characterNeedsEscaping(c);
|
||||
return !needsEscaping;
|
||||
}
|
||||
else {
|
||||
return !("\\]".equals(text) || "\\}".equals(text));
|
||||
}
|
||||
}
|
||||
|
||||
@Nullable
|
||||
private static RegExpLanguageHost findRegExpHost(PsiElement element) {
|
||||
PsiLanguageInjectionHost host = InjectedLanguageManager.getInstance(element.getProject()).getInjectionHost(element);
|
||||
if (host instanceof RegExpLanguageHost) {
|
||||
return (RegExpLanguageHost)host;
|
||||
}
|
||||
if (host != null) {
|
||||
return RegExpLanguageHosts.INSTANCE.forClass(host.getClass());
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public void visitRegExpProperty(RegExpProperty property) {
|
||||
final ASTNode category = property.getCategoryNode();
|
||||
if (category == null) {
|
||||
return;
|
||||
}
|
||||
final RegExpPropertiesProvider provider = RegExpPropertiesProviders.forNode(category);
|
||||
if(!provider.isValidCategory(category.getText())) {
|
||||
if(!myLanguageHosts.isValidCategory(category.getPsi(), category.getText())) {
|
||||
final Annotation a = myHolder.createErrorAnnotation(category, "Unknown character category");
|
||||
if (a != null) {
|
||||
// IDEA-9381
|
||||
@@ -180,8 +156,7 @@ public final class RegExpAnnotator extends RegExpElementVisitor implements Annot
|
||||
}
|
||||
}
|
||||
if (group.isPythonNamedGroup() || group.isRubyNamedGroup()) {
|
||||
RegExpLanguageHost host = findRegExpHost(group);
|
||||
if (host == null || !host.supportsNamedGroupSyntax(group)) {
|
||||
if (!myLanguageHosts.supportsNamedGroupSyntax(group)) {
|
||||
myHolder.createErrorAnnotation(group, "This named group syntax is not supported");
|
||||
}
|
||||
}
|
||||
@@ -212,8 +187,7 @@ public final class RegExpAnnotator extends RegExpElementVisitor implements Annot
|
||||
@Override
|
||||
public void visitComment(PsiComment comment) {
|
||||
if (comment.getText().startsWith("(?#")) {
|
||||
RegExpLanguageHost host = findRegExpHost(comment);
|
||||
if (host == null || !host.supportsPerl5EmbeddedComments()) {
|
||||
if (!myLanguageHosts.supportsPerl5EmbeddedComments(comment)) {
|
||||
myHolder.createErrorAnnotation(comment, "Embedded comments are not supported");
|
||||
}
|
||||
}
|
||||
@@ -221,8 +195,7 @@ public final class RegExpAnnotator extends RegExpElementVisitor implements Annot
|
||||
|
||||
@Override
|
||||
public void visitRegExpPyCondRef(RegExpPyCondRef condRef) {
|
||||
RegExpLanguageHost host = findRegExpHost(condRef);
|
||||
if (host == null || !host.supportsPythonConditionalRefs()) {
|
||||
if (!myLanguageHosts.supportsPythonConditionalRefs(condRef)) {
|
||||
myHolder.createErrorAnnotation(condRef, "Conditional references are not supported");
|
||||
}
|
||||
}
|
||||
@@ -280,8 +253,7 @@ public final class RegExpAnnotator extends RegExpElementVisitor implements Annot
|
||||
}
|
||||
}
|
||||
if (quantifier.getType() == RegExpQuantifier.Type.POSSESSIVE) {
|
||||
RegExpLanguageHost host = findRegExpHost(quantifier);
|
||||
if (host != null && !host.supportsPossessiveQuantifiers()) {
|
||||
if (!myLanguageHosts.supportsPossessiveQuantifiers(quantifier)) {
|
||||
myHolder.createErrorAnnotation(quantifier, "Nested quantifier in regexp");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,8 +19,7 @@ import com.intellij.openapi.application.PathManager;
|
||||
import com.intellij.testFramework.PlatformTestCase;
|
||||
import com.intellij.testFramework.fixtures.CodeInsightFixtureTestCase;
|
||||
import com.intellij.util.ArrayUtil;
|
||||
import org.intellij.lang.regexp.RegExpLanguage;
|
||||
import org.intellij.lang.regexp.RegExpPropertiesProviders;
|
||||
import org.intellij.lang.regexp.DefaultRegExpPropertiesProvider;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.ArrayList;
|
||||
@@ -60,7 +59,7 @@ public class RegExpCompletionTest extends CodeInsightFixtureTestCase {
|
||||
private void doBackSlashVariantsTest() throws Throwable {
|
||||
java.util.List<String> nameList = new ArrayList<String>(Arrays.asList("d", "D", "s", "S", "w", "W", "b", "B", "A", "G", "Z", "z", "Q", "E",
|
||||
"t", "n", "r", "f", "a", "e"));
|
||||
for (String[] stringArray : RegExpPropertiesProviders.getInstance().forLanguage(RegExpLanguage.INSTANCE).getAllKnownProperties()) {
|
||||
for (String[] stringArray : DefaultRegExpPropertiesProvider.getInstance().getAllKnownProperties()) {
|
||||
nameList.add("p{" + stringArray[0] + "}");
|
||||
}
|
||||
myFixture.testCompletionVariants(getInputDataFileName(getTestName(true)), ArrayUtil.toStringArray(nameList));
|
||||
@@ -68,7 +67,7 @@ public class RegExpCompletionTest extends CodeInsightFixtureTestCase {
|
||||
|
||||
public void testPropertyVariants() throws Throwable {
|
||||
java.util.List<String> nameList = new ArrayList<String>();
|
||||
for (String[] stringArray : RegExpPropertiesProviders.getInstance().forLanguage(RegExpLanguage.INSTANCE).getAllKnownProperties()) {
|
||||
for (String[] stringArray : DefaultRegExpPropertiesProvider.getInstance().getAllKnownProperties()) {
|
||||
nameList.add("{" + stringArray[0] + "}");
|
||||
}
|
||||
myFixture.testCompletionVariants(getInputDataFileName(getTestName(true)), ArrayUtil.toStringArray(nameList));
|
||||
|
||||
@@ -394,6 +394,7 @@ public class GenerateEqualsHelper implements Runnable {
|
||||
buffer.append("return 0;\n}");
|
||||
}
|
||||
PsiMethod hashCode = myFactory.createMethodFromText(buffer.toString(), null);
|
||||
hashCode = (PsiMethod)myJavaCodeStyleManager.shortenClassReferences(hashCode);
|
||||
return (PsiMethod)myCodeStyleManager.reformat(hashCode);
|
||||
}
|
||||
|
||||
@@ -471,7 +472,7 @@ public class GenerateEqualsHelper implements Runnable {
|
||||
|
||||
private static void adjustHashCodeToArrays(@NonNls StringBuilder buffer, final PsiField field, final String name) {
|
||||
if (field.getType() instanceof PsiArrayType && hasArraysHashCode(field)) {
|
||||
buffer.append("Arrays.hashCode(");
|
||||
buffer.append("java.util.Arrays.hashCode(");
|
||||
buffer.append(name);
|
||||
buffer.append(")");
|
||||
}
|
||||
|
||||
@@ -16,18 +16,28 @@
|
||||
package com.intellij.psi.impl;
|
||||
|
||||
import com.intellij.openapi.module.Module;
|
||||
import com.intellij.openapi.module.ModuleUtil;
|
||||
import com.intellij.openapi.module.ModuleUtilCore;
|
||||
import com.intellij.openapi.projectRoots.JavaSdk;
|
||||
import com.intellij.openapi.projectRoots.JavaSdkVersion;
|
||||
import com.intellij.openapi.projectRoots.Sdk;
|
||||
import com.intellij.openapi.roots.ModuleRootManager;
|
||||
import org.intellij.lang.regexp.DefaultRegExpPropertiesProvider;
|
||||
import org.intellij.lang.regexp.RegExpLanguageHost;
|
||||
import org.intellij.lang.regexp.psi.RegExpGroup;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
/**
|
||||
* @author yole
|
||||
*/
|
||||
public class JavaRegExpHost implements RegExpLanguageHost {
|
||||
|
||||
private final DefaultRegExpPropertiesProvider myPropertiesProvider;
|
||||
|
||||
public JavaRegExpHost() {
|
||||
myPropertiesProvider = DefaultRegExpPropertiesProvider.getInstance();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean characterNeedsEscaping(char c) {
|
||||
return c == ']' || c == '}';
|
||||
@@ -51,7 +61,7 @@ public class JavaRegExpHost implements RegExpLanguageHost {
|
||||
@Override
|
||||
public boolean supportsNamedGroupSyntax(RegExpGroup group) {
|
||||
if (group.isRubyNamedGroup()) {
|
||||
final Module module = ModuleUtil.findModuleForPsiElement(group);
|
||||
final Module module = ModuleUtilCore.findModuleForPsiElement(group);
|
||||
if (module != null) {
|
||||
final Sdk sdk = ModuleRootManager.getInstance(module).getSdk();
|
||||
if (sdk != null && sdk.getSdkType() instanceof JavaSdk) {
|
||||
@@ -62,4 +72,27 @@ public class JavaRegExpHost implements RegExpLanguageHost {
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isValidCategory(@NotNull String category) {
|
||||
return myPropertiesProvider.isValidCategory(category);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public String[][] getAllKnownProperties() {
|
||||
return myPropertiesProvider.getAllKnownProperties();
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public String getPropertyDescription(@Nullable String name) {
|
||||
return myPropertiesProvider.getPropertyDescription(name);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public String[][] getKnownCharacterClasses() {
|
||||
return myPropertiesProvider.getKnownCharacterClasses();
|
||||
}
|
||||
}
|
||||
|
||||
+1
@@ -583,6 +583,7 @@ public class JavaClassReference extends GenericReference implements PsiJavaRefer
|
||||
return myJavaClassReferenceSet;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public String getUnresolvedMessagePattern() {
|
||||
return myJavaClassReferenceSet.getUnresolvedMessagePattern(myIndex);
|
||||
|
||||
+1
@@ -60,6 +60,7 @@ public class PsiPackageReference extends PsiPolyVariantReferenceBase<PsiElement>
|
||||
return subPackages.toArray();
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public String getUnresolvedMessagePattern() {
|
||||
return JavaErrorMessages.message("cannot.resolve.package");
|
||||
|
||||
@@ -17,6 +17,7 @@ package com.intellij.codeInsight.daemon;
|
||||
|
||||
import com.intellij.AbstractBundle;
|
||||
import org.jetbrains.annotations.NonNls;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.PropertyKey;
|
||||
|
||||
/**
|
||||
@@ -31,6 +32,7 @@ public class JavaErrorMessages extends AbstractBundle {
|
||||
super(BUNDLE);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public static String message(@PropertyKey(resourceBundle = BUNDLE)String key, Object... params) {
|
||||
return INSTANCE.getMessage(key, params);
|
||||
}
|
||||
|
||||
+28
-26
@@ -1033,38 +1033,40 @@ public class PsiResolveHelperImpl implements PsiResolveHelper {
|
||||
}
|
||||
|
||||
final Pair<PsiType, ConstraintType> result;
|
||||
if (constraint == null && methodCall instanceof PsiCallExpression) {
|
||||
|
||||
final PsiExpressionList argumentList = ((PsiCallExpression)methodCall).getArgumentList();
|
||||
if (argumentList != null && preparedKey == null && PsiUtil.getLanguageLevel(argumentList).isAtLeast(LanguageLevel.JDK_1_8)) {
|
||||
for (PsiExpression expression : argumentList.getExpressions()) {
|
||||
if (expression instanceof PsiLambdaExpression || expression instanceof PsiMethodReferenceExpression) {
|
||||
final PsiType functionalInterfaceType = LambdaUtil.getFunctionalInterfaceType(expression, false);
|
||||
if (functionalInterfaceType == null || PsiUtil.resolveClassInType(functionalInterfaceType) == typeParameter){
|
||||
return getFailedInferenceConstraint(typeParameter);
|
||||
}
|
||||
final PsiMethod method = LambdaUtil.getFunctionalInterfaceMethod(functionalInterfaceType);
|
||||
|
||||
final PsiClassType.ClassResolveResult resolveResult = PsiUtil.resolveGenericsClassInType(functionalInterfaceType);
|
||||
if (method == null || methodParamsDependOn(typeParameter, expression,
|
||||
functionalInterfaceType, method.getParameterList().getParameters(),
|
||||
LambdaUtil.getSubstitutor(method, resolveResult))) {
|
||||
if (expression instanceof PsiMethodReferenceExpression) {
|
||||
if (constraint == null) {
|
||||
if (methodCall instanceof PsiCallExpression) {
|
||||
final PsiExpressionList argumentList = ((PsiCallExpression)methodCall).getArgumentList();
|
||||
if (argumentList != null && preparedKey == null && PsiUtil.getLanguageLevel(argumentList).isAtLeast(LanguageLevel.JDK_1_8)) {
|
||||
for (PsiExpression expression : argumentList.getExpressions()) {
|
||||
if (expression instanceof PsiLambdaExpression || expression instanceof PsiMethodReferenceExpression) {
|
||||
final PsiType functionalInterfaceType = LambdaUtil.getFunctionalInterfaceType(expression, false);
|
||||
if (functionalInterfaceType == null || PsiUtil.resolveClassInType(functionalInterfaceType) == typeParameter){
|
||||
return getFailedInferenceConstraint(typeParameter);
|
||||
}
|
||||
return null;
|
||||
final PsiMethod method = LambdaUtil.getFunctionalInterfaceMethod(functionalInterfaceType);
|
||||
|
||||
final PsiClassType.ClassResolveResult resolveResult = PsiUtil.resolveGenericsClassInType(functionalInterfaceType);
|
||||
if (method == null || methodParamsDependOn(typeParameter, expression,
|
||||
functionalInterfaceType, method.getParameterList().getParameters(),
|
||||
LambdaUtil.getSubstitutor(method, resolveResult))) {
|
||||
if (expression instanceof PsiMethodReferenceExpression) {
|
||||
return getFailedInferenceConstraint(typeParameter);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
final PsiSubstitutor finalSubstitutor = substitutor.put(typeParameter, null);
|
||||
PsiClassType[] superTypes = typeParameter.getSuperTypes();
|
||||
if (superTypes.length == 0) return null;
|
||||
PsiType superType = finalSubstitutor.substitute(superTypes[0]);
|
||||
if (superType == null) superType = PsiType.getJavaLangObject(manager, scope);
|
||||
if (superType == null) return null;
|
||||
return policy.getInferredTypeWithNoConstraint(manager, superType);
|
||||
final PsiSubstitutor finalSubstitutor = substitutor.put(typeParameter, null);
|
||||
PsiClassType[] superTypes = typeParameter.getSuperTypes();
|
||||
if (superTypes.length == 0) return null;
|
||||
PsiType superType = finalSubstitutor.substitute(superTypes[0]);
|
||||
if (superType == null) superType = PsiType.getJavaLangObject(manager, scope);
|
||||
if (superType == null) return null;
|
||||
return policy.getInferredTypeWithNoConstraint(manager, superType);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
else {
|
||||
PsiType guess = constraint.getFirst();
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
abstract class SuperTest {
|
||||
public abstract boolean equals(Object object);
|
||||
}
|
||||
class Test extends SuperTest {
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) return true;
|
||||
if (o == null || getClass() != o.getClass()) return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public int hashCode() {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
import java.util.Arrays;
|
||||
|
||||
class Test {
|
||||
Object[] myOs;
|
||||
int[][] myIIs;
|
||||
int[] myIs;
|
||||
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) return true;
|
||||
if (o == null || getClass() != o.getClass()) return false;
|
||||
|
||||
final Test test = (Test) o;
|
||||
|
||||
// Compare nested arrays - values of myIIs here
|
||||
if (!Arrays.equals(myIs, test.myIs)) return false;
|
||||
// Probably incorrect - comparing Object[] arrays with Arrays.equals
|
||||
if (!Arrays.equals(myOs, test.myOs)) return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public int hashCode() {
|
||||
int result = myOs != null ? myOs.hashCode() : 0;
|
||||
result = 31 * result + (myIIs != null ? myIIs.hashCode() : 0);
|
||||
result = 31 * result + (myIs != null ? myIs.hashCode() : 0);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
class Arrays {
|
||||
int[] i;
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) return true;
|
||||
if (o == null || getClass() != o.getClass()) return false;
|
||||
|
||||
final Arrays arrays = (Arrays) o;
|
||||
|
||||
if (!java.util.Arrays.equals(i, arrays.i)) return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return i != null ? i.hashCode() : 0;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
import java.util.Arrays;
|
||||
|
||||
class Test {
|
||||
Object[] myOs;
|
||||
int[][] myIIs;
|
||||
int[] myIs;
|
||||
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) return true;
|
||||
if (o == null || getClass() != o.getClass()) return false;
|
||||
|
||||
final Test test = (Test) o;
|
||||
|
||||
// Compare nested arrays - values of myIIs here
|
||||
if (!Arrays.equals(myIs, test.myIs)) return false;
|
||||
// Probably incorrect - comparing Object[] arrays with Arrays.equals
|
||||
if (!Arrays.equals(myOs, test.myOs)) return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public int hashCode() {
|
||||
int result = myOs != null ? Arrays.hashCode(myOs) : 0;
|
||||
result = 31 * result + (myIIs != null ? Arrays.hashCode(myIIs) : 0);
|
||||
result = 31 * result + (myIs != null ? Arrays.hashCode(myIs) : 0);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
class Test {
|
||||
int i;
|
||||
Test a;
|
||||
Test b;
|
||||
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) return true;
|
||||
if (o == null || getClass() != o.getClass()) return false;
|
||||
|
||||
final Test test = (Test) o;
|
||||
|
||||
if (i != test.i) return false;
|
||||
if (!a.equals(test.a)) return false;
|
||||
if (b != null ? !b.equals(test.b) : test.b != null) return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public int hashCode() {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
class Test {
|
||||
int i;
|
||||
Test a;
|
||||
Test b;
|
||||
double c;
|
||||
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) return true;
|
||||
if (o == null || getClass() != o.getClass()) return false;
|
||||
|
||||
final Test test = (Test) o;
|
||||
|
||||
if (Double.compare(test.c, c) != 0) return false;
|
||||
if (i != test.i) return false;
|
||||
if (!a.equals(test.a)) return false;
|
||||
if (b != null ? !b.equals(test.b) : test.b != null) return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public int hashCode() {
|
||||
int result;
|
||||
long temp;
|
||||
result = i;
|
||||
result = 31 * result + a.hashCode();
|
||||
result = 31 * result + (b != null ? b.hashCode() : 0);
|
||||
temp = c != +0.0d ? Double.doubleToLongBits(c) : 0L;
|
||||
result = 31 * result + (int) (temp ^ (temp >>> 32));
|
||||
return result;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
class Test {
|
||||
int i;
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) return true;
|
||||
if (o == null || getClass() != o.getClass()) return false;
|
||||
|
||||
final Test test = (Test) o;
|
||||
|
||||
if (i != test.i) return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return i;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
class Integer {
|
||||
int i;
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) return true;
|
||||
if (o == null || getClass() != o.getClass()) return false;
|
||||
|
||||
final Integer integer = (Integer) o;
|
||||
|
||||
if (i != integer.i) return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return i;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
class Test {
|
||||
void foo() {
|
||||
class Integer {
|
||||
int i;
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) return true;
|
||||
if (o == null || getClass() != o.getClass()) return false;
|
||||
|
||||
final Integer integer = (Integer) o;
|
||||
|
||||
if (i != integer.i) return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return i;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
public class Test {
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) return true;
|
||||
if (o == null || getClass() != o.getClass()) return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public int hashCode() {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
class Test {
|
||||
@org.jetbrains.annotations.NotNull Object d;
|
||||
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) return true;
|
||||
if (o == null || getClass() != o.getClass()) return false;
|
||||
|
||||
final Test test = (Test) o;
|
||||
|
||||
if (d != null ? !d.equals(test.d) : test.d != null) return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public int hashCode() {
|
||||
return d != null ? d.hashCode() : 0;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
class Test {
|
||||
double d;
|
||||
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) return true;
|
||||
if (o == null || getClass() != o.getClass()) return false;
|
||||
|
||||
final Test test = (Test) o;
|
||||
|
||||
if (Double.compare(test.d, d) != 0) return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public int hashCode() {
|
||||
final long temp = d != +0.0d ? Double.doubleToLongBits(d) : 0L;
|
||||
return (int) (temp ^ (temp >>> 32));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
class Test {
|
||||
Object d;
|
||||
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) return true;
|
||||
if (o == null || getClass() != o.getClass()) return false;
|
||||
|
||||
final Test test = (Test) o;
|
||||
|
||||
if (d != null ? !d.equals(test.d) : test.d != null) return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public int hashCode() {
|
||||
return d != null ? d.hashCode() : 0;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
class Test {
|
||||
float d;
|
||||
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) return true;
|
||||
if (o == null || getClass() != o.getClass()) return false;
|
||||
|
||||
final Test test = (Test) o;
|
||||
|
||||
if (Float.compare(test.d, d) != 0) return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public int hashCode() {
|
||||
return (d != +0.0f ? Float.floatToIntBits(d) : 0);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
public class Test {
|
||||
int f;
|
||||
public int j;
|
||||
int h;
|
||||
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) return true;
|
||||
if (o == null || getClass() != o.getClass()) return false;
|
||||
|
||||
final Test test = (Test) o;
|
||||
|
||||
if (f != test.f) return false;
|
||||
if (h != test.h) return false;
|
||||
if (j != test.j) return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public int hashCode() {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
abstract class SuperTest {
|
||||
public boolean equals(Object object) {
|
||||
return true;
|
||||
}
|
||||
public int hashCode() {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
class Test extends SuperTest {
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) return true;
|
||||
if (o == null || getClass() != o.getClass()) return false;
|
||||
if (!super.equals(o)) return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
abstract class SuperTest {
|
||||
public abstract boolean equals(Object object);
|
||||
}
|
||||
class Test extends SuperTest {<caret>
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
class Test {
|
||||
Object[] myOs;
|
||||
int[][] myIIs;
|
||||
int[] myIs;
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
class Arrays {
|
||||
int[] i;
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
class Test {
|
||||
Object[] myOs;
|
||||
int[][] myIIs;
|
||||
int[] myIs;
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
class Test {
|
||||
int i;
|
||||
Test a;
|
||||
Test b;
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
class Test {
|
||||
int i;
|
||||
Test a;
|
||||
Test b;
|
||||
double c;
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
class Test {
|
||||
int i;
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
class Integer {
|
||||
int i;
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
class Test {
|
||||
void foo() {
|
||||
class Integer {
|
||||
<caret>int i;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
public class Test {<caret>
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
class Test {
|
||||
@org.jetbrains.annotations.NotNull Object d;
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
class Test {
|
||||
double d;
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
class Test {
|
||||
Object d;
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
class Test {
|
||||
float d;
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
public class Test {<caret>
|
||||
int f;
|
||||
public int j;
|
||||
int h;
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
abstract class SuperTest {
|
||||
public boolean equals(Object object) {
|
||||
return true;
|
||||
}
|
||||
public int hashCode() {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
class Test extends SuperTest {<caret>
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
package com.intellij.codeInsight;
|
||||
|
||||
/**
|
||||
* @author dsl
|
||||
*/
|
||||
public class GenerateEquals15Test extends GenerateEqualsTestCase {
|
||||
public void testArraysFromJava15() throws Exception {
|
||||
doTest(new int[]{0, 1, 2}, new int[]{0, 1, 2}, new int[0], false);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,74 @@
|
||||
package com.intellij.codeInsight;
|
||||
|
||||
import com.intellij.openapi.projectRoots.Sdk;
|
||||
import com.intellij.testFramework.IdeaTestUtil;
|
||||
|
||||
/**
|
||||
* @author dsl
|
||||
*/
|
||||
public class GenerateEqualsTest extends GenerateEqualsTestCase {
|
||||
public void testNoBaseEquals() throws Exception {
|
||||
doTest(new int[0], new int[0], new int[0], false);
|
||||
}
|
||||
|
||||
public void testPrimitiveFields() throws Exception {
|
||||
doTest(new int[]{0, 1, 2}, new int[0], new int[0], false);
|
||||
}
|
||||
|
||||
public void testFields() throws Exception {
|
||||
doTest(new int[]{0, 1, 2}, new int[0], new int[]{1}, false);
|
||||
}
|
||||
|
||||
public void testAbstractSuperEquals() throws Exception {
|
||||
doTest(new int[0], new int[0], new int[0], false);
|
||||
}
|
||||
|
||||
public void testSuperEquals() throws Exception {
|
||||
doTest(new int[0], new int[0], new int[0], false);
|
||||
}
|
||||
|
||||
public void testHashCode() throws Exception {
|
||||
doTest(new int[]{0, 1, 2, 3}, new int[]{0, 1, 2, 3}, new int[]{1}, false);
|
||||
}
|
||||
|
||||
public void testArrays() throws Exception {
|
||||
doTest(new int[]{0, 1, 2}, new int[]{0, 1, 2}, new int[0], false);
|
||||
}
|
||||
|
||||
public void testOneDoubleField() throws Exception {
|
||||
doTest(new int[]{0}, new int[]{0}, new int[0], false);
|
||||
}
|
||||
|
||||
public void testOneFloatField() throws Exception {
|
||||
doTest(new int[]{0}, new int[]{0}, new int[0], false);
|
||||
}
|
||||
|
||||
public void testOneField() throws Exception {
|
||||
doTest(new int[]{0}, new int[]{0}, new int[0], false);
|
||||
}
|
||||
|
||||
public void testNotNull() throws Exception {
|
||||
doTest(new int[]{0}, new int[]{0}, new int[0], false);
|
||||
}
|
||||
|
||||
public void testInsertOverride() throws Exception {
|
||||
doTest(new int[]{0}, new int[]{0}, new int[0], true);
|
||||
}
|
||||
|
||||
public void testLangClass() throws Exception {
|
||||
doTest(new int[]{0}, new int[]{0}, new int[0], true);
|
||||
}
|
||||
|
||||
public void testLocalLangClass() throws Exception {
|
||||
doTest(new int[]{0}, new int[]{0}, new int[0], true);
|
||||
}
|
||||
|
||||
public void testArraysClass() throws Exception {
|
||||
doTest(new int[]{0}, new int[]{0}, new int[0], true);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Sdk getProjectJDK() {
|
||||
return IdeaTestUtil.getMockJdk14();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
package com.intellij.codeInsight;
|
||||
|
||||
import com.intellij.codeInsight.generation.GenerateEqualsHelper;
|
||||
import com.intellij.openapi.fileEditor.FileDocumentManager;
|
||||
import com.intellij.psi.PsiClass;
|
||||
import com.intellij.psi.PsiElement;
|
||||
import com.intellij.psi.PsiField;
|
||||
import com.intellij.psi.codeStyle.CodeStyleSettings;
|
||||
import com.intellij.psi.codeStyle.CodeStyleSettingsManager;
|
||||
import com.intellij.psi.util.PsiTreeUtil;
|
||||
import com.intellij.testFramework.LightCodeInsightTestCase;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
/**
|
||||
* @author yole
|
||||
*/
|
||||
public abstract class GenerateEqualsTestCase extends LightCodeInsightTestCase {
|
||||
protected void doTest(int[] equals, int[] hashCode, int[] nonNull, boolean insertOverride) throws Exception {
|
||||
configureByFile("/codeInsight/generateEquals/before" + getTestName(false) + ".java");
|
||||
performTest(equals, hashCode, nonNull, insertOverride);
|
||||
checkResultByFile("/codeInsight/generateEquals/after" + getTestName(false) + ".java");
|
||||
}
|
||||
|
||||
private static void performTest(int[] equals, int[] hashCode, int[] nonNull, boolean insertOverride) {
|
||||
CodeStyleSettings settings = CodeStyleSettingsManager.getSettings(getProject()).clone();
|
||||
settings.GENERATE_FINAL_LOCALS = true;
|
||||
settings.INSERT_OVERRIDE_ANNOTATION = insertOverride;
|
||||
CodeStyleSettingsManager.getInstance(getProject()).setTemporarySettings(settings);
|
||||
try {
|
||||
PsiElement element = getFile().findElementAt(getEditor().getCaretModel().getOffset());
|
||||
if (element == null) return;
|
||||
PsiClass aClass = PsiTreeUtil.getParentOfType(element, PsiClass.class);
|
||||
if (aClass == null) return;
|
||||
PsiField[] fields = aClass.getFields();
|
||||
new GenerateEqualsHelper(getProject(), aClass, getIndexed(fields, equals), getIndexed(fields, hashCode), getIndexed(fields, nonNull),
|
||||
false)
|
||||
.invoke();
|
||||
FileDocumentManager.getInstance().saveAllDocuments();
|
||||
}
|
||||
finally {
|
||||
CodeStyleSettingsManager.getInstance(getProject()).dropTemporarySettings();
|
||||
}
|
||||
}
|
||||
|
||||
private static PsiField[] getIndexed(PsiField[] fields, int[] indices) {
|
||||
ArrayList<PsiField> result = new ArrayList<PsiField>();
|
||||
for (int indice : indices) {
|
||||
result.add(fields[indice]);
|
||||
}
|
||||
return result.toArray(new PsiField[result.size()]);
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,37 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<root>
|
||||
<item name='java.text.SimpleDateFormat SimpleDateFormat(java.lang.String) 0'>
|
||||
<annotation name='org.jetbrains.annotations.NonNls'/>
|
||||
<item name="java.text.MessageFormat MessageFormat(java.lang.String) 0">
|
||||
<annotation name="org.jetbrains.annotations.NotNull" />
|
||||
</item>
|
||||
<item name="java.text.MessageFormat MessageFormat(java.lang.String, java.util.Locale) 0">
|
||||
<annotation name="org.jetbrains.annotations.NotNull" />
|
||||
</item>
|
||||
<item name="java.text.MessageFormat java.lang.String format(java.lang.String, java.lang.Object...)">
|
||||
<annotation name="org.jetbrains.annotations.NotNull" />
|
||||
</item>
|
||||
<item name="java.text.MessageFormat java.lang.String format(java.lang.String, java.lang.Object...) 0">
|
||||
<annotation name="org.jetbrains.annotations.NotNull" />
|
||||
</item>
|
||||
<item name="java.text.MessageFormat java.lang.StringBuffer format(java.lang.Object, java.lang.StringBuffer, java.text.FieldPosition)">
|
||||
<annotation name="org.jetbrains.annotations.NotNull" />
|
||||
</item>
|
||||
<item name="java.text.MessageFormat java.text.Format[] getFormats()">
|
||||
<annotation name="org.jetbrains.annotations.NotNull" />
|
||||
</item>
|
||||
<item name="java.text.MessageFormat java.text.Format[] getFormatsByArgumentIndex()">
|
||||
<annotation name="org.jetbrains.annotations.NotNull" />
|
||||
</item>
|
||||
<item name="java.text.MessageFormat void applyPattern(java.lang.String) 0">
|
||||
<annotation name="org.jetbrains.annotations.NotNull" />
|
||||
</item>
|
||||
<item name="java.text.MessageFormat void setFormats(java.text.Format[]) 0">
|
||||
<annotation name="org.jetbrains.annotations.NotNull" />
|
||||
</item>
|
||||
<item name="java.text.MessageFormat void setFormatsByArgumentIndex(java.text.Format[]) 0">
|
||||
<annotation name="org.jetbrains.annotations.NotNull" />
|
||||
</item>
|
||||
<item name="java.text.SimpleDateFormat SimpleDateFormat(java.lang.String) 0">
|
||||
<annotation name="org.jetbrains.annotations.NonNls" />
|
||||
</item>
|
||||
</root>
|
||||
|
||||
|
||||
@@ -54,6 +54,17 @@ public interface JspVersion {
|
||||
}
|
||||
};
|
||||
|
||||
JspVersion JSP_2_3 = new JspVersion() {
|
||||
|
||||
public String getNumber() {
|
||||
return "2.3";
|
||||
}
|
||||
|
||||
public boolean betterThan(JspVersion other) {
|
||||
return getNumber().compareTo(other.getNumber()) > 0;
|
||||
}
|
||||
};
|
||||
|
||||
String getNumber();
|
||||
|
||||
boolean betterThan(JspVersion other);
|
||||
|
||||
@@ -67,9 +67,6 @@ public class JavaBuilderUtil {
|
||||
ModuleChunk chunk,
|
||||
Collection<File> filesToCompile,
|
||||
Collection<File> successfullyCompiled) throws IOException {
|
||||
if (Utils.errorsDetected(context)) {
|
||||
return false;
|
||||
}
|
||||
try {
|
||||
boolean additionalPassRequired = false;
|
||||
|
||||
@@ -161,6 +158,14 @@ public class JavaBuilderUtil {
|
||||
globalMappings.differentiateOnRebuild(delta);
|
||||
}
|
||||
|
||||
if (Utils.errorsDetected(context)) {
|
||||
// important: perform dependency analysis and mark found dependencies even if there were errors during the first phase of make.
|
||||
// Integration of changes should happen only if the corresponding phase of make succeeds
|
||||
// In case of errors this wil ensure that all dependencies marked after the first phase
|
||||
// will be compiled during the first phase of the next make
|
||||
return false;
|
||||
}
|
||||
|
||||
context.processMessage(new ProgressMessage("Updating dependency information... [" + chunk.getName() + "]"));
|
||||
|
||||
globalMappings.integrate(delta);
|
||||
|
||||
@@ -596,7 +596,7 @@ public abstract class GlobalSearchScope extends SearchScope implements ProjectAw
|
||||
}
|
||||
}
|
||||
|
||||
private static class FilesScope extends GlobalSearchScope {
|
||||
public static class FilesScope extends GlobalSearchScope {
|
||||
private final Collection<VirtualFile> myFiles;
|
||||
|
||||
public FilesScope(final Project project, final Collection<VirtualFile> files) {
|
||||
|
||||
@@ -32,6 +32,10 @@ public class PsiBuilderAdapter implements PsiBuilder {
|
||||
myDelegate = delegate;
|
||||
}
|
||||
|
||||
public PsiBuilder getDelegate() {
|
||||
return myDelegate;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Project getProject() {
|
||||
return myDelegate.getProject();
|
||||
|
||||
@@ -22,7 +22,10 @@ import com.intellij.openapi.diagnostic.Logger;
|
||||
import com.intellij.openapi.progress.ProgressIndicator;
|
||||
import com.intellij.openapi.progress.ProgressIndicatorProvider;
|
||||
import com.intellij.openapi.project.Project;
|
||||
import com.intellij.openapi.util.*;
|
||||
import com.intellij.openapi.util.Comparing;
|
||||
import com.intellij.openapi.util.Key;
|
||||
import com.intellij.openapi.util.Ref;
|
||||
import com.intellij.openapi.util.UserDataHolderBase;
|
||||
import com.intellij.psi.PsiErrorElement;
|
||||
import com.intellij.psi.PsiFile;
|
||||
import com.intellij.psi.TokenType;
|
||||
@@ -31,14 +34,16 @@ import com.intellij.psi.impl.source.resolve.FileContextUtil;
|
||||
import com.intellij.psi.impl.source.text.BlockSupportImpl;
|
||||
import com.intellij.psi.impl.source.text.DiffLog;
|
||||
import com.intellij.psi.impl.source.tree.*;
|
||||
import com.intellij.psi.impl.source.tree.Factory;
|
||||
import com.intellij.psi.text.BlockSupport;
|
||||
import com.intellij.psi.tree.*;
|
||||
import com.intellij.util.CharTable;
|
||||
import com.intellij.util.ExceptionUtil;
|
||||
import com.intellij.util.ThreeState;
|
||||
import com.intellij.util.TripleFunction;
|
||||
import com.intellij.util.containers.*;
|
||||
import com.intellij.util.containers.ContainerUtil;
|
||||
import com.intellij.util.containers.Convertor;
|
||||
import com.intellij.util.containers.LimitedPool;
|
||||
import com.intellij.util.containers.Stack;
|
||||
import com.intellij.util.diff.DiffTreeChangeBuilder;
|
||||
import com.intellij.util.diff.FlyweightCapableTreeStructure;
|
||||
import com.intellij.util.diff.ShallowNodeComparator;
|
||||
@@ -798,7 +803,7 @@ public class PsiBuilderImpl extends UserDataHolderBase implements PsiBuilder, AS
|
||||
clearCachedTokenType();
|
||||
}
|
||||
|
||||
private boolean whitespaceOrComment(IElementType token) {
|
||||
public boolean whitespaceOrComment(IElementType token) {
|
||||
return myWhitespaces.contains(token) || myComments.contains(token);
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -49,7 +49,7 @@ public class VirtualFilePointerContainerImpl extends TraceableDisposable impleme
|
||||
private final VirtualFilePointerListener myListener;
|
||||
private volatile Trinity<String[], VirtualFile[], VirtualFile[]> myCachedThings;
|
||||
private volatile long myTimeStampOfCachedThings = -1;
|
||||
@NonNls private static final String URL_ATTR = "url";
|
||||
@NonNls public static final String URL_ATTR = "url";
|
||||
private boolean myDisposed;
|
||||
private static final boolean TRACE_CREATION = LOG.isDebugEnabled() || ApplicationManager.getApplication().isUnitTestMode();
|
||||
|
||||
|
||||
@@ -16,6 +16,8 @@
|
||||
|
||||
package com.intellij.codeInsight.daemon;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/**
|
||||
* Implement this in your {@link com.intellij.psi.PsiReference} to provide custom error message.
|
||||
*/
|
||||
@@ -27,5 +29,6 @@ public interface EmptyResolveMessageProvider {
|
||||
* @return pattern or message
|
||||
* @see XmlHighlightVisitor#getErrorDescription()
|
||||
*/
|
||||
@NotNull
|
||||
String getUnresolvedMessagePattern();
|
||||
}
|
||||
|
||||
+9
-7
@@ -59,13 +59,15 @@ public class HighlightingSettingsPerFile implements PersistentStateComponent<Ele
|
||||
}
|
||||
|
||||
private static FileHighlighingSetting getDefaultHighlightingSetting(Project project, final VirtualFile virtualFile) {
|
||||
DefaultHighlightingSettingProvider[] providers = DefaultHighlightingSettingProvider.EP_NAME.getExtensions();
|
||||
List<DefaultHighlightingSettingProvider> filtered =
|
||||
DumbService.getInstance(project).filterByDumbAwareness(Arrays.asList(providers));
|
||||
for (DefaultHighlightingSettingProvider p : filtered) {
|
||||
FileHighlighingSetting setting = p.getDefaultSetting(project, virtualFile);
|
||||
if (setting != null) {
|
||||
return setting;
|
||||
if (virtualFile != null) {
|
||||
DefaultHighlightingSettingProvider[] providers = DefaultHighlightingSettingProvider.EP_NAME.getExtensions();
|
||||
List<DefaultHighlightingSettingProvider> filtered =
|
||||
DumbService.getInstance(project).filterByDumbAwareness(Arrays.asList(providers));
|
||||
for (DefaultHighlightingSettingProvider p : filtered) {
|
||||
FileHighlighingSetting setting = p.getDefaultSetting(project, virtualFile);
|
||||
if (setting != null) {
|
||||
return setting;
|
||||
}
|
||||
}
|
||||
}
|
||||
return FileHighlighingSetting.FORCE_HIGHLIGHTING;
|
||||
|
||||
@@ -21,6 +21,7 @@ import com.intellij.lang.parameterInfo.ParameterInfoUIContextEx;
|
||||
import com.intellij.openapi.editor.Editor;
|
||||
import com.intellij.psi.PsiElement;
|
||||
import com.intellij.ui.Gray;
|
||||
import com.intellij.ui.ScrollPaneFactory;
|
||||
import com.intellij.ui.SideBorder;
|
||||
import com.intellij.ui.StrikeoutLabel;
|
||||
import com.intellij.util.ui.UIUtil;
|
||||
@@ -55,7 +56,7 @@ class ParameterInfoComponent extends JPanel{
|
||||
protected int myWidthLimit;
|
||||
|
||||
public ParameterInfoComponent(Object[] objects, Editor editor,@NotNull ParameterInfoHandler handler) {
|
||||
super(new GridBagLayout());
|
||||
super(new BorderLayout());
|
||||
|
||||
JComponent editorComponent = editor.getComponent();
|
||||
JLayeredPane layeredPane = editorComponent.getRootPane().getLayeredPane();
|
||||
@@ -66,19 +67,36 @@ class ParameterInfoComponent extends JPanel{
|
||||
|
||||
myObjects = objects;
|
||||
|
||||
setLayout(new GridBagLayout());
|
||||
setBackground(BACKGROUND_COLOR);
|
||||
|
||||
myHandler = handler;
|
||||
myPanels = new OneElementComponent[myObjects.length];
|
||||
final JPanel panel = new JPanel(new GridBagLayout());
|
||||
for(int i = 0; i < myObjects.length; i++) {
|
||||
myPanels[i] = new OneElementComponent();
|
||||
add(myPanels[i], new GridBagConstraints(0,i,1,1,1,0,GridBagConstraints.WEST,GridBagConstraints.HORIZONTAL,new Insets(0,0,0,0),0,0));
|
||||
panel.add(myPanels[i], new GridBagConstraints(0,i,1,1,1,0,GridBagConstraints.WEST,GridBagConstraints.HORIZONTAL,new Insets(0,0,0,0),0,0));
|
||||
}
|
||||
|
||||
final JScrollPane pane = ScrollPaneFactory.createScrollPane(panel);
|
||||
pane.setBorder(null);
|
||||
pane.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED);
|
||||
add(pane, BorderLayout.CENTER);
|
||||
|
||||
myCurrentParameterIndex = -1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Dimension getPreferredSize() {
|
||||
int size = myPanels.length;
|
||||
final Dimension preferredSize = super.getPreferredSize();
|
||||
if (size >= 0 && size <= 20) {
|
||||
return preferredSize;
|
||||
}
|
||||
else {
|
||||
return new Dimension(preferredSize.width + 20, 200);
|
||||
}
|
||||
}
|
||||
|
||||
public Object getHighlighted() {
|
||||
return myHighlighted;
|
||||
}
|
||||
|
||||
+1
-1
@@ -49,6 +49,7 @@ public class FileLevelIntentionComponent extends EditorNotificationPanel {
|
||||
final List<Pair<HighlightInfo.IntentionActionDescriptor, TextRange>> intentions,
|
||||
final Project project, final PsiFile psiFile, final Editor editor) {
|
||||
myProject = project;
|
||||
myBackground = getColor(severity);
|
||||
|
||||
final ShowIntentionsPass.IntentionsInfo info = new ShowIntentionsPass.IntentionsInfo();
|
||||
|
||||
@@ -72,7 +73,6 @@ public class FileLevelIntentionComponent extends EditorNotificationPanel {
|
||||
|
||||
myLabel.setText(description);
|
||||
myLabel.setIcon(SeverityRegistrar.getInstance(project).compare(severity, HighlightSeverity.ERROR) >= 0 ? AllIcons.Actions.QuickfixBulb : AllIcons.Actions.IntentionBulb);
|
||||
myBackground = getColor(severity);
|
||||
|
||||
new ClickListener() {
|
||||
@Override
|
||||
|
||||
@@ -0,0 +1,795 @@
|
||||
// This class is a runtime engine for parsers generated by Grammar-Kit.
|
||||
// Do not modify or refactor without complete investigation and/or review.
|
||||
package com.intellij.lang.parser;
|
||||
|
||||
import com.intellij.lang.*;
|
||||
import com.intellij.lang.impl.PsiBuilderAdapter;
|
||||
import com.intellij.lang.impl.PsiBuilderImpl;
|
||||
import com.intellij.lexer.Lexer;
|
||||
import com.intellij.openapi.diagnostic.Logger;
|
||||
import com.intellij.openapi.util.Comparing;
|
||||
import com.intellij.openapi.util.Key;
|
||||
import com.intellij.openapi.util.Pair;
|
||||
import com.intellij.openapi.util.text.StringHash;
|
||||
import com.intellij.openapi.util.text.StringUtil;
|
||||
import com.intellij.psi.PsiFile;
|
||||
import com.intellij.psi.PsiReference;
|
||||
import com.intellij.psi.TokenType;
|
||||
import com.intellij.psi.impl.source.resolve.FileContextUtil;
|
||||
import com.intellij.psi.impl.source.tree.CompositePsiElement;
|
||||
import com.intellij.psi.tree.ICompositeElementType;
|
||||
import com.intellij.psi.tree.IElementType;
|
||||
import com.intellij.util.Function;
|
||||
import com.intellij.util.containers.LimitedPool;
|
||||
import gnu.trove.THashSet;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collection;
|
||||
import java.util.LinkedList;
|
||||
|
||||
/**
|
||||
* @author gregsh
|
||||
*/
|
||||
@SuppressWarnings("StringEquality")
|
||||
public class GeneratedParserUtilBase {
|
||||
|
||||
private static final Logger LOG = Logger.getInstance("com.intellij.lang.parser.GeneratedParserUtilBase");
|
||||
|
||||
public static final IElementType DUMMY_BLOCK = new DummyBlockElementType();
|
||||
|
||||
public interface Parser {
|
||||
boolean parse(PsiBuilder builder, int level);
|
||||
}
|
||||
|
||||
public static final Parser TOKEN_ADVANCER = new Parser() {
|
||||
@Override
|
||||
public boolean parse(PsiBuilder builder, int level) {
|
||||
if (builder.eof()) return false;
|
||||
builder.advanceLexer();
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
public static final Parser TRUE_CONDITION = new Parser() {
|
||||
@Override
|
||||
public boolean parse(PsiBuilder builder, int level) {
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
public static boolean eof(PsiBuilder builder_, int level_) {
|
||||
return builder_.eof();
|
||||
}
|
||||
|
||||
public static boolean recursion_guard_(PsiBuilder builder_, int level_, String funcName_) {
|
||||
if (level_ > 1000) {
|
||||
builder_.error("Maximum recursion level (" + 1000 + ") reached in " + funcName_);
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public static void empty_element_parsed_guard_(PsiBuilder builder_, int offset_, String funcName_) {
|
||||
builder_.error("Empty element parsed in " + funcName_ +" at offset " + offset_);
|
||||
}
|
||||
|
||||
public static boolean invalid_left_marker_guard_(PsiBuilder builder_, PsiBuilder.Marker marker_, String funcName_) {
|
||||
//builder_.error("Invalid left marker encountered in " + funcName_ +" at offset " + builder_.getCurrentOffset());
|
||||
boolean goodMarker = marker_ != null && ((LighterASTNode)marker_).getTokenType() != TokenType.ERROR_ELEMENT;
|
||||
if (!goodMarker) return false;
|
||||
ErrorState state = ErrorState.get(builder_);
|
||||
|
||||
Frame frame = state.frameStack.isEmpty() ? null : state.frameStack.getLast();
|
||||
return frame == null || frame.errorReportedAt <= builder_.getCurrentOffset();
|
||||
}
|
||||
|
||||
public static boolean consumeTokens(PsiBuilder builder_, int pin_, IElementType... tokens_) {
|
||||
ErrorState state = ErrorState.get(builder_);
|
||||
if (state.completionState != null && state.predicateSign) {
|
||||
addCompletionVariant(builder_, state, state.completionState, tokens_, builder_.getCurrentOffset());
|
||||
}
|
||||
// suppress single token completion
|
||||
CompletionState completionState = state.completionState;
|
||||
state.completionState = null;
|
||||
boolean result_ = true;
|
||||
boolean pinned_ = false;
|
||||
for (int i = 0, tokensLength = tokens_.length; i < tokensLength; i++) {
|
||||
if (pin_ > 0 && i == pin_) pinned_ = result_;
|
||||
if ((result_ || pinned_) && !consumeToken(builder_, tokens_[i])) {
|
||||
result_ = false;
|
||||
if (pin_ < 0 || pinned_) report_error_(builder_, state, false);
|
||||
}
|
||||
}
|
||||
state.completionState = completionState;
|
||||
return pinned_ || result_;
|
||||
}
|
||||
|
||||
public static boolean consumeToken(PsiBuilder builder_, IElementType token) {
|
||||
if (nextTokenIsInner(builder_, token, true)) {
|
||||
builder_.advanceLexer();
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public static boolean consumeTokenFast(PsiBuilder builder_, IElementType token) {
|
||||
if (builder_.getTokenType() == token) {
|
||||
builder_.advanceLexer();
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public static boolean consumeTokenFast(PsiBuilder builder_, String text) {
|
||||
if (Comparing.strEqual(builder_.getTokenText(), text, ErrorState.get(builder_).caseSensitive)) {
|
||||
builder_.advanceLexer();
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public static boolean nextTokenIsFast(PsiBuilder builder_, IElementType token) {
|
||||
return builder_.getTokenType() == token;
|
||||
}
|
||||
|
||||
public static boolean nextTokenIs(PsiBuilder builder_, IElementType token) {
|
||||
return nextTokenIsInner(builder_, token, false);
|
||||
}
|
||||
|
||||
public static boolean nextTokenIsInner(PsiBuilder builder_, IElementType token, boolean force) {
|
||||
ErrorState state = ErrorState.get(builder_);
|
||||
if (state.completionState != null && !force) return true;
|
||||
IElementType tokenType = builder_.getTokenType();
|
||||
if (!state.suppressErrors && state.predicateCount < 2) {
|
||||
addVariant(builder_, state, token);
|
||||
}
|
||||
return token == tokenType;
|
||||
}
|
||||
|
||||
public static boolean replaceVariants(PsiBuilder builder_, int variantCount, String frameName) {
|
||||
ErrorState state = ErrorState.get(builder_);
|
||||
if (!state.suppressErrors && state.predicateCount < 2 && state.predicateSign) {
|
||||
state.clearVariants(true, state.variants.size() - variantCount);
|
||||
addVariantInner(state, builder_.getCurrentOffset(), frameName);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public static void addVariant(PsiBuilder builder_, String text) {
|
||||
addVariant(builder_, ErrorState.get(builder_), text);
|
||||
}
|
||||
|
||||
private static void addVariant(PsiBuilder builder_, ErrorState state, Object o) {
|
||||
int offset = builder_.getCurrentOffset();
|
||||
addVariantInner(state, offset, o);
|
||||
|
||||
CompletionState completionState = state.completionState;
|
||||
if (completionState != null && state.predicateSign) {
|
||||
addCompletionVariant(builder_, state, completionState, o, offset);
|
||||
}
|
||||
}
|
||||
|
||||
private static void addVariantInner(ErrorState state, int offset, Object o) {
|
||||
Variant variant = state.VARIANTS.alloc().init(offset, o);
|
||||
if (state.predicateSign) {
|
||||
state.variants.add(variant);
|
||||
if (state.lastExpectedVariantOffset < variant.offset) {
|
||||
state.lastExpectedVariantOffset = variant.offset;
|
||||
}
|
||||
}
|
||||
else {
|
||||
state.unexpected.add(variant);
|
||||
}
|
||||
}
|
||||
|
||||
public static boolean consumeToken(PsiBuilder builder_, String text) {
|
||||
ErrorState state = ErrorState.get(builder_);
|
||||
if (!state.suppressErrors && state.predicateCount < 2) {
|
||||
addVariant(builder_, state, text);
|
||||
}
|
||||
return consumeTokenInner(builder_, text, state.caseSensitive);
|
||||
}
|
||||
|
||||
public static boolean consumeTokenInner(PsiBuilder builder_, String text, boolean caseSensitive) {
|
||||
final CharSequence sequence = builder_.getOriginalText();
|
||||
final int offset = builder_.getCurrentOffset();
|
||||
final int endOffset = offset + text.length();
|
||||
CharSequence tokenText = sequence.subSequence(offset, Math.min(endOffset, sequence.length()));
|
||||
|
||||
if (Comparing.equal(text, tokenText, caseSensitive)) {
|
||||
int count = 0;
|
||||
while (true) {
|
||||
final int nextOffset = builder_.rawTokenTypeStart(++ count);
|
||||
if (nextOffset > endOffset) {
|
||||
return false;
|
||||
}
|
||||
else if (nextOffset == endOffset) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
while (count-- > 0) builder_.advanceLexer();
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private static void addCompletionVariant(PsiBuilder builder_,
|
||||
ErrorState state,
|
||||
CompletionState completionState,
|
||||
Object o,
|
||||
int offset) {
|
||||
boolean add = false;
|
||||
int diff = completionState.offset - offset;
|
||||
String text = completionState.convertItem(o);
|
||||
int length = text == null? 0 : text.length();
|
||||
if (length == 0) return;
|
||||
if (diff == 0) {
|
||||
add = true;
|
||||
}
|
||||
else if (diff > 0 && diff <= length) {
|
||||
CharSequence fragment = builder_.getOriginalText().subSequence(offset, completionState.offset);
|
||||
add = StringUtil.startsWithIgnoreCase(text, fragment.toString());
|
||||
}
|
||||
else if (diff < 0) {
|
||||
for (int i=-1; ; i--) {
|
||||
IElementType type = builder_.rawLookup(i);
|
||||
int tokenStart = builder_.rawTokenTypeStart(i);
|
||||
if (((PsiBuilderImpl)((Builder)builder_).getDelegate()).whitespaceOrComment(type)) {
|
||||
diff = completionState.offset - tokenStart;
|
||||
}
|
||||
else if (type != null && tokenStart < completionState.offset) {
|
||||
CharSequence fragment = builder_.getOriginalText().subSequence(tokenStart, completionState.offset);
|
||||
if (StringUtil.startsWithIgnoreCase(text, fragment.toString())) {
|
||||
diff = completionState.offset - tokenStart;
|
||||
}
|
||||
break;
|
||||
}
|
||||
else break;
|
||||
}
|
||||
add = diff >= 0 && diff < length;
|
||||
}
|
||||
add = add && length > 1 && !(text.charAt(0) == '<' && text.charAt(length - 1) == '>') &&
|
||||
!(text.charAt(0) == '\'' && text.charAt(length - 1) == '\'' && length < 5);
|
||||
if (add) {
|
||||
completionState.items.add(text);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public static final String _SECTION_NOT_ = "_SECTION_NOT_";
|
||||
public static final String _SECTION_AND_ = "_SECTION_AND_";
|
||||
public static final String _SECTION_RECOVER_ = "_SECTION_RECOVER_";
|
||||
public static final String _SECTION_GENERAL_ = "_SECTION_GENERAL_";
|
||||
|
||||
public static void enterErrorRecordingSection(PsiBuilder builder_, int level, @NotNull String sectionType, @Nullable String frameName) {
|
||||
ErrorState state = ErrorState.get(builder_);
|
||||
Frame frame = state.FRAMES.alloc().init(builder_.getCurrentOffset(), level, sectionType, frameName, state.variants.size());
|
||||
state.frameStack.add(frame);
|
||||
if (sectionType == _SECTION_AND_) {
|
||||
if (state.predicateCount == 0 && !state.predicateSign) {
|
||||
throw new AssertionError("Incorrect false predicate sign");
|
||||
}
|
||||
state.predicateCount++;
|
||||
}
|
||||
else if (sectionType == _SECTION_NOT_) {
|
||||
if (state.predicateCount == 0) {
|
||||
state.predicateSign = false;
|
||||
}
|
||||
else {
|
||||
state.predicateSign = !state.predicateSign;
|
||||
}
|
||||
state.predicateCount++;
|
||||
}
|
||||
}
|
||||
|
||||
public static boolean exitErrorRecordingSection(PsiBuilder builder_,
|
||||
int level,
|
||||
boolean result,
|
||||
boolean pinned,
|
||||
@NotNull String sectionType,
|
||||
@Nullable Parser eatMore) {
|
||||
ErrorState state = ErrorState.get(builder_);
|
||||
|
||||
Frame frame = state.frameStack.pollLast();
|
||||
int initialOffset = builder_.getCurrentOffset();
|
||||
if (frame == null || level != frame.level || !sectionType.equals(frame.section)) {
|
||||
LOG.error("Unbalanced error section: got " + new Frame().init(initialOffset, level, sectionType, "", 0) + ", expected " + frame);
|
||||
if (frame != null) state.FRAMES.recycle(frame);
|
||||
return result;
|
||||
}
|
||||
if (sectionType == _SECTION_AND_ || sectionType == _SECTION_NOT_) {
|
||||
state.predicateCount--;
|
||||
if (sectionType == _SECTION_NOT_) state.predicateSign = !state.predicateSign;
|
||||
state.FRAMES.recycle(frame);
|
||||
return result;
|
||||
}
|
||||
if (!result && !pinned && initialOffset == frame.offset && state.lastExpectedVariantOffset == frame.offset &&
|
||||
frame.name != null && state.variants.size() - frame.variantCount > 1) {
|
||||
state.clearVariants(true, frame.variantCount);
|
||||
addVariantInner(state, initialOffset, frame.name);
|
||||
}
|
||||
if (sectionType == _SECTION_RECOVER_ && !state.suppressErrors && eatMore != null) {
|
||||
state.suppressErrors = true;
|
||||
final boolean eatMoreFlagOnce = !builder_.eof() && eatMore.parse(builder_, frame.level + 1);
|
||||
final int lastErrorPos = getLastVariantOffset(state, initialOffset);
|
||||
boolean eatMoreFlag = eatMoreFlagOnce || !result && frame.offset == initialOffset && lastErrorPos > frame.offset;
|
||||
|
||||
final LighterASTNode latestDoneMarker =
|
||||
(pinned || result) && (state.altMode || lastErrorPos > initialOffset) &&
|
||||
eatMoreFlagOnce ? builder_.getLatestDoneMarker() : null;
|
||||
PsiBuilder.Marker extensionMarker = null;
|
||||
IElementType extensionTokenType = null;
|
||||
if (latestDoneMarker instanceof PsiBuilder.Marker && frame.offset == latestDoneMarker.getStartOffset()) {
|
||||
extensionMarker = ((PsiBuilder.Marker)latestDoneMarker).precede();
|
||||
extensionTokenType = latestDoneMarker.getTokenType();
|
||||
((PsiBuilder.Marker)latestDoneMarker).drop();
|
||||
}
|
||||
// advance to the last error pos
|
||||
// skip tokens until lastErrorPos. parseAsTree might look better here...
|
||||
int parenCount = 0;
|
||||
while ((eatMoreFlag || parenCount > 0) && builder_.getCurrentOffset() < lastErrorPos) {
|
||||
if (state.braces != null) {
|
||||
if (builder_.getTokenType() == state.braces[0].getLeftBraceType()) parenCount ++;
|
||||
else if (builder_.getTokenType() == state.braces[0].getRightBraceType()) parenCount --;
|
||||
}
|
||||
builder_.advanceLexer();
|
||||
eatMoreFlag = eatMore.parse(builder_, frame.level + 1);
|
||||
}
|
||||
boolean errorReported = frame.errorReportedAt == initialOffset;
|
||||
if (errorReported) {
|
||||
if (eatMoreFlag) {
|
||||
builder_.advanceLexer();
|
||||
parseAsTree(state, builder_, frame.level + 1, DUMMY_BLOCK, true, TOKEN_ADVANCER, eatMore);
|
||||
}
|
||||
}
|
||||
else if (eatMoreFlag) {
|
||||
errorReported = reportError(builder_, state, true, true);
|
||||
parseAsTree(state, builder_, frame.level + 1, DUMMY_BLOCK, true, TOKEN_ADVANCER, eatMore);
|
||||
}
|
||||
else if (eatMoreFlagOnce || (!result && frame.offset != builder_.getCurrentOffset())) {
|
||||
errorReported = reportError(builder_, state, true, false);
|
||||
}
|
||||
if (extensionMarker != null) {
|
||||
extensionMarker.done(extensionTokenType);
|
||||
}
|
||||
state.suppressErrors = false;
|
||||
if (errorReported || result) {
|
||||
state.clearVariants(true, 0);
|
||||
state.clearVariants(false, 0);
|
||||
state.lastExpectedVariantOffset = -1;
|
||||
}
|
||||
if (!result && eatMoreFlagOnce && frame.offset != builder_.getCurrentOffset()) result = true;
|
||||
}
|
||||
else if (!result && pinned && frame.errorReportedAt < 0) {
|
||||
// do not report if there're errors after current offset
|
||||
if (getLastVariantOffset(state, initialOffset) == initialOffset) {
|
||||
// do not force, inner recoverRoot might have skipped some tokens
|
||||
if (reportError(builder_, state, false, false)) {
|
||||
frame.errorReportedAt = initialOffset;
|
||||
}
|
||||
}
|
||||
}
|
||||
// propagate errorReportedAt up the stack to avoid duplicate reporting
|
||||
Frame prevFrame = state.frameStack.isEmpty() ? null : state.frameStack.getLast();
|
||||
if (prevFrame != null && prevFrame.errorReportedAt < frame.errorReportedAt) prevFrame.errorReportedAt = frame.errorReportedAt;
|
||||
state.FRAMES.recycle(frame);
|
||||
return result;
|
||||
}
|
||||
|
||||
public static boolean report_error_(PsiBuilder builder_, boolean result_) {
|
||||
if (!result_) report_error_(builder_, ErrorState.get(builder_), false);
|
||||
return result_;
|
||||
}
|
||||
|
||||
public static void report_error_(PsiBuilder builder_, ErrorState state, boolean advance) {
|
||||
Frame frame = state.frameStack.isEmpty()? null : state.frameStack.getLast();
|
||||
if (frame == null) {
|
||||
LOG.error("Unbalanced error section: got null , expected " + frame);
|
||||
return;
|
||||
}
|
||||
int offset = builder_.getCurrentOffset();
|
||||
if (frame.errorReportedAt < offset && getLastVariantOffset(state, builder_.getCurrentOffset()) <= offset) {
|
||||
if (reportError(builder_, state, true, advance)) {
|
||||
frame.errorReportedAt = offset;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static int getLastVariantOffset(ErrorState state, int defValue) {
|
||||
return state.lastExpectedVariantOffset < 0? defValue : state.lastExpectedVariantOffset;
|
||||
}
|
||||
|
||||
private static boolean reportError(PsiBuilder builder_, ErrorState state, boolean force, boolean advance) {
|
||||
String expectedText = state.getExpectedText(builder_);
|
||||
boolean notEmpty = StringUtil.isNotEmpty(expectedText);
|
||||
if (force || notEmpty || advance) {
|
||||
String gotText = builder_.eof()? "unexpected end of file" :
|
||||
notEmpty? "got '" + builder_.getTokenText() +"'" :
|
||||
"'" + builder_.getTokenText() +"' unexpected";
|
||||
String message = expectedText + gotText;
|
||||
if (advance) {
|
||||
PsiBuilder.Marker mark = builder_.mark();
|
||||
builder_.advanceLexer();
|
||||
mark.error(message);
|
||||
}
|
||||
else {
|
||||
builder_.error(message);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
public static final Key<CompletionState> COMPLETION_STATE_KEY = Key.create("COMPLETION_STATE_KEY");
|
||||
|
||||
public static class CompletionState implements Function<Object, String> {
|
||||
public final int offset;
|
||||
public final Collection<String> items = new THashSet<String>();
|
||||
|
||||
public CompletionState(int offset) {
|
||||
this.offset = offset;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public String convertItem(Object o) {
|
||||
return o instanceof Object[] ? StringUtil.join((Object[]) o, this, " ") : o.toString();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String fun(Object o) {
|
||||
return o.toString();
|
||||
}
|
||||
}
|
||||
|
||||
public static class Builder extends PsiBuilderAdapter {
|
||||
public final ErrorState state;
|
||||
public final PsiParser parser;
|
||||
|
||||
public Builder(PsiBuilder builder, ErrorState state, PsiParser parser) {
|
||||
super(builder);
|
||||
this.state = state;
|
||||
this.parser = parser;
|
||||
}
|
||||
|
||||
public Lexer getLexer() {
|
||||
return ((PsiBuilderImpl)myDelegate).getLexer();
|
||||
}
|
||||
}
|
||||
|
||||
public static PsiBuilder adapt_builder_(IElementType root, PsiBuilder builder, PsiParser parser) {
|
||||
ErrorState state = new ErrorState();
|
||||
ErrorState.initState(root, builder, state);
|
||||
return new Builder(builder, state, parser);
|
||||
}
|
||||
|
||||
public static class ErrorState {
|
||||
int predicateCount;
|
||||
boolean predicateSign = true;
|
||||
boolean suppressErrors;
|
||||
public final LinkedList<Frame> frameStack = new LinkedList<Frame>();
|
||||
public CompletionState completionState;
|
||||
|
||||
private boolean caseSensitive;
|
||||
public BracePair[] braces;
|
||||
public boolean altMode;
|
||||
|
||||
private int lastExpectedVariantOffset = -1;
|
||||
public MyList<Variant> variants = new MyList<Variant>(500);
|
||||
public MyList<Variant> unexpected = new MyList<Variant>(10);
|
||||
|
||||
final LimitedPool<Variant> VARIANTS = new LimitedPool<Variant>(1000, new LimitedPool.ObjectFactory<Variant>() {
|
||||
public Variant create() {
|
||||
return new Variant();
|
||||
}
|
||||
|
||||
public void cleanup(final Variant o) {
|
||||
}
|
||||
});
|
||||
final LimitedPool<Frame> FRAMES = new LimitedPool<Frame>(100, new LimitedPool.ObjectFactory<Frame>() {
|
||||
public Frame create() {
|
||||
return new Frame();
|
||||
}
|
||||
|
||||
public void cleanup(final Frame o) {
|
||||
}
|
||||
});
|
||||
|
||||
public static ErrorState get(PsiBuilder builder) {
|
||||
return ((Builder)builder).state;
|
||||
}
|
||||
|
||||
private static void initState(IElementType root, PsiBuilder builder, ErrorState state) {
|
||||
PsiFile file = builder.getUserDataUnprotected(FileContextUtil.CONTAINING_FILE_KEY);
|
||||
state.completionState = file == null? null: file.getUserData(COMPLETION_STATE_KEY);
|
||||
Language language = file == null? root.getLanguage() : file.getLanguage();
|
||||
state.caseSensitive = language.isCaseSensitive();
|
||||
PairedBraceMatcher matcher = LanguageBraceMatching.INSTANCE.forLanguage(language);
|
||||
state.braces = matcher == null ? null : matcher.getPairs();
|
||||
if (state.braces != null && state.braces.length == 0) state.braces = null;
|
||||
}
|
||||
|
||||
public String getExpectedText(PsiBuilder builder_) {
|
||||
int offset = builder_.getCurrentOffset();
|
||||
StringBuilder sb = new StringBuilder();
|
||||
if (addExpected(sb, offset, true)) {
|
||||
sb.append(" expected, ");
|
||||
}
|
||||
else if (addExpected(sb, offset, false)) sb.append(" unexpected, ");
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
private static final int MAX_VARIANTS_TO_DISPLAY = Integer.MAX_VALUE;
|
||||
private boolean addExpected(StringBuilder sb, int offset, boolean expected) {
|
||||
MyList<Variant> list = expected ? variants : unexpected;
|
||||
String[] strings = new String[list.size()];
|
||||
long[] hashes = new long[strings.length];
|
||||
Arrays.fill(strings, "");
|
||||
int count = 0;
|
||||
loop: for (Variant variant : list) {
|
||||
if (offset == variant.offset) {
|
||||
String text = variant.object.toString();
|
||||
long hash = StringHash.calc(text);
|
||||
for (int i=0; i<count; i++) {
|
||||
if (hashes[i] == hash) continue loop;
|
||||
}
|
||||
hashes[count] = hash;
|
||||
strings[count] = text;
|
||||
count++;
|
||||
}
|
||||
}
|
||||
Arrays.sort(strings);
|
||||
count = 0;
|
||||
for (String s : strings) {
|
||||
if (s.length() == 0) continue;
|
||||
if (count++ > 0) {
|
||||
if (count > MAX_VARIANTS_TO_DISPLAY) {
|
||||
sb.append(" and ...");
|
||||
break;
|
||||
}
|
||||
else {
|
||||
sb.append(", ");
|
||||
}
|
||||
}
|
||||
char c = s.charAt(0);
|
||||
String displayText = c == '<' || StringUtil.isJavaIdentifierStart(c) ? s : '\'' + s + '\'';
|
||||
sb.append(displayText);
|
||||
}
|
||||
if (count > 1 && count < MAX_VARIANTS_TO_DISPLAY) {
|
||||
int idx = sb.lastIndexOf(", ");
|
||||
sb.replace(idx, idx + 1, " or");
|
||||
}
|
||||
return count > 0;
|
||||
}
|
||||
|
||||
public void clearVariants(boolean expected, int start) {
|
||||
MyList<Variant> list = expected? variants : unexpected;
|
||||
for (int i = start, len = list.size(); i < len; i ++) {
|
||||
VARIANTS.recycle(list.get(i));
|
||||
}
|
||||
list.setSize(start);
|
||||
}
|
||||
}
|
||||
|
||||
public static class Frame {
|
||||
public int offset;
|
||||
public int level;
|
||||
public String section;
|
||||
public String name;
|
||||
public int variantCount;
|
||||
public int errorReportedAt;
|
||||
|
||||
public Frame() {
|
||||
}
|
||||
|
||||
public Frame init(int offset, int level, String section, String name, int variantCount) {
|
||||
this.offset = offset;
|
||||
this.level = level;
|
||||
this.section = section;
|
||||
this.name = name;
|
||||
this.variantCount = variantCount;
|
||||
this.errorReportedAt = -1;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "<"+offset+", "+section+", "+level+">";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public static class Variant {
|
||||
int offset;
|
||||
Object object;
|
||||
|
||||
public Variant init(int offset, Object text) {
|
||||
this.offset = offset;
|
||||
this.object = text;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "<" + offset + ", " + object + ">";
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) return true;
|
||||
if (o == null || getClass() != o.getClass()) return false;
|
||||
|
||||
Variant variant = (Variant)o;
|
||||
|
||||
if (offset != variant.offset) return false;
|
||||
if (!this.object.equals(variant.object)) return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
int result = offset;
|
||||
result = 31 * result + object.hashCode();
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
@Nullable
|
||||
private static IElementType getClosingBracket(ErrorState state, IElementType type) {
|
||||
if (state.braces == null) return null;
|
||||
for (BracePair pair : state.braces) {
|
||||
if (type == pair.getLeftBraceType()) return pair.getRightBraceType();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
private static final int MAX_CHILDREN_IN_TREE = 10;
|
||||
public static boolean parseAsTree(ErrorState state, final PsiBuilder builder_, int level, final IElementType chunkType,
|
||||
boolean checkBraces, final Parser parser, final Parser eatMoreCondition) {
|
||||
final LinkedList<Pair<PsiBuilder.Marker, PsiBuilder.Marker>> parenList = new LinkedList<Pair<PsiBuilder.Marker, PsiBuilder.Marker>>();
|
||||
final LinkedList<Pair<PsiBuilder.Marker, Integer>> siblingList = new LinkedList<Pair<PsiBuilder.Marker, Integer>>();
|
||||
PsiBuilder.Marker marker = null;
|
||||
|
||||
final Runnable checkSiblingsRunnable = new Runnable() {
|
||||
public void run() {
|
||||
main:
|
||||
while (!siblingList.isEmpty()) {
|
||||
final Pair<PsiBuilder.Marker, PsiBuilder.Marker> parenPair = parenList.peek();
|
||||
final int rating = siblingList.getFirst().second;
|
||||
int count = 0;
|
||||
for (Pair<PsiBuilder.Marker, Integer> pair : siblingList) {
|
||||
if (pair.second != rating || parenPair != null && pair.first == parenPair.second) break main;
|
||||
if (++count >= MAX_CHILDREN_IN_TREE) {
|
||||
final PsiBuilder.Marker parentMarker = pair.first.precede();
|
||||
while (count-- > 0) {
|
||||
siblingList.removeFirst();
|
||||
}
|
||||
parentMarker.done(chunkType);
|
||||
siblingList.addFirst(Pair.create(parentMarker, rating + 1));
|
||||
continue main;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
};
|
||||
boolean checkParens = state.braces != null && checkBraces;
|
||||
int totalCount = 0;
|
||||
int tokenCount = 0;
|
||||
if (checkParens && builder_.rawLookup(-1) == state.braces[0].getLeftBraceType()) {
|
||||
LighterASTNode doneMarker = builder_.getLatestDoneMarker();
|
||||
if (doneMarker != null && doneMarker.getStartOffset() == builder_.rawTokenTypeStart(-1) && doneMarker.getTokenType() == TokenType.ERROR_ELEMENT) {
|
||||
parenList.add(Pair.create(((PsiBuilder.Marker)doneMarker).precede(), (PsiBuilder.Marker)null));
|
||||
}
|
||||
}
|
||||
while (true) {
|
||||
final IElementType tokenType = builder_.getTokenType();
|
||||
if (checkParens && (tokenType == state.braces[0].getLeftBraceType() || tokenType == state.braces[0].getRightBraceType() && !parenList.isEmpty())) {
|
||||
if (marker != null) {
|
||||
marker.done(chunkType);
|
||||
siblingList.addFirst(Pair.create(marker, 1));
|
||||
marker = null;
|
||||
tokenCount = 0;
|
||||
}
|
||||
if (tokenType == state.braces[0].getLeftBraceType()) {
|
||||
final Pair<PsiBuilder.Marker, Integer> prev = siblingList.peek();
|
||||
parenList.addFirst(Pair.create(builder_.mark(), prev == null ? null : prev.first));
|
||||
}
|
||||
checkSiblingsRunnable.run();
|
||||
builder_.advanceLexer();
|
||||
if (tokenType == state.braces[0].getRightBraceType()) {
|
||||
final Pair<PsiBuilder.Marker, PsiBuilder.Marker> pair = parenList.removeFirst();
|
||||
pair.first.done(chunkType);
|
||||
// drop all markers inside parens
|
||||
while (!siblingList.isEmpty() && siblingList.getFirst().first != pair.second) {
|
||||
siblingList.removeFirst();
|
||||
}
|
||||
siblingList.addFirst(Pair.create(pair.first, 1));
|
||||
checkSiblingsRunnable.run();
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (marker == null) {
|
||||
marker = builder_.mark();
|
||||
}
|
||||
final boolean result = (state.altMode && !parenList.isEmpty() || eatMoreCondition.parse(builder_, level + 1)) && parser.parse(builder_, level + 1);
|
||||
if (result) {
|
||||
tokenCount++;
|
||||
totalCount++;
|
||||
}
|
||||
if (!result) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (tokenCount >= MAX_CHILDREN_IN_TREE && marker != null) {
|
||||
marker.done(chunkType);
|
||||
siblingList.addFirst(Pair.create(marker, 1));
|
||||
checkSiblingsRunnable.run();
|
||||
marker = null;
|
||||
tokenCount = 0;
|
||||
}
|
||||
}
|
||||
if (marker != null) {
|
||||
marker.drop();
|
||||
}
|
||||
for (Pair<PsiBuilder.Marker, PsiBuilder.Marker> pair : parenList) {
|
||||
pair.first.drop();
|
||||
}
|
||||
return totalCount != 0;
|
||||
}
|
||||
|
||||
private static class DummyBlockElementType extends IElementType implements ICompositeElementType{
|
||||
DummyBlockElementType() {
|
||||
super("DUMMY_BLOCK", Language.ANY);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public ASTNode createCompositeNode() {
|
||||
return new DummyBlock();
|
||||
}
|
||||
}
|
||||
|
||||
public static class DummyBlock extends CompositePsiElement {
|
||||
DummyBlock() {
|
||||
super(DUMMY_BLOCK);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PsiReference[] getReferences() {
|
||||
return PsiReference.EMPTY_ARRAY;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canNavigateToSource() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canNavigate() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public Language getLanguage() {
|
||||
return getParent().getLanguage();
|
||||
}
|
||||
}
|
||||
|
||||
protected static class MyList<E> extends ArrayList<E> {
|
||||
public MyList(int initialCapacity) {
|
||||
super(initialCapacity);
|
||||
}
|
||||
|
||||
protected void setSize(int fromIndex) {
|
||||
super.removeRange(fromIndex, size());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -207,6 +207,7 @@ public class PsiDynaReference<T extends PsiElement> extends PsiReferenceBase<T>
|
||||
}
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
@SuppressWarnings({"UnresolvedPropertyKey"})
|
||||
public String getUnresolvedMessagePattern() {
|
||||
|
||||
+1
@@ -553,6 +553,7 @@ public class FileReference implements FileReferenceOwner, PsiPolyVariantReferenc
|
||||
return myIndex;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public String getUnresolvedMessagePattern() {
|
||||
return LangBundle.message("error.cannot.resolve")
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2009 JetBrains s.r.o.
|
||||
* Copyright 2000-2013 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.
|
||||
@@ -21,8 +21,6 @@ import com.intellij.openapi.options.UnnamedConfigurable;
|
||||
* @author spleaner
|
||||
*/
|
||||
public abstract class BrowserSettingsProvider implements UnnamedConfigurable {
|
||||
public void disposeUIResources() {
|
||||
}
|
||||
|
||||
public void applySettingsFromWindowsRegistry() {}
|
||||
@Override
|
||||
public void disposeUIResources() { }
|
||||
}
|
||||
|
||||
@@ -23,13 +23,10 @@ import org.jboss.netty.handler.codec.http.QueryStringDecoder;
|
||||
import java.io.IOException;
|
||||
|
||||
public abstract class HttpRequestHandler {
|
||||
public boolean isSupported(HttpMethod method) {
|
||||
return method == HttpMethod.GET;
|
||||
public boolean isSupported(HttpRequest request) {
|
||||
return request.getMethod() == HttpMethod.GET;
|
||||
}
|
||||
|
||||
public abstract boolean process(QueryStringDecoder urlDecoder, HttpRequest request, ChannelHandlerContext context)
|
||||
throws IOException;
|
||||
|
||||
public void serverStopping() {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,8 +15,10 @@
|
||||
*/
|
||||
package org.jetbrains.ide;
|
||||
|
||||
import com.intellij.openapi.Disposable;
|
||||
import com.intellij.openapi.components.ServiceManager;
|
||||
import com.intellij.openapi.extensions.ExtensionPointName;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
public abstract class WebServerManager {
|
||||
// Your handler will be instantiated on first user request
|
||||
@@ -29,4 +31,7 @@ public abstract class WebServerManager {
|
||||
public abstract int getPort();
|
||||
|
||||
public abstract WebServerManager waitForStart();
|
||||
|
||||
@Nullable
|
||||
public abstract Disposable getServerDisposable();
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2009 JetBrains s.r.o.
|
||||
* Copyright 2000-2013 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.
|
||||
@@ -111,21 +111,6 @@ public class BrowserSettingsPanel extends JPanel {
|
||||
for (BrowserSettingsProvider settingsProvider : mySettingsProviders) {
|
||||
outerPanel.add(settingsProvider.createComponent());
|
||||
}
|
||||
if (SystemInfo.isWindows) {
|
||||
JPanel wrapperPanel = new JPanel(new BorderLayout());
|
||||
JButton registryButton = new JButton("Retrieve settings from Windows registry");
|
||||
registryButton.setMnemonic('W');
|
||||
registryButton.addActionListener(new ActionListener() {
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
for (BrowserSettingsProvider settingsProvider : mySettingsProviders) {
|
||||
settingsProvider.applySettingsFromWindowsRegistry();
|
||||
}
|
||||
}
|
||||
});
|
||||
wrapperPanel.add(registryButton, BorderLayout.EAST);
|
||||
outerPanel.add(wrapperPanel);
|
||||
}
|
||||
|
||||
add(outerPanel, BorderLayout.NORTH);
|
||||
}
|
||||
|
||||
@@ -79,8 +79,8 @@ public class XmlRpcServerImpl implements XmlRpcServer {
|
||||
|
||||
static final class XmlRpcRequestHandler extends HttpRequestHandler {
|
||||
@Override
|
||||
public boolean isSupported(HttpMethod method) {
|
||||
return method == HttpMethod.POST || method == HttpMethod.OPTIONS;
|
||||
public boolean isSupported(HttpRequest request) {
|
||||
return request.getMethod() == HttpMethod.POST || request.getMethod() == HttpMethod.OPTIONS;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -103,7 +103,7 @@ public class XmlRpcServerImpl implements XmlRpcServer {
|
||||
}
|
||||
|
||||
private boolean process(QueryStringDecoder urlDecoder, HttpRequest request, ChannelHandlerContext context) throws IOException {
|
||||
if (!(urlDecoder.getPath().isEmpty() || urlDecoder.getPath().equalsIgnoreCase("/RPC2"))) {
|
||||
if (!isXmlRpcRequest(urlDecoder.getPath())) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -138,6 +138,10 @@ public class XmlRpcServerImpl implements XmlRpcServer {
|
||||
return false;
|
||||
}
|
||||
|
||||
private static boolean isXmlRpcRequest(String path) {
|
||||
return path.isEmpty() || (path.length() == 1 && path.charAt(0) == '/') || path.equalsIgnoreCase("/RPC2");
|
||||
}
|
||||
|
||||
private static class XmlRpcHandlerMappingImpl implements XmlRpcHandlerMapping {
|
||||
protected final THashMap<String, Object> handlers = new THashMap<String, Object>();
|
||||
|
||||
|
||||
+12
-4
@@ -28,6 +28,7 @@ import com.intellij.openapi.ui.Messages;
|
||||
import com.intellij.openapi.ui.VerticalFlowLayout;
|
||||
import com.intellij.openapi.util.io.FileUtil;
|
||||
import com.intellij.openapi.util.io.UniqueNameBuilder;
|
||||
import com.intellij.openapi.util.text.StringUtil;
|
||||
import com.intellij.ui.ClickListener;
|
||||
import com.intellij.ui.ListUtil;
|
||||
import com.intellij.ui.components.JBList;
|
||||
@@ -95,17 +96,24 @@ public class RecentProjectPanel extends JPanel {
|
||||
ActionListener deleteAction = new ActionListener() {
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
ReopenProjectAction selection = (ReopenProjectAction)myList.getSelectedValue();
|
||||
Object[] selection = myList.getSelectedValues();
|
||||
|
||||
if (selection != null) {
|
||||
if (selection != null && selection.length > 0) {
|
||||
final int rc = Messages.showOkCancelDialog(RecentProjectPanel.this,
|
||||
"Remove '" + selection.getTemplatePresentation().getText() +
|
||||
"Remove '" + StringUtil.join(selection, new Function<Object, String>() {
|
||||
@Override
|
||||
public String fun(Object action) {
|
||||
return ((ReopenProjectAction)action).getTemplatePresentation().getText();
|
||||
}
|
||||
}, "'\n'") +
|
||||
"' from recent projects list?",
|
||||
"Remove Recent Project",
|
||||
Messages.getQuestionIcon());
|
||||
if (rc == 0) {
|
||||
final RecentProjectsManagerBase manager = RecentProjectsManagerBase.getInstance();
|
||||
manager.removePath(selection.getProjectPath());
|
||||
for (Object projectAction : selection) {
|
||||
manager.removePath(((ReopenProjectAction)projectAction).getProjectPath());
|
||||
}
|
||||
ListUtil.removeSelectedItems(myList);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,6 +12,7 @@ import com.intellij.openapi.diagnostic.Logger;
|
||||
import com.intellij.openapi.project.DumbAware;
|
||||
import com.intellij.openapi.project.Project;
|
||||
import com.intellij.openapi.startup.StartupActivity;
|
||||
import com.intellij.openapi.util.Disposer;
|
||||
import org.jboss.netty.channel.ChannelException;
|
||||
import org.jetbrains.annotations.NonNls;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
@@ -21,7 +22,7 @@ import java.util.concurrent.ExecutionException;
|
||||
import java.util.concurrent.Future;
|
||||
import java.util.concurrent.atomic.AtomicBoolean;
|
||||
|
||||
class WebServerManagerImpl extends WebServerManager implements Disposable {
|
||||
class WebServerManagerImpl extends WebServerManager {
|
||||
private static final Logger LOG = Logger.getInstance(WebServerManager.class);
|
||||
|
||||
@NonNls
|
||||
@@ -102,6 +103,7 @@ class WebServerManagerImpl extends WebServerManager implements Disposable {
|
||||
return;
|
||||
}
|
||||
|
||||
Disposer.register(ApplicationManager.getApplication(), server);
|
||||
detectedPortNumber = server.start(getDefaultPort(), PORTS_COUNT, true);
|
||||
if (detectedPortNumber == -1) {
|
||||
LOG.info("web server cannot be started, cannot bind to port");
|
||||
@@ -114,10 +116,8 @@ class WebServerManagerImpl extends WebServerManager implements Disposable {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void dispose() {
|
||||
if (started.get() && server != null) {
|
||||
server.stop();
|
||||
LOG.info("web server stopped");
|
||||
}
|
||||
@Nullable
|
||||
public Disposable getServerDisposable() {
|
||||
return server;
|
||||
}
|
||||
}
|
||||
@@ -15,6 +15,7 @@
|
||||
*/
|
||||
package org.jetbrains.io;
|
||||
|
||||
import com.intellij.openapi.Disposable;
|
||||
import com.intellij.openapi.application.ApplicationManager;
|
||||
import com.intellij.openapi.diagnostic.Logger;
|
||||
import com.intellij.openapi.util.SystemInfo;
|
||||
@@ -46,7 +47,7 @@ import static org.jboss.netty.handler.codec.http.HttpResponseStatus.NOT_FOUND;
|
||||
import static org.jboss.netty.handler.codec.http.HttpResponseStatus.OK;
|
||||
import static org.jboss.netty.handler.codec.http.HttpVersion.HTTP_1_1;
|
||||
|
||||
public class WebServer {
|
||||
public class WebServer implements Disposable {
|
||||
private static final String START_TIME_PATH = "/startTime";
|
||||
|
||||
private final ChannelGroup openChannels = new DefaultChannelGroup("web-server");
|
||||
@@ -247,25 +248,15 @@ public class WebServer {
|
||||
}
|
||||
}
|
||||
|
||||
public void stop() {
|
||||
@Override
|
||||
public void dispose() {
|
||||
try {
|
||||
for (HttpRequestHandler handler : WebServerManager.EP_NAME.getExtensions()) {
|
||||
try {
|
||||
handler.serverStopping();
|
||||
}
|
||||
catch (Exception e) {
|
||||
LOG.error(e);
|
||||
}
|
||||
}
|
||||
openChannels.close().awaitUninterruptibly();
|
||||
}
|
||||
finally {
|
||||
try {
|
||||
openChannels.close().awaitUninterruptibly();
|
||||
}
|
||||
finally {
|
||||
channelFactory.releaseExternalResources();
|
||||
}
|
||||
channelFactory.releaseExternalResources();
|
||||
}
|
||||
LOG.info("web server stopped");
|
||||
}
|
||||
|
||||
public static void replaceDefaultHandler(@NotNull ChannelHandlerContext context, @NotNull SimpleChannelUpstreamHandler messageChannelHandler) {
|
||||
@@ -302,6 +293,7 @@ public class WebServer {
|
||||
public void messageReceived(ChannelHandlerContext context, MessageEvent event) throws Exception {
|
||||
if (!(event.getMessage() instanceof HttpRequest)) {
|
||||
context.sendUpstream(event);
|
||||
return;
|
||||
}
|
||||
|
||||
HttpRequest request = (HttpRequest)event.getMessage();
|
||||
@@ -320,7 +312,7 @@ public class WebServer {
|
||||
if (connectedHandler == null) {
|
||||
for (HttpRequestHandler handler : WebServerManager.EP_NAME.getExtensions()) {
|
||||
try {
|
||||
if (handler.isSupported(request.getMethod()) && handler.process(urlDecoder, request, context)) {
|
||||
if (handler.isSupported(request) && handler.process(urlDecoder, request, context)) {
|
||||
if (context.getAttachment() == null) {
|
||||
context.setAttachment(handler);
|
||||
}
|
||||
@@ -332,7 +324,7 @@ public class WebServer {
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (connectedHandler.isSupported(request.getMethod())) {
|
||||
else if (connectedHandler.isSupported(request)) {
|
||||
connectedHandler.process(urlDecoder, request, context);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -248,4 +248,6 @@ zen.coding.incorrect.abbreviation.error=Incorrect abbreviation
|
||||
title.cannot.create.html.file=Cannot create HTML file
|
||||
new.html.file.action=HTML File
|
||||
new.html.file.action.description=Creates new HTML file
|
||||
html5.outline.mode=HTML5 Outline
|
||||
html5.outline.mode=HTML5 Outline
|
||||
|
||||
read.win.registry=Retrieve settings from &Windows registry
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,155 +1,181 @@
|
||||
<extensionPoints>
|
||||
<extensionPoint name="applicationService" beanClass="com.intellij.openapi.components.ServiceDescriptor"/>
|
||||
<extensionPoint name="projectService" beanClass="com.intellij.openapi.components.ServiceDescriptor"/>
|
||||
<idea-plugin>
|
||||
<extensionPoints>
|
||||
<extensionPoint name="applicationService" beanClass="com.intellij.openapi.components.ServiceDescriptor"/>
|
||||
<extensionPoint name="projectService" beanClass="com.intellij.openapi.components.ServiceDescriptor"/>
|
||||
|
||||
<extensionPoint name="appStarter"
|
||||
interface="com.intellij.openapi.application.ApplicationStarter"/>
|
||||
<extensionPoint name="appStarter"
|
||||
interface="com.intellij.openapi.application.ApplicationStarter"/>
|
||||
|
||||
<extensionPoint name="postStartupActivity"
|
||||
interface="com.intellij.openapi.startup.StartupActivity"/>
|
||||
<extensionPoint name="postStartupActivity"
|
||||
interface="com.intellij.openapi.startup.StartupActivity"/>
|
||||
|
||||
<extensionPoint name="errorHandler"
|
||||
interface="com.intellij.openapi.diagnostic.ErrorReportSubmitter"/>
|
||||
<extensionPoint name="errorHandler"
|
||||
interface="com.intellij.openapi.diagnostic.ErrorReportSubmitter"/>
|
||||
|
||||
<extensionPoint name="projectConfigurable"
|
||||
beanClass="com.intellij.openapi.options.ConfigurableEP"
|
||||
area="IDEA_PROJECT"/>
|
||||
<extensionPoint name="projectConfigurable"
|
||||
beanClass="com.intellij.openapi.options.ConfigurableEP"
|
||||
area="IDEA_PROJECT">
|
||||
<with attribute="instanceClass" implements="com.intellij.openapi.options.Configurable"/>
|
||||
</extensionPoint>
|
||||
|
||||
<extensionPoint name="applicationConfigurable"
|
||||
beanClass="com.intellij.openapi.options.ConfigurableEP"/>
|
||||
<extensionPoint name="applicationConfigurable"
|
||||
beanClass="com.intellij.openapi.options.ConfigurableEP">
|
||||
<with attribute="instanceClass" implements="com.intellij.openapi.options.Configurable"/>
|
||||
</extensionPoint>
|
||||
|
||||
<extensionPoint name="selectInTarget"
|
||||
interface="com.intellij.ide.SelectInTarget"
|
||||
area="IDEA_PROJECT"/>
|
||||
<extensionPoint name="selectInTarget"
|
||||
interface="com.intellij.ide.SelectInTarget"
|
||||
area="IDEA_PROJECT"/>
|
||||
|
||||
<extensionPoint name="fileEditorProvider"
|
||||
interface="com.intellij.openapi.fileEditor.FileEditorProvider"/>
|
||||
<extensionPoint name="fileEditorProvider"
|
||||
interface="com.intellij.openapi.fileEditor.FileEditorProvider"/>
|
||||
|
||||
<extensionPoint name="selectedFileEditorProvider"
|
||||
interface="com.intellij.openapi.fileEditor.SelectedFileEditorProvider"/>
|
||||
<extensionPoint name="selectedFileEditorProvider"
|
||||
interface="com.intellij.openapi.fileEditor.SelectedFileEditorProvider"/>
|
||||
|
||||
<extensionPoint name="fileTypeFactory"
|
||||
interface="com.intellij.openapi.fileTypes.FileTypeFactory"/>
|
||||
<extensionPoint name="fileTypeFactory"
|
||||
interface="com.intellij.openapi.fileTypes.FileTypeFactory"/>
|
||||
|
||||
<extensionPoint name="virtualFileSystem"
|
||||
beanClass="com.intellij.util.KeyedLazyInstanceEP"/>
|
||||
<extensionPoint name="virtualFileSystem"
|
||||
beanClass="com.intellij.util.KeyedLazyInstanceEP">
|
||||
<with attribute="implementationClass" implements="com.intellij.openapi.vfs.VirtualFileSystem"/>
|
||||
</extensionPoint>
|
||||
|
||||
<extensionPoint name="keymapExtension"
|
||||
interface="com.intellij.openapi.keymap.KeymapExtension"/>
|
||||
<extensionPoint name="keymapExtension"
|
||||
interface="com.intellij.openapi.keymap.KeymapExtension"/>
|
||||
|
||||
<extensionPoint name="getDataRule"
|
||||
beanClass="com.intellij.util.KeyedLazyInstanceEP"/>
|
||||
<extensionPoint name="dataValidator"
|
||||
beanClass="com.intellij.util.KeyedLazyInstanceEP"/>
|
||||
<extensionPoint name="cutElementMarker"
|
||||
interface="com.intellij.openapi.ide.CutElementMarker"/>
|
||||
<extensionPoint name="getDataRule"
|
||||
beanClass="com.intellij.util.KeyedLazyInstanceEP">
|
||||
<with attribute="implementationClass" implements="com.intellij.ide.impl.dataRules.GetDataRule"/>
|
||||
</extensionPoint>
|
||||
|
||||
<extensionPoint name="exportable" beanClass="com.intellij.openapi.components.ServiceBean"/>
|
||||
<extensionPoint name="schemeOwner" beanClass="com.intellij.openapi.components.ServiceBean"/>
|
||||
<extensionPoint name="dataValidator"
|
||||
beanClass="com.intellij.util.KeyedLazyInstanceEP">
|
||||
<with attribute="implementationClass" implements="com.intellij.ide.impl.DataValidator"/>
|
||||
</extensionPoint>
|
||||
|
||||
<extensionPoint name="ideRootPaneNorth" interface="com.intellij.openapi.wm.IdeRootPaneNorthExtension" area="IDEA_PROJECT"/>
|
||||
<extensionPoint name="cutElementMarker"
|
||||
interface="com.intellij.openapi.ide.CutElementMarker"/>
|
||||
|
||||
<extensionPoint name="handleTypeFactory" interface="com.intellij.openapi.vcs.readOnlyHandler.HandleTypeFactory"
|
||||
area="IDEA_PROJECT"/>
|
||||
<extensionPoint name="customFileTypeFactory" interface="com.intellij.openapi.fileTypes.ex.CustomFileTypeFactory"/>
|
||||
<extensionPoint name="fileTypeRegistrator" interface="com.intellij.ide.highlighter.FileTypeRegistrator"/>
|
||||
<extensionPoint name="exportable" beanClass="com.intellij.openapi.components.ServiceBean"/>
|
||||
<extensionPoint name="schemeOwner" beanClass="com.intellij.openapi.components.ServiceBean"/>
|
||||
|
||||
<extensionPoint name="undoProvider" interface="com.intellij.openapi.command.impl.UndoProvider"/>
|
||||
<extensionPoint name="projectUndoProvider" interface="com.intellij.openapi.command.impl.UndoProvider"
|
||||
area="IDEA_PROJECT"/>
|
||||
<extensionPoint name="ideRootPaneNorth" interface="com.intellij.openapi.wm.IdeRootPaneNorthExtension" area="IDEA_PROJECT"/>
|
||||
|
||||
<extensionPoint name="cachedValuesFactory" interface="com.intellij.util.CachedValuesFactory" area="IDEA_PROJECT"/>
|
||||
|
||||
<extensionPoint name="syntaxHighlighter"
|
||||
beanClass="com.intellij.openapi.extensions.KeyedFactoryEPBean"/>
|
||||
<extensionPoint name="handleTypeFactory" interface="com.intellij.openapi.vcs.readOnlyHandler.HandleTypeFactory"
|
||||
area="IDEA_PROJECT"/>
|
||||
<extensionPoint name="customFileTypeFactory" interface="com.intellij.openapi.fileTypes.ex.CustomFileTypeFactory"/>
|
||||
<extensionPoint name="fileTypeRegistrator" interface="com.intellij.ide.highlighter.FileTypeRegistrator"/>
|
||||
|
||||
<extensionPoint name="lang.syntaxHighlighterFactory"
|
||||
beanClass="com.intellij.util.KeyedLazyInstanceEP"/>
|
||||
<extensionPoint name="projectOpenProcessor"
|
||||
interface="com.intellij.projectImport.ProjectOpenProcessor"/>
|
||||
<extensionPoint name="undoProvider" interface="com.intellij.openapi.command.impl.UndoProvider"/>
|
||||
<extensionPoint name="projectUndoProvider" interface="com.intellij.openapi.command.impl.UndoProvider"
|
||||
area="IDEA_PROJECT"/>
|
||||
|
||||
<extensionPoint name="codeInsight.linkHandler"
|
||||
beanClass="com.intellij.codeInsight.hint.TooltipLinkHandlerEP"/>
|
||||
<extensionPoint name="cachedValuesFactory" interface="com.intellij.util.CachedValuesFactory" area="IDEA_PROJECT"/>
|
||||
|
||||
<extensionPoint name="directoryProjectConfigurator"
|
||||
interface="com.intellij.platform.DirectoryProjectConfigurator"/>
|
||||
<extensionPoint name="directoryProjectGenerator"
|
||||
interface="com.intellij.platform.DirectoryProjectGenerator"/>
|
||||
<extensionPoint name="syntaxHighlighter"
|
||||
beanClass="com.intellij.openapi.extensions.KeyedFactoryEPBean">
|
||||
<with attribute="implementationClass" implements="com.intellij.openapi.fileTypes.SyntaxHighlighterProvider"/>
|
||||
</extensionPoint>
|
||||
|
||||
<extensionPoint name="projectTemplatesFactory"
|
||||
interface="com.intellij.platform.ProjectTemplatesFactory"/>
|
||||
<extensionPoint name="lang.syntaxHighlighterFactory"
|
||||
beanClass="com.intellij.util.KeyedLazyInstanceEP">
|
||||
<with attribute="implementationClass" implements="com.intellij.openapi.fileTypes.SyntaxHighlighterFactory"/>
|
||||
</extensionPoint>
|
||||
|
||||
<extensionPoint name="ApplicationLoadListener" interface="com.intellij.ide.ApplicationLoadListener"/>
|
||||
<extensionPoint name="ComponentRoamingType" beanClass="com.intellij.openapi.components.impl.stores.RoamingTypeExtensionPointBean"/>
|
||||
<extensionPoint name="projectOpenProcessor"
|
||||
interface="com.intellij.projectImport.ProjectOpenProcessor"/>
|
||||
|
||||
<extensionPoint name="editorTabTitleProvider" interface="com.intellij.openapi.fileEditor.impl.EditorTabTitleProvider"/>
|
||||
<extensionPoint name="editorTabColorProvider" interface="com.intellij.openapi.fileEditor.impl.EditorTabColorProvider"/>
|
||||
<extensionPoint name="editorFileSwapper" interface="com.intellij.openapi.fileEditor.impl.EditorFileSwapper"/>
|
||||
<extensionPoint name="editorFileAssociateFinder" interface="com.intellij.openapi.fileEditor.impl.FileEditorAssociateFinder"/>
|
||||
<extensionPoint name="codeInsight.linkHandler"
|
||||
beanClass="com.intellij.codeInsight.hint.TooltipLinkHandlerEP">
|
||||
<with attribute="handlerClass" implements="com.intellij.codeInsight.highlighting.TooltipLinkHandler"/>
|
||||
</extensionPoint>
|
||||
|
||||
<extensionPoint name="http.localFileFinder" interface="com.intellij.openapi.fileEditor.impl.http.LocalFileFinder"/>
|
||||
<extensionPoint name="http.fileEditorActionProvider" interface="com.intellij.openapi.fileEditor.impl.http.RemoteFileEditorActionProvider"/>
|
||||
<extensionPoint name="directoryProjectConfigurator"
|
||||
interface="com.intellij.platform.DirectoryProjectConfigurator"/>
|
||||
<extensionPoint name="directoryProjectGenerator"
|
||||
interface="com.intellij.platform.DirectoryProjectGenerator"/>
|
||||
|
||||
<extensionPoint name="componentConfigurationMerger" interface="com.intellij.openapi.components.XmlConfigurationMerger"/>
|
||||
<extensionPoint name="filetype.decompiler" beanClass="com.intellij.openapi.fileTypes.FileTypeExtensionPoint"/>
|
||||
<extensionPoint name="projectTemplatesFactory"
|
||||
interface="com.intellij.platform.ProjectTemplatesFactory"/>
|
||||
|
||||
<extensionPoint name="editorActionHandler" beanClass="com.intellij.openapi.editor.actionSystem.EditorActionHandlerBean"/>
|
||||
<extensionPoint name="editorTypedHandler" beanClass="com.intellij.openapi.editor.actionSystem.EditorTypedHandlerBean"/>
|
||||
<extensionPoint name="contentBasedClassFileProcessor" interface="com.intellij.openapi.fileTypes.ContentBasedClassFileProcessor"/>
|
||||
<extensionPoint name="ApplicationLoadListener" interface="com.intellij.ide.ApplicationLoadListener"/>
|
||||
<extensionPoint name="ComponentRoamingType" beanClass="com.intellij.openapi.components.impl.stores.RoamingTypeExtensionPointBean"/>
|
||||
|
||||
<extensionPoint name="browserSettingsProvider" beanClass="com.intellij.ide.BrowserSettingsProviderEP"/>
|
||||
<extensionPoint name="editorTabTitleProvider" interface="com.intellij.openapi.fileEditor.impl.EditorTabTitleProvider"/>
|
||||
<extensionPoint name="editorTabColorProvider" interface="com.intellij.openapi.fileEditor.impl.EditorTabColorProvider"/>
|
||||
<extensionPoint name="editorFileSwapper" interface="com.intellij.openapi.fileEditor.impl.EditorFileSwapper"/>
|
||||
<extensionPoint name="editorFileAssociateFinder" interface="com.intellij.openapi.fileEditor.impl.FileEditorAssociateFinder"/>
|
||||
|
||||
<extensionPoint name="additionalTextAttributes" beanClass="com.intellij.openapi.editor.colors.impl.AdditionalTextAttributesEP" />
|
||||
<extensionPoint name="bundledColorSchemesProvider" interface="com.intellij.openapi.editor.colors.impl.BundledColorSchemesProvider"/>
|
||||
<extensionPoint name="bundledQuickListsProvider" interface="com.intellij.openapi.actionSystem.impl.BundledQuickListsProvider"/>
|
||||
<extensionPoint name="bundledKeymapProvider" interface="com.intellij.openapi.keymap.impl.BundledKeymapProvider"/>
|
||||
<extensionPoint name="http.localFileFinder" interface="com.intellij.openapi.fileEditor.impl.http.LocalFileFinder"/>
|
||||
<extensionPoint name="http.fileEditorActionProvider" interface="com.intellij.openapi.fileEditor.impl.http.RemoteFileEditorActionProvider"/>
|
||||
|
||||
<extensionPoint name="toolWindow" beanClass="com.intellij.openapi.wm.ToolWindowEP"/>
|
||||
<extensionPoint name="welcomeScreen" interface="com.intellij.openapi.wm.WelcomeScreenProvider"/>
|
||||
<extensionPoint name="welcomeFrameProvider" interface="com.intellij.openapi.wm.WelcomeFrameProvider"/>
|
||||
<extensionPoint name="frameEditorComponentProvider" interface="com.intellij.openapi.wm.ex.FrameEditorComponentProvider"/>
|
||||
<extensionPoint name="componentConfigurationMerger" interface="com.intellij.openapi.components.XmlConfigurationMerger"/>
|
||||
<extensionPoint name="filetype.decompiler" beanClass="com.intellij.openapi.fileTypes.FileTypeExtensionPoint">
|
||||
<with attribute="implementationClass" implements="com.intellij.openapi.fileTypes.BinaryFileDecompiler"/>
|
||||
</extensionPoint>
|
||||
|
||||
<extensionPoint name="productivityFeaturesProvider" interface="com.intellij.featureStatistics.ProductivityFeaturesProvider"/>
|
||||
<extensionPoint name="editorActionHandler" beanClass="com.intellij.openapi.editor.actionSystem.EditorActionHandlerBean">
|
||||
<with attribute="implementationClass" implements="com.intellij.openapi.editor.actionSystem.EditorActionHandler"/>
|
||||
</extensionPoint>
|
||||
|
||||
<extensionPoint name="fileIconProvider" interface="com.intellij.ide.FileIconProvider"/>
|
||||
<extensionPoint name="fileIconPatcher" interface="com.intellij.ide.FileIconPatcher"/>
|
||||
<extensionPoint name="iconLayerProvider" interface="com.intellij.ide.IconLayerProvider"/>
|
||||
<extensionPoint name="editorTypedHandler" beanClass="com.intellij.openapi.editor.actionSystem.EditorTypedHandlerBean"/>
|
||||
<extensionPoint name="contentBasedClassFileProcessor" interface="com.intellij.openapi.fileTypes.ContentBasedClassFileProcessor"/>
|
||||
|
||||
<extensionPoint name="customizableActionGroupProvider" interface="com.intellij.ide.ui.customization.CustomizableActionGroupProvider"/>
|
||||
<extensionPoint name="browserSettingsProvider" beanClass="com.intellij.ide.BrowserSettingsProviderEP"/>
|
||||
|
||||
<extensionPoint name="generalOptionsProvider" beanClass="com.intellij.ide.GeneralSettingsConfigurableEP"/>
|
||||
|
||||
<extensionPoint name="statusBarComponent" interface="com.intellij.openapi.wm.StatusBarCustomComponentFactory"/>
|
||||
<extensionPoint name="additionalTextAttributes" beanClass="com.intellij.openapi.editor.colors.impl.AdditionalTextAttributesEP" />
|
||||
<extensionPoint name="bundledColorSchemesProvider" interface="com.intellij.openapi.editor.colors.impl.BundledColorSchemesProvider"/>
|
||||
<extensionPoint name="bundledQuickListsProvider" interface="com.intellij.openapi.actionSystem.impl.BundledQuickListsProvider"/>
|
||||
<extensionPoint name="bundledKeymapProvider" interface="com.intellij.openapi.keymap.impl.BundledKeymapProvider"/>
|
||||
|
||||
<extensionPoint name="checkinHandlerFactory" interface="com.intellij.openapi.vcs.checkin.CheckinHandlerFactory"/>
|
||||
<extensionPoint name="toolWindow" beanClass="com.intellij.openapi.wm.ToolWindowEP"/>
|
||||
<extensionPoint name="welcomeScreen" interface="com.intellij.openapi.wm.WelcomeScreenProvider"/>
|
||||
<extensionPoint name="welcomeFrameProvider" interface="com.intellij.openapi.wm.WelcomeFrameProvider"/>
|
||||
<extensionPoint name="frameEditorComponentProvider" interface="com.intellij.openapi.wm.ex.FrameEditorComponentProvider"/>
|
||||
|
||||
<extensionPoint name="writingAccessProvider" area="IDEA_PROJECT" interface="com.intellij.openapi.vfs.WritingAccessProvider"/>
|
||||
<extensionPoint name="editorNotificationProvider" area="IDEA_PROJECT" interface="com.intellij.ui.EditorNotifications$Provider"/>
|
||||
<extensionPoint name="featureStatBundle" interface="com.intellij.featureStatistics.FeatureStatisticsBundleProvider"/>
|
||||
<extensionPoint name="productivityFeaturesProvider" interface="com.intellij.featureStatistics.ProductivityFeaturesProvider"/>
|
||||
|
||||
<extensionPoint name="editorCustomization" area="IDEA_PROJECT" interface="com.intellij.ui.EditorCustomization"/>
|
||||
<extensionPoint name="editorNavigation" interface="com.intellij.openapi.editor.EditorNavigationDelegate"/>
|
||||
<extensionPoint name="fileIconProvider" interface="com.intellij.ide.FileIconProvider"/>
|
||||
<extensionPoint name="fileIconPatcher" interface="com.intellij.ide.FileIconPatcher"/>
|
||||
<extensionPoint name="iconLayerProvider" interface="com.intellij.ide.IconLayerProvider"/>
|
||||
|
||||
<extensionPoint name="statistics.usagesCollector" interface="com.intellij.internal.statistic.UsagesCollector"/>
|
||||
<extensionPoint name="customizableActionGroupProvider" interface="com.intellij.ide.ui.customization.CustomizableActionGroupProvider"/>
|
||||
|
||||
<extensionPoint name="xmlRpcHandler" beanClass="com.intellij.ide.XmlRpcHandlerBean"/>
|
||||
<extensionPoint name="generalOptionsProvider" beanClass="com.intellij.ide.GeneralSettingsConfigurableEP"/>
|
||||
|
||||
<extensionPoint name="editorHighlighterProvider" beanClass="com.intellij.openapi.fileTypes.FileTypeExtensionPoint"/>
|
||||
<extensionPoint name="fileDocumentManagerListener" interface="com.intellij.openapi.fileEditor.FileDocumentManagerListener"/>
|
||||
<extensionPoint name="exceptionFilter" interface="com.intellij.execution.filters.ExceptionFilterFactory"/>
|
||||
<extensionPoint name="fileDocumentSynchronizationVetoer" interface="com.intellij.openapi.fileEditor.FileDocumentSynchronizationVetoer"/>
|
||||
<extensionPoint name="statusBarComponent" interface="com.intellij.openapi.wm.StatusBarCustomComponentFactory"/>
|
||||
|
||||
<extensionPoint name="itemPresentationProvider" beanClass="com.intellij.openapi.util.ClassExtensionPoint"/>
|
||||
<extensionPoint name="checkinHandlerFactory" interface="com.intellij.openapi.vcs.checkin.CheckinHandlerFactory"/>
|
||||
|
||||
<extensionPoint name="classpathStorageProvider" interface="com.intellij.openapi.roots.impl.storage.ClasspathStorageProvider"/>
|
||||
<extensionPoint name="fileTypeDetector" interface="com.intellij.openapi.fileTypes.FileTypeRegistry$FileTypeDetector"/>
|
||||
<extensionPoint name="writingAccessProvider" area="IDEA_PROJECT" interface="com.intellij.openapi.vfs.WritingAccessProvider"/>
|
||||
<extensionPoint name="editorNotificationProvider" area="IDEA_PROJECT" interface="com.intellij.ui.EditorNotifications$Provider"/>
|
||||
<extensionPoint name="featureStatBundle" interface="com.intellij.featureStatistics.FeatureStatisticsBundleProvider"/>
|
||||
|
||||
<extensionPoint name="projectAttachProcessor" interface="com.intellij.projectImport.ProjectAttachProcessor"/>
|
||||
<extensionPoint name="editorCustomization" area="IDEA_PROJECT" interface="com.intellij.ui.EditorCustomization"/>
|
||||
<extensionPoint name="editorNavigation" interface="com.intellij.openapi.editor.EditorNavigationDelegate"/>
|
||||
|
||||
<extensionPoint name="pathMacroFilter" interface="com.intellij.openapi.application.PathMacroFilter"/>
|
||||
<extensionPoint name="pathMacroExpendableProtocol" beanClass="com.intellij.application.options.PathMacroExpendableProtocolBean"/>
|
||||
<extensionPoint name="statistics.usagesCollector" interface="com.intellij.internal.statistic.UsagesCollector"/>
|
||||
|
||||
<extensionPoint name="httpRequestHandler" interface="org.jetbrains.ide.HttpRequestHandler"/>
|
||||
<extensionPoint name="xmlRpcHandler" beanClass="com.intellij.ide.XmlRpcHandlerBean"/>
|
||||
|
||||
<extensionPoint name="colorPickerListenerFactory" interface="com.intellij.ui.ColorPickerListenerFactory"/>
|
||||
</extensionPoints>
|
||||
<extensionPoint name="editorHighlighterProvider" beanClass="com.intellij.openapi.fileTypes.FileTypeExtensionPoint"/>
|
||||
<extensionPoint name="fileDocumentManagerListener" interface="com.intellij.openapi.fileEditor.FileDocumentManagerListener"/>
|
||||
<extensionPoint name="exceptionFilter" interface="com.intellij.execution.filters.ExceptionFilterFactory"/>
|
||||
<extensionPoint name="fileDocumentSynchronizationVetoer" interface="com.intellij.openapi.fileEditor.FileDocumentSynchronizationVetoer"/>
|
||||
|
||||
<extensionPoint name="itemPresentationProvider" beanClass="com.intellij.openapi.util.ClassExtensionPoint"/>
|
||||
|
||||
<extensionPoint name="classpathStorageProvider" interface="com.intellij.openapi.roots.impl.storage.ClasspathStorageProvider"/>
|
||||
<extensionPoint name="fileTypeDetector" interface="com.intellij.openapi.fileTypes.FileTypeRegistry$FileTypeDetector"/>
|
||||
|
||||
<extensionPoint name="projectAttachProcessor" interface="com.intellij.projectImport.ProjectAttachProcessor"/>
|
||||
|
||||
<extensionPoint name="pathMacroFilter" interface="com.intellij.openapi.application.PathMacroFilter"/>
|
||||
<extensionPoint name="pathMacroExpendableProtocol" beanClass="com.intellij.application.options.PathMacroExpendableProtocolBean"/>
|
||||
|
||||
<extensionPoint name="httpRequestHandler" interface="org.jetbrains.ide.HttpRequestHandler"/>
|
||||
|
||||
<extensionPoint name="colorPickerListenerFactory" interface="com.intellij.ui.ColorPickerListenerFactory"/>
|
||||
</extensionPoints>
|
||||
</idea-plugin>
|
||||
@@ -1,296 +1,298 @@
|
||||
<extensions>
|
||||
<errorHandler implementation="com.intellij.diagnostic.ITNReporter"/>
|
||||
<appStarter implementation="com.intellij.openapi.diff.DiffApplication"/>
|
||||
<appStarter implementation="com.intellij.openapi.diff.MergeApplication"/>
|
||||
<idea-plugin>
|
||||
<extensions defaultExtensionNs="com.intellij">
|
||||
<errorHandler implementation="com.intellij.diagnostic.ITNReporter"/>
|
||||
<appStarter implementation="com.intellij.openapi.diff.DiffApplication"/>
|
||||
<appStarter implementation="com.intellij.openapi.diff.MergeApplication"/>
|
||||
|
||||
<applicationService serviceInterface="com.intellij.ide.util.PropertiesComponent"
|
||||
serviceImplementation="com.intellij.ide.util.AppPropertiesComponentImpl"/>
|
||||
<projectService serviceInterface="com.intellij.ide.util.PropertiesComponent"
|
||||
serviceImplementation="com.intellij.ide.util.ProjectPropertiesComponentImpl"/>
|
||||
<applicationService serviceInterface="com.intellij.ide.util.PropertiesComponent"
|
||||
serviceImplementation="com.intellij.ide.util.AppPropertiesComponentImpl"/>
|
||||
<projectService serviceInterface="com.intellij.ide.util.PropertiesComponent"
|
||||
serviceImplementation="com.intellij.ide.util.ProjectPropertiesComponentImpl"/>
|
||||
|
||||
<applicationService serviceInterface="com.intellij.openapi.actionSystem.JBAwtEventQueue"
|
||||
serviceImplementation="com.intellij.openapi.actionSystem.impl.JBAwtEventQueueImpl"/>
|
||||
<applicationService serviceInterface="com.intellij.openapi.actionSystem.JBAwtEventQueue"
|
||||
serviceImplementation="com.intellij.openapi.actionSystem.impl.JBAwtEventQueueImpl"/>
|
||||
|
||||
<applicationService serviceInterface="com.intellij.openapi.vfs.tracker.VirtualFileTracker"
|
||||
serviceImplementation="com.intellij.openapi.vfs.tracker.VirtualFileTrackerImpl"/>
|
||||
<applicationService serviceInterface="com.intellij.openapi.vfs.tracker.VirtualFileTracker"
|
||||
serviceImplementation="com.intellij.openapi.vfs.tracker.VirtualFileTrackerImpl"/>
|
||||
|
||||
<applicationService serviceInterface="com.intellij.concurrency.JobScheduler"
|
||||
serviceImplementation="com.intellij.concurrency.JobSchedulerImpl"/>
|
||||
<applicationService serviceInterface="com.intellij.concurrency.JobScheduler"
|
||||
serviceImplementation="com.intellij.concurrency.JobSchedulerImpl"/>
|
||||
|
||||
<applicationService serviceInterface="com.intellij.openapi.options.ShowSettingsUtil"
|
||||
serviceImplementation="com.intellij.ide.actions.ShowSettingsUtilImpl"/>
|
||||
<applicationService serviceInterface="com.intellij.openapi.help.HelpManager"
|
||||
serviceImplementation="com.intellij.help.impl.HelpManagerImpl"/>
|
||||
<applicationService serviceInterface="com.intellij.openapi.fileChooser.FileChooserFactory"
|
||||
serviceImplementation="com.intellij.openapi.fileChooser.impl.FileChooserFactoryImpl"/>
|
||||
<applicationService serviceInterface="com.intellij.openapi.progress.ProgressManager"
|
||||
serviceImplementation="com.intellij.openapi.progress.impl.ProgressManagerImpl"/>
|
||||
<applicationService serviceInterface="com.intellij.openapi.options.ShowSettingsUtil"
|
||||
serviceImplementation="com.intellij.ide.actions.ShowSettingsUtilImpl"/>
|
||||
<applicationService serviceInterface="com.intellij.openapi.help.HelpManager"
|
||||
serviceImplementation="com.intellij.help.impl.HelpManagerImpl"/>
|
||||
<applicationService serviceInterface="com.intellij.openapi.fileChooser.FileChooserFactory"
|
||||
serviceImplementation="com.intellij.openapi.fileChooser.impl.FileChooserFactoryImpl"/>
|
||||
<applicationService serviceInterface="com.intellij.openapi.progress.ProgressManager"
|
||||
serviceImplementation="com.intellij.openapi.progress.impl.ProgressManagerImpl"/>
|
||||
|
||||
<applicationService serviceImplementation="com.intellij.ide.ui.customization.CustomActionsSchema"/>
|
||||
<exportable serviceInterface="com.intellij.ide.ui.customization.CustomActionsSchema"/>
|
||||
<applicationService serviceImplementation="com.intellij.ide.ui.customization.CustomActionsSchema"/>
|
||||
<exportable serviceInterface="com.intellij.ide.ui.customization.CustomActionsSchema"/>
|
||||
|
||||
<applicationService serviceInterface="com.intellij.openapi.project.DefaultProjectFactory"
|
||||
serviceImplementation="com.intellij.openapi.project.DefaultProjectFactoryImpl"/>
|
||||
<applicationService serviceInterface="com.intellij.openapi.project.DefaultProjectFactory"
|
||||
serviceImplementation="com.intellij.openapi.project.DefaultProjectFactoryImpl"/>
|
||||
|
||||
<undoProvider implementation="com.intellij.openapi.command.impl.FileUndoProvider"/>
|
||||
<projectUndoProvider implementation="com.intellij.openapi.command.impl.FileUndoProvider"/>
|
||||
<undoProvider implementation="com.intellij.openapi.command.impl.FileUndoProvider"/>
|
||||
<projectUndoProvider implementation="com.intellij.openapi.command.impl.FileUndoProvider"/>
|
||||
|
||||
<applicationService serviceInterface="com.intellij.openapi.command.CommandProcessor"
|
||||
serviceImplementation="com.intellij.openapi.command.impl.CommandProcessorImpl"/>
|
||||
<applicationService serviceInterface="com.intellij.openapi.command.CommandProcessor"
|
||||
serviceImplementation="com.intellij.openapi.command.impl.CommandProcessorImpl"/>
|
||||
|
||||
<applicationService serviceInterface="com.intellij.ide.CommonActionsManager"
|
||||
serviceImplementation="com.intellij.ide.impl.CommonActionsManagerImpl"/>
|
||||
<applicationService serviceInterface="com.intellij.ide.CommonActionsManager"
|
||||
serviceImplementation="com.intellij.ide.impl.CommonActionsManagerImpl"/>
|
||||
|
||||
<applicationService serviceInterface="com.intellij.openapi.ide.CopyPasteManager"
|
||||
serviceImplementation="com.intellij.ide.CopyPasteManagerEx"/>
|
||||
<applicationService serviceInterface="com.intellij.openapi.ui.popup.JBPopupFactory"
|
||||
serviceImplementation="com.intellij.ui.popup.PopupFactoryImpl"/>
|
||||
<applicationService serviceInterface="com.intellij.openapi.diff.DiffManager"
|
||||
serviceImplementation="com.intellij.openapi.diff.impl.external.DiffManagerImpl"/>
|
||||
<applicationService serviceInterface="com.intellij.openapi.fileEditor.ex.FileEditorProviderManager"
|
||||
serviceImplementation="com.intellij.openapi.fileEditor.impl.FileEditorProviderManagerImpl"/>
|
||||
<applicationService serviceInterface="com.intellij.ide.ui.search.SearchableOptionsRegistrar"
|
||||
serviceImplementation="com.intellij.ide.ui.search.SearchableOptionsRegistrarImpl"/>
|
||||
<applicationService serviceInterface="com.intellij.openapi.ide.CopyPasteManager"
|
||||
serviceImplementation="com.intellij.ide.CopyPasteManagerEx"/>
|
||||
<applicationService serviceInterface="com.intellij.openapi.ui.popup.JBPopupFactory"
|
||||
serviceImplementation="com.intellij.ui.popup.PopupFactoryImpl"/>
|
||||
<applicationService serviceInterface="com.intellij.openapi.diff.DiffManager"
|
||||
serviceImplementation="com.intellij.openapi.diff.impl.external.DiffManagerImpl"/>
|
||||
<applicationService serviceInterface="com.intellij.openapi.fileEditor.ex.FileEditorProviderManager"
|
||||
serviceImplementation="com.intellij.openapi.fileEditor.impl.FileEditorProviderManagerImpl"/>
|
||||
<applicationService serviceInterface="com.intellij.ide.ui.search.SearchableOptionsRegistrar"
|
||||
serviceImplementation="com.intellij.ide.ui.search.SearchableOptionsRegistrarImpl"/>
|
||||
|
||||
<applicationService serviceImplementation="com.intellij.openapi.options.ex.IdeConfigurablesGroup"/>
|
||||
<applicationService serviceImplementation="com.intellij.openapi.options.ex.IdeConfigurablesGroup"/>
|
||||
|
||||
<applicationService serviceInterface="com.intellij.diagnostic.ErrorReportConfigurable"
|
||||
serviceImplementation="com.intellij.diagnostic.ErrorReportConfigurable"/>
|
||||
<applicationService serviceInterface="com.intellij.openapi.vfs.impl.http.RemoteFileManager"
|
||||
serviceImplementation="com.intellij.openapi.vfs.impl.http.RemoteFileManagerImpl"/>
|
||||
<applicationService serviceInterface="com.intellij.openapi.vfs.newvfs.RefreshQueue"
|
||||
serviceImplementation="com.intellij.openapi.vfs.newvfs.RefreshQueueImpl"/>
|
||||
<applicationService serviceInterface="com.intellij.diagnostic.ErrorReportConfigurable"
|
||||
serviceImplementation="com.intellij.diagnostic.ErrorReportConfigurable"/>
|
||||
<applicationService serviceInterface="com.intellij.openapi.vfs.impl.http.RemoteFileManager"
|
||||
serviceImplementation="com.intellij.openapi.vfs.impl.http.RemoteFileManagerImpl"/>
|
||||
<applicationService serviceInterface="com.intellij.openapi.vfs.newvfs.RefreshQueue"
|
||||
serviceImplementation="com.intellij.openapi.vfs.newvfs.RefreshQueueImpl"/>
|
||||
|
||||
<applicationService serviceInterface="com.intellij.openapi.ui.DialogWrapperPeerFactory"
|
||||
serviceImplementation="com.intellij.openapi.ui.impl.DialogWrapperPeerFactoryImpl"/>
|
||||
<applicationService serviceInterface="com.intellij.ui.content.ContentFactory"
|
||||
serviceImplementation="com.intellij.ui.content.ContentFactoryImpl"/>
|
||||
<applicationService serviceInterface="com.intellij.ui.TreeUIHelper"
|
||||
serviceImplementation="com.intellij.ui.TreeUIHelperImpl"/>
|
||||
<applicationService serviceInterface="com.intellij.ui.ExpandableItemsHandlerFactory"
|
||||
serviceImplementation="com.intellij.ui.ExpandTipHandlerFactoryImpl"/>
|
||||
<applicationService serviceInterface="com.intellij.openapi.diff.DiffRequestFactory"
|
||||
serviceImplementation="com.intellij.openapi.diff.impl.mergeTool.DiffRequestFactoryImpl"/>
|
||||
<applicationService serviceInterface="com.intellij.ui.SystemNotifications"
|
||||
serviceImplementation="com.intellij.ui.SystemNotificationsImpl"/>
|
||||
<applicationService serviceInterface="com.intellij.openapi.keymap.KeymapGroupFactory"
|
||||
serviceImplementation="com.intellij.openapi.keymap.impl.KeymapGroupFactoryImpl"/>
|
||||
<applicationService serviceInterface="com.intellij.openapi.editor.highlighter.EditorHighlighterFactory"
|
||||
serviceImplementation="com.intellij.openapi.editor.highlighter.EditorHighlighterFactoryImpl"/>
|
||||
<applicationService serviceInterface="com.intellij.ide.dnd.DnDManager"
|
||||
serviceImplementation="com.intellij.ide.dnd.DnDManagerImpl"/>
|
||||
<applicationService serviceInterface="com.intellij.openapi.vfs.encoding.EncodingManager"
|
||||
serviceImplementation="com.intellij.openapi.vfs.encoding.EncodingManagerImpl"/>
|
||||
<applicationService serviceInterface="com.intellij.ui.errorView.ErrorViewFactory"
|
||||
serviceImplementation="com.intellij.ui.errorView.impl.ErrorViewFactoryImpl"/>
|
||||
<applicationService serviceInterface="com.intellij.openapi.fileChooser.FileSystemTreeFactory"
|
||||
serviceImplementation="com.intellij.openapi.fileChooser.ex.FileSystemTreeFactoryImpl"/>
|
||||
<applicationService serviceInterface="com.intellij.ide.plugins.PluginManagerUISettings"
|
||||
serviceImplementation="com.intellij.ide.plugins.PluginManagerUISettings"/>
|
||||
<applicationService serviceInterface="com.intellij.codeInsight.hint.HintManager"
|
||||
serviceImplementation="com.intellij.codeInsight.hint.HintManagerImpl"/>
|
||||
<applicationService serviceInterface="com.intellij.codeInsight.hint.TooltipController"
|
||||
serviceImplementation="com.intellij.codeInsight.hint.TooltipController"/>
|
||||
<applicationService serviceInterface="com.intellij.openapi.editor.actionSystem.EditorActionManager"
|
||||
serviceImplementation="com.intellij.openapi.editor.impl.EditorActionManagerImpl"/>
|
||||
<applicationService serviceInterface="com.intellij.openapi.updateSettings.impl.UpdateSettings"
|
||||
serviceImplementation="com.intellij.openapi.updateSettings.impl.UpdateSettings"/>
|
||||
<applicationService serviceInterface="com.intellij.featureStatistics.FeatureUsageTracker"
|
||||
serviceImplementation="com.intellij.featureStatistics.FeatureUsageTrackerImpl"/>
|
||||
<applicationService serviceInterface="com.intellij.featureStatistics.ProductivityFeaturesRegistry"
|
||||
serviceImplementation="com.intellij.featureStatistics.ProductivityFeaturesRegistryImpl"/>
|
||||
<applicationService serviceInterface="com.intellij.util.InstanceofCheckerGenerator"
|
||||
serviceImplementation="com.intellij.util.InstanceofCheckerGeneratorImpl"/>
|
||||
<applicationService serviceInterface="com.intellij.internal.psiView.PsiViewerSettings"
|
||||
serviceImplementation="com.intellij.internal.psiView.PsiViewerSettings"/>
|
||||
<applicationService serviceInterface="com.intellij.openapi.ui.DialogWrapperPeerFactory"
|
||||
serviceImplementation="com.intellij.openapi.ui.impl.DialogWrapperPeerFactoryImpl"/>
|
||||
<applicationService serviceInterface="com.intellij.ui.content.ContentFactory"
|
||||
serviceImplementation="com.intellij.ui.content.ContentFactoryImpl"/>
|
||||
<applicationService serviceInterface="com.intellij.ui.TreeUIHelper"
|
||||
serviceImplementation="com.intellij.ui.TreeUIHelperImpl"/>
|
||||
<applicationService serviceInterface="com.intellij.ui.ExpandableItemsHandlerFactory"
|
||||
serviceImplementation="com.intellij.ui.ExpandTipHandlerFactoryImpl"/>
|
||||
<applicationService serviceInterface="com.intellij.openapi.diff.DiffRequestFactory"
|
||||
serviceImplementation="com.intellij.openapi.diff.impl.mergeTool.DiffRequestFactoryImpl"/>
|
||||
<applicationService serviceInterface="com.intellij.ui.SystemNotifications"
|
||||
serviceImplementation="com.intellij.ui.SystemNotificationsImpl"/>
|
||||
<applicationService serviceInterface="com.intellij.openapi.keymap.KeymapGroupFactory"
|
||||
serviceImplementation="com.intellij.openapi.keymap.impl.KeymapGroupFactoryImpl"/>
|
||||
<applicationService serviceInterface="com.intellij.openapi.editor.highlighter.EditorHighlighterFactory"
|
||||
serviceImplementation="com.intellij.openapi.editor.highlighter.EditorHighlighterFactoryImpl"/>
|
||||
<applicationService serviceInterface="com.intellij.ide.dnd.DnDManager"
|
||||
serviceImplementation="com.intellij.ide.dnd.DnDManagerImpl"/>
|
||||
<applicationService serviceInterface="com.intellij.openapi.vfs.encoding.EncodingManager"
|
||||
serviceImplementation="com.intellij.openapi.vfs.encoding.EncodingManagerImpl"/>
|
||||
<applicationService serviceInterface="com.intellij.ui.errorView.ErrorViewFactory"
|
||||
serviceImplementation="com.intellij.ui.errorView.impl.ErrorViewFactoryImpl"/>
|
||||
<applicationService serviceInterface="com.intellij.openapi.fileChooser.FileSystemTreeFactory"
|
||||
serviceImplementation="com.intellij.openapi.fileChooser.ex.FileSystemTreeFactoryImpl"/>
|
||||
<applicationService serviceInterface="com.intellij.ide.plugins.PluginManagerUISettings"
|
||||
serviceImplementation="com.intellij.ide.plugins.PluginManagerUISettings"/>
|
||||
<applicationService serviceInterface="com.intellij.codeInsight.hint.HintManager"
|
||||
serviceImplementation="com.intellij.codeInsight.hint.HintManagerImpl"/>
|
||||
<applicationService serviceInterface="com.intellij.codeInsight.hint.TooltipController"
|
||||
serviceImplementation="com.intellij.codeInsight.hint.TooltipController"/>
|
||||
<applicationService serviceInterface="com.intellij.openapi.editor.actionSystem.EditorActionManager"
|
||||
serviceImplementation="com.intellij.openapi.editor.impl.EditorActionManagerImpl"/>
|
||||
<applicationService serviceInterface="com.intellij.openapi.updateSettings.impl.UpdateSettings"
|
||||
serviceImplementation="com.intellij.openapi.updateSettings.impl.UpdateSettings"/>
|
||||
<applicationService serviceInterface="com.intellij.featureStatistics.FeatureUsageTracker"
|
||||
serviceImplementation="com.intellij.featureStatistics.FeatureUsageTrackerImpl"/>
|
||||
<applicationService serviceInterface="com.intellij.featureStatistics.ProductivityFeaturesRegistry"
|
||||
serviceImplementation="com.intellij.featureStatistics.ProductivityFeaturesRegistryImpl"/>
|
||||
<applicationService serviceInterface="com.intellij.util.InstanceofCheckerGenerator"
|
||||
serviceImplementation="com.intellij.util.InstanceofCheckerGeneratorImpl"/>
|
||||
<applicationService serviceInterface="com.intellij.internal.psiView.PsiViewerSettings"
|
||||
serviceImplementation="com.intellij.internal.psiView.PsiViewerSettings"/>
|
||||
|
||||
<applicationService serviceInterface="com.intellij.util.graph.GraphAlgorithms"
|
||||
serviceImplementation="com.intellij.util.graph.impl.GraphAlgorithmsImpl"/>
|
||||
<applicationService serviceInterface="com.intellij.util.graph.GraphAlgorithms"
|
||||
serviceImplementation="com.intellij.util.graph.impl.GraphAlgorithmsImpl"/>
|
||||
|
||||
<applicationService serviceInterface="com.intellij.concurrency.AsyncFutureFactory"
|
||||
serviceImplementation="com.intellij.concurrency.AsyncFutureFactoryImpl"/>
|
||||
<applicationService serviceInterface="com.intellij.concurrency.AsyncFutureFactory"
|
||||
serviceImplementation="com.intellij.concurrency.AsyncFutureFactoryImpl"/>
|
||||
|
||||
<applicationService serviceInterface="com.intellij.openapi.keymap.impl.DefaultKeymap"
|
||||
serviceImplementation="com.intellij.openapi.keymap.impl.DefaultKeymap"/>
|
||||
<applicationService serviceInterface="com.intellij.openapi.keymap.impl.DefaultKeymap"
|
||||
serviceImplementation="com.intellij.openapi.keymap.impl.DefaultKeymap"/>
|
||||
|
||||
<applicationService serviceInterface="com.intellij.ide.passwordSafe.impl.providers.masterKey.PasswordDatabase"
|
||||
serviceImplementation="com.intellij.ide.passwordSafe.impl.providers.masterKey.PasswordDatabase"/>
|
||||
<applicationService serviceInterface="com.intellij.ide.passwordSafe.config.PasswordSafeSettings"
|
||||
serviceImplementation="com.intellij.ide.passwordSafe.config.PasswordSafeSettings"/>
|
||||
<applicationService serviceInterface="com.intellij.ide.passwordSafe.PasswordSafe"
|
||||
serviceImplementation="com.intellij.ide.passwordSafe.impl.PasswordSafeImpl"/>
|
||||
<applicationConfigurable instance="com.intellij.ide.passwordSafe.config.PasswordSafeConfigurable" id="application.passwordSafe"
|
||||
displayName="Passwords"/>
|
||||
<applicationService serviceInterface="com.intellij.execution.process.ColoredOutputTypeRegistry"
|
||||
serviceImplementation="com.intellij.execution.process.ColoredOutputTypeRegistry"/>
|
||||
<applicationService serviceInterface="com.intellij.execution.process.OSProcessManager"
|
||||
serviceImplementation="com.intellij.execution.process.impl.OSProcessManagerImpl"/>
|
||||
<applicationService serviceInterface="com.intellij.ide.passwordSafe.impl.providers.masterKey.PasswordDatabase"
|
||||
serviceImplementation="com.intellij.ide.passwordSafe.impl.providers.masterKey.PasswordDatabase"/>
|
||||
<applicationService serviceInterface="com.intellij.ide.passwordSafe.config.PasswordSafeSettings"
|
||||
serviceImplementation="com.intellij.ide.passwordSafe.config.PasswordSafeSettings"/>
|
||||
<applicationService serviceInterface="com.intellij.ide.passwordSafe.PasswordSafe"
|
||||
serviceImplementation="com.intellij.ide.passwordSafe.impl.PasswordSafeImpl"/>
|
||||
<applicationConfigurable instance="com.intellij.ide.passwordSafe.config.PasswordSafeConfigurable" id="application.passwordSafe"
|
||||
displayName="Passwords"/>
|
||||
<applicationService serviceInterface="com.intellij.execution.process.ColoredOutputTypeRegistry"
|
||||
serviceImplementation="com.intellij.execution.process.ColoredOutputTypeRegistry"/>
|
||||
<applicationService serviceInterface="com.intellij.execution.process.OSProcessManager"
|
||||
serviceImplementation="com.intellij.execution.process.impl.OSProcessManagerImpl"/>
|
||||
|
||||
<applicationService serviceInterface="com.intellij.openapi.options.SchemesManagerFactory"
|
||||
serviceImplementation="com.intellij.openapi.options.SchemesManagerFactoryImpl"/>
|
||||
<applicationService serviceInterface="com.intellij.openapi.options.SchemesManagerFactory"
|
||||
serviceImplementation="com.intellij.openapi.options.SchemesManagerFactoryImpl"/>
|
||||
|
||||
<applicationService serviceInterface="com.intellij.openapi.editor.colors.ex.DefaultColorSchemesManager"
|
||||
serviceImplementation="com.intellij.openapi.editor.colors.ex.DefaultColorSchemesManager"/>
|
||||
<applicationService serviceInterface="com.intellij.openapi.editor.colors.TextAttributesKey$TextAttributeKeyDefaultsProvider"
|
||||
serviceImplementation="com.intellij.openapi.editor.colors.impl.TextAttributeKeyDefaultsProviderImpl"/>
|
||||
<applicationService serviceInterface="com.intellij.openapi.editor.colors.EditorColorsManager"
|
||||
serviceImplementation="com.intellij.openapi.editor.colors.impl.EditorColorsManagerImpl"/>
|
||||
<exportable serviceInterface="com.intellij.openapi.editor.colors.EditorColorsManager"/>
|
||||
<schemeOwner serviceInterface="com.intellij.openapi.editor.colors.EditorColorsManager"/>
|
||||
<applicationService serviceInterface="com.intellij.openapi.editor.colors.ex.DefaultColorSchemesManager"
|
||||
serviceImplementation="com.intellij.openapi.editor.colors.ex.DefaultColorSchemesManager"/>
|
||||
<applicationService serviceInterface="com.intellij.openapi.editor.colors.TextAttributesKey$TextAttributeKeyDefaultsProvider"
|
||||
serviceImplementation="com.intellij.openapi.editor.colors.impl.TextAttributeKeyDefaultsProviderImpl"/>
|
||||
<applicationService serviceInterface="com.intellij.openapi.editor.colors.EditorColorsManager"
|
||||
serviceImplementation="com.intellij.openapi.editor.colors.impl.EditorColorsManagerImpl"/>
|
||||
<exportable serviceInterface="com.intellij.openapi.editor.colors.EditorColorsManager"/>
|
||||
<schemeOwner serviceInterface="com.intellij.openapi.editor.colors.EditorColorsManager"/>
|
||||
|
||||
<applicationService serviceInterface="com.intellij.openapi.roots.ui.FileAppearanceService"
|
||||
serviceImplementation="com.intellij.openapi.roots.ui.FileAppearanceServiceImpl"/>
|
||||
<applicationService serviceInterface="com.intellij.openapi.roots.ui.FileAppearanceService"
|
||||
serviceImplementation="com.intellij.openapi.roots.ui.FileAppearanceServiceImpl"/>
|
||||
|
||||
<applicationService serviceImplementation="com.intellij.internal.statistic.UsageTrigger"/>
|
||||
<applicationService serviceImplementation="com.intellij.internal.statistic.UsageTrigger"/>
|
||||
|
||||
<projectService serviceInterface="com.intellij.openapi.vfs.ReadonlyStatusHandler"
|
||||
serviceImplementation="com.intellij.openapi.vcs.readOnlyHandler.ReadonlyStatusHandlerImpl"/>
|
||||
<projectService serviceInterface="com.intellij.openapi.startup.StartupManager"
|
||||
serviceImplementation="com.intellij.ide.startup.impl.StartupManagerImpl"/>
|
||||
<projectService serviceInterface="com.intellij.openapi.ui.MasterDetailsStateService" serviceImplementation="com.intellij.openapi.ui.MasterDetailsStateService"/>
|
||||
<projectService serviceInterface="com.intellij.ide.SelectInManager" serviceImplementation="com.intellij.ide.SelectInManager"/>
|
||||
<projectService serviceInterface="com.intellij.openapi.vfs.ReadonlyStatusHandler"
|
||||
serviceImplementation="com.intellij.openapi.vcs.readOnlyHandler.ReadonlyStatusHandlerImpl"/>
|
||||
<projectService serviceInterface="com.intellij.openapi.startup.StartupManager"
|
||||
serviceImplementation="com.intellij.ide.startup.impl.StartupManagerImpl"/>
|
||||
<projectService serviceInterface="com.intellij.openapi.ui.MasterDetailsStateService" serviceImplementation="com.intellij.openapi.ui.MasterDetailsStateService"/>
|
||||
<projectService serviceInterface="com.intellij.ide.SelectInManager" serviceImplementation="com.intellij.ide.SelectInManager"/>
|
||||
|
||||
<projectService serviceInterface="com.intellij.ide.errorTreeView.impl.ErrorTreeViewConfiguration"
|
||||
serviceImplementation="com.intellij.ide.errorTreeView.impl.ErrorTreeViewConfiguration"/>
|
||||
<projectService serviceInterface="com.intellij.ide.errorTreeView.impl.ErrorTreeViewConfiguration"
|
||||
serviceImplementation="com.intellij.ide.errorTreeView.impl.ErrorTreeViewConfiguration"/>
|
||||
|
||||
<projectService serviceInterface="com.intellij.ide.SelectInEditorManager"
|
||||
serviceImplementation="com.intellij.ide.impl.SelectInEditorManagerImpl"/>
|
||||
<projectService serviceInterface="com.intellij.ui.RecentsManager"
|
||||
serviceImplementation="com.intellij.ui.RecentsManager"/>
|
||||
<projectService serviceInterface="com.intellij.ui.content.MessageView"
|
||||
serviceImplementation="com.intellij.ui.content.impl.MessageViewImpl"/>
|
||||
<projectService serviceInterface="com.intellij.ide.SelectInEditorManager"
|
||||
serviceImplementation="com.intellij.ide.impl.SelectInEditorManagerImpl"/>
|
||||
<projectService serviceInterface="com.intellij.ui.RecentsManager"
|
||||
serviceImplementation="com.intellij.ui.RecentsManager"/>
|
||||
<projectService serviceInterface="com.intellij.ui.content.MessageView"
|
||||
serviceImplementation="com.intellij.ui.content.impl.MessageViewImpl"/>
|
||||
|
||||
<projectService serviceInterface="com.intellij.ui.tabs.FileColorSharedConfigurationManager"
|
||||
serviceImplementation="com.intellij.ui.tabs.FileColorSharedConfigurationManager"/>
|
||||
<projectService serviceInterface="com.intellij.ui.tabs.FileColorSharedConfigurationManager"
|
||||
serviceImplementation="com.intellij.ui.tabs.FileColorSharedConfigurationManager"/>
|
||||
|
||||
<projectService serviceInterface="com.intellij.openapi.project.DumbService" serviceImplementation="com.intellij.openapi.project.DumbServiceImpl"/>
|
||||
<projectService serviceInterface="com.intellij.openapi.project.DumbService" serviceImplementation="com.intellij.openapi.project.DumbServiceImpl"/>
|
||||
|
||||
<projectService serviceInterface="com.intellij.psi.util.CachedValuesManager"
|
||||
serviceImplementation="com.intellij.util.CachedValuesManagerImpl"/>
|
||||
<projectService serviceInterface="com.intellij.psi.util.CachedValuesManager"
|
||||
serviceImplementation="com.intellij.util.CachedValuesManagerImpl"/>
|
||||
|
||||
<projectService serviceInterface="com.intellij.openapi.vcs.impl.projectlevelman.AllVcsesI"
|
||||
serviceImplementation="com.intellij.openapi.vcs.impl.projectlevelman.AllVcses"/>
|
||||
<projectService serviceInterface="com.intellij.openapi.vcs.impl.projectlevelman.AllVcsesI"
|
||||
serviceImplementation="com.intellij.openapi.vcs.impl.projectlevelman.AllVcses"/>
|
||||
|
||||
<projectService serviceInterface="com.intellij.openapi.vcs.changes.RemoteRevisionsCache"
|
||||
serviceImplementation="com.intellij.openapi.vcs.changes.RemoteRevisionsCache"/>
|
||||
<projectService serviceInterface="com.intellij.openapi.vcs.changes.RemoteRevisionsCache"
|
||||
serviceImplementation="com.intellij.openapi.vcs.changes.RemoteRevisionsCache"/>
|
||||
|
||||
<projectService serviceInterface="com.intellij.execution.testframework.export.ExportTestResultsConfiguration"
|
||||
serviceImplementation="com.intellij.execution.testframework.export.ExportTestResultsConfiguration"/>
|
||||
<projectService serviceInterface="com.intellij.execution.testframework.export.ExportTestResultsConfiguration"
|
||||
serviceImplementation="com.intellij.execution.testframework.export.ExportTestResultsConfiguration"/>
|
||||
|
||||
<projectService serviceInterface="com.intellij.execution.testframework.autotest.AutoTestManager"
|
||||
serviceImplementation="com.intellij.execution.testframework.autotest.AutoTestManager"/>
|
||||
<projectService serviceInterface="com.intellij.execution.testframework.autotest.AutoTestManager"
|
||||
serviceImplementation="com.intellij.execution.testframework.autotest.AutoTestManager"/>
|
||||
|
||||
<projectService serviceInterface="com.intellij.openapi.vcs.VcsFileListenerContextHelper"
|
||||
serviceImplementation="com.intellij.openapi.vcs.VcsFileListenerContextHelper"/>
|
||||
<projectService serviceInterface="com.intellij.openapi.vcs.VcsFileListenerContextHelper"
|
||||
serviceImplementation="com.intellij.openapi.vcs.VcsFileListenerContextHelper"/>
|
||||
|
||||
<!-- General -->
|
||||
<applicationConfigurable instance="com.intellij.ide.GeneralSettingsConfigurable"/>
|
||||
<!-- General -->
|
||||
<applicationConfigurable instance="com.intellij.ide.GeneralSettingsConfigurable"/>
|
||||
|
||||
<!-- Appearance -->
|
||||
<applicationConfigurable instance="com.intellij.ide.ui.AppearanceConfigurable" id="appearance" key="title.appearance"
|
||||
bundle="messages.IdeBundle"/>
|
||||
<!-- Appearance -->
|
||||
<applicationConfigurable instance="com.intellij.ide.ui.AppearanceConfigurable" id="appearance" key="title.appearance"
|
||||
bundle="messages.IdeBundle"/>
|
||||
|
||||
<!-- Keymap -->
|
||||
<applicationConfigurable instance="com.intellij.openapi.keymap.impl.ui.KeymapPanel" id="preferences.keymap" key="keymap.display.name"
|
||||
bundle="messages.KeyMapBundle"/>
|
||||
<applicationConfigurable instance="com.intellij.openapi.keymap.impl.ui.QuickListsPanel" id="reference.idesettings.quicklists"
|
||||
displayName="Quick Lists"/>
|
||||
<!-- Keymap -->
|
||||
<applicationConfigurable instance="com.intellij.openapi.keymap.impl.ui.KeymapPanel" id="preferences.keymap" key="keymap.display.name"
|
||||
bundle="messages.KeyMapBundle"/>
|
||||
<applicationConfigurable instance="com.intellij.openapi.keymap.impl.ui.QuickListsPanel" id="reference.idesettings.quicklists"
|
||||
displayName="Quick Lists"/>
|
||||
|
||||
<!-- Customizations -->
|
||||
<applicationConfigurable instance="com.intellij.ide.ui.customization.CustomizationConfigurable" id="preferences.customizations"
|
||||
key="title.customizations" bundle="messages.IdeBundle"/>
|
||||
<!-- Customizations -->
|
||||
<applicationConfigurable instance="com.intellij.ide.ui.customization.CustomizationConfigurable" id="preferences.customizations"
|
||||
key="title.customizations" bundle="messages.IdeBundle"/>
|
||||
|
||||
<!-- Web Browser -->
|
||||
<applicationConfigurable instance="com.intellij.ide.BrowserSettings" id="reference.settings.ide.settings.web.browsers"
|
||||
key="browsers.settings" bundle="messages.IdeBundle"/>
|
||||
<!-- Web Browser -->
|
||||
<applicationConfigurable instance="com.intellij.ide.BrowserSettings" id="reference.settings.ide.settings.web.browsers"
|
||||
key="browsers.settings" bundle="messages.IdeBundle"/>
|
||||
|
||||
<!-- Notifications -->
|
||||
<applicationConfigurable instance="com.intellij.notification.impl.NotificationsConfigurable"/>
|
||||
<!-- Notifications -->
|
||||
<applicationConfigurable instance="com.intellij.notification.impl.NotificationsConfigurable"/>
|
||||
|
||||
<!-- Plugins -->
|
||||
<applicationConfigurable instance="com.intellij.ide.plugins.PluginManagerConfigurable" id="preferences.pluginManager"
|
||||
displayName="Plugins"/>
|
||||
<applicationConfigurable instance="com.intellij.util.net.HTTPProxySettingsPanel" id="http.proxy" displayName="HTTP Proxy" />
|
||||
<applicationConfigurable instance="com.intellij.openapi.diff.impl.external.DiffOptionsForm" id="diff" displayName="External Diff Tools" />
|
||||
<!--<applicationConfigurable instance="com.intellij.ui.switcher.QuickAccessConfigurable"/>-->
|
||||
<!-- Plugins -->
|
||||
<applicationConfigurable instance="com.intellij.ide.plugins.PluginManagerConfigurable" id="preferences.pluginManager"
|
||||
displayName="Plugins"/>
|
||||
<applicationConfigurable instance="com.intellij.util.net.HTTPProxySettingsPanel" id="http.proxy" displayName="HTTP Proxy" />
|
||||
<applicationConfigurable instance="com.intellij.openapi.diff.impl.external.DiffOptionsForm" id="diff" displayName="External Diff Tools" />
|
||||
<!--<applicationConfigurable instance="com.intellij.ui.switcher.QuickAccessConfigurable"/>-->
|
||||
|
||||
<fileTypeFactory implementation="com.intellij.openapi.fileTypes.impl.PlatformFileTypeFactory"/>
|
||||
<applicationService serviceInterface="com.intellij.openapi.options.colors.ColorSettingsPages"
|
||||
<fileTypeFactory implementation="com.intellij.openapi.fileTypes.impl.PlatformFileTypeFactory"/>
|
||||
<applicationService serviceInterface="com.intellij.openapi.options.colors.ColorSettingsPages"
|
||||
serviceImplementation="com.intellij.openapi.options.colors.pages.ColorSettingsPagesImpl"/>
|
||||
|
||||
<applicationConfigurable instance="com.intellij.openapi.updateSettings.impl.UpdateSettingsConfigurable" id="preferences.updates"
|
||||
key="updates.settings.title" bundle="messages.IdeBundle"/>
|
||||
<applicationConfigurable instance="com.intellij.openapi.updateSettings.impl.UpdateSettingsConfigurable" id="preferences.updates"
|
||||
key="updates.settings.title" bundle="messages.IdeBundle"/>
|
||||
|
||||
<applicationService serviceInterface="com.intellij.psi.search.scope.packageSet.PackageSetFactory"
|
||||
serviceImplementation="com.intellij.psi.search.scope.packageSet.PackageSetFactoryImpl"/>
|
||||
<applicationService serviceInterface="com.intellij.psi.search.scope.packageSet.PackageSetFactory"
|
||||
serviceImplementation="com.intellij.psi.search.scope.packageSet.PackageSetFactoryImpl"/>
|
||||
|
||||
<applicationService serviceInterface="com.intellij.ui.ColorChooserService"
|
||||
serviceImplementation="com.intellij.ui.ColorChooserServiceImpl"/>
|
||||
<applicationService serviceInterface="com.intellij.ui.ColorChooserService"
|
||||
serviceImplementation="com.intellij.ui.ColorChooserServiceImpl"/>
|
||||
|
||||
<scopeParserExtension implementation="com.intellij.psi.search.scope.packageSet.FilePackageSetParserExtension"/>
|
||||
<applicationService serviceInterface="com.intellij.openapi.ui.popup.StackingPopupDispatcher" serviceImplementation="com.intellij.ui.popup.StackingPopupDispatcherImpl"/>
|
||||
<scopeParserExtension implementation="com.intellij.psi.search.scope.packageSet.FilePackageSetParserExtension"/>
|
||||
<applicationService serviceInterface="com.intellij.openapi.ui.popup.StackingPopupDispatcher" serviceImplementation="com.intellij.ui.popup.StackingPopupDispatcherImpl"/>
|
||||
|
||||
<fileEditorProvider implementation="com.intellij.openapi.fileEditor.impl.http.HttpFileEditorProvider"/>
|
||||
<componentConfigurationMerger implementation="com.intellij.openapi.vcs.changes.shelf.ShelfManagerConfigurationMerger"/>
|
||||
<editorActionHandler action="EditorEscape" implementationClass="com.intellij.codeInsight.hint.EscapeHandler" id="hide-hints"/>
|
||||
<ComponentRoamingType component="ChangeListManager" type="DISABLED"/>
|
||||
<ComponentRoamingType component="RestoreUpdateTree" type="DISABLED"/>
|
||||
<ComponentRoamingType component="PropertiesComponent" type="DISABLED"/>
|
||||
<fileEditorProvider implementation="com.intellij.openapi.fileEditor.impl.http.HttpFileEditorProvider"/>
|
||||
<componentConfigurationMerger implementation="com.intellij.openapi.vcs.changes.shelf.ShelfManagerConfigurationMerger"/>
|
||||
<editorActionHandler action="EditorEscape" implementationClass="com.intellij.codeInsight.hint.EscapeHandler" id="hide-hints"/>
|
||||
<ComponentRoamingType component="ChangeListManager" type="DISABLED"/>
|
||||
<ComponentRoamingType component="RestoreUpdateTree" type="DISABLED"/>
|
||||
<ComponentRoamingType component="PropertiesComponent" type="DISABLED"/>
|
||||
|
||||
<projectConfigurable instance="com.intellij.javaee.ExternalResourceConfigurable" key="display.name.edit.external.resource"
|
||||
bundle="messages.XmlBundle" id="preferences.externalResources">
|
||||
<configurable instance="com.intellij.javaee.XMLCatalogConfigurable" displayName="XML Catalog" id="xml.catalog"/>
|
||||
</projectConfigurable>
|
||||
<projectConfigurable instance="com.intellij.javaee.ExternalResourceConfigurable" key="display.name.edit.external.resource"
|
||||
bundle="messages.XmlBundle" id="preferences.externalResources">
|
||||
<configurable instance="com.intellij.javaee.XMLCatalogConfigurable" displayName="XML Catalog" id="xml.catalog"/>
|
||||
</projectConfigurable>
|
||||
|
||||
<bundledKeymapProvider implementation="com.intellij.openapi.keymap.impl.DefaultBundledKeymaps"/>
|
||||
<!-- <checkinHandlerFactory implementation="com.intellij.openapi.vcs.CheckRemoteStatusCheckinHandlerFactory"/> -->
|
||||
<bundledKeymapProvider implementation="com.intellij.openapi.keymap.impl.DefaultBundledKeymaps"/>
|
||||
<!-- <checkinHandlerFactory implementation="com.intellij.openapi.vcs.CheckRemoteStatusCheckinHandlerFactory"/> -->
|
||||
|
||||
<statistics.usagesCollector implementation="com.intellij.ide.plugins.DisabledPluginsUsagesCollector"/>
|
||||
<statistics.usagesCollector implementation="com.intellij.ide.plugins.NonBundledPluginsUsagesCollector"/>
|
||||
<statistics.usagesCollector implementation="com.intellij.featureStatistics.FeaturesUsageCollector"/>
|
||||
<statistics.usagesCollector implementation="com.intellij.openapi.vcs.statistics.VcsUsagesCollector"/>
|
||||
<statistics.usagesCollector implementation="com.intellij.internal.statistic.UsageTrigger$MyCollector"/>
|
||||
<!--<statistics.usagesCollector implementation="com.intellij.internal.statistic.ideSettings.IdeSettingsUsagesCollector"/>-->
|
||||
<statistics.usagesCollector implementation="com.intellij.internal.statistic.ideSettings.LaFUsagesCollector"/>
|
||||
<statistics.usagesCollector implementation="com.intellij.ide.plugins.DisabledPluginsUsagesCollector"/>
|
||||
<statistics.usagesCollector implementation="com.intellij.ide.plugins.NonBundledPluginsUsagesCollector"/>
|
||||
<statistics.usagesCollector implementation="com.intellij.featureStatistics.FeaturesUsageCollector"/>
|
||||
<statistics.usagesCollector implementation="com.intellij.openapi.vcs.statistics.VcsUsagesCollector"/>
|
||||
<statistics.usagesCollector implementation="com.intellij.internal.statistic.UsageTrigger$MyCollector"/>
|
||||
<!--<statistics.usagesCollector implementation="com.intellij.internal.statistic.ideSettings.IdeSettingsUsagesCollector"/>-->
|
||||
<statistics.usagesCollector implementation="com.intellij.internal.statistic.ideSettings.LaFUsagesCollector"/>
|
||||
|
||||
<applicationConfigurable instance="com.intellij.internal.statistic.configurable.StatisticsConfigurable" id="usage.statistics"
|
||||
displayName="Usage Statistics"/>
|
||||
<applicationConfigurable instance="com.intellij.internal.statistic.configurable.StatisticsConfigurable" id="usage.statistics"
|
||||
displayName="Usage Statistics"/>
|
||||
|
||||
<virtualFileSystem key="dummy" implementationClass="com.intellij.openapi.vfs.ex.dummy.DummyFileSystem"/>
|
||||
<virtualFileSystem key="http" implementationClass="com.intellij.openapi.vfs.impl.http.HttpFileSystemImpl"/>
|
||||
<virtualFileSystem key="https" implementationClass="com.intellij.openapi.vfs.impl.http.HttpsFileSystem"/>
|
||||
<virtualFileSystem key="dummy" implementationClass="com.intellij.openapi.vfs.ex.dummy.DummyFileSystem"/>
|
||||
<virtualFileSystem key="http" implementationClass="com.intellij.openapi.vfs.impl.http.HttpFileSystemImpl"/>
|
||||
<virtualFileSystem key="https" implementationClass="com.intellij.openapi.vfs.impl.http.HttpsFileSystem"/>
|
||||
|
||||
<toolWindow id="Event Log" anchor="bottom" secondary="true"
|
||||
icon="AllIcons.Ide.NoNotifications13"
|
||||
factoryClass="com.intellij.notification.EventLogToolWindowFactory"/>
|
||||
<toolWindow id="Event Log" anchor="bottom" secondary="true"
|
||||
icon="AllIcons.Ide.NoNotifications13"
|
||||
factoryClass="com.intellij.notification.EventLogToolWindowFactory"/>
|
||||
|
||||
<projectService serviceInterface="com.intellij.openapi.wm.impl.ProjectFrameBounds"
|
||||
serviceImplementation="com.intellij.openapi.wm.impl.ProjectFrameBounds"/>
|
||||
<exceptionFilter implementation="com.intellij.execution.filters.ExceptionBaseFilterFactory"/>
|
||||
<exceptionFilter implementation="com.intellij.execution.filters.ExceptionExFilterFactory"/>
|
||||
<exceptionFilter implementation="com.intellij.openapi.vcs.contentAnnotation.VcsContentAnnotationExceptionFilterFactory"/>
|
||||
<projectService serviceInterface="com.intellij.openapi.wm.impl.ProjectFrameBounds"
|
||||
serviceImplementation="com.intellij.openapi.wm.impl.ProjectFrameBounds"/>
|
||||
<exceptionFilter implementation="com.intellij.execution.filters.ExceptionBaseFilterFactory"/>
|
||||
<exceptionFilter implementation="com.intellij.execution.filters.ExceptionExFilterFactory"/>
|
||||
<exceptionFilter implementation="com.intellij.openapi.vcs.contentAnnotation.VcsContentAnnotationExceptionFilterFactory"/>
|
||||
|
||||
<applicationService serviceInterface="com.intellij.ide.TypePresentationService"
|
||||
serviceImplementation="com.intellij.ide.TypePresentationServiceImpl"/>
|
||||
<applicationService serviceInterface="com.intellij.ide.TypePresentationService"
|
||||
serviceImplementation="com.intellij.ide.TypePresentationServiceImpl"/>
|
||||
|
||||
<postStartupActivity implementation="com.intellij.ide.TipOfTheDayManager"/>
|
||||
<postStartupActivity implementation="com.intellij.openapi.actionSystem.impl.ActionPreloader"/>
|
||||
<postStartupActivity id="OpenFilesActivity" implementation="com.intellij.openapi.fileEditor.impl.OpenFilesActivity"/>
|
||||
<postStartupActivity implementation="com.intellij.ide.TipOfTheDayManager"/>
|
||||
<postStartupActivity implementation="com.intellij.openapi.actionSystem.impl.ActionPreloader"/>
|
||||
<postStartupActivity id="OpenFilesActivity" implementation="com.intellij.openapi.fileEditor.impl.OpenFilesActivity"/>
|
||||
|
||||
<patch.extension implementation="com.intellij.openapi.diff.impl.patch.BaseRevisionTextPatchEP"/>
|
||||
<patch.extension implementation="com.intellij.openapi.diff.impl.patch.CharsetEP"/>
|
||||
<patch.extension implementation="com.intellij.openapi.diff.impl.patch.BaseRevisionTextPatchEP"/>
|
||||
<patch.extension implementation="com.intellij.openapi.diff.impl.patch.CharsetEP"/>
|
||||
|
||||
<iconLayerProvider implementation="com.intellij.ide.LockedIconLayerProvider"/>
|
||||
<iconLayerProvider implementation="com.intellij.ide.LockedIconLayerProvider"/>
|
||||
|
||||
<fileEditorProvider implementation="com.intellij.openapi.fileEditor.impl.text.LargeFileEditorProvider"/>
|
||||
<frameEditorComponentProvider implementation="com.intellij.openapi.wm.ex.DefaultFrameEditorComponentProvider"/>
|
||||
<fileEditorProvider implementation="com.intellij.openapi.fileEditor.impl.text.LargeFileEditorProvider"/>
|
||||
<frameEditorComponentProvider implementation="com.intellij.openapi.wm.ex.DefaultFrameEditorComponentProvider"/>
|
||||
|
||||
<xmlRpcHandler name="fileOpener" implementation="com.intellij.ide.OpenFileXmlRpcHandler"/>
|
||||
<xmlRpcHandler name="fileOpener" implementation="com.intellij.ide.OpenFileXmlRpcHandler"/>
|
||||
|
||||
<applicationService serviceInterface="org.jetbrains.ide.WebServerManager" serviceImplementation="org.jetbrains.ide.WebServerManagerImpl"/>
|
||||
<applicationService serviceInterface="com.intellij.ide.XmlRpcServer" serviceImplementation="com.intellij.ide.XmlRpcServerImpl"/>
|
||||
<httpRequestHandler implementation="com.intellij.ide.XmlRpcServerImpl$XmlRpcRequestHandler"/>
|
||||
<postStartupActivity implementation="org.jetbrains.ide.WebServerManagerImpl$MyPostStartupActivity"/>
|
||||
<applicationService serviceInterface="org.jetbrains.ide.WebServerManager" serviceImplementation="org.jetbrains.ide.WebServerManagerImpl"/>
|
||||
<applicationService serviceInterface="com.intellij.ide.XmlRpcServer" serviceImplementation="com.intellij.ide.XmlRpcServerImpl"/>
|
||||
<httpRequestHandler implementation="com.intellij.ide.XmlRpcServerImpl$XmlRpcRequestHandler"/>
|
||||
<postStartupActivity implementation="org.jetbrains.ide.WebServerManagerImpl$MyPostStartupActivity"/>
|
||||
|
||||
<editorNotificationProvider implementation="com.intellij.ide.FileChangedNotificationProvider"/>
|
||||
</extensions>
|
||||
<editorNotificationProvider implementation="com.intellij.ide.FileChangedNotificationProvider"/>
|
||||
</extensions>
|
||||
</idea-plugin>
|
||||
|
||||
@@ -11,15 +11,15 @@
|
||||
<xi:include href="/idea/PlatformLangActionManager.xml" xpointer="xpointer(/component/*)"/>
|
||||
|
||||
<extensionPoints>
|
||||
<xi:include href="/META-INF/PlatformExtensionPoints.xml" xpointer="xpointer(/extensionPoints/*)"/>
|
||||
<xi:include href="/META-INF/VcsExtensionPoints.xml" xpointer="xpointer(/extensionPoints/*)"/>
|
||||
<xi:include href="/META-INF/LangExtensionPoints.xml" xpointer="xpointer(/extensionPoints/*)"/>
|
||||
<xi:include href="/META-INF/PlatformExtensionPoints.xml" xpointer="xpointer(/idea-plugin/extensionPoints/*)"/>
|
||||
<xi:include href="/META-INF/VcsExtensionPoints.xml" xpointer="xpointer(/idea-plugin/extensionPoints/*)"/>
|
||||
<xi:include href="/META-INF/LangExtensionPoints.xml" xpointer="xpointer(/idea-plugin/extensionPoints/*)"/>
|
||||
</extensionPoints>
|
||||
|
||||
<extensions defaultExtensionNs="com.intellij">
|
||||
<xi:include href="/META-INF/PlatformExtensions.xml" xpointer="xpointer(/extensions/*)"/>
|
||||
<xi:include href="/META-INF/VcsExtensions.xml" xpointer="xpointer(/extensions/*)"/>
|
||||
<xi:include href="/META-INF/LangExtensions.xml" xpointer="xpointer(/extensions/*)"/>
|
||||
<xi:include href="/META-INF/PlatformExtensions.xml" xpointer="xpointer(/idea-plugin/extensions/*)"/>
|
||||
<xi:include href="/META-INF/VcsExtensions.xml" xpointer="xpointer(/idea-plugin/extensions/*)"/>
|
||||
<xi:include href="/META-INF/LangExtensions.xml" xpointer="xpointer(/idea-plugin/extensions/*)"/>
|
||||
|
||||
<applicationService serviceInterface="com.intellij.packageDependencies.DependenciesVisitorFactory"
|
||||
serviceImplementation="com.intellij.packageDependencies.DependenciesVisitorFactory"/>
|
||||
@@ -90,7 +90,7 @@
|
||||
|
||||
</extensions>
|
||||
|
||||
<xi:include href="xdebugger.xml" xpointer="xpointer(/root/*)"/>
|
||||
<xi:include href="xdebugger.xml" xpointer="xpointer(/idea-plugin/*)"/>
|
||||
<xi:include href="/META-INF/ultimate.xml" xpointer="xpointer(/idea-plugin/*)">
|
||||
<xi:fallback/>
|
||||
</xi:include>
|
||||
|
||||
@@ -6,13 +6,13 @@
|
||||
<xi:include href="/idea/PlatformActionManager.xml" xpointer="xpointer(/component/*)"/>
|
||||
|
||||
<extensionPoints>
|
||||
<xi:include href="/META-INF/PlatformExtensionPoints.xml" xpointer="xpointer(/extensionPoints/*)"/>
|
||||
<xi:include href="/META-INF/VcsExtensionPoints.xml" xpointer="xpointer(/extensionPoints/*)"/>
|
||||
<xi:include href="/META-INF/PlatformExtensionPoints.xml" xpointer="xpointer(/idea-plugin/extensionPoints/*)"/>
|
||||
<xi:include href="/META-INF/VcsExtensionPoints.xml" xpointer="xpointer(/idea-plugin/extensionPoints/*)"/>
|
||||
</extensionPoints>
|
||||
|
||||
<extensions defaultExtensionNs="com.intellij">
|
||||
<xi:include href="/META-INF/PlatformExtensions.xml" xpointer="xpointer(/extensions/*)"/>
|
||||
<xi:include href="/META-INF/VcsExtensions.xml" xpointer="xpointer(/extensions/*)"/>
|
||||
<xi:include href="/META-INF/PlatformExtensions.xml" xpointer="xpointer(/idea-plugin/extensions/*)"/>
|
||||
<xi:include href="/META-INF/VcsExtensions.xml" xpointer="xpointer(/idea-plugin/extensions/*)"/>
|
||||
|
||||
<applicationService serviceInterface="com.intellij.codeStyle.CodeStyleFacade"
|
||||
serviceImplementation="com.intellij.codeStyle.DefaultCodeStyleFacade"/>
|
||||
|
||||
@@ -1,52 +1,54 @@
|
||||
<extensionPoints>
|
||||
<extensionPoint name="checkoutProvider"
|
||||
interface="com.intellij.openapi.vcs.CheckoutProvider"/>
|
||||
<extensionPoint name="checkoutListener"
|
||||
interface="com.intellij.openapi.vcs.checkout.CheckoutListener"/>
|
||||
<extensionPoint name="vcsAwareCheckoutListener"
|
||||
interface="com.intellij.openapi.vcs.checkout.VcsAwareCheckoutListener"/>
|
||||
<extensionPoint name="checkoutCompletedListener"
|
||||
interface="com.intellij.openapi.vcs.checkout.CheckoutListener"/>
|
||||
<idea-plugin>
|
||||
<extensionPoints>
|
||||
<extensionPoint name="checkoutProvider"
|
||||
interface="com.intellij.openapi.vcs.CheckoutProvider"/>
|
||||
<extensionPoint name="checkoutListener"
|
||||
interface="com.intellij.openapi.vcs.checkout.CheckoutListener"/>
|
||||
<extensionPoint name="vcsAwareCheckoutListener"
|
||||
interface="com.intellij.openapi.vcs.checkout.VcsAwareCheckoutListener"/>
|
||||
<extensionPoint name="checkoutCompletedListener"
|
||||
interface="com.intellij.openapi.vcs.checkout.CheckoutListener"/>
|
||||
|
||||
<extensionPoint name="vcs"
|
||||
beanClass="com.intellij.openapi.vcs.impl.VcsEP"
|
||||
area="IDEA_PROJECT"/>
|
||||
<extensionPoint name="vcs"
|
||||
beanClass="com.intellij.openapi.vcs.impl.VcsEP"
|
||||
area="IDEA_PROJECT"/>
|
||||
|
||||
<extensionPoint name="checkinHandlerFactory"
|
||||
interface="com.intellij.openapi.vcs.checkin.CheckinHandlerFactory"
|
||||
area="IDEA_PROJECT"/>
|
||||
<extensionPoint name="checkinHandlerFactory"
|
||||
interface="com.intellij.openapi.vcs.checkin.CheckinHandlerFactory"
|
||||
area="IDEA_PROJECT"/>
|
||||
|
||||
<extensionPoint name="vcsCheckinHandlerFactory"
|
||||
interface="com.intellij.openapi.vcs.checkin.VcsCheckinHandlerFactory"/>
|
||||
<extensionPoint name="vcsCheckinHandlerFactory"
|
||||
interface="com.intellij.openapi.vcs.checkin.VcsCheckinHandlerFactory"/>
|
||||
|
||||
<extensionPoint name="changesViewContent"
|
||||
beanClass="com.intellij.openapi.vcs.changes.ui.ChangesViewContentEP"
|
||||
area="IDEA_PROJECT"/>
|
||||
<extensionPoint name="changesViewContent"
|
||||
beanClass="com.intellij.openapi.vcs.changes.ui.ChangesViewContentEP"
|
||||
area="IDEA_PROJECT"/>
|
||||
|
||||
<extensionPoint name="editChangelistSupport"
|
||||
interface="com.intellij.openapi.vcs.changes.ui.EditChangelistSupport"
|
||||
area="IDEA_PROJECT"/>
|
||||
<extensionPoint name="editChangelistSupport"
|
||||
interface="com.intellij.openapi.vcs.changes.ui.EditChangelistSupport"
|
||||
area="IDEA_PROJECT"/>
|
||||
|
||||
<extensionPoint name="vcsSelectionProvider"
|
||||
interface="com.intellij.vcsUtil.VcsSelectionProvider"/>
|
||||
<extensionPoint name="vcsSelectionProvider"
|
||||
interface="com.intellij.vcsUtil.VcsSelectionProvider"/>
|
||||
|
||||
<extensionPoint name="vcsConfigurableProvider"
|
||||
interface="com.intellij.openapi.vcs.VcsConfigurableProvider"/>
|
||||
<extensionPoint name="vcsConfigurableProvider"
|
||||
interface="com.intellij.openapi.vcs.VcsConfigurableProvider"/>
|
||||
|
||||
<!--<extensionPoint name="writingAccessProvider"-->
|
||||
<!--interface="com.intellij.openapi.vfs.WritingAccessProvider"-->
|
||||
<!--area="IDEA_PROJECT"/>-->
|
||||
|
||||
<extensionPoint name="vcs.fileStatusProvider"
|
||||
interface="com.intellij.openapi.vcs.impl.FileStatusProvider"
|
||||
area="IDEA_PROJECT"/>
|
||||
<!--<extensionPoint name="writingAccessProvider"-->
|
||||
<!--interface="com.intellij.openapi.vfs.WritingAccessProvider"-->
|
||||
<!--area="IDEA_PROJECT"/>-->
|
||||
|
||||
<extensionPoint name="vcsPopupProvider"
|
||||
interface="com.intellij.openapi.vcs.actions.VcsQuickListContentProvider"/>
|
||||
<extensionPoint name="patch.extension" interface="com.intellij.openapi.diff.impl.patch.PatchEP" area="IDEA_PROJECT"/>
|
||||
<extensionPoint name="vcsChangesViewRefresher" interface="com.intellij.openapi.vcs.changes.ChangesViewRefresher"/>
|
||||
<extensionPoint name="vcsAnnotationGutterActionProvider" interface="com.intellij.openapi.vcs.annotate.AnnotationGutterActionProvider"/>
|
||||
<extensionPoint name="vcschangedetails" interface="com.intellij.openapi.vcs.changes.VcsChangeDetailsProvider" area="IDEA_PROJECT"/>
|
||||
<extensionPoint name="vcs.fileStatusProvider"
|
||||
interface="com.intellij.openapi.vcs.impl.FileStatusProvider"
|
||||
area="IDEA_PROJECT"/>
|
||||
|
||||
<extensionPoint name="vcsPopupProvider"
|
||||
interface="com.intellij.openapi.vcs.actions.VcsQuickListContentProvider"/>
|
||||
<extensionPoint name="patch.extension" interface="com.intellij.openapi.diff.impl.patch.PatchEP" area="IDEA_PROJECT"/>
|
||||
<extensionPoint name="vcsChangesViewRefresher" interface="com.intellij.openapi.vcs.changes.ChangesViewRefresher"/>
|
||||
<extensionPoint name="vcsAnnotationGutterActionProvider" interface="com.intellij.openapi.vcs.annotate.AnnotationGutterActionProvider"/>
|
||||
<extensionPoint name="vcschangedetails" interface="com.intellij.openapi.vcs.changes.VcsChangeDetailsProvider" area="IDEA_PROJECT"/>
|
||||
|
||||
|
||||
</extensionPoints>
|
||||
</extensionPoints>
|
||||
</idea-plugin>
|
||||
|
||||
@@ -1,40 +1,43 @@
|
||||
<extensions>
|
||||
<applicationService serviceInterface="com.intellij.openapi.vcs.actions.VcsContextFactory"
|
||||
serviceImplementation="com.intellij.peer.impl.VcsContextFactoryImpl"/>
|
||||
<idea-plugin>
|
||||
<extensions defaultExtensionNs="com.intellij">
|
||||
<applicationService serviceInterface="com.intellij.openapi.vcs.actions.VcsContextFactory"
|
||||
serviceImplementation="com.intellij.peer.impl.VcsContextFactoryImpl"/>
|
||||
|
||||
<projectService serviceInterface="com.intellij.openapi.vcs.AbstractVcsHelper"
|
||||
serviceImplementation="com.intellij.openapi.vcs.impl.AbstractVcsHelperImpl"/>
|
||||
<projectService serviceInterface="com.intellij.openapi.vcs.IssueNavigationConfiguration"
|
||||
serviceImplementation="com.intellij.openapi.vcs.IssueNavigationConfiguration"/>
|
||||
<projectService serviceInterface="com.intellij.openapi.diff.DirDiffManager"
|
||||
serviceImplementation="com.intellij.openapi.diff.impl.dir.DirDiffManagerImpl"/>
|
||||
<projectService serviceImplementation="com.intellij.openapi.vcs.VcsConfiguration"/>
|
||||
<projectService serviceImplementation="com.intellij.openapi.vcs.contentAnnotation.VcsContentAnnotationSettings"/>
|
||||
<projectService serviceImplementation="com.intellij.openapi.diff.impl.settings.MergeToolSettings"/>
|
||||
<projectService serviceImplementation="com.intellij.openapi.diff.impl.settings.DiffToolSettings"/>
|
||||
<projectService serviceInterface="com.intellij.openapi.vcs.AbstractVcsHelper"
|
||||
serviceImplementation="com.intellij.openapi.vcs.impl.AbstractVcsHelperImpl"/>
|
||||
<projectService serviceInterface="com.intellij.openapi.vcs.IssueNavigationConfiguration"
|
||||
serviceImplementation="com.intellij.openapi.vcs.IssueNavigationConfiguration"/>
|
||||
<projectService serviceInterface="com.intellij.openapi.diff.DirDiffManager"
|
||||
serviceImplementation="com.intellij.openapi.diff.impl.dir.DirDiffManagerImpl"/>
|
||||
<projectService serviceImplementation="com.intellij.openapi.vcs.VcsConfiguration"/>
|
||||
<projectService serviceImplementation="com.intellij.openapi.vcs.contentAnnotation.VcsContentAnnotationSettings"/>
|
||||
<projectService serviceImplementation="com.intellij.openapi.diff.impl.settings.MergeToolSettings"/>
|
||||
<projectService serviceImplementation="com.intellij.openapi.diff.impl.settings.DiffToolSettings"/>
|
||||
|
||||
<selectInTarget implementation="com.intellij.openapi.vcs.changes.SelectInChangesViewTarget"/>
|
||||
<selectInTarget implementation="com.intellij.openapi.vcs.changes.SelectInChangesViewTarget"/>
|
||||
|
||||
<projectConfigurable instance="com.intellij.openapi.vcs.configurable.VcsManagerConfigurable" id="vcs"/>
|
||||
<projectConfigurable instance="com.intellij.openapi.vcs.configurable.VcsManagerConfigurable" id="vcs"/>
|
||||
|
||||
<changesViewContent tabName="Repository" className="com.intellij.openapi.vcs.changes.committed.CommittedChangesViewManager"
|
||||
predicateClassName="com.intellij.openapi.vcs.changes.committed.CommittedChangesVisibilityPredicate"/>
|
||||
<changesViewContent tabName="Incoming" className="com.intellij.openapi.vcs.changes.committed.IncomingChangesViewProvider"
|
||||
predicateClassName="com.intellij.openapi.vcs.changes.committed.IncomingChangesVisibilityPredicate"/>
|
||||
<changesViewContent tabName="Repository" className="com.intellij.openapi.vcs.changes.committed.CommittedChangesViewManager"
|
||||
predicateClassName="com.intellij.openapi.vcs.changes.committed.CommittedChangesVisibilityPredicate"/>
|
||||
<changesViewContent tabName="Incoming" className="com.intellij.openapi.vcs.changes.committed.IncomingChangesViewProvider"
|
||||
predicateClassName="com.intellij.openapi.vcs.changes.committed.IncomingChangesVisibilityPredicate"/>
|
||||
|
||||
<vcs.fileStatusProvider implementation="com.intellij.openapi.vcs.changes.conflicts.ChangelistConflictFileStatusProvider"/>
|
||||
<writingAccessProvider implementation="com.intellij.openapi.vcs.changes.conflicts.ChangelistConflictAccessProvider"/>
|
||||
<editorNotificationProvider implementation="com.intellij.openapi.vcs.changes.conflicts.ChangelistConflictNotificationProvider"/>
|
||||
<vcs.fileStatusProvider implementation="com.intellij.openapi.vcs.changes.conflicts.ChangelistConflictFileStatusProvider"/>
|
||||
<writingAccessProvider implementation="com.intellij.openapi.vcs.changes.conflicts.ChangelistConflictAccessProvider"/>
|
||||
<editorNotificationProvider implementation="com.intellij.openapi.vcs.changes.conflicts.ChangelistConflictNotificationProvider"/>
|
||||
|
||||
<handleTypeFactory implementation="com.intellij.openapi.vcs.readOnlyHandler.VcsHandleTypeFactory"/>
|
||||
<handleTypeFactory implementation="com.intellij.openapi.vcs.readOnlyHandler.VcsHandleTypeFactory"/>
|
||||
|
||||
<keymapExtension implementation="com.intellij.openapi.vcs.impl.VcsKeymapExtension"/>
|
||||
<fileTypeFactory implementation="com.intellij.openapi.vcs.impl.VcsFileTypeFactory"/>
|
||||
<virtualFileSystem key="vcs" implementationClass="com.intellij.openapi.vcs.vfs.VcsFileSystem"/>
|
||||
<fileDocumentSynchronizationVetoer implementation="com.intellij.openapi.vcs.changes.SaveCommittingDocumentsVetoer"/>
|
||||
<keymapExtension implementation="com.intellij.openapi.vcs.impl.VcsKeymapExtension"/>
|
||||
<fileTypeFactory implementation="com.intellij.openapi.vcs.impl.VcsFileTypeFactory"/>
|
||||
<virtualFileSystem key="vcs" implementationClass="com.intellij.openapi.vcs.vfs.VcsFileSystem"/>
|
||||
<fileDocumentSynchronizationVetoer implementation="com.intellij.openapi.vcs.changes.SaveCommittingDocumentsVetoer"/>
|
||||
|
||||
<applicationService serviceImplementation="com.intellij.openapi.vcs.VcsApplicationSettings"/>
|
||||
<applicationService serviceInterface="com.intellij.openapi.vcs.impl.CheckinHandlersManager"
|
||||
serviceImplementation="com.intellij.openapi.vcs.impl.CheckinHandlersManagerImpl"/>
|
||||
<pathMacroFilter implementation="com.intellij.openapi.vcs.VcsPathMacroFilter"/>
|
||||
</extensions>
|
||||
</idea-plugin>
|
||||
|
||||
<applicationService serviceImplementation="com.intellij.openapi.vcs.VcsApplicationSettings"/>
|
||||
<applicationService serviceInterface="com.intellij.openapi.vcs.impl.CheckinHandlersManager"
|
||||
serviceImplementation="com.intellij.openapi.vcs.impl.CheckinHandlersManagerImpl"/>
|
||||
<pathMacroFilter implementation="com.intellij.openapi.vcs.VcsPathMacroFilter"/>
|
||||
</extensions>
|
||||
|
||||
@@ -375,7 +375,7 @@
|
||||
|
||||
<metaDataContributor implementation="com.intellij.xml.util.XmlApplicationComponent"/>
|
||||
|
||||
<browserSettingsProvider instance="com.intellij.ide.browsers.BrowserSettingsProviderImpl"/>
|
||||
<browserSettingsProvider instance="com.intellij.ide.browsers.impl.BrowserSettingsProviderImpl"/>
|
||||
|
||||
<xml.xmlSuppressionProvider implementation="com.intellij.codeInspection.DefaultXmlSuppressionProvider" order="last"/>
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<root>
|
||||
<idea-plugin>
|
||||
<project-components>
|
||||
<component>
|
||||
<interface-class>com.intellij.xdebugger.XDebuggerManager</interface-class>
|
||||
@@ -37,4 +37,4 @@
|
||||
|
||||
<executor implementation="com.intellij.execution.executors.DefaultDebugExecutor" order="first,after run"/>
|
||||
</extensions>
|
||||
</root>
|
||||
</idea-plugin>
|
||||
|
||||
@@ -25,10 +25,7 @@ import com.intellij.openapi.command.CommandProcessor;
|
||||
import com.intellij.openapi.command.impl.StartMarkAction;
|
||||
import com.intellij.openapi.fileTypes.StdFileTypes;
|
||||
import com.intellij.openapi.project.Project;
|
||||
import com.intellij.openapi.util.Disposer;
|
||||
import com.intellij.openapi.util.JDOMExternalizable;
|
||||
import com.intellij.openapi.util.JDOMUtil;
|
||||
import com.intellij.openapi.util.Key;
|
||||
import com.intellij.openapi.util.*;
|
||||
import com.intellij.openapi.util.io.FileUtil;
|
||||
import com.intellij.openapi.util.text.StringUtil;
|
||||
import com.intellij.openapi.vfs.VfsUtilCore;
|
||||
@@ -40,6 +37,7 @@ import com.intellij.psi.codeStyle.CodeStyleSettings;
|
||||
import com.intellij.psi.codeStyle.CodeStyleSettingsManager;
|
||||
import com.intellij.psi.impl.source.PostprocessReformattingAspect;
|
||||
import com.intellij.refactoring.rename.inplace.InplaceRefactoring;
|
||||
import com.intellij.rt.execution.junit.FileComparisonFailure;
|
||||
import com.intellij.testFramework.exceptionCases.AbstractExceptionCase;
|
||||
import com.intellij.util.Consumer;
|
||||
import com.intellij.util.Function;
|
||||
@@ -621,7 +619,7 @@ public abstract class UsefulTestCase extends TestCase {
|
||||
return testName.replaceAll("_.*", "");
|
||||
}
|
||||
|
||||
protected static void assertSameLinesWithFile(final String filePath, final String actualText) {
|
||||
protected static void assertSameLinesWithFile(String filePath, String actualText) {
|
||||
String fileText;
|
||||
try {
|
||||
if (OVERWRITE_TESTDATA) {
|
||||
@@ -633,7 +631,11 @@ public abstract class UsefulTestCase extends TestCase {
|
||||
catch (IOException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
assertSameLines(fileText, actualText);
|
||||
String expected = StringUtil.convertLineSeparators(fileText.trim());
|
||||
String actual = StringUtil.convertLineSeparators(actualText.trim());
|
||||
if (!Comparing.equal(expected, actual)) {
|
||||
throw new FileComparisonFailure(null, expected, actual, filePath);
|
||||
}
|
||||
}
|
||||
|
||||
public static void clearFields(final Object test) throws IllegalAccessException {
|
||||
|
||||
@@ -58,7 +58,8 @@ public abstract class BundleBase {
|
||||
return format(value, params);
|
||||
}
|
||||
|
||||
public static String format(String value, Object... params) {
|
||||
@NotNull
|
||||
public static String format(@NotNull String value, @NotNull Object... params) {
|
||||
if (params.length > 0 && value.indexOf('{') >= 0) {
|
||||
return MessageFormat.format(value, params);
|
||||
}
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
*/
|
||||
package com.intellij.util;
|
||||
|
||||
import com.intellij.openapi.util.Condition;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
@@ -56,8 +57,8 @@ public class ObjectUtils {
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public static <T, K extends T> T nullizeIfSubtype(@Nullable T obj, @NotNull Class<K> clazz) {
|
||||
if (clazz.isInstance(obj)) {
|
||||
public static <T> T nullizeByCondition(@Nullable final T obj, @NotNull final Condition<T> condition) {
|
||||
if (condition.value(obj)) {
|
||||
return null;
|
||||
}
|
||||
return obj;
|
||||
|
||||
@@ -257,8 +257,8 @@ public class JDOMXIncluder {
|
||||
//xpointer($1)
|
||||
@NonNls public static Pattern XPOINTER_PATTERN = Pattern.compile("xpointer\\((.*)\\)");
|
||||
|
||||
// /$1/*
|
||||
public static Pattern CHILDREN_PATTERN = Pattern.compile("\\/(.*)\\/\\*");
|
||||
// /$1(/$2)?/*
|
||||
public static Pattern CHILDREN_PATTERN = Pattern.compile("/([^/]*)(/[^/]*)?/\\*");
|
||||
|
||||
@Nullable
|
||||
private static List<Object> extractNeededChildren(final Element element, List<Object> remoteElements) {
|
||||
@@ -283,8 +283,13 @@ public class JDOMXIncluder {
|
||||
|
||||
Element e = (Element)remoteElements.get(0);
|
||||
|
||||
if (e.getName().equals(rootTagName)) return
|
||||
new ArrayList<Object>(e.getContent());
|
||||
if (e.getName().equals(rootTagName)) {
|
||||
String subTagName = matcher.group(2);
|
||||
if (subTagName != null) {
|
||||
e = e.getChild(subTagName.substring(1)); // cut off the slash
|
||||
}
|
||||
return new ArrayList<Object>(e.getContent());
|
||||
}
|
||||
else
|
||||
return Collections.emptyList();
|
||||
}
|
||||
|
||||
+6
-11
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2003-2007 Dave Griffith, Bas Leijdekkers
|
||||
* Copyright 2003-2013 Dave Griffith, Bas Leijdekkers
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -28,26 +28,22 @@ public class NoopMethodInAbstractClassInspection extends BaseInspection {
|
||||
|
||||
@NotNull
|
||||
public String getDisplayName() {
|
||||
return InspectionGadgetsBundle.message(
|
||||
"noop.method.in.abstract.class.display.name");
|
||||
return InspectionGadgetsBundle.message("noop.method.in.abstract.class.display.name");
|
||||
}
|
||||
|
||||
@NotNull
|
||||
protected String buildErrorString(Object... infos) {
|
||||
return InspectionGadgetsBundle.message(
|
||||
"noop.method.in.abstract.class.problem.descriptor");
|
||||
return InspectionGadgetsBundle.message("noop.method.in.abstract.class.problem.descriptor");
|
||||
}
|
||||
|
||||
public BaseInspectionVisitor buildVisitor() {
|
||||
return new NoopMethodInAbstractClassVisitor();
|
||||
}
|
||||
|
||||
private static class NoopMethodInAbstractClassVisitor
|
||||
extends BaseInspectionVisitor {
|
||||
private static class NoopMethodInAbstractClassVisitor extends BaseInspectionVisitor {
|
||||
|
||||
@Override
|
||||
public void visitMethod(@NotNull PsiMethod method) {
|
||||
//no call to super, so we don't drill into anonymous classes
|
||||
if (method.isConstructor()) {
|
||||
return;
|
||||
}
|
||||
@@ -55,14 +51,13 @@ public class NoopMethodInAbstractClassInspection extends BaseInspection {
|
||||
if (containingClass == null) {
|
||||
return;
|
||||
}
|
||||
if (containingClass.isInterface() ||
|
||||
containingClass.isAnnotationType()) {
|
||||
if (containingClass.isInterface() || containingClass.isAnnotationType()) {
|
||||
return;
|
||||
}
|
||||
if (!containingClass.hasModifierProperty(PsiModifier.ABSTRACT)) {
|
||||
return;
|
||||
}
|
||||
if (method.hasModifierProperty(PsiModifier.ABSTRACT)) {
|
||||
if (method.hasModifierProperty(PsiModifier.ABSTRACT) || method.hasModifierProperty(PsiModifier.NATIVE)) {
|
||||
return;
|
||||
}
|
||||
if (!MethodUtils.isEmpty(method)) {
|
||||
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
package com.siyeh.igtest.classlayout.noop_method_in_abstract_class;
|
||||
|
||||
abstract class NoopMethodInAbstractClass {
|
||||
|
||||
void foo() {}
|
||||
|
||||
native int bar();
|
||||
}
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<problems>
|
||||
<problem>
|
||||
<file>NoopMethodInAbstractClass.java</file>
|
||||
<line>5</line>
|
||||
<problem_class severity="WARNING" attribute_key="WARNING_ATTRIBUTES">No-op method in abstract class</problem_class>
|
||||
<description>No-op Method <code>foo()</code> should be made abstract #loc</description>
|
||||
</problem>
|
||||
</problems>
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
package com.siyeh.ig.classlayout;
|
||||
|
||||
import com.siyeh.ig.IGInspectionTestCase;
|
||||
|
||||
public class NoopMethodInAbstractClassInspectionTest extends IGInspectionTestCase {
|
||||
|
||||
public void test() throws Exception {
|
||||
doTest("com/siyeh/igtest/classlayout/noop_method_in_abstract_class", new NoopMethodInAbstractClassInspection());
|
||||
}
|
||||
}
|
||||
@@ -47,6 +47,7 @@ public class AntDomFileReference extends FileReference implements AntDomReferenc
|
||||
return (AntDomFileReferenceSet)super.getFileReferenceSet();
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public String getUnresolvedMessagePattern() {
|
||||
return AntBundle.message("file.doesnt.exist", getCanonicalRepresentationText());
|
||||
}
|
||||
|
||||
@@ -84,7 +84,7 @@
|
||||
<psi.referenceContributor implementation="org.jetbrains.idea.devkit.dom.impl.InspectionsPropertiesReferenceProviderContributor"/>
|
||||
<psi.referenceContributor implementation="org.jetbrains.idea.devkit.references.IconsReferencesContributor"/>
|
||||
<referencesSearch implementation="org.jetbrains.idea.devkit.references.IconsReferencesContributor"/>
|
||||
<unusedDeclarationFixProvider implementation="org.jetbrains.idea.devkit.inspections.quickfix.RegisterInspectionFixProvider"/>
|
||||
<unusedDeclarationFixProvider implementation="org.jetbrains.idea.devkit.inspections.quickfix.RegisterExtensionFixProvider"/>
|
||||
</extensions>
|
||||
|
||||
<module-components>
|
||||
|
||||
@@ -44,6 +44,7 @@ public interface Component extends DomElement {
|
||||
|
||||
@NotNull
|
||||
@Convert(PluginPsiClassConverter.class)
|
||||
@ExtendClass(allowEmpty=true)
|
||||
GenericDomValue<PsiClass> getHeadlessImplementationClass();
|
||||
|
||||
@NotNull
|
||||
|
||||
@@ -21,6 +21,8 @@ import com.intellij.util.xml.*;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.idea.devkit.dom.impl.PluginPsiClassConverter;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author mike
|
||||
*/
|
||||
@@ -50,4 +52,8 @@ public interface ExtensionPoint extends DomElement {
|
||||
|
||||
@NotNull
|
||||
GenericAttributeValue<Area> getArea();
|
||||
|
||||
@NotNull
|
||||
@SubTagList("with")
|
||||
List<With> getWithElements();
|
||||
}
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
/*
|
||||
* Copyright 2000-2013 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 org.jetbrains.idea.devkit.dom;
|
||||
|
||||
import com.intellij.psi.PsiClass;
|
||||
import com.intellij.psi.PsiField;
|
||||
import com.intellij.util.xml.Attribute;
|
||||
import com.intellij.util.xml.Convert;
|
||||
import com.intellij.util.xml.DomElement;
|
||||
import com.intellij.util.xml.GenericAttributeValue;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.idea.devkit.dom.impl.PluginFieldNameConverter;
|
||||
import org.jetbrains.idea.devkit.dom.impl.PluginPsiClassConverter;
|
||||
|
||||
/**
|
||||
* @author yole
|
||||
*/
|
||||
public interface With extends DomElement {
|
||||
@NotNull
|
||||
@Attribute("attribute")
|
||||
@Convert(PluginFieldNameConverter.class)
|
||||
GenericAttributeValue<PsiField> getAttribute();
|
||||
|
||||
|
||||
@NotNull
|
||||
@Attribute("implements")
|
||||
@Convert(PluginPsiClassConverter.class)
|
||||
GenericAttributeValue<PsiClass> getImplements();
|
||||
}
|
||||
@@ -0,0 +1,77 @@
|
||||
/*
|
||||
* Copyright 2000-2013 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 org.jetbrains.idea.devkit.dom.impl;
|
||||
|
||||
import com.intellij.psi.*;
|
||||
import com.intellij.util.xml.ConvertContext;
|
||||
import com.intellij.util.xml.ResolvingConverter;
|
||||
import org.jetbrains.annotations.NonNls;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import org.jetbrains.idea.devkit.dom.ExtensionPoint;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author yole
|
||||
*/
|
||||
public class PluginFieldNameConverter extends ResolvingConverter<PsiField> {
|
||||
@NotNull
|
||||
@Override
|
||||
public Collection<? extends PsiField> getVariants(ConvertContext context) {
|
||||
PsiClass aClass = getEPBeanClass(context);
|
||||
if (aClass == null) return Collections.emptyList();
|
||||
List<PsiField> result = new ArrayList<PsiField>();
|
||||
for (PsiField field : aClass.getAllFields()) {
|
||||
if (!field.hasModifierProperty(PsiModifier.STATIC)) {
|
||||
PsiType type = field.getType();
|
||||
if (type instanceof PsiClassType) {
|
||||
PsiClass resolved = ((PsiClassType)type).resolve();
|
||||
if (resolved != null && CommonClassNames.JAVA_LANG_STRING.equals(resolved.getQualifiedName())) {
|
||||
result.add(field);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public PsiField fromString(@Nullable @NonNls String s, ConvertContext context) {
|
||||
PsiClass value = getEPBeanClass(context);
|
||||
if (value == null) return null;
|
||||
return value.findFieldByName(s, true);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public String toString(@Nullable PsiField field, ConvertContext context) {
|
||||
return field == null ? null : field.getName();
|
||||
}
|
||||
|
||||
@Nullable
|
||||
private static PsiClass getEPBeanClass(ConvertContext context) {
|
||||
ExtensionPoint ep = context.getInvocationElement().getParentOfType(ExtensionPoint.class, true);
|
||||
if (ep == null) return null;
|
||||
PsiClass value = ep.getBeanClass().getValue();
|
||||
if (value == null) return null;
|
||||
return value;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,92 @@
|
||||
/*
|
||||
* Copyright 2000-2013 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 org.jetbrains.idea.devkit.inspections.quickfix;
|
||||
|
||||
import com.intellij.codeInsight.intention.IntentionAction;
|
||||
import com.intellij.openapi.application.Result;
|
||||
import com.intellij.openapi.command.WriteCommandAction;
|
||||
import com.intellij.openapi.editor.Editor;
|
||||
import com.intellij.openapi.project.Project;
|
||||
import com.intellij.psi.PsiClass;
|
||||
import com.intellij.psi.PsiFile;
|
||||
import com.intellij.psi.xml.XmlTag;
|
||||
import com.intellij.util.Consumer;
|
||||
import com.intellij.util.IncorrectOperationException;
|
||||
import com.intellij.util.PsiNavigateUtil;
|
||||
import com.intellij.util.xml.DomFileElement;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.idea.devkit.dom.Extension;
|
||||
import org.jetbrains.idea.devkit.dom.Extensions;
|
||||
import org.jetbrains.idea.devkit.dom.IdeaPlugin;
|
||||
|
||||
/**
|
||||
* @author yole
|
||||
*/
|
||||
public class RegisterExtensionFix implements IntentionAction {
|
||||
private final PsiClass myExtensionClass;
|
||||
private final String myEPName;
|
||||
|
||||
public RegisterExtensionFix(PsiClass extensionClass, String epName) {
|
||||
myExtensionClass = extensionClass;
|
||||
myEPName = epName;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public String getText() {
|
||||
return "Register extension";
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public String getFamilyName() {
|
||||
return getText();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isAvailable(@NotNull Project project, Editor editor, PsiFile file) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void invoke(@NotNull Project project, Editor editor, PsiFile file) throws IncorrectOperationException {
|
||||
RegisterInspectionFix.choosePluginDescriptor(project, editor, file, new Consumer<DomFileElement<IdeaPlugin>>() {
|
||||
@Override
|
||||
public void consume(DomFileElement<IdeaPlugin> element) {
|
||||
doFix(element);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void doFix(final DomFileElement<IdeaPlugin> element) {
|
||||
Extension extension = new WriteCommandAction<Extension>(element.getFile().getProject(), element.getFile()) {
|
||||
@Override
|
||||
protected void run(Result<Extension> result) throws Throwable {
|
||||
Extensions extensions = RegisterInspectionFix.getExtension(element.getRootElement(), myEPName);
|
||||
Extension extension = extensions.addExtension(myEPName);
|
||||
XmlTag tag = extension.getXmlTag();
|
||||
tag.setAttribute("implementation", myExtensionClass.getQualifiedName());
|
||||
result.setResult(extension);
|
||||
}
|
||||
}.execute().throwException().getResultObject();
|
||||
PsiNavigateUtil.navigate(extension.getXmlTag());
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean startInWriteAction() {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,101 @@
|
||||
/*
|
||||
* Copyright 2000-2012 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 org.jetbrains.idea.devkit.inspections.quickfix;
|
||||
|
||||
import com.intellij.codeInsight.intention.IntentionAction;
|
||||
import com.intellij.codeInspection.GlobalInspectionTool;
|
||||
import com.intellij.codeInspection.InspectionEP;
|
||||
import com.intellij.codeInspection.LocalInspectionEP;
|
||||
import com.intellij.codeInspection.LocalInspectionTool;
|
||||
import com.intellij.codeInspection.reference.UnusedDeclarationFixProvider;
|
||||
import com.intellij.ide.highlighter.XmlFileType;
|
||||
import com.intellij.openapi.extensions.ExtensionPointName;
|
||||
import com.intellij.psi.*;
|
||||
import com.intellij.psi.search.GlobalSearchScope;
|
||||
import com.intellij.psi.search.ProjectScope;
|
||||
import com.intellij.psi.search.searches.ReferencesSearch;
|
||||
import com.intellij.psi.util.InheritanceUtil;
|
||||
import com.intellij.psi.util.PsiTreeUtil;
|
||||
import com.intellij.psi.xml.XmlTag;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/**
|
||||
* @author Dmitry Avdeev
|
||||
* Date: 1/19/12
|
||||
*/
|
||||
public class RegisterExtensionFixProvider implements UnusedDeclarationFixProvider {
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public IntentionAction[] getQuickFixes(PsiElement element) {
|
||||
if (!(element instanceof PsiIdentifier)) return IntentionAction.EMPTY_ARRAY;
|
||||
PsiElement parent = element.getParent();
|
||||
if (!(parent instanceof PsiClass)) return IntentionAction.EMPTY_ARRAY;
|
||||
PsiClass parentClass = (PsiClass)parent;
|
||||
if (InheritanceUtil.isInheritor(parentClass, LocalInspectionTool.class.getName())) {
|
||||
return new IntentionAction[] { new RegisterInspectionFix(parentClass, LocalInspectionEP.LOCAL_INSPECTION) };
|
||||
}
|
||||
if (InheritanceUtil.isInheritor(parentClass, GlobalInspectionTool.class.getName())) {
|
||||
return new IntentionAction[] { new RegisterInspectionFix(parentClass, InspectionEP.GLOBAL_INSPECTION) };
|
||||
}
|
||||
PsiField epField = findEPNameField(parentClass);
|
||||
if (epField != null) {
|
||||
String epName = findEPNameForClass(epField.getContainingClass());
|
||||
if (epName != null) {
|
||||
return new IntentionAction[] { new RegisterExtensionFix(parentClass, epName) };
|
||||
}
|
||||
}
|
||||
return IntentionAction.EMPTY_ARRAY;
|
||||
}
|
||||
|
||||
private static String findEPNameForClass(PsiClass aClass) {
|
||||
GlobalSearchScope scope = GlobalSearchScope.getScopeRestrictedByFileTypes(ProjectScope.getAllScope(aClass.getProject()), XmlFileType.INSTANCE);
|
||||
for (PsiReference reference : ReferencesSearch.search(aClass, scope)) {
|
||||
XmlTag tag = PsiTreeUtil.getParentOfType(reference.getElement(), XmlTag.class);
|
||||
if (tag != null && "extensionPoint".equals(tag.getName())) {
|
||||
String qName = tag.getAttributeValue("qualifiedName");
|
||||
if (qName != null) {
|
||||
return qName;
|
||||
}
|
||||
String name = tag.getAttributeValue("name");
|
||||
if (name != null) {
|
||||
return "com.intellij." + name;
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
private static PsiField findEPNameField(PsiClass aClass) {
|
||||
for (PsiField field : aClass.getFields()) {
|
||||
if (field.getType() instanceof PsiClassType) {
|
||||
PsiClassType classType = (PsiClassType)field.getType();
|
||||
PsiClassType.ClassResolveResult resolved = classType.resolveGenerics();
|
||||
PsiClass fieldClass = resolved.getElement();
|
||||
if (fieldClass != null && ExtensionPointName.class.getName().equals(fieldClass.getQualifiedName())) {
|
||||
return field;
|
||||
}
|
||||
}
|
||||
}
|
||||
for (PsiClass superClass: aClass.getSupers()) {
|
||||
PsiField epField = findEPNameField(superClass);
|
||||
if (epField != null) {
|
||||
return epField;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user