-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: use plugin disposable instead of project
Signed-off-by: Fred Bricon <fbricon@gmail.com>
- Loading branch information
Showing
9 changed files
with
47 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
src/main/java/com/redhat/devtools/intellij/quarkus/QuarkusPluginDisposable.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. | ||
package com.redhat.devtools.intellij.quarkus; | ||
|
||
import com.intellij.openapi.Disposable; | ||
import com.intellij.openapi.application.ApplicationManager; | ||
import com.intellij.openapi.components.Service; | ||
import com.intellij.openapi.project.Project; | ||
import org.jetbrains.annotations.NotNull; | ||
|
||
/** | ||
* The service is intended to be used instead of a project/application as a parent disposable. | ||
* | ||
* copied from https://github.com/JetBrains/intellij-community/blob/idea/241.14494.240/python/openapi/src/com/jetbrains/python/PythonPluginDisposable.java | ||
*/ | ||
@Service({Service.Level.APP, Service.Level.PROJECT}) | ||
public final class QuarkusPluginDisposable implements Disposable { | ||
public static @NotNull Disposable getInstance() { | ||
return ApplicationManager.getApplication().getService(QuarkusPluginDisposable.class); | ||
} | ||
|
||
public static @NotNull Disposable getInstance(@NotNull Project project) { | ||
return project.getService(QuarkusPluginDisposable.class); | ||
} | ||
|
||
@Override | ||
public void dispose() { | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 0 additions & 36 deletions
36
src/main/resources/messages/LanguageServerBundle.properties
This file was deleted.
Oops, something went wrong.