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

Unified Diff: editor/tools/plugins/com.google.dart.tools.debug.core/src/com/google/dart/tools/debug/core/DartDebugCorePlugin.java

Issue 8801021: added a preference so user can specify browser to open html page (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: '' Created 9 years 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
Index: editor/tools/plugins/com.google.dart.tools.debug.core/src/com/google/dart/tools/debug/core/DartDebugCorePlugin.java
===================================================================
--- editor/tools/plugins/com.google.dart.tools.debug.core/src/com/google/dart/tools/debug/core/DartDebugCorePlugin.java (revision 2081)
+++ editor/tools/plugins/com.google.dart.tools.debug.core/src/com/google/dart/tools/debug/core/DartDebugCorePlugin.java (working copy)
@@ -73,8 +73,12 @@
private static final String PREFS_JRE_PATH = "jrePath";
- private static final String PREFS_DART_VM_PATH = "vmPath";
+ public static final String PREFS_DART_VM_PATH = "vmPath";
+ public static final String PREFS_BROWSER_NAME = "browserName";
+
+ public static final String PREFS_DEFAULT_BROWSER = "defaultBrowser";
+
/**
* Create a Status object with the given message and this plugin's ID.
*
@@ -158,6 +162,16 @@
private IEclipsePreferences prefs;
/**
+ * Returns the path to the Browser executable, if it has been set. Otherwise, this method returns
+ * the empty string.
+ *
+ * @return the path to the Browser executable
+ */
+ public String getBrowserExecutablePath() {
+ return getPrefs().get(PREFS_BROWSER_NAME, "");
+ }
+
+ /**
* @return the browser configuration given a name
*/
public ChromeBrowserConfig getChromeBrowserConfig(String browserName) {
@@ -172,6 +186,20 @@
}
/**
+ * Returns the path to the Dart VM executable, if it has been set. Otherwise, this method returns
+ * the empty string.
+ *
+ * @return the path to the Dart VM executable
+ */
+ public String getDartVmExecutablePath() {
+ return getPrefs().get(PREFS_DART_VM_PATH, "");
+ }
+
+ public boolean getIsDefaultBrowser() {
+ return getPrefs().getBoolean(PREFS_DEFAULT_BROWSER, true);
+ }
+
+ /**
* Returns the path to the JRE executable, if it has been set. Otherwise, this method returns the
* empty string.
*
@@ -190,13 +218,18 @@
}
/**
- * Returns the path to the Dart VM executable, if it has been set. Otherwise, this method returns
- * the empty string.
+ * Set the path to the Browser executable.
*
- * @return the path to the Dart VM executable
+ * @param value the path to the Browser executable.
*/
- public String getDartVmExecutablePath() {
- return getPrefs().get(PREFS_DART_VM_PATH, "");
+ public void setBrowserExecutablePath(String value) {
+ getPrefs().put(PREFS_BROWSER_NAME, value);
+
+ try {
+ getPrefs().flush();
+ } catch (BackingStoreException exception) {
+ logError(exception);
+ }
}
/**
@@ -209,13 +242,12 @@
}
/**
- * Set the path to the JRE executable. This is used to invoke a Java process by the Rhino launch
- * configuration.
+ * Set the path to the Dart VM executable.
*
- * @param value the path to the JRE executable.
+ * @param value the path to the Dart VM executable.
*/
- public void setJreExecutablePath(String value) {
- getPrefs().put(PREFS_JRE_PATH, value);
+ public void setDartVmExecutablePath(String value) {
+ getPrefs().put(PREFS_DART_VM_PATH, value);
try {
getPrefs().flush();
@@ -224,14 +256,18 @@
}
}
+ public void setDefaultBrowser(boolean value) {
+ getPrefs().putBoolean(PREFS_DEFAULT_BROWSER, value);
+ }
+
/**
- * Set the path to the Node executable. This is used to invoke a process running node by the Node
- * launch configuration.
+ * Set the path to the JRE executable. This is used to invoke a Java process by the Rhino launch
+ * configuration.
*
- * @param value the path to the Node executable.
+ * @param value the path to the JRE executable.
*/
- public void setDartVmExecutablePath(String value) {
- getPrefs().put(PREFS_DART_VM_PATH, value);
+ public void setJreExecutablePath(String value) {
+ getPrefs().put(PREFS_JRE_PATH, value);
try {
getPrefs().flush();
« no previous file with comments | « no previous file | editor/tools/plugins/com.google.dart.tools.debug.ui/src/com/google/dart/tools/debug/ui/internal/preferences/DebugPreferenceMessages.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698