Chromium Code Reviews| Index: editor/tools/plugins/com.google.dart.tools.deploy/src/com/google/dart/tools/ui/omni/elements/FileProvider.java |
| =================================================================== |
| --- editor/tools/plugins/com.google.dart.tools.deploy/src/com/google/dart/tools/ui/omni/elements/FileProvider.java (revision 8668) |
| +++ editor/tools/plugins/com.google.dart.tools.deploy/src/com/google/dart/tools/ui/omni/elements/FileProvider.java (working copy) |
| @@ -1,5 +1,5 @@ |
| /* |
| - * Copyright (c) 2011, the Dart project authors. |
| + * Copyright (c) 2012, the Dart project authors. |
| * |
| * Licensed under the Eclipse Public License v1.0 (the "License"); you may not use this file except |
| * in compliance with the License. You may obtain a copy of the License at |
| @@ -61,9 +61,6 @@ |
| } |
| } |
| - /** |
| - * @return |
| - */ |
| public OmniElement[] getFiles() { |
| return matches.toArray(EMPTY_ARRAY); |
| } |
| @@ -130,7 +127,7 @@ |
| matches.add(new FileElement(FileProvider.this, (IFile) resource)); |
| } |
| - if (resource.getType() == IResource.FOLDER && resource.isDerived()) { |
| + if (resource.getType() == IResource.FOLDER && !shouldTraverseFolder(resource)) { |
| return false; |
| } |
| @@ -162,6 +159,15 @@ |
| } |
| return matches(name); |
| } |
| + |
| + private boolean shouldTraverseFolder(IResource resource) { |
| + if (resource.isDerived()) { |
| + return false; |
| + } |
| + |
| + String name = resource.getName(); |
| + return name != null && !name.startsWith("."); |
|
pquitslund
2012/06/14 21:02:20
Since I'm in NPE-squashing mode I'm being extra sa
|
| + } |
| } |
| /** |