KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > ui > views > navigator > IResourceNavigator


1 /*******************************************************************************
2  * Copyright (c) 2000, 2006 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  * IBM Corporation - initial API and implementation
10  *******************************************************************************/

11 package org.eclipse.ui.views.navigator;
12
13 import org.eclipse.jface.viewers.TreeViewer;
14 import org.eclipse.ui.IViewPart;
15 import org.eclipse.ui.IWorkingSet;
16 import org.eclipse.ui.views.framelist.FrameList;
17
18 /**
19  * This interface defines the API for the resource navigator.
20  * The action groups should restrict themselves to using this API.
21  * <p>
22  * This interface is not intended to be implemented by clients.
23  * Subclass <code>org.eclipse.ui.views.ResourceNavigator</code>
24  * instead.
25  * </p>
26  *
27  * @since 2.0
28  */

29 public interface IResourceNavigator extends IViewPart {
30
31     /**
32      * Returns the pattern filter.
33      *
34      * @return the pattern filter
35      */

36     ResourcePatternFilter getPatternFilter();
37
38     /**
39      * Returns the active working set, or <code>null<code> if none.
40      *
41      * @return the active working set, or <code>null<code> if none
42      * @since 2.0
43      */

44     IWorkingSet getWorkingSet();
45
46     /**
47      * Returns the current sorter.
48      * @return the resource navigator's sorter
49      *
50      * @deprecated as of 3.3, use {@link IResourceNavigator#getComparator()} instead
51      */

52     ResourceSorter getSorter();
53
54     /**
55      * Sets the current sorter.
56      * @param sorter the sorter to use
57      *
58      * @deprecated as of 3.3, use {@link IResourceNavigator#setComparator(ResourceComparator)} instead
59      */

60     void setSorter(ResourceSorter sorter);
61
62     /**
63      * Returns the current comparator.
64      *
65      * @return the resource navigator's comparator
66      * @since 3.3
67      */

68     ResourceComparator getComparator();
69
70     /**
71      * Sets the current comparator.
72      *
73      * @param comparator the comparator to use
74      * @since 3.3
75      */

76     void setComparator(ResourceComparator comparator);
77     
78     /**
79      * Sets the values of the filter preference to be the
80      * strings in preference values.
81      * @param patterns filter patterns to use on contents of the resource navigator
82      */

83     void setFiltersPreference(String JavaDoc[] patterns);
84
85     /**
86      * Returns the viewer which shows the resource tree.
87      * @return the resource navigator's tree viewer
88      */

89     TreeViewer getViewer();
90
91     /**
92      * Returns the frame list for this navigator.
93      * @return the list of frames maintained by the resource navigator
94      */

95     FrameList getFrameList();
96
97     /**
98      * Returns whether this navigator's selection automatically tracks the active editor.
99      *
100      * @return <code>true</code> if linking is enabled, <code>false</code> if not
101      * @since 2.1
102      */

103     boolean isLinkingEnabled();
104
105     /**
106      * Sets the working set for this view, or <code>null</code> to clear it.
107      *
108      * @param workingSet the working set, or <code>null</code> to clear it
109      * @since 2.0
110      */

111     void setWorkingSet(IWorkingSet workingSet);
112
113     /**
114      * Sets whether this navigator's selection automatically tracks the active editor.
115      *
116      * @param enabled <code>true</code> to enable, <code>false</code> to disable
117      * @since 2.1
118      */

119     void setLinkingEnabled(boolean enabled);
120 }
121
Popular Tags