Skip to content

Commit

Permalink
dbeaver/dbeaver-vscode#22 Support non-CB applications
Browse files Browse the repository at this point in the history
  • Loading branch information
serge-rider committed Nov 15, 2024
1 parent 884d435 commit b236aff
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import org.jkiss.dbeaver.model.app.DBPProject;
import org.jkiss.dbeaver.model.websocket.WSConstants;
import org.jkiss.dbeaver.model.websocket.event.WSEvent;
import org.jkiss.dbeaver.model.websocket.event.WSEventController;
import org.jkiss.dbeaver.model.websocket.event.datasource.WSDataSourceEvent;
import org.jkiss.dbeaver.model.websocket.event.datasource.WSDataSourceProperty;
import org.jkiss.dbeaver.model.websocket.event.datasource.WSDatasourceFolderEvent;
Expand Down Expand Up @@ -47,6 +48,10 @@ public static void addDataSourceUpdatedEvent(
if (project == null) {
return;
}
WSEventController eventController = WebAppUtils.getWebApplication().getEventController();
if (eventController == null) {
return;
}
WSEvent event = null;
switch (eventAction) {

Check warning on line 56 in server/bundles/io.cloudbeaver.model/src/io/cloudbeaver/utils/WebEventUtils.java

View workflow job for this annotation

GitHub Actions / Server / Lint

[checkstyle] reported by reviewdog 🐶 switch without "default" clause. Raw Output: /github/workspace/./server/bundles/io.cloudbeaver.model/src/io/cloudbeaver/utils/WebEventUtils.java:56:9: warning: switch without "default" clause. (com.puppycrawl.tools.checkstyle.checks.coding.MissingSwitchDefaultCheck)
case CREATE:
Expand Down Expand Up @@ -80,7 +85,7 @@ public static void addDataSourceUpdatedEvent(
if (event == null) {
return;
}
WebAppUtils.getWebApplication().getEventController().addEvent(event);
eventController.addEvent(event);
}

public static void addNavigatorNodeUpdatedEvent(

Check warning on line 91 in server/bundles/io.cloudbeaver.model/src/io/cloudbeaver/utils/WebEventUtils.java

View workflow job for this annotation

GitHub Actions / Server / Lint

[checkstyle] reported by reviewdog 🐶 Missing a Javadoc comment. Raw Output: /github/workspace/./server/bundles/io.cloudbeaver.model/src/io/cloudbeaver/utils/WebEventUtils.java:91:5: warning: Missing a Javadoc comment. (com.puppycrawl.tools.checkstyle.checks.javadoc.MissingJavadocMethodCheck)
Expand Down

0 comments on commit b236aff

Please sign in to comment.