allow container customization based on content
authorDennis Ushakov <dennis.ushakov@gmail.com>
Thu, 19 Jan 2012 15:14:36 +0000 (19:14 +0400)
committerDennis Ushakov <dennis.ushakov@gmail.com>
Thu, 26 Jan 2012 18:10:43 +0000 (22:10 +0400)
platform/platform-api/src/com/intellij/ui/docking/DockContainerFactory.java
platform/platform-impl/src/com/intellij/openapi/fileEditor/impl/DockableEditorContainerFactory.java
platform/platform-impl/src/com/intellij/ui/docking/impl/DockManagerImpl.java

index 3dcc059e3de253124eb04ad46ba5e91c0fbe9775..6e7e581c61d76564bd74984f86e56f1b2cec5331 100644 (file)
@@ -20,7 +20,7 @@ import org.jdom.Element;
 
 public interface DockContainerFactory extends Disposable {
 
-  DockContainer createContainer();
+  DockContainer createContainer(DockableContent content);
 
   interface Persistent extends DockContainerFactory {
 
index f41ac78fee3090784758a01cb499b7a9403c4947..e2340d7f148990f111e4d2836830c4e02f84c24c 100644 (file)
@@ -22,6 +22,7 @@ import com.intellij.openapi.wm.IdeFrame;
 import com.intellij.ui.docking.DockContainer;
 import com.intellij.ui.docking.DockContainerFactory;
 import com.intellij.ui.docking.DockManager;
+import com.intellij.ui.docking.DockableContent;
 import org.jdom.Element;
 
 public class DockableEditorContainerFactory implements DockContainerFactory.Persistent {
@@ -39,7 +40,7 @@ public class DockableEditorContainerFactory implements DockContainerFactory.Pers
   }
 
   @Override
-  public DockContainer createContainer() {
+  public DockContainer createContainer(DockableContent content) {
     return createContainer(false);
   }
 
index 9f9700fc1987ab5a8d5fa3fb7d315c09e1577aa6..fe6e01c69e78782d5398066371295674df3935a4 100644 (file)
@@ -355,7 +355,7 @@ public class DockManagerImpl extends DockManager implements PersistentStateCompo
   }
 
   private void createNewDockContainerFor(DockableContent content, RelativePoint point) {
-    DockContainer container = getFactory(content.getDockContainerType()).createContainer();
+    DockContainer container = getFactory(content.getDockContainerType()).createContainer(content);
     register(container);
 
     final DockWindow window = createWindowFor(null, container);