15
15
import org .eclipse .core .runtime .IStatus ;
16
16
import org .eclipse .core .runtime .Platform ;
17
17
import org .eclipse .core .runtime .Status ;
18
- import org .eclipse .core .runtime .jobs .IJobChangeEvent ;
19
- import org .eclipse .core .runtime .jobs .IJobChangeListener ;
20
- import org .eclipse .core .runtime .jobs .JobChangeAdapter ;
21
- import org .eclipse .jdt .ls .core .internal .JavaClientConnection ;
22
- import org .eclipse .jdt .ls .core .internal .JavaLanguageServerPlugin ;
23
- import org .eclipse .jdt .ls .core .internal .managers .UpdateClasspathJob ;
24
18
import org .osgi .framework .BundleActivator ;
25
19
import org .osgi .framework .BundleContext ;
26
20
import org .osgi .framework .ServiceReference ;
@@ -31,30 +25,18 @@ public class JdtlsExtActivator implements BundleActivator {
31
25
32
26
private static BundleContext context ;
33
27
34
- private static IJobChangeListener updateClasspathListener = new JobChangeAdapter () {
35
- @ Override
36
- public void done (IJobChangeEvent event ) {
37
- if (event .getJob () instanceof UpdateClasspathJob ) {
38
- JavaClientConnection connection = JavaLanguageServerPlugin .getInstance ().getClientConnection ();
39
- connection .executeClientCommand ("java.view.package.refresh" , /* debounce = */ true );
40
- }
41
- }
42
- };
43
-
44
28
static BundleContext getContext () {
45
29
return context ;
46
30
}
47
31
48
32
@ Override
49
33
public void start (BundleContext bundleContext ) throws Exception {
50
34
JdtlsExtActivator .context = bundleContext ;
51
- UpdateClasspathJob .getInstance ().addJobChangeListener (JdtlsExtActivator .updateClasspathListener );
52
35
}
53
36
54
37
@ Override
55
38
public void stop (BundleContext bundleContext ) throws Exception {
56
39
JdtlsExtActivator .context = null ;
57
- UpdateClasspathJob .getInstance ().removeJobChangeListener (JdtlsExtActivator .updateClasspathListener );
58
40
}
59
41
60
42
@ SuppressWarnings ("unchecked" )
0 commit comments