本文整理匯總了Java中org.eclipse.jface.text.source.SourceViewer.unconfigure方法的典型用法代碼示例。如果您正苦於以下問題:Java SourceViewer.unconfigure方法的具體用法?Java SourceViewer.unconfigure怎麽用?Java SourceViewer.unconfigure使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.eclipse.jface.text.source.SourceViewer
的用法示例。
在下文中一共展示了SourceViewer.unconfigure方法的12個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: configureTextViewer
import org.eclipse.jface.text.source.SourceViewer; //導入方法依賴的package包/類
@Override
protected void configureTextViewer(TextViewer viewer) {
if (viewer instanceof SourceViewer) {
SourceViewer sourceViewer = (SourceViewer) viewer;
if (fSourceViewer == null)
fSourceViewer = new ArrayList<>();
if (!fSourceViewer.contains(sourceViewer))
fSourceViewer.add(sourceViewer);
TypeScriptTextTools tools = JSDTTypeScriptUIPlugin.getDefault().getJavaTextTools();
if (tools != null) {
IEditorInput editorInput = getEditorInput(sourceViewer);
sourceViewer.unconfigure();
if (editorInput == null) {
sourceViewer.configure(getSourceViewerConfiguration(sourceViewer, null));
return;
}
getSourceViewerConfiguration(sourceViewer, editorInput);
}
}
}
示例2: configureSourceViewer
import org.eclipse.jface.text.source.SourceViewer; //導入方法依賴的package包/類
protected void configureSourceViewer(SourceViewer sourceViewer) {
IEditorInput editorInput = getEditorInput(sourceViewer);
SourceViewerConfiguration sourceViewerConfiguration = createSourceViewerConfiguration(sourceViewer, editorInput);
sourceViewer.unconfigure();
sourceViewer.configure(sourceViewerConfiguration);
if (sourceViewer.getDocument() instanceof IXtextDocument) {
IXtextDocument xtextDocument = (IXtextDocument) sourceViewer.getDocument();
if (!xtextDocument.readOnly(TEST_EXISTING_XTEXT_RESOURCE)) {
String[] configuredContentTypes = sourceViewerConfiguration.getConfiguredContentTypes(sourceViewer);
for (String contentType : configuredContentTypes) {
sourceViewer.removeTextHovers(contentType);
}
sourceViewer.setHyperlinkDetectors(null, sourceViewerConfiguration.getHyperlinkStateMask(sourceViewer));
}
}
}
示例3: configureTextViewer
import org.eclipse.jface.text.source.SourceViewer; //導入方法依賴的package包/類
@Override
protected void configureTextViewer(TextViewer viewer) {
if (viewer instanceof SourceViewer) {
SourceViewer sourceViewer= (SourceViewer)viewer;
if (fSourceViewer == null)
fSourceViewer= new ArrayList<SourceViewer>();
if (!fSourceViewer.contains(sourceViewer))
fSourceViewer.add(sourceViewer);
JavaTextTools tools= JavaCompareUtilities.getJavaTextTools();
if (tools != null) {
IEditorInput editorInput= getEditorInput(sourceViewer);
sourceViewer.unconfigure();
if (editorInput == null) {
sourceViewer.configure(getSourceViewerConfiguration(sourceViewer, null));
return;
}
getSourceViewerConfiguration(sourceViewer, editorInput);
}
}
}
示例4: createViewer
import org.eclipse.jface.text.source.SourceViewer; //導入方法依賴的package包/類
@Override
protected SourceViewer createViewer(Composite parent) {
final SourceViewer viewer = super.createViewer(parent);
new ApexDocumentSetupParticipant().setup(viewer.getDocument());
final ApexSourceViewerConfiguration configuration = new ApexSourceViewerConfiguration(preferenceStore(), null);
configuration.init(null);
viewer.unconfigure();
viewer.configure(configuration);
viewer.getTextWidget().setFont(JFaceResources.getFont(JFaceResources.TEXT_FONT));
viewer.setEditable(false);
return viewer;
}
示例5: configureTextViewer
import org.eclipse.jface.text.source.SourceViewer; //導入方法依賴的package包/類
@Override
protected void configureTextViewer(TextViewer textViewer)
{
super.configureTextViewer(textViewer);
if (textViewer instanceof SourceViewer)
{
SourceViewer sourceViewer = (SourceViewer) textViewer;
sourceViewer.unconfigure();
IPreferenceStore preferences = SVGEditor.getChainedPreferenceStore();
SVGSourceViewerConfiguration config = new SVGSourceViewerConfiguration(preferences, null);
sourceViewer.configure(config);
}
}
示例6: configureTextViewer
import org.eclipse.jface.text.source.SourceViewer; //導入方法依賴的package包/類
@Override
protected void configureTextViewer(TextViewer textViewer)
{
super.configureTextViewer(textViewer);
if (textViewer instanceof SourceViewer)
{
SourceViewer sourceViewer = (SourceViewer) textViewer;
sourceViewer.unconfigure();
IPreferenceStore preferences = XMLEditor.getChainedPreferenceStore();
XMLSourceViewerConfiguration config = new XMLSourceViewerConfiguration(preferences, null);
sourceViewer.configure(config);
}
}
示例7: configureTextViewer
import org.eclipse.jface.text.source.SourceViewer; //導入方法依賴的package包/類
@Override
protected void configureTextViewer(TextViewer textViewer)
{
super.configureTextViewer(textViewer);
if (textViewer instanceof SourceViewer)
{
SourceViewer sourceViewer = (SourceViewer) textViewer;
sourceViewer.unconfigure();
IPreferenceStore preferences = JSSourceEditor.getChainedPreferenceStore();
JSSourceViewerConfiguration config = new JSSourceViewerConfiguration(preferences, null);
sourceViewer.configure(config);
}
}
示例8: configureTextViewer
import org.eclipse.jface.text.source.SourceViewer; //導入方法依賴的package包/類
@Override
protected void configureTextViewer(TextViewer textViewer)
{
super.configureTextViewer(textViewer);
if (textViewer instanceof SourceViewer)
{
SourceViewer sourceViewer = (SourceViewer) textViewer;
sourceViewer.unconfigure();
IPreferenceStore preferences = DTDEditor.getChainedPreferenceStore();
DTDSourceViewerConfiguration config = new DTDSourceViewerConfiguration(preferences, null);
sourceViewer.configure(config);
}
}
示例9: configureTextViewer
import org.eclipse.jface.text.source.SourceViewer; //導入方法依賴的package包/類
@Override
protected void configureTextViewer(TextViewer textViewer)
{
super.configureTextViewer(textViewer);
if (textViewer instanceof SourceViewer)
{
SourceViewer sourceViewer = (SourceViewer) textViewer;
sourceViewer.unconfigure();
IPreferenceStore preferences = CSSSourceEditor.getChainedPreferenceStore();
CSSSourceViewerConfiguration config = new CSSSourceViewerConfiguration(preferences, null);
sourceViewer.configure(config);
}
}
示例10: configureTextViewer
import org.eclipse.jface.text.source.SourceViewer; //導入方法依賴的package包/類
@Override
protected void configureTextViewer(TextViewer textViewer)
{
super.configureTextViewer(textViewer);
if (textViewer instanceof SourceViewer)
{
SourceViewer sourceViewer = (SourceViewer) textViewer;
sourceViewer.unconfigure();
IPreferenceStore preferences = HTMLEditor.getChainedPreferenceStore();
HTMLSourceViewerConfiguration config = new HTMLSourceViewerConfiguration(preferences, null);
sourceViewer.configure(config);
}
}
示例11: createControl
import org.eclipse.jface.text.source.SourceViewer; //導入方法依賴的package包/類
@Override
public void createControl(Composite parent) {
super.createControl(parent);
final SourceViewer viewer= getSourceViewer();
viewer.unconfigure();
IPreferenceStore store= JavaPlugin.getDefault().getCombinedPreferenceStore();
viewer.configure(new JavaSourceViewerConfiguration(JavaPlugin.getDefault().getJavaTextTools().getColorManager(), store, null, null));
viewer.getControl().setFont(JFaceResources.getFont(PreferenceConstants.EDITOR_TEXT_FONT));
}
示例12: doSetInput
import org.eclipse.jface.text.source.SourceViewer; //導入方法依賴的package包/類
@Override
protected void doSetInput(IEditorInput input) throws CoreException {
super.doSetInput(input);
if(input == null) {
// Do nothing, editor will be closed.
LangCore.logError("doSetInput = null");
return;
}
SourceViewer sourceViewer = getSourceViewer_();
if(sourceViewer == null) {
changePreferenceStore(createCombinedPreferenceStore(input));
} else {
getSourceViewerDecorationSupport(sourceViewer).uninstall();
sourceViewer.unconfigure();
changePreferenceStore(createCombinedPreferenceStore(input));
sourceViewer.configure(getSourceViewerConfiguration());
getSourceViewerDecorationSupport(sourceViewer).install(getPreferenceStore());
}
IDocument doc = getDocumentProvider().getDocument(input);
// Setup up partitioning if not set. It can happen if opening non-language files in the language editor.
LangUIPlugin_Actual.createDocumentSetupHelper().setupPartitioningIfNotSet(doc);
internalDoSetInput(input);
}