add file color for navigation list items which are not PsiElements but could fetch...
[fedora-idea.git] / platform / lang-impl / src / com / intellij / tools / ToolConfigurable.java
blob77d5d3852d8d466c8b9c4df21f7bf47911b06711
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.
17 package com.intellij.tools;
19 import com.intellij.openapi.options.ConfigurationException;
20 import com.intellij.openapi.options.SearchableConfigurable;
21 import com.intellij.openapi.util.IconLoader;
22 import org.jetbrains.annotations.Nullable;
24 import javax.swing.*;
25 import java.io.IOException;
27 public class ToolConfigurable implements SearchableConfigurable {
28 private static final Icon ourIcon = IconLoader.getIcon("/general/externalTools.png");
29 private ToolsPanel myPanel;
31 public String getDisplayName() {
32 return ToolsBundle.message("tools.settings.title");
35 public JComponent createComponent() {
36 myPanel = new ToolsPanel();
37 return myPanel;
40 public Icon getIcon() {
41 return ourIcon;
44 public void apply() throws ConfigurationException {
45 try {
46 myPanel.apply();
48 catch (IOException e) {
49 throw new ConfigurationException(e.getMessage());
53 public boolean isModified() {
54 return myPanel.isModified();
57 public void reset() {
58 myPanel.reset();
61 public void disposeUIResources() {
62 myPanel = null;
65 public String getHelpTopic() {
66 return "preferences.externalTools";
70 public String getId() {
71 return getHelpTopic();
74 @Nullable
75 public Runnable enableSearch(String option) {
76 return null;