mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
cleanup
GitOrigin-RevId: 3913cd6a971da5b6073ecdae9ab548757511c56e
This commit is contained in:
committed by
intellij-monorepo-bot
parent
45fa74a4f0
commit
67a9842f67
+15
-10
@@ -1227,18 +1227,20 @@ public class ToolWindowManagerImpl extends ToolWindowManagerEx implements Persis
|
||||
@Override
|
||||
public void setLayout(@NotNull DesktopLayout layout) {
|
||||
ApplicationManager.getApplication().assertIsDispatchThread();
|
||||
|
||||
List<FinalizableCommand> commandList = new ArrayList<>();
|
||||
// hide tool window that are invisible or its info is not presented in new layout
|
||||
final List<WindowInfoImpl> currentInfos = myLayout.getInfos();
|
||||
for (final WindowInfoImpl currentInfo : currentInfos) {
|
||||
final WindowInfoImpl info = layout.getInfo(Objects.requireNonNull(currentInfo.getId()), false);
|
||||
List<WindowInfoImpl> currentInfos = myLayout.getInfos();
|
||||
for (WindowInfoImpl currentInfo : currentInfos) {
|
||||
WindowInfoImpl info = layout.getInfo(Objects.requireNonNull(currentInfo.getId()), false);
|
||||
if (currentInfo.isVisible() && (info == null || !info.isVisible())) {
|
||||
deactivateToolWindowImpl(currentInfo, true, commandList);
|
||||
}
|
||||
}
|
||||
|
||||
// change anchor of tool windows
|
||||
for (final WindowInfoImpl currentInfo : currentInfos) {
|
||||
final WindowInfoImpl info = layout.getInfo(Objects.requireNonNull(currentInfo.getId()), false);
|
||||
for (WindowInfoImpl currentInfo : currentInfos) {
|
||||
WindowInfoImpl info = layout.getInfo(Objects.requireNonNull(currentInfo.getId()), false);
|
||||
if (info == null) {
|
||||
continue;
|
||||
}
|
||||
@@ -1246,8 +1248,9 @@ public class ToolWindowManagerImpl extends ToolWindowManagerEx implements Persis
|
||||
setToolWindowAnchorImpl(currentInfo.getId(), info.getAnchor(), info.getOrder(), commandList);
|
||||
}
|
||||
}
|
||||
|
||||
// change types of tool windows
|
||||
for (final WindowInfoImpl currentInfo : currentInfos) {
|
||||
for (WindowInfoImpl currentInfo : currentInfos) {
|
||||
final WindowInfoImpl info = layout.getInfo(Objects.requireNonNull(currentInfo.getId()), false);
|
||||
if (info == null) {
|
||||
continue;
|
||||
@@ -1256,17 +1259,19 @@ public class ToolWindowManagerImpl extends ToolWindowManagerEx implements Persis
|
||||
setToolWindowTypeImpl(currentInfo.getId(), info.getType(), commandList);
|
||||
}
|
||||
}
|
||||
|
||||
// change other properties
|
||||
for (final WindowInfoImpl currentInfo : currentInfos) {
|
||||
for (WindowInfoImpl currentInfo : currentInfos) {
|
||||
final WindowInfoImpl info = layout.getInfo(Objects.requireNonNull(currentInfo.getId()), false);
|
||||
if (info == null) {
|
||||
continue;
|
||||
}
|
||||
copyWindowOptions(info, commandList);
|
||||
}
|
||||
|
||||
// restore visibility
|
||||
for (final WindowInfoImpl currentInfo : currentInfos) {
|
||||
final WindowInfoImpl info = layout.getInfo(Objects.requireNonNull(currentInfo.getId()), false);
|
||||
for (WindowInfoImpl currentInfo : currentInfos) {
|
||||
WindowInfoImpl info = layout.getInfo(Objects.requireNonNull(currentInfo.getId()), false);
|
||||
if (info == null) {
|
||||
continue;
|
||||
}
|
||||
@@ -1280,7 +1285,7 @@ public class ToolWindowManagerImpl extends ToolWindowManagerEx implements Persis
|
||||
}
|
||||
|
||||
@Override
|
||||
public void invokeLater(@NotNull final Runnable runnable) {
|
||||
public void invokeLater(@NotNull Runnable runnable) {
|
||||
List<FinalizableCommand> commandList = new ArrayList<>();
|
||||
commandList.add(new InvokeLaterCmd(runnable, myCommandProcessor));
|
||||
execute(commandList);
|
||||
|
||||
Reference in New Issue
Block a user