How to set custom tool window into split mode?

Answered

Hi, when designing a plugin with a tool window, how can I set it to be in split mode? Like how the event log is in split mode, I want it to automatically enter this mode when initiated.

11 comments
Avatar
Vassiliy Kudryashov
Comment actions Permalink

Hi, 

When your custom ToolWindow instance is registered, just call toolWindow.setSplitMode(true, ...)

0
Comment actions Permalink

Thanks for replying, when I call this on the ToolWindow provided with createToolWindowContent method inside my ToolWindowFactory class, it doesn't show as a method. Is this what you mean?

0
Avatar
Vassiliy Kudryashov
Comment actions Permalink

I've checked with my test plugin, overridden method ToolWindowFactory.init() works well.

@Override
public void init(ToolWindow window) {
window.setSplitMode(true, null);
}
1
Comment actions Permalink

Hm, interesting. When doing the exact same in my tool window factory I get cannot resolve method. Any ideas?

0
Avatar
Vassiliy Kudryashov
Comment actions Permalink

ToolWindow.setSplitMode() is part of API since 2008, so no ideas, sorry...

0
Comment actions Permalink

Please try re-creating your IntelliJ Platform SDK from scratch.

1
Comment actions Permalink

Ah, sorted. Didn't have Intellij SDK set as module sdk, thanks a lot.

0
Comment actions Permalink

Hey I think I have a mistake somewhere in my gradle set up now. The project compiler resolves the method, but when i run with gradle it cant find the symbol. This is with gradle jvm set to java home. I tried with project sdk (which is IntelliJ IDEA IU-183.5153.38), but it then says ``The supplied javaHome seems to be invalid. I cannot find the java executable. Tried location: C:\Users\Alex\AppData\Local\JetBrains\Toolbox\apps\IDEA-U\ch-0\183.5153.38\bin\java.exe``. If I set the intellij idea sdk directly as the gradle jvm, it tells me platform sdk does not point to valid jdk. Do you have any ideas where the mistake might be?

0
Comment actions Permalink

Please follow this guide to setup Gradle-based plugin projects http://www.jetbrains.org/intellij/sdk/docs/tutorials/build_system.html

0
Comment actions Permalink

Thanks I followed it but I still have the problem. I set up new project exactly as it says, intellij can resolve the method toolWindow.setSplitMode but gradle still fails and says it cant resolve the symbol

0
Comment actions Permalink

Please create issue https://youtrack.jetbrains.com/issues/IJSDK and attach your full project sources and output from Gradle where it fails.

0

Please sign in to leave a comment.