update copyright
[fedora-idea.git] / xml / impl / src / com / intellij / javaee / ProjectResources.java
blobf63cc541477bd4eb48765a160d79faf8e2397845
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.javaee;
18 import com.intellij.application.options.PathMacrosImpl;
19 import com.intellij.openapi.components.PersistentStateComponent;
20 import com.intellij.openapi.components.State;
21 import com.intellij.openapi.components.Storage;
22 import com.intellij.openapi.util.JDOMExternalizableAdapter;
23 import org.jdom.Element;
25 import java.util.Map;
26 import java.util.Collections;
28 /**
29 * @author Dmitry Avdeev
31 @State(name = "ProjectResources", storages = {@Storage(id = "default", file = "$PROJECT_FILE$")})
32 public class ProjectResources extends ExternalResourceManagerImpl implements PersistentStateComponent<Element> {
34 private JDOMExternalizableAdapter myAdapter;
36 public ProjectResources(PathMacrosImpl pathMacros) {
37 super(pathMacros);
38 myAdapter = new JDOMExternalizableAdapter(this, "ProjectResources");
41 @Override
42 protected Map<String, Map<String, String>> computeStdResources() {
43 return Collections.emptyMap();
46 public Element getState() {
47 return myAdapter.getState();
50 public void loadState(Element state) {
51 myAdapter.loadState(state);