| Index: editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/ui/internal/filesview/DartDirectoryNode.java
|
| ===================================================================
|
| --- editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/ui/internal/filesview/DartDirectoryNode.java (revision 11969)
|
| +++ editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/ui/internal/filesview/DartDirectoryNode.java (working copy)
|
| @@ -14,6 +14,8 @@
|
|
|
| package com.google.dart.tools.ui.internal.filesview;
|
|
|
| +import com.google.dart.compiler.SystemLibrary;
|
| +import com.google.dart.tools.core.internal.model.PackageLibraryManagerProvider;
|
| import com.google.dart.tools.core.model.DartSdkManager;
|
| import com.google.dart.tools.ui.DartToolsPlugin;
|
|
|
| @@ -22,6 +24,7 @@
|
|
|
| import java.io.File;
|
| import java.util.ArrayList;
|
| +import java.util.Collection;
|
| import java.util.List;
|
|
|
| /**
|
| @@ -65,26 +68,30 @@
|
| if (!DartSdkManager.getManager().hasSdk()) {
|
| file = null;
|
| } else if (isLibDir) {
|
| - file = DartSdkManager.getManager().getSdk().getLibraryDirectory();
|
| + Collection<SystemLibrary> systemLibraries = PackageLibraryManagerProvider.getAnyLibraryManager().getSystemLibraries();
|
| + for (SystemLibrary systemLibrary : systemLibraries) {
|
| + if (systemLibrary.isDocumented()) {
|
| + file = systemLibrary.getLibraryDir();
|
| + libs.add(
|
| + new DartLibraryNode(
|
| + this,
|
| + EFS.getLocalFileSystem().fromLocalFile(file),
|
| + systemLibrary.getShortName()));
|
| + }
|
| + }
|
| +
|
| } else {
|
| file = DartSdkManager.getManager().getSdk().getPackageDirectory();
|
| - }
|
|
|
| - if (file != null) {
|
| - for (File child : file.listFiles()) {
|
| - if (child.isDirectory()) {
|
| - // Skip the config directory - it is not a Dart library.
|
| - // TODO(devoncarew): will config be going away?
|
| - if (child.getName().equals("config")) {
|
| - continue;
|
| + if (file != null) {
|
| + for (File child : file.listFiles()) {
|
| + if (child.isDirectory()) {
|
| + libs.add(
|
| + new DartLibraryNode(
|
| + this,
|
| + EFS.getLocalFileSystem().fromLocalFile(child),
|
| + child.getName()));
|
| }
|
| -
|
| - // Skip the _internal directory (and any other similar private libraries).
|
| - if (child.getName().startsWith("_")) {
|
| - continue;
|
| - }
|
| -
|
| - libs.add(new DartLibraryNode(this, EFS.getLocalFileSystem().fromLocalFile(child)));
|
| }
|
| }
|
| }
|
|
|