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.
17 package com
.intellij
.packageDependencies
;
19 import com
.intellij
.openapi
.components
.PersistentStateComponent
;
20 import com
.intellij
.openapi
.components
.ServiceManager
;
21 import com
.intellij
.openapi
.components
.State
;
22 import com
.intellij
.openapi
.components
.Storage
;
23 import com
.intellij
.packageDependencies
.ui
.ProjectPatternProvider
;
24 import com
.intellij
.util
.xmlb
.XmlSerializerUtil
;
27 name
= "DependencyUISettings",
31 file
= "$APP_CONFIG$/other.xml"
34 public class DependencyUISettings
implements PersistentStateComponent
<DependencyUISettings
> {
35 public boolean UI_FLATTEN_PACKAGES
= true;
36 public boolean UI_SHOW_FILES
= true;
37 public boolean UI_SHOW_MODULES
= true;
38 public boolean UI_SHOW_MODULE_GROUPS
= true;
39 public boolean UI_FILTER_LEGALS
= false;
40 public boolean UI_GROUP_BY_SCOPE_TYPE
= true;
41 public boolean UI_COMPACT_EMPTY_MIDDLE_PACKAGES
= true;
42 public String SCOPE_TYPE
= ProjectPatternProvider
.FILE
;
44 public static DependencyUISettings
getInstance() {
45 return ServiceManager
.getService(DependencyUISettings
.class);
48 public DependencyUISettings
getState() {
52 public void loadState(DependencyUISettings state
) {
53 XmlSerializerUtil
.copyBean(state
, this);