public final class ChangeInfo extends Object
In other words, a change generated by a hint can generate things like variable names; ChangeInfo provides a list of generated code which the user might want to modify/replace with their own text. The start/end offsets are offsets into the file in question, which determine selection start/end in the editor.
This class provides for a list of changes, anticipating "live template" support (where the user confirms each generated element). Currently only the first change provided is used.
Modifier and Type | Class and Description |
---|---|
static interface |
ChangeInfo.Change
Interface representing a single caret-positioning or user-modifiable
change.
|
Constructor and Description |
---|
ChangeInfo()
Create an empty instance of ChangeInfo .
|
ChangeInfo(FileObject fileObject,
Position start,
Position end)
Create an instance of ChangeInfo prepopulated with a
single change
|
ChangeInfo(Position start,
Position end)
Create an instance of ChangeInfo prepopulated with a
single change without associated file object.
|
Modifier and Type | Method and Description |
---|---|
void |
add(FileObject fileObject,
Position start,
Position end)
Adds one change.
|
ChangeInfo.Change |
get(int i)
Getter for the i-th change
|
int |
size() |
String |
toString() |
public ChangeInfo(FileObject fileObject, Position start, Position end)
public ChangeInfo(Position start, Position end)
public ChangeInfo()
public final int size()
public final void add(FileObject fileObject, Position start, Position end)
fileObject
- start
- end
- public final ChangeInfo.Change get(int i)
i
- index of the change