1 | /******************************************************************************* |
---|
2 | * Copyright (c) 2000, 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.modelica.mdt.ui.hover; |
---|
12 | |
---|
13 | import org.eclipse.jface.text.IAutoEditStrategy; |
---|
14 | import org.eclipse.jface.text.IInformationControlCreator; |
---|
15 | import org.eclipse.jface.text.ITextHover; |
---|
16 | import org.eclipse.jface.text.hyperlink.IHyperlinkDetector; |
---|
17 | import org.eclipse.jface.text.information.IInformationPresenter; |
---|
18 | import org.eclipse.jface.text.source.IAnnotationHover; |
---|
19 | import org.eclipse.jface.text.source.ISourceViewer; |
---|
20 | |
---|
21 | import org.eclipse.ui.texteditor.ITextEditor; |
---|
22 | import org.modelica.mdt.ui.editor.ModelicaSourceViewerConfig; |
---|
23 | |
---|
24 | /** |
---|
25 | * A simple {@linkplain org.modelica.mdt.ui.editor.SourceViewerConfiguration Modelica source viewer configuration}. |
---|
26 | * <p> |
---|
27 | * This simple source viewer configuration basically provides syntax coloring |
---|
28 | * and disables all other features like code assist, quick outlines, hyperlinking, etc. |
---|
29 | * </p> |
---|
30 | * |
---|
31 | * @since 3.1 |
---|
32 | */ |
---|
33 | public class SimpleModelicaSourceViewerConfig extends ModelicaSourceViewerConfig { |
---|
34 | |
---|
35 | /** |
---|
36 | * Creates a new Modelica source viewer configuration for viewers in the given editor |
---|
37 | * using the given preference store, the color manager and the specified document partitioning. |
---|
38 | * |
---|
39 | * @param colorManager the color manager |
---|
40 | * @param preferenceStore the preference store, can be read-only |
---|
41 | * @param editor the editor in which the configured viewer(s) will reside, or <code>null</code> if none |
---|
42 | * @param partitioning the document partitioning for this configuration, or <code>null</code> for the default partitioning |
---|
43 | * @param configureFormatter <code>true</code> if a content formatter should be configured |
---|
44 | */ |
---|
45 | public SimpleModelicaSourceViewerConfig(ITextEditor editor, String partitioning) { |
---|
46 | super(editor, partitioning); |
---|
47 | } |
---|
48 | |
---|
49 | /* |
---|
50 | * @see org.eclipse.jface.text.source.SourceViewerConfiguration#getAutoEditStrategies(org.eclipse.jface.text.source.ISourceViewer, java.lang.String) |
---|
51 | */ |
---|
52 | public IAutoEditStrategy[] getAutoEditStrategies(ISourceViewer sourceViewer, String contentType) { |
---|
53 | return null; |
---|
54 | } |
---|
55 | |
---|
56 | /* |
---|
57 | * @see SourceViewerConfiguration#getAnnotationHover(ISourceViewer) |
---|
58 | */ |
---|
59 | public IAnnotationHover getAnnotationHover(ISourceViewer sourceViewer) { |
---|
60 | return null; |
---|
61 | } |
---|
62 | |
---|
63 | /* |
---|
64 | * @see SourceViewerConfiguration#getOverviewRulerAnnotationHover(ISourceViewer) |
---|
65 | */ |
---|
66 | public IAnnotationHover getOverviewRulerAnnotationHover(ISourceViewer sourceViewer) { |
---|
67 | return null; |
---|
68 | } |
---|
69 | |
---|
70 | /* |
---|
71 | * @see SourceViewerConfiguration#getConfiguredTextHoverStateMasks(ISourceViewer, String) |
---|
72 | */ |
---|
73 | public int[] getConfiguredTextHoverStateMasks(ISourceViewer sourceViewer, String contentType) { |
---|
74 | return null; |
---|
75 | } |
---|
76 | |
---|
77 | /* |
---|
78 | * @see SourceViewerConfiguration#getTextHover(ISourceViewer, String, int) |
---|
79 | */ |
---|
80 | public ITextHover getTextHover(ISourceViewer sourceViewer, String contentType, int stateMask) { |
---|
81 | return null; |
---|
82 | } |
---|
83 | |
---|
84 | /* |
---|
85 | * @see SourceViewerConfiguration#getTextHover(ISourceViewer, String) |
---|
86 | */ |
---|
87 | public ITextHover getTextHover(ISourceViewer sourceViewer, String contentType) { |
---|
88 | return null; |
---|
89 | } |
---|
90 | |
---|
91 | /* |
---|
92 | * @see SourceViewerConfiguration#getInformationControlCreator(ISourceViewer) |
---|
93 | */ |
---|
94 | public IInformationControlCreator getInformationControlCreator(ISourceViewer sourceViewer) { |
---|
95 | return null; |
---|
96 | } |
---|
97 | |
---|
98 | /* |
---|
99 | * @see SourceViewerConfiguration#getInformationPresenter(ISourceViewer) |
---|
100 | */ |
---|
101 | public IInformationPresenter getInformationPresenter(ISourceViewer sourceViewer) { |
---|
102 | return null; |
---|
103 | } |
---|
104 | |
---|
105 | /* |
---|
106 | * @see org.modelica.mdt.ui.editor.SourceViewerConfiguration#getOutlinePresenter(org.eclipse.jface.text.source.ISourceViewer, boolean) |
---|
107 | */ |
---|
108 | public IInformationPresenter getOutlinePresenter(ISourceViewer sourceViewer, boolean doCodeResolve) { |
---|
109 | return null; |
---|
110 | } |
---|
111 | |
---|
112 | /* |
---|
113 | * @see org.modelica.mdt.ui.editor.SourceViewerConfiguration#getHierarchyPresenter(org.eclipse.jface.text.source.ISourceViewer, boolean) |
---|
114 | */ |
---|
115 | public IInformationPresenter getHierarchyPresenter(ISourceViewer sourceViewer, boolean doCodeResolve) { |
---|
116 | return null; |
---|
117 | } |
---|
118 | |
---|
119 | /* |
---|
120 | * @see org.eclipse.jface.text.source.SourceViewerConfiguration#getHyperlinkDetectors(org.eclipse.jface.text.source.ISourceViewer) |
---|
121 | */ |
---|
122 | public IHyperlinkDetector[] getHyperlinkDetectors(ISourceViewer sourceViewer) { |
---|
123 | return null; |
---|
124 | } |
---|
125 | } |
---|