當前位置: 首頁>>代碼示例>>Java>>正文


Java SourceViewer.unconfigure方法代碼示例

本文整理匯總了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);
		}
	}
}
 
開發者ID:angelozerr,項目名稱:typescript.java,代碼行數:21,代碼來源:TypeScriptMergeViewer.java

示例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));
		}
	}
}
 
開發者ID:cplutte,項目名稱:bts,代碼行數:17,代碼來源:DefaultMergeViewer.java

示例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);
		}
	}
}
 
開發者ID:trylimits,項目名稱:Eclipse-Postfix-Code-Completion,代碼行數:21,代碼來源:JavaMergeViewer.java

示例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;
}
 
開發者ID:forcedotcom,項目名稱:idecore,代碼行數:17,代碼來源:ApexTemplatePreferencePage.java

示例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);
	}
}
 
開發者ID:apicloudcom,項目名稱:APICloud-Studio,代碼行數:15,代碼來源:SVGMergeViewer.java

示例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);
	}
}
 
開發者ID:apicloudcom,項目名稱:APICloud-Studio,代碼行數:15,代碼來源:XMLMergeViewer.java

示例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);
	}
}
 
開發者ID:apicloudcom,項目名稱:APICloud-Studio,代碼行數:15,代碼來源:JSMergeViewer.java

示例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);
	}
}
 
開發者ID:apicloudcom,項目名稱:APICloud-Studio,代碼行數:15,代碼來源:DTDMergeViewer.java

示例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);
	}
}
 
開發者ID:apicloudcom,項目名稱:APICloud-Studio,代碼行數:15,代碼來源:CSSMergeViewer.java

示例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);
	}
}
 
開發者ID:apicloudcom,項目名稱:APICloud-Studio,代碼行數:15,代碼來源:HTMLMergeViewer.java

示例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));
}
 
開發者ID:trylimits,項目名稱:Eclipse-Postfix-Code-Completion,代碼行數:10,代碼來源:JavaStatusContextViewer.java

示例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);
}
 
開發者ID:GoClipse,項目名稱:goclipse,代碼行數:31,代碼來源:AbstractLangEditor.java


注:本文中的org.eclipse.jface.text.source.SourceViewer.unconfigure方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。