mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Merge remote-tracking branch 'origin/master'
This commit is contained in:
Generated
+9
@@ -0,0 +1,9 @@
|
||||
<component name="libraryTable">
|
||||
<library name="nekohtml">
|
||||
<CLASSES>
|
||||
<root url="jar://$PROJECT_DIR$/lib/nekohtml-1.9.14.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
</library>
|
||||
</component>
|
||||
+1
-1
@@ -10,7 +10,7 @@
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
<orderEntry type="library" exported="" name="Groovy" level="project" />
|
||||
<orderEntry type="library" exported="" name="Ant" level="project" />
|
||||
<orderEntry type="library" scope="RUNTIME" name="asm4" level="project" />
|
||||
<orderEntry type="library" scope="RUNTIME" name="asm5" level="project" />
|
||||
<orderEntry type="library" exported="" scope="RUNTIME" name="cli-parser" level="project" />
|
||||
<orderEntry type="library" scope="RUNTIME" name="JDOM" level="project" />
|
||||
<orderEntry type="library" scope="RUNTIME" name="Netty" level="project" />
|
||||
|
||||
@@ -41,37 +41,43 @@ private pass(String prop) {
|
||||
target('run_tests': 'Run java tests') {
|
||||
depends([compile])
|
||||
|
||||
ant.junit(fork: "yes", showoutput: "true", logfailedtests:false) {
|
||||
pass("idea.test.group")
|
||||
pass("idea.test.patterns")
|
||||
pass("idea.fast.only")
|
||||
pass("teamcity.build.tempDir")
|
||||
pass("teamcity.tests.recentlyFailedTests.file")
|
||||
jvmarg (value: "-Didea.platform.prefix=Idea")
|
||||
jvmarg (value: "-Djava.system.class.loader=com.intellij.util.lang.UrlClassLoader")
|
||||
def classpathFile = "$home/junit.classpath"
|
||||
List<String> testRuntimeClasspath = projectBuilder.moduleRuntimeClasspath(findModule("community-main"), true)
|
||||
new File(classpathFile).text = testRuntimeClasspath.findAll({ new File((String)it).exists() }).join('\n')
|
||||
|
||||
System.getProperties().entrySet().each {
|
||||
if (it.key.startsWith("pass.")) {
|
||||
def trimmed = it.key.substring("pass.".length());
|
||||
jvmarg(value: "-D${trimmed}=${it.value}");
|
||||
};
|
||||
}
|
||||
testcases.each { testCase ->
|
||||
ant.junit(fork: "yes", showoutput: "true", logfailedtests: false) {
|
||||
jvmarg(value: "-Dclasspath.file=${classpathFile}")
|
||||
pass("idea.test.group")
|
||||
pass("idea.test.patterns")
|
||||
pass("idea.fast.only")
|
||||
pass("teamcity.build.tempDir")
|
||||
pass("teamcity.tests.recentlyFailedTests.file")
|
||||
jvmarg(value: "-Didea.platform.prefix=Idea")
|
||||
|
||||
commonJvmArgs().each { jvmarg(value: it) }
|
||||
|
||||
if (isDefined("jvm_args")) {
|
||||
jvm_args.each { jvmarg(value: it) }
|
||||
}
|
||||
|
||||
classpath {
|
||||
projectBuilder.moduleRuntimeClasspath(findModule("community-main"), true).each {
|
||||
pathelement(location: it)
|
||||
System.getProperties().entrySet().each {
|
||||
if (it.key.startsWith("pass.")) {
|
||||
def trimmed = it.key.substring("pass.".length());
|
||||
jvmarg(value: "-D${trimmed}=${it.value}");
|
||||
};
|
||||
}
|
||||
pathelement(location: "${jdkHome}/lib/tools.jar")
|
||||
}
|
||||
|
||||
testcases.each {
|
||||
test (name: it)
|
||||
commonJvmArgs().each { jvmarg(value: it) }
|
||||
|
||||
jvmarg(value: "-Dbootstrap.testcases=$testCase")
|
||||
|
||||
if (isDefined("jvm_args")) {
|
||||
jvm_args.each { jvmarg(value: it) }
|
||||
}
|
||||
|
||||
classpath {
|
||||
projectBuilder.moduleRuntimeClasspath(findModule("tests_bootstrap"), false).each {
|
||||
pathelement(location: it)
|
||||
}
|
||||
pathelement(location: "${jdkHome}/lib/tools.jar")
|
||||
}
|
||||
|
||||
test(name: 'com.intellij.tests.BootstrapTests')
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
<orderEntry type="library" name="JDOM" level="project" />
|
||||
<orderEntry type="module" module-name="forms_rt" />
|
||||
<orderEntry type="library" name="asm4" level="project" />
|
||||
<orderEntry type="library" name="asm5" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="JUnit3" level="project" />
|
||||
<orderEntry type="library" name="jgoodies-forms" level="project" />
|
||||
<orderEntry type="module" module-name="instrumentation-util" exported="" />
|
||||
|
||||
+12
-12
@@ -19,10 +19,10 @@ import com.intellij.compiler.instrumentation.InstrumentationClassFinder;
|
||||
import com.intellij.uiDesigner.UIFormXmlConstants;
|
||||
import com.intellij.uiDesigner.lw.*;
|
||||
import com.intellij.uiDesigner.shared.BorderType;
|
||||
import org.jetbrains.asm4.*;
|
||||
import org.jetbrains.asm4.Label;
|
||||
import org.jetbrains.asm4.commons.GeneratorAdapter;
|
||||
import org.jetbrains.asm4.commons.Method;
|
||||
import org.jetbrains.org.objectweb.asm.*;
|
||||
import org.jetbrains.org.objectweb.asm.Label;
|
||||
import org.jetbrains.org.objectweb.asm.commons.GeneratorAdapter;
|
||||
import org.jetbrains.org.objectweb.asm.commons.Method;
|
||||
|
||||
import javax.swing.*;
|
||||
import javax.swing.border.Border;
|
||||
@@ -235,7 +235,7 @@ public class AsmCodeGenerator {
|
||||
private final boolean myExplicitSetupCall;
|
||||
|
||||
public FormClassVisitor(final ClassVisitor cv, final boolean explicitSetupCall) {
|
||||
super(Opcodes.ASM4, cv);
|
||||
super(Opcodes.ASM5, cv);
|
||||
myExplicitSetupCall = explicitSetupCall;
|
||||
}
|
||||
|
||||
@@ -307,7 +307,7 @@ public class AsmCodeGenerator {
|
||||
if (haveCustomCreateComponents && myHaveCreateComponentsMethod) {
|
||||
generator.visitVarInsn(Opcodes.ALOAD, 0);
|
||||
int opcode = myCreateComponentsAccess == Opcodes.ACC_PRIVATE ? Opcodes.INVOKESPECIAL : Opcodes.INVOKEVIRTUAL;
|
||||
generator.visitMethodInsn(opcode, myClassName, CREATE_COMPONENTS_METHOD_NAME, "()V");
|
||||
generator.visitMethodInsn(opcode, myClassName, CREATE_COMPONENTS_METHOD_NAME, "()V", false);
|
||||
}
|
||||
buildSetupMethod(generator);
|
||||
|
||||
@@ -902,7 +902,7 @@ public class AsmCodeGenerator {
|
||||
private boolean mySuperCalled = false;
|
||||
|
||||
public FormConstructorVisitor(final MethodVisitor mv, final String className, final String superName) {
|
||||
super(Opcodes.ASM4, mv);
|
||||
super(Opcodes.ASM5, mv);
|
||||
myClassName = className;
|
||||
mySuperName = superName;
|
||||
}
|
||||
@@ -914,7 +914,7 @@ public class AsmCodeGenerator {
|
||||
super.visitFieldInsn(opcode, owner, name, desc);
|
||||
}
|
||||
|
||||
public void visitMethodInsn(final int opcode, final String owner, final String name, final String desc) {
|
||||
public void visitMethodInsn(final int opcode, final String owner, final String name, final String desc, boolean itf) {
|
||||
if (opcode == Opcodes.INVOKESPECIAL && name.equals(CONSTRUCTOR_NAME)) {
|
||||
if (owner.equals(myClassName)) {
|
||||
callsSelfConstructor = true;
|
||||
@@ -929,7 +929,7 @@ public class AsmCodeGenerator {
|
||||
else if (mySuperCalled) {
|
||||
callSetupUI();
|
||||
}
|
||||
super.visitMethodInsn(opcode, owner, name, desc);
|
||||
super.visitMethodInsn(opcode, owner, name, desc, itf);
|
||||
}
|
||||
|
||||
public void visitJumpInsn(final int opcode, final Label label) {
|
||||
@@ -942,7 +942,7 @@ public class AsmCodeGenerator {
|
||||
private void callSetupUI() {
|
||||
if (!mySetupCalled) {
|
||||
mv.visitVarInsn(Opcodes.ALOAD, 0);
|
||||
mv.visitMethodInsn(Opcodes.INVOKESPECIAL, myClassName, SETUP_METHOD_NAME, "()V");
|
||||
mv.visitMethodInsn(Opcodes.INVOKESPECIAL, myClassName, SETUP_METHOD_NAME, "()V", false);
|
||||
mySetupCalled = true;
|
||||
}
|
||||
}
|
||||
@@ -959,7 +959,7 @@ public class AsmCodeGenerator {
|
||||
private boolean myExplicitSetupCall = false;
|
||||
|
||||
public FirstPassClassVisitor() {
|
||||
super(Opcodes.ASM4, new ClassVisitor(Opcodes.ASM4){});
|
||||
super(Opcodes.ASM5, new ClassVisitor(Opcodes.ASM5){});
|
||||
}
|
||||
|
||||
public MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions) {
|
||||
@@ -975,7 +975,7 @@ public class AsmCodeGenerator {
|
||||
|
||||
private class FirstPassConstructorVisitor extends MethodVisitor {
|
||||
public FirstPassConstructorVisitor() {
|
||||
super(Opcodes.ASM4, new MethodVisitor(Opcodes.ASM4){});
|
||||
super(Opcodes.ASM5, new MethodVisitor(Opcodes.ASM5){});
|
||||
}
|
||||
|
||||
public void visitMethodInsn(final int opcode, final String owner, final String name, final String desc) {
|
||||
|
||||
+3
-3
@@ -17,9 +17,9 @@ package com.intellij.uiDesigner.compiler;
|
||||
|
||||
import com.intellij.uiDesigner.UIFormXmlConstants;
|
||||
import com.intellij.uiDesigner.lw.LwComponent;
|
||||
import org.jetbrains.asm4.Type;
|
||||
import org.jetbrains.asm4.commons.GeneratorAdapter;
|
||||
import org.jetbrains.asm4.commons.Method;
|
||||
import org.jetbrains.org.objectweb.asm.Type;
|
||||
import org.jetbrains.org.objectweb.asm.commons.GeneratorAdapter;
|
||||
import org.jetbrains.org.objectweb.asm.commons.Method;
|
||||
|
||||
import java.awt.*;
|
||||
|
||||
|
||||
+3
-3
@@ -16,9 +16,9 @@
|
||||
package com.intellij.uiDesigner.compiler;
|
||||
|
||||
import com.intellij.uiDesigner.lw.ColorDescriptor;
|
||||
import org.jetbrains.asm4.Type;
|
||||
import org.jetbrains.asm4.commons.GeneratorAdapter;
|
||||
import org.jetbrains.asm4.commons.Method;
|
||||
import org.jetbrains.org.objectweb.asm.Type;
|
||||
import org.jetbrains.org.objectweb.asm.commons.GeneratorAdapter;
|
||||
import org.jetbrains.org.objectweb.asm.commons.Method;
|
||||
|
||||
import java.awt.*;
|
||||
|
||||
|
||||
+3
-3
@@ -15,9 +15,9 @@
|
||||
*/
|
||||
package com.intellij.uiDesigner.compiler;
|
||||
|
||||
import org.jetbrains.asm4.Type;
|
||||
import org.jetbrains.asm4.commons.GeneratorAdapter;
|
||||
import org.jetbrains.asm4.commons.Method;
|
||||
import org.jetbrains.org.objectweb.asm.Type;
|
||||
import org.jetbrains.org.objectweb.asm.commons.GeneratorAdapter;
|
||||
import org.jetbrains.org.objectweb.asm.commons.Method;
|
||||
|
||||
import java.awt.*;
|
||||
|
||||
|
||||
+2
-2
@@ -16,8 +16,8 @@
|
||||
|
||||
package com.intellij.uiDesigner.compiler;
|
||||
|
||||
import org.jetbrains.asm4.Type;
|
||||
import org.jetbrains.asm4.commons.GeneratorAdapter;
|
||||
import org.jetbrains.org.objectweb.asm.Type;
|
||||
import org.jetbrains.org.objectweb.asm.commons.GeneratorAdapter;
|
||||
|
||||
/**
|
||||
* @author yole
|
||||
|
||||
+3
-3
@@ -18,9 +18,9 @@ package com.intellij.uiDesigner.compiler;
|
||||
|
||||
import com.intellij.uiDesigner.lw.LwComponent;
|
||||
import com.intellij.uiDesigner.lw.LwContainer;
|
||||
import org.jetbrains.asm4.Type;
|
||||
import org.jetbrains.asm4.commons.GeneratorAdapter;
|
||||
import org.jetbrains.asm4.commons.Method;
|
||||
import org.jetbrains.org.objectweb.asm.Type;
|
||||
import org.jetbrains.org.objectweb.asm.commons.GeneratorAdapter;
|
||||
import org.jetbrains.org.objectweb.asm.commons.Method;
|
||||
|
||||
import java.awt.*;
|
||||
|
||||
|
||||
+3
-3
@@ -19,9 +19,9 @@ import com.intellij.compiler.instrumentation.InstrumentationClassFinder;
|
||||
import com.intellij.uiDesigner.lw.FontDescriptor;
|
||||
import com.intellij.uiDesigner.lw.LwComponent;
|
||||
import com.intellij.uiDesigner.lw.LwIntrospectedProperty;
|
||||
import org.jetbrains.asm4.Type;
|
||||
import org.jetbrains.asm4.commons.GeneratorAdapter;
|
||||
import org.jetbrains.asm4.commons.Method;
|
||||
import org.jetbrains.org.objectweb.asm.Type;
|
||||
import org.jetbrains.org.objectweb.asm.commons.GeneratorAdapter;
|
||||
import org.jetbrains.org.objectweb.asm.commons.Method;
|
||||
|
||||
import java.awt.*;
|
||||
|
||||
|
||||
+4
-4
@@ -21,10 +21,10 @@ import com.intellij.uiDesigner.lw.LwComponent;
|
||||
import com.intellij.uiDesigner.lw.LwContainer;
|
||||
import com.jgoodies.forms.layout.CellConstraints;
|
||||
import com.jgoodies.forms.layout.FormLayout;
|
||||
import org.jetbrains.asm4.Opcodes;
|
||||
import org.jetbrains.asm4.Type;
|
||||
import org.jetbrains.asm4.commons.GeneratorAdapter;
|
||||
import org.jetbrains.asm4.commons.Method;
|
||||
import org.jetbrains.org.objectweb.asm.Opcodes;
|
||||
import org.jetbrains.org.objectweb.asm.Type;
|
||||
import org.jetbrains.org.objectweb.asm.commons.GeneratorAdapter;
|
||||
import org.jetbrains.org.objectweb.asm.commons.Method;
|
||||
|
||||
import java.awt.*;
|
||||
|
||||
|
||||
+3
-3
@@ -18,9 +18,9 @@ package com.intellij.uiDesigner.compiler;
|
||||
import com.intellij.uiDesigner.core.Spacer;
|
||||
import com.intellij.uiDesigner.lw.LwComponent;
|
||||
import com.intellij.uiDesigner.lw.LwContainer;
|
||||
import org.jetbrains.asm4.Type;
|
||||
import org.jetbrains.asm4.commons.GeneratorAdapter;
|
||||
import org.jetbrains.asm4.commons.Method;
|
||||
import org.jetbrains.org.objectweb.asm.Type;
|
||||
import org.jetbrains.org.objectweb.asm.commons.GeneratorAdapter;
|
||||
import org.jetbrains.org.objectweb.asm.commons.Method;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.awt.*;
|
||||
|
||||
+3
-3
@@ -19,9 +19,9 @@ import com.intellij.uiDesigner.core.GridConstraints;
|
||||
import com.intellij.uiDesigner.core.GridLayoutManager;
|
||||
import com.intellij.uiDesigner.lw.LwComponent;
|
||||
import com.intellij.uiDesigner.lw.LwContainer;
|
||||
import org.jetbrains.asm4.Type;
|
||||
import org.jetbrains.asm4.commons.GeneratorAdapter;
|
||||
import org.jetbrains.asm4.commons.Method;
|
||||
import org.jetbrains.org.objectweb.asm.Type;
|
||||
import org.jetbrains.org.objectweb.asm.commons.GeneratorAdapter;
|
||||
import org.jetbrains.org.objectweb.asm.commons.Method;
|
||||
|
||||
/**
|
||||
* @author yole
|
||||
|
||||
+3
-3
@@ -16,9 +16,9 @@
|
||||
package com.intellij.uiDesigner.compiler;
|
||||
|
||||
import com.intellij.uiDesigner.lw.IconDescriptor;
|
||||
import org.jetbrains.asm4.Type;
|
||||
import org.jetbrains.asm4.commons.GeneratorAdapter;
|
||||
import org.jetbrains.asm4.commons.Method;
|
||||
import org.jetbrains.org.objectweb.asm.Type;
|
||||
import org.jetbrains.org.objectweb.asm.commons.GeneratorAdapter;
|
||||
import org.jetbrains.org.objectweb.asm.commons.Method;
|
||||
|
||||
import javax.swing.*;
|
||||
|
||||
|
||||
+3
-3
@@ -15,9 +15,9 @@
|
||||
*/
|
||||
package com.intellij.uiDesigner.compiler;
|
||||
|
||||
import org.jetbrains.asm4.Type;
|
||||
import org.jetbrains.asm4.commons.GeneratorAdapter;
|
||||
import org.jetbrains.asm4.commons.Method;
|
||||
import org.jetbrains.org.objectweb.asm.Type;
|
||||
import org.jetbrains.org.objectweb.asm.commons.GeneratorAdapter;
|
||||
import org.jetbrains.org.objectweb.asm.commons.Method;
|
||||
|
||||
import java.awt.*;
|
||||
|
||||
|
||||
+4
-4
@@ -17,10 +17,10 @@ package com.intellij.uiDesigner.compiler;
|
||||
|
||||
import com.intellij.uiDesigner.lw.LwComponent;
|
||||
import com.intellij.uiDesigner.lw.LwContainer;
|
||||
import org.jetbrains.asm4.Opcodes;
|
||||
import org.jetbrains.asm4.Type;
|
||||
import org.jetbrains.asm4.commons.GeneratorAdapter;
|
||||
import org.jetbrains.asm4.commons.Method;
|
||||
import org.jetbrains.org.objectweb.asm.Opcodes;
|
||||
import org.jetbrains.org.objectweb.asm.Type;
|
||||
import org.jetbrains.org.objectweb.asm.commons.GeneratorAdapter;
|
||||
import org.jetbrains.org.objectweb.asm.commons.Method;
|
||||
|
||||
import java.awt.*;
|
||||
|
||||
|
||||
+3
-3
@@ -16,9 +16,9 @@
|
||||
|
||||
package com.intellij.uiDesigner.compiler;
|
||||
|
||||
import org.jetbrains.asm4.Type;
|
||||
import org.jetbrains.asm4.commons.GeneratorAdapter;
|
||||
import org.jetbrains.asm4.commons.Method;
|
||||
import org.jetbrains.org.objectweb.asm.Type;
|
||||
import org.jetbrains.org.objectweb.asm.commons.GeneratorAdapter;
|
||||
import org.jetbrains.org.objectweb.asm.commons.Method;
|
||||
|
||||
/**
|
||||
* @author yole
|
||||
|
||||
+1
-1
@@ -18,7 +18,7 @@ package com.intellij.uiDesigner.compiler;
|
||||
import com.intellij.compiler.instrumentation.InstrumentationClassFinder;
|
||||
import com.intellij.uiDesigner.lw.LwComponent;
|
||||
import com.intellij.uiDesigner.lw.LwIntrospectedProperty;
|
||||
import org.jetbrains.asm4.commons.GeneratorAdapter;
|
||||
import org.jetbrains.org.objectweb.asm.commons.GeneratorAdapter;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
|
||||
+3
-3
@@ -15,9 +15,9 @@
|
||||
*/
|
||||
package com.intellij.uiDesigner.compiler;
|
||||
|
||||
import org.jetbrains.asm4.Type;
|
||||
import org.jetbrains.asm4.commons.GeneratorAdapter;
|
||||
import org.jetbrains.asm4.commons.Method;
|
||||
import org.jetbrains.org.objectweb.asm.Type;
|
||||
import org.jetbrains.org.objectweb.asm.commons.GeneratorAdapter;
|
||||
import org.jetbrains.org.objectweb.asm.commons.Method;
|
||||
|
||||
import java.awt.*;
|
||||
|
||||
|
||||
+3
-3
@@ -17,9 +17,9 @@
|
||||
package com.intellij.uiDesigner.compiler;
|
||||
|
||||
import com.intellij.uiDesigner.lw.LwComponent;
|
||||
import org.jetbrains.asm4.Type;
|
||||
import org.jetbrains.asm4.commons.GeneratorAdapter;
|
||||
import org.jetbrains.asm4.commons.Method;
|
||||
import org.jetbrains.org.objectweb.asm.Type;
|
||||
import org.jetbrains.org.objectweb.asm.commons.GeneratorAdapter;
|
||||
import org.jetbrains.org.objectweb.asm.commons.Method;
|
||||
|
||||
import javax.swing.*;
|
||||
|
||||
|
||||
+3
-3
@@ -18,9 +18,9 @@ package com.intellij.uiDesigner.compiler;
|
||||
|
||||
import com.intellij.uiDesigner.lw.LwComponent;
|
||||
import com.intellij.uiDesigner.lw.LwContainer;
|
||||
import org.jetbrains.asm4.Type;
|
||||
import org.jetbrains.asm4.commons.GeneratorAdapter;
|
||||
import org.jetbrains.asm4.commons.Method;
|
||||
import org.jetbrains.org.objectweb.asm.Type;
|
||||
import org.jetbrains.org.objectweb.asm.commons.GeneratorAdapter;
|
||||
import org.jetbrains.org.objectweb.asm.commons.Method;
|
||||
|
||||
/**
|
||||
* Layout code generator shared between BorderLayout and CardLayout.
|
||||
|
||||
+3
-3
@@ -17,9 +17,9 @@ package com.intellij.uiDesigner.compiler;
|
||||
|
||||
import com.intellij.uiDesigner.lw.LwComponent;
|
||||
import com.intellij.uiDesigner.lw.LwSplitPane;
|
||||
import org.jetbrains.asm4.Type;
|
||||
import org.jetbrains.asm4.commons.GeneratorAdapter;
|
||||
import org.jetbrains.asm4.commons.Method;
|
||||
import org.jetbrains.org.objectweb.asm.Type;
|
||||
import org.jetbrains.org.objectweb.asm.commons.GeneratorAdapter;
|
||||
import org.jetbrains.org.objectweb.asm.commons.Method;
|
||||
|
||||
import javax.swing.*;
|
||||
|
||||
|
||||
+19
-19
@@ -20,12 +20,12 @@ import com.intellij.uiDesigner.core.SupportCode;
|
||||
import com.intellij.uiDesigner.lw.LwComponent;
|
||||
import com.intellij.uiDesigner.lw.LwIntrospectedProperty;
|
||||
import com.intellij.uiDesigner.lw.StringDescriptor;
|
||||
import org.jetbrains.asm4.Label;
|
||||
import org.jetbrains.asm4.MethodVisitor;
|
||||
import org.jetbrains.asm4.Opcodes;
|
||||
import org.jetbrains.asm4.Type;
|
||||
import org.jetbrains.asm4.commons.GeneratorAdapter;
|
||||
import org.jetbrains.asm4.commons.Method;
|
||||
import org.jetbrains.org.objectweb.asm.Label;
|
||||
import org.jetbrains.org.objectweb.asm.MethodVisitor;
|
||||
import org.jetbrains.org.objectweb.asm.Opcodes;
|
||||
import org.jetbrains.org.objectweb.asm.Type;
|
||||
import org.jetbrains.org.objectweb.asm.commons.GeneratorAdapter;
|
||||
import org.jetbrains.org.objectweb.asm.commons.Method;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.io.IOException;
|
||||
@@ -164,7 +164,7 @@ public class StringPropertyCodeGenerator extends PropertyCodeGenerator implement
|
||||
mv.visitCode();
|
||||
mv.visitTypeInsn(NEW, "java/lang/StringBuffer");
|
||||
mv.visitInsn(DUP);
|
||||
mv.visitMethodInsn(INVOKESPECIAL, "java/lang/StringBuffer", "<init>", "()V");
|
||||
mv.visitMethodInsn(INVOKESPECIAL, "java/lang/StringBuffer", "<init>", "()V", false);
|
||||
mv.visitVarInsn(ASTORE, 3);
|
||||
mv.visitInsn(ICONST_0);
|
||||
mv.visitVarInsn(ISTORE, 4);
|
||||
@@ -178,19 +178,19 @@ public class StringPropertyCodeGenerator extends PropertyCodeGenerator implement
|
||||
mv.visitLabel(l0);
|
||||
mv.visitVarInsn(ILOAD, 7);
|
||||
mv.visitVarInsn(ALOAD, 2);
|
||||
mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/String", "length", "()I");
|
||||
mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/String", "length", "()I", false);
|
||||
Label l1 = new Label();
|
||||
mv.visitJumpInsn(IF_ICMPGE, l1);
|
||||
mv.visitVarInsn(ALOAD, 2);
|
||||
mv.visitVarInsn(ILOAD, 7);
|
||||
mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/String", "charAt", "(I)C");
|
||||
mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/String", "charAt", "(I)C", false);
|
||||
mv.visitIntInsn(BIPUSH, 38);
|
||||
Label l2 = new Label();
|
||||
mv.visitJumpInsn(IF_ICMPNE, l2);
|
||||
mv.visitIincInsn(7, 1);
|
||||
mv.visitVarInsn(ILOAD, 7);
|
||||
mv.visitVarInsn(ALOAD, 2);
|
||||
mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/String", "length", "()I");
|
||||
mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/String", "length", "()I", false);
|
||||
Label l3 = new Label();
|
||||
mv.visitJumpInsn(IF_ICMPNE, l3);
|
||||
mv.visitJumpInsn(GOTO, l1);
|
||||
@@ -199,42 +199,42 @@ public class StringPropertyCodeGenerator extends PropertyCodeGenerator implement
|
||||
mv.visitJumpInsn(IFNE, l2);
|
||||
mv.visitVarInsn(ALOAD, 2);
|
||||
mv.visitVarInsn(ILOAD, 7);
|
||||
mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/String", "charAt", "(I)C");
|
||||
mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/String", "charAt", "(I)C", false);
|
||||
mv.visitIntInsn(BIPUSH, 38);
|
||||
mv.visitJumpInsn(IF_ICMPEQ, l2);
|
||||
mv.visitInsn(ICONST_1);
|
||||
mv.visitVarInsn(ISTORE, 4);
|
||||
mv.visitVarInsn(ALOAD, 2);
|
||||
mv.visitVarInsn(ILOAD, 7);
|
||||
mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/String", "charAt", "(I)C");
|
||||
mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/String", "charAt", "(I)C", false);
|
||||
mv.visitVarInsn(ISTORE, 5);
|
||||
mv.visitVarInsn(ALOAD, 3);
|
||||
mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/StringBuffer", "length", "()I");
|
||||
mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/StringBuffer", "length", "()I", false);
|
||||
mv.visitVarInsn(ISTORE, 6);
|
||||
mv.visitLabel(l2);
|
||||
mv.visitVarInsn(ALOAD, 3);
|
||||
mv.visitVarInsn(ALOAD, 2);
|
||||
mv.visitVarInsn(ILOAD, 7);
|
||||
mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/String", "charAt", "(I)C");
|
||||
mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/StringBuffer", "append", "(C)Ljava/lang/StringBuffer;");
|
||||
mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/String", "charAt", "(I)C", false);
|
||||
mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/StringBuffer", "append", "(C)Ljava/lang/StringBuffer;", false);
|
||||
mv.visitInsn(POP);
|
||||
mv.visitIincInsn(7, 1);
|
||||
mv.visitJumpInsn(GOTO, l0);
|
||||
mv.visitLabel(l1);
|
||||
mv.visitVarInsn(ALOAD, 1);
|
||||
mv.visitVarInsn(ALOAD, 3);
|
||||
mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/StringBuffer", "toString", "()Ljava/lang/String;");
|
||||
mv.visitMethodInsn(INVOKEVIRTUAL, componentClass, "setText", "(Ljava/lang/String;)V");
|
||||
mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/StringBuffer", "toString", "()Ljava/lang/String;", false);
|
||||
mv.visitMethodInsn(INVOKEVIRTUAL, componentClass, "setText", "(Ljava/lang/String;)V", false);
|
||||
mv.visitVarInsn(ILOAD, 4);
|
||||
Label l4 = new Label();
|
||||
mv.visitJumpInsn(IFEQ, l4);
|
||||
mv.visitVarInsn(ALOAD, 1);
|
||||
mv.visitVarInsn(ILOAD, 5);
|
||||
mv.visitMethodInsn(INVOKEVIRTUAL, componentClass, setMnemonicMethodName, "(C)V");
|
||||
mv.visitMethodInsn(INVOKEVIRTUAL, componentClass, setMnemonicMethodName, "(C)V", false);
|
||||
if (myHaveSetDisplayedMnemonicIndex) {
|
||||
mv.visitVarInsn(ALOAD, 1);
|
||||
mv.visitVarInsn(ILOAD, 6);
|
||||
mv.visitMethodInsn(INVOKEVIRTUAL, componentClass, "setDisplayedMnemonicIndex", "(I)V");
|
||||
mv.visitMethodInsn(INVOKEVIRTUAL, componentClass, "setDisplayedMnemonicIndex", "(I)V", false);
|
||||
}
|
||||
mv.visitLabel(l4);
|
||||
mv.visitInsn(RETURN);
|
||||
|
||||
+3
-3
@@ -17,9 +17,9 @@ package com.intellij.uiDesigner.compiler;
|
||||
|
||||
import com.intellij.uiDesigner.lw.LwComponent;
|
||||
import com.intellij.uiDesigner.lw.LwTabbedPane;
|
||||
import org.jetbrains.asm4.Type;
|
||||
import org.jetbrains.asm4.commons.GeneratorAdapter;
|
||||
import org.jetbrains.asm4.commons.Method;
|
||||
import org.jetbrains.org.objectweb.asm.Type;
|
||||
import org.jetbrains.org.objectweb.asm.commons.GeneratorAdapter;
|
||||
import org.jetbrains.org.objectweb.asm.commons.Method;
|
||||
|
||||
import javax.swing.*;
|
||||
|
||||
|
||||
+2
-2
@@ -17,8 +17,8 @@
|
||||
package com.intellij.uiDesigner.compiler;
|
||||
|
||||
import com.intellij.uiDesigner.lw.LwComponent;
|
||||
import org.jetbrains.asm4.commons.GeneratorAdapter;
|
||||
import org.jetbrains.asm4.commons.Method;
|
||||
import org.jetbrains.org.objectweb.asm.commons.GeneratorAdapter;
|
||||
import org.jetbrains.org.objectweb.asm.commons.Method;
|
||||
|
||||
/**
|
||||
* @author yole
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
<orderEntry type="library" name="Trove4j" level="project" />
|
||||
<orderEntry type="module" module-name="java-runtime" />
|
||||
<orderEntry type="module" module-name="instrumentation-util" />
|
||||
<orderEntry type="library" name="asm4" level="project" />
|
||||
<orderEntry type="library" name="asm5" level="project" />
|
||||
<orderEntry type="library" name="Eclipse" level="project" />
|
||||
<orderEntry type="module" module-name="platform-api" />
|
||||
<orderEntry type="module" module-name="lang-impl" />
|
||||
|
||||
@@ -27,7 +27,7 @@ import com.intellij.psi.PsiClass;
|
||||
import com.intellij.psi.PsiManager;
|
||||
import com.intellij.psi.util.ClassUtil;
|
||||
import org.jetbrains.annotations.NonNls;
|
||||
import org.jetbrains.asm4.ClassWriter;
|
||||
import org.jetbrains.org.objectweb.asm.ClassWriter;
|
||||
|
||||
/**
|
||||
* @author yole
|
||||
|
||||
+4
-7
@@ -15,14 +15,11 @@
|
||||
*/
|
||||
package com.intellij.compiler.classFilesIndex.chainsSearch.context;
|
||||
|
||||
import com.intellij.psi.*;
|
||||
import com.intellij.util.containers.ContainerUtil;
|
||||
import com.intellij.psi.PsiArrayType;
|
||||
import com.intellij.psi.PsiClass;
|
||||
import com.intellij.psi.PsiClassType;
|
||||
import com.intellij.psi.PsiType;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import org.jetbrains.asm4.Type;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author Dmitry Batkovich
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
<orderEntry type="library" name="asm4" level="project" />
|
||||
<orderEntry type="library" name="asm5" level="project" />
|
||||
</component>
|
||||
</module>
|
||||
|
||||
|
||||
+5
-5
@@ -1,9 +1,9 @@
|
||||
package com.intellij.compiler.instrumentation;
|
||||
|
||||
import org.jetbrains.asm4.ClassReader;
|
||||
import org.jetbrains.asm4.ClassVisitor;
|
||||
import org.jetbrains.asm4.MethodVisitor;
|
||||
import org.jetbrains.asm4.Opcodes;
|
||||
import org.jetbrains.org.objectweb.asm.ClassReader;
|
||||
import org.jetbrains.org.objectweb.asm.ClassVisitor;
|
||||
import org.jetbrains.org.objectweb.asm.MethodVisitor;
|
||||
import org.jetbrains.org.objectweb.asm.Opcodes;
|
||||
import sun.misc.Resource;
|
||||
|
||||
import java.io.*;
|
||||
@@ -415,7 +415,7 @@ public class InstrumentationClassFinder {
|
||||
private final List<PseudoMethod> myMethods = new ArrayList<PseudoMethod>();
|
||||
|
||||
private V() {
|
||||
super(Opcodes.ASM4);
|
||||
super(Opcodes.ASM5);
|
||||
}
|
||||
|
||||
public MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions) {
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
package com.intellij.compiler.instrumentation;
|
||||
|
||||
import org.jetbrains.asm4.ClassWriter;
|
||||
import org.jetbrains.org.objectweb.asm.ClassWriter;
|
||||
|
||||
/**
|
||||
* @author Eugene Zhuravlev
|
||||
|
||||
+8
-8
@@ -15,7 +15,7 @@
|
||||
*/
|
||||
package com.intellij.compiler.notNullVerification;
|
||||
|
||||
import org.jetbrains.asm4.*;
|
||||
import org.jetbrains.org.objectweb.asm.*;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.LinkedHashMap;
|
||||
@@ -50,7 +50,7 @@ public class NotNullVerifyingInstrumenter extends ClassVisitor implements Opcode
|
||||
private RuntimeException myPostponedError;
|
||||
|
||||
private NotNullVerifyingInstrumenter(final ClassVisitor classVisitor, ClassReader reader) {
|
||||
super(Opcodes.ASM4, classVisitor);
|
||||
super(Opcodes.ASM5, classVisitor);
|
||||
myMethodParamNames = getAllParameterNames(reader);
|
||||
}
|
||||
|
||||
@@ -63,7 +63,7 @@ public class NotNullVerifyingInstrumenter extends ClassVisitor implements Opcode
|
||||
private static Map<String, Map<Integer, String>> getAllParameterNames(ClassReader reader) {
|
||||
final Map<String, Map<Integer, String>> methodParamNames = new LinkedHashMap<String, Map<Integer, String>>();
|
||||
|
||||
reader.accept(new ClassVisitor(Opcodes.ASM4) {
|
||||
reader.accept(new ClassVisitor(Opcodes.ASM5) {
|
||||
private String myClassName = null;
|
||||
|
||||
public void visit(final int version, final int access, final String name, final String signature, final String superName, final String[] interfaces) {
|
||||
@@ -106,7 +106,7 @@ public class NotNullVerifyingInstrumenter extends ClassVisitor implements Opcode
|
||||
final Type returnType = Type.getReturnType(desc);
|
||||
final MethodVisitor v = cv.visitMethod(access, name, desc, signature, exceptions);
|
||||
final Map<Integer, String> paramNames = myMethodParamNames.get(myClassName + '.' + name + desc);
|
||||
return new MethodVisitor(Opcodes.ASM4, v) {
|
||||
return new MethodVisitor(Opcodes.ASM5, v) {
|
||||
|
||||
private final List<Integer> myNotNullParams = new ArrayList<Integer>();
|
||||
private int mySyntheticCount = 0;
|
||||
@@ -118,7 +118,7 @@ public class NotNullVerifyingInstrumenter extends ClassVisitor implements Opcode
|
||||
AnnotationVisitor av = mv.visitParameterAnnotation(parameter, anno, visible);
|
||||
if (isReferenceType(args[parameter]) && anno.equals(NOT_NULL_TYPE)) {
|
||||
myNotNullParams.add(new Integer(parameter));
|
||||
av = new AnnotationVisitor(Opcodes.ASM4, av) {
|
||||
av = new AnnotationVisitor(Opcodes.ASM5, av) {
|
||||
@Override
|
||||
public void visit(String methodName, Object o) {
|
||||
if(ANNOTATION_DEFAULT_METHOD.equals(methodName)) {
|
||||
@@ -144,7 +144,7 @@ public class NotNullVerifyingInstrumenter extends ClassVisitor implements Opcode
|
||||
AnnotationVisitor av = mv.visitAnnotation(anno, isRuntime);
|
||||
if (isReferenceType(returnType) && anno.equals(NOT_NULL_TYPE)) {
|
||||
myIsNotNull = true;
|
||||
av = new AnnotationVisitor(Opcodes.ASM4, av) {
|
||||
av = new AnnotationVisitor(Opcodes.ASM5, av) {
|
||||
@Override
|
||||
public void visit(String methodName, Object o) {
|
||||
if(ANNOTATION_DEFAULT_METHOD.equals(methodName)) {
|
||||
@@ -229,9 +229,9 @@ public class NotNullVerifyingInstrumenter extends ClassVisitor implements Opcode
|
||||
}
|
||||
|
||||
//noinspection SpellCheckingInspection
|
||||
mv.visitMethodInsn(INVOKESTATIC, STRING_CLASS_NAME, "format", "(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;");
|
||||
mv.visitMethodInsn(INVOKESTATIC, STRING_CLASS_NAME, "format", "(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;", false);
|
||||
|
||||
mv.visitMethodInsn(INVOKESPECIAL, exceptionClass, CONSTRUCTOR_NAME, EXCEPTION_INIT_SIGNATURE);
|
||||
mv.visitMethodInsn(INVOKESPECIAL, exceptionClass, CONSTRUCTOR_NAME, EXCEPTION_INIT_SIGNATURE, false);
|
||||
mv.visitInsn(ATHROW);
|
||||
mv.visitLabel(end);
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<orderEntry type="library" name="Ant" level="project" />
|
||||
<orderEntry type="module" module-name="forms-compiler" />
|
||||
<orderEntry type="module" module-name="forms_rt" />
|
||||
<orderEntry type="library" name="asm4" level="project" />
|
||||
<orderEntry type="library" name="asm5" level="project" />
|
||||
<orderEntry type="module" module-name="instrumentation-util" />
|
||||
</component>
|
||||
<component name="copyright">
|
||||
|
||||
@@ -25,10 +25,10 @@ import org.apache.tools.ant.BuildException;
|
||||
import org.apache.tools.ant.Project;
|
||||
import org.apache.tools.ant.taskdefs.Javac;
|
||||
import org.apache.tools.ant.types.Path;
|
||||
import org.jetbrains.asm4.ClassReader;
|
||||
import org.jetbrains.asm4.ClassVisitor;
|
||||
import org.jetbrains.asm4.ClassWriter;
|
||||
import org.jetbrains.asm4.Opcodes;
|
||||
import org.jetbrains.org.objectweb.asm.ClassReader;
|
||||
import org.jetbrains.org.objectweb.asm.ClassVisitor;
|
||||
import org.jetbrains.org.objectweb.asm.ClassWriter;
|
||||
import org.jetbrains.org.objectweb.asm.Opcodes;
|
||||
|
||||
import java.io.*;
|
||||
import java.net.MalformedURLException;
|
||||
@@ -462,7 +462,7 @@ public class Javac2 extends Javac {
|
||||
|
||||
private static int getClassFileVersion(ClassReader reader) {
|
||||
final int[] classfileVersion = new int[1];
|
||||
reader.accept(new ClassVisitor(Opcodes.ASM4) {
|
||||
reader.accept(new ClassVisitor(Opcodes.ASM5) {
|
||||
public void visit(int version, int access, String name, String signature, String superName, String[] interfaces) {
|
||||
classfileVersion[0] = version;
|
||||
}
|
||||
|
||||
+14
-3
@@ -25,12 +25,14 @@ import com.intellij.debugger.impl.DebuggerUtilsEx;
|
||||
import com.intellij.debugger.ui.DebuggerExpressionTextField;
|
||||
import com.intellij.debugger.ui.JavaDebuggerSupport;
|
||||
import com.intellij.debugger.ui.tree.render.*;
|
||||
import com.intellij.openapi.Disposable;
|
||||
import com.intellij.openapi.application.ApplicationManager;
|
||||
import com.intellij.openapi.application.ModalityState;
|
||||
import com.intellij.openapi.editor.Document;
|
||||
import com.intellij.openapi.options.ConfigurationException;
|
||||
import com.intellij.openapi.options.UnnamedConfigurable;
|
||||
import com.intellij.openapi.project.Project;
|
||||
import com.intellij.openapi.util.Disposer;
|
||||
import com.intellij.openapi.util.Pair;
|
||||
import com.intellij.psi.*;
|
||||
import com.intellij.psi.search.GlobalSearchScope;
|
||||
@@ -141,10 +143,17 @@ public class CompoundRendererConfigurable implements UnnamedConfigurable {
|
||||
}
|
||||
}
|
||||
}, myProject);
|
||||
myClassNameField.getEditorTextField().addFocusListener(new FocusAdapter() {
|
||||
final EditorTextField textField = myClassNameField.getEditorTextField();
|
||||
final FocusAdapter updateContextListener = new FocusAdapter() {
|
||||
public void focusLost(FocusEvent e) {
|
||||
final String qName = myClassNameField.getText();
|
||||
updateContext(qName);
|
||||
updateContext(myClassNameField.getText());
|
||||
}
|
||||
};
|
||||
textField.addFocusListener(updateContextListener);
|
||||
Disposer.register(myClassNameField, new Disposable() {
|
||||
@Override
|
||||
public void dispose() {
|
||||
textField.removeFocusListener(updateContextListener);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -388,10 +397,12 @@ public class CompoundRendererConfigurable implements UnnamedConfigurable {
|
||||
myChildrenEditor.dispose();
|
||||
myChildrenExpandedEditor.dispose();
|
||||
myListChildrenEditor.dispose();
|
||||
Disposer.dispose(myClassNameField);
|
||||
myLabelEditor = null;
|
||||
myChildrenEditor = null;
|
||||
myChildrenExpandedEditor = null;
|
||||
myListChildrenEditor = null;
|
||||
myClassNameField = null;
|
||||
myProject = null;
|
||||
}
|
||||
|
||||
|
||||
@@ -154,6 +154,11 @@ public abstract class AbstractProjectWizard extends AbstractWizard<ModuleWizardS
|
||||
|
||||
@Override
|
||||
protected final void doOKAction() {
|
||||
if (!doFinishAction()) return;
|
||||
super.doOKAction();
|
||||
}
|
||||
|
||||
public boolean doFinishAction() {
|
||||
int idx = getCurrentStep();
|
||||
try {
|
||||
do {
|
||||
@@ -162,7 +167,7 @@ public abstract class AbstractProjectWizard extends AbstractWizard<ModuleWizardS
|
||||
step.updateStep();
|
||||
}
|
||||
if (!commitStepData(step)) {
|
||||
return;
|
||||
return false;
|
||||
}
|
||||
step.onStepLeaving();
|
||||
try {
|
||||
@@ -170,18 +175,19 @@ public abstract class AbstractProjectWizard extends AbstractWizard<ModuleWizardS
|
||||
}
|
||||
catch (CommitStepException e) {
|
||||
handleCommitException(e);
|
||||
return;
|
||||
return false;
|
||||
}
|
||||
if (!isLastStep(idx)) {
|
||||
idx = getNextStep(idx);
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
for (ModuleWizardStep wizardStep : mySteps) {
|
||||
try {
|
||||
wizardStep.onWizardFinished();
|
||||
}
|
||||
catch (CommitStepException e) {
|
||||
handleCommitException(e);
|
||||
return;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
break;
|
||||
@@ -192,7 +198,7 @@ public abstract class AbstractProjectWizard extends AbstractWizard<ModuleWizardS
|
||||
myCurrentStep = idx;
|
||||
updateStep();
|
||||
}
|
||||
super.doOKAction();
|
||||
return true;
|
||||
}
|
||||
|
||||
private void handleCommitException(CommitStepException e) {
|
||||
|
||||
@@ -48,22 +48,14 @@
|
||||
<orderEntry type="module" module-name="jps-model-impl" />
|
||||
<orderEntry type="module" module-name="java-analysis-impl" exported="" />
|
||||
<orderEntry type="module" module-name="external-system-api" />
|
||||
<orderEntry type="library" name="asm4" level="project" />
|
||||
<orderEntry type="library" name="asm5" level="project" />
|
||||
<orderEntry type="library" name="Guava" level="project" />
|
||||
<orderEntry type="library" name="Xerces" level="project" />
|
||||
<orderEntry type="library" name="Velocity" level="project" />
|
||||
<orderEntry type="module" module-name="testFramework-java" scope="TEST" />
|
||||
<orderEntry type="module" module-name="java-structure-view" exported="" />
|
||||
<orderEntry type="module" module-name="spellchecker" />
|
||||
<orderEntry type="module-library">
|
||||
<library>
|
||||
<CLASSES>
|
||||
<root url="jar://$MODULE_DIR$/../../lib/nekohtml-1.9.14.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
</library>
|
||||
</orderEntry>
|
||||
<orderEntry type="library" name="nekohtml" level="project" />
|
||||
</component>
|
||||
<component name="copyright">
|
||||
<Base>
|
||||
|
||||
@@ -757,6 +757,7 @@ public class JavaFindUsagesHandler extends FindUsagesHandler{
|
||||
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public Collection<PsiReference> findReferencesToHighlight(@NotNull final PsiElement target, @NotNull final SearchScope searchScope) {
|
||||
if (target instanceof PsiMethod) {
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
<orderEntry type="library" name="Velocity" level="project" />
|
||||
<orderEntry type="module" module-name="java-i18n" exported="" />
|
||||
<orderEntry type="module" module-name="compiler-impl" />
|
||||
<orderEntry type="library" name="asm4" level="project" />
|
||||
<orderEntry type="library" name="asm5" level="project" />
|
||||
<orderEntry type="module" module-name="instrumentation-util" />
|
||||
<orderEntry type="library" name="Groovy" level="project" />
|
||||
<orderEntry type="module" module-name="IntelliLang-java" scope="RUNTIME" />
|
||||
|
||||
+2
-2
@@ -27,8 +27,8 @@ import com.intellij.testFramework.fixtures.TestFixtureBuilder;
|
||||
import com.intellij.util.ArrayUtil;
|
||||
import com.intellij.util.containers.ContainerUtil;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import org.jetbrains.asm4.ClassReader;
|
||||
import org.jetbrains.asm4.ClassWriter;
|
||||
import org.jetbrains.org.objectweb.asm.ClassReader;
|
||||
import org.jetbrains.org.objectweb.asm.ClassWriter;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
|
||||
@@ -15,11 +15,8 @@
|
||||
*/
|
||||
package com.intellij.openapi.editor.impl;
|
||||
|
||||
import com.intellij.codeHighlighting.TextEditorHighlightingPass;
|
||||
import com.intellij.codeInsight.daemon.impl.CodeFoldingPassFactory;
|
||||
import com.intellij.mock.MockProgressIndicator;
|
||||
import com.intellij.psi.PsiDocumentManager;
|
||||
import com.intellij.psi.PsiFile;
|
||||
import com.intellij.testFramework.EditorTestUtil;
|
||||
import com.intellij.testFramework.LightCodeInsightTestCase;
|
||||
|
||||
@@ -43,14 +40,7 @@ public class FoldingExceptionTest extends LightCodeInsightTestCase {
|
||||
}
|
||||
|
||||
private static void runFoldingPass() {
|
||||
PsiDocumentManager psiDocumentManager = PsiDocumentManager.getInstance(getProject());
|
||||
psiDocumentManager.commitAllDocuments();
|
||||
PsiFile psiFile = psiDocumentManager.getPsiFile(myEditor.getDocument());
|
||||
assertNotNull(psiFile);
|
||||
|
||||
CodeFoldingPassFactory factory = getProject().getComponent(CodeFoldingPassFactory.class);
|
||||
TextEditorHighlightingPass highlightingPass = factory.createHighlightingPass(psiFile, myEditor);
|
||||
highlightingPass.collectInformation(new MockProgressIndicator());
|
||||
highlightingPass.doApplyInformationToEditor();
|
||||
PsiDocumentManager.getInstance(ourProject).commitAllDocuments();
|
||||
EditorTestUtil.runTextEditorHighlightingPass(myEditor, CodeFoldingPassFactory.class);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -521,7 +521,7 @@ public abstract class DebuggerTestCase extends ExecutionWithDebuggerToolsTestCas
|
||||
@Override
|
||||
@NotNull
|
||||
public ConfigurationType getType() {
|
||||
return null; //To change body of implemented methods use File | Settings | File Templates.
|
||||
return UnknownConfigurationType.INSTANCE;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -58,7 +58,6 @@ import java.util.List;
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
public abstract class ProjectWizardTestCase<T extends AbstractProjectWizard> extends PlatformTestCase {
|
||||
|
||||
protected static final String DEFAULT_SDK = "default";
|
||||
protected final List<Sdk> mySdks = new ArrayList<Sdk>();
|
||||
protected T myWizard;
|
||||
@@ -133,6 +132,7 @@ public abstract class ProjectWizardTestCase<T extends AbstractProjectWizard> ext
|
||||
throw new RuntimeException(currentStep + " is not validated");
|
||||
}
|
||||
}
|
||||
myWizard.doFinishAction();
|
||||
}
|
||||
|
||||
protected void createWizard(Project project) throws IOException {
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
<orderEntry type="module" module-name="forms_rt" />
|
||||
<orderEntry type="module" module-name="forms-compiler" />
|
||||
<orderEntry type="module" module-name="instrumentation-util" />
|
||||
<orderEntry type="library" exported="" name="asm4" level="project" />
|
||||
<orderEntry type="library" exported="" name="asm5" level="project" />
|
||||
<orderEntry type="library" name="JDOM" level="project" />
|
||||
<orderEntry type="library" name="NanoXML" level="project" />
|
||||
<orderEntry type="library" name="jgoodies-forms" level="project" />
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
*/
|
||||
package org.jetbrains.jps.builders.java.dependencyView;
|
||||
|
||||
import org.jetbrains.asm4.ClassReader;
|
||||
import org.jetbrains.org.objectweb.asm.ClassReader;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.Collection;
|
||||
|
||||
@@ -20,8 +20,8 @@ import com.intellij.util.io.DataInputOutputUtil;
|
||||
import gnu.trove.THashSet;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import org.jetbrains.asm4.Opcodes;
|
||||
import org.jetbrains.jps.builders.storage.BuildDataCorruptedException;
|
||||
import org.jetbrains.org.objectweb.asm.Opcodes;
|
||||
|
||||
import java.io.*;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
|
||||
+15
-25
@@ -19,9 +19,9 @@ import com.intellij.openapi.util.Pair;
|
||||
import gnu.trove.THashMap;
|
||||
import gnu.trove.THashSet;
|
||||
import gnu.trove.TIntHashSet;
|
||||
import org.jetbrains.asm4.*;
|
||||
import org.jetbrains.asm4.signature.SignatureReader;
|
||||
import org.jetbrains.asm4.signature.SignatureVisitor;
|
||||
import org.jetbrains.org.objectweb.asm.*;
|
||||
import org.jetbrains.org.objectweb.asm.signature.SignatureReader;
|
||||
import org.jetbrains.org.objectweb.asm.signature.SignatureVisitor;
|
||||
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
import java.util.EnumSet;
|
||||
@@ -55,7 +55,7 @@ class ClassfileAnalyzer {
|
||||
private class ClassCrawler extends ClassVisitor {
|
||||
private class AnnotationRetentionPolicyCrawler extends AnnotationVisitor {
|
||||
private AnnotationRetentionPolicyCrawler() {
|
||||
super(Opcodes.ASM4);
|
||||
super(Opcodes.ASM5);
|
||||
}
|
||||
|
||||
public void visit(String name, Object value) {
|
||||
@@ -79,7 +79,7 @@ class ClassfileAnalyzer {
|
||||
|
||||
private class AnnotationTargetCrawler extends AnnotationVisitor {
|
||||
private AnnotationTargetCrawler() {
|
||||
super(Opcodes.ASM4);
|
||||
super(Opcodes.ASM5);
|
||||
}
|
||||
|
||||
public void visit(String name, Object value) {
|
||||
@@ -108,7 +108,7 @@ class ClassfileAnalyzer {
|
||||
private final TIntHashSet myUsedArguments = new TIntHashSet();
|
||||
|
||||
private AnnotationCrawler(final TypeRepr.ClassType type, final ElemType target) {
|
||||
super(Opcodes.ASM4);
|
||||
super(Opcodes.ASM5);
|
||||
this.myType = type;
|
||||
this.myTarget = target;
|
||||
final Set<ElemType> targets = myAnnotationTargets.get(type);
|
||||
@@ -160,9 +160,7 @@ class ClassfileAnalyzer {
|
||||
return "()D;";
|
||||
}
|
||||
|
||||
final String s = "()L" + name + ";";
|
||||
|
||||
return s;
|
||||
return "()L" + name + ";";
|
||||
}
|
||||
|
||||
public void visit(String name, Object value) {
|
||||
@@ -171,10 +169,7 @@ class ClassfileAnalyzer {
|
||||
|
||||
if (value instanceof Type) {
|
||||
final String className = ((Type)value).getClassName().replace('.', '/');
|
||||
|
||||
if (className != null) {
|
||||
myUsages.add(UsageRepr.createClassUsage(myContext, myContext.get(className)));
|
||||
}
|
||||
myUsages.add(UsageRepr.createClassUsage(myContext, myContext.get(className)));
|
||||
}
|
||||
|
||||
myUsages.add(UsageRepr.createMethodUsage(myContext, methodName, myType.className, methodDescr));
|
||||
@@ -220,9 +215,8 @@ class ClassfileAnalyzer {
|
||||
}
|
||||
}
|
||||
|
||||
private final SignatureVisitor mySignatureCrawler = new SignatureVisitor(Opcodes.ASM4) {
|
||||
private final SignatureVisitor mySignatureCrawler = new SignatureVisitor(Opcodes.ASM5) {
|
||||
public void visitFormalTypeParameter(String name) {
|
||||
return;
|
||||
}
|
||||
|
||||
public SignatureVisitor visitClassBound() {
|
||||
@@ -254,11 +248,9 @@ class ClassfileAnalyzer {
|
||||
}
|
||||
|
||||
public void visitBaseType(char descriptor) {
|
||||
return;
|
||||
}
|
||||
|
||||
public void visitTypeVariable(String name) {
|
||||
return;
|
||||
}
|
||||
|
||||
public SignatureVisitor visitArrayType() {
|
||||
@@ -266,11 +258,9 @@ class ClassfileAnalyzer {
|
||||
}
|
||||
|
||||
public void visitInnerClassType(String name) {
|
||||
return;
|
||||
}
|
||||
|
||||
public void visitTypeArgument() {
|
||||
return;
|
||||
}
|
||||
|
||||
public SignatureVisitor visitTypeArgument(char wildcard) {
|
||||
@@ -316,7 +306,7 @@ class ClassfileAnalyzer {
|
||||
final Map<TypeRepr.ClassType, Set<ElemType>> myAnnotationTargets = new THashMap<TypeRepr.ClassType, Set<ElemType>>();
|
||||
|
||||
public ClassCrawler(final int fn) {
|
||||
super(Opcodes.ASM4);
|
||||
super(Opcodes.ASM5);
|
||||
myFileName = fn;
|
||||
}
|
||||
|
||||
@@ -407,7 +397,7 @@ class ClassfileAnalyzer {
|
||||
myFields.add(new FieldRepr(myContext, access, myContext.get(n), myContext.get(desc), myContext.get(signature), value));
|
||||
}
|
||||
|
||||
return new FieldVisitor(Opcodes.ASM4) {
|
||||
return new FieldVisitor(Opcodes.ASM5) {
|
||||
@Override
|
||||
public AnnotationVisitor visitAnnotation(String desc, boolean visible) {
|
||||
return new AnnotationCrawler((TypeRepr.ClassType)TypeRepr.getType(myContext, myContext.get(desc)), ElemType.FIELD);
|
||||
@@ -421,7 +411,7 @@ class ClassfileAnalyzer {
|
||||
|
||||
processSignature(signature);
|
||||
|
||||
return new MethodVisitor(Opcodes.ASM4) {
|
||||
return new MethodVisitor(Opcodes.ASM5) {
|
||||
@Override
|
||||
public void visitEnd() {
|
||||
if ((access & Opcodes.ACC_SYNTHETIC) == 0 || (access & Opcodes.ACC_BRIDGE) > 0) {
|
||||
@@ -438,7 +428,7 @@ class ClassfileAnalyzer {
|
||||
|
||||
@Override
|
||||
public AnnotationVisitor visitAnnotationDefault() {
|
||||
return new AnnotationVisitor(Opcodes.ASM4) {
|
||||
return new AnnotationVisitor(Opcodes.ASM5) {
|
||||
public void visit(String name, Object value) {
|
||||
defaultValue.set(value);
|
||||
}
|
||||
@@ -531,7 +521,7 @@ class ClassfileAnalyzer {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void visitMethodInsn(int opcode, String owner, String name, String desc) {
|
||||
public void visitMethodInsn(int opcode, String owner, String name, String desc, boolean itf) {
|
||||
final int methodName = myContext.get(name);
|
||||
final int methodOwner = myContext.get(owner);
|
||||
|
||||
@@ -539,7 +529,7 @@ class ClassfileAnalyzer {
|
||||
myUsages.add(UsageRepr.createMetaMethodUsage(myContext, methodName, methodOwner, desc));
|
||||
addClassUsage(TypeRepr.getType(myContext, Type.getReturnType(desc)));
|
||||
|
||||
super.visitMethodInsn(opcode, owner, name, desc);
|
||||
super.visitMethodInsn(opcode, owner, name, desc, itf);
|
||||
}
|
||||
|
||||
private void addClassUsage(final TypeRepr.AbstractType type) {
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
package org.jetbrains.jps.builders.java.dependencyView;
|
||||
|
||||
import com.intellij.openapi.util.Pair;
|
||||
import org.jetbrains.asm4.Opcodes;
|
||||
import org.jetbrains.org.objectweb.asm.Opcodes;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
|
||||
@@ -23,10 +23,10 @@ import com.intellij.util.io.IntInlineKeyDescriptor;
|
||||
import gnu.trove.*;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import org.jetbrains.asm4.ClassReader;
|
||||
import org.jetbrains.asm4.Opcodes;
|
||||
import org.jetbrains.jps.builders.storage.BuildDataCorruptedException;
|
||||
import org.jetbrains.jps.incremental.storage.FileKeyDescriptor;
|
||||
import org.jetbrains.org.objectweb.asm.ClassReader;
|
||||
import org.jetbrains.org.objectweb.asm.Opcodes;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileNotFoundException;
|
||||
|
||||
@@ -19,8 +19,8 @@ import com.intellij.util.io.DataExternalizer;
|
||||
import com.intellij.util.io.DataInputOutputUtil;
|
||||
import gnu.trove.THashSet;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.asm4.Type;
|
||||
import org.jetbrains.jps.builders.storage.BuildDataCorruptedException;
|
||||
import org.jetbrains.org.objectweb.asm.Type;
|
||||
|
||||
import java.io.DataInput;
|
||||
import java.io.DataOutput;
|
||||
|
||||
@@ -16,8 +16,8 @@
|
||||
package org.jetbrains.jps.builders.java.dependencyView;
|
||||
|
||||
import com.intellij.util.io.DataInputOutputUtil;
|
||||
import org.jetbrains.asm4.Opcodes;
|
||||
import org.jetbrains.jps.builders.storage.BuildDataCorruptedException;
|
||||
import org.jetbrains.org.objectweb.asm.Opcodes;
|
||||
|
||||
import java.io.DataInput;
|
||||
import java.io.DataOutput;
|
||||
|
||||
+1
-1
@@ -16,8 +16,8 @@
|
||||
package org.jetbrains.jps.builders.java.dependencyView;
|
||||
|
||||
import com.intellij.util.io.DataInputOutputUtil;
|
||||
import org.jetbrains.asm4.Type;
|
||||
import org.jetbrains.jps.builders.storage.BuildDataCorruptedException;
|
||||
import org.jetbrains.org.objectweb.asm.Type;
|
||||
|
||||
import java.io.DataInput;
|
||||
import java.io.DataOutput;
|
||||
|
||||
@@ -19,8 +19,8 @@ import com.intellij.openapi.util.text.StringUtil;
|
||||
import com.intellij.util.io.DataExternalizer;
|
||||
import com.intellij.util.io.DataInputOutputUtil;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.asm4.Type;
|
||||
import org.jetbrains.jps.builders.storage.BuildDataCorruptedException;
|
||||
import org.jetbrains.org.objectweb.asm.Type;
|
||||
|
||||
import java.io.DataInput;
|
||||
import java.io.DataOutput;
|
||||
|
||||
@@ -20,8 +20,8 @@ import com.intellij.util.io.DataInputOutputUtil;
|
||||
import gnu.trove.TIntHashSet;
|
||||
import gnu.trove.TIntProcedure;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.asm4.Type;
|
||||
import org.jetbrains.jps.builders.storage.BuildDataCorruptedException;
|
||||
import org.jetbrains.org.objectweb.asm.Type;
|
||||
|
||||
import java.io.DataInput;
|
||||
import java.io.DataOutput;
|
||||
|
||||
@@ -17,7 +17,7 @@ package org.jetbrains.jps.classFilesIndex;
|
||||
|
||||
import com.intellij.openapi.util.text.StringUtil;
|
||||
import com.intellij.util.containers.ContainerUtil;
|
||||
import org.jetbrains.asm4.Type;
|
||||
import org.jetbrains.org.objectweb.asm.Type;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
|
||||
+1
-1
@@ -18,8 +18,8 @@ package org.jetbrains.jps.classFilesIndex.indexer.api;
|
||||
import com.intellij.util.io.DataExternalizer;
|
||||
import com.intellij.util.io.KeyDescriptor;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.asm4.ClassReader;
|
||||
import org.jetbrains.jps.builders.java.dependencyView.Mappings;
|
||||
import org.jetbrains.org.objectweb.asm.ClassReader;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
+1
-2
@@ -15,15 +15,14 @@
|
||||
*/
|
||||
package org.jetbrains.jps.classFilesIndex.indexer.api;
|
||||
|
||||
import com.intellij.openapi.diagnostic.Log;
|
||||
import com.intellij.openapi.diagnostic.Logger;
|
||||
import com.intellij.util.containers.ContainerUtil;
|
||||
import com.intellij.util.io.PersistentHashMap;
|
||||
import org.jetbrains.asm4.ClassReader;
|
||||
import org.jetbrains.jps.builders.java.dependencyView.Mappings;
|
||||
import org.jetbrains.jps.classFilesIndex.indexer.api.storage.ClassFilesIndexStorageBase;
|
||||
import org.jetbrains.jps.classFilesIndex.indexer.api.storage.ClassFilesIndexStorageWriter;
|
||||
import org.jetbrains.jps.incremental.CompileContext;
|
||||
import org.jetbrains.org.objectweb.asm.ClassReader;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
|
||||
+5
-9
@@ -17,26 +17,22 @@ package org.jetbrains.jps.classFilesIndex.indexer.api;
|
||||
|
||||
import com.intellij.compiler.instrumentation.InstrumentationClassFinder;
|
||||
import com.intellij.openapi.diagnostic.Logger;
|
||||
import com.intellij.openapi.util.io.FileUtil;
|
||||
import com.intellij.util.Processor;
|
||||
import com.intellij.util.containers.ContainerUtil;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import org.jetbrains.asm4.ClassReader;
|
||||
import org.jetbrains.asm4.ClassWriter;
|
||||
import org.jetbrains.jps.ModuleChunk;
|
||||
import org.jetbrains.jps.builders.java.JavaBuilderUtil;
|
||||
import org.jetbrains.jps.builders.java.dependencyView.Mappings;
|
||||
import org.jetbrains.jps.incremental.BinaryContent;
|
||||
import org.jetbrains.jps.incremental.CompileContext;
|
||||
import org.jetbrains.jps.incremental.CompiledClass;
|
||||
import org.jetbrains.jps.incremental.instrumentation.BaseInstrumentingBuilder;
|
||||
import org.jetbrains.jps.model.java.JpsJavaExtensionService;
|
||||
import org.jetbrains.jps.model.module.JpsModule;
|
||||
import org.jetbrains.jps.service.JpsServiceManager;
|
||||
import org.jetbrains.org.objectweb.asm.ClassReader;
|
||||
import org.jetbrains.org.objectweb.asm.ClassWriter;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
import java.util.concurrent.atomic.AtomicLong;
|
||||
|
||||
|
||||
+3
-4
@@ -17,15 +17,14 @@ package org.jetbrains.jps.classFilesIndex.indexer.impl;
|
||||
|
||||
import com.intellij.util.io.DataExternalizer;
|
||||
import com.intellij.util.io.EnumeratorIntegerDescriptor;
|
||||
import com.intellij.util.io.EnumeratorStringDescriptor;
|
||||
import com.intellij.util.io.KeyDescriptor;
|
||||
import gnu.trove.TObjectIntHashMap;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.asm4.*;
|
||||
import org.jetbrains.jps.builders.java.dependencyView.Mappings;
|
||||
import org.jetbrains.jps.classFilesIndex.AsmUtil;
|
||||
import org.jetbrains.jps.classFilesIndex.TObjectIntHashMapExternalizer;
|
||||
import org.jetbrains.jps.classFilesIndex.indexer.api.ClassFileIndexer;
|
||||
import org.jetbrains.org.objectweb.asm.*;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
@@ -45,7 +44,7 @@ public class MethodsUsageIndexer extends ClassFileIndexer<Integer, TObjectIntHas
|
||||
public Map<Integer, TObjectIntHashMap<EnumeratedMethodIncompleteSignature>> map(final ClassReader inputData, final Mappings mappings) {
|
||||
final Map<Integer, TObjectIntHashMap<EnumeratedMethodIncompleteSignature>> map =
|
||||
new HashMap<Integer, TObjectIntHashMap<EnumeratedMethodIncompleteSignature>>();
|
||||
final MethodVisitor methodVisitor = new MethodVisitor(Opcodes.ASM4) {
|
||||
final MethodVisitor methodVisitor = new MethodVisitor(Opcodes.ASM5) {
|
||||
@Override
|
||||
public void visitMethodInsn(final int opcode, final String owner, final String name, final String desc) {
|
||||
final Type returnType = Type.getReturnType(desc);
|
||||
@@ -69,7 +68,7 @@ public class MethodsUsageIndexer extends ClassFileIndexer<Integer, TObjectIntHas
|
||||
}
|
||||
}
|
||||
};
|
||||
inputData.accept(new ClassVisitor(Opcodes.ASM4) {
|
||||
inputData.accept(new ClassVisitor(Opcodes.ASM5) {
|
||||
@Override
|
||||
public MethodVisitor visitMethod(final int access,
|
||||
final String name,
|
||||
|
||||
@@ -30,14 +30,14 @@ import io.netty.util.NetUtil;
|
||||
import jsr166e.extra.SequenceLock;
|
||||
import net.n3.nanoxml.IXMLBuilder;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import org.jetbrains.asm4.ClassVisitor;
|
||||
import org.jetbrains.asm4.ClassWriter;
|
||||
import org.jetbrains.jps.builders.java.JavaCompilingTool;
|
||||
import org.jetbrains.jps.builders.java.JavaSourceTransformer;
|
||||
import org.jetbrains.jps.javac.JavacServer;
|
||||
import org.jetbrains.jps.model.JpsModel;
|
||||
import org.jetbrains.jps.model.impl.JpsModelImpl;
|
||||
import org.jetbrains.jps.model.serialization.JpsProjectLoader;
|
||||
import org.jetbrains.org.objectweb.asm.ClassVisitor;
|
||||
import org.jetbrains.org.objectweb.asm.ClassWriter;
|
||||
|
||||
import javax.tools.*;
|
||||
import java.io.File;
|
||||
|
||||
+2
-2
@@ -20,8 +20,6 @@ import com.intellij.compiler.instrumentation.InstrumenterClassWriter;
|
||||
import com.intellij.openapi.diagnostic.Logger;
|
||||
import com.intellij.openapi.util.Key;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import org.jetbrains.asm4.ClassReader;
|
||||
import org.jetbrains.asm4.ClassWriter;
|
||||
import org.jetbrains.jps.ModuleChunk;
|
||||
import org.jetbrains.jps.incremental.BinaryContent;
|
||||
import org.jetbrains.jps.incremental.BuilderCategory;
|
||||
@@ -29,6 +27,8 @@ import org.jetbrains.jps.incremental.CompileContext;
|
||||
import org.jetbrains.jps.incremental.CompiledClass;
|
||||
import org.jetbrains.jps.incremental.messages.BuildMessage;
|
||||
import org.jetbrains.jps.incremental.messages.CompilerMessage;
|
||||
import org.jetbrains.org.objectweb.asm.ClassReader;
|
||||
import org.jetbrains.org.objectweb.asm.ClassWriter;
|
||||
|
||||
/**
|
||||
* @author Eugene Zhuravlev
|
||||
|
||||
+5
-5
@@ -19,16 +19,16 @@ import com.intellij.compiler.instrumentation.InstrumentationClassFinder;
|
||||
import com.intellij.openapi.util.Key;
|
||||
import com.intellij.openapi.util.Ref;
|
||||
import com.intellij.openapi.util.text.StringUtil;
|
||||
import org.jetbrains.asm4.ClassReader;
|
||||
import org.jetbrains.asm4.ClassVisitor;
|
||||
import org.jetbrains.asm4.ClassWriter;
|
||||
import org.jetbrains.asm4.Opcodes;
|
||||
import org.jetbrains.jps.ModuleChunk;
|
||||
import org.jetbrains.jps.ProjectPaths;
|
||||
import org.jetbrains.jps.builders.DirtyFilesHolder;
|
||||
import org.jetbrains.jps.builders.java.JavaSourceRootDescriptor;
|
||||
import org.jetbrains.jps.incremental.*;
|
||||
import org.jetbrains.jps.incremental.messages.ProgressMessage;
|
||||
import org.jetbrains.org.objectweb.asm.ClassReader;
|
||||
import org.jetbrains.org.objectweb.asm.ClassVisitor;
|
||||
import org.jetbrains.org.objectweb.asm.ClassWriter;
|
||||
import org.jetbrains.org.objectweb.asm.Opcodes;
|
||||
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.File;
|
||||
@@ -140,7 +140,7 @@ public abstract class ClassProcessingBuilder extends ModuleLevelBuilder {
|
||||
|
||||
public static int getClassFileVersion(ClassReader reader) {
|
||||
final Ref<Integer> result = new Ref<Integer>(0);
|
||||
reader.accept(new ClassVisitor(Opcodes.ASM4) {
|
||||
reader.accept(new ClassVisitor(Opcodes.ASM5) {
|
||||
public void visit(int version, int access, String name, String signature, String superName, String[] interfaces) {
|
||||
result.set(version);
|
||||
}
|
||||
|
||||
+3
-3
@@ -19,9 +19,6 @@ import com.intellij.compiler.instrumentation.InstrumentationClassFinder;
|
||||
import com.intellij.compiler.notNullVerification.NotNullVerifyingInstrumenter;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import org.jetbrains.asm4.ClassReader;
|
||||
import org.jetbrains.asm4.ClassWriter;
|
||||
import org.jetbrains.asm4.Opcodes;
|
||||
import org.jetbrains.jps.ModuleChunk;
|
||||
import org.jetbrains.jps.cmdline.ProjectDescriptor;
|
||||
import org.jetbrains.jps.incremental.BinaryContent;
|
||||
@@ -30,6 +27,9 @@ import org.jetbrains.jps.incremental.CompiledClass;
|
||||
import org.jetbrains.jps.incremental.messages.BuildMessage;
|
||||
import org.jetbrains.jps.incremental.messages.CompilerMessage;
|
||||
import org.jetbrains.jps.model.java.JpsJavaExtensionService;
|
||||
import org.jetbrains.org.objectweb.asm.ClassReader;
|
||||
import org.jetbrains.org.objectweb.asm.ClassWriter;
|
||||
import org.jetbrains.org.objectweb.asm.Opcodes;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
|
||||
@@ -19,7 +19,6 @@ import com.intellij.openapi.diagnostic.Logger;
|
||||
import com.intellij.openapi.util.io.FileUtil;
|
||||
import gnu.trove.THashSet;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.asm4.ClassReader;
|
||||
import org.jetbrains.jps.builders.java.JavaSourceRootDescriptor;
|
||||
import org.jetbrains.jps.builders.java.dependencyView.Callbacks;
|
||||
import org.jetbrains.jps.incremental.BinaryContent;
|
||||
@@ -31,8 +30,9 @@ import org.jetbrains.jps.incremental.messages.CompilerMessage;
|
||||
import org.jetbrains.jps.incremental.messages.ProgressMessage;
|
||||
import org.jetbrains.jps.javac.OutputFileConsumer;
|
||||
import org.jetbrains.jps.javac.OutputFileObject;
|
||||
import org.jetbrains.org.objectweb.asm.ClassReader;
|
||||
|
||||
import javax.tools.JavaFileObject;
|
||||
import javax.tools.*;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.util.Collections;
|
||||
|
||||
Binary file not shown.
@@ -29,6 +29,7 @@ import java.io.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
|
||||
@SuppressWarnings({"UseOfSystemOutOrSystemErr", "MethodNamesDifferingOnlyByCase"})
|
||||
public class Main {
|
||||
@@ -122,7 +123,7 @@ public class Main {
|
||||
|
||||
private static void installPatch() throws IOException {
|
||||
String platform = System.getProperty(PLATFORM_PREFIX_PROPERTY, "idea");
|
||||
String patchFileName = ("jetbrains.patch.jar." + platform).toLowerCase();
|
||||
String patchFileName = ("jetbrains.patch.jar." + platform).toLowerCase(Locale.US);
|
||||
String tempDir = System.getProperty("java.io.tmpdir");
|
||||
|
||||
// always delete previous patch copy
|
||||
@@ -148,6 +149,7 @@ public class Main {
|
||||
args.add(Restarter.createTempExecutable(launcher).getPath());
|
||||
}
|
||||
|
||||
//noinspection SpellCheckingInspection
|
||||
Collections.addAll(args,
|
||||
System.getProperty("java.home") + "/bin/java",
|
||||
"-Xmx500m",
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2013 JetBrains s.r.o.
|
||||
* Copyright 2000-2014 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.
|
||||
@@ -27,17 +27,14 @@ import java.util.concurrent.atomic.AtomicReference;
|
||||
|
||||
public class TooManyUsagesStatus {
|
||||
private static final Key<TooManyUsagesStatus> KEY = Key.create("TooManyUsagesStatus");
|
||||
private static final Null NULL = new Null();
|
||||
private static final NullStatus NULL_STATUS = new NullStatus();
|
||||
|
||||
@NotNull
|
||||
public static TooManyUsagesStatus getFrom(@Nullable ProgressIndicator indicator) {
|
||||
TooManyUsagesStatus data = null;
|
||||
if (indicator instanceof UserDataHolder) {
|
||||
data = ((UserDataHolder)indicator).getUserData(KEY);
|
||||
}
|
||||
if (data == null) data = NULL;
|
||||
return data;
|
||||
TooManyUsagesStatus data = indicator instanceof UserDataHolder ? ((UserDataHolder)indicator).getUserData(KEY) : null;
|
||||
return data == null ? NULL_STATUS : data;
|
||||
}
|
||||
|
||||
public static TooManyUsagesStatus createFor(@NotNull ProgressIndicator indicator) {
|
||||
TooManyUsagesStatus data = null;
|
||||
if (indicator instanceof UserDataHolder) {
|
||||
@@ -76,7 +73,7 @@ public class TooManyUsagesStatus {
|
||||
}
|
||||
}
|
||||
|
||||
private static class Null extends TooManyUsagesStatus {
|
||||
private static class NullStatus extends TooManyUsagesStatus {
|
||||
@Override
|
||||
public boolean switchTooManyUsagesStatus() {
|
||||
return false;
|
||||
|
||||
@@ -159,17 +159,24 @@ public class FoldingUpdate {
|
||||
final List<EditorWindow> injectedEditors = new ArrayList<EditorWindow>();
|
||||
final List<PsiFile> injectedFiles = new ArrayList<PsiFile>();
|
||||
final List<FoldingMap> maps = new ArrayList<FoldingMap>();
|
||||
for (DocumentWindow injectedDocument : injectedDocuments) {
|
||||
PsiFile injectedFile = PsiDocumentManager.getInstance(project).getPsiFile(injectedDocument);
|
||||
if (injectedFile == null || !injectedFile.isValid() || !injectedDocument.isValid()) continue;
|
||||
Editor injectedEditor = InjectedLanguageUtil.getInjectedEditorForInjectedFile(editor, injectedFile);
|
||||
if (!(injectedEditor instanceof EditorWindow)) continue;
|
||||
for (final DocumentWindow injectedDocument : injectedDocuments) {
|
||||
if (!injectedDocument.isValid()) {
|
||||
continue;
|
||||
}
|
||||
InjectedLanguageUtil.enumerate(injectedDocument, file, new PsiLanguageInjectionHost.InjectedPsiVisitor() {
|
||||
@Override
|
||||
public void visit(@NotNull PsiFile injectedFile, @NotNull List<PsiLanguageInjectionHost.Shred> places) {
|
||||
if (!injectedFile.isValid()) return;
|
||||
Editor injectedEditor = InjectedLanguageUtil.getInjectedEditorForInjectedFile(editor, injectedFile);
|
||||
if (!(injectedEditor instanceof EditorWindow)) return;
|
||||
|
||||
injectedEditors.add((EditorWindow)injectedEditor);
|
||||
injectedFiles.add(injectedFile);
|
||||
final FoldingMap map = new FoldingMap();
|
||||
maps.add(map);
|
||||
getFoldingsFor(injectedFile, injectedDocument, map, false);
|
||||
injectedEditors.add((EditorWindow)injectedEditor);
|
||||
injectedFiles.add(injectedFile);
|
||||
final FoldingMap map = new FoldingMap();
|
||||
maps.add(map);
|
||||
getFoldingsFor(injectedFile, injectedDocument, map, false);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
return new Runnable() {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2009 JetBrains s.r.o.
|
||||
* Copyright 2000-2014 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.
|
||||
@@ -143,6 +143,7 @@ public abstract class AbstractFindUsagesDialog extends DialogWrapper {
|
||||
return panel;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public final FindUsagesOptions calcFindUsagesOptions() {
|
||||
calcFindUsagesOptions(myFindUsagesOptions);
|
||||
return myFindUsagesOptions;
|
||||
|
||||
@@ -47,6 +47,7 @@ import java.util.Collections;
|
||||
*/
|
||||
public abstract class FindUsagesHandler {
|
||||
// return this handler if you want to cancel the search
|
||||
@NotNull
|
||||
public static final FindUsagesHandler NULL_HANDLER = new FindUsagesHandler(PsiUtilCore.NULL_PSI_ELEMENT){};
|
||||
|
||||
private final PsiElement myPsiElement;
|
||||
@@ -204,6 +205,7 @@ public abstract class FindUsagesHandler {
|
||||
return false;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public Collection<PsiReference> findReferencesToHighlight(@NotNull PsiElement target, @NotNull SearchScope searchScope) {
|
||||
return ReferencesSearch.search(target, searchScope, false).findAll();
|
||||
}
|
||||
|
||||
+2
-1
@@ -116,6 +116,7 @@ public class PsiElement2UsageTargetAdapter
|
||||
return getElement();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return getPresentableText();
|
||||
}
|
||||
@@ -209,7 +210,7 @@ public class PsiElement2UsageTargetAdapter
|
||||
@Override
|
||||
public String getLongDescriptiveName() {
|
||||
SearchScope searchScope = myOptions.searchScope;
|
||||
String scopeString = searchScope == null ? null : searchScope.getDisplayName();
|
||||
String scopeString = searchScope.getDisplayName();
|
||||
PsiElement psiElement = getElement();
|
||||
|
||||
return psiElement == null ? UsageViewBundle.message("node.invalid") :
|
||||
|
||||
+1
-11
@@ -43,7 +43,6 @@ import com.intellij.openapi.progress.ProgressManager;
|
||||
import com.intellij.openapi.project.DumbService;
|
||||
import com.intellij.openapi.project.Project;
|
||||
import com.intellij.openapi.util.Pair;
|
||||
import com.intellij.openapi.util.Segment;
|
||||
import com.intellij.openapi.util.TextRange;
|
||||
import com.intellij.openapi.vfs.VirtualFile;
|
||||
import com.intellij.psi.*;
|
||||
@@ -141,18 +140,9 @@ public class InjectedLanguageManagerImpl extends InjectedLanguageManager impleme
|
||||
if (indicator != null && indicator.isCanceled()) return false;
|
||||
if (documentManager.isUncommited(hostDocument) || !hostPsiFile.isValid()) return false; // will be committed later
|
||||
|
||||
Segment[] ranges = documentWindow.getHostRanges();
|
||||
Segment rangeMarker = ranges.length > 0 ? ranges[0] : null;
|
||||
PsiElement element = rangeMarker == null ? null : hostPsiFile.findElementAt(rangeMarker.getStartOffset());
|
||||
if (element == null) {
|
||||
synchronized (PsiLock.LOCK) {
|
||||
injected.remove(documentWindow);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
final DocumentWindow[] stillInjectedDocument = {null};
|
||||
// it is here where the reparse happens and old file contents replaced
|
||||
InjectedLanguageUtil.enumerate(element, hostPsiFile, true, new PsiLanguageInjectionHost.InjectedPsiVisitor() {
|
||||
InjectedLanguageUtil.enumerate(documentWindow, hostPsiFile, new PsiLanguageInjectionHost.InjectedPsiVisitor() {
|
||||
@Override
|
||||
public void visit(@NotNull PsiFile injectedPsi, @NotNull List<PsiLanguageInjectionHost.Shred> places) {
|
||||
stillInjectedDocument[0] = (DocumentWindow)injectedPsi.getViewProvider().getDocument();
|
||||
|
||||
+11
@@ -92,6 +92,17 @@ public class InjectedLanguageUtil {
|
||||
return ((DocumentWindowImpl)myFileViewProvider.getDocument()).getShreds();
|
||||
}
|
||||
|
||||
public static void enumerate(@NotNull DocumentWindow documentWindow,
|
||||
@NotNull PsiFile hostPsiFile,
|
||||
@NotNull PsiLanguageInjectionHost.InjectedPsiVisitor visitor) {
|
||||
Segment[] ranges = documentWindow.getHostRanges();
|
||||
Segment rangeMarker = ranges.length > 0 ? ranges[0] : null;
|
||||
PsiElement element = rangeMarker == null ? null : hostPsiFile.findElementAt(rangeMarker.getStartOffset());
|
||||
if (element != null) {
|
||||
enumerate(element, hostPsiFile, true, visitor);
|
||||
}
|
||||
}
|
||||
|
||||
public static boolean enumerate(@NotNull PsiElement host, @NotNull PsiLanguageInjectionHost.InjectedPsiVisitor visitor) {
|
||||
PsiFile containingFile = host.getContainingFile();
|
||||
return enumerate(host, containingFile, true, visitor);
|
||||
|
||||
@@ -218,7 +218,13 @@ public class IdeaApplication {
|
||||
|
||||
@Nullable
|
||||
private SplashScreen getSplashScreen() {
|
||||
return SplashScreen.getSplashScreen();
|
||||
try {
|
||||
return SplashScreen.getSplashScreen();
|
||||
}
|
||||
catch (Throwable t) {
|
||||
LOG.warn(t);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
+12
-1
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2009 JetBrains s.r.o.
|
||||
* Copyright 2000-2014 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.
|
||||
@@ -55,10 +55,12 @@ public class BackgroundableProcessIndicator extends ProgressWindow {
|
||||
if (myDumbModeAction == DumbModeAction.CANCEL) {
|
||||
task.getProject().getMessageBus().connect(this).subscribe(DumbService.DUMB_MODE, new DumbService.DumbModeListener() {
|
||||
|
||||
@Override
|
||||
public void enteredDumbMode() {
|
||||
cancel();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void exitDumbMode() {
|
||||
}
|
||||
});
|
||||
@@ -69,6 +71,7 @@ public class BackgroundableProcessIndicator extends ProgressWindow {
|
||||
super(info.isCancellable(), true, project, info.getCancelText());
|
||||
if (project != null) {
|
||||
final ProjectManagerAdapter myListener = new ProjectManagerAdapter() {
|
||||
@Override
|
||||
public void projectClosing(Project closingProject) {
|
||||
if (isRunning()) {
|
||||
cancel();
|
||||
@@ -107,23 +110,28 @@ public class BackgroundableProcessIndicator extends ProgressWindow {
|
||||
@Nls final String cancelButtonText,
|
||||
@Nls final String backgroundStopTooltip, final boolean cancellable) {
|
||||
this(project, new TaskInfo() {
|
||||
@Override
|
||||
public String getProcessId() {
|
||||
return "<unknown>";
|
||||
}
|
||||
|
||||
@Override
|
||||
@NotNull
|
||||
public String getTitle() {
|
||||
return progressTitle;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getCancelText() {
|
||||
return cancelButtonText;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getCancelTooltipText() {
|
||||
return backgroundStopTooltip;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isCancellable() {
|
||||
return cancellable;
|
||||
}
|
||||
@@ -134,6 +142,7 @@ public class BackgroundableProcessIndicator extends ProgressWindow {
|
||||
return myDumbModeAction;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void showDialog() {
|
||||
if (myDisposed) return;
|
||||
|
||||
@@ -144,6 +153,7 @@ public class BackgroundableProcessIndicator extends ProgressWindow {
|
||||
super.showDialog();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void background() {
|
||||
if (myDisposed) return;
|
||||
|
||||
@@ -158,6 +168,7 @@ public class BackgroundableProcessIndicator extends ProgressWindow {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void dispose() {
|
||||
super.dispose();
|
||||
myDisposed = true;
|
||||
|
||||
@@ -248,27 +248,13 @@ public class X11UiUtil {
|
||||
|
||||
try {
|
||||
if (wmName.startsWith("Mutter") || "Muffin".equals(wmName) || "GNOME Shell".equals(wmName)) {
|
||||
try {
|
||||
setWM("MUTTER_WM");
|
||||
}
|
||||
catch (NoSuchFieldException e) {
|
||||
setWM("METACITY_WM");
|
||||
}
|
||||
setWM("MUTTER_WM", "METACITY_WM");
|
||||
}
|
||||
else if ("Marco".equals(wmName)) {
|
||||
setWM("METACITY_WM");
|
||||
setWM("MARCO_WM", "METACITY_WM");
|
||||
}
|
||||
else if ("awesome".equals(wmName)) {
|
||||
try {
|
||||
Class<?> xwmClass = Class.forName("sun.awt.X11.XWM");
|
||||
xwmClass.getDeclaredField("OTHER_NONREPARENTING_WM");
|
||||
if (System.getenv("_JAVA_AWT_WM_NONREPARENTING") == null) {
|
||||
setWM("OTHER_NONREPARENTING_WM"); // patch present but not activated
|
||||
}
|
||||
}
|
||||
catch (NoSuchFieldException e) {
|
||||
setWM("LG3D_WM"); // patch absent - mimic LG3D
|
||||
}
|
||||
setWM("SAWFISH_WM");
|
||||
}
|
||||
}
|
||||
catch (Throwable e) {
|
||||
@@ -276,15 +262,21 @@ public class X11UiUtil {
|
||||
}
|
||||
}
|
||||
|
||||
private static void setWM(String wmConstant) throws Exception {
|
||||
private static void setWM(String... wmConstants) throws Exception {
|
||||
Class<?> xwmClass = Class.forName("sun.awt.X11.XWM");
|
||||
Object xwm = method(xwmClass, "getWM").invoke(null);
|
||||
if (xwm != null) {
|
||||
Field wm = field(xwmClass, wmConstant);
|
||||
Object id = wm.get(null);
|
||||
if (id != null) {
|
||||
field(xwmClass, "awt_wmgr").set(null, id);
|
||||
field(xwmClass, "WMID").set(xwm, id);
|
||||
for (String wmConstant : wmConstants) {
|
||||
try {
|
||||
Field wm = field(xwmClass, wmConstant);
|
||||
Object id = wm.get(null);
|
||||
if (id != null) {
|
||||
field(xwmClass, "awt_wmgr").set(null, id);
|
||||
field(xwmClass, "WMID").set(xwm, id);
|
||||
break;
|
||||
}
|
||||
}
|
||||
catch (NoSuchFieldException ignore) { }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+5
@@ -15,6 +15,11 @@ public abstract class ServerRuntimeInstance<D extends DeploymentConfiguration> {
|
||||
|
||||
public abstract void computeDeployments(@NotNull ComputeDeploymentsCallback callback);
|
||||
|
||||
@NotNull
|
||||
public String getDeploymentName(@NotNull DeploymentSource source, D configuration) {
|
||||
return getDeploymentName(source);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public String getDeploymentName(@NotNull DeploymentSource source) {
|
||||
return source.getPresentableName();
|
||||
|
||||
+1
-1
@@ -110,7 +110,7 @@ public class ServerConnectionImpl<D extends DeploymentConfiguration> implements
|
||||
@Override
|
||||
public void connected(@NotNull ServerRuntimeInstance<D> instance) {
|
||||
DeploymentSource source = task.getSource();
|
||||
String deploymentName = instance.getDeploymentName(source);
|
||||
String deploymentName = instance.getDeploymentName(source, task.getConfiguration());
|
||||
DeploymentImpl deployment;
|
||||
synchronized (myLocalDeployments) {
|
||||
deployment = new DeploymentImpl(deploymentName, DeploymentStatus.DEPLOYING, null, null, task);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2013 JetBrains s.r.o.
|
||||
* Copyright 2000-2014 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.
|
||||
@@ -15,10 +15,8 @@
|
||||
*/
|
||||
package com.intellij.psi.formatter;
|
||||
|
||||
import com.intellij.codeHighlighting.TextEditorHighlightingPass;
|
||||
import com.intellij.codeInsight.daemon.impl.CodeFoldingPassFactory;
|
||||
import com.intellij.lang.Language;
|
||||
import com.intellij.mock.MockProgressIndicator;
|
||||
import com.intellij.openapi.application.ApplicationManager;
|
||||
import com.intellij.openapi.application.ex.PathManagerEx;
|
||||
import com.intellij.openapi.command.CommandProcessor;
|
||||
@@ -42,6 +40,7 @@ import com.intellij.psi.codeStyle.CodeStyleManager;
|
||||
import com.intellij.psi.codeStyle.CodeStyleSettings;
|
||||
import com.intellij.psi.codeStyle.CodeStyleSettingsManager;
|
||||
import com.intellij.psi.codeStyle.CommonCodeStyleSettings;
|
||||
import com.intellij.testFramework.EditorTestUtil;
|
||||
import com.intellij.testFramework.LightPlatformTestCase;
|
||||
import com.intellij.util.IncorrectOperationException;
|
||||
import com.intellij.util.LocalTimeCounter;
|
||||
@@ -199,7 +198,7 @@ public abstract class FormatterTestCase extends LightPlatformTestCase {
|
||||
assertEquals(file.getText(), document.getText());
|
||||
|
||||
if (false && doCheckDocumentUpdate()) {
|
||||
makeFolding(file, editor);
|
||||
EditorTestUtil.runTextEditorHighlightingPass(editor, CodeFoldingPassFactory.class);
|
||||
}
|
||||
try {
|
||||
if (doReformatRangeTest) {
|
||||
@@ -225,13 +224,6 @@ public abstract class FormatterTestCase extends LightPlatformTestCase {
|
||||
assertEquals(textAfter, file.getText());
|
||||
}
|
||||
|
||||
protected static void makeFolding(final PsiFile file, final EditorImpl editor) {
|
||||
final CodeFoldingPassFactory factory = getProject().getComponent(CodeFoldingPassFactory.class);
|
||||
final TextEditorHighlightingPass highlightingPass = factory.createHighlightingPass(file, editor);
|
||||
highlightingPass.collectInformation(new MockProgressIndicator());
|
||||
highlightingPass.doApplyInformationToEditor();
|
||||
}
|
||||
|
||||
@SuppressWarnings({"UNUSED_SYMBOL"})
|
||||
private void checkPsi(final PsiFile file, String textAfter) {
|
||||
CommandProcessor.getInstance().executeCommand(getProject(), new Runnable() {
|
||||
|
||||
@@ -15,7 +15,10 @@
|
||||
*/
|
||||
package com.intellij.testFramework;
|
||||
|
||||
import com.intellij.codeHighlighting.TextEditorHighlightingPass;
|
||||
import com.intellij.codeHighlighting.TextEditorHighlightingPassFactory;
|
||||
import com.intellij.ide.DataManager;
|
||||
import com.intellij.mock.MockProgressIndicator;
|
||||
import com.intellij.openapi.actionSystem.*;
|
||||
import com.intellij.openapi.application.Result;
|
||||
import com.intellij.openapi.command.WriteCommandAction;
|
||||
@@ -32,10 +35,13 @@ import com.intellij.openapi.editor.impl.SoftWrapModelImpl;
|
||||
import com.intellij.openapi.editor.impl.softwrap.SoftWrapDrawingType;
|
||||
import com.intellij.openapi.editor.impl.softwrap.SoftWrapPainter;
|
||||
import com.intellij.openapi.editor.impl.softwrap.mapping.SoftWrapApplianceManager;
|
||||
import com.intellij.openapi.project.Project;
|
||||
import com.intellij.openapi.util.Ref;
|
||||
import com.intellij.openapi.util.TextRange;
|
||||
import com.intellij.openapi.util.registry.Registry;
|
||||
import com.intellij.openapi.util.text.StringUtil;
|
||||
import com.intellij.psi.PsiDocumentManager;
|
||||
import com.intellij.psi.PsiFile;
|
||||
import com.intellij.psi.tree.IElementType;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
@@ -432,6 +438,20 @@ public class EditorTestUtil {
|
||||
return ref.get();
|
||||
}
|
||||
|
||||
public static <T extends TextEditorHighlightingPassFactory> void runTextEditorHighlightingPass(@NotNull Editor editor, @NotNull Class<T> passFactory) {
|
||||
Project project = editor.getProject();
|
||||
assertNotNull(project);
|
||||
PsiDocumentManager psiDocumentManager = PsiDocumentManager.getInstance(project);
|
||||
PsiFile psiFile = psiDocumentManager.getPsiFile(editor.getDocument());
|
||||
assertNotNull(psiFile);
|
||||
|
||||
T factory = project.getComponent(passFactory);
|
||||
TextEditorHighlightingPass pass = factory.createHighlightingPass(psiFile, editor);
|
||||
assertNotNull(pass);
|
||||
pass.collectInformation(new MockProgressIndicator());
|
||||
pass.applyInformationToEditor();
|
||||
}
|
||||
|
||||
public static class CaretAndSelectionState {
|
||||
public final List<CaretInfo> carets = new ArrayList<CaretInfo>();
|
||||
@Nullable
|
||||
|
||||
@@ -174,7 +174,7 @@ public class UsageViewManagerImpl extends UsageViewManager {
|
||||
final SearchForUsagesRunnable runnable = new SearchForUsagesRunnable(myProject, usageView, presentation, searchFor, searcherFactory, processPresentation, listener);
|
||||
final Factory<ProgressIndicator> progressIndicatorFactory = processPresentation.getProgressIndicatorFactory();
|
||||
|
||||
final ProgressIndicator progressIndicator = progressIndicatorFactory != null ? progressIndicatorFactory.create() : null;
|
||||
final ProgressIndicator progressIndicator = progressIndicatorFactory == null ? null : progressIndicatorFactory.create();
|
||||
|
||||
final AtomicBoolean findUsagesStartedShown = new AtomicBoolean();
|
||||
ApplicationManager.getApplication().executeOnPooledThread(new Runnable() {
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
package com.intellij.xdebugger.impl;
|
||||
|
||||
import com.intellij.execution.ExecutionManager;
|
||||
import com.intellij.execution.configurations.RunConfiguration;
|
||||
import com.intellij.execution.configurations.RunProfile;
|
||||
import com.intellij.execution.executors.DefaultDebugExecutor;
|
||||
import com.intellij.execution.filters.HyperlinkInfo;
|
||||
@@ -922,8 +923,22 @@ public class XDebugSessionImpl implements XDebugSession {
|
||||
}
|
||||
}
|
||||
|
||||
private String getWatchesKey() {
|
||||
if (myEnvironment != null) {
|
||||
RunProfile profile = myEnvironment.getRunProfile();
|
||||
if (profile instanceof RunConfiguration) {
|
||||
return ((RunConfiguration)profile).getType().getId();
|
||||
}
|
||||
}
|
||||
return getSessionName();
|
||||
}
|
||||
|
||||
public void setWatchExpressions(@NotNull XExpression[] watchExpressions) {
|
||||
mySessionData.setWatchExpressions(watchExpressions);
|
||||
myDebuggerManager.getWatchesManager().setWatches(getSessionName(), watchExpressions);
|
||||
myDebuggerManager.getWatchesManager().setWatches(getWatchesKey(), watchExpressions);
|
||||
}
|
||||
|
||||
XExpression[] getWatchExpressions() {
|
||||
return myDebuggerManager.getWatchesManager().getWatches(getWatchesKey());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -209,7 +209,7 @@ public class XDebuggerManagerImpl extends XDebuggerManager
|
||||
|
||||
XDebugSessionData oldSessionData = contentToReuse != null ? mySessionData.get(contentToReuse) : null;
|
||||
if (oldSessionData == null) {
|
||||
oldSessionData = new XDebugSessionData(myWatchesManager.getWatches(session.getSessionName()));
|
||||
oldSessionData = new XDebugSessionData(session.getWatchExpressions());
|
||||
}
|
||||
|
||||
// Perform custom configuration of session data for XDebugProcessConfiguratorStarter classes
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
<orderEntry type="module" module-name="platform-impl" />
|
||||
<orderEntry type="module" module-name="lang-impl" />
|
||||
<orderEntry type="module" module-name="compiler-impl" />
|
||||
<orderEntry type="library" name="asm4" level="project" />
|
||||
<orderEntry type="library" name="asm5" level="project" />
|
||||
<orderEntry type="module" module-name="RegExpSupport" />
|
||||
<orderEntry type="module" module-name="platform-api" />
|
||||
<orderEntry type="module" module-name="java-impl" />
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<orderEntry type="module" module-name="platform-impl" />
|
||||
<orderEntry type="module" module-name="lang-impl" />
|
||||
<orderEntry type="module" module-name="xml" />
|
||||
<orderEntry type="library" name="asm4" level="project" />
|
||||
<orderEntry type="library" name="asm5" level="project" />
|
||||
<orderEntry type="module" module-name="RegExpSupport" />
|
||||
<orderEntry type="module" module-name="xpath" />
|
||||
<orderEntry type="module" module-name="platform-api" />
|
||||
|
||||
+3
-3
@@ -17,8 +17,8 @@ package org.jetbrains.jps.intellilang.instrumentation;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import org.jetbrains.asm4.MethodVisitor;
|
||||
import org.jetbrains.asm4.Opcodes;
|
||||
import org.jetbrains.org.objectweb.asm.MethodVisitor;
|
||||
import org.jetbrains.org.objectweb.asm.Opcodes;
|
||||
|
||||
/**
|
||||
* @author Eugene Zhuravlev
|
||||
@@ -30,7 +30,7 @@ public class ErrorPostponingMethodVisitor extends MethodVisitor {
|
||||
private final String myMethodName;
|
||||
|
||||
public ErrorPostponingMethodVisitor(@NotNull PatternInstrumenter instrumenter, String methodName, @Nullable MethodVisitor methodvisitor) {
|
||||
super(Opcodes.ASM4, methodvisitor);
|
||||
super(Opcodes.ASM5, methodvisitor);
|
||||
myInstrumenter = instrumenter;
|
||||
myMethodName = methodName;
|
||||
}
|
||||
|
||||
+6
-6
@@ -17,7 +17,7 @@ package org.jetbrains.jps.intellilang.instrumentation;
|
||||
|
||||
import org.jetbrains.annotations.NonNls;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import org.jetbrains.asm4.*;
|
||||
import org.jetbrains.org.objectweb.asm.*;
|
||||
|
||||
import java.text.MessageFormat;
|
||||
import java.util.ArrayList;
|
||||
@@ -45,7 +45,7 @@ class InstrumentationAdapter extends MethodVisitor implements Opcodes {
|
||||
Type returnType,
|
||||
int access,
|
||||
String name) {
|
||||
super(Opcodes.ASM4, methodvisitor);
|
||||
super(Opcodes.ASM5, methodvisitor);
|
||||
myInstrumenter = instrumenter;
|
||||
myArgTypes = argTypes;
|
||||
myReturnType = returnType;
|
||||
@@ -180,8 +180,8 @@ class InstrumentationAdapter extends MethodVisitor implements Opcodes {
|
||||
mv.visitIntInsn(BIPUSH, patternIndex);
|
||||
mv.visitInsn(AALOAD);
|
||||
mv.visitVarInsn(ALOAD, varIndex);
|
||||
mv.visitMethodInsn(INVOKEVIRTUAL, "java/util/regex/Pattern", "matcher", "(Ljava/lang/CharSequence;)Ljava/util/regex/Matcher;");
|
||||
mv.visitMethodInsn(INVOKEVIRTUAL, "java/util/regex/Matcher", "matches", "()Z");
|
||||
mv.visitMethodInsn(INVOKEVIRTUAL, "java/util/regex/Pattern", "matcher", "(Ljava/lang/CharSequence;)Ljava/util/regex/Matcher;", false);
|
||||
mv.visitMethodInsn(INVOKEVIRTUAL, "java/util/regex/Matcher", "matches", "()Z", false);
|
||||
|
||||
mv.visitJumpInsn(Opcodes.IFNE, label);
|
||||
}
|
||||
@@ -206,7 +206,7 @@ class InstrumentationAdapter extends MethodVisitor implements Opcodes {
|
||||
mv.visitTypeInsn(Opcodes.NEW, throwableClass);
|
||||
mv.visitInsn(Opcodes.DUP);
|
||||
mv.visitLdcInsn(message);
|
||||
mv.visitMethodInsn(Opcodes.INVOKESPECIAL, throwableClass, "<init>", ctorSignature);
|
||||
mv.visitMethodInsn(Opcodes.INVOKESPECIAL, throwableClass, "<init>", ctorSignature, false);
|
||||
mv.visitInsn(Opcodes.ATHROW);
|
||||
}
|
||||
|
||||
@@ -215,7 +215,7 @@ class InstrumentationAdapter extends MethodVisitor implements Opcodes {
|
||||
private final PatternValue myPatternValue;
|
||||
|
||||
public MyAnnotationVisitor(AnnotationVisitor annotationvisitor, PatternValue v) {
|
||||
super(Opcodes.ASM4);
|
||||
super(Opcodes.ASM5);
|
||||
av = annotationvisitor;
|
||||
myPatternValue = v;
|
||||
}
|
||||
|
||||
+6
-6
@@ -20,8 +20,8 @@ import com.intellij.openapi.util.Ref;
|
||||
import org.jetbrains.annotations.NonNls;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import org.jetbrains.asm4.*;
|
||||
import org.jetbrains.jps.intellilang.model.InstrumentationException;
|
||||
import org.jetbrains.org.objectweb.asm.*;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
@@ -53,7 +53,7 @@ class PatternInstrumenter extends ClassVisitor implements Opcodes {
|
||||
public PatternInstrumenter(@NotNull String patternAnnotationClassName, ClassVisitor classvisitor,
|
||||
InstrumentationType instrumentation,
|
||||
InstrumentationClassFinder classFinder) {
|
||||
super(Opcodes.ASM4, classvisitor);
|
||||
super(Opcodes.ASM5, classvisitor);
|
||||
myPatternAnnotationClassName = patternAnnotationClassName;
|
||||
|
||||
myInstrumentationType = instrumentation;
|
||||
@@ -156,7 +156,7 @@ class PatternInstrumenter extends ClassVisitor implements Opcodes {
|
||||
mv.visitFieldInsn(GETSTATIC, myClassName, PATTERN_CACHE_NAME, JAVA_UTIL_REGEX_PATTERN);
|
||||
mv.visitIntInsn(BIPUSH, i++);
|
||||
mv.visitLdcInsn(pattern);
|
||||
mv.visitMethodInsn(INVOKESTATIC, "java/util/regex/Pattern", "compile", "(Ljava/lang/String;)Ljava/util/regex/Pattern;");
|
||||
mv.visitMethodInsn(INVOKESTATIC, "java/util/regex/Pattern", "compile", "(Ljava/lang/String;)Ljava/util/regex/Pattern;", false);
|
||||
mv.visitInsn(AASTORE);
|
||||
}
|
||||
}
|
||||
@@ -164,7 +164,7 @@ class PatternInstrumenter extends ClassVisitor implements Opcodes {
|
||||
// add assert startup code
|
||||
private void initAssertions(MethodVisitor mv) {
|
||||
mv.visitLdcInsn(Type.getType("L" + myClassName + ";"));
|
||||
mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/Class", "desiredAssertionStatus", "()Z");
|
||||
mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/Class", "desiredAssertionStatus", "()Z", false);
|
||||
Label l0 = new Label();
|
||||
mv.visitJumpInsn(IFNE, l0);
|
||||
mv.visitInsn(ICONST_1);
|
||||
@@ -251,14 +251,14 @@ class PatternInstrumenter extends ClassVisitor implements Opcodes {
|
||||
final Ref<String> patternString = new Ref<String>(null);
|
||||
// dig into annotation class and check if it is annotated with pattern annotation.
|
||||
// if yes, load the pattern string from the pattern annotation and associate it with this annotation
|
||||
final ClassVisitor visitor = new ClassVisitor(Opcodes.ASM4) {
|
||||
final ClassVisitor visitor = new ClassVisitor(Opcodes.ASM5) {
|
||||
@Override
|
||||
public AnnotationVisitor visitAnnotation(String desc, boolean visible) {
|
||||
if (patternString.get() != null || !myPatternAnnotationClassName.equals(Type.getType(desc).getClassName())) {
|
||||
return null; // already found or is not pattern annotation
|
||||
}
|
||||
// dig into pattern annotation in order to discover the pattern string
|
||||
return new AnnotationVisitor(Opcodes.ASM4) {
|
||||
return new AnnotationVisitor(Opcodes.ASM5) {
|
||||
public void visit(@NonNls String name, Object value) {
|
||||
if ("value".equals(name) && value instanceof String) {
|
||||
patternString.set((String)value);
|
||||
|
||||
+2
-2
@@ -18,8 +18,6 @@ package org.jetbrains.jps.intellilang.instrumentation;
|
||||
import com.intellij.compiler.instrumentation.InstrumentationClassFinder;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import org.jetbrains.asm4.ClassReader;
|
||||
import org.jetbrains.asm4.ClassWriter;
|
||||
import org.jetbrains.jps.ModuleChunk;
|
||||
import org.jetbrains.jps.incremental.BinaryContent;
|
||||
import org.jetbrains.jps.incremental.CompileContext;
|
||||
@@ -30,6 +28,8 @@ import org.jetbrains.jps.incremental.messages.CompilerMessage;
|
||||
import org.jetbrains.jps.intellilang.model.InstrumentationException;
|
||||
import org.jetbrains.jps.intellilang.model.JpsIntelliLangConfiguration;
|
||||
import org.jetbrains.jps.intellilang.model.JpsIntelliLangExtensionService;
|
||||
import org.jetbrains.org.objectweb.asm.ClassReader;
|
||||
import org.jetbrains.org.objectweb.asm.ClassWriter;
|
||||
|
||||
/**
|
||||
* @author Eugene Zhuravlev
|
||||
|
||||
+4
-4
@@ -15,15 +15,15 @@
|
||||
*/
|
||||
package org.intellij.plugins.intelliLang.pattern.compiler;
|
||||
|
||||
import org.jetbrains.asm4.ClassVisitor;
|
||||
import org.jetbrains.asm4.Opcodes;
|
||||
import org.jetbrains.org.objectweb.asm.ClassVisitor;
|
||||
import org.jetbrains.org.objectweb.asm.Opcodes;
|
||||
|
||||
public abstract class Instrumenter extends ClassVisitor {
|
||||
protected Instrumenter() {
|
||||
super(Opcodes.ASM4);
|
||||
super(Opcodes.ASM5);
|
||||
}
|
||||
protected Instrumenter(ClassVisitor visitor) {
|
||||
super(Opcodes.ASM4, visitor);
|
||||
super(Opcodes.ASM5, visitor);
|
||||
}
|
||||
|
||||
public abstract boolean instrumented();
|
||||
|
||||
+6
-6
@@ -17,7 +17,7 @@ package org.intellij.plugins.intelliLang.pattern.compiler.impl;
|
||||
|
||||
import org.intellij.plugins.intelliLang.Configuration;
|
||||
import org.jetbrains.annotations.NonNls;
|
||||
import org.jetbrains.asm4.*;
|
||||
import org.jetbrains.org.objectweb.asm.*;
|
||||
|
||||
import java.text.MessageFormat;
|
||||
import java.util.ArrayList;
|
||||
@@ -46,7 +46,7 @@ class InstrumentationAdapter extends MethodVisitor implements Opcodes {
|
||||
Type returnType,
|
||||
int access,
|
||||
String name) {
|
||||
super(Opcodes.ASM4, methodvisitor);
|
||||
super(Opcodes.ASM5, methodvisitor);
|
||||
myInstrumenter = instrumenter;
|
||||
myArgTypes = argTypes;
|
||||
myReturnType = returnType;
|
||||
@@ -178,8 +178,8 @@ class InstrumentationAdapter extends MethodVisitor implements Opcodes {
|
||||
mv.visitIntInsn(BIPUSH, patternIndex);
|
||||
mv.visitInsn(AALOAD);
|
||||
mv.visitVarInsn(ALOAD, varIndex);
|
||||
mv.visitMethodInsn(INVOKEVIRTUAL, "java/util/regex/Pattern", "matcher", "(Ljava/lang/CharSequence;)Ljava/util/regex/Matcher;");
|
||||
mv.visitMethodInsn(INVOKEVIRTUAL, "java/util/regex/Matcher", "matches", "()Z");
|
||||
mv.visitMethodInsn(INVOKEVIRTUAL, "java/util/regex/Pattern", "matcher", "(Ljava/lang/CharSequence;)Ljava/util/regex/Matcher;", false);
|
||||
mv.visitMethodInsn(INVOKEVIRTUAL, "java/util/regex/Matcher", "matches", "()Z", false);
|
||||
|
||||
mv.visitJumpInsn(Opcodes.IFNE, label);
|
||||
}
|
||||
@@ -204,7 +204,7 @@ class InstrumentationAdapter extends MethodVisitor implements Opcodes {
|
||||
mv.visitTypeInsn(Opcodes.NEW, throwableClass);
|
||||
mv.visitInsn(Opcodes.DUP);
|
||||
mv.visitLdcInsn(message);
|
||||
mv.visitMethodInsn(Opcodes.INVOKESPECIAL, throwableClass, "<init>", ctorSignature);
|
||||
mv.visitMethodInsn(Opcodes.INVOKESPECIAL, throwableClass, "<init>", ctorSignature, false);
|
||||
mv.visitInsn(Opcodes.ATHROW);
|
||||
}
|
||||
|
||||
@@ -213,7 +213,7 @@ class InstrumentationAdapter extends MethodVisitor implements Opcodes {
|
||||
private final PatternValue myPatternValue;
|
||||
|
||||
public MyAnnotationVisitor(AnnotationVisitor annotationvisitor, PatternValue v) {
|
||||
super(Opcodes.ASM4);
|
||||
super(Opcodes.ASM5);
|
||||
av = annotationvisitor;
|
||||
myPatternValue = v;
|
||||
}
|
||||
|
||||
+4
-4
@@ -19,7 +19,7 @@ import org.intellij.plugins.intelliLang.Configuration;
|
||||
import org.intellij.plugins.intelliLang.pattern.compiler.InstrumentationException;
|
||||
import org.intellij.plugins.intelliLang.pattern.compiler.Instrumenter;
|
||||
import org.jetbrains.annotations.NonNls;
|
||||
import org.jetbrains.asm4.*;
|
||||
import org.jetbrains.org.objectweb.asm.*;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
@@ -140,7 +140,7 @@ public class PatternValidationInstrumenter extends Instrumenter implements Opcod
|
||||
mv.visitFieldInsn(GETSTATIC, myClassName, PATTERN_CACHE_NAME, JAVA_UTIL_REGEX_PATTERN);
|
||||
mv.visitIntInsn(BIPUSH, i++);
|
||||
mv.visitLdcInsn(pattern);
|
||||
mv.visitMethodInsn(INVOKESTATIC, "java/util/regex/Pattern", "compile", "(Ljava/lang/String;)Ljava/util/regex/Pattern;");
|
||||
mv.visitMethodInsn(INVOKESTATIC, "java/util/regex/Pattern", "compile", "(Ljava/lang/String;)Ljava/util/regex/Pattern;", false);
|
||||
mv.visitInsn(AASTORE);
|
||||
}
|
||||
}
|
||||
@@ -148,7 +148,7 @@ public class PatternValidationInstrumenter extends Instrumenter implements Opcod
|
||||
// add assert startup code
|
||||
private void initAssertions(MethodVisitor mv) {
|
||||
mv.visitLdcInsn(Type.getType("L" + myClassName + ";"));
|
||||
mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/Class", "desiredAssertionStatus", "()Z");
|
||||
mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/Class", "desiredAssertionStatus", "()Z", false);
|
||||
Label l0 = new Label();
|
||||
mv.visitJumpInsn(IFNE, l0);
|
||||
mv.visitInsn(ICONST_1);
|
||||
@@ -167,7 +167,7 @@ public class PatternValidationInstrumenter extends Instrumenter implements Opcod
|
||||
if ((access & ACC_STATIC) != 0 && name.equals("<clinit>")) {
|
||||
myHasStaticInitializer = true;
|
||||
|
||||
return new MethodVisitor(Opcodes.ASM4, methodvisitor) {
|
||||
return new MethodVisitor(Opcodes.ASM5, methodvisitor) {
|
||||
public void visitCode() {
|
||||
super.visitCode();
|
||||
patchStaticInitializer(mv);
|
||||
|
||||
+39
-25
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2001-2013 the original author or authors.
|
||||
* Copyright 2001-2014 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -18,9 +18,14 @@ package org.jetbrains.generate.tostring.inspection;
|
||||
import com.intellij.codeInsight.TestFrameworks;
|
||||
import com.intellij.codeInspection.ProblemHighlightType;
|
||||
import com.intellij.codeInspection.ProblemsHolder;
|
||||
import com.intellij.codeInspection.ui.RegExFormatter;
|
||||
import com.intellij.codeInspection.ui.RegExInputVerifier;
|
||||
import com.intellij.openapi.ui.Messages;
|
||||
import com.intellij.psi.*;
|
||||
import com.intellij.psi.util.InheritanceUtil;
|
||||
import com.intellij.ui.DocumentAdapter;
|
||||
import com.intellij.util.ui.CheckBox;
|
||||
import com.intellij.util.ui.UIUtil;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.generate.tostring.GenerateToStringContext;
|
||||
import org.jetbrains.generate.tostring.GenerateToStringUtils;
|
||||
@@ -31,6 +36,8 @@ import javax.swing.event.DocumentEvent;
|
||||
import javax.swing.event.DocumentListener;
|
||||
import javax.swing.text.Document;
|
||||
import java.awt.*;
|
||||
import java.util.regex.Pattern;
|
||||
import java.util.regex.PatternSyntaxException;
|
||||
|
||||
/**
|
||||
* Inspection to check if the current class overrides the toString() method.
|
||||
@@ -42,6 +49,8 @@ public class ClassHasNoToStringMethodInspection extends AbstractToStringInspecti
|
||||
|
||||
/** User options for classes to exclude. Must be a regexp pattern */
|
||||
public String excludeClassNames = ""; // must be public for JDOMSerialization
|
||||
private Pattern excludeClassNamesPattern;
|
||||
|
||||
/** User options for excluded exception classes */
|
||||
public boolean excludeException = true; // must be public for JDOMSerialization
|
||||
/** User options for excluded deprecated classes */
|
||||
@@ -55,7 +64,14 @@ public class ClassHasNoToStringMethodInspection extends AbstractToStringInspecti
|
||||
|
||||
public boolean excludeInnerClasses = false;
|
||||
|
||||
@Override
|
||||
public ClassHasNoToStringMethodInspection() {
|
||||
try {
|
||||
excludeClassNamesPattern = Pattern.compile(excludeClassNames);
|
||||
} catch (PatternSyntaxException e) {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@NotNull
|
||||
public String getDisplayName() {
|
||||
return "Class does not override 'toString()' method";
|
||||
@@ -101,11 +117,13 @@ public class ClassHasNoToStringMethodInspection extends AbstractToStringInspecti
|
||||
}
|
||||
|
||||
// if it is an excluded class - then skip
|
||||
if (StringUtil.isNotEmpty(excludeClassNames)) {
|
||||
String name = clazz.getName();
|
||||
if (name != null && name.matches(excludeClassNames)) {
|
||||
return;
|
||||
}
|
||||
if (excludeClassNamesPattern != null) {
|
||||
try {
|
||||
String name = clazz.getName();
|
||||
if (name != null && excludeClassNamesPattern.matcher(name).matches()) {
|
||||
return;
|
||||
}
|
||||
} catch (PatternSyntaxException ignore) {}
|
||||
}
|
||||
|
||||
// must have fields
|
||||
@@ -170,27 +188,23 @@ public class ClassHasNoToStringMethodInspection extends AbstractToStringInspecti
|
||||
constraints.fill = GridBagConstraints.NONE;
|
||||
panel.add(new JLabel("Exclude classes (reg exp):"), constraints);
|
||||
|
||||
final JTextField excludeClassNamesField = new JTextField(excludeClassNames, 40);
|
||||
excludeClassNamesField.setMinimumSize(new Dimension(140, 20));
|
||||
final JFormattedTextField excludeClassNamesField = new JFormattedTextField(new RegExFormatter());
|
||||
excludeClassNamesField.setValue(excludeClassNamesPattern);
|
||||
excludeClassNamesField.setColumns(25);
|
||||
excludeClassNamesField.setInputVerifier(new RegExInputVerifier());
|
||||
excludeClassNamesField.setFocusLostBehavior(JFormattedTextField.COMMIT);
|
||||
excludeClassNamesField.setMinimumSize(excludeClassNamesField.getPreferredSize());
|
||||
UIUtil.fixFormattedField(excludeClassNamesField);
|
||||
Document document = excludeClassNamesField.getDocument();
|
||||
document.addDocumentListener(new DocumentListener() {
|
||||
@Override
|
||||
public void changedUpdate(DocumentEvent e) {
|
||||
textChanged();
|
||||
}
|
||||
document.addDocumentListener(new DocumentAdapter() {
|
||||
|
||||
@Override
|
||||
public void insertUpdate(DocumentEvent e) {
|
||||
textChanged();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void removeUpdate(DocumentEvent e) {
|
||||
textChanged();
|
||||
}
|
||||
|
||||
private void textChanged() {
|
||||
excludeClassNames = excludeClassNamesField.getText();
|
||||
protected void textChanged(DocumentEvent e) {
|
||||
try {
|
||||
excludeClassNamesField.commitEdit();
|
||||
excludeClassNamesPattern = (Pattern)excludeClassNamesField.getValue();
|
||||
excludeClassNames = excludeClassNamesPattern.pattern();
|
||||
} catch (final Exception ignore) {}
|
||||
}
|
||||
});
|
||||
constraints.gridx = 1;
|
||||
|
||||
@@ -25,6 +25,7 @@ import com.intellij.openapi.diagnostic.Logger;
|
||||
import com.intellij.openapi.project.Project;
|
||||
import com.intellij.openapi.util.Couple;
|
||||
import com.intellij.openapi.util.Pair;
|
||||
import com.intellij.openapi.util.Ref;
|
||||
import com.intellij.openapi.util.text.StringUtil;
|
||||
import com.intellij.util.AuthData;
|
||||
import com.intellij.util.UriUtil;
|
||||
@@ -126,15 +127,8 @@ class GitHttpGuiAuthenticator implements GitHttpAuthenticator {
|
||||
return login;
|
||||
}
|
||||
|
||||
final AuthDialog dialog = new AuthDialog(myProject, myTitle, "Enter credentials for " + url, login, null, true);
|
||||
ApplicationManager.getApplication().invokeAndWait(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
dialog.show();
|
||||
}
|
||||
}, myModalityState == null ? ModalityState.defaultModalityState() : myModalityState);
|
||||
|
||||
if (!dialog.isOK()) {
|
||||
AuthDialog dialog = showAuthDialog(url, login);
|
||||
if (dialog == null || !dialog.isOK()) {
|
||||
myWasCancelled = true;
|
||||
return "";
|
||||
}
|
||||
@@ -149,6 +143,19 @@ class GitHttpGuiAuthenticator implements GitHttpAuthenticator {
|
||||
return myLogin;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
private AuthDialog showAuthDialog(final String url, final String login) {
|
||||
final Ref<AuthDialog> dialog = Ref.create();
|
||||
ApplicationManager.getApplication().invokeAndWait(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
dialog.set(new AuthDialog(myProject, myTitle, "Enter credentials for " + url, login, null, true));
|
||||
dialog.get().show();
|
||||
}
|
||||
}, myModalityState == null ? ModalityState.defaultModalityState() : myModalityState);
|
||||
return dialog.get();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void saveAuthData() {
|
||||
// save login and url
|
||||
|
||||
@@ -25,8 +25,7 @@
|
||||
<depends optional="true" config-file="groovy-copyright.xml">com.intellij.copyright</depends>
|
||||
<depends optional="true" config-file="intellilang-groovy-support.xml">org.intellij.intelliLang</depends>
|
||||
<depends optional="true">AntSupport</depends>
|
||||
<depends optional="true">cucumber</depends>
|
||||
<depends optional="true">ByteCodeViewer</depends>
|
||||
<depends optional="true" config-file="groovy-byte-code-viewer.xml">ByteCodeViewer</depends>
|
||||
|
||||
<extensionPoints>
|
||||
<extensionPoint name="methodComparator" interface="org.jetbrains.plugins.groovy.lang.resolve.GrMethodComparator"/>
|
||||
@@ -1510,10 +1509,6 @@
|
||||
<codeFragmentFactory implementation="org.jetbrains.plugins.groovy.debugger.GroovyCodeFragmentFactory"/>
|
||||
</extensions>
|
||||
|
||||
<extensions defaultExtensionNs="ByteCodeViewer">
|
||||
<classSearcher implementation="org.jetbrains.plugins.groovy.byteCodeViewer.GroovyScriptClassSearcher"/>
|
||||
</extensions>
|
||||
|
||||
<actions>
|
||||
<action id="Groovy.Shell.Execute" class="com.intellij.openapi.actionSystem.EmptyAction" text="Execute Groovy Code"
|
||||
description="Execute Groovy code in console">
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
<idea-plugin>
|
||||
<extensions defaultExtensionNs="ByteCodeViewer">
|
||||
<classSearcher implementation="org.jetbrains.plugins.groovy.byteCodeViewer.GroovyScriptClassSearcher"/>
|
||||
</extensions>
|
||||
</idea-plugin>
|
||||
+1
-1
@@ -30,7 +30,6 @@ import com.intellij.util.lang.UrlClassLoader;
|
||||
import gnu.trove.THashMap;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import org.jetbrains.asm4.ClassReader;
|
||||
import org.jetbrains.groovy.compiler.rt.GroovyRtConstants;
|
||||
import org.jetbrains.jps.ModuleChunk;
|
||||
import org.jetbrains.jps.ProjectPaths;
|
||||
@@ -58,6 +57,7 @@ import org.jetbrains.jps.model.java.compiler.JpsJavaCompilerConfiguration;
|
||||
import org.jetbrains.jps.model.library.sdk.JpsSdk;
|
||||
import org.jetbrains.jps.service.JpsServiceManager;
|
||||
import org.jetbrains.jps.service.SharedThreadPool;
|
||||
import org.jetbrains.org.objectweb.asm.ClassReader;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
|
||||
@@ -25,6 +25,7 @@ import com.intellij.openapi.vcs.VcsException;
|
||||
import com.intellij.openapi.vcs.changes.Change;
|
||||
import com.intellij.openapi.vcs.changes.ChangeList;
|
||||
import com.intellij.openapi.vcs.changes.ContentRevision;
|
||||
import com.intellij.openapi.vcs.changes.VcsDirtyScopeManager;
|
||||
import com.intellij.openapi.vcs.checkin.CheckinEnvironment;
|
||||
import com.intellij.openapi.vcs.ui.RefreshableOnComponent;
|
||||
import com.intellij.openapi.vfs.VirtualFile;
|
||||
@@ -109,6 +110,11 @@ public class HgCheckinEnvironment implements CheckinEnvironment {
|
||||
//abort
|
||||
return exceptions;
|
||||
}
|
||||
//firstly selected changes marked dirty in CommitHelper -> postRefresh, so we need to mark others
|
||||
VcsDirtyScopeManager dirtyManager = VcsDirtyScopeManager.getInstance(myProject);
|
||||
for (HgFile hgFile : changedFilesNotInCommit) {
|
||||
dirtyManager.fileDirty(hgFile.toFilePath());
|
||||
}
|
||||
}
|
||||
// else : all was included, or it was OK to commit everything,
|
||||
// so no need to set the files on the command, because then mercurial will complain
|
||||
|
||||
+1
-1
@@ -27,7 +27,6 @@ import com.intellij.uiDesigner.lw.LwRootContainer;
|
||||
import gnu.trove.THashMap;
|
||||
import gnu.trove.THashSet;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import org.jetbrains.asm4.ClassReader;
|
||||
import org.jetbrains.jps.ModuleChunk;
|
||||
import org.jetbrains.jps.ProjectPaths;
|
||||
import org.jetbrains.jps.builders.DirtyFilesHolder;
|
||||
@@ -43,6 +42,7 @@ import org.jetbrains.jps.incremental.storage.OneToManyPathsMapping;
|
||||
import org.jetbrains.jps.model.JpsProject;
|
||||
import org.jetbrains.jps.uiDesigner.model.JpsUiDesignerConfiguration;
|
||||
import org.jetbrains.jps.uiDesigner.model.JpsUiDesignerExtensionService;
|
||||
import org.jetbrains.org.objectweb.asm.ClassReader;
|
||||
|
||||
import java.io.*;
|
||||
import java.util.*;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user