Remove dependence from com.ibm.wala.ide to com.ibm.wala.cast.
Removing this dependence allows our Getting Started instructions to still work. It requires some minor code duplication, but otherwise we'd have to change a bunch of documentation.
This commit is contained in:
parent
6201675d95
commit
fcab11e5b8
|
@ -42,6 +42,7 @@ import java.io.IOException;
|
|||
import org.eclipse.core.runtime.CoreException;
|
||||
import org.eclipse.jdt.core.IJavaProject;
|
||||
|
||||
import com.ibm.wala.cast.ir.ssa.AstIRFactory;
|
||||
import com.ibm.wala.cast.java.client.impl.ZeroCFABuilderFactory;
|
||||
import com.ibm.wala.cast.java.ipa.callgraph.JavaSourceAnalysisScope;
|
||||
import com.ibm.wala.cast.java.translator.jdt.JDTClassLoaderFactory;
|
||||
|
@ -84,6 +85,11 @@ public class JDTJavaSourceAnalysisEngine extends EclipseProjectSourceAnalysisEng
|
|||
return JavaSourceAnalysisScope.SOURCE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public AnalysisCache makeDefaultCache() {
|
||||
return new AnalysisCache(AstIRFactory.makeDefaultFactory());
|
||||
}
|
||||
|
||||
@Override
|
||||
protected EclipseProjectPath<?, IJavaProject> createProjectPath(
|
||||
IJavaProject project) throws IOException, CoreException {
|
||||
|
|
|
@ -7,6 +7,7 @@ import org.eclipse.core.runtime.CoreException;
|
|||
import org.eclipse.wst.jsdt.core.IJavaScriptProject;
|
||||
|
||||
import com.ibm.wala.cast.ipa.callgraph.CAstAnalysisScope;
|
||||
import com.ibm.wala.cast.ir.ssa.AstIRFactory;
|
||||
import com.ibm.wala.cast.js.loader.JavaScriptLoader;
|
||||
import com.ibm.wala.cast.js.loader.JavaScriptLoaderFactory;
|
||||
import com.ibm.wala.cast.js.translator.CAstRhinoTranslatorFactory;
|
||||
|
@ -41,6 +42,11 @@ public class EclipseJavaScriptAnalysisEngine extends EclipseProjectSourceAnalysi
|
|||
return JavaScriptTypes.jsLoader;
|
||||
}
|
||||
|
||||
@Override
|
||||
public AnalysisCache makeDefaultCache() {
|
||||
return new AnalysisCache(AstIRFactory.makeDefaultFactory());
|
||||
}
|
||||
|
||||
@Override
|
||||
protected CallGraphBuilder getCallGraphBuilder(IClassHierarchy cha,
|
||||
AnalysisOptions options, AnalysisCache cache) {
|
||||
|
|
|
@ -7,8 +7,7 @@ Bundle-Version: 1.1.3.qualifier
|
|||
Bundle-Activator: com.ibm.wala.ide.plugin.CorePlugin
|
||||
Bundle-Vendor: %providerName
|
||||
Bundle-Localization: plugin
|
||||
Require-Bundle: com.ibm.wala.cast;bundle-version="1.0.0",
|
||||
com.ibm.wala.core,
|
||||
Require-Bundle: com.ibm.wala.core,
|
||||
com.ibm.wala.shrike,
|
||||
org.eclipse.pde.core,
|
||||
org.eclipse.jface,
|
||||
|
|
|
@ -14,7 +14,6 @@ import java.io.IOException;
|
|||
|
||||
import org.eclipse.core.runtime.CoreException;
|
||||
|
||||
import com.ibm.wala.cast.ir.ssa.AstIRFactory;
|
||||
import com.ibm.wala.ide.plugin.CorePlugin;
|
||||
import com.ibm.wala.ide.util.EclipseFileProvider;
|
||||
import com.ibm.wala.ipa.callgraph.AnalysisCache;
|
||||
|
@ -27,7 +26,7 @@ import com.ibm.wala.util.debug.Assertions;
|
|||
import com.ibm.wala.util.io.FileProvider;
|
||||
|
||||
/**
|
||||
* An {@link EclipseProjectAnalysisEngine} specialized for source code analysis with CAst
|
||||
* An {@link EclipseProjectAnalysisEngine} specialized for source code analysis
|
||||
*/
|
||||
abstract public class EclipseProjectSourceAnalysisEngine<P> extends EclipseProjectAnalysisEngine<P> {
|
||||
|
||||
|
@ -58,11 +57,12 @@ abstract public class EclipseProjectSourceAnalysisEngine<P> extends EclipseProje
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public AnalysisCache makeDefaultCache() {
|
||||
return new AnalysisCache(AstIRFactory.makeDefaultFactory());
|
||||
}
|
||||
|
||||
/**
|
||||
* we don't provide a default implementation of this method to avoid
|
||||
* introducing a dependence on com.ibm.wala.cast from this project
|
||||
*/
|
||||
public abstract AnalysisCache makeDefaultCache();
|
||||
|
||||
protected abstract ClassLoaderReference getSourceLoader();
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in New Issue