Merge remote-tracking branch 'origin/master'

This commit is contained in:
Alexander Lobas
2012-03-31 19:05:18 +04:00
101 changed files with 1026 additions and 271 deletions
+9
View File
@@ -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>
+1
View File
@@ -153,6 +153,7 @@ binding.setVariable("generateLicensesTable", {String filePath, Set<String> usedM
libraryLicense(name: "Alloy L&F", libraryName: "alloy.jar", version: "1.4.4", license: "link (company license)", url: "http://www.incors.com/lookandfeel/", licenseUrl: "http://lookandfeel.incors.com/display_licence.php?back=purchase.php&selMenu=Purchase")
libraryLicense(name: "Ant", version: "1.7", license: "Apache 2.0", url: "http://ant.apache.org/", licenseUrl: "http://ant.apache.org/license.html")
libraryLicense(name: "ASM Bytecode Manipulation Framework", libraryName: "asm", version: "3.3", license: "BSD", url: "http://asm.objectweb.org/", licenseUrl: "http://asm.objectweb.org/license.html")
libraryLicense(name: "ASM Bytecode Manipulation Framework", libraryName: "asm4", version: "4.0", license: "BSD", url: "http://asm.objectweb.org/", licenseUrl: "http://asm.objectweb.org/license.html")
libraryLicense(name: "Axis", libraryName: "axis-1.4", version: "1.4", license: "Apache 2.0", url: "http://ws.apache.org/axis/", licenseUrl: "http://svn.jetbrains.org/idea/Trunk/bundled/WebServices/resources/lib/axis-1.4.0/axis.LICENSE")
libraryLicense(name: "CGLib", libraryName: "CGLIB", version: "2.2.2", license: "Apache", url: "http://cglib.sourceforge.net/", licenseUrl: "http://www.apache.org/foundation/licence-FAQ.html")
libraryLicense(name: "classworlds", libraryName: "classworlds-1.1.jar", version: "1.1", license: "codehaus", url: "http://classworlds.codehaus.org/", licenseUrl: "http://classworlds.codehaus.org/license.html")
@@ -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="" />
@@ -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) {
@@ -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.*;
@@ -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.*;
@@ -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.*;
@@ -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
@@ -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
@@ -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.*;
@@ -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
@@ -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.*;
@@ -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
@@ -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.*;
@@ -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.*;
@@ -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.*;
@@ -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
@@ -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;
@@ -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.*;
@@ -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.*;
@@ -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.
@@ -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.*;
@@ -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;
@@ -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.*;
@@ -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
+1 -1
View File
@@ -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
@@ -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>
@@ -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,6 +1,6 @@
package com.intellij.compiler.instrumentation;
import org.objectweb.asm.ClassWriter;
import org.jetbrains.asm4.ClassWriter;
/**
* @author Eugene Zhuravlev
@@ -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;
+1 -1
View File
@@ -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);
+1 -1
View File
@@ -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>
@@ -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);
}
});
}
}
+1 -1
View File
@@ -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" />
@@ -0,0 +1,6 @@
Cleaning output files:
out/production/nonIncremental4/A.class
End of files
Compiling files:
src/A.java
End of files
@@ -0,0 +1 @@
nonIncremental4
@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CompilerConfiguration">
<option name="DEFAULT_COMPILER" value="Javac" />
<resourceExtensions />
<wildcardResourcePatterns>
<entry name="?*.properties" />
<entry name="?*.xml" />
<entry name="?*.gif" />
<entry name="?*.png" />
<entry name="?*.jpeg" />
<entry name="?*.jpg" />
<entry name="?*.html" />
<entry name="?*.dtd" />
<entry name="?*.tld" />
<entry name="?*.ftl" />
</wildcardResourcePatterns>
<annotationProcessing enabled="false" useClasspath="true" />
</component>
</project>
@@ -0,0 +1,5 @@
<component name="CopyrightManager">
<settings default="">
<module2copyright />
</settings>
</component>
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Encoding" useUTFGuessing="true" native2AsciiForPropertiesFiles="false" />
</project>
@@ -0,0 +1,26 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="EntryPointsManager">
<entry_points version="2.0" />
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_6" assert-keyword="true" jdk-15="true" project-jdk-name="IDEA jdk" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/out" />
</component>
<component name="masterDetails">
<states>
<state key="ProjectJDKs.UI">
<settings>
<last-edited>IDEA jdk</last-edited>
<splitter-proportions>
<option name="proportions">
<list>
<option value="0.20000002" />
</list>
</option>
</splitter-proportions>
</settings>
</state>
</states>
</component>
</project>
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/nonIncremental4.iml" filepath="$PROJECT_DIR$/nonIncremental4.iml" />
</modules>
</component>
</project>
@@ -0,0 +1,5 @@
<component name="DependencyValidationManager">
<state>
<option name="SKIP_IMPORT_STATEMENTS" value="false" />
</state>
</component>
@@ -0,0 +1,125 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Palette2">
<group name="Swing">
<item class="com.intellij.uiDesigner.HSpacer" tooltip-text="Horizontal Spacer" icon="/com/intellij/uiDesigner/icons/hspacer.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="1" hsize-policy="6" anchor="0" fill="1" />
</item>
<item class="com.intellij.uiDesigner.VSpacer" tooltip-text="Vertical Spacer" icon="/com/intellij/uiDesigner/icons/vspacer.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="1" anchor="0" fill="2" />
</item>
<item class="javax.swing.JPanel" icon="/com/intellij/uiDesigner/icons/panel.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3" />
</item>
<item class="javax.swing.JScrollPane" icon="/com/intellij/uiDesigner/icons/scrollPane.png" removable="false" auto-create-binding="false" can-attach-label="true">
<default-constraints vsize-policy="7" hsize-policy="7" anchor="0" fill="3" />
</item>
<item class="javax.swing.JButton" icon="/com/intellij/uiDesigner/icons/button.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="3" anchor="0" fill="1" />
<initial-values>
<property name="text" value="Button" />
</initial-values>
</item>
<item class="javax.swing.JRadioButton" icon="/com/intellij/uiDesigner/icons/radioButton.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
<initial-values>
<property name="text" value="RadioButton" />
</initial-values>
</item>
<item class="javax.swing.JCheckBox" icon="/com/intellij/uiDesigner/icons/checkBox.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
<initial-values>
<property name="text" value="CheckBox" />
</initial-values>
</item>
<item class="javax.swing.JLabel" icon="/com/intellij/uiDesigner/icons/label.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="0" anchor="8" fill="0" />
<initial-values>
<property name="text" value="Label" />
</initial-values>
</item>
<item class="javax.swing.JTextField" icon="/com/intellij/uiDesigner/icons/textField.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
<preferred-size width="150" height="-1" />
</default-constraints>
</item>
<item class="javax.swing.JPasswordField" icon="/com/intellij/uiDesigner/icons/passwordField.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
<preferred-size width="150" height="-1" />
</default-constraints>
</item>
<item class="javax.swing.JFormattedTextField" icon="/com/intellij/uiDesigner/icons/formattedTextField.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
<preferred-size width="150" height="-1" />
</default-constraints>
</item>
<item class="javax.swing.JTextArea" icon="/com/intellij/uiDesigner/icons/textArea.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JTextPane" icon="/com/intellij/uiDesigner/icons/textPane.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JEditorPane" icon="/com/intellij/uiDesigner/icons/editorPane.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JComboBox" icon="/com/intellij/uiDesigner/icons/comboBox.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="2" anchor="8" fill="1" />
</item>
<item class="javax.swing.JTable" icon="/com/intellij/uiDesigner/icons/table.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JList" icon="/com/intellij/uiDesigner/icons/list.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="2" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JTree" icon="/com/intellij/uiDesigner/icons/tree.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JTabbedPane" icon="/com/intellij/uiDesigner/icons/tabbedPane.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
<preferred-size width="200" height="200" />
</default-constraints>
</item>
<item class="javax.swing.JSplitPane" icon="/com/intellij/uiDesigner/icons/splitPane.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
<preferred-size width="200" height="200" />
</default-constraints>
</item>
<item class="javax.swing.JSpinner" icon="/com/intellij/uiDesigner/icons/spinner.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
</item>
<item class="javax.swing.JSlider" icon="/com/intellij/uiDesigner/icons/slider.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
</item>
<item class="javax.swing.JSeparator" icon="/com/intellij/uiDesigner/icons/separator.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3" />
</item>
<item class="javax.swing.JProgressBar" icon="/com/intellij/uiDesigner/icons/progressbar.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1" />
</item>
<item class="javax.swing.JToolBar" icon="/com/intellij/uiDesigner/icons/toolbar.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1">
<preferred-size width="-1" height="20" />
</default-constraints>
</item>
<item class="javax.swing.JToolBar$Separator" icon="/com/intellij/uiDesigner/icons/toolbarSeparator.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="0" anchor="0" fill="1" />
</item>
<item class="javax.swing.JScrollBar" icon="/com/intellij/uiDesigner/icons/scrollbar.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="0" anchor="0" fill="2" />
</item>
</group>
</component>
</project>
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="" vcs="" />
</component>
</project>
@@ -0,0 +1,399 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ChangeListManager">
<list default="true" id="eb963798-deb0-4a7f-88f9-2f90f16ff037" name="Default" comment="" />
<ignored path="nonIncremental4.iws" />
<ignored path=".idea/workspace.xml" />
<option name="TRACKING_ENABLED" value="true" />
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
<option name="LAST_RESOLUTION" value="IGNORE" />
</component>
<component name="ChangesViewManager" flattened_view="true" show_ignored="false" />
<component name="CreatePatchCommitExecutor">
<option name="PATCH_PATH" value="" />
</component>
<component name="DaemonCodeAnalyzer">
<disable_hints />
</component>
<component name="DebuggerManager">
<breakpoint_any>
<breakpoint>
<option name="NOTIFY_CAUGHT" value="true" />
<option name="NOTIFY_UNCAUGHT" value="true" />
<option name="ENABLED" value="false" />
<option name="LOG_ENABLED" value="false" />
<option name="LOG_EXPRESSION_ENABLED" value="false" />
<option name="SUSPEND_POLICY" value="SuspendAll" />
<option name="COUNT_FILTER_ENABLED" value="false" />
<option name="COUNT_FILTER" value="0" />
<option name="CONDITION_ENABLED" value="false" />
<option name="CLASS_FILTERS_ENABLED" value="false" />
<option name="INSTANCE_FILTERS_ENABLED" value="false" />
<option name="CONDITION" value="" />
<option name="LOG_MESSAGE" value="" />
</breakpoint>
<breakpoint>
<option name="NOTIFY_CAUGHT" value="true" />
<option name="NOTIFY_UNCAUGHT" value="true" />
<option name="ENABLED" value="false" />
<option name="LOG_ENABLED" value="false" />
<option name="LOG_EXPRESSION_ENABLED" value="false" />
<option name="SUSPEND_POLICY" value="SuspendAll" />
<option name="COUNT_FILTER_ENABLED" value="false" />
<option name="COUNT_FILTER" value="0" />
<option name="CONDITION_ENABLED" value="false" />
<option name="CLASS_FILTERS_ENABLED" value="false" />
<option name="INSTANCE_FILTERS_ENABLED" value="false" />
<option name="CONDITION" value="" />
<option name="LOG_MESSAGE" value="" />
</breakpoint>
</breakpoint_any>
<breakpoint_rules />
<ui_properties />
</component>
<component name="FavoritesManager">
<favorites_list name="nonIncremental4" />
</component>
<component name="FileEditorManager">
<leaf>
<file leaf-file-name="A.java" pinned="false" current="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/A.java">
<provider selected="true" editor-type-id="text-editor">
<state line="12" column="5" selection-start="233" selection-end="233" vertical-scroll-proportion="0.0">
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="C.java" pinned="false" current="true" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/src/C.java">
<provider selected="true" editor-type-id="text-editor">
<state line="7" column="14" selection-start="163" selection-end="163" vertical-scroll-proportion="0.12727273">
<folding />
</state>
</provider>
</entry>
</file>
</leaf>
</component>
<component name="FindManager">
<FindUsagesManager>
<setting name="OPEN_NEW_TAB" value="false" />
</FindUsagesManager>
</component>
<component name="IdeDocumentHistory">
<option name="changedFiles">
<list>
<option value="$PROJECT_DIR$/src/A.java" />
</list>
</option>
</component>
<component name="ProjectFrameBounds">
<option name="x" value="-1" />
<option name="y" value="25" />
<option name="width" value="1282" />
<option name="height" value="979" />
</component>
<component name="ProjectLevelVcsManager" settingsEditedManually="false">
<OptionsSetting value="true" id="Add" />
<OptionsSetting value="true" id="Remove" />
<OptionsSetting value="true" id="Checkout" />
<OptionsSetting value="true" id="Update" />
<OptionsSetting value="true" id="Status" />
<OptionsSetting value="true" id="Edit" />
<ConfirmationsSetting value="0" id="Add" />
<ConfirmationsSetting value="0" id="Remove" />
</component>
<component name="ProjectReloadState">
<option name="STATE" value="0" />
</component>
<component name="ProjectView">
<navigator currentView="ProjectPane" proportions="" version="1" splitterProportion="0.5">
<flattenPackages />
<showMembers />
<showModules />
<showLibraryContents />
<hideEmptyPackages />
<abbreviatePackageNames />
<autoscrollToSource />
<autoscrollFromSource />
<sortByType />
</navigator>
<panes>
<pane id="ProjectPane">
<subPane>
<PATH>
<PATH_ELEMENT>
<option name="myItemId" value="nonIncremental4" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
</PATH_ELEMENT>
</PATH>
<PATH>
<PATH_ELEMENT>
<option name="myItemId" value="nonIncremental4" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="nonIncremental4" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
</PATH>
<PATH>
<PATH_ELEMENT>
<option name="myItemId" value="nonIncremental4" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="nonIncremental4" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="src" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
</PATH>
</subPane>
</pane>
<pane id="Scope" />
<pane id="PackagesPane" />
</panes>
</component>
<component name="PropertiesComponent">
<property name="GoToFile.includeJavaFiles" value="false" />
<property name="GoToClass.toSaveIncludeLibraries" value="false" />
<property name="MemberChooser.sorted" value="false" />
<property name="MemberChooser.showClasses" value="true" />
<property name="GoToClass.includeLibraries" value="false" />
<property name="MemberChooser.copyJavadoc" value="false" />
</component>
<component name="RunManager">
<configuration default="true" type="#org.jetbrains.idea.devkit.run.PluginConfigurationType" factoryName="Plugin">
<module name="" />
<option name="VM_PARAMETERS" value="-Xmx512m -Xms256m -XX:MaxPermSize=250m" />
<option name="PROGRAM_PARAMETERS" />
<method>
<option name="AntTarget" enabled="false" />
<option name="BuildArtifacts" enabled="false" />
<option name="Make" enabled="true" />
<option name="Maven.BeforeRunTask" enabled="false" />
</method>
</configuration>
<configuration default="true" type="Remote" factoryName="Remote">
<option name="USE_SOCKET_TRANSPORT" value="true" />
<option name="SERVER_MODE" value="false" />
<option name="SHMEM_ADDRESS" value="javadebug" />
<option name="HOST" value="localhost" />
<option name="PORT" value="5005" />
<method>
<option name="AntTarget" enabled="false" />
<option name="BuildArtifacts" enabled="false" />
<option name="Maven.BeforeRunTask" enabled="false" />
</method>
</configuration>
<configuration default="true" type="TestNG" factoryName="TestNG">
<module name="" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
<option name="ALTERNATIVE_JRE_PATH" />
<option name="SUITE_NAME" />
<option name="PACKAGE_NAME" />
<option name="MAIN_CLASS_NAME" />
<option name="METHOD_NAME" />
<option name="GROUP_NAME" />
<option name="TEST_OBJECT" value="CLASS" />
<option name="VM_PARAMETERS" value="-ea" />
<option name="PARAMETERS" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
<option name="OUTPUT_DIRECTORY" />
<option name="ANNOTATION_TYPE" />
<option name="ENV_VARIABLES" />
<option name="PASS_PARENT_ENVS" value="true" />
<option name="TEST_SEARCH_SCOPE">
<value defaultName="moduleWithDependencies" />
</option>
<option name="USE_DEFAULT_REPORTERS" value="false" />
<option name="PROPERTIES_FILE" />
<envs />
<properties />
<listeners />
<method>
<option name="AntTarget" enabled="false" />
<option name="BuildArtifacts" enabled="false" />
<option name="Make" enabled="true" />
<option name="Maven.BeforeRunTask" enabled="false" />
</method>
</configuration>
<configuration default="true" type="Applet" factoryName="Applet">
<module name="" />
<option name="MAIN_CLASS_NAME" />
<option name="HTML_FILE_NAME" />
<option name="HTML_USED" value="false" />
<option name="WIDTH" value="400" />
<option name="HEIGHT" value="300" />
<option name="POLICY_FILE" value="$APPLICATION_HOME_DIR$/bin/appletviewer.policy" />
<option name="VM_PARAMETERS" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
<option name="ALTERNATIVE_JRE_PATH" />
<method>
<option name="AntTarget" enabled="false" />
<option name="BuildArtifacts" enabled="false" />
<option name="Make" enabled="true" />
<option name="Maven.BeforeRunTask" enabled="false" />
</method>
</configuration>
<configuration default="true" type="Application" factoryName="Application">
<option name="MAIN_CLASS_NAME" />
<option name="VM_PARAMETERS" />
<option name="PROGRAM_PARAMETERS" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
<option name="ALTERNATIVE_JRE_PATH" />
<option name="ENABLE_SWING_INSPECTOR" value="false" />
<option name="ENV_VARIABLES" />
<option name="PASS_PARENT_ENVS" value="true" />
<module name="" />
<envs />
<method>
<option name="AntTarget" enabled="false" />
<option name="BuildArtifacts" enabled="false" />
<option name="Make" enabled="true" />
<option name="Maven.BeforeRunTask" enabled="false" />
</method>
</configuration>
<configuration default="true" type="JUnit" factoryName="JUnit">
<module name="" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
<option name="ALTERNATIVE_JRE_PATH" />
<option name="PACKAGE_NAME" />
<option name="MAIN_CLASS_NAME" />
<option name="METHOD_NAME" />
<option name="TEST_OBJECT" value="class" />
<option name="VM_PARAMETERS" value="-ea" />
<option name="PARAMETERS" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
<option name="ENV_VARIABLES" />
<option name="PASS_PARENT_ENVS" value="true" />
<option name="TEST_SEARCH_SCOPE">
<value defaultName="moduleWithDependencies" />
</option>
<envs />
<patterns />
<method>
<option name="AntTarget" enabled="false" />
<option name="BuildArtifacts" enabled="false" />
<option name="Make" enabled="true" />
<option name="Maven.BeforeRunTask" enabled="false" />
</method>
</configuration>
<list size="0" />
<configuration name="&lt;template&gt;" type="WebApp" default="true" selected="false">
<Host>localhost</Host>
<Port>5050</Port>
</configuration>
</component>
<component name="ShelveChangesManager" show_recycled="false" />
<component name="TaskManager">
<task active="true" id="Default" summary="Default task">
<created>1333201752849</created>
<updated>1333201752849</updated>
</task>
<servers />
</component>
<component name="ToolWindowManager">
<frame x="-1" y="25" width="1282" height="979" extended-state="6" />
<editor active="true" />
<layout>
<window_info id="Changes" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
<window_info id="JetGradle" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
<window_info id="Palette" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
<window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
<window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.4" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
<window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="-1" side_tool="true" content_ui="tabs" />
<window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="-1" side_tool="true" content_ui="tabs" />
<window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
<window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
<window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="1" side_tool="true" content_ui="tabs" />
<window_info id="Maven Projects" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
<window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.4" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
<window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.24959481" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" />
<window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
<window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" />
<window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
<window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
<window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.4" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" />
<window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="2" side_tool="false" content_ui="combo" />
</layout>
</component>
<component name="VcsContentAnnotationSettings">
<option name="myLimit" value="2678400000" />
</component>
<component name="VcsManagerConfiguration">
<option name="OFFER_MOVE_TO_ANOTHER_CHANGELIST_ON_PARTIAL_COMMIT" value="true" />
<option name="CHECK_CODE_SMELLS_BEFORE_PROJECT_COMMIT" value="true" />
<option name="CHECK_NEW_TODO" value="true" />
<option name="myTodoPanelSettings">
<value>
<are-packages-shown value="false" />
<are-modules-shown value="false" />
<flatten-packages value="false" />
<is-autoscroll-to-source value="false" />
</value>
</option>
<option name="PERFORM_UPDATE_IN_BACKGROUND" value="true" />
<option name="PERFORM_COMMIT_IN_BACKGROUND" value="true" />
<option name="PERFORM_EDIT_IN_BACKGROUND" value="true" />
<option name="PERFORM_CHECKOUT_IN_BACKGROUND" value="true" />
<option name="PERFORM_ADD_REMOVE_IN_BACKGROUND" value="true" />
<option name="PERFORM_ROLLBACK_IN_BACKGROUND" value="false" />
<option name="CHECK_LOCALLY_CHANGED_CONFLICTS_IN_BACKGROUND" value="false" />
<option name="ENABLE_BACKGROUND_PROCESSES" value="false" />
<option name="CHANGED_ON_SERVER_INTERVAL" value="60" />
<option name="SHOW_ONLY_CHANGED_IN_SELECTION_DIFF" value="true" />
<option name="CHECK_COMMIT_MESSAGE_SPELLING" value="true" />
<option name="DEFAULT_PATCH_EXTENSION" value="patch" />
<option name="SHORT_DIFF_HORISONTALLY" value="true" />
<option name="SHORT_DIFF_EXTRA_LINES" value="2" />
<option name="SOFT_WRAPS_IN_SHORT_DIFF" value="true" />
<option name="INCLUDE_TEXT_INTO_PATCH" value="false" />
<option name="INCLUDE_TEXT_INTO_SHELF" value="false" />
<option name="CREATE_PATCH_EXPAND_DETAILS_DEFAULT" value="true" />
<option name="SHOW_FILE_HISTORY_DETAILS" value="true" />
<option name="SHOW_VCS_ERROR_NOTIFICATIONS" value="true" />
<option name="FORCE_NON_EMPTY_COMMENT" value="false" />
<option name="CLEAR_INITIAL_COMMIT_MESSAGE" value="false" />
<option name="LAST_COMMIT_MESSAGE" />
<option name="MAKE_NEW_CHANGELIST_ACTIVE" value="false" />
<option name="OPTIMIZE_IMPORTS_BEFORE_PROJECT_COMMIT" value="false" />
<option name="CHECK_FILES_UP_TO_DATE_BEFORE_COMMIT" value="false" />
<option name="REFORMAT_BEFORE_PROJECT_COMMIT" value="false" />
<option name="REFORMAT_BEFORE_FILE_COMMIT" value="false" />
<option name="FILE_HISTORY_DIALOG_COMMENTS_SPLITTER_PROPORTION" value="0.8" />
<option name="FILE_HISTORY_DIALOG_SPLITTER_PROPORTION" value="0.5" />
<option name="ACTIVE_VCS_NAME" />
<option name="UPDATE_GROUP_BY_PACKAGES" value="false" />
<option name="UPDATE_GROUP_BY_CHANGELIST" value="false" />
<option name="SHOW_FILE_HISTORY_AS_TREE" value="false" />
<option name="FILE_HISTORY_SPLITTER_PROPORTION" value="0.6" />
</component>
<component name="XDebuggerManager">
<breakpoint-manager />
</component>
<component name="editorHistoryManager">
<entry file="file://$PROJECT_DIR$/src/A.java">
<provider selected="true" editor-type-id="text-editor">
<state line="12" column="5" selection-start="233" selection-end="233" vertical-scroll-proportion="0.0">
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/C.java">
<provider selected="true" editor-type-id="text-editor">
<state line="7" column="14" selection-start="163" selection-end="163" vertical-scroll-proportion="0.12727273">
<folding />
</state>
</provider>
</entry>
</component>
</project>
@@ -0,0 +1,10 @@
/**
* Created with IntelliJ IDEA.
* User: db
* Date: 31.03.12
* Time: 17:50
* To change this template use File | Settings | File Templates.
*/
public class A {
public final static int X = 0;
}
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>
@@ -0,0 +1,14 @@
/**
* Created with IntelliJ IDEA.
* User: db
* Date: 31.03.12
* Time: 17:50
* To change this template use File | Settings | File Templates.
*/
public class A {
public final static int X;
static {
X = 100;
}
}
@@ -0,0 +1,9 @@
/**
* Created with IntelliJ IDEA.
* User: db
* Date: 31.03.12
* Time: 17:51
* To change this template use File | Settings | File Templates.
*/
public class C {
}
@@ -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;
+1 -1
View File
@@ -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" />
@@ -135,12 +135,11 @@ public class CompileContext extends UserDataHolderBase implements MessageHandler
}
}
else {
MODULES_LOOP: for (final Module module : moduleChunk.getModules()) {
for (ClasspathItem dependency : module.getClasspath(classpathKind)) {
if (dependency instanceof Module && dirtyModules.contains((Module)dependency)) {
dirtyModules.addAll(moduleChunk.getModules());
break MODULES_LOOP;
}
for (final Module module : moduleChunk.getModules()) {
final Set<Module> deps = getDependentModulesRecursively(module, classpathKind);
if (Utils.intersects(deps, modules)) {
dirtyModules.addAll(moduleChunk.getModules());
break;
}
}
}
@@ -148,7 +147,11 @@ public class CompileContext extends UserDataHolderBase implements MessageHandler
for (Module module : dirtyModules) {
markDirtyFiles(module, myTsStorage, true, isCompilingTests()? DirtyMarkScope.TESTS : DirtyMarkScope.BOTH, null);
if (isMake()) {
}
if (isMake()) {
// mark as non-incremental only the module that triggered non-incremental change
for (Module module : modules) {
if (!isCompilingTests()) {
myNonIncrementalModules.add(new Pair<Module, DirtyMarkScope>(module, DirtyMarkScope.PRODUCTION));
}
@@ -157,6 +160,30 @@ public class CompileContext extends UserDataHolderBase implements MessageHandler
}
}
private static Set<Module> getDependentModulesRecursively(final Module module, final ClasspathKind kind) {
final Set<Module> result = new HashSet<Module>();
new Object() {
final Set<Module> processed = new HashSet<Module>();
void traverse(Module module, ClasspathKind kind, Collection<Module> result, boolean exportedOnly) {
if (processed.add(module)) {
for (ClasspathItem item : module.getClasspath(kind, exportedOnly)) {
if (item instanceof ModuleSourceEntry) {
result.add(((ModuleSourceEntry)item).getModule());
}
else if (item instanceof Module) {
traverse((Module)item, kind, result, true);
}
}
}
}
}.traverse(module, kind, result, false);
return result;
}
boolean shouldDifferentiate(ModuleChunk chunk, boolean forTests) {
if (!isMake()) {
// the check makes sense only in make mode
@@ -306,7 +333,7 @@ public class CompileContext extends UserDataHolderBase implements MessageHandler
}
public boolean hasRemovedSources() {
final Set<String> removed = Paths.CHUNK_REMOVED_SOURCES_KEY.get(this);
final Set<String> removed = Utils.CHUNK_REMOVED_SOURCES_KEY.get(this);
return removed != null && !removed.isEmpty();
}
@@ -361,7 +361,7 @@ public class IncProjectBuilder {
throw new ProjectBuildException(e);
}
finally {
Paths.CHUNK_REMOVED_SOURCES_KEY.set(context, null);
Utils.CHUNK_REMOVED_SOURCES_KEY.set(context, null);
if (doneSomething && GENERATE_CLASSPATH_INDEX) {
final boolean forTests = context.isCompilingTests();
final Future<?> future = SharedThreadPool.INSTANCE.submit(new Runnable() {
@@ -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);
}
}
}
@@ -472,11 +473,11 @@ public class IncProjectBuilder {
}
}
if (!allChunkRemovedSources.isEmpty()) {
final Set<String> currentData = Paths.CHUNK_REMOVED_SOURCES_KEY.get(context);
final Set<String> currentData = Utils.CHUNK_REMOVED_SOURCES_KEY.get(context);
if (currentData != null) {
allChunkRemovedSources.addAll(currentData);
}
Paths.CHUNK_REMOVED_SOURCES_KEY.set(context, allChunkRemovedSources);
Utils.CHUNK_REMOVED_SOURCES_KEY.set(context, allChunkRemovedSources);
for (Module module : chunk.getModules()) {
myProjectDescriptor.fsState.clearDeletedPaths(module, context.isCompilingTests());
}
@@ -198,7 +198,7 @@ public abstract class ModuleLevelBuilder extends Builder {
}
private static Set<String> getRemovedPaths(CompileContext context) {
final Set<String> removed = Paths.CHUNK_REMOVED_SOURCES_KEY.get(context);
final Set<String> removed = Utils.CHUNK_REMOVED_SOURCES_KEY.get(context);
return removed != null? removed : Collections.<String>emptySet();
}
@@ -227,15 +227,8 @@ public abstract class ModuleLevelBuilder extends Builder {
moduleOfFileWithDependencies = ProjectPaths.getModulesWithDependentsRecursively(moduleOfFile, true);
myCache.put(moduleOfFile, moduleOfFileWithDependencies);
}
return intersects(moduleOfFileWithDependencies, myChunkModules);
return Utils.intersects(moduleOfFileWithDependencies, myChunkModules);
}
private static boolean intersects(Set<Module> set1, Set<Module> set2) {
if (set1.size() < set2.size()) {
return new HashSet<Module>(set1).removeAll(set2);
}
return new HashSet<Module>(set2).removeAll(set1);
}
}
}
@@ -2,11 +2,13 @@ package org.jetbrains.jps.incremental;
import com.intellij.openapi.util.Key;
import com.intellij.openapi.util.io.FileUtil;
import org.jetbrains.jps.Module;
import org.jetbrains.jps.Project;
import java.io.File;
import java.net.URI;
import java.net.URISyntaxException;
import java.util.HashSet;
import java.util.Locale;
import java.util.Set;
@@ -14,29 +16,24 @@ import java.util.Set;
* @author Eugene Zhuravlev
* Date: 10/20/11
*/
public class Paths {
private static final Paths ourInstance = new Paths();
public class Utils {
public static final Key<Set<String>> CHUNK_REMOVED_SOURCES_KEY = Key.create("_chunk_removed_sources_");
private volatile File mySystemRoot = new File(System.getProperty("user.home", ".jps-server"));
private static volatile File ourSystemRoot = new File(System.getProperty("user.home", ".jps-server"));
private Paths() {
}
public static Paths getInstance() {
return ourInstance;
private Utils() {
}
public static File getSystemRoot() {
return getInstance().mySystemRoot;
return ourSystemRoot;
}
public void setSystemRoot(File systemRoot) {
mySystemRoot = systemRoot;
public static void setSystemRoot(File systemRoot) {
ourSystemRoot = systemRoot;
}
public static File getDataStorageRoot(Project project) {
final String name = project.getProjectName().toLowerCase(Locale.US);
return new File(getInstance().mySystemRoot, name + "_" + Integer.toHexString(project.getLocationHash()));
return new File(ourSystemRoot, name + "_" + Integer.toHexString(project.getLocationHash()));
}
public static URI toURI(String localPath) {
@@ -62,4 +59,11 @@ public class Paths {
public static File convertToFile(final URI uri) {
return new File(toURI(uri.getPath(), false));
}
public static boolean intersects(Set<Module> set1, Set<Module> set2) {
if (set1.size() < set2.size()) {
return new HashSet<Module>(set1).removeAll(set2);
}
return new HashSet<Module>(set2).removeAll(set1);
}
}
@@ -10,13 +10,20 @@ import com.intellij.openapi.util.Key;
import com.intellij.openapi.util.Ref;
import com.intellij.openapi.util.io.FileUtil;
import com.intellij.openapi.util.text.StringUtil;
import com.intellij.uiDesigner.compiler.*;
import com.intellij.uiDesigner.compiler.AlienFormFileException;
import com.intellij.uiDesigner.compiler.AsmCodeGenerator;
import com.intellij.uiDesigner.compiler.FormErrorInfo;
import com.intellij.uiDesigner.compiler.NestedFormLoader;
import com.intellij.uiDesigner.core.GridConstraints;
import com.intellij.uiDesigner.lw.CompiledClassPropertiesProvider;
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 +36,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.*;
@@ -456,7 +459,7 @@ public class JavaBuilder extends ModuleLevelBuilder {
}
final BaseOSProcessHandler processHandler = JavacServerBootstrap.launchJavacServer(
javaHome, heapSize, port, Paths.getSystemRoot(), getCompilationVMOptions(context)
javaHome, heapSize, port, Utils.getSystemRoot(), getCompilationVMOptions(context)
);
final JavacServerClient client = new JavacServerClient();
try {
@@ -718,7 +721,8 @@ public class JavaBuilder extends ModuleLevelBuilder {
for (File formFile : formsToInstrument) {
final LwRootContainer rootContainer;
try {
rootContainer = Utils.getRootContainer(formFile.toURI().toURL(), new CompiledClassPropertiesProvider(finder.getLoader()));
rootContainer = com.intellij.uiDesigner.compiler.Utils
.getRootContainer(formFile.toURI().toURL(), new CompiledClassPropertiesProvider(finder.getLoader()));
}
catch (AlienFormFileException e) {
// ignore non-IDEA forms
@@ -821,7 +825,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);
}
@@ -894,7 +898,7 @@ public class JavaBuilder extends ModuleLevelBuilder {
kind = BuildMessage.Kind.INFO;
}
final JavaFileObject source = diagnostic.getSource();
final File sourceFile = source != null ? Paths.convertToFile(source.toUri()) : null;
final File sourceFile = source != null ? Utils.convertToFile(source.toUri()) : null;
final String srcPath = sourceFile != null ? FileUtil.toSystemIndependentName(sourceFile.getPath()) : null;
myContext.processMessage(
new CompilerMessage(BUILDER_NAME, kind, diagnostic.getMessage(Locale.US), srcPath, diagnostic.getStartPosition(),
@@ -955,7 +959,7 @@ public class JavaBuilder extends ModuleLevelBuilder {
}
private LwRootContainer loadForm(String formFileName, InputStream resourceStream) throws Exception {
final LwRootContainer container = Utils.getRootContainer(resourceStream, null);
final LwRootContainer container = com.intellij.uiDesigner.compiler.Utils.getRootContainer(resourceStream, null);
myCache.put(formFileName, container);
return container;
}
@@ -3,7 +3,7 @@ package org.jetbrains.jps.javac;
import com.intellij.openapi.util.io.FileUtil;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.jetbrains.jps.incremental.Paths;
import org.jetbrains.jps.incremental.Utils;
import javax.tools.*;
import java.io.File;
@@ -131,7 +131,7 @@ class JavacFileManager extends ForwardingJavaFileManager<StandardJavaFileManager
if (loc == StandardLocation.CLASS_OUTPUT) {
if (myOutputsMap.size() > 1 && sourceFile != null) {
// multiple outputs case
final File outputDir = findOutputDir(Paths.convertToFile(sourceFile.toUri()));
final File outputDir = findOutputDir(Utils.convertToFile(sourceFile.toUri()));
if (outputDir != null) {
return outputDir;
}
@@ -2,10 +2,9 @@ package org.jetbrains.jps.javac;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.jetbrains.jps.incremental.Paths;
import org.jetbrains.jps.incremental.Utils;
import javax.tools.JavaFileObject;
import javax.tools.SimpleJavaFileObject;
import javax.tools.*;
import java.io.*;
import java.net.URI;
import java.util.Arrays;
@@ -32,7 +31,7 @@ public final class OutputFileObject extends SimpleJavaFileObject {
}
public OutputFileObject(@Nullable JavacFileManager.Context context, @Nullable File outputRoot, String relativePath, @NotNull File file, @NotNull Kind kind, @Nullable String className, @Nullable final URI srcUri, @Nullable Content content) {
super(Paths.toURI(file.getPath()), kind);
super(Utils.toURI(file.getPath()), kind);
myContext = context;
mySourceUri = srcUri;
myContent = content;
@@ -40,7 +39,7 @@ public final class OutputFileObject extends SimpleJavaFileObject {
myRelativePath = relativePath;
myFile = file;
myClassName = className;
mySourceFile = srcUri != null? Paths.convertToFile(srcUri) : null;
mySourceFile = srcUri != null? Utils.convertToFile(srcUri) : null;
}
@Nullable
@@ -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
@@ -20,7 +20,7 @@ import org.jetbrains.annotations.Nullable;
import org.jetbrains.jps.api.AsyncTaskExecutor;
import org.jetbrains.jps.api.GlobalOptions;
import org.jetbrains.jps.api.JpsRemoteProto;
import org.jetbrains.jps.incremental.Paths;
import org.jetbrains.jps.incremental.Utils;
import java.io.File;
import java.net.InetSocketAddress;
@@ -50,7 +50,7 @@ public class Server {
private final ServerMessageHandler myMessageHandler;
public Server(File systemDir) {
Paths.getInstance().setSystemRoot(systemDir);
Utils.setSystemRoot(systemDir);
final ExecutorService threadPool = Executors.newCachedThreadPool();
myScheduler = ConcurrencyUtil.newSingleScheduledThreadExecutor("Client activity checker", Thread.MIN_PRIORITY);
myBuildsExecutor = Executors.newFixedThreadPool(MAX_SIMULTANEOUS_BUILD_SESSIONS);
@@ -137,7 +137,7 @@ class ServerState {
final FSState fsState = new FSState(false);
ProjectTimestamps timestamps = null;
BuildDataManager dataManager = null;
final File dataStorageRoot = Paths.getDataStorageRoot(project);
final File dataStorageRoot = Utils.getDataStorageRoot(project);
try {
timestamps = new ProjectTimestamps(dataStorageRoot);
dataManager = new BuildDataManager(dataStorageRoot, myKeepTempCachesInMemory);
@@ -83,4 +83,11 @@ public class FieldPropertyTest extends IncrementalTestCase {
public void testNonIncremental2() throws Exception {
doTest();
}
//public void testNonIncremental3() throws Exception {
// doTest();
// }
public void testNonIncremental4() throws Exception {
doTest();
}
}
@@ -71,7 +71,7 @@ public abstract class IncrementalTestCase extends TestCase {
FileUtil.copyDir(new File(getBaseDir()), new File(getWorkDir()));
Paths.getInstance().setSystemRoot(new File(workDir));
Utils.setSystemRoot(new File(workDir));
}
@Override
@@ -201,7 +201,7 @@ public abstract class IncrementalTestCase extends TestCase {
IdeaProjectLoader.loadFromPath(project, projectPath, "");
final File dataStorageRoot = Paths.getDataStorageRoot(project);
final File dataStorageRoot = Utils.getDataStorageRoot(project);
final TestJavaBuilderLogger javaBuilderLogger = new TestJavaBuilderLogger(FileUtil.toSystemIndependentName(getWorkDir() + File.separator));
final ProjectDescriptor projectDescriptor =
new ProjectDescriptor(project, new FSState(true), new ProjectTimestamps(dataStorageRoot),
@@ -54,7 +54,7 @@ public abstract class ArtifactBuilderTestCase extends UsefulTestCase {
myProject = new Project();
myProject.setProjectName(getProjectName());
final File serverRoot = FileUtil.createTempDirectory("compile-server", null);
Paths.getInstance().setSystemRoot(serverRoot);
Utils.setSystemRoot(serverRoot);
myArtifactBuilderLogger = new TestArtifactBuilderLogger();
}
@@ -153,7 +153,7 @@ public abstract class ArtifactBuilderTestCase extends UsefulTestCase {
private ProjectDescriptor createProjectDescriptor() {
try {
final File dataStorageRoot = Paths.getDataStorageRoot(myProject);
final File dataStorageRoot = Utils.getDataStorageRoot(myProject);
ProjectTimestamps timestamps = new ProjectTimestamps(dataStorageRoot);
BuildDataManager dataManager = new BuildDataManager(dataStorageRoot, true);
return new ProjectDescriptor(myProject, new FSState(true), timestamps, dataManager, new BuildLoggingManager(myArtifactBuilderLogger,
+1 -1
View File
@@ -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" />
+1 -1
View File
@@ -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;
@@ -134,6 +134,11 @@ public class ClassRepr extends Proto {
public int base() {
return d;
}
@Override
public boolean hadValue() {
return false;
}
};
}
@@ -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);
}
@@ -112,4 +112,6 @@ abstract class Difference {
public abstract int removedModifiers();
public abstract boolean packageLocalOn();
public abstract boolean hadValue ();
}
@@ -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;
@@ -1432,7 +1432,7 @@ public class Mappings {
debug("Field: ", it.name);
if ((field.access & Opcodes.ACC_PRIVATE) == 0 && (field.access & mask) == mask) {
if ((d.base() & Difference.ACCESS) > 0 || (d.base() & Difference.VALUE) > 0) {
if ((d.base() & Difference.ACCESS) > 0 || ((d.base() & Difference.VALUE) > 0 && d.hadValue())) {
debug("Inline field changed it's access or value => a switch to non-incremental mode requested");
if (!incrementalDecision(it.name, field, affectedFiles, filter)) {
debug("End of Differentiate, returning false");
@@ -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;
@@ -80,6 +80,11 @@ class MethodRepr extends ProtoMember {
public boolean packageLocalOn() {
return diff.packageLocalOn();
}
@Override
public boolean hadValue() {
return ((MethodRepr)past).hasValue();
}
};
}
@@ -90,6 +90,11 @@ class Proto implements RW.Savable {
((access & Opcodes.ACC_PRIVATE) == 0 && (access & Opcodes.ACC_PROTECTED) == 0 && (access & Opcodes.ACC_PUBLIC) == 0);
}
@Override
public boolean hadValue() {
return false;
}
};
}
}
@@ -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.
@@ -170,6 +171,11 @@ abstract class ProtoMember extends Proto {
public boolean packageLocalOn() {
return diff.packageLocalOn();
}
@Override
public boolean hadValue() {
return ((ProtoMember)past).hasValue();
}
};
}
}
@@ -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;
BIN
View File
Binary file not shown.
+1
View File
@@ -1,5 +1,6 @@
asm-commons.jar
asm.jar
asm4-all.jar
automaton.jar
cli-10.jar
cglib-2.2.2.jar
+1 -1
View File
@@ -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" />
+1 -1
View File
@@ -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" />
@@ -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;
@@ -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();
}
@@ -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;
}
@@ -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;
@@ -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);
@@ -19,8 +19,8 @@ import org.jetbrains.jps.*;
import org.jetbrains.jps.idea.Facet;
import org.jetbrains.jps.incremental.CompileContext;
import org.jetbrains.jps.incremental.ModuleLevelBuilder;
import org.jetbrains.jps.incremental.Paths;
import org.jetbrains.jps.incremental.ProjectBuildException;
import org.jetbrains.jps.incremental.Utils;
import org.jetbrains.jps.incremental.messages.BuildMessage;
import org.jetbrains.jps.incremental.messages.CompilerMessage;
@@ -510,7 +510,7 @@ class AndroidJpsUtil {
@NotNull
public static File getGeneratedSourcesStorage(@NotNull Module module) {
final File dataStorageRoot = Paths.getDataStorageRoot(module.getProject());
final File dataStorageRoot = Utils.getDataStorageRoot(module.getProject());
final File androidStorageRoot = new File(dataStorageRoot, ANDROID_STORAGE_DIR);
final File generatedSourcesRoot = new File(androidStorageRoot, GENERATED_SOURCES_FOLDER_NAME);
return new File(generatedSourcesRoot, module.getName());
@@ -518,7 +518,7 @@ class AndroidJpsUtil {
@NotNull
public static File getGeneratedResourcesStorage(@NotNull Module module) {
final File dataStorageRoot = Paths.getDataStorageRoot(module.getProject());
final File dataStorageRoot = Utils.getDataStorageRoot(module.getProject());
final File androidStorageRoot = new File(dataStorageRoot, ANDROID_STORAGE_DIR);
final File generatedSourcesRoot = new File(androidStorageRoot, GENERATED_RESOURCES_DIR_NAME);
return new File(generatedSourcesRoot, module.getName());
@@ -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;

Some files were not shown because too many files have changed in this diff Show More