2 * Copyright (c) 2003 IBM Corporation and others.
3 * All rights reserved. This program and the accompanying materials
4 * are made available under the terms of the Common Public License v1.0
5 * which accompanies this distribution, and is available at
6 * http://www.eclipse.org/legal/cpl-v10.html
9 * IBM - Initial API and implementation
11 package net.sourceforge.phpeclipse.webbrowser.internal;
13 import net.sourceforge.phpeclipse.webbrowser.IInternalWebBrowser;
14 import net.sourceforge.phpeclipse.webbrowser.IWebBrowser;
16 import org.eclipse.jface.action.Action;
18 * Action to open the Web browser.
20 public class SwitchDefaultBrowserAction extends Action {
21 protected IWebBrowser webbrowser;
24 * SwitchDefaultBrowserAction constructor comment.
26 public SwitchDefaultBrowserAction(IWebBrowser webbrowser, boolean current) {
29 this.webbrowser = webbrowser;
30 setText(webbrowser.getName());
31 if (webbrowser instanceof IInternalWebBrowser)
32 setImageDescriptor(ImageResource.getImageDescriptor(ImageResource.IMG_INTERNAL_BROWSER));
34 setImageDescriptor(ImageResource.getImageDescriptor(ImageResource.IMG_EXTERNAL_BROWSER));
41 * Implementation of method defined on <code>IAction</code>.
44 BrowserManager.getInstance().setCurrentWebBrowser(webbrowser);