1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
|
/*
* Copyright 2000-2014 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.intellij.ide.projectView;
import com.intellij.ide.SelectInTarget;
import com.intellij.ide.projectView.impl.AbstractProjectViewPane;
import com.intellij.openapi.components.ServiceManager;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.util.ActionCallback;
import com.intellij.openapi.vfs.VirtualFile;
import com.intellij.psi.PsiElement;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import java.util.Collection;
public abstract class ProjectView {
public static ProjectView getInstance(Project project) {
return ServiceManager.getService(project, ProjectView.class);
}
public abstract void select(Object element, VirtualFile file, boolean requestFocus);
@NotNull
public abstract ActionCallback selectCB(Object element, VirtualFile file, boolean requestFocus);
@Nullable
public abstract PsiElement getParentOfCurrentSelection();
// show pane identified by id using default(or currently selected) subId
public abstract void changeView(@NotNull String viewId);
public abstract void changeView(@NotNull String viewId, String subId);
public abstract void changeView();
public abstract void refresh();
public abstract boolean isAutoscrollToSource(String paneId);
public abstract boolean isFlattenPackages(String paneId);
public abstract boolean isShowMembers(String paneId);
public abstract boolean isHideEmptyMiddlePackages(String paneId);
public abstract void setHideEmptyPackages(boolean hideEmptyPackages, @NotNull String paneId);
public abstract boolean isShowLibraryContents(String paneId);
public abstract void setShowLibraryContents(boolean showLibraryContents, @NotNull String paneId);
public abstract boolean isShowModules(String paneId);
public abstract void setShowModules(boolean showModules, @NotNull String paneId);
public abstract void addProjectPane(@NotNull AbstractProjectViewPane pane);
public abstract void removeProjectPane(@NotNull AbstractProjectViewPane pane);
public abstract AbstractProjectViewPane getProjectViewPaneById(String id);
public abstract boolean isAutoscrollFromSource(String paneId);
public abstract boolean isAbbreviatePackageNames(String paneId);
public abstract void setAbbreviatePackageNames(boolean abbreviatePackageNames, @NotNull String paneId);
/**
* e.g. {@link com.intellij.ide.projectView.impl.ProjectViewPane#ID}
* @see com.intellij.ide.projectView.impl.AbstractProjectViewPane#getId()
*/
public abstract String getCurrentViewId();
public abstract void selectPsiElement(PsiElement element, boolean requestFocus);
public abstract boolean isSortByType(String paneId);
public abstract void setSortByType(@NotNull String paneId, final boolean sortByType);
public abstract AbstractProjectViewPane getCurrentProjectViewPane();
@NotNull
public abstract Collection<String> getPaneIds();
@NotNull
public abstract Collection<SelectInTarget> getSelectInTargets();
}
|