IDEA-85546 Introduce constants for the persistent components macros

This commit is contained in:
Denis.Zhdanov
2012-05-04 07:48:48 +04:00
parent b14273feb7
commit 41e9695134
189 changed files with 827 additions and 798 deletions
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2009 JetBrains s.r.o.
* Copyright 2000-2012 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,10 +19,7 @@ import com.intellij.codeInsight.folding.CodeFoldingSettings;
import com.intellij.codeInsight.folding.JavaCodeFoldingSettings;
import com.intellij.ide.IdeBundle;
import com.intellij.openapi.application.PathManager;
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.openapi.components.*;
import com.intellij.util.xmlb.XmlSerializerUtil;
import org.jetbrains.annotations.NotNull;
@@ -32,7 +29,7 @@ import java.io.File;
name="JavaCodeFoldingSettings",
storages= {
@Storage(
file = "$APP_CONFIG$/editor.codeinsight.xml"
file = StoragePathMacros.APP_CONFIG + "/editor.codeinsight.xml"
)}
)
public class JavaCodeFoldingSettingsImpl extends JavaCodeFoldingSettings implements PersistentStateComponent<JavaCodeFoldingSettingsImpl>,
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2009 JetBrains s.r.o.
* Copyright 2000-2012 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,10 +31,7 @@ import com.intellij.codeInspection.util.SpecialAnnotationsUtil;
import com.intellij.ide.DataManager;
import com.intellij.openapi.actionSystem.PlatformDataKeys;
import com.intellij.openapi.application.ApplicationManager;
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.components.*;
import com.intellij.openapi.extensions.ExtensionPoint;
import com.intellij.openapi.extensions.ExtensionPointListener;
import com.intellij.openapi.extensions.Extensions;
@@ -59,7 +56,7 @@ import java.util.*;
@State(
name = "EntryPointsManager",
storages = {@Storage( file = "$PROJECT_FILE$")}
storages = {@Storage( file = StoragePathMacros.PROJECT_FILE)}
)
public class EntryPointsManagerImpl implements PersistentStateComponent<Element>, EntryPointsManager {
@NonNls private static final String[] STANDARD_ANNOS = {
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2009 JetBrains s.r.o.
* Copyright 2000-2012 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,10 +23,7 @@ import com.intellij.execution.executors.DefaultRunExecutor;
import com.intellij.execution.runners.ExecutionEnvironment;
import com.intellij.execution.runners.ProgramRunner;
import com.intellij.execution.util.ExecutionErrorDialog;
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.components.*;
import com.intellij.openapi.diagnostic.Logger;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.util.InvalidDataException;
@@ -37,7 +34,7 @@ import org.jetbrains.annotations.NotNull;
@State(name = "JavadocGenerationManager",
storages = {
@Storage(
file = "$PROJECT_FILE$"
file = StoragePathMacros.PROJECT_FILE
)
}
)
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2009 JetBrains s.r.o.
* Copyright 2000-2012 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,10 +20,7 @@
*/
package com.intellij.openapi.projectRoots.impl;
import com.intellij.openapi.components.RoamingType;
import com.intellij.openapi.components.ServiceManager;
import com.intellij.openapi.components.State;
import com.intellij.openapi.components.Storage;
import com.intellij.openapi.components.*;
import com.intellij.openapi.project.ProjectBundle;
import com.intellij.openapi.projectRoots.JavaSdk;
import com.intellij.openapi.projectRoots.ProjectJdkTable;
@@ -37,7 +34,7 @@ import org.jdom.Element;
roamingType = RoamingType.DISABLED,
storages= {
@Storage(
file = "$APP_CONFIG$/jdk.table.xml"
file = StoragePathMacros.APP_CONFIG + "/jdk.table.xml"
)}
)
public class JavaAwareProjectJdkTableImpl extends ProjectJdkTableImpl {
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2009 JetBrains s.r.o.
* Copyright 2000-2012 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,17 +15,14 @@
*/
package com.intellij.refactoring;
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.components.*;
import com.intellij.util.xmlb.XmlSerializerUtil;
@State(
name = "RefactoringSettings",
storages = {
@Storage(
file = "$APP_CONFIG$/other.xml"
file = StoragePathMacros.APP_CONFIG + "/other.xml"
)}
)
public class JavaRefactoringSettings implements PersistentStateComponent<JavaRefactoringSettings> {
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2009 JetBrains s.r.o.
* Copyright 2000-2012 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,10 +17,7 @@ package com.intellij.slicer;
import com.intellij.analysis.AnalysisUIOptions;
import com.intellij.ide.impl.ContentManagerWatcher;
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.components.*;
import com.intellij.openapi.progress.ProcessCanceledException;
import com.intellij.openapi.progress.ProgressIndicator;
import com.intellij.openapi.progress.ProgressManager;
@@ -40,7 +37,7 @@ import java.util.regex.Pattern;
@State(
name = "SliceManager",
storages = {@Storage( file = "$WORKSPACE_FILE$")}
storages = {@Storage( file = StoragePathMacros.WORKSPACE_FILE)}
)
public class SliceManager implements PersistentStateComponent<SliceManager.StoredSettingsBean> {
private final Project myProject;
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2009 JetBrains s.r.o.
* Copyright 2000-2012 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,14 @@
*/
package com.intellij.slicer;
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.components.*;
import com.intellij.openapi.components.StoragePathMacros;
import com.intellij.openapi.project.Project;
import org.jetbrains.annotations.NotNull;
@State(
name = "SliceToolwindowSettings",
storages = {@Storage( file = "$WORKSPACE_FILE$")}
storages = {@Storage( file = StoragePathMacros.WORKSPACE_FILE)}
)
public class SliceToolwindowSettings implements PersistentStateComponent<SliceToolwindowSettings> {
private boolean isPreview;