mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Merge remote branch 'origin/master'
This commit is contained in:
Generated
+9
@@ -0,0 +1,9 @@
|
||||
<component name="libraryTable">
|
||||
<library name="asm4">
|
||||
<CLASSES>
|
||||
<root url="jar://$PROJECT_DIR$/lib/asm4-all.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
</library>
|
||||
</component>
|
||||
@@ -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="asm" level="project" />
|
||||
<orderEntry type="library" name="asm4" 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
-13
@@ -19,11 +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.objectweb.asm.*;
|
||||
import org.objectweb.asm.Label;
|
||||
import org.objectweb.asm.commons.EmptyVisitor;
|
||||
import org.objectweb.asm.commons.GeneratorAdapter;
|
||||
import org.objectweb.asm.commons.Method;
|
||||
import org.jetbrains.asm4.*;
|
||||
import org.jetbrains.asm4.Label;
|
||||
import org.jetbrains.asm4.commons.GeneratorAdapter;
|
||||
import org.jetbrains.asm4.commons.Method;
|
||||
|
||||
import javax.swing.*;
|
||||
import javax.swing.border.Border;
|
||||
@@ -229,7 +228,7 @@ public class AsmCodeGenerator {
|
||||
return Type.getType("L" + className.replace('.', '/') + ";");
|
||||
}
|
||||
|
||||
class FormClassVisitor extends ClassAdapter {
|
||||
class FormClassVisitor extends ClassVisitor {
|
||||
private String myClassName;
|
||||
private String mySuperName;
|
||||
private final Map myFieldDescMap = new HashMap();
|
||||
@@ -239,7 +238,7 @@ public class AsmCodeGenerator {
|
||||
private final boolean myExplicitSetupCall;
|
||||
|
||||
public FormClassVisitor(final ClassVisitor cv, final boolean explicitSetupCall) {
|
||||
super(cv);
|
||||
super(Opcodes.ASM4, cv);
|
||||
myExplicitSetupCall = explicitSetupCall;
|
||||
}
|
||||
|
||||
@@ -893,7 +892,7 @@ public class AsmCodeGenerator {
|
||||
}
|
||||
}
|
||||
|
||||
private class FormConstructorVisitor extends MethodAdapter {
|
||||
private class FormConstructorVisitor extends MethodVisitor {
|
||||
private final String myClassName;
|
||||
private final String mySuperName;
|
||||
private boolean callsSelfConstructor = false;
|
||||
@@ -901,7 +900,7 @@ public class AsmCodeGenerator {
|
||||
private boolean mySuperCalled = false;
|
||||
|
||||
public FormConstructorVisitor(final MethodVisitor mv, final String className, final String superName) {
|
||||
super(mv);
|
||||
super(Opcodes.ASM4, mv);
|
||||
myClassName = className;
|
||||
mySuperName = superName;
|
||||
}
|
||||
@@ -954,11 +953,11 @@ public class AsmCodeGenerator {
|
||||
}
|
||||
}
|
||||
|
||||
private static class FirstPassClassVisitor extends ClassAdapter {
|
||||
private static class FirstPassClassVisitor extends ClassVisitor {
|
||||
private boolean myExplicitSetupCall = false;
|
||||
|
||||
public FirstPassClassVisitor() {
|
||||
super(new EmptyVisitor());
|
||||
super(Opcodes.ASM4, new ClassVisitor(Opcodes.ASM4){});
|
||||
}
|
||||
|
||||
public MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions) {
|
||||
@@ -972,9 +971,9 @@ public class AsmCodeGenerator {
|
||||
return myExplicitSetupCall;
|
||||
}
|
||||
|
||||
private class FirstPassConstructorVisitor extends MethodAdapter {
|
||||
private class FirstPassConstructorVisitor extends MethodVisitor {
|
||||
public FirstPassConstructorVisitor() {
|
||||
super(new EmptyVisitor());
|
||||
super(Opcodes.ASM4, new MethodVisitor(Opcodes.ASM4){});
|
||||
}
|
||||
|
||||
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.objectweb.asm.Type;
|
||||
import org.objectweb.asm.commons.GeneratorAdapter;
|
||||
import org.objectweb.asm.commons.Method;
|
||||
import org.jetbrains.asm4.Type;
|
||||
import org.jetbrains.asm4.commons.GeneratorAdapter;
|
||||
import org.jetbrains.asm4.commons.Method;
|
||||
|
||||
import java.awt.*;
|
||||
|
||||
|
||||
+3
-3
@@ -16,9 +16,9 @@
|
||||
package com.intellij.uiDesigner.compiler;
|
||||
|
||||
import com.intellij.uiDesigner.lw.ColorDescriptor;
|
||||
import org.objectweb.asm.Type;
|
||||
import org.objectweb.asm.commons.GeneratorAdapter;
|
||||
import org.objectweb.asm.commons.Method;
|
||||
import org.jetbrains.asm4.Type;
|
||||
import org.jetbrains.asm4.commons.GeneratorAdapter;
|
||||
import org.jetbrains.asm4.commons.Method;
|
||||
|
||||
import java.awt.*;
|
||||
|
||||
|
||||
+3
-3
@@ -15,9 +15,9 @@
|
||||
*/
|
||||
package com.intellij.uiDesigner.compiler;
|
||||
|
||||
import org.objectweb.asm.commons.GeneratorAdapter;
|
||||
import org.objectweb.asm.commons.Method;
|
||||
import org.objectweb.asm.Type;
|
||||
import org.jetbrains.asm4.Type;
|
||||
import org.jetbrains.asm4.commons.GeneratorAdapter;
|
||||
import org.jetbrains.asm4.commons.Method;
|
||||
|
||||
import java.awt.*;
|
||||
|
||||
|
||||
+2
-2
@@ -16,8 +16,8 @@
|
||||
|
||||
package com.intellij.uiDesigner.compiler;
|
||||
|
||||
import org.objectweb.asm.commons.GeneratorAdapter;
|
||||
import org.objectweb.asm.Type;
|
||||
import org.jetbrains.asm4.Type;
|
||||
import org.jetbrains.asm4.commons.GeneratorAdapter;
|
||||
|
||||
/**
|
||||
* @author yole
|
||||
|
||||
+4
-4
@@ -18,11 +18,11 @@ package com.intellij.uiDesigner.compiler;
|
||||
|
||||
import com.intellij.uiDesigner.lw.LwComponent;
|
||||
import com.intellij.uiDesigner.lw.LwContainer;
|
||||
import org.objectweb.asm.Type;
|
||||
import org.objectweb.asm.commons.GeneratorAdapter;
|
||||
import org.objectweb.asm.commons.Method;
|
||||
import org.jetbrains.asm4.Type;
|
||||
import org.jetbrains.asm4.commons.GeneratorAdapter;
|
||||
import org.jetbrains.asm4.commons.Method;
|
||||
|
||||
import java.awt.FlowLayout;
|
||||
import java.awt.*;
|
||||
|
||||
/**
|
||||
* @author yole
|
||||
|
||||
+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.objectweb.asm.Type;
|
||||
import org.objectweb.asm.commons.GeneratorAdapter;
|
||||
import org.objectweb.asm.commons.Method;
|
||||
import org.jetbrains.asm4.Type;
|
||||
import org.jetbrains.asm4.commons.GeneratorAdapter;
|
||||
import org.jetbrains.asm4.commons.Method;
|
||||
|
||||
import java.awt.*;
|
||||
|
||||
|
||||
+7
-7
@@ -16,17 +16,17 @@
|
||||
|
||||
package com.intellij.uiDesigner.compiler;
|
||||
|
||||
import com.intellij.uiDesigner.core.GridConstraints;
|
||||
import com.intellij.uiDesigner.lw.LwComponent;
|
||||
import com.intellij.uiDesigner.lw.LwContainer;
|
||||
import com.intellij.uiDesigner.core.GridConstraints;
|
||||
import com.jgoodies.forms.layout.FormLayout;
|
||||
import com.jgoodies.forms.layout.CellConstraints;
|
||||
import org.objectweb.asm.Type;
|
||||
import org.objectweb.asm.Opcodes;
|
||||
import org.objectweb.asm.commons.GeneratorAdapter;
|
||||
import org.objectweb.asm.commons.Method;
|
||||
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 java.awt.Insets;
|
||||
import java.awt.*;
|
||||
|
||||
/**
|
||||
* @author yole
|
||||
|
||||
+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.objectweb.asm.Type;
|
||||
import org.objectweb.asm.commons.GeneratorAdapter;
|
||||
import org.objectweb.asm.commons.Method;
|
||||
import org.jetbrains.asm4.Type;
|
||||
import org.jetbrains.asm4.commons.GeneratorAdapter;
|
||||
import org.jetbrains.asm4.commons.Method;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.awt.*;
|
||||
|
||||
+4
-4
@@ -15,13 +15,13 @@
|
||||
*/
|
||||
package com.intellij.uiDesigner.compiler;
|
||||
|
||||
import com.intellij.uiDesigner.core.GridLayoutManager;
|
||||
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.objectweb.asm.Type;
|
||||
import org.objectweb.asm.commons.GeneratorAdapter;
|
||||
import org.objectweb.asm.commons.Method;
|
||||
import org.jetbrains.asm4.Type;
|
||||
import org.jetbrains.asm4.commons.GeneratorAdapter;
|
||||
import org.jetbrains.asm4.commons.Method;
|
||||
|
||||
/**
|
||||
* @author yole
|
||||
|
||||
+3
-3
@@ -15,10 +15,10 @@
|
||||
*/
|
||||
package com.intellij.uiDesigner.compiler;
|
||||
|
||||
import org.objectweb.asm.commons.GeneratorAdapter;
|
||||
import org.objectweb.asm.commons.Method;
|
||||
import org.objectweb.asm.Type;
|
||||
import com.intellij.uiDesigner.lw.IconDescriptor;
|
||||
import org.jetbrains.asm4.Type;
|
||||
import org.jetbrains.asm4.commons.GeneratorAdapter;
|
||||
import org.jetbrains.asm4.commons.Method;
|
||||
|
||||
import javax.swing.*;
|
||||
|
||||
|
||||
+3
-3
@@ -15,9 +15,9 @@
|
||||
*/
|
||||
package com.intellij.uiDesigner.compiler;
|
||||
|
||||
import org.objectweb.asm.Type;
|
||||
import org.objectweb.asm.commons.GeneratorAdapter;
|
||||
import org.objectweb.asm.commons.Method;
|
||||
import org.jetbrains.asm4.Type;
|
||||
import org.jetbrains.asm4.commons.GeneratorAdapter;
|
||||
import org.jetbrains.asm4.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.objectweb.asm.commons.GeneratorAdapter;
|
||||
import org.objectweb.asm.commons.Method;
|
||||
import org.objectweb.asm.Opcodes;
|
||||
import org.objectweb.asm.Type;
|
||||
import org.jetbrains.asm4.Opcodes;
|
||||
import org.jetbrains.asm4.Type;
|
||||
import org.jetbrains.asm4.commons.GeneratorAdapter;
|
||||
import org.jetbrains.asm4.commons.Method;
|
||||
|
||||
import java.awt.*;
|
||||
|
||||
|
||||
+3
-3
@@ -16,9 +16,9 @@
|
||||
|
||||
package com.intellij.uiDesigner.compiler;
|
||||
|
||||
import org.objectweb.asm.Type;
|
||||
import org.objectweb.asm.commons.GeneratorAdapter;
|
||||
import org.objectweb.asm.commons.Method;
|
||||
import org.jetbrains.asm4.Type;
|
||||
import org.jetbrains.asm4.commons.GeneratorAdapter;
|
||||
import org.jetbrains.asm4.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.objectweb.asm.commons.GeneratorAdapter;
|
||||
import org.jetbrains.asm4.commons.GeneratorAdapter;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
|
||||
+3
-3
@@ -15,9 +15,9 @@
|
||||
*/
|
||||
package com.intellij.uiDesigner.compiler;
|
||||
|
||||
import org.objectweb.asm.commons.GeneratorAdapter;
|
||||
import org.objectweb.asm.commons.Method;
|
||||
import org.objectweb.asm.Type;
|
||||
import org.jetbrains.asm4.Type;
|
||||
import org.jetbrains.asm4.commons.GeneratorAdapter;
|
||||
import org.jetbrains.asm4.commons.Method;
|
||||
|
||||
import java.awt.*;
|
||||
|
||||
|
||||
+3
-3
@@ -17,9 +17,9 @@
|
||||
package com.intellij.uiDesigner.compiler;
|
||||
|
||||
import com.intellij.uiDesigner.lw.LwComponent;
|
||||
import org.objectweb.asm.Type;
|
||||
import org.objectweb.asm.commons.GeneratorAdapter;
|
||||
import org.objectweb.asm.commons.Method;
|
||||
import org.jetbrains.asm4.Type;
|
||||
import org.jetbrains.asm4.commons.GeneratorAdapter;
|
||||
import org.jetbrains.asm4.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.objectweb.asm.Type;
|
||||
import org.objectweb.asm.commons.GeneratorAdapter;
|
||||
import org.objectweb.asm.commons.Method;
|
||||
import org.jetbrains.asm4.Type;
|
||||
import org.jetbrains.asm4.commons.GeneratorAdapter;
|
||||
import org.jetbrains.asm4.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.objectweb.asm.Type;
|
||||
import org.objectweb.asm.commons.GeneratorAdapter;
|
||||
import org.objectweb.asm.commons.Method;
|
||||
import org.jetbrains.asm4.Type;
|
||||
import org.jetbrains.asm4.commons.GeneratorAdapter;
|
||||
import org.jetbrains.asm4.commons.Method;
|
||||
|
||||
import javax.swing.*;
|
||||
|
||||
|
||||
+6
-6
@@ -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.objectweb.asm.Label;
|
||||
import org.objectweb.asm.MethodVisitor;
|
||||
import org.objectweb.asm.Opcodes;
|
||||
import org.objectweb.asm.Type;
|
||||
import org.objectweb.asm.commons.GeneratorAdapter;
|
||||
import org.objectweb.asm.commons.Method;
|
||||
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 javax.swing.*;
|
||||
import java.io.IOException;
|
||||
|
||||
+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.objectweb.asm.Type;
|
||||
import org.objectweb.asm.commons.GeneratorAdapter;
|
||||
import org.objectweb.asm.commons.Method;
|
||||
import org.jetbrains.asm4.Type;
|
||||
import org.jetbrains.asm4.commons.GeneratorAdapter;
|
||||
import org.jetbrains.asm4.commons.Method;
|
||||
|
||||
import javax.swing.*;
|
||||
|
||||
|
||||
+2
-2
@@ -17,8 +17,8 @@
|
||||
package com.intellij.uiDesigner.compiler;
|
||||
|
||||
import com.intellij.uiDesigner.lw.LwComponent;
|
||||
import org.objectweb.asm.commons.GeneratorAdapter;
|
||||
import org.objectweb.asm.commons.Method;
|
||||
import org.jetbrains.asm4.commons.GeneratorAdapter;
|
||||
import org.jetbrains.asm4.commons.Method;
|
||||
|
||||
/**
|
||||
* @author yole
|
||||
|
||||
@@ -15,7 +15,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="asm" level="project" />
|
||||
<orderEntry type="library" name="asm4" level="project" />
|
||||
<orderEntry type="library" name="Eclipse" level="project" />
|
||||
<orderEntry type="module" module-name="platform-api" />
|
||||
<orderEntry type="module" module-name="lang-impl" />
|
||||
|
||||
@@ -291,7 +291,7 @@ public class CompileServerManager implements ApplicationComponent{
|
||||
if (openProjects.length > 0) {
|
||||
final List<RequestFuture> futures = new ArrayList<RequestFuture>();
|
||||
for (final Project project : openProjects) {
|
||||
if (project.isDefault()) {
|
||||
if (project.isDefault() || project.isDisposed()) {
|
||||
continue;
|
||||
}
|
||||
final CompilerWorkspaceConfiguration config = CompilerWorkspaceConfiguration.getInstance(project);
|
||||
|
||||
@@ -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.objectweb.asm.ClassWriter;
|
||||
import org.jetbrains.asm4.ClassWriter;
|
||||
|
||||
/**
|
||||
* @author yole
|
||||
|
||||
@@ -108,8 +108,7 @@ public class BuildPropertiesImpl extends BuildProperties {
|
||||
Path javac2 = new Path(PROPERTY_JAVAC2_CLASSPATH_ID);
|
||||
javac2.add(new PathElement(propertyRelativePath(PROPERTY_JAVAC2_HOME, "javac2.jar")));
|
||||
javac2.add(new PathElement(propertyRelativePath(PROPERTY_JAVAC2_HOME, "jdom.jar")));
|
||||
javac2.add(new PathElement(propertyRelativePath(PROPERTY_JAVAC2_HOME, "asm.jar")));
|
||||
javac2.add(new PathElement(propertyRelativePath(PROPERTY_JAVAC2_HOME, "asm-commons.jar")));
|
||||
javac2.add(new PathElement(propertyRelativePath(PROPERTY_JAVAC2_HOME, "asm4-all.jar")));
|
||||
javac2.add(new PathElement(propertyRelativePath(PROPERTY_JAVAC2_HOME, "jgoodies-forms.jar")));
|
||||
add(javac2);
|
||||
//noinspection HardCodedStringLiteral
|
||||
|
||||
+2
-2
@@ -64,8 +64,8 @@ import gnu.trove.THashMap;
|
||||
import org.jetbrains.annotations.NonNls;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import org.objectweb.asm.ClassReader;
|
||||
import org.objectweb.asm.ClassWriter;
|
||||
import org.jetbrains.asm4.ClassReader;
|
||||
import org.jetbrains.asm4.ClassWriter;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
<orderEntry type="library" name="asm" level="project" />
|
||||
<orderEntry type="library" name="asm4" level="project" />
|
||||
</component>
|
||||
</module>
|
||||
|
||||
|
||||
+9
-5
@@ -1,9 +1,9 @@
|
||||
package com.intellij.compiler.instrumentation;
|
||||
|
||||
import org.objectweb.asm.ClassReader;
|
||||
import org.objectweb.asm.MethodVisitor;
|
||||
import org.objectweb.asm.Opcodes;
|
||||
import org.objectweb.asm.commons.EmptyVisitor;
|
||||
import org.jetbrains.asm4.ClassReader;
|
||||
import org.jetbrains.asm4.ClassVisitor;
|
||||
import org.jetbrains.asm4.MethodVisitor;
|
||||
import org.jetbrains.asm4.Opcodes;
|
||||
import sun.misc.Resource;
|
||||
|
||||
import java.io.*;
|
||||
@@ -331,13 +331,17 @@ public class InstrumentationClassFinder {
|
||||
}
|
||||
}
|
||||
|
||||
private static class V extends EmptyVisitor {
|
||||
private static class V extends ClassVisitor {
|
||||
public String mySuperclassName = null;
|
||||
public String[] myInterfaces = null;
|
||||
public String myName = null;
|
||||
public int myModifiers;
|
||||
private final List<PseudoMethod> myMethods = new ArrayList<PseudoMethod>();
|
||||
|
||||
private V() {
|
||||
super(Opcodes.ASM4);
|
||||
}
|
||||
|
||||
public MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions) {
|
||||
if ((access & Opcodes.ACC_PUBLIC) > 0) {
|
||||
myMethods.add(new PseudoMethod(access, name, desc));
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
package com.intellij.compiler.instrumentation;
|
||||
|
||||
import org.objectweb.asm.ClassWriter;
|
||||
import org.jetbrains.asm4.ClassWriter;
|
||||
|
||||
/**
|
||||
* @author Eugene Zhuravlev
|
||||
|
||||
+4
-4
@@ -15,7 +15,7 @@
|
||||
*/
|
||||
package com.intellij.compiler.notNullVerification;
|
||||
|
||||
import org.objectweb.asm.*;
|
||||
import org.jetbrains.asm4.*;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
@@ -23,7 +23,7 @@ import java.util.ArrayList;
|
||||
* @author ven
|
||||
* @noinspection HardCodedStringLiteral
|
||||
*/
|
||||
public class NotNullVerifyingInstrumenter extends ClassAdapter implements Opcodes {
|
||||
public class NotNullVerifyingInstrumenter extends ClassVisitor implements Opcodes {
|
||||
private boolean myIsModification = false;
|
||||
private String myClassName;
|
||||
public static final String NOT_NULL = "org/jetbrains/annotations/NotNull";
|
||||
@@ -33,7 +33,7 @@ public class NotNullVerifyingInstrumenter extends ClassAdapter implements Opcode
|
||||
private static final String CONSTRUCTOR_NAME = "<init>";
|
||||
|
||||
public NotNullVerifyingInstrumenter(final ClassVisitor classVisitor) {
|
||||
super(classVisitor);
|
||||
super(Opcodes.ASM4, classVisitor);
|
||||
}
|
||||
|
||||
public boolean isModification() {
|
||||
@@ -63,7 +63,7 @@ public class NotNullVerifyingInstrumenter extends ClassAdapter implements Opcode
|
||||
desc,
|
||||
signature,
|
||||
exceptions);
|
||||
return new MethodAdapter(v) {
|
||||
return new MethodVisitor(Opcodes.ASM4, v) {
|
||||
|
||||
private final ArrayList myNotNullParams = new ArrayList();
|
||||
private int mySyntheticCount = 0;
|
||||
|
||||
@@ -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="asm" level="project" />
|
||||
<orderEntry type="library" name="asm4" level="project" />
|
||||
<orderEntry type="module" module-name="instrumentation-util" />
|
||||
</component>
|
||||
<component name="copyright">
|
||||
|
||||
@@ -22,10 +22,10 @@ import com.intellij.uiDesigner.compiler.*;
|
||||
import com.intellij.uiDesigner.lw.CompiledClassPropertiesProvider;
|
||||
import com.intellij.uiDesigner.lw.LwRootContainer;
|
||||
import org.apache.tools.ant.Project;
|
||||
import org.objectweb.asm.ClassReader;
|
||||
import org.objectweb.asm.ClassWriter;
|
||||
import org.objectweb.asm.Opcodes;
|
||||
import org.objectweb.asm.commons.EmptyVisitor;
|
||||
import org.jetbrains.asm4.ClassReader;
|
||||
import org.jetbrains.asm4.ClassVisitor;
|
||||
import org.jetbrains.asm4.ClassWriter;
|
||||
import org.jetbrains.asm4.Opcodes;
|
||||
|
||||
import java.io.*;
|
||||
import java.net.MalformedURLException;
|
||||
@@ -53,7 +53,7 @@ public class InstrumentationUtil {
|
||||
|
||||
public static int getClassFileVersion(ClassReader reader) {
|
||||
final int[] classfileVersion = new int[1];
|
||||
reader.accept(new EmptyVisitor() {
|
||||
reader.accept(new ClassVisitor(Opcodes.ASM4) {
|
||||
public void visit(int version, int access, String name, String signature, String superName, String[] interfaces) {
|
||||
classfileVersion[0] = version;
|
||||
}
|
||||
|
||||
@@ -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.objectweb.asm.ClassReader;
|
||||
import org.objectweb.asm.ClassWriter;
|
||||
import org.objectweb.asm.Opcodes;
|
||||
import org.objectweb.asm.commons.EmptyVisitor;
|
||||
import org.jetbrains.asm4.ClassReader;
|
||||
import org.jetbrains.asm4.ClassVisitor;
|
||||
import org.jetbrains.asm4.ClassWriter;
|
||||
import org.jetbrains.asm4.Opcodes;
|
||||
|
||||
import java.io.*;
|
||||
import java.net.MalformedURLException;
|
||||
@@ -440,7 +440,7 @@ public class Javac2 extends Javac {
|
||||
|
||||
private static int getClassFileVersion(ClassReader reader) {
|
||||
final int[] classfileVersion = new int[1];
|
||||
reader.accept(new EmptyVisitor() {
|
||||
reader.accept(new ClassVisitor(Opcodes.ASM4) {
|
||||
public void visit(int version, int access, String name, String signature, String superName, String[] interfaces) {
|
||||
classfileVersion[0] = version;
|
||||
}
|
||||
|
||||
@@ -770,6 +770,7 @@ public abstract class DebugProcessImpl implements DebugProcess {
|
||||
finally {
|
||||
myVirtualMachineProxy = null;
|
||||
myPositionManager = null;
|
||||
myReturnValueWatcher = null;
|
||||
myState.set(STATE_DETACHED);
|
||||
try {
|
||||
myDebugProcessDispatcher.getMulticaster().processDetached(this, closedByUser);
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
<orderEntry type="module" module-name="core-impl" exported="" />
|
||||
<orderEntry type="module" module-name="resources-en" />
|
||||
<orderEntry type="library" name="Guava" level="project" />
|
||||
<orderEntry type="library" name="asm" level="project" />
|
||||
<orderEntry type="library" name="asm4" level="project" />
|
||||
</component>
|
||||
</module>
|
||||
|
||||
|
||||
+1
-1
@@ -24,7 +24,7 @@ import com.intellij.psi.impl.java.stubs.impl.PsiJavaFileStubImpl;
|
||||
import com.intellij.psi.stubs.PsiFileStub;
|
||||
import com.intellij.util.cls.ClsFormatException;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import org.objectweb.asm.ClassReader;
|
||||
import org.jetbrains.asm4.ClassReader;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
package com.intellij.psi.impl.compiled;
|
||||
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import org.objectweb.asm.ClassReader;
|
||||
import org.jetbrains.asm4.ClassReader;
|
||||
|
||||
public interface InnerClassSourceStrategy<T> {
|
||||
@Nullable
|
||||
|
||||
@@ -38,8 +38,7 @@ import com.intellij.util.io.StringRef;
|
||||
import org.jetbrains.annotations.NonNls;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import org.objectweb.asm.*;
|
||||
import org.objectweb.asm.commons.EmptyVisitor;
|
||||
import org.jetbrains.asm4.*;
|
||||
|
||||
import java.text.CharacterIterator;
|
||||
import java.text.StringCharacterIterator;
|
||||
@@ -48,7 +47,7 @@ import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
public class StubBuildingVisitor<T> implements ClassVisitor {
|
||||
public class StubBuildingVisitor<T> extends ClassVisitor {
|
||||
private static final Pattern REGEX_PATTERN = Pattern.compile("(?<=[^\\$])\\${1}(?=[^\\$])");
|
||||
|
||||
public static final String DOUBLE_POSITIVE_INF = "1.0 / 0.0";
|
||||
@@ -71,6 +70,7 @@ public class StubBuildingVisitor<T> implements ClassVisitor {
|
||||
private JavaLexer myLexer;
|
||||
|
||||
public StubBuildingVisitor(final T classSource, InnerClassSourceStrategy<T> innersStrategy, final StubElement parent, final int access) {
|
||||
super(Opcodes.ASM4);
|
||||
mySource = classSource;
|
||||
myInnersStrategy = innersStrategy;
|
||||
myParent = parent;
|
||||
@@ -316,7 +316,7 @@ public class StubBuildingVisitor<T> implements ClassVisitor {
|
||||
final byte flags = PsiFieldStubImpl.packFlags((access & Opcodes.ACC_ENUM) != 0, (access & Opcodes.ACC_DEPRECATED) != 0, false);
|
||||
PsiFieldStub stub = new PsiFieldStubImpl(myResult, name, fieldType(desc, signature), constToString(value), flags);
|
||||
final PsiModifierListStub modList = new PsiModifierListStubImpl(stub, packFieldFlags(access));
|
||||
return new AnnotationCollectingVisitor(stub, modList);
|
||||
return new AnnotationCollectingVisitor(modList);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@@ -493,13 +493,14 @@ public class StubBuildingVisitor<T> implements ClassVisitor {
|
||||
public void visitEnd() {
|
||||
}
|
||||
|
||||
private static class AnnotationTextCollector implements AnnotationVisitor {
|
||||
private static class AnnotationTextCollector extends AnnotationVisitor {
|
||||
private final StringBuilder myBuilder = new StringBuilder();
|
||||
private final AnnotationResultCallback myCallback;
|
||||
private boolean hasParams = false;
|
||||
private final String myDesc;
|
||||
|
||||
public AnnotationTextCollector(@Nullable String desc, AnnotationResultCallback callback) {
|
||||
super(Opcodes.ASM4);
|
||||
myCallback = callback;
|
||||
|
||||
myDesc = desc;
|
||||
@@ -567,25 +568,14 @@ public class StubBuildingVisitor<T> implements ClassVisitor {
|
||||
}
|
||||
}
|
||||
|
||||
private static class AnnotationCollectingVisitor extends EmptyVisitor {
|
||||
private final StubElement myOwner;
|
||||
private static class AnnotationCollectingVisitor extends FieldVisitor {
|
||||
private final PsiModifierListStub myModList;
|
||||
|
||||
private AnnotationCollectingVisitor(final StubElement owner, final PsiModifierListStub modList) {
|
||||
myOwner = owner;
|
||||
private AnnotationCollectingVisitor(final PsiModifierListStub modList) {
|
||||
super(Opcodes.ASM4);
|
||||
myModList = modList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public AnnotationVisitor visitAnnotationDefault() {
|
||||
return new AnnotationTextCollector(null, new AnnotationResultCallback() {
|
||||
@Override
|
||||
public void callback(final String text) {
|
||||
((PsiMethodStubImpl)myOwner).setDefaultValueText(text);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public AnnotationVisitor visitAnnotation(final String desc, final boolean visible) {
|
||||
return new AnnotationTextCollector(desc, new AnnotationResultCallback() {
|
||||
@@ -595,20 +585,11 @@ public class StubBuildingVisitor<T> implements ClassVisitor {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
@Nullable
|
||||
public AnnotationVisitor visitParameterAnnotation(final int parameter, final String desc, final boolean visible) {
|
||||
return new AnnotationTextCollector(desc, new AnnotationResultCallback() {
|
||||
@Override
|
||||
public void callback(final String text) {
|
||||
new PsiAnnotationStubImpl(((PsiMethodStub)myOwner).findParameter(parameter).getModList(), text);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
private static class AnnotationParamCollectingVisitor extends AnnotationCollectingVisitor {
|
||||
private static class AnnotationParamCollectingVisitor extends MethodVisitor {
|
||||
private final PsiMethodStub myOwner;
|
||||
private final PsiModifierListStub myModList;
|
||||
private final int myIgnoreCount;
|
||||
private final int myParamIgnoreCount;
|
||||
private final int myParamCount;
|
||||
@@ -622,13 +603,35 @@ public class StubBuildingVisitor<T> implements ClassVisitor {
|
||||
int paramIgnoreCount,
|
||||
int paramCount,
|
||||
PsiParameterStubImpl[] paramStubs) {
|
||||
super(owner, modList);
|
||||
super(Opcodes.ASM4);
|
||||
myOwner = owner;
|
||||
myModList = modList;
|
||||
myIgnoreCount = ignoreCount;
|
||||
myParamIgnoreCount = paramIgnoreCount;
|
||||
myParamCount = paramCount;
|
||||
myParamStubs = paramStubs;
|
||||
}
|
||||
|
||||
@Override
|
||||
public AnnotationVisitor visitAnnotation(final String desc, final boolean visible) {
|
||||
return new AnnotationTextCollector(desc, new AnnotationResultCallback() {
|
||||
@Override
|
||||
public void callback(final String text) {
|
||||
new PsiAnnotationStubImpl(myModList, text);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public AnnotationVisitor visitAnnotationDefault() {
|
||||
return new AnnotationTextCollector(null, new AnnotationResultCallback() {
|
||||
@Override
|
||||
public void callback(final String text) {
|
||||
((PsiMethodStubImpl)myOwner).setDefaultValueText(text);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void visitLocalVariable(String name, String desc, String signature, Label start, Label end, int index) {
|
||||
if (index >= myIgnoreCount) {
|
||||
@@ -652,7 +655,15 @@ public class StubBuildingVisitor<T> implements ClassVisitor {
|
||||
@Override
|
||||
@Nullable
|
||||
public AnnotationVisitor visitParameterAnnotation(final int parameter, String desc, boolean visible) {
|
||||
return (parameter < myParamIgnoreCount) ? null : super.visitParameterAnnotation(parameter - myParamIgnoreCount, desc, visible);
|
||||
if (parameter < myParamIgnoreCount) {
|
||||
return null;
|
||||
}
|
||||
return new AnnotationTextCollector(desc, new AnnotationResultCallback() {
|
||||
@Override
|
||||
public void callback(final String text) {
|
||||
new PsiAnnotationStubImpl(myOwner.findParameter(parameter - myParamIgnoreCount).getModList(), text);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
<orderEntry type="library" name="Velocity" level="project" />
|
||||
<orderEntry type="module" module-name="java-i18n" />
|
||||
<orderEntry type="module" module-name="compiler-impl" />
|
||||
<orderEntry type="library" name="asm" level="project" />
|
||||
<orderEntry type="library" name="asm4" 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
@@ -8,8 +8,8 @@ import com.intellij.testFramework.UsefulTestCase;
|
||||
import com.intellij.testFramework.fixtures.IdeaProjectTestFixture;
|
||||
import com.intellij.testFramework.fixtures.JavaTestFixtureFactory;
|
||||
import com.intellij.testFramework.fixtures.TestFixtureBuilder;
|
||||
import org.objectweb.asm.ClassReader;
|
||||
import org.objectweb.asm.ClassWriter;
|
||||
import org.jetbrains.asm4.ClassReader;
|
||||
import org.jetbrains.asm4.ClassWriter;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
|
||||
@@ -13,7 +13,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="asm" level="project" />
|
||||
<orderEntry type="library" exported="" name="asm4" level="project" />
|
||||
<orderEntry type="library" name="JDOM" level="project" />
|
||||
<orderEntry type="library" name="NanoXML" level="project" />
|
||||
<orderEntry type="library" name="jgoodies-forms" level="project" />
|
||||
|
||||
@@ -409,7 +409,8 @@ public class IncProjectBuilder {
|
||||
final File[] files = file.listFiles();
|
||||
if (files != null) {
|
||||
for (File child : files) {
|
||||
writeIndex(writer, child, path + "/" + child.getName());
|
||||
final String _path = path.isEmpty()? child.getName() : path + "/" + child.getName();
|
||||
writeIndex(writer, child, _path);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,6 +17,10 @@ import com.intellij.uiDesigner.lw.LwRootContainer;
|
||||
import com.intellij.util.SystemProperties;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import org.jetbrains.asm4.ClassReader;
|
||||
import org.jetbrains.asm4.ClassVisitor;
|
||||
import org.jetbrains.asm4.ClassWriter;
|
||||
import org.jetbrains.asm4.Opcodes;
|
||||
import org.jetbrains.ether.dependencyView.Callbacks;
|
||||
import org.jetbrains.ether.dependencyView.Mappings;
|
||||
import org.jetbrains.jps.*;
|
||||
@@ -29,10 +33,6 @@ import org.jetbrains.jps.incremental.messages.ProgressMessage;
|
||||
import org.jetbrains.jps.incremental.storage.BuildDataManager;
|
||||
import org.jetbrains.jps.incremental.storage.SourceToFormMapping;
|
||||
import org.jetbrains.jps.javac.*;
|
||||
import org.objectweb.asm.ClassReader;
|
||||
import org.objectweb.asm.ClassWriter;
|
||||
import org.objectweb.asm.Opcodes;
|
||||
import org.objectweb.asm.commons.EmptyVisitor;
|
||||
|
||||
import javax.tools.*;
|
||||
import java.io.*;
|
||||
@@ -821,7 +821,7 @@ public class JavaBuilder extends ModuleLevelBuilder {
|
||||
|
||||
private static int getClassFileVersion(ClassReader reader) {
|
||||
final Ref<Integer> result = new Ref<Integer>(0);
|
||||
reader.accept(new EmptyVisitor() {
|
||||
reader.accept(new ClassVisitor(Opcodes.ASM4) {
|
||||
public void visit(int version, int access, String name, String signature, String superName, String[] interfaces) {
|
||||
result.set(version);
|
||||
}
|
||||
|
||||
@@ -28,14 +28,12 @@ import net.n3.nanoxml.IXMLBuilder;
|
||||
import org.codehaus.groovy.GroovyException;
|
||||
import org.jboss.netty.util.Version;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import org.jetbrains.asm4.ClassVisitor;
|
||||
import org.jetbrains.asm4.ClassWriter;
|
||||
import org.jetbrains.jps.MacroExpander;
|
||||
import org.jetbrains.jps.javac.JavacServer;
|
||||
import org.objectweb.asm.ClassWriter;
|
||||
import org.objectweb.asm.commons.EmptyVisitor;
|
||||
|
||||
import javax.tools.JavaCompiler;
|
||||
import javax.tools.StandardJavaFileManager;
|
||||
import javax.tools.ToolProvider;
|
||||
import javax.tools.*;
|
||||
import java.io.File;
|
||||
import java.util.ArrayList;
|
||||
import java.util.LinkedHashSet;
|
||||
@@ -95,7 +93,7 @@ public class ClasspathBootstrap {
|
||||
cp.add(getResourcePath(Message.class)); // protobuf
|
||||
cp.add(getResourcePath(Version.class)); // netty
|
||||
cp.add(getResourcePath(ClassWriter.class)); // asm
|
||||
cp.add(getResourcePath(EmptyVisitor.class)); // asm-commons
|
||||
cp.add(getResourcePath(ClassVisitor.class)); // asm-commons
|
||||
cp.add(getResourcePath(MacroExpander.class)); // jps-model
|
||||
cp.add(getResourcePath(AlienFormFileException.class)); // forms-compiler
|
||||
cp.add(getResourcePath(GroovyException.class)); // groovy
|
||||
|
||||
+1
-1
@@ -20,7 +20,7 @@
|
||||
<SOURCES />
|
||||
</library>
|
||||
</orderEntry>
|
||||
<orderEntry type="library" name="asm" level="project" />
|
||||
<orderEntry type="library" name="asm4" level="project" />
|
||||
<orderEntry type="module" module-name="jps-model" exported="" />
|
||||
<orderEntry type="library" scope="TEST" name="JUnit4" level="project" />
|
||||
<orderEntry type="module" module-name="util" />
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
<orderEntry type="library" exported="" name="Groovy" level="project" />
|
||||
<orderEntry type="module" module-name="util" />
|
||||
<orderEntry type="library" name="asm" level="project" />
|
||||
<orderEntry type="library" name="asm4" level="project" />
|
||||
</component>
|
||||
</module>
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package org.jetbrains.ether.dependencyView;
|
||||
|
||||
import org.objectweb.asm.ClassReader;
|
||||
import org.jetbrains.asm4.ClassReader;
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
package org.jetbrains.ether.dependencyView;
|
||||
|
||||
import com.intellij.openapi.util.Pair;
|
||||
import org.objectweb.asm.*;
|
||||
import org.objectweb.asm.commons.EmptyVisitor;
|
||||
import org.objectweb.asm.signature.SignatureReader;
|
||||
import org.objectweb.asm.signature.SignatureVisitor;
|
||||
import org.jetbrains.asm4.*;
|
||||
import org.jetbrains.asm4.signature.SignatureReader;
|
||||
import org.jetbrains.asm4.signature.SignatureVisitor;
|
||||
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
@@ -37,8 +36,12 @@ class ClassfileAnalyzer {
|
||||
}
|
||||
}
|
||||
|
||||
private class ClassCrawler extends EmptyVisitor {
|
||||
private class AnnotationRetentionPolicyCrawler implements AnnotationVisitor {
|
||||
private class ClassCrawler extends ClassVisitor {
|
||||
private class AnnotationRetentionPolicyCrawler extends AnnotationVisitor {
|
||||
private AnnotationRetentionPolicyCrawler() {
|
||||
super(Opcodes.ASM4);
|
||||
}
|
||||
|
||||
public void visit(String name, Object value) {
|
||||
}
|
||||
|
||||
@@ -58,7 +61,11 @@ class ClassfileAnalyzer {
|
||||
}
|
||||
}
|
||||
|
||||
private class AnnotationTargetCrawler implements AnnotationVisitor {
|
||||
private class AnnotationTargetCrawler extends AnnotationVisitor {
|
||||
private AnnotationTargetCrawler() {
|
||||
super(Opcodes.ASM4);
|
||||
}
|
||||
|
||||
public void visit(String name, Object value) {
|
||||
}
|
||||
|
||||
@@ -78,13 +85,14 @@ class ClassfileAnalyzer {
|
||||
}
|
||||
}
|
||||
|
||||
private class AnnotationCrawler implements AnnotationVisitor {
|
||||
private class AnnotationCrawler extends AnnotationVisitor {
|
||||
private final TypeRepr.ClassType type;
|
||||
private final ElementType target;
|
||||
|
||||
private final Set<DependencyContext.S> usedArguments = new HashSet<DependencyContext.S>();
|
||||
|
||||
private AnnotationCrawler(final TypeRepr.ClassType type, final ElementType target) {
|
||||
super(Opcodes.ASM4);
|
||||
this.type = type;
|
||||
this.target = target;
|
||||
annotationTargets.put(type, target);
|
||||
@@ -182,7 +190,7 @@ class ClassfileAnalyzer {
|
||||
if (sig != null) new SignatureReader(sig).accept(signatureCrawler);
|
||||
}
|
||||
|
||||
private final SignatureVisitor signatureCrawler = new SignatureVisitor() {
|
||||
private final SignatureVisitor signatureCrawler = new SignatureVisitor(Opcodes.ASM4) {
|
||||
public void visitFormalTypeParameter(String name) {
|
||||
return;
|
||||
}
|
||||
@@ -284,6 +292,7 @@ class ClassfileAnalyzer {
|
||||
new TransientMultiMaplet<TypeRepr.ClassType, ElementType>(elementTypeSetConstructor);
|
||||
|
||||
public ClassCrawler(final DependencyContext.S fn) {
|
||||
super(Opcodes.ASM4);
|
||||
fileName = fn;
|
||||
}
|
||||
|
||||
@@ -369,7 +378,7 @@ class ClassfileAnalyzer {
|
||||
fields.add(new FieldRepr(context, access, context.get(n), context.get(desc), context.get(signature), value));
|
||||
}
|
||||
|
||||
return new EmptyVisitor() {
|
||||
return new FieldVisitor(Opcodes.ASM4) {
|
||||
@Override
|
||||
public AnnotationVisitor visitAnnotation(String desc, boolean visible) {
|
||||
return new AnnotationCrawler((TypeRepr.ClassType)TypeRepr.getType(context, context.get(desc)), ElementType.FIELD);
|
||||
@@ -387,7 +396,7 @@ class ClassfileAnalyzer {
|
||||
|
||||
processSignature(signature);
|
||||
|
||||
return new EmptyVisitor() {
|
||||
return new MethodVisitor(Opcodes.ASM4) {
|
||||
@Override
|
||||
public void visitEnd() {
|
||||
if ((access & Opcodes.ACC_SYNTHETIC) == 0 || (access & Opcodes.ACC_BRIDGE) > 0) {
|
||||
@@ -403,7 +412,7 @@ class ClassfileAnalyzer {
|
||||
|
||||
@Override
|
||||
public AnnotationVisitor visitAnnotationDefault() {
|
||||
return new EmptyVisitor() {
|
||||
return new AnnotationVisitor(Opcodes.ASM4) {
|
||||
public void visit(String name, Object value) {
|
||||
defaultValue.set(value);
|
||||
}
|
||||
|
||||
@@ -4,8 +4,8 @@ import com.intellij.openapi.diagnostic.Logger;
|
||||
import com.intellij.openapi.util.Pair;
|
||||
import com.intellij.openapi.util.io.FileUtil;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import org.objectweb.asm.ClassReader;
|
||||
import org.objectweb.asm.Opcodes;
|
||||
import org.jetbrains.asm4.ClassReader;
|
||||
import org.jetbrains.asm4.Opcodes;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
package org.jetbrains.ether.dependencyView;
|
||||
|
||||
import com.intellij.util.io.DataExternalizer;
|
||||
import org.jetbrains.asm4.Type;
|
||||
import org.jetbrains.ether.RW;
|
||||
import org.objectweb.asm.Type;
|
||||
|
||||
import java.io.DataInput;
|
||||
import java.io.DataOutput;
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
package org.jetbrains.ether.dependencyView;
|
||||
|
||||
import org.jetbrains.ether.RW;
|
||||
import org.objectweb.asm.Type;
|
||||
import org.jetbrains.asm4.Type;
|
||||
|
||||
import java.io.*;
|
||||
import java.io.DataInput;
|
||||
import java.io.DataOutput;
|
||||
import java.io.IOException;
|
||||
|
||||
/**
|
||||
* Created by IntelliJ IDEA.
|
||||
|
||||
@@ -2,13 +2,14 @@ package org.jetbrains.ether.dependencyView;
|
||||
|
||||
import com.intellij.openapi.util.text.StringUtil;
|
||||
import com.intellij.util.io.DataExternalizer;
|
||||
import org.jetbrains.asm4.Type;
|
||||
import org.jetbrains.ether.RW;
|
||||
import org.objectweb.asm.Type;
|
||||
|
||||
import java.io.*;
|
||||
import java.io.DataInput;
|
||||
import java.io.DataOutput;
|
||||
import java.io.IOException;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collection;
|
||||
import java.util.LinkedList;
|
||||
|
||||
/**
|
||||
* Created by IntelliJ IDEA.
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
package org.jetbrains.ether.dependencyView;
|
||||
|
||||
import com.intellij.util.io.DataExternalizer;
|
||||
import org.jetbrains.asm4.Type;
|
||||
import org.jetbrains.ether.RW;
|
||||
import org.objectweb.asm.Type;
|
||||
|
||||
import java.io.DataInput;
|
||||
import java.io.DataOutput;
|
||||
|
||||
@@ -2,7 +2,7 @@ package org.jetbrains.ether.dependencyView;
|
||||
|
||||
import org.apache.tools.ant.BuildEvent;
|
||||
import org.apache.tools.ant.BuildListener;
|
||||
import org.objectweb.asm.ClassReader;
|
||||
import org.jetbrains.asm4.ClassReader;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
|
||||
@@ -6,14 +6,12 @@ import com.sun.tools.javac.util.Context;
|
||||
import com.sun.tools.javac.util.DefaultFileManager;
|
||||
import com.sun.tools.javac.util.List;
|
||||
import com.sun.tools.javac.util.ListBuffer;
|
||||
import org.jetbrains.asm4.ClassReader;
|
||||
import org.jetbrains.ether.dependencyView.Callbacks;
|
||||
import org.jetbrains.jps.PathUtil;
|
||||
import org.objectweb.asm.ClassReader;
|
||||
|
||||
import javax.lang.model.SourceVersion;
|
||||
import javax.tools.FileObject;
|
||||
import javax.tools.ForwardingJavaFileObject;
|
||||
import javax.tools.JavaFileObject;
|
||||
import javax.tools.*;
|
||||
import java.io.*;
|
||||
import java.lang.reflect.Field;
|
||||
import java.net.URL;
|
||||
|
||||
Binary file not shown.
@@ -1,5 +1,6 @@
|
||||
asm-commons.jar
|
||||
asm.jar
|
||||
asm4-all.jar
|
||||
automaton.jar
|
||||
cli-10.jar
|
||||
cglib-2.2.2.jar
|
||||
|
||||
@@ -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="asm" level="project" />
|
||||
<orderEntry type="library" name="asm4" 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="asm" level="project" />
|
||||
<orderEntry type="library" name="asm4" level="project" />
|
||||
<orderEntry type="module" module-name="RegExpSupport" />
|
||||
<orderEntry type="module" module-name="xpath" />
|
||||
<orderEntry type="module" module-name="platform-api" />
|
||||
|
||||
+6
-3
@@ -34,14 +34,17 @@ import com.intellij.openapi.roots.ProjectFileIndex;
|
||||
import com.intellij.openapi.roots.ProjectRootManager;
|
||||
import com.intellij.openapi.util.text.StringUtil;
|
||||
import com.intellij.openapi.vfs.VirtualFile;
|
||||
import com.intellij.psi.*;
|
||||
import com.intellij.psi.JavaPsiFacade;
|
||||
import com.intellij.psi.PsiClass;
|
||||
import com.intellij.psi.PsiFile;
|
||||
import com.intellij.psi.PsiJavaFile;
|
||||
import com.intellij.psi.search.GlobalSearchScope;
|
||||
import com.intellij.psi.search.PsiSearchHelper;
|
||||
import com.intellij.util.Processor;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import org.objectweb.asm.ClassReader;
|
||||
import org.objectweb.asm.ClassWriter;
|
||||
import org.jetbrains.asm4.ClassReader;
|
||||
import org.jetbrains.asm4.ClassWriter;
|
||||
|
||||
import java.io.DataInput;
|
||||
import java.io.FileOutputStream;
|
||||
|
||||
+11
-3
@@ -15,8 +15,16 @@
|
||||
*/
|
||||
package org.intellij.plugins.intelliLang.pattern.compiler;
|
||||
|
||||
import org.objectweb.asm.ClassVisitor;
|
||||
import org.jetbrains.asm4.ClassVisitor;
|
||||
import org.jetbrains.asm4.Opcodes;
|
||||
|
||||
public interface Instrumenter extends ClassVisitor {
|
||||
boolean instrumented();
|
||||
public abstract class Instrumenter extends ClassVisitor {
|
||||
protected Instrumenter() {
|
||||
super(Opcodes.ASM4);
|
||||
}
|
||||
protected Instrumenter(ClassVisitor visitor) {
|
||||
super(Opcodes.ASM4, visitor);
|
||||
}
|
||||
|
||||
public abstract boolean instrumented();
|
||||
}
|
||||
|
||||
+5
-4
@@ -17,14 +17,14 @@ package org.intellij.plugins.intelliLang.pattern.compiler.impl;
|
||||
|
||||
import org.intellij.plugins.intelliLang.Configuration;
|
||||
import org.jetbrains.annotations.NonNls;
|
||||
import org.objectweb.asm.*;
|
||||
import org.jetbrains.asm4.*;
|
||||
|
||||
import java.text.MessageFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
class InstrumentationAdapter extends MethodAdapter implements Opcodes {
|
||||
class InstrumentationAdapter extends MethodVisitor implements Opcodes {
|
||||
@NonNls
|
||||
private static final String RETURN_VALUE_NAME = "$returnvalue$";
|
||||
|
||||
@@ -46,7 +46,7 @@ class InstrumentationAdapter extends MethodAdapter implements Opcodes {
|
||||
Type returnType,
|
||||
int access,
|
||||
String name) {
|
||||
super(methodvisitor);
|
||||
super(Opcodes.ASM4, methodvisitor);
|
||||
myInstrumenter = instrumenter;
|
||||
myArgTypes = argTypes;
|
||||
myReturnType = returnType;
|
||||
@@ -208,11 +208,12 @@ class InstrumentationAdapter extends MethodAdapter implements Opcodes {
|
||||
mv.visitInsn(Opcodes.ATHROW);
|
||||
}
|
||||
|
||||
private static class MyAnnotationVisitor implements AnnotationVisitor {
|
||||
private static class MyAnnotationVisitor extends AnnotationVisitor {
|
||||
private final AnnotationVisitor av;
|
||||
private final PatternValue myPatternValue;
|
||||
|
||||
public MyAnnotationVisitor(AnnotationVisitor annotationvisitor, PatternValue v) {
|
||||
super(Opcodes.ASM4);
|
||||
av = annotationvisitor;
|
||||
myPatternValue = v;
|
||||
}
|
||||
|
||||
+1
-1
@@ -32,7 +32,7 @@ import org.intellij.plugins.intelliLang.pattern.compiler.AnnotationBasedInstrume
|
||||
import org.intellij.plugins.intelliLang.pattern.compiler.Instrumenter;
|
||||
import org.intellij.plugins.intelliLang.util.AnnotationUtilEx;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.objectweb.asm.ClassWriter;
|
||||
import org.jetbrains.asm4.ClassWriter;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
+3
-3
@@ -19,14 +19,14 @@ 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.objectweb.asm.*;
|
||||
import org.jetbrains.asm4.*;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.LinkedHashSet;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
public class PatternValidationInstrumenter extends ClassAdapter implements Instrumenter, Opcodes {
|
||||
public class PatternValidationInstrumenter extends Instrumenter implements Opcodes {
|
||||
@NonNls static final String PATTERN_CACHE_NAME = "$_PATTERN_CACHE_$";
|
||||
@NonNls static final String ASSERTIONS_DISABLED_NAME = "$assertionsDisabled";
|
||||
@NonNls static final String JAVA_LANG_STRING = "Ljava/lang/String;";
|
||||
@@ -167,7 +167,7 @@ public class PatternValidationInstrumenter extends ClassAdapter implements Instr
|
||||
if ((access & ACC_STATIC) != 0 && name.equals("<clinit>")) {
|
||||
myHasStaticInitializer = true;
|
||||
|
||||
return new MethodAdapter(methodvisitor) {
|
||||
return new MethodVisitor(Opcodes.ASM4, methodvisitor) {
|
||||
public void visitCode() {
|
||||
super.visitCode();
|
||||
patchStaticInitializer(mv);
|
||||
|
||||
@@ -8,6 +8,7 @@ import com.intellij.util.ArrayUtil;
|
||||
import com.intellij.util.Consumer;
|
||||
import com.intellij.util.SystemProperties;
|
||||
import groovy.util.CharsetToolkit;
|
||||
import org.jetbrains.asm4.ClassReader;
|
||||
import org.jetbrains.ether.dependencyView.Callbacks;
|
||||
import org.jetbrains.ether.dependencyView.Mappings;
|
||||
import org.jetbrains.groovy.compiler.rt.GroovyCompilerWrapper;
|
||||
@@ -19,7 +20,6 @@ import org.jetbrains.jps.incremental.messages.FileGeneratedEvent;
|
||||
import org.jetbrains.jps.incremental.messages.ProgressMessage;
|
||||
import org.jetbrains.jps.incremental.storage.SourceToOutputMapping;
|
||||
import org.jetbrains.jps.server.ClasspathBootstrap;
|
||||
import org.objectweb.asm.ClassReader;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
|
||||
@@ -27,9 +27,9 @@ import com.intellij.uiDesigner.lw.LwRootContainer;
|
||||
import com.intellij.util.ArrayUtil;
|
||||
import com.intellij.util.containers.HashSet;
|
||||
import org.jetbrains.annotations.NonNls;
|
||||
import org.objectweb.asm.ClassWriter;
|
||||
import org.objectweb.asm.MethodVisitor;
|
||||
import org.objectweb.asm.Opcodes;
|
||||
import org.jetbrains.asm4.ClassWriter;
|
||||
import org.jetbrains.asm4.MethodVisitor;
|
||||
import org.jetbrains.asm4.Opcodes;
|
||||
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.File;
|
||||
|
||||
@@ -31,7 +31,7 @@ import com.intellij.uiDesigner.lw.LwRootContainer;
|
||||
import com.intellij.util.PathUtil;
|
||||
import com.intellij.util.ui.UIUtil;
|
||||
import junit.framework.TestCase;
|
||||
import org.objectweb.asm.ClassWriter;
|
||||
import org.jetbrains.asm4.ClassWriter;
|
||||
|
||||
import javax.swing.*;
|
||||
import javax.swing.border.EtchedBorder;
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
<orderEntry type="module" module-name="compiler-impl" />
|
||||
<orderEntry type="module" module-name="icons" />
|
||||
<orderEntry type="library" name="jgoodies-forms" level="project" />
|
||||
<orderEntry type="library" name="asm" level="project" />
|
||||
<orderEntry type="library" name="asm4" level="project" />
|
||||
<orderEntry type="module" module-name="java-i18n" exported="" />
|
||||
<orderEntry type="module" module-name="idea-ui" />
|
||||
<orderEntry type="module" module-name="testFramework-java" scope="TEST" />
|
||||
|
||||
Reference in New Issue
Block a user