本文整理匯總了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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}