KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > pde > internal > ui > editor > SystemFileEditorInputFactory


1 /*******************************************************************************
2  * Copyright (c) 2000, 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 package org.eclipse.pde.internal.ui.editor;
12
13 import java.io.File JavaDoc;
14
15 import org.eclipse.core.runtime.IAdaptable;
16 import org.eclipse.ui.IElementFactory;
17 import org.eclipse.ui.IMemento;
18
19 /**
20  * Insert the type's description here.
21  */

22 public class SystemFileEditorInputFactory implements IElementFactory {
23     /**
24      * The constructor.
25      */

26     public SystemFileEditorInputFactory() {
27     }
28     
29     public IAdaptable createElement (IMemento memento) {
30         String JavaDoc path = memento.getString("path"); //$NON-NLS-1$
31
File JavaDoc file = new File JavaDoc(path);
32         SystemFileEditorInput input = new SystemFileEditorInput(file);
33         return input;
34     }
35 }
36
Popular Tags