KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > ui > internal > browser > IBrowserDescriptor


1 /*******************************************************************************
2  * Copyright (c) 2004, 2005 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  * IBM Corporation - Initial API and implementation
10  *******************************************************************************/

11 package org.eclipse.ui.internal.browser;
12 /**
13  * An interface to an external Web browser.
14  * <p>
15  * This interface is not intended to be implemented by clients.
16  * </p>
17  * @see IBrowserDescriptorWorkingCopy
18  * @since 1.0
19  */

20 public interface IBrowserDescriptor {
21     public static final String JavaDoc URL_PARAMETER = "%URL%"; //$NON-NLS-1$
22

23     /**
24      * Returns the displayable name of the Web browser.
25      *
26      * @return the name
27      */

28     public String JavaDoc getName();
29
30     /**
31      * Returns the absolute path to the location of the Web browser's executable.
32      * The location is platform specific and may return null if no location has been
33      * set.
34      *
35      * @return the path to the executable
36      */

37     public String JavaDoc getLocation();
38
39     /**
40      * Returns the parameters that should be used to launch the Web browser executable.
41      * %URL% is used if the URL should be inserted into the parameters. If there are
42      * no parameters, <code>null</code> is returned.
43      *
44      * @return the parameters
45      */

46     public String JavaDoc getParameters();
47
48     /**
49      * Deletes this Web browser. The browser will no longer be available to users.
50      * This method has no effect if the browser has already been deleted or has never
51      * been saved.
52      */

53     public void delete();
54
55     /**
56      * Returns whether this browser is a working copy. Browsers which return
57      * <code>true</code> to this method can be safely cast to
58      * <code>org.eclipse.ui.internal.browser.IBrowserDescriptorWorkingCopy</code>
59      *
60      * @return whether this browser is a working copy
61      */

62     public boolean isWorkingCopy();
63
64     /**
65      * Returns a working copy of this browser. Changes to the working copy will be
66      * applied to this browser when saved.
67      *
68      * @return a working copy of this browser
69      */

70     public IBrowserDescriptorWorkingCopy getWorkingCopy();
71 }
Popular Tags