Skip to content

Commit 373c05d

Browse files
authored
Merge pull request #2694 from digma-ai/remove-jcef-workaround-for-eap-251
remove-jcef-workaround-for-eap-251
2 parents e627df0 + e1dbdf8 commit 373c05d

File tree

3 files changed

+0
-74
lines changed

3 files changed

+0
-74
lines changed

src/main/java/org/digma/intellij/plugin/toolwindow/DigmaSidePaneToolWindowFactory.java

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
import java.util.Collections;
2727
import java.util.function.*;
2828

29-
import static org.digma.intellij.plugin.ui.common.JcefRemoteUtilsKt.*;
3029
import static org.digma.intellij.plugin.ui.common.MainToolWindowPanelKt.createMainToolWindowPanel;
3130

3231

@@ -50,20 +49,6 @@ public void createToolWindowContent(@NotNull Project project, @NotNull ToolWindo
5049

5150
Log.log(LOGGER::info, project, "creating main tool window for project {}", project);
5251

53-
//patch for jcef issue:
54-
//https://github.com/digma-ai/digma-intellij-plugin/issues/2668
55-
//https://github.com/digma-ai/digma-intellij-plugin/issues/2669
56-
//https://youtrack.jetbrains.com/issue/IDEA-367610/jcef-initialization-crash-in-latest-2025.1-EAP-NullPointerException-Cannot-read-field-jsQueryFunction-because-config-is-null
57-
if (is2025EAPWithJCEFRemoteEnabled()){
58-
Log.log(LOGGER::info, project, "Jcef remote enabled for EAP , creating user message panel", project);
59-
sendPosthogEvent("Main");
60-
var messagePanel = create2025EAPMessagePanel(project);
61-
var content = ContentFactory.getInstance().createContent(messagePanel, null, false);
62-
toolWindow.getContentManager().addContent(content);
63-
return;
64-
}
65-
66-
6752
//initialize AnalyticsService early so the UI can detect the connection status when created
6853
AnalyticsService.getInstance(project);
6954
//initialize BackendInfoHolder early so it will populate its info soon

src/main/kotlin/org/digma/intellij/plugin/ui/common/JcefRemoteUtils.kt

Lines changed: 0 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -39,46 +39,3 @@ fun sendPosthogEvent(appName:String) {
3939

4040
}
4141

42-
43-
fun create2025EAPMessagePanel(project:Project): JPanel {
44-
45-
val mainPanel = JPanel(BorderLayout())
46-
mainPanel.isOpaque = false
47-
mainPanel.border = empty()
48-
mainPanel.background = listBackground()
49-
50-
val htmlText = getMessageHtml()
51-
val textPane = createTextPaneWithHtml(htmlText)
52-
53-
mainPanel.add(textPane, BorderLayout.CENTER)
54-
55-
val slackPanel = createSlackLinkPanel(project)
56-
mainPanel.add(slackPanel,BorderLayout.SOUTH)
57-
58-
return wrapWithScrollable(mainPanel)
59-
}
60-
61-
62-
fun getMessageHtml(): String {
63-
64-
val title = "Digma 2025.1 EAP workaround"
65-
val paragraph = "The latest Jetbrains 2025.1 EAP has an issue with JCEF that prevents Digma from working," +
66-
"Please add the following system properties to fix, and restart your IDE:"
67-
val paragraph2 = "Open the Idea help menu, search for 'Edit Custom Properties', add 'jcef.remote.enabled=false' and restart your IDE"
68-
69-
return "<html>" +
70-
"<head>" +
71-
"<style>" +
72-
"h3 {text-align: center;}" +
73-
"p {text-align: center;}" +
74-
"div {text-align: center;}" +
75-
"</style>" +
76-
"</head>" +
77-
"<body>" +
78-
"<h3>$title</h3>" +
79-
"<p>$paragraph</p>" +
80-
"<p>$paragraph2</p>" +
81-
"</body>" +
82-
"</html>"
83-
}
84-

src/main/kotlin/org/digma/intellij/plugin/ui/recentactivity/RecentActivityToolWindowFactory.kt

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,6 @@ import org.digma.intellij.plugin.analytics.AnalyticsService
1212
import org.digma.intellij.plugin.log.Log
1313
import org.digma.intellij.plugin.recentactivity.RecentActivityToolWindowShower
1414
import org.digma.intellij.plugin.ui.RecentActivityToolWindowCardsController
15-
import org.digma.intellij.plugin.ui.common.create2025EAPMessagePanel
16-
import org.digma.intellij.plugin.ui.common.is2025EAPWithJCEFRemoteEnabled
17-
import org.digma.intellij.plugin.ui.common.sendPosthogEvent
1815
import org.digma.intellij.plugin.ui.common.statuspanels.createAggressiveUpdatePanel
1916
import org.digma.intellij.plugin.ui.common.statuspanels.createNoConnectionPanel
2017
import java.awt.CardLayout
@@ -28,19 +25,6 @@ class RecentActivityToolWindowFactory : ToolWindowFactory {
2825

2926
Log.log(logger::info, project, "creating recent activity tool window for project {}", project)
3027

31-
//patch for jcef issue:
32-
//https://github.com/digma-ai/digma-intellij-plugin/issues/2668
33-
//https://github.com/digma-ai/digma-intellij-plugin/issues/2669
34-
//https://youtrack.jetbrains.com/issue/IDEA-367610/jcef-initialization-crash-in-latest-2025.1-EAP-NullPointerException-Cannot-read-field-jsQueryFunction-because-config-is-null
35-
if (is2025EAPWithJCEFRemoteEnabled()){
36-
Log.log(logger::info, project, "Jcef remote enabled for EAP , creating user message panel", project)
37-
sendPosthogEvent("Recent Activity")
38-
val messagePanel = create2025EAPMessagePanel(project)
39-
val content = ContentFactory.getInstance().createContent(messagePanel, null, false)
40-
toolWindow.contentManager.addContent(content)
41-
return
42-
}
43-
4428
//initialize AnalyticsService early so the UI can detect the connection status when created
4529
AnalyticsService.getInstance(project)
4630

0 commit comments

Comments
 (0)