Chromium Code Reviews

Unified Diff: editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/internal/model/DartProjectImpl.java

Issue 10384159: Stop traversing hidden (dot) directories when searching for Dart files (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/internal/model/DartProjectImpl.java
===================================================================
--- editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/internal/model/DartProjectImpl.java (revision 7609)
+++ editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/internal/model/DartProjectImpl.java (working copy)
@@ -423,8 +423,7 @@
@Override
public HashMap<String, List<String>> getHtmlMapping() throws CoreException {
- HashMap<String, List<String>> htmlMapping = ((DartProjectInfo) getElementInfo())
- .getHtmlMapping();
+ HashMap<String, List<String>> htmlMapping = ((DartProjectInfo) getElementInfo()).getHtmlMapping();
if (htmlMapping != null) {
return htmlMapping;
@@ -433,7 +432,7 @@
final HashMap<String, List<String>> mapping = new HashMap<String, List<String>>();
getProject().accept(new IResourceProxyVisitor() {
- @Override
+ @Override
public boolean visit(IResourceProxy proxy) throws CoreException {
if (proxy.getType() != IResource.FILE || !DartCore.isHTMLLikeFileName(proxy.getName())) {
return true;
@@ -441,20 +440,21 @@
IResource resource = proxy.requestResource();
if (resource.isAccessible()) {
try {
- List<String> libraryNames = LibraryReferenceFinder.findInHTML(
- IFileUtilities.getContents((IFile) resource));
+ List<String> libraryNames = LibraryReferenceFinder.findInHTML(IFileUtilities.getContents((IFile) resource));
if (!libraryNames.isEmpty()) {
mapping.put(resource.getLocation().toPortableString(), libraryNames);
}
} catch (IOException exception) {
DartCore.logInformation(
- "Could not get contents of " + resource.getLocation(), exception);
+ "Could not get contents of " + resource.getLocation(),
+ exception);
}
}
return true;
}
- }, 0);
+ },
+ 0);
((DartProjectInfo) getElementInfo()).setHtmlMapping(mapping);
@@ -923,6 +923,8 @@
public boolean visit(IResourceProxy proxy) throws CoreException {
if (proxy.getType() == IResource.FILE && DartCore.isDartLikeFileName(proxy.getName())) {
dartFiles.add((IFile) proxy.requestResource());
+ } else if (proxy.getType() == IResource.FOLDER && proxy.getName().startsWith(".")) {
+ return false;
}
return true;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine