Initial version from the webtools project; sligthly modified for phpeclipse
[phpeclipse.git] / net.sourceforge.phpeclipse.webbrowser / src / org / eclipse / webbrowser / OpenBrowserAction.java
diff --git a/net.sourceforge.phpeclipse.webbrowser/src/org/eclipse/webbrowser/OpenBrowserAction.java b/net.sourceforge.phpeclipse.webbrowser/src/org/eclipse/webbrowser/OpenBrowserAction.java
new file mode 100644 (file)
index 0000000..78a04ed
--- /dev/null
@@ -0,0 +1,33 @@
+/**
+ * Copyright (c) 2003 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ *    IBM - Initial API and implementation
+ */
+package org.eclipse.webbrowser;
+
+import org.eclipse.jface.action.Action;
+import org.eclipse.webbrowser.WebBrowser;
+import org.eclipse.webbrowser.WebBrowserEditorInput;
+/**
+ * Action to open the Web browser.
+ */
+public class OpenBrowserAction extends Action {
+       /**
+        * OpenBrowserAction constructor comment.
+        */
+       public OpenBrowserAction() {
+               super();
+       }
+
+       /**
+        * Implementation of method defined on <code>IAction</code>.
+        */
+       public void run() {
+               WebBrowser.openURL(new WebBrowserEditorInput(null, WebBrowserEditorInput.SHOW_ALL | WebBrowserEditorInput.FORCE_NEW_PAGE));
+       }
+}
\ No newline at end of file