Chromium Code Reviews| Index: editor/tools/plugins/com.google.dart.tools.deploy/src/com/google/dart/tools/ui/dialogs/AboutDartDialog.java |
| =================================================================== |
| --- editor/tools/plugins/com.google.dart.tools.deploy/src/com/google/dart/tools/ui/dialogs/AboutDartDialog.java (revision 30076) |
| +++ editor/tools/plugins/com.google.dart.tools.deploy/src/com/google/dart/tools/ui/dialogs/AboutDartDialog.java (working copy) |
| @@ -57,6 +57,22 @@ |
| private static final String NEW_LINE = System.getProperty("line.separator"); |
| + private static String getChannelLabel() { |
| + //TODO (pquitslund): move to UpdateUtils |
| + String updateUrl = UpdateCore.getUpdateUrl(); |
|
danrubel
2013/11/07 23:20:20
Can getUpdateUrl() ever return null?
|
| + if (updateUrl.contains("/channels/be/")) { |
| + return " (BLEEDING EDGE) "; |
| + } |
| + if (updateUrl.contains("/channels/dev/")) { |
| + return " (DEV) "; |
| + } |
| + if (updateUrl.contains("/channels/stable/")) { |
| + return " (STABLE) "; |
| + } |
| + //Fall through |
| + return ""; |
| + } |
| + |
| private final UpdateListener updateListener = new UpdateAdapter() { |
| @Override |
| public void installing() { |
| @@ -236,7 +252,7 @@ |
| } |
| private String getVersion() { |
| - return DartToolsPlugin.getVersionString(); |
| + return DartToolsPlugin.getVersionString() + getChannelLabel(); |
| } |
| private Label newLabel(int style) { |