2222import java .text .SimpleDateFormat ;
2323import java .util .Date ;
2424
25- import org .eclipse .core .resources .IWorkspace ;
26- import org .eclipse .core .resources .IWorkspaceDescription ;
2725import org .eclipse .core .resources .IWorkspaceRoot ;
2826import org .eclipse .core .resources .ResourcesPlugin ;
29- import org .eclipse .core .runtime .CoreException ;
30- import org .eclipse .core .runtime .Platform ;
3127import org .eclipse .core .runtime .jobs .Job ;
3228import org .eclipse .equinox .app .IApplication ;
3329import org .eclipse .equinox .app .IApplicationContext ;
3430import org .eclipse .jdt .ls .core .internal .handlers .JDTLanguageServer ;
3531import org .eclipse .jdt .ls .core .internal .handlers .ProgressReporterManager ;
36- import org .osgi .framework .Bundle ;
37- import org .osgi .framework .BundleException ;
3832
3933public class LanguageServerApplication implements IApplication {
4034
@@ -49,7 +43,6 @@ public class LanguageServerApplication implements IApplication {
4943
5044 @ Override
5145 public Object start (IApplicationContext context ) throws Exception {
52- prepareWorkspace ();
5346 prepareStreams ();
5447 JavaLanguageServerPlugin .startLanguageServer (this );
5548 if (JavaLanguageServerPlugin .getInstance ().getProtocol () instanceof JDTLanguageServer server ) {
@@ -76,18 +69,6 @@ public Object start(IApplicationContext context) throws Exception {
7669 return IApplication .EXIT_OK ;
7770 }
7871
79- private static void prepareWorkspace () throws CoreException {
80- try {
81- Platform .getBundle (ResourcesPlugin .PI_RESOURCES ).start (Bundle .START_TRANSIENT );
82- IWorkspace workspace = ResourcesPlugin .getWorkspace ();
83- IWorkspaceDescription description = workspace .getDescription ();
84- description .setAutoBuilding (false );
85- workspace .setDescription (description );
86- } catch (BundleException e ) {
87- JavaLanguageServerPlugin .logException (e .getMessage (), e );
88- }
89- }
90-
9172 @ Override
9273 public void stop () {
9374 synchronized (waitLock ) {
0 commit comments