update copyright
[fedora-idea.git] / java / java-impl / src / com / intellij / refactoring / JavaRefactoringSettings.java
blob36f6b166b1dbe8f7d2e05af975e05c97da291878
1 /*
2 * Copyright 2000-2009 JetBrains s.r.o.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
16 package com.intellij.refactoring;
18 import com.intellij.openapi.components.PersistentStateComponent;
19 import com.intellij.openapi.components.ServiceManager;
20 import com.intellij.openapi.components.State;
21 import com.intellij.openapi.components.Storage;
22 import com.intellij.util.xmlb.XmlSerializerUtil;
24 @State(
25 name = "RefactoringSettings",
26 storages = {
27 @Storage(
28 id ="other",
29 file = "$APP_CONFIG$/other.xml"
32 public class JavaRefactoringSettings implements PersistentStateComponent<JavaRefactoringSettings> {
33 // properties should be public in order to get saved by DefaultExternalizable implementation
35 //public boolean RENAME_PREVIEW_USAGES = true;
36 public boolean RENAME_SEARCH_IN_COMMENTS_FOR_PACKAGE = true;
37 public boolean RENAME_SEARCH_IN_COMMENTS_FOR_CLASS = true;
38 public boolean RENAME_SEARCH_IN_COMMENTS_FOR_METHOD = true;
39 public boolean RENAME_SEARCH_IN_COMMENTS_FOR_FIELD = true;
40 public boolean RENAME_SEARCH_IN_COMMENTS_FOR_VARIABLE = true;
42 public boolean RENAME_SEARCH_FOR_TEXT_FOR_PACKAGE = true;
43 public boolean RENAME_SEARCH_FOR_TEXT_FOR_CLASS = true;
45 //public boolean ENCAPSULATE_FIELDS_PREVIEW_USAGES = true;
46 public boolean ENCAPSULATE_FIELDS_USE_ACCESSORS_WHEN_ACCESSIBLE = true;
48 public boolean EXTRACT_INTERFACE_PREVIEW_USAGES = true;
50 public boolean MOVE_PREVIEW_USAGES = true;
51 public boolean MOVE_SEARCH_IN_COMMENTS = true;
52 public boolean MOVE_SEARCH_FOR_TEXT = true;
55 //public boolean INLINE_METHOD_PREVIEW_USAGES = true;
56 //public boolean INLINE_FIELD_PREVIEW_USAGES = true;
58 //public boolean CHANGE_SIGNATURE_PREVIEW_USAGES = true;
59 public boolean CHANGE_CLASS_SIGNATURE_PREVIEW_USAGES = true;
61 public boolean MOVE_INNER_PREVIEW_USAGES = true;
63 //public boolean TYPE_COOK_PREVIEW_USAGES = true;
64 public boolean TYPE_COOK_DROP_CASTS = true;
65 public boolean TYPE_COOK_PRESERVE_RAW_ARRAYS = true;
66 public boolean TYPE_COOK_LEAVE_OBJECT_PARAMETERIZED_TYPES_RAW = true;
67 public boolean TYPE_COOK_EXHAUSTIVE = false;
68 public boolean TYPE_COOK_COOK_OBJECTS = false;
69 public boolean TYPE_COOK_PRODUCE_WILDCARDS = false;
71 public boolean TYPE_MIGRATION_PREVIEW_USAGES = true;
73 //public boolean MAKE_METHOD_STATIC_PREVIEW_USAGES;
74 //public boolean INTRODUCE_PARAMETER_PREVIEW_USAGES;
75 public int INTRODUCE_PARAMETER_REPLACE_FIELDS_WITH_GETTERS;
76 public int EXTRACT_INTERFACE_JAVADOC;
77 public int EXTRACT_SUPERCLASS_JAVADOC;
78 public boolean TURN_REFS_TO_SUPER_PREVIEW_USAGES;
79 public boolean INTRODUCE_PARAMETER_DELETE_LOCAL_VARIABLE;
80 public String INTRODUCE_FIELD_VISIBILITY;
81 public int PULL_UP_MEMBERS_JAVADOC;
82 public boolean PUSH_DOWN_PREVIEW_USAGES;
83 public boolean INLINE_METHOD_THIS;
84 public boolean INLINE_FIELD_THIS;
85 //public boolean INHERITANCE_TO_DELEGATION_PREVIEW_USAGES;
86 public boolean INHERITANCE_TO_DELEGATION_DELEGATE_OTHER;
87 //public boolean REPLACE_CONSTRUCTOR_WITH_FACTORY_PREVIEW_USAGES;
88 public String INTRODUCE_CONSTANT_VISIBILITY;
89 public boolean CONVERT_TO_INSTANCE_METHOD_PREVIEW_USAGES = true;
91 public Boolean INTRODUCE_LOCAL_CREATE_FINALS = null;
92 public Boolean INTRODUCE_PARAMETER_CREATE_FINALS = null;
94 public boolean INLINE_CLASS_SEARCH_IN_COMMENTS = true;
95 public boolean INLINE_CLASS_SEARCH_IN_NON_JAVA = true;
97 @SuppressWarnings({"WeakerAccess"}) public boolean RENAME_INHERITORS = true;
98 @SuppressWarnings({"WeakerAccess"}) public boolean RENAME_VARIABLES = true;
100 public static JavaRefactoringSettings getInstance() {
101 return ServiceManager.getService(JavaRefactoringSettings.class);
104 public boolean isToRenameInheritors() {
105 return RENAME_INHERITORS;
108 public boolean isToRenameVariables() {
109 return RENAME_VARIABLES;
112 public void setRenameInheritors(final boolean RENAME_INHERITORS) {
113 this.RENAME_INHERITORS = RENAME_INHERITORS;
116 public void setRenameVariables(final boolean RENAME_VARIABLES) {
117 this.RENAME_VARIABLES = RENAME_VARIABLES;
120 public JavaRefactoringSettings getState() {
121 return this;
124 public void loadState(JavaRefactoringSettings state) {
125 XmlSerializerUtil.copyBean(state, this);