KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > ui > ide > fileSystem > FileSystemContributor


1 /*******************************************************************************
2  * Copyright (c) 2006 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
12 package org.eclipse.ui.ide.fileSystem;
13
14 import java.net.URI JavaDoc;
15
16 import org.eclipse.core.filesystem.URIUtil;
17 import org.eclipse.swt.widgets.Shell;
18
19 /**
20  * The abstract base class for all UI file system contributors. This class
21  * provides the infrastructure for defining a contributor and fulfills the contract
22  * specified by the <code>org.eclipse.ui.ide.filesystemSupport</code>
23  * extension point.
24  *
25  * @since 3.2
26  * @see org.eclipse.core.filesystem.IFileSystem
27  */

28 public abstract class FileSystemContributor {
29     
30     /**
31      * Browse the file system for a URI to display to the user.
32      * @param initialPath The path to initialize the selection with.
33      * @param shell The shell to parent any required dialogs from
34      * @return URI if the file system is browsed successfully or
35      * <code>null</code> if a URI could not be determined.
36      */

37     public abstract URI JavaDoc browseFileSystem(String JavaDoc initialPath, Shell shell);
38     
39     /**
40      * Return a URI for the supplied String from the user.
41      * @param string
42      * @return URI or <code>null</code> if the string is
43      * invalid.
44      */

45     public URI JavaDoc getURI(String JavaDoc string){
46         return URIUtil.toURI(string);
47     }
48
49 }
50
Popular Tags