|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Re: Auto complition [message #1058944 is a reply to message #1058942] |
Wed, 15 May 2013 20:52 |
|
hmmm still have no clue if you need the xtext model (AST) to decide what the text is or not ?!?
can it be BlaBla web app too?
you may use this as starting point
if (command.offset > 0 && "{".equals(command.text)) {
IRegion r = u.searchBackwardsInSamePartition("Web", document, command.offset);
String text = document.get(r.getOffset(), command.offset-r.getOffset());
String textx = "Web " + text.substring(4).replaceAll(" ", "") + "";
document.replace(r.getOffset(), command.offset-1-r.getOffset(), textx);
}
i dont know if is a good idea to go that way. since the edit strategy is not xtext specific you might find examples
at other places.
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
|
|
|
|
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.08857 seconds