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.pde.internal.ui.editor.schema;
11:
12: import org.eclipse.jface.action.IMenuManager;
13: import org.eclipse.jface.action.Separator;
14: import org.eclipse.jface.viewers.ILabelProvider;
15: import org.eclipse.jface.viewers.ITreeContentProvider;
16: import org.eclipse.jface.viewers.SelectionChangedEvent;
17: import org.eclipse.jface.viewers.ViewerComparator;
18: import org.eclipse.pde.internal.ui.PDEUIMessages;
19: import org.eclipse.pde.internal.ui.editor.ISortableContentOutlinePage;
20: import org.eclipse.pde.internal.ui.editor.PDEFormEditor;
21: import org.eclipse.pde.internal.ui.editor.XMLSourcePage;
22: import org.eclipse.ui.views.contentoutline.IContentOutlinePage;
23:
24: public class SchemaSourcePage extends XMLSourcePage {
25: public SchemaSourcePage(PDEFormEditor editor, String id,
26: String title) {
27: super (editor, id, title);
28: }
29:
30: public IContentOutlinePage createContentOutlinePage() {
31: return null;
32: /*
33: * return new SchemaSourceOutlinePage( getEditorInput(),
34: * getDocumentProvider(), this);
35: */
36: }
37:
38: protected void editorContextMenuAboutToShow(IMenuManager menu) {
39: super .editorContextMenuAboutToShow(menu);
40: menu.add(new Separator());
41: SchemaEditorContributor contributor = (SchemaEditorContributor) ((PDEFormEditor) getEditor())
42: .getContributor();
43: menu.add(contributor.getPreviewAction());
44: }
45:
46: public ILabelProvider createOutlineLabelProvider() {
47: return null;
48: }
49:
50: public ITreeContentProvider createOutlineContentProvider() {
51: return null;
52: }
53:
54: /* (non-Javadoc)
55: * @see org.eclipse.pde.internal.ui.editor.PDESourcePage#createOutlineSorter()
56: */
57: public ViewerComparator createOutlineComparator() {
58: return null;
59: }
60:
61: /* (non-Javadoc)
62: * @see org.eclipse.pde.internal.ui.editor.PDESourcePage#updateSelection(org.eclipse.jface.viewers.SelectionChangedEvent)
63: */
64: public void updateSelection(SelectionChangedEvent e) {
65: // NO-OP
66: }
67:
68: protected ISortableContentOutlinePage createOutlinePage() {
69: //TODO remove this method when the above three stubs
70: // are implemented
71: return new SchemaFormOutlinePage((PDEFormEditor) getEditor());
72: }
73:
74: /* (non-Javadoc)
75: * @see org.eclipse.pde.internal.ui.editor.PDEProjectionSourcePage#isQuickOutlineEnabled()
76: */
77: public boolean isQuickOutlineEnabled() {
78: return false;
79: }
80:
81: /* (non-Javadoc)
82: * @see org.eclipse.pde.internal.ui.editor.PDESourcePage#updateSelection(java.lang.Object)
83: */
84: public void updateSelection(Object object) {
85: // NO-OP
86: }
87:
88: protected void setPartName(String partName) {
89: super.setPartName(PDEUIMessages.EditorSourcePage_name);
90: }
91: }
|