Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(606)

Unified Diff: editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/ui/internal/filesview/ResourceLabelProvider.java

Issue 11735003: show package version information in Files View (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 12 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/ui/internal/filesview/FilesView.java ('k') | 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.ui/src/com/google/dart/tools/ui/internal/filesview/ResourceLabelProvider.java
===================================================================
--- editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/ui/internal/filesview/ResourceLabelProvider.java (revision 16570)
+++ editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/ui/internal/filesview/ResourceLabelProvider.java (working copy)
@@ -25,6 +25,7 @@
import org.eclipse.core.resources.IFolder;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.CoreException;
import org.eclipse.jface.viewers.DelegatingStyledCellLabelProvider.IStyledLabelProvider;
import org.eclipse.jface.viewers.ILabelProvider;
import org.eclipse.jface.viewers.ILabelProviderListener;
@@ -143,6 +144,18 @@
StyledString string = new StyledString(resource.getName());
+ if (resource instanceof IFolder) {
+ try {
+ String version = resource.getPersistentProperty(DartCore.PUB_PACKAGE_VERSION);
+ if (version != null) {
+ string.append(" [" + version + "]", StyledString.QUALIFIER_STYLER);
+ return string;
+ }
+ } catch (CoreException e) {
+ DartToolsPlugin.log(e);
+ }
+ }
+
DartElement dartElement = DartCore.create(resource);
// Append the library name to library units.
« no previous file with comments | « editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/ui/internal/filesview/FilesView.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698