mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-19 22:25:52 +02:00
Bug 163103 - allow a null filter to be used for a local file name filter in creation of the filter
This commit is contained in:
parent
f58f805e4a
commit
cbfe5a4281
1 changed files with 5 additions and 2 deletions
|
@ -1,5 +1,5 @@
|
||||||
/********************************************************************************
|
/********************************************************************************
|
||||||
* Copyright (c) 2006 IBM Corporation. All rights reserved.
|
* Copyright (c) 2006 IBM Corporation and others. All rights reserved.
|
||||||
* This program and the accompanying materials are made available under the terms
|
* This program and the accompanying materials are made available under the terms
|
||||||
* of the Eclipse Public License v1.0 which accompanies this distribution, and is
|
* of the Eclipse Public License v1.0 which accompanies this distribution, and is
|
||||||
* available at http://www.eclipse.org/legal/epl-v10.html
|
* available at http://www.eclipse.org/legal/epl-v10.html
|
||||||
|
@ -11,7 +11,7 @@
|
||||||
* Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
|
* Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
|
||||||
*
|
*
|
||||||
* Contributors:
|
* Contributors:
|
||||||
* {Name} (company) - description of contribution.
|
* Javier Montalvo Orús (Symbian) - fixed NPE when new local filters are created
|
||||||
********************************************************************************/
|
********************************************************************************/
|
||||||
|
|
||||||
package org.eclipse.rse.services.local.files;
|
package org.eclipse.rse.services.local.files;
|
||||||
|
@ -128,6 +128,9 @@ public class LocalFileService extends AbstractFileService implements IFileServic
|
||||||
private IMatcher _matcher;
|
private IMatcher _matcher;
|
||||||
public LocalFileNameFilter(String filter)
|
public LocalFileNameFilter(String filter)
|
||||||
{
|
{
|
||||||
|
if (filter == null) {
|
||||||
|
filter = "*";
|
||||||
|
}
|
||||||
if (filter.endsWith(",")) {
|
if (filter.endsWith(",")) {
|
||||||
String[] types = filter.split(",");
|
String[] types = filter.split(",");
|
||||||
_matcher = new FileTypeMatcher(types);
|
_matcher = new FileTypeMatcher(types);
|
||||||
|
|
Loading…
Add table
Reference in a new issue