01: /*******************************************************************************
02: * Copyright (c) 2000, 2004 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.jdt.internal.ui.examples.jspeditor;
11:
12: import org.eclipse.jface.text.source.IAnnotationAccess;
13:
14: import org.eclipse.ui.editors.text.FileDocumentProvider;
15: import org.eclipse.ui.editors.text.TextEditor;
16:
17: import org.eclipse.ui.texteditor.DefaultMarkerAnnotationAccess;
18:
19: /**
20: * A simple JSP Editor.
21: *
22: * @since 3.0
23: */
24: public class JspEditor extends TextEditor {
25:
26: /**
27: * Creates a new JSP editor.
28: */
29: public JspEditor() {
30: super ();
31: setSourceViewerConfiguration(new JspSourceViewerConfiguration(
32: this ));
33: setDocumentProvider(new FileDocumentProvider());
34:
35: /*
36: * FIXME:
37: * This would be the right thing to do. Currently
38: * we share the preferences with the text editor.
39: */
40: // setPreferenceStore(JspUIPlugin.getDefault().getPreferenceStore());
41: }
42:
43: /*
44: * @see TextEditor#createAnnotationAccess()
45: */
46: protected IAnnotationAccess createAnnotationAccess() {
47: return new DefaultMarkerAnnotationAccess();
48: }
49: }
|