reorganize stuff for using JavaScript stuff from Eclipse
This commit is contained in:
parent
3317c1ccf6
commit
72e8dc9098
|
@ -3,5 +3,6 @@
|
||||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
|
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
|
||||||
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
|
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
|
||||||
<classpathentry kind="src" path="source"/>
|
<classpathentry kind="src" path="source"/>
|
||||||
|
<classpathentry kind="src" path="data"/>
|
||||||
<classpathentry kind="output" path="bin"/>
|
<classpathentry kind="output" path="bin"/>
|
||||||
</classpath>
|
</classpath>
|
||||||
|
|
|
@ -0,0 +1,11 @@
|
||||||
|
java\/awt\/.*
|
||||||
|
javax\/swing\/.*
|
||||||
|
sun\/awt\/.*
|
||||||
|
sun\/swing\/.*
|
||||||
|
com\/sun\/.*
|
||||||
|
sun\/.*
|
||||||
|
org\/netbeans\/.*
|
||||||
|
org\/openide\/.*
|
||||||
|
com\/ibm\/crypto\/.*
|
||||||
|
com\/ibm\/security\/.*
|
||||||
|
org\/apache\/xerces\/.*
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -20,9 +20,9 @@ import org.junit.Test;
|
||||||
import com.ibm.wala.cast.java.client.JDTJavaSourceAnalysisEngine;
|
import com.ibm.wala.cast.java.client.JDTJavaSourceAnalysisEngine;
|
||||||
import com.ibm.wala.cast.java.client.JavaSourceAnalysisEngine;
|
import com.ibm.wala.cast.java.client.JavaSourceAnalysisEngine;
|
||||||
import com.ibm.wala.cast.java.ipa.callgraph.JavaSourceAnalysisScope;
|
import com.ibm.wala.cast.java.ipa.callgraph.JavaSourceAnalysisScope;
|
||||||
|
import com.ibm.wala.cast.java.jdt.test.Activator;
|
||||||
import com.ibm.wala.cast.java.test.ide.IDEIRTestUtil;
|
import com.ibm.wala.cast.java.test.ide.IDEIRTestUtil;
|
||||||
import com.ibm.wala.core.tests.callGraph.CallGraphTestUtil;
|
import com.ibm.wala.core.tests.callGraph.CallGraphTestUtil;
|
||||||
import com.ibm.wala.core.tests.plugin.CoreTestsPlugin;
|
|
||||||
import com.ibm.wala.ide.tests.util.EclipseTestUtil;
|
import com.ibm.wala.ide.tests.util.EclipseTestUtil;
|
||||||
import com.ibm.wala.ide.util.EclipseFileProvider;
|
import com.ibm.wala.ide.util.EclipseFileProvider;
|
||||||
import com.ibm.wala.ipa.callgraph.AnalysisScope;
|
import com.ibm.wala.ipa.callgraph.AnalysisScope;
|
||||||
|
@ -43,7 +43,7 @@ public class JDTJava15IRTests extends IRTests {
|
||||||
|
|
||||||
@BeforeClass
|
@BeforeClass
|
||||||
public static void beforeClass() {
|
public static void beforeClass() {
|
||||||
EclipseTestUtil.importZippedProject(TestPlugin.getDefault(), JDTJavaIRTests.PROJECT_NAME, JDTJavaIRTests.PROJECT_ZIP, new NullProgressMonitor());
|
EclipseTestUtil.importZippedProject(Activator.getDefault(), JDTJavaIRTests.PROJECT_NAME, JDTJavaIRTests.PROJECT_ZIP, new NullProgressMonitor());
|
||||||
System.err.println("finish importing project");
|
System.err.println("finish importing project");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -63,7 +63,7 @@ public class JDTJava15IRTests extends IRTests {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
engine.setExclusionsFile((new EclipseFileProvider())
|
engine.setExclusionsFile((new EclipseFileProvider())
|
||||||
.getFileFromPlugin(CoreTestsPlugin.getDefault(), CallGraphTestUtil.REGRESSION_EXCLUSIONS).getAbsolutePath());
|
.getFileFromPlugin(Activator.getDefault(), CallGraphTestUtil.REGRESSION_EXCLUSIONS).getAbsolutePath());
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
Assert.assertFalse("Cannot find exclusions file", true);
|
Assert.assertFalse("Cannot find exclusions file", true);
|
||||||
}
|
}
|
||||||
|
|
|
@ -50,9 +50,9 @@ import org.junit.BeforeClass;
|
||||||
import com.ibm.wala.cast.java.client.JDTJavaSourceAnalysisEngine;
|
import com.ibm.wala.cast.java.client.JDTJavaSourceAnalysisEngine;
|
||||||
import com.ibm.wala.cast.java.client.JavaSourceAnalysisEngine;
|
import com.ibm.wala.cast.java.client.JavaSourceAnalysisEngine;
|
||||||
import com.ibm.wala.cast.java.ipa.callgraph.JavaSourceAnalysisScope;
|
import com.ibm.wala.cast.java.ipa.callgraph.JavaSourceAnalysisScope;
|
||||||
|
import com.ibm.wala.cast.java.jdt.test.Activator;
|
||||||
import com.ibm.wala.cast.java.test.ide.IDEIRTestUtil;
|
import com.ibm.wala.cast.java.test.ide.IDEIRTestUtil;
|
||||||
import com.ibm.wala.core.tests.callGraph.CallGraphTestUtil;
|
import com.ibm.wala.core.tests.callGraph.CallGraphTestUtil;
|
||||||
import com.ibm.wala.core.tests.plugin.CoreTestsPlugin;
|
|
||||||
import com.ibm.wala.ide.tests.util.EclipseTestUtil;
|
import com.ibm.wala.ide.tests.util.EclipseTestUtil;
|
||||||
import com.ibm.wala.ide.util.EclipseFileProvider;
|
import com.ibm.wala.ide.util.EclipseFileProvider;
|
||||||
import com.ibm.wala.ipa.callgraph.AnalysisScope;
|
import com.ibm.wala.ipa.callgraph.AnalysisScope;
|
||||||
|
@ -77,7 +77,7 @@ public class JDTJavaIRTests extends JavaIRTests {
|
||||||
|
|
||||||
@BeforeClass
|
@BeforeClass
|
||||||
public static void beforeClass() {
|
public static void beforeClass() {
|
||||||
EclipseTestUtil.importZippedProject(TestPlugin.getDefault(), PROJECT_NAME, PROJECT_ZIP, new NullProgressMonitor());
|
EclipseTestUtil.importZippedProject(Activator.getDefault(), PROJECT_NAME, PROJECT_ZIP, new NullProgressMonitor());
|
||||||
System.err.println("finish importing project");
|
System.err.println("finish importing project");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -97,7 +97,7 @@ public class JDTJavaIRTests extends JavaIRTests {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
engine.setExclusionsFile((new EclipseFileProvider())
|
engine.setExclusionsFile((new EclipseFileProvider())
|
||||||
.getFileFromPlugin(CoreTestsPlugin.getDefault(), CallGraphTestUtil.REGRESSION_EXCLUSIONS).getAbsolutePath());
|
.getFileFromPlugin(Activator.getDefault(), CallGraphTestUtil.REGRESSION_EXCLUSIONS).getAbsolutePath());
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
Assert.assertFalse("Cannot find exclusions file", true);
|
Assert.assertFalse("Cannot find exclusions file", true);
|
||||||
}
|
}
|
||||||
|
|
|
@ -38,17 +38,16 @@
|
||||||
package com.ibm.wala.cast.java.translator.jdt;
|
package com.ibm.wala.cast.java.translator.jdt;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
|
import org.eclipse.core.resources.IFile;
|
||||||
import org.eclipse.core.resources.IProject;
|
import org.eclipse.core.resources.IProject;
|
||||||
import org.eclipse.jdt.core.ICompilationUnit;
|
import org.eclipse.jdt.core.ICompilationUnit;
|
||||||
import org.eclipse.jdt.core.JavaCore;
|
import org.eclipse.jdt.core.JavaCore;
|
||||||
import org.eclipse.jdt.core.JavaModelException;
|
import org.eclipse.jdt.core.JavaModelException;
|
||||||
import org.eclipse.jdt.core.compiler.IProblem;
|
|
||||||
import org.eclipse.jdt.core.dom.AST;
|
import org.eclipse.jdt.core.dom.AST;
|
||||||
import org.eclipse.jdt.core.dom.ASTParser;
|
import org.eclipse.jdt.core.dom.ASTParser;
|
||||||
import org.eclipse.jdt.core.dom.ASTRequestor;
|
import org.eclipse.jdt.core.dom.ASTRequestor;
|
||||||
|
@ -61,9 +60,13 @@ import com.ibm.wala.classLoader.JarFileModule;
|
||||||
import com.ibm.wala.classLoader.Module;
|
import com.ibm.wala.classLoader.Module;
|
||||||
import com.ibm.wala.classLoader.ModuleEntry;
|
import com.ibm.wala.classLoader.ModuleEntry;
|
||||||
import com.ibm.wala.ide.classloader.EclipseSourceFileModule;
|
import com.ibm.wala.ide.classloader.EclipseSourceFileModule;
|
||||||
|
import com.ibm.wala.ide.util.HeadlessUtil;
|
||||||
|
import com.ibm.wala.ide.util.HeadlessUtil.EclipseCompiler;
|
||||||
|
import com.ibm.wala.ide.util.HeadlessUtil.Parser;
|
||||||
import com.ibm.wala.ipa.callgraph.AnalysisScope;
|
import com.ibm.wala.ipa.callgraph.AnalysisScope;
|
||||||
import com.ibm.wala.types.ClassLoaderReference;
|
import com.ibm.wala.types.ClassLoaderReference;
|
||||||
import com.ibm.wala.util.debug.Assertions;
|
import com.ibm.wala.util.debug.Assertions;
|
||||||
|
import com.ibm.wala.util.functions.Function;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A SourceModuleTranslator whose implementation of loadAllSources() uses the PolyglotFrontEnd pseudo-compiler to generate DOMO IR
|
* A SourceModuleTranslator whose implementation of loadAllSources() uses the PolyglotFrontEnd pseudo-compiler to generate DOMO IR
|
||||||
|
@ -115,54 +118,44 @@ public class JDTSourceModuleTranslator implements SourceModuleTranslator {
|
||||||
public void loadAllSources(Set<ModuleEntry> modules) {
|
public void loadAllSources(Set<ModuleEntry> modules) {
|
||||||
// TODO: we might need one AST (-> "Object" class) for all files.
|
// TODO: we might need one AST (-> "Object" class) for all files.
|
||||||
// TODO: group by project and send 'em in
|
// TODO: group by project and send 'em in
|
||||||
|
|
||||||
System.out.println(modules);
|
System.out.println(modules);
|
||||||
|
|
||||||
// sort files into projects
|
HeadlessUtil.parseModules(modules, new EclipseCompiler<ICompilationUnit, CompilationUnit>() {
|
||||||
Map<IProject, Map<ICompilationUnit,EclipseSourceFileModule>> projectsFiles = new HashMap<IProject, Map<ICompilationUnit,EclipseSourceFileModule>>();
|
@Override
|
||||||
for (ModuleEntry m : modules) {
|
public ICompilationUnit getCompilationUnit(IFile file) {
|
||||||
assert m instanceof EclipseSourceFileModule : "Expecing EclipseSourceFileModule, not " + m.getClass();
|
return JavaCore.createCompilationUnitFrom(file);
|
||||||
EclipseSourceFileModule entry = (EclipseSourceFileModule) m;
|
|
||||||
IProject proj = entry.getIFile().getProject();
|
|
||||||
if (!projectsFiles.containsKey(proj)) {
|
|
||||||
projectsFiles.put(proj, new HashMap<ICompilationUnit,EclipseSourceFileModule>());
|
|
||||||
}
|
}
|
||||||
projectsFiles.get(proj).put(JavaCore.createCompilationUnitFrom(entry.getIFile()), entry);
|
@Override
|
||||||
}
|
public Parser<ICompilationUnit, CompilationUnit> getParser() {
|
||||||
|
return new Parser<ICompilationUnit, CompilationUnit>() {
|
||||||
final ASTParser parser = ASTParser.newParser(AST.JLS3);
|
final ASTParser parser;
|
||||||
|
{
|
||||||
for (final Map.Entry<IProject,Map<ICompilationUnit,EclipseSourceFileModule>> proj : projectsFiles.entrySet()) {
|
parser = ASTParser.newParser(AST.JLS3);
|
||||||
parser.setProject(JavaCore.create(proj.getKey()));
|
parser.setResolveBindings(true);
|
||||||
parser.setResolveBindings(true);
|
|
||||||
|
|
||||||
Set<ICompilationUnit> units = proj.getValue().keySet();
|
|
||||||
parser.createASTs(units.toArray(new ICompilationUnit[units.size()]), new String[0], new ASTRequestor() {
|
|
||||||
public void acceptAST(ICompilationUnit source, CompilationUnit ast) {
|
|
||||||
|
|
||||||
try {
|
|
||||||
JDTJava2CAstTranslator jdt2cast = makeCAstTranslator(ast, source.getUnderlyingResource().getLocation().toOSString());
|
|
||||||
final Java2IRTranslator java2ir = makeIRTranslator();
|
|
||||||
java2ir.translate(proj.getValue().get(source), jdt2cast.translateToCAst());
|
|
||||||
} catch (JavaModelException e) {
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
}
|
||||||
|
@Override
|
||||||
IProblem[] problems = ast.getProblems();
|
public void setProject(IProject project) {
|
||||||
int length = problems.length;
|
parser.setProject(JavaCore.create(project));
|
||||||
if (length > 0) {
|
|
||||||
StringBuffer buffer = new StringBuffer();
|
|
||||||
for (int i = 0; i < length; i++) {
|
|
||||||
buffer.append(problems[i].getMessage());
|
|
||||||
buffer.append('\n');
|
|
||||||
}
|
|
||||||
if (length != 0)
|
|
||||||
System.err.println("Unexpected problems in " + source.getElementName() + buffer.toString());
|
|
||||||
}
|
}
|
||||||
}
|
@Override
|
||||||
}, null);
|
public void processASTs(final Map<ICompilationUnit,EclipseSourceFileModule> files, final Function<Object[], Boolean> errors) {
|
||||||
|
parser.createASTs(files.keySet().toArray(new ICompilationUnit[files.size()]), new String[0], new ASTRequestor() {
|
||||||
|
public void acceptAST(ICompilationUnit source, CompilationUnit ast) {
|
||||||
|
try {
|
||||||
|
JDTJava2CAstTranslator jdt2cast = makeCAstTranslator(ast, source.getUnderlyingResource().getLocation().toOSString());
|
||||||
|
final Java2IRTranslator java2ir = makeIRTranslator();
|
||||||
|
java2ir.translate(files.get(source), jdt2cast.translateToCAst());
|
||||||
|
} catch (JavaModelException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
errors.apply(ast.getProblems());
|
||||||
|
}
|
||||||
|
}, null);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
protected Java2IRTranslator makeIRTranslator() {
|
protected Java2IRTranslator makeIRTranslator() {
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<classpath>
|
<classpath>
|
||||||
<classpathentry kind="src" path="source"/>
|
<classpathentry kind="src" path="source"/>
|
||||||
<classpathentry kind="lib" path="lib/polyglot.jar"/>
|
<classpathentry exported="true" kind="lib" path="lib/polyglot.jar"/>
|
||||||
<classpathentry kind="lib" path="lib/java_cup.jar"/>
|
<classpathentry exported="true" kind="lib" path="lib/java_cup.jar"/>
|
||||||
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
|
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
|
||||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
|
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
|
||||||
<classpathentry kind="output" path="bin"/>
|
<classpathentry kind="output" path="bin"/>
|
||||||
|
|
|
@ -11,25 +11,41 @@ Require-Bundle: com.ibm.wala.cast.java,
|
||||||
org.eclipse.core.runtime,
|
org.eclipse.core.runtime,
|
||||||
com.ibm.wala.shrike,
|
com.ibm.wala.shrike,
|
||||||
org.eclipse.jdt.core,
|
org.eclipse.jdt.core,
|
||||||
org.eclipse.core.resources,
|
org.eclipse.core.resources
|
||||||
com.ibm.wala.ide
|
|
||||||
Bundle-RequiredExecutionEnvironment: J2SE-1.5
|
Bundle-RequiredExecutionEnvironment: J2SE-1.5
|
||||||
Bundle-ActivationPolicy: lazy
|
Bundle-ActivationPolicy: lazy
|
||||||
Export-Package: com.ibm.wala.cast.java.client.polyglot,
|
Export-Package: com.ibm.wala.cast.java.polyglot;uses:="org.eclipse.core.runtime,org.osgi.framework",
|
||||||
com.ibm.wala.cast.java.polyglot;uses:="org.osgi.framework,org.eclipse.core.runtime",
|
|
||||||
com.ibm.wala.cast.java.translator.polyglot;
|
com.ibm.wala.cast.java.translator.polyglot;
|
||||||
uses:="com.ibm.wala.types,
|
uses:="polyglot.types,
|
||||||
polyglot.types,
|
|
||||||
polyglot.util,
|
|
||||||
polyglot.ast,
|
|
||||||
com.ibm.wala.ipa.cha,
|
|
||||||
com.ibm.wala.cast.java.client,
|
|
||||||
com.ibm.wala.classLoader,
|
|
||||||
com.ibm.wala.cast.tree,
|
com.ibm.wala.cast.tree,
|
||||||
com.ibm.wala.cast.java.loader,
|
com.ibm.wala.classLoader,
|
||||||
com.ibm.wala.ipa.callgraph.impl,
|
com.ibm.wala.ipa.cha,
|
||||||
com.ibm.wala.ipa.callgraph,
|
com.ibm.wala.cast.java.types,
|
||||||
polyglot.frontend.goals,
|
|
||||||
com.ibm.wala.cast.tree.impl,
|
|
||||||
com.ibm.wala.cast.java.translator,
|
com.ibm.wala.cast.java.translator,
|
||||||
com.ibm.wala.cast.java.types"
|
com.ibm.wala.cast.java.client,
|
||||||
|
com.ibm.wala.types,
|
||||||
|
polyglot.ast,
|
||||||
|
polyglot.util,
|
||||||
|
com.ibm.wala.ipa.callgraph,
|
||||||
|
polyglot.frontend,
|
||||||
|
com.ibm.wala.cast.ir.translator,
|
||||||
|
com.ibm.wala.ipa.callgraph.impl,
|
||||||
|
com.ibm.wala.cast.java.loader,
|
||||||
|
com.ibm.wala.cast.tree.impl",
|
||||||
|
java_cup,
|
||||||
|
java_cup.runtime,
|
||||||
|
polyglot.ast,
|
||||||
|
polyglot.dispatch,
|
||||||
|
polyglot.frontend,
|
||||||
|
polyglot.lex,
|
||||||
|
polyglot.main,
|
||||||
|
polyglot.parse,
|
||||||
|
polyglot.qq,
|
||||||
|
polyglot.types,
|
||||||
|
polyglot.types.reflect,
|
||||||
|
polyglot.util,
|
||||||
|
polyglot.util.typedump,
|
||||||
|
polyglot.visit
|
||||||
|
Bundle-ClassPath: lib/java_cup.jar,
|
||||||
|
lib/polyglot.jar,
|
||||||
|
.
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
source.. = source/
|
source.. = source/
|
||||||
output.. = bin/
|
output.. = bin/
|
||||||
bin.includes = META-INF/,\
|
bin.includes = META-INF/,\
|
||||||
.
|
.,\
|
||||||
|
lib/java_cup.jar,\
|
||||||
|
lib/polyglot.jar
|
||||||
|
|
|
@ -5,13 +5,12 @@ Bundle-SymbolicName: com.ibm.wala.cast.java.test
|
||||||
Bundle-Version: 1.0.0
|
Bundle-Version: 1.0.0
|
||||||
Bundle-Activator: com.ibm.wala.cast.java.test.TestPlugin
|
Bundle-Activator: com.ibm.wala.cast.java.test.TestPlugin
|
||||||
Bundle-Vendor: IBM
|
Bundle-Vendor: IBM
|
||||||
Require-Bundle: org.junit4,
|
Require-Bundle: com.ibm.wala.core.tests,
|
||||||
com.ibm.wala.core.tests,
|
|
||||||
com.ibm.wala.cast.java,
|
com.ibm.wala.cast.java,
|
||||||
com.ibm.wala.cast,
|
com.ibm.wala.cast,
|
||||||
com.ibm.wala.core,
|
com.ibm.wala.core,
|
||||||
com.ibm.wala.shrike,
|
com.ibm.wala.shrike,
|
||||||
org.eclipse.core.runtime
|
org.junit4
|
||||||
Bundle-ActivationPolicy: lazy
|
Bundle-ActivationPolicy: lazy
|
||||||
Export-Package: com.ibm.wala.cast.java.test
|
Export-Package: com.ibm.wala.cast.java.test
|
||||||
Bundle-RequiredExecutionEnvironment: J2SE-1.5
|
Bundle-RequiredExecutionEnvironment: J2SE-1.5
|
||||||
|
|
|
@ -1,53 +0,0 @@
|
||||||
/******************************************************************************
|
|
||||||
* Copyright (c) 2002 - 2006 IBM Corporation.
|
|
||||||
* All rights reserved. This program and the accompanying materials
|
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
|
||||||
* which accompanies this distribution, and is available at
|
|
||||||
* http://www.eclipse.org/legal/epl-v10.html
|
|
||||||
*
|
|
||||||
* Contributors:
|
|
||||||
* IBM Corporation - initial API and implementation
|
|
||||||
*****************************************************************************/
|
|
||||||
package com.ibm.wala.cast.java.test;
|
|
||||||
|
|
||||||
import org.eclipse.core.runtime.Plugin;
|
|
||||||
import org.osgi.framework.BundleContext;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The main plugin class to be used in the desktop.
|
|
||||||
*/
|
|
||||||
public class TestPlugin extends Plugin {
|
|
||||||
|
|
||||||
//The shared instance.
|
|
||||||
private static TestPlugin plugin;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The constructor.
|
|
||||||
*/
|
|
||||||
public TestPlugin() {
|
|
||||||
plugin = this;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* This method is called upon plug-in activation
|
|
||||||
*/
|
|
||||||
public void start(BundleContext context) throws Exception {
|
|
||||||
super.start(context);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* This method is called when the plug-in is stopped
|
|
||||||
*/
|
|
||||||
public void stop(BundleContext context) throws Exception {
|
|
||||||
super.stop(context);
|
|
||||||
plugin = null;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns the shared instance.
|
|
||||||
*/
|
|
||||||
public static TestPlugin getDefault() {
|
|
||||||
return plugin;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
|
@ -3,15 +3,12 @@ Bundle-ManifestVersion: 2
|
||||||
Bundle-Name: Java Source WALA Front End
|
Bundle-Name: Java Source WALA Front End
|
||||||
Bundle-SymbolicName: com.ibm.wala.cast.java
|
Bundle-SymbolicName: com.ibm.wala.cast.java
|
||||||
Bundle-Version: 1.0.0.qualifier
|
Bundle-Version: 1.0.0.qualifier
|
||||||
Bundle-Activator: com.ibm.wala.cast.java.JavaSourcePlugin
|
|
||||||
Bundle-Vendor: rfuhrer@watson.ibm.com
|
Bundle-Vendor: rfuhrer@watson.ibm.com
|
||||||
Require-Bundle: com.ibm.wala.cast,
|
Require-Bundle: com.ibm.wala.cast,
|
||||||
com.ibm.wala.core,
|
com.ibm.wala.core,
|
||||||
com.ibm.wala.shrike,
|
com.ibm.wala.shrike
|
||||||
org.eclipse.core.runtime
|
|
||||||
Bundle-ActivationPolicy: lazy
|
Bundle-ActivationPolicy: lazy
|
||||||
Export-Package: com.ibm.wala.cast.java,
|
Export-Package: com.ibm.wala.cast.java.analysis.typeInference,
|
||||||
com.ibm.wala.cast.java.analysis.typeInference,
|
|
||||||
com.ibm.wala.cast.java.client,
|
com.ibm.wala.cast.java.client,
|
||||||
com.ibm.wala.cast.java.client.impl,
|
com.ibm.wala.cast.java.client.impl,
|
||||||
com.ibm.wala.cast.java.examples.ast,
|
com.ibm.wala.cast.java.examples.ast,
|
||||||
|
|
|
@ -1,53 +0,0 @@
|
||||||
/******************************************************************************
|
|
||||||
* Copyright (c) 2002 - 2006 IBM Corporation.
|
|
||||||
* All rights reserved. This program and the accompanying materials
|
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
|
||||||
* which accompanies this distribution, and is available at
|
|
||||||
* http://www.eclipse.org/legal/epl-v10.html
|
|
||||||
*
|
|
||||||
* Contributors:
|
|
||||||
* IBM Corporation - initial API and implementation
|
|
||||||
*****************************************************************************/
|
|
||||||
package com.ibm.wala.cast.java;
|
|
||||||
|
|
||||||
import org.eclipse.core.runtime.Plugin;
|
|
||||||
import org.osgi.framework.BundleContext;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The main plugin class to be used in the desktop.
|
|
||||||
*/
|
|
||||||
public class JavaSourcePlugin extends Plugin {
|
|
||||||
|
|
||||||
//The shared instance.
|
|
||||||
private static JavaSourcePlugin plugin;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The constructor.
|
|
||||||
*/
|
|
||||||
public JavaSourcePlugin() {
|
|
||||||
plugin = this;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* This method is called upon plug-in activation
|
|
||||||
*/
|
|
||||||
public void start(BundleContext context) throws Exception {
|
|
||||||
super.start(context);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* This method is called when the plug-in is stopped
|
|
||||||
*/
|
|
||||||
public void stop(BundleContext context) throws Exception {
|
|
||||||
super.stop(context);
|
|
||||||
plugin = null;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns the shared instance.
|
|
||||||
*/
|
|
||||||
public static JavaSourcePlugin getDefault() {
|
|
||||||
return plugin;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
|
@ -5,16 +5,14 @@ Bundle-SymbolicName: com.ibm.wala.cast.js.rhino.test
|
||||||
Bundle-Version: 1.0.0
|
Bundle-Version: 1.0.0
|
||||||
Bundle-Activator: com.ibm.wala.cast.js.rhino.test.Activator
|
Bundle-Activator: com.ibm.wala.cast.js.rhino.test.Activator
|
||||||
Bundle-Vendor: IBM
|
Bundle-Vendor: IBM
|
||||||
Require-Bundle: org.eclipse.core.runtime,
|
Require-Bundle: com.ibm.wala.cast.js.rhino;bundle-version="1.0.0",
|
||||||
com.ibm.wala.cast.js.rhino;bundle-version="1.0.0",
|
|
||||||
com.ibm.wala.cast.js;bundle-version="1.0.0",
|
com.ibm.wala.cast.js;bundle-version="1.0.0",
|
||||||
com.ibm.wala.cast;bundle-version="1.0.0",
|
com.ibm.wala.cast;bundle-version="1.0.0",
|
||||||
com.ibm.wala.core;bundle-version="1.1.3",
|
com.ibm.wala.core;bundle-version="1.1.3",
|
||||||
com.ibm.wala.cast.js.test;bundle-version="1.0.0",
|
com.ibm.wala.cast.js.test;bundle-version="1.0.0",
|
||||||
com.ibm.wala.cast.test;bundle-version="1.0.0",
|
com.ibm.wala.cast.test;bundle-version="1.0.0",
|
||||||
com.ibm.wala.core.tests;bundle-version="1.1.3",
|
com.ibm.wala.core.tests;bundle-version="1.1.3",
|
||||||
org.junit4;bundle-version="4.3.1",
|
org.junit4;bundle-version="4.3.1"
|
||||||
com.ibm.wala.ide;bundle-version="1.1.3"
|
|
||||||
Bundle-RequiredExecutionEnvironment: J2SE-1.5
|
Bundle-RequiredExecutionEnvironment: J2SE-1.5
|
||||||
Bundle-ActivationPolicy: lazy
|
Bundle-ActivationPolicy: lazy
|
||||||
Export-Package: com.ibm.wala.cast.js.test
|
Export-Package: com.ibm.wala.cast.js.test
|
||||||
|
|
|
@ -1,50 +0,0 @@
|
||||||
package com.ibm.wala.cast.js.rhino.test;
|
|
||||||
|
|
||||||
import org.eclipse.core.runtime.Plugin;
|
|
||||||
import org.osgi.framework.BundleContext;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The activator class controls the plug-in life cycle
|
|
||||||
*/
|
|
||||||
public class Activator extends Plugin {
|
|
||||||
|
|
||||||
// The plug-in ID
|
|
||||||
public static final String PLUGIN_ID = "com.ibm.wala.cast.js.rhino.test";
|
|
||||||
|
|
||||||
// The shared instance
|
|
||||||
private static Activator plugin;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The constructor
|
|
||||||
*/
|
|
||||||
public Activator() {
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
* @see org.eclipse.core.runtime.Plugins#start(org.osgi.framework.BundleContext)
|
|
||||||
*/
|
|
||||||
public void start(BundleContext context) throws Exception {
|
|
||||||
super.start(context);
|
|
||||||
plugin = this;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
* @see org.eclipse.core.runtime.Plugin#stop(org.osgi.framework.BundleContext)
|
|
||||||
*/
|
|
||||||
public void stop(BundleContext context) throws Exception {
|
|
||||||
plugin = null;
|
|
||||||
super.stop(context);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns the shared instance
|
|
||||||
*
|
|
||||||
* @return the shared instance
|
|
||||||
*/
|
|
||||||
public static Activator getDefault() {
|
|
||||||
return plugin;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
|
@ -3,10 +3,8 @@ Bundle-ManifestVersion: 2
|
||||||
Bundle-Name: Rhino Plug-in
|
Bundle-Name: Rhino Plug-in
|
||||||
Bundle-SymbolicName: com.ibm.wala.cast.js.rhino
|
Bundle-SymbolicName: com.ibm.wala.cast.js.rhino
|
||||||
Bundle-Version: 1.0.0
|
Bundle-Version: 1.0.0
|
||||||
Bundle-Activator: com.ibm.wala.js.rhino.Activator
|
|
||||||
Bundle-Vendor: IBM
|
Bundle-Vendor: IBM
|
||||||
Require-Bundle: org.eclipse.core.runtime,
|
Require-Bundle: com.ibm.wala.cast;bundle-version="1.0.0",
|
||||||
com.ibm.wala.cast;bundle-version="1.0.0",
|
|
||||||
com.ibm.wala.cast.js;bundle-version="1.0.0",
|
com.ibm.wala.cast.js;bundle-version="1.0.0",
|
||||||
com.ibm.wala.core;bundle-version="1.1.3"
|
com.ibm.wala.core;bundle-version="1.1.3"
|
||||||
Bundle-RequiredExecutionEnvironment: J2SE-1.5
|
Bundle-RequiredExecutionEnvironment: J2SE-1.5
|
||||||
|
|
|
@ -1,50 +0,0 @@
|
||||||
package com.ibm.wala.js.rhino;
|
|
||||||
|
|
||||||
import org.eclipse.core.runtime.Plugin;
|
|
||||||
import org.osgi.framework.BundleContext;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The activator class controls the plug-in life cycle
|
|
||||||
*/
|
|
||||||
public class Activator extends Plugin {
|
|
||||||
|
|
||||||
// The plug-in ID
|
|
||||||
public static final String PLUGIN_ID = "com.ibm.wala.js.rhino";
|
|
||||||
|
|
||||||
// The shared instance
|
|
||||||
private static Activator plugin;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The constructor
|
|
||||||
*/
|
|
||||||
public Activator() {
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
* @see org.eclipse.core.runtime.Plugins#start(org.osgi.framework.BundleContext)
|
|
||||||
*/
|
|
||||||
public void start(BundleContext context) throws Exception {
|
|
||||||
super.start(context);
|
|
||||||
plugin = this;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
* @see org.eclipse.core.runtime.Plugin#stop(org.osgi.framework.BundleContext)
|
|
||||||
*/
|
|
||||||
public void stop(BundleContext context) throws Exception {
|
|
||||||
plugin = null;
|
|
||||||
super.stop(context);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns the shared instance
|
|
||||||
*
|
|
||||||
* @return the shared instance
|
|
||||||
*/
|
|
||||||
public static Activator getDefault() {
|
|
||||||
return plugin;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
|
@ -0,0 +1,28 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<projectDescription>
|
||||||
|
<name>com.ibm.wala.cast.js.test.data</name>
|
||||||
|
<comment></comment>
|
||||||
|
<projects>
|
||||||
|
</projects>
|
||||||
|
<buildSpec>
|
||||||
|
<buildCommand>
|
||||||
|
<name>org.eclipse.wst.jsdt.core.javascriptValidator</name>
|
||||||
|
<arguments>
|
||||||
|
</arguments>
|
||||||
|
</buildCommand>
|
||||||
|
<buildCommand>
|
||||||
|
<name>org.eclipse.pde.ManifestBuilder</name>
|
||||||
|
<arguments>
|
||||||
|
</arguments>
|
||||||
|
</buildCommand>
|
||||||
|
<buildCommand>
|
||||||
|
<name>org.eclipse.pde.SchemaBuilder</name>
|
||||||
|
<arguments>
|
||||||
|
</arguments>
|
||||||
|
</buildCommand>
|
||||||
|
</buildSpec>
|
||||||
|
<natures>
|
||||||
|
<nature>org.eclipse.wst.jsdt.core.jsNature</nature>
|
||||||
|
<nature>org.eclipse.pde.PluginNature</nature>
|
||||||
|
</natures>
|
||||||
|
</projectDescription>
|
|
@ -0,0 +1,5 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<classpath>
|
||||||
|
<classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.baseBrowserLibrary"/>
|
||||||
|
<classpathentry kind="output" path=""/>
|
||||||
|
</classpath>
|
|
@ -0,0 +1 @@
|
||||||
|
org.eclipse.wst.jsdt.launching.baseBrowserLibrary
|
|
@ -0,0 +1 @@
|
||||||
|
Window
|
|
@ -0,0 +1,7 @@
|
||||||
|
Manifest-Version: 1.0
|
||||||
|
Bundle-ManifestVersion: 2
|
||||||
|
Bundle-Name: Data
|
||||||
|
Bundle-SymbolicName: com.ibm.wala.cast.js.test.data;singleton:=true
|
||||||
|
Bundle-Version: 1.0.0.qualifier
|
||||||
|
Bundle-ClassPath: examples-src/
|
||||||
|
Bundle-ActivationPolicy: lazy
|
|
@ -0,0 +1,2 @@
|
||||||
|
bin.includes = META-INF/,\
|
||||||
|
examples-src/
|
23
com.ibm.wala.cast.js.test/examples-src/pages/jquery.html → com.ibm.wala.cast.js.test.data/examples-src/jquery.js
vendored
Executable file → Normal file
23
com.ibm.wala.cast.js.test/examples-src/pages/jquery.html → com.ibm.wala.cast.js.test.data/examples-src/jquery.js
vendored
Executable file → Normal file
|
@ -1,13 +1,10 @@
|
||||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
/**
|
||||||
<html>
|
*
|
||||||
<head>
|
*/
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
|
||||||
<title>Untitled Document</title>
|
|
||||||
</head>
|
|
||||||
<script>
|
|
||||||
(function top () {
|
(function top () {
|
||||||
var c = n.jQuery = n.$ = function dollar (a, d) {
|
var c = n.jQuery = n.$ = function dollar (a, d) {
|
||||||
return new c.fn.init(a, d)
|
return new c.fn.init(a, d);
|
||||||
}
|
}
|
||||||
c.fn = c.prototype = {
|
c.fn = c.prototype = {
|
||||||
init: function init (a, d) {
|
init: function init (a, d) {
|
||||||
|
@ -75,11 +72,11 @@
|
||||||
var j, q = 0,
|
var j, q = 0,
|
||||||
t = a.length;
|
t = a.length;
|
||||||
if (f) if (t === void 0) for (j in a) {
|
if (f) if (t === void 0) for (j in a) {
|
||||||
if (d.apply(a[j], f) === false) break
|
if (d.apply(a[j], f) === false) break;
|
||||||
} else for (; q < t;) {
|
} else for (; q < t;) {
|
||||||
if (d.apply(a[q++], f) === false) break
|
if (d.apply(a[q++], f) === false) break;
|
||||||
} else if (t === void 0) for (j in a) {
|
} else if (t === void 0) for (j in a) {
|
||||||
if (d.call(a[j], j, a[j]) === false) break
|
if (d.call(a[j], j, a[j]) === false) break;
|
||||||
} else for (f = a[0]; q < t && d.call(f, q, f) !== false; f = a[++q]);
|
} else for (f = a[0]; q < t && d.call(f, q, f) !== false; f = a[++q]);
|
||||||
return a
|
return a
|
||||||
},
|
},
|
||||||
|
@ -254,10 +251,8 @@
|
||||||
(j =
|
(j =
|
||||||
d[f++]) != null;) if (j.nodeType != 8) a[q++] = j;
|
d[f++]) != null;) if (j.nodeType != 8) a[q++] = j;
|
||||||
return a
|
return a
|
||||||
},
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
})();
|
})();
|
||||||
|
|
||||||
</script>
|
|
|
@ -0,0 +1,8 @@
|
||||||
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||||
|
<title>Untitled Document</title>
|
||||||
|
</head>
|
||||||
|
<script src="jquery.js">
|
||||||
|
</script>
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue