public class OpenEditorOptions
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static int |
EXPLICIT
This flag indicates that the file should always be shown in the "Recent Files" dialog
|
static int |
EXTERNAL
This flag indicates that the file can be optionally opened by external application
|
static int |
FOCUS
Use this flag to put the focus in the editor after it has been created.
|
static int |
RAISE
Use this flag to activate the editor after it has been created.
|
static int |
VALIDATE
Use this flag if you want the editor to be sized right away.
|
Constructor and Description |
---|
OpenEditorOptions() |
OpenEditorOptions(Context context) |
OpenEditorOptions(Context context,
java.lang.Class editorClass) |
Modifier and Type | Method and Description |
---|---|
Context |
getContext() |
java.lang.Class |
getEditorClass() |
int |
getFlags() |
int |
getPosition() |
EditorPath |
getPositionReference() |
void |
setContext(Context context)
Sets the file to be opened.
|
void |
setEditorClass(java.lang.Class editorClass)
The editor type that will be up when the editor is activated.
|
void |
setFlags(int flags)
Sets the flags used to open the file
|
void |
setFlags(int flags,
boolean set)
Sets/clears flags.
|
void |
setPosition(EditorPath reference,
int position)
Sets the position of the new document relative to another.
|
public static final int RAISE
public static final int VALIDATE
public static final int FOCUS
public static final int EXPLICIT
public static final int EXTERNAL
public OpenEditorOptions(Context context)
public OpenEditorOptions(Context context, java.lang.Class editorClass)
public OpenEditorOptions()
public void setContext(Context context)
context
- public Context getContext()
public int getFlags()
public void setFlags(int flags)
public void setFlags(int flags, boolean set)
flags
- the flags to changeset
- true to set, false to clearsetFlags(int)
public java.lang.Class getEditorClass()
public void setEditorClass(java.lang.Class editorClass)
editorClass
- public void setPosition(EditorPath reference, int position)
final EditorPath editorPath = editorManager.searchEditor(document); openEditorOptions.setPosition(editorPath, IdeConstants.NORTH); openEditorOptions.setFlags(OpenEditorOptions.RAISE | OpenEditorOptions.VALIDATE);
reference
- The reference can be obtained with EditorManager.searchEditor(oracle.ide.model.Node)
if position is IdeConstants.FLOATING
then the reference is ignored and can be null.position
- Valid values are IdeConstants.WEST
, IdeConstants.NORTH
,
IdeConstants.EAST
, IdeConstants.SOUTH
and
IdeConstants.TABBED
or IdeConstants.FLOATING
public EditorPath getPositionReference()
public int getPosition()