|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eclipse.emf.edit.ui.util.EditUIUtil
public class EditUIUtil
Constructor Summary | |
---|---|
EditUIUtil()
|
Method Summary | |
---|---|
static IEditorDescriptor |
getDefaultEditor(java.io.InputStream contents,
java.lang.String fileName)
Returns the default editor for a given contents and file name. |
static IEditorDescriptor |
getDefaultEditor(java.lang.String fileName)
Returns the default editor for a given file name. |
static IEditorDescriptor |
getDefaultEditor(URI uri,
URIConverter uriConverter)
Returns the default editor for a given URI. |
static IEditorDescriptor[] |
getEditors(java.io.InputStream contents,
java.lang.String fileName,
boolean defaultsOnly)
Returns the editors for a given contents and file name. |
static IEditorDescriptor[] |
getEditors(java.lang.String fileName,
boolean defaultsOnly)
Returns the editors for a given file name. |
static IEditorDescriptor[] |
getEditors(URI uri,
URIConverter uriConverter,
boolean defaultsOnly)
Returns the editors for a given URI. |
static URI |
getURI(IEditorInput editorInput)
|
static boolean |
openEditor(EObject eObject)
Opens the default editor for the resource that contains the specified EObject. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public EditUIUtil()
Method Detail |
---|
public static boolean openEditor(EObject eObject) throws PartInitException
PartInitException
public static URI getURI(IEditorInput editorInput)
public static IEditorDescriptor getDefaultEditor(java.lang.String fileName)
IEditorRegistry.getDefaultEditor(String)
,
but it will not return null
unless all applicable content types have no associated editor.
fileName
- the file name in the system
null
if not foundpublic static IEditorDescriptor getDefaultEditor(java.io.InputStream contents, java.lang.String fileName)
If a file name is not provided, the entire content type registry will be queried. For performance reasons, it is highly recommended to provide a file name if available.
contents
- an input streamfileName
- the file name associated to the contents, or null
null
if not foundpublic static IEditorDescriptor getDefaultEditor(URI uri, URIConverter uriConverter)
If a URI converter is specified, it is used to open the stream. Otherwise, the global default
instance
is used.
uri
- a URIuriConverter
- URI converter from which to obtain an input stream, or null
null
if not foundpublic static IEditorDescriptor[] getEditors(java.lang.String fileName, boolean defaultsOnly)
IEditorRegistry.getEditors(String)
,
but its result will include editors for all applicable content types.
fileName
- the file name in the systemdefaultsOnly
- if true
, only the default editor for each content type will be included in the result
public static IEditorDescriptor[] getEditors(java.io.InputStream contents, java.lang.String fileName, boolean defaultsOnly)
If a file name is not provided, the entire content type registry will be queried. For performance reasons, it is highly recommended to provide a file name if available.
contents
- an input streamfileName
- the file name associated to the contents, or null
defaultsOnly
- if true
, only the default editor for each content type will be included in the result
public static IEditorDescriptor[] getEditors(URI uri, URIConverter uriConverter, boolean defaultsOnly)
If a URI converter is specified, it is used to open the stream. Otherwise, the global default
instance
is used.
uri
- a URIuriConverter
- a URI converter from which to obtain an input stream, or null
defaultsOnly
- if true
, only the default editor for each content type will be included in the result
|
Copyright 2001-2012 IBM Corporation and others. All Rights Reserved. |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |