get rid of PROJECT FILE macro to avoid issues like IDEA-149660 IDEA-143282

get rid of APP_CONFIG
This commit is contained in:
Vladimir Krivosheev
2016-02-04 15:59:48 +01:00
parent 58cfa7d6e0
commit c955b367fd
305 changed files with 1285 additions and 1573 deletions
@@ -15,7 +15,10 @@
*/
package org.intellij.images.options.impl;
import com.intellij.openapi.components.*;
import com.intellij.openapi.components.PersistentStateComponent;
import com.intellij.openapi.components.RoamingType;
import com.intellij.openapi.components.State;
import com.intellij.openapi.components.Storage;
import com.intellij.openapi.util.InvalidDataException;
import com.intellij.openapi.util.WriteExternalException;
import org.intellij.images.options.Options;
@@ -29,7 +32,7 @@ import org.jdom.Element;
*/
@State(
name = "Images.OptionsManager",
storages = {@Storage(file = StoragePathMacros.APP_CONFIG + "/images.support.xml", roamingType = RoamingType.DISABLED)}
storages = @Storage(value = "images.support.xml", roamingType = RoamingType.DISABLED)
)
final class OptionsManagerImpl extends OptionsManager implements PersistentStateComponent<Element> {
private final OptionsImpl options = new OptionsImpl();
@@ -33,7 +33,10 @@ import com.intellij.openapi.compiler.CompilerManager;
import com.intellij.openapi.compiler.options.ExcludeEntryDescription;
import com.intellij.openapi.compiler.options.ExcludedEntriesConfiguration;
import com.intellij.openapi.compiler.options.ExcludesConfiguration;
import com.intellij.openapi.components.*;
import com.intellij.openapi.components.PersistentStateComponent;
import com.intellij.openapi.components.ProjectComponent;
import com.intellij.openapi.components.State;
import com.intellij.openapi.components.Storage;
import com.intellij.openapi.diagnostic.Logger;
import com.intellij.openapi.extensions.Extensions;
import com.intellij.openapi.fileTypes.FileType;
@@ -71,13 +74,7 @@ import org.jetbrains.jps.model.serialization.java.compiler.JpsJavaCompilerConfig
import java.io.File;
import java.util.*;
@State(
name = "CompilerConfiguration",
storages = {
@Storage(file = StoragePathMacros.PROJECT_FILE),
@Storage(file = "compiler.xml", scheme = StorageScheme.DIRECTORY_BASED)
}
)
@State(name = "CompilerConfiguration", storages = @Storage("compiler.xml"))
public class CompilerConfigurationImpl extends CompilerConfiguration implements PersistentStateComponent<Element>, ProjectComponent {
private static final Logger LOG = Logger.getInstance("#com.intellij.compiler.CompilerConfiguration");
public static final String TESTS_EXTERNAL_COMPILER_HOME_PROPERTY_NAME = "tests.external.compiler.home";
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2012 JetBrains s.r.o.
* Copyright 2000-2016 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.
@@ -15,19 +15,16 @@
*/
package com.intellij.compiler.impl.javaCompiler.eclipse;
import com.intellij.openapi.components.*;
import com.intellij.openapi.components.PersistentStateComponent;
import com.intellij.openapi.components.ServiceManager;
import com.intellij.openapi.components.State;
import com.intellij.openapi.components.Storage;
import com.intellij.openapi.project.Project;
import com.intellij.util.xmlb.XmlSerializerUtil;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.jps.model.java.compiler.EclipseCompilerOptions;
@State(
name = "EclipseCompilerSettings",
storages = {
@Storage(file = StoragePathMacros.PROJECT_FILE),
@Storage(file = StoragePathMacros.PROJECT_CONFIG_DIR + "/compiler.xml", scheme = StorageScheme.DIRECTORY_BASED)
}
)
@State(name = "EclipseCompilerSettings", storages = @Storage("compiler.xml"))
public class EclipseCompilerConfiguration implements PersistentStateComponent<EclipseCompilerOptions> {
private final EclipseCompilerOptions mySettings = new EclipseCompilerOptions();
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2012 JetBrains s.r.o.
* Copyright 2000-2016 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.
@@ -21,13 +21,7 @@ import com.intellij.util.xmlb.XmlSerializerUtil;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.jps.model.java.compiler.JpsJavaCompilerOptions;
@State(
name = "JavacSettings",
storages = {
@Storage(file = StoragePathMacros.PROJECT_FILE),
@Storage(file = StoragePathMacros.PROJECT_CONFIG_DIR + "/compiler.xml", scheme = StorageScheme.DIRECTORY_BASED)
}
)
@State(name = "JavacSettings", storages = @Storage("compiler.xml"))
public class JavacConfiguration implements PersistentStateComponent<JpsJavaCompilerOptions> {
private final JpsJavaCompilerOptions mySettings = new JpsJavaCompilerOptions();
private final Project myProject;
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2012 JetBrains s.r.o.
* Copyright 2000-2016 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.
@@ -15,19 +15,16 @@
*/
package com.intellij.compiler.impl.rmiCompiler;
import com.intellij.openapi.components.*;
import com.intellij.openapi.components.PersistentStateComponent;
import com.intellij.openapi.components.ServiceManager;
import com.intellij.openapi.components.State;
import com.intellij.openapi.components.Storage;
import com.intellij.openapi.project.Project;
import com.intellij.util.xmlb.XmlSerializerUtil;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.jps.model.java.compiler.RmicCompilerOptions;
@State(
name = "RmicSettings",
storages = {
@Storage(file = StoragePathMacros.PROJECT_FILE),
@Storage(file = StoragePathMacros.PROJECT_CONFIG_DIR + "/compiler.xml", scheme = StorageScheme.DIRECTORY_BASED)
}
)
@State(name = "RmicSettings", storages = @Storage("compiler.xml"))
public class RmicConfiguration implements PersistentStateComponent<RmicCompilerOptions> {
private final RmicCompilerOptions mySettings = new RmicCompilerOptions();
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2012 JetBrains s.r.o.
* Copyright 2000-2016 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.
@@ -19,7 +19,10 @@ import com.intellij.openapi.compiler.CompileContext;
import com.intellij.openapi.compiler.Compiler;
import com.intellij.openapi.compiler.options.ExcludedEntriesConfiguration;
import com.intellij.openapi.compiler.options.ExcludesConfiguration;
import com.intellij.openapi.components.*;
import com.intellij.openapi.components.PersistentStateComponent;
import com.intellij.openapi.components.ServiceManager;
import com.intellij.openapi.components.State;
import com.intellij.openapi.components.Storage;
import com.intellij.openapi.project.Project;
import com.intellij.util.xmlb.XmlSerializerUtil;
@@ -29,13 +32,7 @@ import java.util.Map;
/**
* @author Dmitry Avdeev
*/
@State(
name = "ValidationConfiguration",
storages = {
@Storage(file = StoragePathMacros.WORKSPACE_FILE),
@Storage(file = StoragePathMacros.PROJECT_CONFIG_DIR + "/validation.xml", scheme = StorageScheme.DIRECTORY_BASED)
}
)
@State(name = "ValidationConfiguration", storages = @Storage("validation.xml"))
public class ValidationConfiguration implements PersistentStateComponent<ValidationConfiguration> {
public boolean VALIDATE_ON_BUILD = false;
@@ -79,12 +76,6 @@ public class ValidationConfiguration implements PersistentStateComponent<Validat
XmlSerializerUtil.copyBean(state, this);
}
@State(
name = "ExcludeFromValidation",
storages = {
@Storage(file = StoragePathMacros.PROJECT_FILE),
@Storage(file = StoragePathMacros.PROJECT_CONFIG_DIR + "/excludeFromValidation.xml", scheme = StorageScheme.DIRECTORY_BASED)
}
)
@State(name = "ExcludeFromValidation", storages = @Storage("excludeFromValidation.xml"))
public static class ExcludedFromValidationConfiguration extends ExcludedEntriesConfiguration {}
}
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2015 JetBrains s.r.o.
* Copyright 2000-2016 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.
@@ -17,7 +17,10 @@ package com.intellij.packaging.impl.artifacts;
import com.intellij.compiler.server.BuildManager;
import com.intellij.openapi.application.*;
import com.intellij.openapi.components.*;
import com.intellij.openapi.components.PersistentStateComponent;
import com.intellij.openapi.components.ProjectComponent;
import com.intellij.openapi.components.State;
import com.intellij.openapi.components.Storage;
import com.intellij.openapi.diagnostic.Logger;
import com.intellij.openapi.module.ProjectLoadingErrorsNotifier;
import com.intellij.openapi.project.Project;
@@ -47,14 +50,7 @@ import java.util.*;
/**
* @author nik
*/
@State(
name = ArtifactManagerImpl.COMPONENT_NAME,
storages = {
@Storage(file = StoragePathMacros.PROJECT_FILE),
@Storage(file = StoragePathMacros.PROJECT_CONFIG_DIR + "/artifacts", scheme = StorageScheme.DIRECTORY_BASED,
stateSplitter = ArtifactManagerStateSplitter.class)
}
)
@State(name = ArtifactManagerImpl.COMPONENT_NAME, storages = @Storage(value = "artifacts", stateSplitter = ArtifactManagerStateSplitter.class))
public class ArtifactManagerImpl extends ArtifactManager implements ProjectComponent, PersistentStateComponent<ArtifactManagerState> {
private static final Logger LOG = Logger.getInstance("#com.intellij.packaging.impl.artifacts.ArtifactManagerImpl");
@NonNls public static final String COMPONENT_NAME = "ArtifactManager";
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2012 JetBrains s.r.o.
* Copyright 2000-2016 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.
@@ -16,7 +16,6 @@
package com.intellij.packaging.impl.compiler;
import com.intellij.openapi.components.*;
import com.intellij.openapi.components.StoragePathMacros;
import com.intellij.openapi.project.Project;
import com.intellij.packaging.artifacts.Artifact;
import com.intellij.packaging.artifacts.ArtifactManager;
@@ -35,7 +34,7 @@ import java.util.List;
*/
@State(name = "ArtifactsWorkspaceSettings",
storages = {
@Storage(file = StoragePathMacros.WORKSPACE_FILE)
@Storage(StoragePathMacros.WORKSPACE_FILE)
})
public class ArtifactsWorkspaceSettings implements PersistentStateComponent<ArtifactsWorkspaceSettings.ArtifactsWorkspaceSettingsState> {
private ArtifactsWorkspaceSettingsState myState = new ArtifactsWorkspaceSettingsState();
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2012 JetBrains s.r.o.
* Copyright 2000-2016 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.
@@ -25,13 +25,7 @@ import com.intellij.openapi.project.Project;
import com.intellij.openapi.util.registry.Registry;
import com.intellij.util.xmlb.XmlSerializerUtil;
@State(
name = "CompilerWorkspaceConfiguration",
storages = {
@Storage(
file = StoragePathMacros.WORKSPACE_FILE
)}
)
@State(name = "CompilerWorkspaceConfiguration", storages = @Storage(StoragePathMacros.WORKSPACE_FILE))
public class CompilerWorkspaceConfiguration implements PersistentStateComponent<CompilerWorkspaceConfiguration> {
private static final Logger LOG = Logger.getInstance("#com.intellij.compiler.CompilerWorkspaceConfiguration");
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2015 JetBrains s.r.o.
* Copyright 2000-2016 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.
@@ -66,7 +66,7 @@ import java.io.File;
import java.util.*;
import java.util.jar.Attributes;
@State(name = "DebuggerManager", storages = {@Storage(file = StoragePathMacros.WORKSPACE_FILE)})
@State(name = "DebuggerManager", storages = {@Storage(StoragePathMacros.WORKSPACE_FILE)})
public class DebuggerManagerImpl extends DebuggerManagerEx implements PersistentStateComponent<Element> {
private static final Logger LOG = Logger.getInstance("#com.intellij.debugger.impl.DebuggerManagerImpl");
@@ -40,8 +40,8 @@ import java.util.Map;
name = "DebuggerSettings",
defaultStateAsResource = true,
storages = {
@Storage(file = "debugger.xml"),
@Storage(file = "other.xml", deprecated = true)
@Storage("debugger.xml"),
@Storage(value = "other.xml", deprecated = true)
}
)
public class DebuggerSettings implements Cloneable, PersistentStateComponent<Element> {
@@ -28,7 +28,10 @@ import com.intellij.debugger.ui.tree.DebuggerTreeNode;
import com.intellij.debugger.ui.tree.ValueDescriptor;
import com.intellij.debugger.ui.tree.render.*;
import com.intellij.debugger.ui.tree.render.Renderer;
import com.intellij.openapi.components.*;
import com.intellij.openapi.components.PersistentStateComponent;
import com.intellij.openapi.components.ServiceManager;
import com.intellij.openapi.components.State;
import com.intellij.openapi.components.Storage;
import com.intellij.openapi.fileTypes.StdFileTypes;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.util.*;
@@ -57,9 +60,7 @@ import java.util.List;
@State(
name="NodeRendererSettings",
storages= {
@Storage(
file = StoragePathMacros.APP_CONFIG + "/debugger.renderers.xml"
)}
@Storage("debugger.renderers.xml")}
)
public class NodeRendererSettings implements PersistentStateComponent<Element> {
@NonNls private static final String REFERENCE_RENDERER = "Reference renderer";
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2015 JetBrains s.r.o.
* Copyright 2000-2016 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.
@@ -15,15 +15,16 @@
*/
package com.intellij.debugger.settings;
import com.intellij.openapi.components.*;
import com.intellij.openapi.components.PersistentStateComponent;
import com.intellij.openapi.components.ServiceManager;
import com.intellij.openapi.components.State;
import com.intellij.openapi.components.Storage;
import com.intellij.util.xmlb.XmlSerializerUtil;
@State(
name="ThreadsViewSettings",
storages= {
@Storage(
file = StoragePathMacros.APP_CONFIG + "/debugger.threadsview.xml"
)}
@Storage("debugger.threadsview.xml")}
)
public class ThreadsViewSettings implements PersistentStateComponent<ThreadsViewSettings> {
public boolean SHOW_THREAD_GROUPS = false;
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2015 JetBrains s.r.o.
* Copyright 2000-2016 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.
@@ -15,12 +15,15 @@
*/
package com.intellij.debugger.settings;
import com.intellij.openapi.components.*;
import com.intellij.openapi.components.PersistentStateComponent;
import com.intellij.openapi.components.ServiceManager;
import com.intellij.openapi.components.State;
import com.intellij.openapi.components.Storage;
import com.intellij.util.xmlb.XmlSerializerUtil;
@State(
name = "ViewsSettings",
storages = @Storage(file = StoragePathMacros.APP_CONFIG + "/debugger.frameview.xml")
storages = @Storage("debugger.frameview.xml")
)
public class ViewsGeneralSettings implements PersistentStateComponent<ViewsGeneralSettings> {
public boolean SHOW_OBJECTID = true;
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2012 JetBrains s.r.o.
* Copyright 2000-2016 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.
@@ -34,14 +34,7 @@ import java.util.Map;
/**
* @author nik
*/
@State(
name = "FacetEditorsStateManager",
storages = {
@Storage(
file = StoragePathMacros.WORKSPACE_FILE
)
}
)
@State(name = "FacetEditorsStateManager", storages = @Storage(StoragePathMacros.WORKSPACE_FILE))
public class FacetEditorsStateManagerImpl extends FacetEditorsStateManager implements PersistentStateComponent<FacetEditorsStateManagerImpl.FacetEditorsStateBean>{
private final Map<String, Object> myFacetTypeStates = new HashMap<String, Object>();
private FacetEditorsStateBean myBean = new FacetEditorsStateBean();
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2014 JetBrains s.r.o.
* Copyright 2000-2016 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.
@@ -19,7 +19,6 @@ import com.intellij.ide.impl.ProjectUtil;
import com.intellij.openapi.components.RoamingType;
import com.intellij.openapi.components.State;
import com.intellij.openapi.components.Storage;
import com.intellij.openapi.components.StoragePathMacros;
import com.intellij.openapi.project.Project;
import com.intellij.util.messages.MessageBus;
import org.jetbrains.annotations.NotNull;
@@ -27,8 +26,8 @@ import org.jetbrains.annotations.NotNull;
@State(
name = "RecentProjectsManager",
storages = {
@Storage(file = StoragePathMacros.APP_CONFIG + "/recentProjects.xml", roamingType = RoamingType.DISABLED),
@Storage(file = StoragePathMacros.APP_CONFIG + "/other.xml", deprecated = true)
@Storage(value = "recentProjects.xml", roamingType = RoamingType.DISABLED),
@Storage(value = "other.xml", deprecated = true)
}
)
public class RecentProjectsManagerImpl extends RecentProjectsManagerBase {
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2012 JetBrains s.r.o.
* Copyright 2000-2016 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.
@@ -25,7 +25,7 @@ import org.jetbrains.annotations.Nullable;
*/
@State(
name = "SelectProjectTemplateSettings",
storages = @Storage(file = StoragePathMacros.APP_CONFIG + "/projectSelectTemplate.xml", roamingType = RoamingType.DISABLED)
storages = @Storage(value = "projectSelectTemplate.xml", roamingType = RoamingType.DISABLED)
)
public class SelectTemplateSettings implements PersistentStateComponent<SelectTemplateSettings> {
public boolean EXPERT_MODE = false;
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2012 JetBrains s.r.o.
* Copyright 2000-2016 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.
@@ -16,16 +16,12 @@
package com.intellij.openapi.roots.ui.configuration.dependencyAnalysis;
import com.intellij.openapi.components.*;
import com.intellij.openapi.components.StoragePathMacros;
import com.intellij.openapi.project.Project;
/**
* The default mode for classpath details settings
*/
@State(
name = "AnalyzeDependenciesSettings",
storages = {@Storage(
file = StoragePathMacros.WORKSPACE_FILE)})
@State(name = "AnalyzeDependenciesSettings", storages = @Storage(StoragePathMacros.WORKSPACE_FILE))
public class AnalyzeDependenciesSettings implements PersistentStateComponent<AnalyzeDependenciesSettings.State> {
/**
* The current state
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2012 JetBrains s.r.o.
* Copyright 2000-2016 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.
@@ -17,14 +17,10 @@ package com.intellij.openapi.roots.ui.configuration.projectRoot.daemon;
import com.intellij.openapi.components.State;
import com.intellij.openapi.components.Storage;
import com.intellij.openapi.components.StoragePathMacros;
/**
* @author nik
*/
@State(
name = "ProjectStructureProblems",
storages = {@Storage(file = StoragePathMacros.APP_CONFIG + "/projectStructureProblems.xml")}
)
@State(name = "ProjectStructureProblems", storages = @Storage("projectStructureProblems.xml"))
public class GlobalProjectStructureProblemsSettings extends ProjectStructureProblemsSettingsBase {
}
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2012 JetBrains s.r.o.
* Copyright 2000-2016 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.
@@ -24,7 +24,7 @@ import com.intellij.openapi.components.StoragePathMacros;
*/
@State(
name = "ProjectStructureProblems",
storages = {@Storage(file = StoragePathMacros.WORKSPACE_FILE)}
storages = {@Storage(StoragePathMacros.WORKSPACE_FILE)}
)
public class ProjectStructureProblemsSettingsImpl extends ProjectStructureProblemsSettingsBase {
}
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2015 JetBrains s.r.o.
* Copyright 2000-2016 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.
@@ -20,7 +20,9 @@ import com.intellij.codeInsight.AnnotationUtil;
import com.intellij.codeInsight.daemon.DaemonCodeAnalyzer;
import com.intellij.codeInspection.reference.*;
import com.intellij.openapi.application.ApplicationManager;
import com.intellij.openapi.components.*;
import com.intellij.openapi.components.PersistentStateComponent;
import com.intellij.openapi.components.ServiceManager;
import com.intellij.openapi.components.State;
import com.intellij.openapi.extensions.ExtensionPoint;
import com.intellij.openapi.extensions.ExtensionPointListener;
import com.intellij.openapi.extensions.Extensions;
@@ -44,10 +46,7 @@ import org.jetbrains.annotations.Nullable;
import java.util.*;
@State(
name = "EntryPointsManager",
storages = {@Storage(file = StoragePathMacros.PROJECT_FILE)}
)
@State(name = "EntryPointsManager")
public abstract class EntryPointsManagerBase extends EntryPointsManager implements PersistentStateComponent<Element> {
@NonNls private static final String[] STANDARD_ANNOS = {
"javax.ws.rs.*",
@@ -15,19 +15,16 @@
*/
package org.jetbrains.java.generate;
import com.intellij.openapi.components.*;
import com.intellij.openapi.components.PersistentStateComponent;
import com.intellij.openapi.components.ServiceManager;
import com.intellij.openapi.components.State;
import com.intellij.openapi.components.Storage;
import org.jetbrains.java.generate.config.Config;
/**
* Application context for this plugin.
*/
@State(
name = "ToStringSettings",
storages = {
@Storage(
file = StoragePathMacros.APP_CONFIG + "/other.xml"
)}
)
@State(name = "ToStringSettings", storages = @Storage("other.xml"))
public class GenerateToStringContext implements PersistentStateComponent<Config> {
public static GenerateToStringContext getInstance() {
return ServiceManager.getService(GenerateToStringContext.class);
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2015 JetBrains s.r.o.
* Copyright 2000-2016 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.
@@ -16,7 +16,10 @@
package com.intellij.codeInsight;
import com.intellij.openapi.Disposable;
import com.intellij.openapi.components.*;
import com.intellij.openapi.components.PersistentStateComponent;
import com.intellij.openapi.components.ServiceManager;
import com.intellij.openapi.components.State;
import com.intellij.openapi.components.Storage;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.util.Disposer;
import com.intellij.util.containers.ContainerUtil;
@@ -33,13 +36,7 @@ import java.util.List;
/**
* @author peter
*/
@State(
name = "JavaProjectCodeInsightSettings",
storages = {
@Storage(file = StoragePathMacros.PROJECT_FILE),
@Storage(file = StoragePathMacros.PROJECT_CONFIG_DIR + "/codeInsightSettings.xml", scheme = StorageScheme.DIRECTORY_BASED)
}
)
@State(name = "JavaProjectCodeInsightSettings", storages = @Storage("codeInsightSettings.xml"))
public class JavaProjectCodeInsightSettings implements PersistentStateComponent<JavaProjectCodeInsightSettings> {
@Tag("excluded-names")
@AbstractCollection(surroundWithTag = false, elementTag = "name", elementValueAttribute = "")
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2012 JetBrains s.r.o.
* Copyright 2000-2016 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.
@@ -17,14 +17,9 @@ package com.intellij.codeInsight;
import com.intellij.codeInspection.dataFlow.HardcodedContracts;
import com.intellij.openapi.components.State;
import com.intellij.openapi.components.Storage;
import com.intellij.openapi.components.StoragePathMacros;
import com.intellij.psi.PsiElement;
@State(
name = "NullableNotNullManager",
storages = {@Storage(file = StoragePathMacros.PROJECT_FILE)}
)
@State(name = "NullableNotNullManager")
public class NullableNotNullManagerImpl extends NullableNotNullManager {
protected boolean hasHardcodedContracts(PsiElement element) {
return HardcodedContracts.hasHardcodedContracts(element);
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2012 JetBrains s.r.o.
* Copyright 2000-2016 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.
@@ -17,7 +17,10 @@ package com.intellij.codeInsight.folding.impl;
import com.intellij.ide.IdeBundle;
import com.intellij.openapi.application.PathManager;
import com.intellij.openapi.components.*;
import com.intellij.openapi.components.ExportableComponent;
import com.intellij.openapi.components.PersistentStateComponent;
import com.intellij.openapi.components.State;
import com.intellij.openapi.components.Storage;
import com.intellij.util.xmlb.XmlSerializerUtil;
import org.jetbrains.annotations.NotNull;
@@ -26,9 +29,7 @@ import java.io.File;
@State(
name="JavaCodeFoldingSettings",
storages= {
@Storage(
file = StoragePathMacros.APP_CONFIG + "/editor.codeinsight.xml"
)}
@Storage("editor.codeinsight.xml")}
)
public class JavaCodeFoldingSettingsImpl extends JavaCodeFoldingSettingsBase implements PersistentStateComponent<JavaCodeFoldingSettingsImpl>,
ExportableComponent {
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2015 JetBrains s.r.o.
* Copyright 2000-2016 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.
@@ -18,7 +18,6 @@ package com.intellij.codeInsight.generation;
import com.intellij.openapi.components.ServiceManager;
import com.intellij.openapi.components.State;
import com.intellij.openapi.components.Storage;
import com.intellij.openapi.components.StoragePathMacros;
import com.intellij.openapi.util.Couple;
import com.intellij.openapi.util.text.StringUtil;
import com.intellij.util.containers.ContainerUtil;
@@ -33,13 +32,7 @@ import java.util.Collection;
import java.util.LinkedHashMap;
import java.util.Set;
@State(
name = "EqualsHashCodeTemplates",
storages = {
@Storage(
file = StoragePathMacros.APP_CONFIG + "/equalsHashCodeTemplates.xml"
)}
)
@State(name = "EqualsHashCodeTemplates", storages = @Storage("equalsHashCodeTemplates.xml"))
public class EqualsHashCodeTemplatesManager extends TemplatesManager {
private static final String DEFAULT_EQUALS = "/com/intellij/codeInsight/generation/defaultEquals.vm";
private static final String DEFAULT_HASH_CODE = "/com/intellij/codeInsight/generation/defaultHashCode.vm";
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2015 JetBrains s.r.o.
* Copyright 2000-2016 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.
@@ -18,20 +18,13 @@ package com.intellij.codeInsight.generation;
import com.intellij.openapi.components.ServiceManager;
import com.intellij.openapi.components.State;
import com.intellij.openapi.components.Storage;
import com.intellij.openapi.components.StoragePathMacros;
import org.jetbrains.java.generate.exception.TemplateResourceException;
import org.jetbrains.java.generate.template.TemplateResource;
import org.jetbrains.java.generate.template.TemplatesManager;
import java.io.IOException;
@State(
name = "GetterTemplates",
storages = {
@Storage(
file = StoragePathMacros.APP_CONFIG + "/getterTemplates.xml"
)}
)
@State(name = "GetterTemplates", storages = @Storage("getterTemplates.xml"))
public class GetterTemplatesManager extends TemplatesManager {
private static final String DEFAULT = "defaultGetter.vm";
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2015 JetBrains s.r.o.
* Copyright 2000-2016 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.
@@ -18,20 +18,13 @@ package com.intellij.codeInsight.generation;
import com.intellij.openapi.components.ServiceManager;
import com.intellij.openapi.components.State;
import com.intellij.openapi.components.Storage;
import com.intellij.openapi.components.StoragePathMacros;
import org.jetbrains.java.generate.exception.TemplateResourceException;
import org.jetbrains.java.generate.template.TemplateResource;
import org.jetbrains.java.generate.template.TemplatesManager;
import java.io.IOException;
@State(
name = "SetterTemplates",
storages = {
@Storage(
file = StoragePathMacros.APP_CONFIG + "/setterTemplates.xml"
)}
)
@State(name = "SetterTemplates", storages = @Storage("setterTemplates.xml"))
public class SetterTemplatesManager extends TemplatesManager {
private static final String DEFAULT = "defaultSetter.vm";
private static final String BUILDER = "builderSetter.vm";
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2012 JetBrains s.r.o.
* Copyright 2000-2016 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.
@@ -26,7 +26,8 @@ package com.intellij.codeInspection.ex;
import com.intellij.codeInsight.daemon.DaemonCodeAnalyzer;
import com.intellij.codeInspection.util.SpecialAnnotationsUtil;
import com.intellij.openapi.components.*;
import com.intellij.openapi.components.PersistentStateComponent;
import com.intellij.openapi.components.State;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.project.ProjectUtil;
import com.intellij.openapi.ui.DialogWrapper;
@@ -38,10 +39,7 @@ import java.awt.event.ActionListener;
import java.util.ArrayList;
import java.util.List;
@State(
name = "EntryPointsManager",
storages = {@Storage(file = StoragePathMacros.PROJECT_FILE)}
)
@State(name = "EntryPointsManager")
public class EntryPointsManagerImpl extends EntryPointsManagerBase implements PersistentStateComponent<Element> {
public EntryPointsManagerImpl(Project project) {
super(project);
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2012 JetBrains s.r.o.
* Copyright 2000-2016 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.
@@ -21,7 +21,9 @@ import com.intellij.execution.ExecutionException;
import com.intellij.execution.executors.DefaultRunExecutor;
import com.intellij.execution.runners.ExecutionEnvironmentBuilder;
import com.intellij.execution.util.ExecutionErrorDialog;
import com.intellij.openapi.components.*;
import com.intellij.openapi.components.PersistentStateComponent;
import com.intellij.openapi.components.ServiceManager;
import com.intellij.openapi.components.State;
import com.intellij.openapi.diagnostic.Logger;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.util.InvalidDataException;
@@ -29,13 +31,7 @@ import com.intellij.openapi.util.WriteExternalException;
import org.jdom.Element;
import org.jetbrains.annotations.NotNull;
@State(name = "JavadocGenerationManager",
storages = {
@Storage(
file = StoragePathMacros.PROJECT_FILE
)
}
)
@State(name = "JavadocGenerationManager")
public final class JavadocGenerationManager implements PersistentStateComponent<Element> {
private static final Logger LOG = Logger.getInstance("#com.intellij.javadoc.JavadocGenerationManager");
private final JavadocConfiguration myConfiguration;
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2012 JetBrains s.r.o.
* Copyright 2000-2016 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.
@@ -15,16 +15,13 @@
*/
package com.intellij.refactoring;
import com.intellij.openapi.components.*;
import com.intellij.openapi.components.PersistentStateComponent;
import com.intellij.openapi.components.ServiceManager;
import com.intellij.openapi.components.State;
import com.intellij.openapi.components.Storage;
import com.intellij.util.xmlb.XmlSerializerUtil;
@State(
name = "RefactoringSettings",
storages = {
@Storage(
file = StoragePathMacros.APP_CONFIG + "/other.xml"
)}
)
@State(name = "RefactoringSettings", storages = @Storage("other.xml"))
public class JavaRefactoringSettings implements PersistentStateComponent<JavaRefactoringSettings> {
// properties should be public in order to get saved by DefaultExternalizable implementation
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2015 JetBrains s.r.o.
* Copyright 2000-2016 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.
@@ -32,10 +32,7 @@ import javax.swing.*;
import java.util.ArrayList;
import java.util.List;
@State(
name = "NamedScopeManager",
storages = @Storage(file = StoragePathMacros.WORKSPACE_FILE)
)
@State(name = "NamedScopeManager", storages = @Storage(StoragePathMacros.WORKSPACE_FILE))
public class NamedScopeManager extends NamedScopesHolder {
public OrderState myOrderState = new OrderState();
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2015 JetBrains s.r.o.
* Copyright 2000-2016 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.
@@ -17,7 +17,9 @@ package com.intellij.packageDependencies;
import com.intellij.icons.AllIcons;
import com.intellij.ide.IdeBundle;
import com.intellij.openapi.components.*;
import com.intellij.openapi.components.MainConfigurationStateSplitter;
import com.intellij.openapi.components.State;
import com.intellij.openapi.components.Storage;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.util.Comparing;
import com.intellij.openapi.util.NotNullLazyValue;
@@ -38,10 +40,7 @@ import java.util.*;
@State(
name = "DependencyValidationManager",
storages = {
@Storage(file = StoragePathMacros.PROJECT_FILE),
@Storage(file = StoragePathMacros.PROJECT_CONFIG_DIR + "/scopes", scheme = StorageScheme.DIRECTORY_BASED,
stateSplitter = DependencyValidationManagerImpl.ScopesStateSplitter.class)}
storages = @Storage(value = "scopes", stateSplitter = DependencyValidationManagerImpl.ScopesStateSplitter.class)
)
public class DependencyValidationManagerImpl extends DependencyValidationManager {
private static final NotNullLazyValue<Icon> ourSharedScopeIcon = new NotNullLazyValue<Icon>() {
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2015 JetBrains s.r.o.
* Copyright 2000-2016 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.
@@ -23,8 +23,6 @@ import com.intellij.openapi.application.Application;
import com.intellij.openapi.application.ApplicationManager;
import com.intellij.openapi.components.State;
import com.intellij.openapi.components.Storage;
import com.intellij.openapi.components.StoragePathMacros;
import com.intellij.openapi.components.StorageScheme;
import com.intellij.openapi.project.DumbAwareRunnable;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.startup.StartupManager;
@@ -50,10 +48,7 @@ import java.util.concurrent.ConcurrentHashMap;
*/
@State(
name = "InspectionProjectProfileManager",
storages = {
@Storage(file = StoragePathMacros.PROJECT_FILE),
@Storage(file = "inspectionProfiles", scheme = StorageScheme.DIRECTORY_BASED, stateSplitter = DefaultProjectProfileManager.ProfileStateSplitter.class)
}
storages = @Storage(value = "inspectionProfiles", stateSplitter = DefaultProjectProfileManager.ProfileStateSplitter.class)
)
public class InspectionProjectProfileManagerImpl extends InspectionProjectProfileManager {
private final Map<String, InspectionProfileWrapper> myName2Profile = new ConcurrentHashMap<String, InspectionProfileWrapper>();
@@ -2,7 +2,10 @@ package org.jetbrains.builtInWebServer;
import com.intellij.notification.NotificationType;
import com.intellij.openapi.application.ApplicationNamesInfo;
import com.intellij.openapi.components.*;
import com.intellij.openapi.components.PersistentStateComponent;
import com.intellij.openapi.components.ServiceManager;
import com.intellij.openapi.components.State;
import com.intellij.openapi.components.Storage;
import com.intellij.openapi.options.Configurable;
import com.intellij.openapi.options.SimpleConfigurable;
import com.intellij.openapi.util.Getter;
@@ -23,7 +26,7 @@ import java.util.Collections;
@State(
name = "BuiltInServerOptions",
storages = @Storage(file = StoragePathMacros.APP_CONFIG + "/other.xml")
storages = @Storage("other.xml")
)
public class BuiltInServerOptions implements PersistentStateComponent<BuiltInServerOptions>, Getter<BuiltInServerOptions> {
private static final int DEFAULT_PORT = 63342;
@@ -21,7 +21,6 @@ import com.intellij.openapi.application.PathManager
import com.intellij.openapi.application.invokeAndWaitIfNeed
import com.intellij.openapi.components.PathMacroManager
import com.intellij.openapi.components.StateStorageOperation
import com.intellij.openapi.components.StoragePathMacros
import com.intellij.openapi.components.impl.BasePathMacroManager
import com.intellij.openapi.components.impl.ServiceManagerImpl
import com.intellij.openapi.components.impl.stores.FileStorageCoreUtil
@@ -34,6 +33,8 @@ import org.jdom.Element
private class ApplicationPathMacroManager : BasePathMacroManager(null)
const val APP_CONFIG = "\$APP_CONFIG$"
class ApplicationStoreImpl(private val application: Application, pathMacroManager: PathMacroManager? = null) : ComponentStoreImpl() {
override val storageManager = ApplicationStorageManager(application, pathMacroManager)
@@ -43,7 +44,7 @@ class ApplicationStoreImpl(private val application: Application, pathMacroManage
override fun setPath(path: String) {
// app config must be first, because collapseMacros collapse from fist to last, so, at first we must replace APP_CONFIG because it overlaps ROOT_CONFIG value
storageManager.addMacro(StoragePathMacros.APP_CONFIG, "$path/${ApplicationStorageManager.FILE_STORAGE_DIR}")
storageManager.addMacro(APP_CONFIG, "$path/${ApplicationStorageManager.FILE_STORAGE_DIR}")
storageManager.addMacro(ROOT_CONFIG, path)
val configDir = LocalFileSystem.getInstance().refreshAndFindFileByPath(path)
@@ -103,12 +104,12 @@ class ApplicationStorageManager(private val application: Application, pathMacroM
}
}
override fun normalizeFileSpec(fileSpec: String) = removeMacroIfStartsWith(super.normalizeFileSpec(fileSpec), StoragePathMacros.APP_CONFIG)
override fun normalizeFileSpec(fileSpec: String) = removeMacroIfStartsWith(super.normalizeFileSpec(fileSpec), APP_CONFIG)
override fun expandMacros(path: String) = if (path[0] == '$') {
super.expandMacros(path)
}
else {
"${expandMacro(StoragePathMacros.APP_CONFIG)}/$path"
"${expandMacro(APP_CONFIG)}/$path"
}
}
@@ -46,14 +46,20 @@ import com.intellij.util.xmlb.JDOMXIncluder
import gnu.trove.THashMap
import org.jdom.Element
import org.jetbrains.annotations.TestOnly
import java.io.File
import java.io.IOException
import java.nio.file.Paths
import java.util.*
import java.util.concurrent.CopyOnWriteArrayList
import com.intellij.openapi.util.Pair as JBPair
internal val LOG = Logger.getInstance(ComponentStoreImpl::class.java)
internal val deprecatedComparator = Comparator<Storage> { o1, o2 ->
val w1 = if (o1.deprecated) 1 else 0
val w2 = if (o2.deprecated) 1 else 0
w1 - w2
}
abstract class ComponentStoreImpl : IComponentStore {
private val components = Collections.synchronizedMap(THashMap<String, Any>())
private val settingsSavingComponents = CopyOnWriteArrayList<SettingsSavingComponent>()
@@ -68,9 +74,6 @@ abstract class ComponentStoreImpl : IComponentStore {
override final fun getStateStorageManager() = storageManager
// return null if not applicable
protected open fun selectDefaultStorages(storages: Array<Storage>, operation: StateStorageOperation): Array<Storage>? = null
override final fun initComponent(component: Any, service: Boolean) {
if (component is SettingsSavingComponent) {
settingsSavingComponents.add(component)
@@ -163,13 +166,13 @@ abstract class ComponentStoreImpl : IComponentStore {
return
}
val file: File
val absolutePath: String
val state = StoreUtil.getStateSpec(component.javaClass)
if (state != null) {
file = File(storageManager.expandMacros(findNonDeprecated(state.storages).file))
absolutePath = Paths.get(storageManager.expandMacros(findNonDeprecated(state.storages).path)).toAbsolutePath().toString()
}
else if (component is ExportableApplicationComponent && component is NamedJDOMExternalizable) {
file = PathManager.getOptionsFile(component)
absolutePath = PathManager.getOptionsFile(component).absolutePath
}
else {
throw AssertionError("${component.javaClass} doesn't have @State annotation and doesn't implement ExportableApplicationComponent")
@@ -177,11 +180,11 @@ abstract class ComponentStoreImpl : IComponentStore {
runWriteAction {
try {
VfsRootAccess.allowRootAccess(file.absolutePath)
VfsRootAccess.allowRootAccess(absolutePath)
CompoundRuntimeException.throwIfNotEmpty(doSave(sessions))
}
finally {
VfsRootAccess.disallowRootAccess(file.absolutePath)
VfsRootAccess.disallowRootAccess(absolutePath)
}
}
}
@@ -327,13 +330,7 @@ abstract class ComponentStoreImpl : IComponentStore {
throw AssertionError("No storage specified")
}
val defaultStorages = selectDefaultStorages(storages, operation)
if (defaultStorages != null) {
return defaultStorages
}
return sortStoragesByDeprecated(storages)
return storages.sortByDeprecated()
}
override final fun isReloadPossible(componentNames: MutableSet<String>) = !componentNames.any { isNotReloadable(it) }
@@ -461,28 +458,24 @@ enum class StateLoadPolicy {
LOAD, LOAD_ONLY_DEFAULT, NOT_LOAD
}
internal fun sortStoragesByDeprecated(storages: Array<Storage>): Array<out Storage> {
if (storages.isEmpty()) {
return storages
internal fun Array<Storage>.sortByDeprecated(): Array<out Storage> {
if (isEmpty()) {
return this
}
if (!storages[0].deprecated) {
if (!this[0].deprecated) {
var othersAreDeprecated = true
for (i in 1..storages.size - 1) {
if (!storages[i].deprecated) {
for (i in 1..size - 1) {
if (!this[i].deprecated) {
othersAreDeprecated = false
break
}
}
if (othersAreDeprecated) {
return storages
return this
}
}
return storages.sortedArrayWith(Comparator<Storage> { o1, o2 ->
val w1 = if (o1.deprecated) 1 else 0
val w2 = if (o2.deprecated) 1 else 0
w1 - w2
})
return sortedArrayWith(deprecatedComparator)
}
@@ -25,7 +25,7 @@ import java.io.File
internal class DefaultProjectStoreImpl(override val project: ProjectImpl, private val pathMacroManager: PathMacroManager) : ComponentStoreImpl() {
companion object {
const val FILE_SPEC = "${StoragePathMacros.APP_CONFIG}/project.default.xml"
const val FILE_SPEC = "${APP_CONFIG}/project.default.xml"
}
// see note about default state in project store
@@ -79,7 +79,7 @@ internal class DefaultProjectStoreImpl(override val project: ProjectImpl, privat
override final fun getPathMacroManagerForDefaults() = pathMacroManager
override fun selectDefaultStorages(storages: Array<Storage>, operation: StateStorageOperation) = selectDefaultStorages(storages, operation, StorageScheme.DEFAULT)
override fun <T> getStorageSpecs(component: PersistentStateComponent<T>, stateSpec: State, operation: StateStorageOperation) = arrayOf(PROJECT_FILE_STORAGE_ANNOTATION)
override fun setPath(path: String) {
}
@@ -98,7 +98,7 @@ internal class DefaultProjectStoreImpl(override val project: ProjectImpl, privat
}
// ExportSettingsAction checks only "State" annotation presence, but doesn't require PersistentStateComponent implementation, so, we can just specify annotation
@State(name = "ProjectManager", storages = arrayOf(Storage(file = DefaultProjectStoreImpl.FILE_SPEC)))
@State(name = "ProjectManager", storages = arrayOf(Storage(DefaultProjectStoreImpl.FILE_SPEC)))
private class DefaultProjectExportableAndSaveTrigger : SettingsSavingComponent {
@Volatile var project: Project? = null
@@ -197,8 +197,8 @@ fun getExportableComponentsMap(onlyExisting: Boolean,
return@PairProcessor true
}
val storage = sortStoragesByDeprecated(stateAnnotation.storages).firstOrNull() ?: return@PairProcessor true
if (!(storage.roamingType != RoamingType.DISABLED && storage.storageClass == StateStorage::class && storage.scheme == StorageScheme.DEFAULT && !storage.file.isNullOrEmpty())) {
val storage = stateAnnotation.storages.sortByDeprecated().firstOrNull() ?: return@PairProcessor true
if (!(storage.roamingType != RoamingType.DISABLED && storage.storageClass == StateStorage::class && !storage.path.isNullOrEmpty())) {
return@PairProcessor true
}
@@ -215,7 +215,7 @@ fun getExportableComponentsMap(onlyExisting: Boolean,
}
}
val file = Paths.get(storageManager.expandMacros(storage.file))
val file = Paths.get(storageManager.expandMacros(storage.path))
val isFileIncluded = !isSkipFile(file)
if (isFileIncluded || additionalExportFile != null) {
if (computePresentableNames && onlyExisting && additionalExportFile == null && file.fileName.toString().endsWith(".xml")) {
@@ -231,7 +231,7 @@ fun Parent.toBufferExposingByteArray(lineSeparator: String = "\n"): BufferExposi
return out
}
fun isProjectOrModuleFile(fileSpec: String): Boolean = StoragePathMacros.PROJECT_FILE == fileSpec || fileSpec.startsWith(StoragePathMacros.PROJECT_CONFIG_DIR) || fileSpec == StoragePathMacros.MODULE_FILE
fun isProjectOrModuleFile(fileSpec: String): Boolean = PROJECT_FILE == fileSpec || fileSpec.startsWith(PROJECT_CONFIG_DIR) || fileSpec == StoragePathMacros.MODULE_FILE
fun detectLineSeparators(chars: CharSequence, defaultSeparator: LineSeparator?): LineSeparator {
for (c in chars) {
@@ -27,14 +27,14 @@ class ProjectStateStorageManager(macroSubstitutor: TrackingPathMacroSubstitutor,
val VERSION_OPTION = "version"
}
override fun normalizeFileSpec(fileSpec: String) = removeMacroIfStartsWith(super.normalizeFileSpec(fileSpec), StoragePathMacros.PROJECT_CONFIG_DIR)
override fun normalizeFileSpec(fileSpec: String) = removeMacroIfStartsWith(super.normalizeFileSpec(fileSpec), PROJECT_CONFIG_DIR)
override fun expandMacros(path: String): String {
if (path[0] == '$') {
return super.expandMacros(path)
}
else {
return "${expandMacro(StoragePathMacros.PROJECT_CONFIG_DIR)}/$path"
return "${expandMacro(PROJECT_CONFIG_DIR)}/$path"
}
}
@@ -47,6 +47,6 @@ class ProjectStateStorageManager(macroSubstitutor: TrackingPathMacroSubstitutor,
if (workspace && (operation != StateStorageOperation.READ || getOrCreateStorage(StoragePathMacros.WORKSPACE_FILE, RoamingType.DISABLED).hasState(componentName, false))) {
return StoragePathMacros.WORKSPACE_FILE
}
return StoragePathMacros.PROJECT_FILE
return PROJECT_FILE
}
}
@@ -42,6 +42,7 @@ import com.intellij.openapi.vfs.VfsUtil
import com.intellij.openapi.vfs.VirtualFile
import com.intellij.util.PathUtilRt
import com.intellij.util.SmartList
import com.intellij.util.containers.isNullOrEmpty
import com.intellij.util.lang.CompoundRuntimeException
import java.io.File
import java.io.IOException
@@ -50,9 +51,17 @@ import java.nio.file.Path
import java.nio.file.Paths
import java.util.*
const val PROJECT_FILE = "\$PROJECT_FILE$"
const val PROJECT_CONFIG_DIR = "\$PROJECT_CONFIG_DIR$"
val IProjectStore.nameFile: Path
get() = Paths.get(projectBasePath, Project.DIRECTORY_STORE_FOLDER, ProjectImpl.NAME_FILE)
internal val PROJECT_FILE_STORAGE_ANNOTATION = ProjectFileStorageAnnotation()
internal val DEPRECATED_PROJECT_FILE_STORAGE_ANNOTATION = object : ProjectFileStorageAnnotation() {
override fun deprecated() = true
}
abstract class ProjectStoreBase(override final val project: ProjectImpl) : ComponentStoreImpl(), IProjectStore {
// protected setter used in upsource
// Zelix KlassMaster - ERROR: Could not find method 'getScheme()'
@@ -73,7 +82,7 @@ abstract class ProjectStoreBase(override final val project: ProjectImpl) : Compo
loadPolicy = if (value) StateLoadPolicy.NOT_LOAD else StateLoadPolicy.LOAD
}
override fun getProjectFilePath() = storageManager.expandMacro(StoragePathMacros.PROJECT_FILE)
override fun getProjectFilePath() = storageManager.expandMacro(PROJECT_FILE)
override final fun getWorkspaceFilePath() = storageManager.expandMacro(StoragePathMacros.WORKSPACE_FILE)
@@ -86,7 +95,7 @@ abstract class ProjectStoreBase(override final val project: ProjectImpl) : Compo
val element = (defaultProject.stateStore as DefaultProjectStoreImpl).getStateCopy()
if (element != null) {
(storageManager.getOrCreateStorage(StoragePathMacros.PROJECT_FILE) as XmlElementStorage).setDefaultState(element)
(storageManager.getOrCreateStorage(PROJECT_FILE) as XmlElementStorage).setDefaultState(element)
}
}
@@ -102,7 +111,7 @@ abstract class ProjectStoreBase(override final val project: ProjectImpl) : Compo
if (FileUtilRt.extensionEquals(filePath, ProjectFileType.DEFAULT_EXTENSION)) {
scheme = StorageScheme.DEFAULT
storageManager.addMacro(StoragePathMacros.PROJECT_FILE, filePath)
storageManager.addMacro(PROJECT_FILE, filePath)
val workspacePath = composeWsPath(filePath)
storageManager.addMacro(StoragePathMacros.WORKSPACE_FILE, workspacePath)
@@ -125,8 +134,8 @@ abstract class ProjectStoreBase(override final val project: ProjectImpl) : Compo
// if useOldWorkspaceContentIfExists false, so, file path is expected to be correct (we must avoid file io operations)
val isDir = !useOldWorkspaceContentIfExists || file.isDirectory
val configDir = "${(if (isDir) filePath else PathUtilRt.getParentPath(filePath))}/${Project.DIRECTORY_STORE_FOLDER}"
storageManager.addMacro(StoragePathMacros.PROJECT_CONFIG_DIR, configDir)
storageManager.addMacro(StoragePathMacros.PROJECT_FILE, "$configDir/misc.xml")
storageManager.addMacro(PROJECT_CONFIG_DIR, configDir)
storageManager.addMacro(PROJECT_FILE, "$configDir/misc.xml")
storageManager.addMacro(StoragePathMacros.WORKSPACE_FILE, "$configDir/workspace.xml")
if (!isDir) {
@@ -164,7 +173,7 @@ private open class ProjectStoreImpl(project: ProjectImpl, private val pathMacroM
}
override fun getProjectName(): String {
if (scheme == StorageScheme.DIRECTORY_BASED) {
if (isDirectoryBased) {
val baseDir = projectBasePath
val nameFile = nameFile
if (nameFile.exists()) {
@@ -194,8 +203,11 @@ private open class ProjectStoreImpl(project: ProjectImpl, private val pathMacroM
}
}
private val isDirectoryBased: Boolean
get() = scheme == StorageScheme.DIRECTORY_BASED
private fun saveProjectName() {
if (scheme != StorageScheme.DIRECTORY_BASED) {
if (!isDirectoryBased) {
return
}
@@ -279,78 +291,68 @@ private open class ProjectStoreImpl(project: ProjectImpl, private val pathMacroM
}
override fun <T> getStorageSpecs(component: PersistentStateComponent<T>, stateSpec: State, operation: StateStorageOperation): Array<out Storage> {
// if we create project from default, component state written not to own storage file, but to project file,
// we don't have time to fix it properly, so, ancient hack restored.
val result = super.getStorageSpecs(component, stateSpec, operation)
// don't add fake storage if project file storage already listed, otherwise data will be deleted on write (because of "deprecated")
for (storage in result) {
if (storage.file == StoragePathMacros.PROJECT_FILE) {
return result
}
}
return Array(result.size + 1) { if (it == result.size) DEFAULT_STORAGE_ANNOTATION else result[it] }
}
companion object {
private val DEFAULT_STORAGE_ANNOTATION = DefaultStorageAnnotation()
private fun dropUnableToSaveProjectNotification(project: Project, readOnlyFiles: Array<VirtualFile>) {
val notifications = NotificationsManager.getNotificationsManager().getNotificationsOfType(UnableToSaveProjectNotification::class.java, project)
if (notifications.isEmpty()) {
Notifications.Bus.notify(UnableToSaveProjectNotification(project, readOnlyFiles), project)
}
else {
notifications[0].myFiles = readOnlyFiles
}
val storages = stateSpec.storages
if (storages.isEmpty()) {
return arrayOf(PROJECT_FILE_STORAGE_ANNOTATION)
}
private fun getFilesList(readonlyFiles: List<Pair<SaveSession, VirtualFile>>) = Array(readonlyFiles.size) { readonlyFiles[it].second }
}
override fun selectDefaultStorages(storages: Array<Storage>, operation: StateStorageOperation) = selectDefaultStorages(storages, operation, scheme)
}
internal fun selectDefaultStorages(storages: Array<Storage>, operation: StateStorageOperation, scheme: StorageScheme): Array<Storage> {
if (operation === StateStorageOperation.READ) {
val result = SmartList<Storage>()
for (i in storages.indices.reversed()) {
val storage = storages[i]
if (storage.scheme == scheme) {
result.add(storage)
}
}
for (storage in storages) {
if (storage.scheme == StorageScheme.DEFAULT && !result.contains(storage)) {
result.add(storage)
}
}
return result.toTypedArray()
}
else if (operation == StateStorageOperation.WRITE) {
val result = SmartList<Storage>()
for (storage in storages) {
if (storage.scheme == scheme) {
result.add(storage)
}
}
if (result.isEmpty()) {
if (isDirectoryBased) {
var result: MutableList<Storage>? = null
for (storage in storages) {
if (storage.scheme == StorageScheme.DEFAULT) {
@Suppress("DEPRECATION")
if (storage.scheme == scheme || storage.path != PROJECT_FILE) {
if (result == null) {
result = SmartList()
}
result.add(storage)
}
}
}
return result.toTypedArray()
}
else {
return emptyArray()
if (result.isNullOrEmpty()) {
return arrayOf(PROJECT_FILE_STORAGE_ANNOTATION)
}
else {
result!!.sortWith(deprecatedComparator)
// if we create project from default, component state written not to own storage file, but to project file,
// we don't have time to fix it properly, so, ancient hack restored
result.add(DEPRECATED_PROJECT_FILE_STORAGE_ANNOTATION)
return result.toTypedArray()
}
}
else {
var result: MutableList<Storage>? = null
for (storage in storages) {
@Suppress("DEPRECATION")
if (storage.path == PROJECT_FILE || storage.path == StoragePathMacros.WORKSPACE_FILE) {
if (result == null) {
result = SmartList()
}
result.add(storage)
}
}
if (result.isNullOrEmpty()) {
return arrayOf(PROJECT_FILE_STORAGE_ANNOTATION)
}
else {
result!!.sortWith(deprecatedComparator)
return result.toTypedArray()
}
}
}
}
private fun dropUnableToSaveProjectNotification(project: Project, readOnlyFiles: Array<VirtualFile>) {
val notifications = NotificationsManager.getNotificationsManager().getNotificationsOfType(UnableToSaveProjectNotification::class.java, project)
if (notifications.isEmpty()) {
Notifications.Bus.notify(UnableToSaveProjectNotification(project, readOnlyFiles), project)
}
else {
notifications[0].myFiles = readOnlyFiles
}
}
private fun getFilesList(readonlyFiles: List<Pair<SaveSession, VirtualFile>>) = Array(readonlyFiles.size) { readonlyFiles[it].second }
private class ProjectWithModulesStoreImpl(project: ProjectImpl, pathMacroManager: PathMacroManager) : ProjectStoreImpl(project, pathMacroManager) {
override fun beforeSave(readonlyFiles: List<Pair<SaveSession, VirtualFile>>) {
super.beforeSave(readonlyFiles)
@@ -130,7 +130,7 @@ open class StateStorageManagerImpl(private val rootTagName: String,
}
}
override final fun getStateStorage(storageSpec: Storage) = getOrCreateStorage(storageSpec.file, storageSpec.roamingType,
override final fun getStateStorage(storageSpec: Storage) = getOrCreateStorage(storageSpec.path, storageSpec.roamingType,
JavaAnnotationHelperForKotlin.getStorageClass(storageSpec), JavaAnnotationHelperForKotlin.getStateSplitterClass(storageSpec))
protected open fun normalizeFileSpec(fileSpec: String): String {
@@ -142,7 +142,7 @@ open class StateStorageManagerImpl(private val rootTagName: String,
fun getOrCreateStorage(collapsedPath: String,
roamingType: RoamingType = RoamingType.DEFAULT,
storageClass: Class<out StateStorage> = StateStorage::class.java,
@Suppress("DEPRECATION") @SuppressWarnings("deprecation") stateSplitter: Class<out StateSplitter> = StateSplitterEx::class.java): StateStorage {
@Suppress("DEPRECATION") stateSplitter: Class<out StateSplitter> = StateSplitterEx::class.java): StateStorage {
val normalizedCollapsedPath = normalizeFileSpec(collapsedPath)
val key = if (storageClass == StateStorage::class.java) normalizedCollapsedPath else storageClass.name
storageLock.withLock {
@@ -398,4 +398,8 @@ private fun String.startsWithMacro(macro: String): Boolean {
return length > i && this[i] == '/' && startsWith(macro)
}
fun removeMacroIfStartsWith(path: String, macro: String) = if (path.startsWithMacro(macro)) path.substring(macro.length + 1) else path
fun removeMacroIfStartsWith(path: String, macro: String) = if (path.startsWithMacro(macro)) path.substring(macro.length + 1) else path
@Suppress("DEPRECATION")
val Storage.path: String
get() = if (value.isNullOrEmpty()) file else value
@@ -6,7 +6,7 @@ import org.jetbrains.annotations.NotNull;
import java.lang.annotation.Annotation;
@SuppressWarnings("ClassExplicitlyAnnotation")
public final class DefaultStorageAnnotation implements Storage {
public class ProjectFileStorageAnnotation implements Storage {
@Override
public String id() {
return "___Default___";
@@ -14,7 +14,12 @@ public final class DefaultStorageAnnotation implements Storage {
@Override
public String file() {
return StoragePathMacros.PROJECT_FILE;
return value();
}
@Override
public String value() {
return ProjectStoreImplKt.PROJECT_FILE;
}
@Override
@@ -24,7 +29,7 @@ public final class DefaultStorageAnnotation implements Storage {
@Override
public boolean deprecated() {
return true;
return false;
}
@Override
@@ -119,7 +119,7 @@ internal class ApplicationStoreTest {
testAppConfig.refreshVfs()
val storageManager = ApplicationManager.getApplication().stateStore.stateStorageManager
val optionsPath = storageManager.expandMacros(StoragePathMacros.APP_CONFIG)
val optionsPath = storageManager.expandMacros(APP_CONFIG)
val rootConfigPath = storageManager.expandMacros(ROOT_CONFIG)
val map = getExportableComponentsMap(false, true, storageManager)
assertThat(map).isNotEmpty
@@ -201,7 +201,7 @@ internal class ApplicationStoreTest {
</application>""")
}
@State(name = "A", storages = arrayOf(Storage(file = "a.xml")), additionalExportFile = "foo")
@State(name = "A", storages = arrayOf(Storage("a.xml")), additionalExportFile = "foo")
private open class A : PersistentStateComponent<A.State> {
data class State(@Attribute var foo: String = "", @Attribute var bar: String = "")
@@ -237,7 +237,7 @@ internal class ApplicationStoreTest {
}
@Test fun `do not check if only format changed for non-roamable storage`() {
@State(name = "A", storages = arrayOf(Storage(file = "b.xml", roamingType = RoamingType.DISABLED)))
@State(name = "A", storages = arrayOf(Storage(value = "b.xml", roamingType = RoamingType.DISABLED)))
class AWorkspace : A()
val oldContent = "<application><component name=\"A\" foo=\"old\" deprecated=\"old\"/></application>"
@@ -296,7 +296,7 @@ internal class ApplicationStoreTest {
}
override fun setPath(path: String) {
storageManager.addMacro(StoragePathMacros.APP_CONFIG, path)
storageManager.addMacro(APP_CONFIG, path)
// yes, in tests APP_CONFIG equals to ROOT_CONFIG (as ICS does)
storageManager.addMacro(ROOT_CONFIG, path)
}
@@ -307,7 +307,7 @@ internal class ApplicationStoreTest {
var foo = "defaultValue"
}
@State(name = "A", storages = arrayOf(Storage(file = "new.xml"), Storage(file = StoragePathMacros.APP_CONFIG + "/old.xml", deprecated = true)))
@State(name = "A", storages = arrayOf(Storage("new.xml"), Storage(value = "old.xml", deprecated = true)))
class SeveralStoragesConfigured : Foo(), PersistentStateComponent<SeveralStoragesConfigured> {
override fun getState(): SeveralStoragesConfigured? {
return this
@@ -318,7 +318,7 @@ internal class ApplicationStoreTest {
}
}
@State(name = "A", storages = arrayOf(Storage(file = "old.xml", deprecated = true), Storage(file = "${StoragePathMacros.APP_CONFIG}/new.xml")))
@State(name = "A", storages = arrayOf(Storage(value = "old.xml", deprecated = true), Storage("new.xml")))
class ActualStorageLast : Foo(), PersistentStateComponent<ActualStorageLast> {
override fun getState() = this
@@ -24,10 +24,7 @@ internal class DefaultProjectStoreTest {
internal const val TEST_COMPONENT_NAME = "Foo"
@State(name = TEST_COMPONENT_NAME, storages = arrayOf(
Storage(file = StoragePathMacros.PROJECT_FILE),
Storage(file = "${StoragePathMacros.PROJECT_CONFIG_DIR}/testSchemes", scheme = StorageScheme.DIRECTORY_BASED, stateSplitter = TestStateSplitter::class))
)
@State(name = TEST_COMPONENT_NAME, storages = arrayOf(Storage(value = "testSchemes", stateSplitter = TestStateSplitter::class)))
private class TestComponent: PersistentStateComponent<Element> {
private var element = Element("state")
@@ -47,7 +44,7 @@ internal class DefaultProjectStoreTest {
tempDirManager,
WrapRule {
val app = ApplicationManagerEx.getApplicationEx()
val path = Paths.get(app.stateStore.stateStorageManager.expandMacros(StoragePathMacros.APP_CONFIG))
val path = Paths.get(app.stateStore.stateStorageManager.expandMacros(APP_CONFIG))
// dream about using in memory fs per test as ICS partially does and avoid such hacks
path.refreshVfs()
@@ -17,8 +17,10 @@ package com.intellij.configurationStore
import com.intellij.ide.highlighter.ProjectFileType
import com.intellij.openapi.application.runWriteAction
import com.intellij.openapi.components.*
import com.intellij.openapi.components.PersistentStateComponent
import com.intellij.openapi.components.State
import com.intellij.openapi.components.impl.stores.IProjectStore
import com.intellij.openapi.components.stateStore
import com.intellij.openapi.project.Project
import com.intellij.openapi.project.ProjectManager
import com.intellij.openapi.project.ex.ProjectEx
@@ -84,7 +86,7 @@ internal class ProjectStoreTest {
private val iprFileContent =
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n <component name=\"AATestComponent\">\n <option name=\"value\" value=\"customValue\" />\n </component>\n</project>"
@State(name = "AATestComponent", storages = arrayOf(Storage(file = StoragePathMacros.PROJECT_FILE)))
@State(name = "AATestComponent")
private class TestComponent : PersistentStateComponent<TestState> {
private var state: TestState? = null
@@ -107,7 +109,7 @@ internal class ProjectStoreTest {
assertThat(project.basePath).isEqualTo(PathUtil.getParentPath((PathUtil.getParentPath(project.projectFilePath!!))))
// test reload on external change
val file = File(project.stateStore.stateStorageManager.expandMacros(StoragePathMacros.PROJECT_FILE))
val file = File(project.stateStore.stateStorageManager.expandMacros(PROJECT_FILE))
file.writeText(file.readText().replace("""<option name="value" value="foo" />""", """<option name="value" value="newValue" />"""))
project.baseDir.refresh(false, true)
@@ -179,7 +181,7 @@ internal class ProjectStoreTest {
testComponent.state!!.value = "foo"
project.saveStore()
val file = Paths.get(project.stateStore.stateStorageManager.expandMacros(StoragePathMacros.PROJECT_FILE))
val file = Paths.get(project.stateStore.stateStorageManager.expandMacros(PROJECT_FILE))
assertThat(file).isRegularFile()
// test exact string - xml prolog, line separators, indentation and so on must be exactly the same
// todo get rid of default component states here
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2015 JetBrains s.r.o.
* Copyright 2000-2016 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.
@@ -33,7 +33,7 @@ import java.util.Map;
@State(
name = "DiffSettings",
storages = @Storage(file = DiffUtil.DIFF_CONFIG)
storages = @Storage(DiffUtil.DIFF_CONFIG)
)
public class DiffSettingsHolder implements PersistentStateComponent<DiffSettingsHolder.State> {
public static final Key<DiffSettings> KEY = Key.create("DiffSettings");
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2015 JetBrains s.r.o.
* Copyright 2000-2016 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.
@@ -30,7 +30,7 @@ import org.jetbrains.annotations.Nullable;
@State(
name = "ExternalDiffSettings",
storages = @Storage(file = DiffUtil.DIFF_CONFIG)
storages = @Storage(DiffUtil.DIFF_CONFIG)
)
public class ExternalDiffSettings implements PersistentStateComponent<ExternalDiffSettings.State> {
private State myState = new State();
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2015 JetBrains s.r.o.
* Copyright 2000-2016 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.
@@ -31,7 +31,7 @@ import java.util.TreeMap;
@State(
name = "TextDiffSettings",
storages = @Storage(file = DiffUtil.DIFF_CONFIG)
storages = @Storage(value = DiffUtil.DIFF_CONFIG)
)
public class TextDiffSettingsHolder implements PersistentStateComponent<TextDiffSettingsHolder.State> {
public static final Key<TextDiffSettings> KEY = Key.create("TextDiffSettings");
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2015 JetBrains s.r.o.
* Copyright 2000-2016 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.
@@ -46,7 +46,6 @@ import com.intellij.openapi.application.ApplicationManager;
import com.intellij.openapi.application.impl.LaterInvocator;
import com.intellij.openapi.command.CommandProcessor;
import com.intellij.openapi.command.UndoConfirmationPolicy;
import com.intellij.openapi.components.StoragePathMacros;
import com.intellij.openapi.diagnostic.Logger;
import com.intellij.openapi.diff.DiffBundle;
import com.intellij.openapi.diff.impl.GenericDataProvider;
@@ -101,7 +100,7 @@ import java.util.List;
public class DiffUtil {
private static final Logger LOG = Logger.getInstance(DiffUtil.class);
@NotNull public static final String DIFF_CONFIG = StoragePathMacros.APP_CONFIG + "/diff.xml";
@NotNull public static final String DIFF_CONFIG = "diff.xml";
public static final int TITLE_GAP = JBUI.scale(2);
//
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2014 JetBrains s.r.o.
* Copyright 2000-2016 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.
@@ -15,7 +15,10 @@
*/
package com.intellij.dupLocator;
import com.intellij.openapi.components.*;
import com.intellij.openapi.components.PersistentStateComponent;
import com.intellij.openapi.components.ServiceManager;
import com.intellij.openapi.components.State;
import com.intellij.openapi.components.Storage;
import com.intellij.util.xmlb.XmlSerializerUtil;
import java.util.HashSet;
@@ -24,8 +27,8 @@ import java.util.Set;
@State(
name = "DuplocatorSettings",
storages = {
@Storage(file = StoragePathMacros.APP_CONFIG + "/duplocatorSettings.xml"),
@Storage(file = StoragePathMacros.APP_CONFIG + "/other.xml", deprecated = true)
@Storage("duplocatorSettings.xml"),
@Storage(value = "other.xml", deprecated = true)
}
)
public class DuplocatorSettings implements PersistentStateComponent<DuplocatorSettings> {
@@ -1,7 +1,25 @@
/*
* Copyright 2000-2016 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.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.intellij.dupLocator;
import com.intellij.lang.Language;
import com.intellij.openapi.components.*;
import com.intellij.openapi.components.PersistentStateComponent;
import com.intellij.openapi.components.ServiceManager;
import com.intellij.openapi.components.State;
import com.intellij.openapi.components.Storage;
import com.intellij.openapi.util.JDOMUtil;
import com.intellij.util.xmlb.SkipDefaultValuesSerializationFilters;
import com.intellij.util.xmlb.XmlSerializer;
@@ -16,7 +34,7 @@ import java.util.TreeMap;
*/
@State(
name = "MultiLanguageDuplocatorSettings",
storages = @Storage(file = StoragePathMacros.APP_CONFIG + "/duplocatorSettings.xml")
storages = @Storage("duplocatorSettings.xml")
)
public class MultilanguageDuplocatorSettings implements PersistentStateComponent<Element> {
private final Map<String, ExternalizableDuplocatorState> mySettingsMap = new TreeMap<String, ExternalizableDuplocatorState>();
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2014 JetBrains s.r.o.
* Copyright 2000-2016 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.
@@ -30,7 +30,7 @@ import org.jetbrains.annotations.Nullable;
import java.util.List;
import java.util.Set;
@State(name = "Push.Settings", storages = {@Storage(file = StoragePathMacros.WORKSPACE_FILE)})
@State(name = "Push.Settings", storages = {@Storage(StoragePathMacros.WORKSPACE_FILE)})
public class PushSettings implements PersistentStateComponent<PushSettings.State> {
private State myState = new State();
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2015 JetBrains s.r.o.
* Copyright 2000-2016 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.
@@ -19,7 +19,10 @@ import com.intellij.ide.WelcomeWizardUtil;
import com.intellij.openapi.Disposable;
import com.intellij.openapi.application.Application;
import com.intellij.openapi.application.ApplicationManager;
import com.intellij.openapi.components.*;
import com.intellij.openapi.components.PersistentStateComponent;
import com.intellij.openapi.components.ServiceManager;
import com.intellij.openapi.components.State;
import com.intellij.openapi.components.Storage;
import com.intellij.openapi.util.IconLoader;
import com.intellij.openapi.util.Pair;
import com.intellij.openapi.util.SimpleModificationTracker;
@@ -44,7 +47,7 @@ import static com.intellij.util.ui.UIUtil.isValidFont;
@State(
name = "UISettings",
storages = @Storage(file = StoragePathMacros.APP_CONFIG + "/ui.lnf.xml")
storages = @Storage("ui.lnf.xml")
)
public class UISettings extends SimpleModificationTracker implements PersistentStateComponent<UISettings> {
/** Not tabbed pane. */
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2014 JetBrains s.r.o.
* Copyright 2000-2016 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.
@@ -18,7 +18,6 @@ package com.intellij.codeInsight.folding;
import com.intellij.openapi.components.PersistentStateComponent;
import com.intellij.openapi.components.State;
import com.intellij.openapi.components.Storage;
import com.intellij.openapi.components.StoragePathMacros;
import com.intellij.util.xmlb.XmlSerializerUtil;
/**
@@ -26,7 +25,7 @@ import com.intellij.util.xmlb.XmlSerializerUtil;
*/
@State(
name = "CodeFoldingSettings",
storages = @Storage(file = StoragePathMacros.APP_CONFIG + "/editor.codeinsight.xml")
storages = @Storage("editor.codeinsight.xml")
)
public class CodeFoldingSettingsImpl extends CodeFoldingSettings implements PersistentStateComponent<CodeFoldingSettings> {
@Override
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2014 JetBrains s.r.o.
* Copyright 2000-2016 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.
@@ -16,7 +16,10 @@
package com.intellij.ide.todo;
import com.intellij.openapi.Disposable;
import com.intellij.openapi.components.*;
import com.intellij.openapi.components.PersistentStateComponent;
import com.intellij.openapi.components.ServiceManager;
import com.intellij.openapi.components.State;
import com.intellij.openapi.components.Storage;
import com.intellij.openapi.editor.colors.EditorColorsListener;
import com.intellij.openapi.editor.colors.EditorColorsManager;
import com.intellij.openapi.editor.colors.EditorColorsScheme;
@@ -37,8 +40,8 @@ import java.util.List;
@State(
name = "TodoConfiguration",
storages = {
@Storage(file = StoragePathMacros.APP_CONFIG + "/editor.xml"),
@Storage(file = StoragePathMacros.APP_CONFIG + "/other.xml", deprecated = true)
@Storage("editor.xml"),
@Storage(value = "other.xml", deprecated = true)
}
)
public class TodoConfiguration implements PersistentStateComponent<Element>, Disposable {
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2015 JetBrains s.r.o.
* Copyright 2000-2016 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.
@@ -29,7 +29,7 @@ import java.util.List;
@State(
name = "DefaultColorSchemesManager",
defaultStateAsResource = true,
storages = @Storage(file = "other.xml", roamingType = RoamingType.DISABLED)
storages = @Storage(value = "other.xml", roamingType = RoamingType.DISABLED)
)
public class DefaultColorSchemesManager implements PersistentStateComponent<Element> {
private final List<DefaultColorsScheme> mySchemes;
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2014 JetBrains s.r.o.
* Copyright 2000-2016 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.
@@ -59,7 +59,7 @@ import static com.intellij.openapi.externalSystem.model.ProjectKeys.*;
* @author Vladislav.Soroka
* @since 9/18/2014
*/
@State(name = "ExternalProjectsData", storages = {@Storage(file = StoragePathMacros.WORKSPACE_FILE)})
@State(name = "ExternalProjectsData", storages = {@Storage(StoragePathMacros.WORKSPACE_FILE)})
public class ExternalProjectsDataStorage implements SettingsSavingComponent, PersistentStateComponent<ExternalProjectsDataStorage.State> {
private static final Logger LOG = Logger.getInstance(ExternalProjectsDataStorage.class);
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2014 JetBrains s.r.o.
* Copyright 2000-2016 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.
@@ -25,14 +25,12 @@ import com.intellij.openapi.externalSystem.model.ExternalProjectInfo;
import com.intellij.openapi.externalSystem.model.ProjectSystemId;
import com.intellij.openapi.externalSystem.model.project.ProjectData;
import com.intellij.openapi.externalSystem.model.task.TaskData;
import com.intellij.openapi.externalSystem.util.DisposeAwareProjectChange;
import com.intellij.openapi.externalSystem.util.ExternalSystemApiUtil;
import com.intellij.openapi.externalSystem.util.ExternalSystemUtil;
import com.intellij.openapi.externalSystem.view.ExternalProjectsView;
import com.intellij.openapi.externalSystem.view.ExternalProjectsViewImpl;
import com.intellij.openapi.externalSystem.view.ExternalProjectsViewState;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.roots.ex.ProjectRootManagerEx;
import com.intellij.openapi.util.Disposer;
import com.intellij.util.Function;
import com.intellij.util.SmartList;
@@ -53,7 +51,7 @@ import static com.intellij.openapi.externalSystem.model.ProjectKeys.TASK;
* @author Vladislav.Soroka
* @since 10/23/2014
*/
@State(name = "ExternalProjectsManager", storages = {@Storage(file = StoragePathMacros.WORKSPACE_FILE)})
@State(name = "ExternalProjectsManager", storages = {@Storage(StoragePathMacros.WORKSPACE_FILE)})
public class ExternalProjectsManager implements PersistentStateComponent<ExternalProjectsState>, Disposable {
private static final Logger LOG = Logger.getInstance(ExternalProjectsManager.class);
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2012 JetBrains s.r.o.
* Copyright 2000-2016 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.
@@ -42,10 +42,7 @@ import java.util.regex.Pattern;
* User: anna
* Date: 06-Feb-2006
*/
@State(
name = "LogFilters",
storages = {@Storage(
file = StoragePathMacros.WORKSPACE_FILE)})
@State(name = "LogFilters", storages = @Storage(StoragePathMacros.WORKSPACE_FILE))
@SuppressWarnings({"AssignmentToStaticFieldFromInstanceMethod"})
public class LogConsolePreferences extends LogFilterRegistrar {
private final SortedMap<LogFilter, Boolean> myRegisteredLogFilters = new TreeMap<LogFilter, Boolean>(new Comparator<LogFilter>() {
@@ -16,7 +16,10 @@
package com.intellij.execution;
import com.intellij.execution.actions.RunConfigurationProducer;
import com.intellij.openapi.components.*;
import com.intellij.openapi.components.PersistentStateComponent;
import com.intellij.openapi.components.ServiceManager;
import com.intellij.openapi.components.State;
import com.intellij.openapi.components.Storage;
import com.intellij.openapi.project.Project;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
@@ -28,13 +31,7 @@ import java.util.Set;
* Project component that keeps track of {@link RunConfigurationProducer} implementations that should be ignored for a given project. All
* subclasses of classes specified here will be ignored when looking for configuration producers.
*/
@State(
name = "RunConfigurationProducerService",
storages = {
@Storage(id = "default", file = StoragePathMacros.PROJECT_FILE),
@Storage(id = "dir", file = StoragePathMacros.PROJECT_CONFIG_DIR + "/runConfigurations.xml", scheme = StorageScheme.DIRECTORY_BASED)
}
)
@State(name = "RunConfigurationProducerService", storages = @Storage("runConfigurations.xml"))
public class RunConfigurationProducerService implements PersistentStateComponent<RunConfigurationProducerService.State> {
private State myState = new State();
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2012 JetBrains s.r.o.
* Copyright 2000-2016 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.
@@ -21,8 +21,8 @@ import com.intellij.openapi.components.Storage;
@State(
name = "CodeStyleSettingsManager",
storages = {
@Storage(file = "code.style.schemes"),
@Storage(file = "other.xml", deprecated = true)
@Storage("code.style.schemes"),
@Storage(value = "other.xml", deprecated = true)
}
)
public class AppCodeStyleSettingsManager extends CodeStyleSettingsManager {
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2012 JetBrains s.r.o.
* Copyright 2000-2016 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.
@@ -15,7 +15,9 @@
*/
package com.intellij.psi.codeStyle;
import com.intellij.openapi.components.*;
import com.intellij.openapi.components.PersistentStateComponent;
import com.intellij.openapi.components.State;
import com.intellij.openapi.components.Storage;
import org.jdom.Element;
/**
@@ -23,13 +25,7 @@ import org.jdom.Element;
* changes.
* @author Rustam Vishnyakov
*/
@State(
name = "CodeStyleSettingsManager",
storages = {
@Storage(file = StoragePathMacros.PROJECT_FILE),
@Storage(file = StoragePathMacros.PROJECT_CONFIG_DIR + "/projectCodeStyle.xml", scheme = StorageScheme.DIRECTORY_BASED)
}
)
@State(name = "CodeStyleSettingsManager", storages = @Storage("projectCodeStyle.xml"))
public class LegacyCodeStyleSettingsManager implements PersistentStateComponent<Element> {
private Element myState;
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2012 JetBrains s.r.o.
* Copyright 2000-2016 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.
@@ -18,16 +18,8 @@ package com.intellij.psi.codeStyle;
import com.intellij.openapi.components.State;
import com.intellij.openapi.components.Storage;
import com.intellij.openapi.components.StoragePathMacros;
import com.intellij.openapi.components.StorageScheme;
@State(
name = "ProjectCodeStyleSettingsManager",
storages = {
@Storage(file = StoragePathMacros.PROJECT_FILE),
@Storage(file = StoragePathMacros.PROJECT_CONFIG_DIR + "/codeStyleSettings.xml", scheme = StorageScheme.DIRECTORY_BASED)
}
)
@State(name = "ProjectCodeStyleSettingsManager", storages = @Storage("codeStyleSettings.xml"))
public class ProjectCodeStyleSettingsManager extends CodeStyleSettingsManager{
}
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2015 JetBrains s.r.o.
* Copyright 2000-2016 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.
@@ -25,7 +25,7 @@ import com.intellij.util.ui.UIUtil;
import org.jdom.Element;
import org.jetbrains.annotations.Nullable;
@State(name = "FindViewColorsScheme", defaultStateAsResource = true, storages = {})
@State(name = "FindViewColorsScheme", defaultStateAsResource = true)
public class UsageTreeColorsScheme implements PersistentStateComponent<Element> {
private EditorColorsScheme myColorsScheme;
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2015 JetBrains s.r.o.
* Copyright 2000-2016 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.
@@ -32,13 +32,7 @@ import org.jetbrains.annotations.NotNull;
* User: anna
* Date: 28-Feb-2006
*/
@State(
name = "AnalysisUIOptions",
storages = {
@Storage(
file = StoragePathMacros.WORKSPACE_FILE
)}
)
@State(name = "AnalysisUIOptions", storages = @Storage(StoragePathMacros.WORKSPACE_FILE))
public class AnalysisUIOptions implements PersistentStateComponent<AnalysisUIOptions> {
public static AnalysisUIOptions getInstance(Project project) {
return ServiceManager.getService(project, AnalysisUIOptions.class);
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2013 JetBrains s.r.o.
* Copyright 2000-2016 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.
@@ -31,7 +31,7 @@ import java.net.URL;
*/
@State(
name = "CodeStyleSchemesUIConfiguration",
storages = {@Storage(file = "other.xml", roamingType = RoamingType.DISABLED)}
storages = {@Storage(value = "other.xml", roamingType = RoamingType.DISABLED)}
)
public class CodeStyleSchemesUIConfiguration implements PersistentStateComponent<CodeStyleSchemesUIConfiguration> {
public String RECENT_IMPORT_FILE_LOCATION = "";
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2012 JetBrains s.r.o.
* Copyright 2000-2016 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.
@@ -21,13 +21,7 @@ import com.intellij.openapi.project.Project;
import com.intellij.util.xmlb.XmlSerializerUtil;
import org.jetbrains.annotations.NonNls;
@State(
name = "ExportToHTMLSettings",
storages = {
@Storage(
file = StoragePathMacros.WORKSPACE_FILE
)}
)
@State(name = "ExportToHTMLSettings", storages = @Storage(StoragePathMacros.WORKSPACE_FILE))
public class ExportToHTMLSettings implements PersistentStateComponent<ExportToHTMLSettings> {
public boolean PRINT_LINE_NUMBERS;
public boolean OPEN_IN_BROWSER;
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2012 JetBrains s.r.o.
* Copyright 2000-2016 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.
@@ -15,15 +15,15 @@
*/
package com.intellij.codeEditor.printing;
import com.intellij.openapi.components.*;
import com.intellij.openapi.components.PersistentStateComponent;
import com.intellij.openapi.components.ServiceManager;
import com.intellij.openapi.components.State;
import com.intellij.openapi.components.Storage;
import com.intellij.openapi.editor.colors.EditorColorsManager;
import com.intellij.util.xmlb.XmlSerializerUtil;
import org.jetbrains.annotations.NonNls;
@State(
name = "PrintSettings",
storages = {@Storage(file = StoragePathMacros.APP_CONFIG + "/print.xml")}
)
@State(name = "PrintSettings", storages = @Storage("print.xml"))
public class PrintSettings implements PersistentStateComponent<PrintSettings> {
@NonNls public String PAPER_SIZE = "A4";
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2014 JetBrains s.r.o.
* Copyright 2000-2016 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.
@@ -16,7 +16,10 @@
package com.intellij.codeInsight;
import com.intellij.codeInsight.editorActions.SmartBackspaceMode;
import com.intellij.openapi.components.*;
import com.intellij.openapi.components.PersistentStateComponent;
import com.intellij.openapi.components.ServiceManager;
import com.intellij.openapi.components.State;
import com.intellij.openapi.components.Storage;
import com.intellij.openapi.diagnostic.Logger;
import com.intellij.util.ArrayUtil;
import com.intellij.util.xmlb.SkipDefaultValuesSerializationFilters;
@@ -33,7 +36,7 @@ import org.jetbrains.annotations.Nullable;
@State(
name = "CodeInsightSettings",
storages = @Storage(file = StoragePathMacros.APP_CONFIG + "/editor.codeinsight.xml")
storages = @Storage("editor.codeinsight.xml")
)
public class CodeInsightSettings implements PersistentStateComponent<Element>, Cloneable {
private static final Logger LOG = Logger.getInstance("#com.intellij.codeInsight.CodeInsightSettings");
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2015 JetBrains s.r.o.
* Copyright 2000-2016 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.
@@ -20,7 +20,6 @@ import com.intellij.codeInspection.ex.InspectionProfileManagerImpl;
import com.intellij.openapi.components.PersistentStateComponent;
import com.intellij.openapi.components.State;
import com.intellij.openapi.components.Storage;
import com.intellij.openapi.components.StoragePathMacros;
import com.intellij.openapi.util.JDOMUtil;
import com.intellij.openapi.util.text.StringUtil;
import com.intellij.util.xmlb.SkipDefaultsSerializationFilter;
@@ -29,7 +28,7 @@ import org.jdom.Element;
@State(
name = "DaemonCodeAnalyzerSettings",
storages = @Storage(file = StoragePathMacros.APP_CONFIG + "/editor.codeinsight.xml")
storages = @Storage("editor.codeinsight.xml")
)
public class DaemonCodeAnalyzerSettingsImpl extends DaemonCodeAnalyzerSettings implements PersistentStateComponent<Element>, Cloneable {
@Override
@@ -90,7 +90,7 @@ import java.util.concurrent.TimeoutException;
*/
@State(
name = "DaemonCodeAnalyzer",
storages = @Storage(file = StoragePathMacros.WORKSPACE_FILE)
storages = @Storage(StoragePathMacros.WORKSPACE_FILE)
)
public class DaemonCodeAnalyzerImpl extends DaemonCodeAnalyzerEx implements PersistentStateComponent<Element>, Disposable {
private static final Logger LOG = Logger.getInstance("#com.intellij.codeInsight.daemon.impl.DaemonCodeAnalyzerImpl");
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2015 JetBrains s.r.o.
* Copyright 2000-2016 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.
@@ -17,7 +17,9 @@ package com.intellij.codeInsight.daemon.impl;
import com.intellij.codeInsight.daemon.GutterIconDescriptor;
import com.intellij.codeInsight.daemon.LineMarkerSettings;
import com.intellij.openapi.components.*;
import com.intellij.openapi.components.PersistentStateComponent;
import com.intellij.openapi.components.State;
import com.intellij.openapi.components.Storage;
import com.intellij.util.xmlb.annotations.MapAnnotation;
import org.jetbrains.annotations.Nullable;
@@ -29,7 +31,7 @@ import java.util.Map;
*/
@State(
name = "LineMarkerSettings",
storages = @Storage(file = StoragePathMacros.APP_CONFIG + "/gutter.xml")
storages = @Storage("gutter.xml")
)
public class LineMarkerSettingsImpl extends LineMarkerSettings implements PersistentStateComponent<LineMarkerSettingsImpl> {
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2012 JetBrains s.r.o.
* Copyright 2000-2016 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.
@@ -38,7 +38,7 @@ import org.jetbrains.annotations.NotNull;
import java.util.*;
@State(name="HighlightingSettingsPerFile", storages = @Storage(file = StoragePathMacros.WORKSPACE_FILE))
@State(name="HighlightingSettingsPerFile", storages = @Storage(StoragePathMacros.WORKSPACE_FILE))
public class HighlightingSettingsPerFile extends HighlightingLevelManager implements PersistentStateComponent<Element> {
@NonNls private static final String SETTING_TAG = "setting";
@NonNls private static final String ROOT_ATT_PREFIX = "root";
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2012 JetBrains s.r.o.
* Copyright 2000-2016 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.
@@ -29,7 +29,10 @@ import com.intellij.codeInsight.intention.IntentionManager;
import com.intellij.ide.ui.search.SearchableOptionsRegistrar;
import com.intellij.openapi.application.Application;
import com.intellij.openapi.application.ApplicationManager;
import com.intellij.openapi.components.*;
import com.intellij.openapi.components.PersistentStateComponent;
import com.intellij.openapi.components.ServiceManager;
import com.intellij.openapi.components.State;
import com.intellij.openapi.components.Storage;
import com.intellij.openapi.diagnostic.Logger;
import com.intellij.openapi.util.Pair;
import com.intellij.openapi.util.text.StringUtil;
@@ -44,13 +47,7 @@ import java.io.IOException;
import java.util.*;
import java.util.regex.Pattern;
@State(
name = "IntentionManagerSettings",
storages = {
@Storage(
file = StoragePathMacros.APP_CONFIG + "/intentionSettings.xml"
)}
)
@State(name = "IntentionManagerSettings", storages = @Storage("intentionSettings.xml"))
public class IntentionManagerSettings implements PersistentStateComponent<Element> {
private static final Logger LOG = Logger.getInstance("#com.intellij.codeInsight.intention.impl.config.IntentionManagerSettings");
private static final Alarm ourRegisterMetaDataAlarm = new Alarm(Alarm.ThreadToUse.SHARED_THREAD);
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2014 JetBrains s.r.o.
* Copyright 2000-2016 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.
@@ -15,7 +15,10 @@
*/
package com.intellij.codeInsight.template.impl;
import com.intellij.openapi.components.*;
import com.intellij.openapi.components.PersistentStateComponent;
import com.intellij.openapi.components.RoamingType;
import com.intellij.openapi.components.State;
import com.intellij.openapi.components.Storage;
import com.intellij.util.SmartList;
import org.jetbrains.annotations.Nullable;
@@ -26,7 +29,7 @@ import java.util.List;
@Deprecated
@State(
name = "ExportableTemplateSettings",
storages = @Storage(file = StoragePathMacros.APP_CONFIG + "/template.settings.xml", roamingType = RoamingType.DISABLED)
storages = @Storage(value = "template.settings.xml", roamingType = RoamingType.DISABLED)
)
final class ExportableTemplateSettings implements PersistentStateComponent<ExportableTemplateSettings> {
public Collection<TemplateSettings.TemplateKey> deletedKeys = new SmartList<TemplateSettings.TemplateKey>();
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2015 JetBrains s.r.o.
* Copyright 2000-2016 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.
@@ -18,7 +18,10 @@ package com.intellij.codeInsight.template.impl;
import com.intellij.AbstractBundle;
import com.intellij.codeInsight.template.Template;
import com.intellij.openapi.application.ex.DecodeDefaultsUtil;
import com.intellij.openapi.components.*;
import com.intellij.openapi.components.PersistentStateComponent;
import com.intellij.openapi.components.ServiceManager;
import com.intellij.openapi.components.State;
import com.intellij.openapi.components.Storage;
import com.intellij.openapi.diagnostic.Logger;
import com.intellij.openapi.options.SchemeProcessor;
import com.intellij.openapi.options.SchemesManager;
@@ -44,8 +47,8 @@ import java.util.*;
@State(
name = "TemplateSettings",
storages = {
@Storage(file = StoragePathMacros.APP_CONFIG + "/templates.xml"),
@Storage(file = StoragePathMacros.APP_CONFIG + "/other.xml", deprecated = true)
@Storage("templates.xml"),
@Storage(value = "other.xml", deprecated = true)
},
additionalExportFile = TemplateSettings.TEMPLATES_DIR_PATH
)
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2014 JetBrains s.r.o.
* Copyright 2000-2016 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.
@@ -34,12 +34,7 @@ import java.io.File;
import java.util.Map;
import java.util.Set;
@State(
name = "PostfixTemplatesSettings",
storages = {
@Storage(file = StoragePathMacros.APP_CONFIG + "/postfixTemplates.xml")
}
)
@State(name = "PostfixTemplatesSettings", storages = @Storage("postfixTemplates.xml"))
public class PostfixTemplatesSettings implements PersistentStateComponent<Element>, ExportableComponent {
public static final Factory<Set<String>> SET_FACTORY = new Factory<Set<String>>() {
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2014 JetBrains s.r.o.
* Copyright 2000-2016 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.
@@ -20,7 +20,7 @@ import com.intellij.openapi.components.*;
@State(
name = "AppInspectionProfilesVisibleTreeState",
storages = @Storage(file = StoragePathMacros.APP_CONFIG + "/other.xml", roamingType = RoamingType.DISABLED)
storages = @Storage(value = "other.xml", roamingType = RoamingType.DISABLED)
)
public class AppInspectionProfilesVisibleTreeState implements PersistentStateComponent<VisibleTreeStateComponent> {
private final VisibleTreeStateComponent myComponent = new VisibleTreeStateComponent();
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2015 JetBrains s.r.o.
* Copyright 2000-2016 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.
@@ -26,7 +26,10 @@ import com.intellij.codeInspection.InspectionsBundle;
import com.intellij.lang.annotation.HighlightSeverity;
import com.intellij.openapi.application.ApplicationManager;
import com.intellij.openapi.application.ModalityState;
import com.intellij.openapi.components.*;
import com.intellij.openapi.components.PersistentStateComponent;
import com.intellij.openapi.components.ServiceManager;
import com.intellij.openapi.components.State;
import com.intellij.openapi.components.Storage;
import com.intellij.openapi.diagnostic.Logger;
import com.intellij.openapi.editor.colors.TextAttributesKey;
import com.intellij.openapi.extensions.Extensions;
@@ -61,8 +64,8 @@ import java.util.concurrent.atomic.AtomicBoolean;
@State(
name = "InspectionProfileManager",
storages = {
@Storage(file = StoragePathMacros.APP_CONFIG + "/editor.xml"),
@Storage(file = StoragePathMacros.APP_CONFIG + "/other.xml", deprecated = true)
@Storage("editor.xml"),
@Storage(value = "other.xml", deprecated = true)
},
additionalExportFile = InspectionProfileManager.INSPECTION_DIR
)
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2012 JetBrains s.r.o.
* Copyright 2000-2016 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.
@@ -18,16 +18,9 @@ package com.intellij.codeInspection.ex;
import com.intellij.codeInspection.InspectionProfile;
import com.intellij.openapi.components.*;
import com.intellij.openapi.components.StoragePathMacros;
import com.intellij.openapi.project.Project;
@State(
name = "ProjectInspectionProfilesVisibleTreeState",
storages = {
@Storage(
file = StoragePathMacros.WORKSPACE_FILE
)}
)
@State(name = "ProjectInspectionProfilesVisibleTreeState", storages = @Storage(StoragePathMacros.WORKSPACE_FILE))
public class ProjectInspectionProfilesVisibleTreeState implements PersistentStateComponent<VisibleTreeStateComponent> {
private final VisibleTreeStateComponent myComponent = new VisibleTreeStateComponent();
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2014 JetBrains s.r.o.
* Copyright 2000-2016 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.
@@ -31,7 +31,7 @@ import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
@State(name = "ExecutionTargetManager", storages = {@Storage(file = StoragePathMacros.WORKSPACE_FILE)})
@State(name = "ExecutionTargetManager", storages = {@Storage(StoragePathMacros.WORKSPACE_FILE)})
public class ExecutionTargetManagerImpl extends ExecutionTargetManager implements PersistentStateComponent<Element> {
@NotNull private final Project myProject;
@NotNull private final Object myActiveTargetLock = new Object();
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2012 JetBrains s.r.o.
* Copyright 2000-2016 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.
@@ -17,7 +17,10 @@ package com.intellij.execution.console;
import com.google.common.base.Predicate;
import com.google.common.collect.Collections2;
import com.intellij.openapi.components.*;
import com.intellij.openapi.components.PersistentStateComponent;
import com.intellij.openapi.components.ServiceManager;
import com.intellij.openapi.components.State;
import com.intellij.openapi.components.Storage;
import com.intellij.openapi.util.text.StringUtil;
import com.intellij.util.containers.ContainerUtil;
import org.jetbrains.annotations.Nullable;
@@ -27,7 +30,7 @@ import java.util.*;
/**
* @author peter
*/
@State(name="ConsoleFoldingSettings", storages=@Storage(file = StoragePathMacros.APP_CONFIG + "/consoleFolding.xml"))
@State(name="ConsoleFoldingSettings", storages=@Storage("consoleFolding.xml"))
public class ConsoleFoldingSettings implements PersistentStateComponent<ConsoleFoldingSettings.MyBean> {
private final List<String> myPositivePatterns = new ArrayList<String>();
private final List<String> myNegativePatterns = new ArrayList<String>();
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2015 JetBrains s.r.o.
* Copyright 2000-2016 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.
@@ -44,10 +44,7 @@ import java.util.Collection;
import java.util.List;
import java.util.Set;
@State(
name = ModuleRunConfigurationManager.COMPONENT_NAME,
storages = @Storage(file = StoragePathMacros.MODULE_FILE)
)
@State(name = ModuleRunConfigurationManager.COMPONENT_NAME, storages = @Storage(StoragePathMacros.MODULE_FILE))
public final class ModuleRunConfigurationManager extends ModuleAdapter implements ModuleComponent, PersistentStateComponent<Element> {
private static final Logger LOG = Logger.getInstance(ModuleRunConfigurationManager.class);
@NonNls static final String COMPONENT_NAME = "ModuleRunConfigurationManager";
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2015 JetBrains s.r.o.
* Copyright 2000-2016 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.
@@ -18,7 +18,10 @@ package com.intellij.execution.impl;
import com.intellij.execution.RunnerAndConfigurationSettings;
import com.intellij.execution.configurations.RunConfiguration;
import com.intellij.execution.configurations.UnknownRunConfiguration;
import com.intellij.openapi.components.*;
import com.intellij.openapi.components.PersistentStateComponent;
import com.intellij.openapi.components.State;
import com.intellij.openapi.components.StateSplitterEx;
import com.intellij.openapi.components.Storage;
import com.intellij.openapi.util.Pair;
import com.intellij.util.SmartList;
import com.intellij.util.containers.ContainerUtil;
@@ -30,18 +33,7 @@ import java.util.Iterator;
import java.util.List;
import java.util.Set;
/**
* User: anna
* Date: 28-Mar-2006
*/
@State(
name = "ProjectRunConfigurationManager",
storages = {
@Storage(file = StoragePathMacros.PROJECT_FILE),
@Storage(file = StoragePathMacros.PROJECT_CONFIG_DIR + "/runConfigurations", scheme = StorageScheme.DIRECTORY_BASED,
stateSplitter = ProjectRunConfigurationManager.RunConfigurationStateSplitter.class)
}
)
@State(name = "ProjectRunConfigurationManager", storages = @Storage(value = "runConfigurations", stateSplitter = ProjectRunConfigurationManager.RunConfigurationStateSplitter.class))
public class ProjectRunConfigurationManager implements PersistentStateComponent<Element> {
private final RunManagerImpl myManager;
private List<Element> myUnloadedElements;
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2015 JetBrains s.r.o.
* Copyright 2000-2016 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.
@@ -54,7 +54,7 @@ import java.util.*;
@State(
name = "RunManager",
defaultStateAsResource = true,
storages = @Storage(file = StoragePathMacros.WORKSPACE_FILE)
storages = @Storage(StoragePathMacros.WORKSPACE_FILE)
)
public class RunManagerImpl extends RunManagerEx implements PersistentStateComponent<Element>, NamedComponent, Disposable {
private static final Logger LOG = Logger.getInstance(RunManagerImpl.class);
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2015 JetBrains s.r.o.
* Copyright 2000-2016 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.
@@ -25,7 +25,7 @@ import com.intellij.openapi.components.StoragePathMacros;
@State(
name = "ProjectStartupLocalConfiguration",
storages = {
@Storage(file = StoragePathMacros.WORKSPACE_FILE)
@Storage(StoragePathMacros.WORKSPACE_FILE)
}
)
public class ProjectStartupLocalConfiguration extends ProjectStartupConfigurationBase {
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2015 JetBrains s.r.o.
* Copyright 2000-2016 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.
@@ -17,18 +17,10 @@ package com.intellij.execution.startup;
import com.intellij.openapi.components.State;
import com.intellij.openapi.components.Storage;
import com.intellij.openapi.components.StoragePathMacros;
import com.intellij.openapi.components.StorageScheme;
/**
* @author Irina.Chernushina on 8/19/2015.
*/
@State(
name = "ProjectStartupSharedConfiguration",
storages = {
@Storage(file = StoragePathMacros.PROJECT_FILE),
@Storage(file = StoragePathMacros.PROJECT_CONFIG_DIR + "/startup.xml", scheme = StorageScheme.DIRECTORY_BASED)
}
)
@State(name = "ProjectStartupSharedConfiguration", storages = @Storage("startup.xml"))
public class ProjectStartupSharedConfiguration extends ProjectStartupConfigurationBase {
}
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2012 JetBrains s.r.o.
* Copyright 2000-2016 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.
@@ -26,7 +26,7 @@ import java.util.Map;
@State(
name = "RunnerLayoutSettings",
storages = @Storage(file = StoragePathMacros.APP_CONFIG + "/runner.layout.xml", roamingType = RoamingType.DISABLED)
storages = @Storage(value = "runner.layout.xml", roamingType = RoamingType.DISABLED)
)
public class RunnerLayoutSettings implements PersistentStateComponent<Element> {
public static RunnerLayoutSettings getInstance() {
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2009 JetBrains s.r.o.
* Copyright 2000-2016 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.
@@ -53,7 +53,7 @@ import java.util.*;
*/
@State(
name = FacetManagerImpl.COMPONENT_NAME,
storages = @Storage(file = StoragePathMacros.MODULE_FILE)
storages = @Storage(StoragePathMacros.MODULE_FILE)
)
public class FacetManagerImpl extends FacetManager implements ModuleComponent, PersistentStateComponent<FacetManagerState> {
private static final Logger LOG = Logger.getInstance("#com.intellij.facet.FacetManagerImpl");
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2014 JetBrains s.r.o.
* Copyright 2000-2016 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.
@@ -19,8 +19,6 @@ package com.intellij.facet.impl;
import com.intellij.facet.*;
import com.intellij.openapi.components.PersistentStateComponent;
import com.intellij.openapi.components.State;
import com.intellij.openapi.components.Storage;
import com.intellij.openapi.components.StoragePathMacros;
import com.intellij.openapi.diagnostic.Logger;
import com.intellij.openapi.module.Module;
import com.intellij.openapi.module.ModuleManager;
@@ -47,14 +45,7 @@ import java.util.concurrent.ConcurrentMap;
/**
* @author nik
*/
@State(
name = ProjectFacetManagerImpl.COMPONENT_NAME,
storages = {
@Storage(
file= StoragePathMacros.PROJECT_FILE
)
}
)
@State(name = ProjectFacetManagerImpl.COMPONENT_NAME)
public class ProjectFacetManagerImpl extends ProjectFacetManagerEx implements PersistentStateComponent<ProjectFacetManagerImpl.ProjectFacetManagerState> {
@NonNls public static final String COMPONENT_NAME = "ProjectFacetManager";
private static final Logger LOG = Logger.getInstance("#com.intellij.facet.impl.ProjectFacetManagerImpl");
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2012 JetBrains s.r.o.
* Copyright 2000-2016 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.
@@ -33,14 +33,7 @@ import java.util.Set;
/**
* @author nik
*/
@State(
name = InvalidFacetManagerImpl.COMPONENT_NAME,
storages = {
@Storage(
file = StoragePathMacros.WORKSPACE_FILE
)
}
)
@State(name = InvalidFacetManagerImpl.COMPONENT_NAME, storages = @Storage(StoragePathMacros.WORKSPACE_FILE))
public class InvalidFacetManagerImpl extends InvalidFacetManager implements PersistentStateComponent<InvalidFacetManagerImpl.InvalidFacetManagerState> {
public static final String COMPONENT_NAME = "InvalidFacetManager";
private InvalidFacetManagerState myState = new InvalidFacetManagerState();
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2014 JetBrains s.r.o.
* Copyright 2000-2016 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.
@@ -36,8 +36,8 @@ import java.util.List;
@State(
name = "FindSettings",
storages = {
@Storage(file = StoragePathMacros.APP_CONFIG + "/find.xml"),
@Storage(file = StoragePathMacros.APP_CONFIG + "/other.xml", deprecated = true)
@Storage("find.xml"),
@Storage(value = "other.xml", deprecated = true)
}
)
public class FindSettingsImpl extends FindSettings implements PersistentStateComponent<FindSettingsImpl> {
@@ -423,7 +423,7 @@ public class FindSettingsImpl extends FindSettings implements PersistentStateCom
@State(
name = "FindRecents",
storages = {@Storage(file = StoragePathMacros.APP_CONFIG + "/find.recents.xml", roamingType = RoamingType.DISABLED)}
storages = {@Storage(value = "find.recents.xml", roamingType = RoamingType.DISABLED)}
)
static final class FindRecents implements PersistentStateComponent<FindRecents> {
public static FindRecents getInstance() {
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2012 JetBrains s.r.o.
* Copyright 2000-2016 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.
@@ -21,8 +21,6 @@ import com.intellij.framework.detection.impl.exclude.old.OldFacetDetectionExclud
import com.intellij.openapi.Disposable;
import com.intellij.openapi.components.PersistentStateComponent;
import com.intellij.openapi.components.State;
import com.intellij.openapi.components.Storage;
import com.intellij.openapi.components.StoragePathMacros;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.util.text.StringUtil;
import com.intellij.openapi.vfs.VfsUtil;
@@ -39,15 +37,7 @@ import java.util.*;
/**
* @author nik
*/
@State(
name = "FrameworkDetectionExcludesConfiguration",
storages = {
@Storage(
id="other",
file = StoragePathMacros.PROJECT_FILE
)
}
)
@State(name = "FrameworkDetectionExcludesConfiguration")
public class DetectionExcludesConfigurationImpl extends DetectionExcludesConfiguration
implements PersistentStateComponent<ExcludesConfigurationState>, Disposable {
private Map<String, VirtualFilePointerContainer> myExcludedFiles;
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2012 JetBrains s.r.o.
* Copyright 2000-2016 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.
@@ -17,7 +17,9 @@ package com.intellij.framework.detection.impl.exclude.old;
import com.intellij.framework.detection.impl.exclude.ExcludedFileState;
import com.intellij.framework.detection.impl.exclude.ExcludesConfigurationState;
import com.intellij.openapi.components.*;
import com.intellij.openapi.components.PersistentStateComponent;
import com.intellij.openapi.components.ServiceManager;
import com.intellij.openapi.components.State;
import com.intellij.openapi.module.Module;
import com.intellij.openapi.module.ModuleManager;
import com.intellij.openapi.project.Project;
@@ -33,14 +35,7 @@ import java.util.Set;
/**
* @author nik
*/
@State(
name = "FacetAutodetectingManager",
storages = {
@Storage(
file = StoragePathMacros.PROJECT_FILE
)
}
)
@State(name = "FacetAutodetectingManager")
public class OldFacetDetectionExcludesConfiguration implements PersistentStateComponent<DisabledAutodetectionInfo> {
@NonNls public static final String COMPONENT_NAME = "FacetAutodetectingManager";
private DisabledAutodetectionInfo myDisabledAutodetectionInfo;
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2012 JetBrains s.r.o.
* Copyright 2000-2016 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.
@@ -18,7 +18,6 @@ package com.intellij.ide;
import com.intellij.openapi.components.RoamingType;
import com.intellij.openapi.components.State;
import com.intellij.openapi.components.Storage;
import com.intellij.openapi.components.StoragePathMacros;
import com.intellij.openapi.project.Project;
import com.intellij.platform.ModuleAttachProcessor;
import com.intellij.util.messages.MessageBus;
@@ -30,8 +29,8 @@ import org.jetbrains.annotations.NotNull;
@State(
name = "RecentDirectoryProjectsManager",
storages = {
@Storage(file = StoragePathMacros.APP_CONFIG + "/recentProjectDirectories.xml", roamingType = RoamingType.DISABLED),
@Storage(file = StoragePathMacros.APP_CONFIG + "/other.xml", deprecated = true)
@Storage(value = "recentProjectDirectories.xml", roamingType = RoamingType.DISABLED),
@Storage(value = "other.xml", deprecated = true)
}
)
public class RecentDirectoryProjectsManagerEx extends RecentDirectoryProjectsManager {
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2015 JetBrains s.r.o.
* Copyright 2000-2016 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.
@@ -58,7 +58,7 @@ import java.util.List;
@State(
name = "BookmarkManager",
storages = {
@Storage(file = StoragePathMacros.WORKSPACE_FILE)
@Storage(StoragePathMacros.WORKSPACE_FILE)
}
)
public class BookmarkManager extends AbstractProjectComponent implements PersistentStateComponent<Element> {
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2015 JetBrains s.r.o.
* Copyright 2000-2016 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.
@@ -33,7 +33,7 @@ import org.jetbrains.annotations.Nullable;
import java.io.Serializable;
import java.util.Map;
@State(name = "ExtensionsRootType", storages = @Storage(file = StoragePathMacros.APP_CONFIG + "/extensionsRootType.xml", roamingType = RoamingType.DISABLED))
@State(name = "ExtensionsRootType", storages = @Storage(value = "extensionsRootType.xml", roamingType = RoamingType.DISABLED))
class ResourceVersions implements PersistentStateComponent<ResourceVersions.State> {
@NotNull
@@ -15,7 +15,10 @@
*/
package com.intellij.ide.fileTemplates.impl;
import com.intellij.openapi.components.*;
import com.intellij.openapi.components.PersistentStateComponent;
import com.intellij.openapi.components.ServiceManager;
import com.intellij.openapi.components.State;
import com.intellij.openapi.components.Storage;
import com.intellij.openapi.project.Project;
import org.jdom.Element;
import org.jetbrains.annotations.Nullable;
@@ -30,10 +33,7 @@ import java.util.Locale;
*/
@State(
name = "ExportableFileTemplateSettings",
storages = {
@Storage(file = StoragePathMacros.PROJECT_FILE),
@Storage(file = StoragePathMacros.PROJECT_CONFIG_DIR + "/" + ExportableFileTemplateSettings.EXPORTABLE_SETTINGS_FILE, scheme = StorageScheme.DIRECTORY_BASED),
},
storages = @Storage(ExportableFileTemplateSettings.EXPORTABLE_SETTINGS_FILE),
additionalExportFile = FileTemplatesLoader.TEMPLATES_DIR
)
public class ExportableFileTemplateSettings implements PersistentStateComponent<Element> {

Some files were not shown because too many files have changed in this diff Show More