Skip to content

Commit

Permalink
without CefMessageRouterConfig
Browse files Browse the repository at this point in the history
  • Loading branch information
shalom938 committed Feb 17, 2025
1 parent 02b6228 commit d59b414
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 9 deletions.
2 changes: 2 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,8 @@ tasks {
"idea.kotlin.plugin.use.k2" to "true",

// "jcef.remote.enabled" to true,
// "jcef.remote.debug" to true,
// "ide.browser.jcef.log.level" to "error",

//"idea.ProcessCanceledException" to "disabled"

Expand Down
2 changes: 1 addition & 1 deletion common-build-logic/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ repositories {
dependencies {
//NOTE: when updating intellij-platform-gradle-plugin update also org.jetbrains.intellij.platform.settings plugin
// in settings file to the same version. we need to maintain it in two places, unfortunately.
implementation("org.jetbrains.intellij.platform:intellij-platform-gradle-plugin:2.2.1") // Update also org.jetbrains.intellij.platform.settings in settings.gradle.kts
implementation("org.jetbrains.intellij.platform:intellij-platform-gradle-plugin:2.1.0") // Update also org.jetbrains.intellij.platform.settings in settings.gradle.kts
implementation("org.jetbrains.kotlin:kotlin-gradle-plugin:2.1.10")
implementation("com.glovoapp.gradle:versioning:1.1.10")
implementation("de.undercouch:gradle-download-task:5.6.0")
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ pluginRepositoryUrl=https://github.com/digma-ai/digma-intellij-plugin.git
#buildProfile=p241
#buildProfile=p242
#buildProfile=p243
buildProfile=p251
#buildProfile=p251

##build with real ide, will load the ide dependencies in the project. refresh gradle after change.
##its is necessary when need to debug something for a specific IDE
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package org.digma.intellij.plugin.startup

import com.intellij.openapi.project.Project
import org.digma.intellij.plugin.log.Log

class JcefRemoteLogger : DigmaProjectActivity() {

override fun executeProjectStartup(project: Project) {
val jcefRemoteEnabled = java.lang.Boolean.getBoolean("jcef.remote.enabled")
Log.log(logger::info, "jcef.remote.enabled: {}", jcefRemoteEnabled)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,6 @@ public final class DigmaSidePaneToolWindowFactory implements ToolWindowFactory {
public void createToolWindowContent(@NotNull Project project, @NotNull ToolWindow toolWindow) {


var jcefRemoteEnabled = Boolean.getBoolean("jcef.remote.enabled");
Log.log(LOGGER::info, "jcef.remote.enabled: {}", jcefRemoteEnabled);



//initialize AnalyticsService early so the UI can detect the connection status when created
AnalyticsService.getInstance(project);
//initialize BackendInfoHolder early so it will populate its info soon
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ import org.apache.maven.artifact.versioning.ComparableVersion
import org.cef.CefApp
import org.cef.browser.CefBrowser
import org.cef.browser.CefMessageRouter
import org.cef.browser.CefMessageRouter.CefMessageRouterConfig
import org.cef.handler.CefDownloadHandler
import org.cef.handler.CefLifeSpanHandlerAdapter
import org.digma.intellij.plugin.activation.UserClickedNotificationEvent
Expand Down Expand Up @@ -479,7 +478,7 @@ private constructor(


val jbCefClient = jbCefBrowser.jbCefClient
val cefMessageRouter = CefMessageRouter.create(CefMessageRouterConfig())
val cefMessageRouter = CefMessageRouter.create()
cefMessageRouter.addHandler(messageRouterHandler, true)
jbCefClient.cefClient.addMessageRouter(cefMessageRouter)

Expand Down
2 changes: 2 additions & 0 deletions src/main/resources/META-INF/plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,8 @@
implementation="org.digma.intellij.plugin.updates.ui.UIUpdateStarter"/>
<postStartupActivity
implementation="org.digma.intellij.plugin.analytics.BackendInfoHolderStarter"/>
<postStartupActivity
implementation="org.digma.intellij.plugin.startup.JcefRemoteLogger"/>


<errorHandler implementation="org.digma.intellij.plugin.ui.reports.DigmaErrorReportSubmitter"/>
Expand Down

0 comments on commit d59b414

Please sign in to comment.