mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Merge branch 'tool-window'
This commit is contained in:
@@ -23,10 +23,7 @@ import com.intellij.openapi.components.State;
|
||||
import com.intellij.openapi.components.Storage;
|
||||
import com.intellij.openapi.project.Project;
|
||||
import com.intellij.openapi.util.IconLoader;
|
||||
import com.intellij.openapi.wm.ToolWindow;
|
||||
import com.intellij.openapi.wm.ToolWindowAnchor;
|
||||
import com.intellij.openapi.wm.ToolWindowId;
|
||||
import com.intellij.openapi.wm.ToolWindowManager;
|
||||
import com.intellij.openapi.wm.*;
|
||||
import com.intellij.ui.content.ContentManager;
|
||||
|
||||
@State(
|
||||
|
||||
@@ -17,6 +17,7 @@ package com.intellij.openapi.wm;
|
||||
|
||||
import com.intellij.openapi.util.Key;
|
||||
import com.intellij.ui.content.ContentManager;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import javax.swing.*;
|
||||
@@ -137,6 +138,7 @@ public interface ToolWindow {
|
||||
void setAvailable(boolean available, @Nullable Runnable runnable);
|
||||
|
||||
void setContentUiType(ToolWindowContentUiType type, @Nullable Runnable runnable);
|
||||
void setDefaultContentUiType(@NotNull ToolWindowContentUiType type);
|
||||
|
||||
ToolWindowContentUiType getContentUiType();
|
||||
|
||||
|
||||
+3
@@ -136,6 +136,9 @@ public class ToolWindowHeadlessManagerImpl extends ToolWindowManagerEx {
|
||||
public void setContentUiType(ToolWindowContentUiType type, @Nullable Runnable runnable) {
|
||||
}
|
||||
|
||||
public void setDefaultContentUiType(@NotNull ToolWindowContentUiType type) {
|
||||
}
|
||||
|
||||
public ToolWindowContentUiType getContentUiType() {
|
||||
return ToolWindowContentUiType.TABBED;
|
||||
}
|
||||
|
||||
@@ -30,6 +30,7 @@ import com.intellij.ui.content.Content;
|
||||
import com.intellij.ui.content.ContentFactory;
|
||||
import com.intellij.ui.content.ContentManager;
|
||||
import com.intellij.ui.content.impl.ContentImpl;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import javax.swing.*;
|
||||
@@ -167,6 +168,10 @@ public final class ToolWindowImpl implements ToolWindowEx {
|
||||
}
|
||||
}
|
||||
|
||||
public void setDefaultContentUiType(@NotNull ToolWindowContentUiType type) {
|
||||
myToolWindowManager.setDefaultContentUiType(this, type);
|
||||
}
|
||||
|
||||
public ToolWindowContentUiType getContentUiType() {
|
||||
ApplicationManager.getApplication().assertIsDispatchThread();
|
||||
return myToolWindowManager.getContentUiType(myId);
|
||||
|
||||
@@ -1572,6 +1572,13 @@ public final class ToolWindowManagerImpl extends ToolWindowManagerEx implements
|
||||
|
||||
}
|
||||
|
||||
public void setDefaultContentUiType(ToolWindowImpl toolWindow, ToolWindowContentUiType type) {
|
||||
final WindowInfoImpl info = getInfo(toolWindow.getId());
|
||||
if (info.wasRead()) return;
|
||||
toolWindow.setContentUiType(type, null);
|
||||
}
|
||||
|
||||
|
||||
public void doWhenFocusSettlesDown(@NotNull final Runnable runnable) {
|
||||
final boolean needsRestart = isIdleQueueEmpty();
|
||||
myIdleRequests.add(runnable);
|
||||
@@ -1695,6 +1702,7 @@ public final class ToolWindowManagerImpl extends ToolWindowManagerEx implements
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* This command creates and shows <code>FloatingDecorator</code>.
|
||||
*/
|
||||
|
||||
@@ -15,6 +15,6 @@
|
||||
<!-- right stripe -->
|
||||
<window_info id="Commander" active="false" anchor="right" order="0" auto_hide="false" internal_type="sliding" type="sliding" visible="false" weight="0.4" />
|
||||
<window_info id="Ant Build" active="false" anchor="right" order="1" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.25" />
|
||||
<window_info id="Hierarchy" active="false" anchor="right" order="2" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.25" />
|
||||
<window_info id="Hierarchy" active="false" anchor="right" order="2" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.25" content_ui="combo"/>
|
||||
</layout>
|
||||
</component>
|
||||
|
||||
Reference in New Issue
Block a user