mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
don't load default state from resources by default
This commit is contained in:
@@ -35,10 +35,8 @@ import java.util.Map;
|
||||
|
||||
@State(
|
||||
name = "DebuggerSettings",
|
||||
storages = {
|
||||
@Storage(
|
||||
file = StoragePathMacros.APP_CONFIG + "/other.xml"
|
||||
)}
|
||||
defaultStateAsResource = true,
|
||||
storages = @Storage(file = StoragePathMacros.APP_CONFIG + "/other.xml")
|
||||
)
|
||||
public class DebuggerSettings implements Cloneable, PersistentStateComponent<Element> {
|
||||
private static final Logger LOG = Logger.getInstance(DebuggerSettings.class);
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2009 JetBrains s.r.o.
|
||||
* Copyright 2000-2015 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -28,6 +28,7 @@ import java.util.List;
|
||||
|
||||
@State(
|
||||
name = "DefaultColorSchemesManager",
|
||||
defaultStateAsResource = true,
|
||||
storages = @Storage(file = StoragePathMacros.APP_CONFIG + "/other.xml")
|
||||
)
|
||||
public class DefaultColorSchemesManager implements PersistentStateComponent<Element> {
|
||||
@@ -71,7 +72,6 @@ public class DefaultColorSchemesManager implements PersistentStateComponent<Elem
|
||||
for (DefaultColorsScheme scheme : mySchemes) {
|
||||
if (name.equals(scheme.getName())) return scheme;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -49,6 +49,7 @@ import java.util.*;
|
||||
|
||||
@State(
|
||||
name = "RunManager",
|
||||
defaultStateAsResource = true,
|
||||
storages = @Storage(file = StoragePathMacros.WORKSPACE_FILE)
|
||||
)
|
||||
public class RunManagerImpl extends RunManagerEx implements PersistentStateComponent<Element>, NamedComponent, Disposable {
|
||||
|
||||
+1
-2
@@ -281,8 +281,7 @@ public abstract class ComponentStoreImpl implements IComponentStore.Reloadable {
|
||||
}
|
||||
|
||||
Class<T> stateClass = ComponentSerializationUtil.getStateClass(component.getClass());
|
||||
T state = getDefaultState(component, name, stateClass);
|
||||
|
||||
T state = stateSpec.defaultStateAsResource() ? getDefaultState(component, name, stateClass) : null;
|
||||
Storage[] storageSpecs = getComponentStorageSpecs(component, stateSpec, StateStorageOperation.READ);
|
||||
for (Storage storageSpec : storageSpecs) {
|
||||
StateStorage stateStorage = getStateStorageManager().getStateStorage(storageSpec);
|
||||
|
||||
@@ -62,7 +62,8 @@ import java.util.Set;
|
||||
*/
|
||||
@State(
|
||||
name = "WindowManager",
|
||||
storages = {@Storage(file = StoragePathMacros.APP_CONFIG + "/window.manager.xml", roamingType = RoamingType.DISABLED)}
|
||||
defaultStateAsResource = true,
|
||||
storages = @Storage(file = StoragePathMacros.APP_CONFIG + "/window.manager.xml", roamingType = RoamingType.DISABLED)
|
||||
)
|
||||
public final class WindowManagerImpl extends WindowManagerEx implements NamedComponent, PersistentStateComponent<Element> {
|
||||
private static final Logger LOG = Logger.getInstance("#com.intellij.openapi.wm.impl.WindowManagerImpl");
|
||||
|
||||
@@ -167,7 +167,6 @@
|
||||
serviceImplementation="com.intellij.openapi.editor.colors.impl.TextAttributeKeyDefaultsProviderImpl"/>
|
||||
<applicationService serviceInterface="com.intellij.openapi.editor.colors.EditorColorsManager"
|
||||
serviceImplementation="com.intellij.openapi.editor.colors.impl.EditorColorsManagerImpl"/>
|
||||
<exportable serviceInterface="com.intellij.openapi.editor.colors.EditorColorsManager"/>
|
||||
|
||||
<applicationService serviceInterface="com.intellij.openapi.roots.ui.FileAppearanceService"
|
||||
serviceImplementation="com.intellij.openapi.roots.ui.FileAppearanceServiceImpl"/>
|
||||
|
||||
@@ -36,6 +36,11 @@ public @interface State {
|
||||
|
||||
boolean reloadable() default true;
|
||||
|
||||
/**
|
||||
* If true, default state will be loaded from resources (if exists)
|
||||
*/
|
||||
boolean defaultStateAsResource() default false;
|
||||
|
||||
String additionalExportFile() default "";
|
||||
|
||||
Class<? extends NameGetter> presentableName() default NameGetter.class;
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
<component>
|
||||
<option name="AUTOSCROLL_TO_NEW_LOCALS" value="true" />
|
||||
</component>
|
||||
@@ -1,19 +0,0 @@
|
||||
<component>
|
||||
<exception_breakpoints>
|
||||
<breakpoint_any>
|
||||
<option name="ENABLED" value="false" />
|
||||
<option name="SUSPEND_VM" value="true" />
|
||||
<option name="COUNT_FILTER_ENABLED" value="false" />
|
||||
<option name="COUNT_FILTER" value="0" />
|
||||
<option name="CONDITION_ENABLED" value="false" />
|
||||
<option name="CONDITION" />
|
||||
<option name="LOG_ENABLED" value="false" />
|
||||
<option name="LOG_EXPRESSION_ENABLED" value="false" />
|
||||
<option name="LOG_MESSAGE" />
|
||||
<option name="CLASS_FILTERS_ENABLED" value="false" />
|
||||
<option name="INVERSE_CLASS_FILLTERS" value="false" />
|
||||
<option name="NOTIFY_CAUGHT" value="false" />
|
||||
<option name="NOTIFY_UNCAUGHT" value="true" />
|
||||
</breakpoint_any>
|
||||
</exception_breakpoints>
|
||||
</component>
|
||||
@@ -1,3 +0,0 @@
|
||||
<component>
|
||||
<option name="EXPORT_FILE_NAME" value="report.txt" />
|
||||
</component>
|
||||
Reference in New Issue
Block a user