01: /*******************************************************************************
02: * Copyright (c) 2000, 2006 IBM Corporation and others.
03: * All rights reserved. This program and the accompanying materials
04: * are made available under the terms of the Eclipse Public License v1.0
05: * which accompanies this distribution, and is available at
06: * http://www.eclipse.org/legal/epl-v10.html
07: *
08: * Contributors:
09: * IBM Corporation - initial API and implementation
10: *******************************************************************************/package org.eclipse.ui;
11:
12: import org.eclipse.core.runtime.IPath;
13:
14: /**
15: * An editor launcher is used to launch external editors on a
16: * file in the local file system.
17: * <p>
18: * Clients should implement this interface to define a new type of editor
19: * launcher. Each new launcher must be registered as an editor in the
20: * workbench's editor extension point
21: * (named <code>"org.eclipse.ui.editors"</code>).
22: *
23: * For example, the plug-in's XML markup might contain:
24: * <pre>
25: * <extension point = "org.eclipse.ui.editors">
26: * <editor
27: * id="org.eclipse.ui.SwingEditorLauncher"
28: * name="Swing Editor"
29: * extensions="xml"
30: * launcher="org.eclipse.ui.examples.swingeditor.SwingEditorLauncher"
31: * icon="icons/xml.gif">
32: * </editor>
33: * </extension>
34: * </pre>
35: * </p><p>
36: * In this example a launcher has been registered for use with <code>xml</code>
37: * files. Once registered, the launcher will appear in the <code>Open With</code>
38: * menu for an <code>xml</code> file. If the item is invoked the workbench will
39: * create an instance of the launcher class and call <code>open</code> on it,
40: * passing the input file.
41: * </p>
42: */
43: public interface IEditorLauncher {
44:
45: /**
46: * Launches this external editor to edit the file at the given
47: * location in the local file system.
48: *
49: * @param file the local file system path of the file to edit
50: */
51: public void open(IPath file);
52: }
|