KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > ui > internal > part > services > NullEditorInput


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.part.services;
12
13 import org.eclipse.jface.resource.ImageDescriptor;
14 import org.eclipse.ui.IEditorInput;
15 import org.eclipse.ui.IPersistableElement;
16
17 /**
18  * @since 3.1
19  */

20 public class NullEditorInput implements IEditorInput {
21
22     /* (non-Javadoc)
23      * @see org.eclipse.ui.IEditorInput#exists()
24      */

25     public boolean exists() {
26         return false;
27     }
28
29     /* (non-Javadoc)
30      * @see org.eclipse.ui.IEditorInput#getImageDescriptor()
31      */

32     public ImageDescriptor getImageDescriptor() {
33         return ImageDescriptor.getMissingImageDescriptor();
34     }
35
36     /* (non-Javadoc)
37      * @see org.eclipse.ui.IEditorInput#getName()
38      */

39     public String JavaDoc getName() {
40         return ""; //$NON-NLS-1$
41
}
42
43     /* (non-Javadoc)
44      * @see org.eclipse.ui.IEditorInput#getPersistable()
45      */

46     public IPersistableElement getPersistable() {
47         return null;
48     }
49
50     /* (non-Javadoc)
51      * @see org.eclipse.ui.IEditorInput#getToolTipText()
52      */

53     public String JavaDoc getToolTipText() {
54         return ""; //$NON-NLS-1$
55
}
56
57     /* (non-Javadoc)
58      * @see org.eclipse.core.runtime.IAdaptable#getAdapter(java.lang.Class)
59      */

60     public Object JavaDoc getAdapter(Class JavaDoc adapter) {
61         return null;
62     }
63
64 }
65
Popular Tags