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


Java IPropertiesFilePartitions類代碼示例

本文整理匯總了Java中org.eclipse.jdt.internal.ui.propertiesfileeditor.IPropertiesFilePartitions的典型用法代碼示例。如果您正苦於以下問題:Java IPropertiesFilePartitions類的具體用法?Java IPropertiesFilePartitions怎麽用?Java IPropertiesFilePartitions使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


IPropertiesFilePartitions類屬於org.eclipse.jdt.internal.ui.propertiesfileeditor包,在下文中一共展示了IPropertiesFilePartitions類的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: createPreviewer

import org.eclipse.jdt.internal.ui.propertiesfileeditor.IPropertiesFilePartitions; //導入依賴的package包/類
private Control createPreviewer(Composite parent) {

		IPreferenceStore store= new ChainedPreferenceStore(new IPreferenceStore[] { fOverlayStore, JavaPlugin.getDefault().getCombinedPreferenceStore()});
		fPreviewViewer= new JavaSourceViewer(parent, null, null, false, SWT.V_SCROLL | SWT.H_SCROLL | SWT.BORDER, store);
		fColorManager= new JavaColorManager(false);
		PropertiesFileSourceViewerConfiguration configuration= new PropertiesFileSourceViewerConfiguration(fColorManager, store, null, IPropertiesFilePartitions.PROPERTIES_FILE_PARTITIONING);
		fPreviewViewer.configure(configuration);
		Font font= JFaceResources.getFont(PreferenceConstants.PROPERTIES_FILE_EDITOR_TEXT_FONT);
		fPreviewViewer.getTextWidget().setFont(font);
		new SourcePreviewerUpdater(fPreviewViewer, configuration, store);
		fPreviewViewer.setEditable(false);

		String content= loadPreviewContentFromFile("PropertiesFileEditorColorSettingPreviewCode.txt"); //$NON-NLS-1$
		IDocument document= new Document(content);
		PropertiesFileDocumentSetupParticipant.setupDocument(document);
		fPreviewViewer.setDocument(document);

		return fPreviewViewer.getControl();
	}
 
開發者ID:trylimits,項目名稱:Eclipse-Postfix-Code-Completion,代碼行數:20,代碼來源:PropertiesFileEditorPreferencePage.java

示例2: initialize

import org.eclipse.jdt.internal.ui.propertiesfileeditor.IPropertiesFilePartitions; //導入依賴的package包/類
private void initialize() {

		initializeFields();

		for (int i= 0, n= fSyntaxColorListModel.length; i < n; i++)
			fHighlightingColorList.add(new HighlightingColorListItem (fSyntaxColorListModel[i][0], fSyntaxColorListModel[i][1], fSyntaxColorListModel[i][1] + BOLD, fSyntaxColorListModel[i][1] + ITALIC, fSyntaxColorListModel[i][1] + STRIKETHROUGH, fSyntaxColorListModel[i][1] + UNDERLINE, null));

		fHighlightingColorListViewer.setInput(fHighlightingColorList);
		fHighlightingColorListViewer.setSelection(new StructuredSelection(fHighlightingColorListViewer.getElementAt(0)));

		// Make sure we propagate the colors to the shared color manager
		IPreferenceStore store= JavaPlugin.getDefault().getCombinedPreferenceStore();
		JavaTextTools textTools= JavaPlugin.getDefault().getJavaTextTools();
		PropertiesFileSourceViewerConfiguration sharedPropertiesFileSourceViewerConfiguration= new PropertiesFileSourceViewerConfiguration(textTools.getColorManager(), store, null, IPropertiesFilePartitions.PROPERTIES_FILE_PARTITIONING);
		new SourcePreviewerUpdater(fPreviewViewer, sharedPropertiesFileSourceViewerConfiguration, store);

	}
 
開發者ID:trylimits,項目名稱:Eclipse-Postfix-Code-Completion,代碼行數:18,代碼來源:PropertiesFileEditorPreferencePage.java

示例3: PropertiesFileViewer

import org.eclipse.jdt.internal.ui.propertiesfileeditor.IPropertiesFilePartitions; //導入依賴的package包/類
PropertiesFileViewer(Composite parent) {
	fSourceViewer= new SourceViewer(parent, null, SWT.LEFT_TO_RIGHT | SWT.H_SCROLL | SWT.V_SCROLL);
	JavaTextTools tools= JavaCompareUtilities.getJavaTextTools();
	if (tools != null) {
		IPreferenceStore store= JavaPlugin.getDefault().getCombinedPreferenceStore();
		fSourceViewer.configure(new PropertiesFileSourceViewerConfiguration(tools.getColorManager(), store, null, IPropertiesFilePartitions.PROPERTIES_FILE_PARTITIONING));
	}

	fSourceViewer.setEditable(false);

	String symbolicFontName= PropertiesFileMergeViewer.class.getName();
	Font font= JFaceResources.getFont(symbolicFontName);
	if (font != null)
		fSourceViewer.getTextWidget().setFont(font);
}
 
開發者ID:trylimits,項目名稱:Eclipse-Postfix-Code-Completion,代碼行數:16,代碼來源:PropertiesFileViewer.java

示例4: setInput

import org.eclipse.jdt.internal.ui.propertiesfileeditor.IPropertiesFilePartitions; //導入依賴的package包/類
/**
 * {@inheritDoc}
 */
public void setInput(ChangePreviewViewerInput input) {
	Change change= input.getChange();
	if (change != null) {
		Object element= change.getModifiedElement();
		if (element instanceof IAdaptable) {
			IAdaptable adaptable= (IAdaptable) element;
			IWorkbenchAdapter workbenchAdapter= (IWorkbenchAdapter) adaptable.getAdapter(IWorkbenchAdapter.class);
			if (workbenchAdapter != null) {
				fPane.setImageDescriptor(workbenchAdapter.getImageDescriptor(element));
			} else {
				fPane.setImageDescriptor(null);
			}
		} else {
			fPane.setImageDescriptor(null);
		}
	}
	if (!(change instanceof CreateTextFileChange)) {
		fSourceViewer.setInput(null);
		fPane.setText(""); //$NON-NLS-1$
		return;
	}
	CreateTextFileChange textFileChange= (CreateTextFileChange) change;
	fPane.setText(textFileChange.getName());
	IDocument document= new Document(textFileChange.getPreview());
	// This is a temporary work around until we get the
	// source viewer registry.
	fSourceViewer.unconfigure();
	String textType= textFileChange.getTextType();
	JavaTextTools textTools= JavaPlugin.getDefault().getJavaTextTools();
	IPreferenceStore store= JavaPlugin.getDefault().getCombinedPreferenceStore();
	if ("java".equals(textType)) { //$NON-NLS-1$
		textTools.setupJavaDocumentPartitioner(document);
		fSourceViewer.configure(new JavaSourceViewerConfiguration(textTools.getColorManager(), store, null, null));
	} else if ("properties".equals(textType)) { //$NON-NLS-1$
		PropertiesFileDocumentSetupParticipant.setupDocument(document);
		fSourceViewer.configure(new PropertiesFileSourceViewerConfiguration(textTools.getColorManager(), store, null, IPropertiesFilePartitions.PROPERTIES_FILE_PARTITIONING));
	} else {
		fSourceViewer.configure(new SourceViewerConfiguration());
	}
	fSourceViewer.setInput(document);
}
 
開發者ID:trylimits,項目名稱:Eclipse-Postfix-Code-Completion,代碼行數:45,代碼來源:CreateTextFileChangePreviewViewer.java

示例5: getDocumentPartitioner

import org.eclipse.jdt.internal.ui.propertiesfileeditor.IPropertiesFilePartitions; //導入依賴的package包/類
@Override
protected IDocumentPartitioner getDocumentPartitioner() {
	return new FastPartitioner(new PropertiesFilePartitionScanner(), IPropertiesFilePartitions.PARTITIONS);
}
 
開發者ID:trylimits,項目名稱:Eclipse-Postfix-Code-Completion,代碼行數:5,代碼來源:PropertiesFileMergeViewer.java

示例6: getDocumentPartitioning

import org.eclipse.jdt.internal.ui.propertiesfileeditor.IPropertiesFilePartitions; //導入依賴的package包/類
@Override
protected String getDocumentPartitioning() {
	return IPropertiesFilePartitions.PROPERTIES_FILE_PARTITIONING;
}
 
開發者ID:trylimits,項目名稱:Eclipse-Postfix-Code-Completion,代碼行數:5,代碼來源:PropertiesFileMergeViewer.java

示例7: MulePropertiesFileSourceViewerConfiguration

import org.eclipse.jdt.internal.ui.propertiesfileeditor.IPropertiesFilePartitions; //導入依賴的package包/類
/**
 * Super ugly but the fastest way of getting this done :D
 * @param preferenceStore
 * @param editor
 */
public MulePropertiesFileSourceViewerConfiguration(IPreferenceStore preferenceStore, ITextEditor editor) {
	super(JavaPlugin.getDefault().getJavaTextTools().getColorManager(), preferenceStore, editor, IPropertiesFilePartitions.PROPERTIES_FILE_PARTITIONING);
}
 
開發者ID:mulesoft,項目名稱:mule-tooling-incubator,代碼行數:9,代碼來源:MulePropertiesFileSourceViewerConfiguration.java


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