01: /*******************************************************************************
02: * Copyright (c) 2004, 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.internal.part;
11:
12: import org.eclipse.jface.resource.ImageDescriptor;
13: import org.eclipse.ui.IEditorInput;
14: import org.eclipse.ui.IPersistableElement;
15:
16: /**
17: * @since 3.1
18: */
19: public class NullEditorInput implements IEditorInput {
20:
21: /* (non-Javadoc)
22: * @see org.eclipse.ui.IEditorInput#exists()
23: */
24: public boolean exists() {
25: return false;
26: }
27:
28: /* (non-Javadoc)
29: * @see org.eclipse.ui.IEditorInput#getImageDescriptor()
30: */
31: public ImageDescriptor getImageDescriptor() {
32: return ImageDescriptor.getMissingImageDescriptor();
33: }
34:
35: /* (non-Javadoc)
36: * @see org.eclipse.ui.IEditorInput#getName()
37: */
38: public String getName() {
39: return ""; //$NON-NLS-1$
40: }
41:
42: /* (non-Javadoc)
43: * @see org.eclipse.ui.IEditorInput#getPersistable()
44: */
45: public IPersistableElement getPersistable() {
46: return null;
47: }
48:
49: /* (non-Javadoc)
50: * @see org.eclipse.ui.IEditorInput#getToolTipText()
51: */
52: public String getToolTipText() {
53: return ""; //$NON-NLS-1$
54: }
55:
56: /* (non-Javadoc)
57: * @see org.eclipse.core.runtime.IAdaptable#getAdapter(java.lang.Class)
58: */
59: public Object getAdapter(Class adapter) {
60: return null;
61: }
62:
63: }
|