001: /*******************************************************************************
002: * Copyright (c) 2000, 2006 IBM Corporation and others.
003: * All rights reserved. This program and the accompanying materials
004: * are made available under the terms of the Eclipse Public License v1.0
005: * which accompanies this distribution, and is available at
006: * http://www.eclipse.org/legal/epl-v10.html
007: *
008: * Contributors:
009: * IBM Corporation - initial API and implementation
010: *******************************************************************************/package org.eclipse.ui.views.navigator;
011:
012: import org.eclipse.jface.viewers.TreeViewer;
013: import org.eclipse.ui.IViewPart;
014: import org.eclipse.ui.IWorkingSet;
015: import org.eclipse.ui.views.framelist.FrameList;
016:
017: /**
018: * This interface defines the API for the resource navigator.
019: * The action groups should restrict themselves to using this API.
020: * <p>
021: * This interface is not intended to be implemented by clients.
022: * Subclass <code>org.eclipse.ui.views.ResourceNavigator</code>
023: * instead.
024: * </p>
025: *
026: * @since 2.0
027: */
028: public interface IResourceNavigator extends IViewPart {
029:
030: /**
031: * Returns the pattern filter.
032: *
033: * @return the pattern filter
034: */
035: ResourcePatternFilter getPatternFilter();
036:
037: /**
038: * Returns the active working set, or <code>null<code> if none.
039: *
040: * @return the active working set, or <code>null<code> if none
041: * @since 2.0
042: */
043: IWorkingSet getWorkingSet();
044:
045: /**
046: * Returns the current sorter.
047: * @return the resource navigator's sorter
048: *
049: * @deprecated as of 3.3, use {@link IResourceNavigator#getComparator()} instead
050: */
051: ResourceSorter getSorter();
052:
053: /**
054: * Sets the current sorter.
055: * @param sorter the sorter to use
056: *
057: * @deprecated as of 3.3, use {@link IResourceNavigator#setComparator(ResourceComparator)} instead
058: */
059: void setSorter(ResourceSorter sorter);
060:
061: /**
062: * Returns the current comparator.
063: *
064: * @return the resource navigator's comparator
065: * @since 3.3
066: */
067: ResourceComparator getComparator();
068:
069: /**
070: * Sets the current comparator.
071: *
072: * @param comparator the comparator to use
073: * @since 3.3
074: */
075: void setComparator(ResourceComparator comparator);
076:
077: /**
078: * Sets the values of the filter preference to be the
079: * strings in preference values.
080: * @param patterns filter patterns to use on contents of the resource navigator
081: */
082: void setFiltersPreference(String[] patterns);
083:
084: /**
085: * Returns the viewer which shows the resource tree.
086: * @return the resource navigator's tree viewer
087: */
088: TreeViewer getViewer();
089:
090: /**
091: * Returns the frame list for this navigator.
092: * @return the list of frames maintained by the resource navigator
093: */
094: FrameList getFrameList();
095:
096: /**
097: * Returns whether this navigator's selection automatically tracks the active editor.
098: *
099: * @return <code>true</code> if linking is enabled, <code>false</code> if not
100: * @since 2.1
101: */
102: boolean isLinkingEnabled();
103:
104: /**
105: * Sets the working set for this view, or <code>null</code> to clear it.
106: *
107: * @param workingSet the working set, or <code>null</code> to clear it
108: * @since 2.0
109: */
110: void setWorkingSet(IWorkingSet workingSet);
111:
112: /**
113: * Sets whether this navigator's selection automatically tracks the active editor.
114: *
115: * @param enabled <code>true</code> to enable, <code>false</code> to disable
116: * @since 2.1
117: */
118: void setLinkingEnabled(boolean enabled);
119: }
|