|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.ibm.ftt.ui.resources.core.editor.EditorOpener
public class EditorOpener
EditorOpener can be used to open resources in an edit session.
The EditorOpener class is intended to handle all known resource types by
delegating to the appropriate IEditorOpener. Caller should invoke
this class instead of the resource type specific IEditorOpener
implementations directly.
| Field Summary | |
|---|---|
static String |
COPY_RIGHT
|
| Method Summary | |
|---|---|
org.eclipse.ui.IEditorPart |
browse(Object resource)
Opens the specified resource in read only mode. |
boolean |
canBrowse(Object resource)
Returns whether the resource can be browsed or not |
static EditorOpener |
getInstance()
Returns the singleton instance of the EditorOpener class |
org.eclipse.ui.IEditorPart |
gotoLine(Object resource,
int lineNumber,
int charStart,
int charEnd)
Opens the resource and goes to the specified line, highlighting the section from charStart to charEnd. |
org.eclipse.ui.IEditorPart |
open(Object resource)
Opens an edit session for the specified resource. |
org.eclipse.ui.IEditorPart |
open(Object resource,
org.eclipse.ui.IEditorDescriptor editorDescriptor)
Opens an edit session for the specified resource using the specified editor. |
org.eclipse.ui.IEditorPart |
view(Object resource)
Opens the specified resource in edit mode without locking the file |
| Field Detail |
|---|
public static final String COPY_RIGHT
| Method Detail |
|---|
public static EditorOpener getInstance()
EditorOpener class
EditorOpener object
public org.eclipse.ui.IEditorPart open(Object resource)
throws Exception
IEditorOpener
open in interface IEditorOpenerresource - resource to open
Exception - if the resource cannot be opened.
public org.eclipse.ui.IEditorPart view(Object resource)
throws Exception
IEditorOpener
view in interface IEditorOpenerresource - resource to view
Exception - if the resource cannot be viewed
public org.eclipse.ui.IEditorPart open(Object resource,
org.eclipse.ui.IEditorDescriptor editorDescriptor)
throws Exception
IEditorOpener
open in interface IEditorOpenerresource - resource to openeditorDescriptor - descriptor object for the editor to use
Exception - if the resource cannot be opened.
public org.eclipse.ui.IEditorPart browse(Object resource)
throws Exception
IEditorOpener
browse in interface IEditorOpenerresource - resource to browse
Exception - if the resource cannot be browsed
public org.eclipse.ui.IEditorPart gotoLine(Object resource,
int lineNumber,
int charStart,
int charEnd)
throws Exception
IEditorOpener
gotoLine in interface IEditorOpenerresource - resource to openlineNumber - line number to go to (line 1 is the first line)charStart - start of the highlighted section
(char 0 is the first character)charEnd - end of the highlighted section
(char 0 is the first character)
Exception - if goto line operation failspublic boolean canBrowse(Object resource)
IEditorOpener
canBrowse in interface IEditorOpenerresource - resource to check for browse
true if the resource can be browsed, or
false if not.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||