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


Java EditorsUI.DEFAULT_TEXT_EDITOR_ID屬性代碼示例

本文整理匯總了Java中org.eclipse.ui.editors.text.EditorsUI.DEFAULT_TEXT_EDITOR_ID屬性的典型用法代碼示例。如果您正苦於以下問題:Java EditorsUI.DEFAULT_TEXT_EDITOR_ID屬性的具體用法?Java EditorsUI.DEFAULT_TEXT_EDITOR_ID怎麽用?Java EditorsUI.DEFAULT_TEXT_EDITOR_ID使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在org.eclipse.ui.editors.text.EditorsUI的用法示例。


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

示例1: getEditorId

private String getEditorId(IFileStore file) {
//		IWorkbench workbench= fWindow.getWorkbench();
		IWorkbench workbench = PlatformUI.getWorkbench();
		IEditorRegistry editorRegistry= workbench.getEditorRegistry();
		IEditorDescriptor descriptor= editorRegistry.getDefaultEditor(file.getName(), getContentType(file));

		// check the OS for in-place editor (OLE on Win32)
		if (descriptor == null && editorRegistry.isSystemInPlaceEditorAvailable(file.getName()))
			descriptor= editorRegistry.findEditor(IEditorRegistry.SYSTEM_INPLACE_EDITOR_ID);
		
		// check the OS for external editor
		if (descriptor == null && editorRegistry.isSystemExternalEditorAvailable(file.getName()))
			descriptor= editorRegistry.findEditor(IEditorRegistry.SYSTEM_EXTERNAL_EDITOR_ID);
		
		if (descriptor != null)
			return descriptor.getId();
		
		return EditorsUI.DEFAULT_TEXT_EDITOR_ID;
	}
 
開發者ID:subclipse,項目名稱:subclipse,代碼行數:19,代碼來源:SVNConflictResolver.java

示例2: getEditorId

private String getEditorId(IFileStore file) {
	IWorkbench workbench = PlatformUI.getWorkbench();
	IEditorRegistry editorRegistry= workbench.getEditorRegistry();
	IEditorDescriptor descriptor= editorRegistry.getDefaultEditor(file.getName(), getContentType(file));

	// check the OS for in-place editor (OLE on Win32)
	if (descriptor == null && editorRegistry.isSystemInPlaceEditorAvailable(file.getName()))
		descriptor= editorRegistry.findEditor(IEditorRegistry.SYSTEM_INPLACE_EDITOR_ID);
	
	// check the OS for external editor
	if (descriptor == null && editorRegistry.isSystemExternalEditorAvailable(file.getName()))
		descriptor= editorRegistry.findEditor(IEditorRegistry.SYSTEM_EXTERNAL_EDITOR_ID);
	
	if (descriptor != null)
		return descriptor.getId();
	
	return EditorsUI.DEFAULT_TEXT_EDITOR_ID;
}
 
開發者ID:subclipse,項目名稱:subclipse,代碼行數:18,代碼來源:SVNConflictResolver.java

示例3: getEditorId

private static String getEditorId(File file, IWorkbenchWindow window) {
	IWorkbench workbench= window.getWorkbench();
	IEditorRegistry editorRegistry= workbench.getEditorRegistry();
	IEditorDescriptor descriptor= editorRegistry.getDefaultEditor(file.getName());
	if (descriptor != null)
		return descriptor.getId();
	return EditorsUI.DEFAULT_TEXT_EDITOR_ID;
}
 
開發者ID:ninneko,項目名稱:velocity-edit,代碼行數:8,代碼來源:EditorUtil.java

示例4: getEditorId

@Override
public String getEditorId(IEditorInput input, Object element) {
	if (element instanceof IFile) {
		if (((IFile) element).getFileExtension().equals("bf")) {
			return EditorConstants.EDITOR_ID;
		}
	}
	else if (element instanceof BfBreakpoint) {
		return EditorConstants.EDITOR_ID;
	}
	return EditorsUI.DEFAULT_TEXT_EDITOR_ID;
}
 
開發者ID:RichardBirenheide,項目名稱:brainfuck,代碼行數:12,代碼來源:BfDebugModelPresentation.java

示例5: getEditorId

private static String getEditorId(File file) {
    IWorkbench workbench = PlatformUI.getWorkbench();
    IEditorRegistry editorRegistry = workbench.getEditorRegistry();
    IEditorDescriptor descriptor = editorRegistry.getDefaultEditor(file.getName(), getContentType(file));
    if (descriptor != null) {
        return descriptor.getId();
    }
    return EditorsUI.DEFAULT_TEXT_EDITOR_ID;
}
 
開發者ID:OpenNTF,項目名稱:FindBug-for-Domino-Designer,代碼行數:9,代碼來源:OpenXMLResultsAction.java


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