IDEADEV-42139: new toggle button in the usage view "sort members alphabetically"
[fedora-idea.git] / java / java-impl / src / com / intellij / usages / impl / rules / JavaUsageViewSettings.java
blob1f147d372fe6518975fb4df1e3baaec753ce10d5
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.usages.impl.rules;
18 import com.intellij.openapi.components.PersistentStateComponent;
19 import com.intellij.openapi.components.State;
20 import com.intellij.openapi.components.Storage;
21 import com.intellij.openapi.components.ServiceManager;
22 import com.intellij.util.xmlb.XmlSerializerUtil;
24 /**
25 * @author yole
27 @State(
28 name = "JavaUsageViewSettings",
29 storages = {
30 @Storage(
31 id ="other",
32 file = "$APP_CONFIG$/other.xml"
35 public class JavaUsageViewSettings implements PersistentStateComponent<JavaUsageViewSettings> {
36 public static JavaUsageViewSettings getInstance() {
37 return ServiceManager.getService(JavaUsageViewSettings.class);
40 public boolean SHOW_IMPORTS = true;
42 public JavaUsageViewSettings getState() {
43 return this;
46 public void loadState(final JavaUsageViewSettings state) {
47 XmlSerializerUtil.copyBean(state, this);