1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-08-04 14:55:41 +02:00

[189433] [Search] [contributed] Dialog for selecting folder to search should display archive files. We do this by adding additional criteria to our viewer filter.

This commit is contained in:
Kushal Munir 2007-05-31 18:55:35 +00:00
parent 2a376dffc8
commit 3fad7bb547

View file

@ -6,10 +6,13 @@
* *
* Contributors: * Contributors:
* Kushal Munir (IBM) - initial API and implementation. * Kushal Munir (IBM) - initial API and implementation.
* Kevin Doyle (IBM) [189433] - Added Viewer Filter to display directories & archives
********************************************************************************/ ********************************************************************************/
package org.eclipse.rse.internal.files.ui.search; package org.eclipse.rse.internal.files.ui.search;
import org.eclipse.rse.files.ui.dialogs.SystemRemoteFolderDialog; import org.eclipse.rse.files.ui.dialogs.SystemRemoteFolderDialog;
import org.eclipse.rse.internal.ui.view.SystemActionViewerFilter;
import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
import org.eclipse.swt.widgets.Shell; import org.eclipse.swt.widgets.Shell;
/** /**
@ -17,6 +20,8 @@ import org.eclipse.swt.widgets.Shell;
*/ */
public class SystemSearchRemoteFolderDialog extends SystemRemoteFolderDialog { public class SystemSearchRemoteFolderDialog extends SystemRemoteFolderDialog {
private SystemActionViewerFilter _filter;
/** /**
* Constructor. * Constructor.
* @param shell the parent shell. * @param shell the parent shell.
@ -34,6 +39,17 @@ public class SystemSearchRemoteFolderDialog extends SystemRemoteFolderDialog {
super(shell, title); super(shell, title);
} }
public SystemActionViewerFilter getViewerFilter()
{
if (_filter == null)
{
_filter = new SystemActionViewerFilter();
Class[] types = {IRemoteFile.class};
_filter.addFilterCriterion(types, "isDirectory", "true"); //$NON-NLS-1$ //$NON-NLS-2$
_filter.addFilterCriterion(types, "isArchive", "true"); //$NON-NLS-1$ //$NON-NLS-2$
}
return _filter;
}
/** /**
* Creates an instance of the select form for search {@link SystemSearchRemoteFolderForm} * Creates an instance of the select form for search {@link SystemSearchRemoteFolderForm}