File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed
ide-common/src/main/java/org/digma/intellij/plugin/common Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change 55import org .digma .intellij .plugin .psi .*;
66import org .jetbrains .annotations .*;
77
8+ /*
9+ This class is not perfect but it does serve our needs.
10+ see the comments in com.intellij.util.PlatformUtils, PlatformUtils is marked internal API so its better not to user it.
11+ for what we need its probably ok:
12+ isIdeaIDE() is for sure Idea if we have JavaLanguageService installed.
13+ isRiderIDE() is for sure rider if we have CHarpLanguageService installed.
14+ isPyCharmIDE() is for sure pycharm if we have PythonLanguageService installed and it's not Idea.
15+ if we need more capabilities here we need to explore the technics suggested in com.intellij.util.PlatformUtils
16+ */
17+
818@ Service (Service .Level .PROJECT )
919public final class IDEUtilsService {
1020
@@ -38,6 +48,7 @@ public boolean isJavaProject() {
3848 return idea .is ();
3949 }
4050
51+ //this is not accurate, it may be rider but not a C# project
4152 public boolean isCSharpProject () {
4253 return rider .is ();
4354 }
@@ -52,7 +63,8 @@ public boolean isRiderIDE() {
5263 }
5364
5465 public boolean isPyCharmIDE () {
55- return pycharm .is ();
66+ //python plugin may also be installed on Idea
67+ return pycharm .is () && !idea .is ();
5668 }
5769
5870
You can’t perform that action at this time.
0 commit comments