|
org.netbeans.spi.editor.hints/0 1.24.0 7 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.netbeans.spi.editor.hints.ChangeInfo
public final class ChangeInfo
Represents a set of changes made by a hint. Note that the start/end parameters refer to offsets that should be selected, not to the general offsets of the modified element.
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.
| Nested Class Summary | |
|---|---|
static interface |
ChangeInfo.Change
Interface representing a single caret-positioning or user-modifiable change. |
| Constructor Summary | |
|---|---|
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. |
|
| Method Summary | |
|---|---|
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()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public ChangeInfo(FileObject fileObject,
Position start,
Position end)
public ChangeInfo(Position start,
Position end)
public ChangeInfo()
| Method Detail |
|---|
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
public String toString()
toString in class Object
|
org.netbeans.spi.editor.hints/0 1.24.0 7 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||