NPE
[fedora-idea.git] / platform / usageView / src / com / intellij / usages / UsageView.java
blobff254a75dfc351571550ce24c19174db5fc1f128
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;
18 import com.intellij.openapi.Disposable;
19 import com.intellij.openapi.actionSystem.DataKey;
20 import com.intellij.usageView.UsageInfo;
21 import org.jetbrains.annotations.NonNls;
22 import org.jetbrains.annotations.NotNull;
23 import org.jetbrains.annotations.Nullable;
25 import javax.swing.*;
26 import java.util.List;
27 import java.util.Set;
29 /**
30 * @author max
32 public interface UsageView extends Disposable {
33 /**
34 * Returns {@link com.intellij.usages.UsageTarget} to look usages for
36 @NonNls String USAGE_TARGETS = "usageTarget";
37 DataKey<UsageTarget[]> USAGE_TARGETS_KEY = DataKey.create(USAGE_TARGETS);
39 /**
40 * Returns {@link com.intellij.usages.Usage} which are selected in usage view
42 @NonNls String USAGES = "usages";
43 DataKey<Usage[]> USAGES_KEY = DataKey.create(USAGES);
45 @NonNls String USAGE_VIEW = "UsageView.new";
46 DataKey<UsageView> USAGE_VIEW_KEY = DataKey.create(USAGE_VIEW);
47 DataKey<UsageInfo> USAGE_INFO_KEY = DataKey.create("UsageInfo");
48 DataKey<List<UsageInfo>> USAGE_INFO_LIST_KEY = DataKey.create("UsageInfo.List");
50 void appendUsage(@NotNull Usage usage);
51 void removeUsage(@NotNull Usage usage);
52 void includeUsages(@NotNull Usage[] usages);
53 void excludeUsages(@NotNull Usage[] usages);
54 void selectUsages(@NotNull Usage[] usages);
56 void close();
57 boolean isSearchInProgress();
59 /**
60 * @deprecated please specify mnemonic by prefixing the mnenonic character with an ampersand (&& for Mac-specific ampersands)
62 void addButtonToLowerPane(@NotNull Runnable runnable, @NotNull String text, char mnemonic);
63 void addButtonToLowerPane(@NotNull Runnable runnable, @NotNull String text);
65 void addPerformOperationAction(@NotNull Runnable processRunnable, String commandName, String cannotMakeString, @NotNull String shortDescription);
67 UsageViewPresentation getPresentation();
69 @NotNull
70 Set<Usage> getExcludedUsages();
72 @Nullable
73 Set<Usage> getSelectedUsages();
74 @NotNull Set<Usage> getUsages();
75 @NotNull List<Usage> getSortedUsages();
77 @NotNull JComponent getComponent();
79 int getUsagesCount();