allow to specify both "canWorkInDumbMode" and default "splitMode" parameters when...
authorSergey Simonchik <sergey.simonchik@jetbrains.com>
Wed, 18 Mar 2015 14:13:07 +0000 (17:13 +0300)
committerSergey Simonchik <sergey.simonchik@jetbrains.com>
Wed, 18 Mar 2015 14:13:07 +0000 (17:13 +0300)
platform/platform-api/src/com/intellij/openapi/wm/ToolWindowManager.java
platform/platform-impl/src/com/intellij/openapi/wm/impl/ToolWindowHeadlessManagerImpl.java
platform/platform-impl/src/com/intellij/openapi/wm/impl/ToolWindowManagerImpl.java
platform/testFramework/src/com/intellij/mock/Mock.java

index d0a8755982037ca68c90a999de968758e7a1700c..8baa090b2af2a4679a5b90391345901562efa01e 100644 (file)
@@ -96,6 +96,9 @@ public abstract class ToolWindowManager {
   @NotNull
   public abstract ToolWindow registerToolWindow(@NotNull String id, boolean canCloseContent, @NotNull ToolWindowAnchor anchor, Disposable parentDisposable, boolean canWorkInDumbMode);
 
+  @NotNull
+  public abstract ToolWindow registerToolWindow(@NotNull String id, boolean canCloseContent, @NotNull ToolWindowAnchor anchor, Disposable parentDisposable, boolean canWorkInDumbMode, boolean secondary);
+
   @NotNull
   public ToolWindow registerToolWindow(@NotNull final String id,
                                        final boolean canCloseContent,
index b4d20378fc06ca1d7b7e6ea1cb015327bb816414..a8d83ebac235250d1f49bd09faa890816e6eae1a 100644 (file)
@@ -143,6 +143,17 @@ public class ToolWindowHeadlessManagerImpl extends ToolWindowManagerEx {
     return doRegisterToolWindow(id, parentDisposable);
   }
 
+  @NotNull
+  @Override
+  public ToolWindow registerToolWindow(@NotNull String id,
+                                       boolean canCloseContent,
+                                       @NotNull ToolWindowAnchor anchor,
+                                       Disposable parentDisposable,
+                                       boolean canWorkInDumbMode,
+                                       boolean secondary) {
+    return doRegisterToolWindow(id, parentDisposable);
+  }
+
   @Override
   public void unregisterToolWindow(@NotNull String id) {
     myToolWindows.remove(id);
index 847d78f3874bcc1979f52597ce41ed8ac14c013d..e7240a66a5b20001746f40f86909a200701eb889 100644 (file)
@@ -1146,7 +1146,18 @@ public final class ToolWindowManagerImpl extends ToolWindowManagerEx implements
                                        @NotNull final ToolWindowAnchor anchor,
                                        @NotNull final Disposable parentDisposable,
                                        final boolean canWorkInDumbMode) {
-    ToolWindow window = registerToolWindow(id, null, anchor, false, canCloseContent, canWorkInDumbMode);
+    return registerToolWindow(id, canCloseContent, anchor, parentDisposable, canWorkInDumbMode, false);
+  }
+
+  @NotNull
+  @Override
+  public ToolWindow registerToolWindow(@NotNull String id,
+                                       boolean canCloseContent,
+                                       @NotNull ToolWindowAnchor anchor,
+                                       Disposable parentDisposable,
+                                       boolean canWorkInDumbMode,
+                                       boolean secondary) {
+    ToolWindow window = registerToolWindow(id, null, anchor, secondary, canCloseContent, canWorkInDumbMode);
     return registerDisposable(id, parentDisposable, window);
   }
 
index 4ee338aba63c2b75944049bdc3327a8ae9899668..cae264c57d41af605bee4a173376b9ad5254e604 100644 (file)
@@ -599,6 +599,17 @@ public class Mock {
       throw new RuntimeException();
     }
 
+    @NotNull
+    @Override
+    public ToolWindow registerToolWindow(@NotNull String id,
+                                         boolean canCloseContent,
+                                         @NotNull ToolWindowAnchor anchor,
+                                         Disposable parentDisposable,
+                                         boolean canWorkInDumbMode,
+                                         boolean secondary) {
+      throw new RuntimeException();
+    }
+
     @NotNull
     @Override
     public ToolWindow registerToolWindow(@NotNull final String id, final boolean canCloseContent, @NotNull final ToolWindowAnchor anchor, final boolean secondary) {