IDEA-231622 Add a registry key to make Dimension Service app-wide

GitOrigin-RevId: ef715ac63893515b3feb13063a01b42904df3b07
This commit is contained in:
Sergei Tachenov
2024-03-28 17:57:35 +00:00
committed by intellij-monorepo-bot
parent 509f56d461
commit 9e89eb4b3b
2 changed files with 7 additions and 1 deletions
@@ -3,6 +3,7 @@ package com.intellij.openapi.util;
import com.intellij.openapi.application.ApplicationManager;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.util.registry.Registry;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
@@ -33,7 +34,9 @@ public abstract class WindowStateService {
* @return an instance of the service for the specified project
*/
public static WindowStateService getInstance(@NotNull Project project) {
return project.getService(WindowStateService.class);
return Registry.is("ui.app.wide.dimension.service", false)
? getInstance()
: project.getService(WindowStateService.class);
}
@@ -1159,6 +1159,9 @@ wolf.the.problem.solver=true
wolf.the.problem.solver.description=Disable 'global highlighting' to ease debug
ui.disable.dimension.service.keys=false
ui.disable.dimension.service.keys.description=Do not use remembered size and position for dialogs.
ui.app.wide.dimension.service=false
ui.app.wide.dimension.service.description=Store sizes and positions per-application instead of per-project
ui.simplified=false
# TODO: rewrite description after delete "ui.no.bangs.and.whistles"