3
3
*/
4
4
package edu .cuny .hunter .streamrefactoring .core .wala ;
5
5
6
+ import static com .ibm .wala .ide .util .EclipseProjectPath .AnalysisScopeType .NO_SOURCE ;
7
+ import static com .ibm .wala .types .ClassLoaderReference .Primordial ;
8
+ import static edu .cuny .hunter .streamrefactoring .core .utils .LoggerNames .LOGGER_NAME ;
9
+
6
10
import java .io .File ;
7
11
import java .io .IOException ;
8
12
import java .io .InputStream ;
13
+ import java .nio .file .Path ;
9
14
import java .util .jar .JarFile ;
10
15
import java .util .logging .Logger ;
11
16
17
22
18
23
import com .ibm .wala .cast .java .client .JDTJavaSourceAnalysisEngine ;
19
24
import com .ibm .wala .ide .util .EclipseProjectPath ;
20
- import com .ibm .wala .ide .util .EclipseProjectPath .AnalysisScopeType ;
21
25
import com .ibm .wala .ipa .callgraph .AnalysisCache ;
22
26
import com .ibm .wala .ipa .callgraph .AnalysisOptions ;
23
27
import com .ibm .wala .ipa .callgraph .CallGraph ;
32
36
import com .ibm .wala .util .CancelException ;
33
37
import com .ibm .wala .util .config .FileOfClasses ;
34
38
35
- import edu .cuny .hunter .streamrefactoring .core .utils .LoggerNames ;
36
-
37
39
/**
38
40
* Modified from EclipseAnalysisEngine.java, originally from Keshmesh. Authored
39
41
* by Mohsen Vakilian and Stas Negara. Modified by Nicholas Chen and Raffi
42
44
*/
43
45
public class EclipseProjectAnalysisEngine <I extends InstanceKey > extends JDTJavaSourceAnalysisEngine <I > {
44
46
45
- private static final Logger LOGGER = Logger .getLogger (LoggerNames . LOGGER_NAME );
47
+ private static final Logger LOGGER = Logger .getLogger (LOGGER_NAME );
46
48
47
49
/**
48
50
* The N value used to create the {@link nCFABuilder}.
@@ -94,7 +96,7 @@ public void buildAnalysisScope() throws IOException {
94
96
95
97
IVMInstall defaultVMInstall = JavaRuntime .getDefaultVMInstall ();
96
98
File installLocation = defaultVMInstall .getInstallLocation ();
97
- java . nio . file . Path installPath = installLocation .toPath ();
99
+ Path installPath = installLocation .toPath ();
98
100
99
101
if (Util .isWindows ()) {
100
102
addToScopeWindows ("resources.jar" , installPath );
@@ -118,21 +120,19 @@ public void buildAnalysisScope() throws IOException {
118
120
}
119
121
}
120
122
121
- void addToScopeWindows (String fileName , java .nio .file .Path installPath ) throws IOException {
122
- scope .addToScope (ClassLoaderReference .Primordial ,
123
- new JarFile (installPath .resolve ("lib" ).resolve (fileName ).toFile ()));
123
+ void addToScopeWindows (String fileName , Path installPath ) throws IOException {
124
+ scope .addToScope (Primordial , new JarFile (installPath .resolve ("lib" ).resolve (fileName ).toFile ()));
124
125
}
125
126
126
- void addToScopeNotWindows (String fileName , java .nio .file .Path installPath ) throws IOException {
127
- scope .addToScope (ClassLoaderReference .Primordial ,
128
- new JarFile (installPath .resolve ("jre" ).resolve ("lib" ).resolve (fileName ).toFile ()));
127
+ void addToScopeNotWindows (String fileName , Path installPath ) throws IOException {
128
+ scope .addToScope (Primordial , new JarFile (installPath .resolve ("jre" ).resolve ("lib" ).resolve (fileName ).toFile ()));
129
129
}
130
130
131
131
@ Override
132
132
protected EclipseProjectPath <?, IJavaProject > createProjectPath (IJavaProject project )
133
133
throws IOException , CoreException {
134
134
project .open (new NullProgressMonitor ());
135
- return TestableJavaEclipseProjectPath .create (project , AnalysisScopeType . NO_SOURCE );
135
+ return TestableJavaEclipseProjectPath .create (project , NO_SOURCE );
136
136
}
137
137
138
138
@ Override
0 commit comments