Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Self-triggered Autocomplete
Self-triggered Autocomplete [message #1053469] Mon, 06 May 2013 07:38 Go to next message
junior developer is currently offline junior developer
Messages: 335
Registered: January 2013
Senior Member
Hi all,

When I write program, i want to auto generate a guid for every meta class instance automatically.

Example:I wanted

Filesystem default { quid ="sss33432"
Drive D { guid ="2243rdffgf"
File filename guid="dfdf5" ;}

quid ="sss33432" is generated automatically. Hence, i want to user dont write guid,it is generated automatically from program when user write ' Filesystem default{ ' then it must triggered from program and program must write generated guID (from java class).

is it possibble ? If possible how can i implement this feature to my DSL ?

Regards
Re: Self-triggered Autocomplete [message #1053478 is a reply to message #1053469] Mon, 06 May 2013 08:28 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian Dietrich
Messages: 6298
Registered: July 2009
Senior Member
Hi,

digg into DefaultAutoEditStrategyProvider
Re: Self-triggered Autocomplete [message #1053546 is a reply to message #1053478] Mon, 06 May 2013 13:12 Go to previous messageGo to next message
junior developer is currently offline junior developer
Messages: 335
Registered: January 2013
Senior Member
Hi Christian,
thank you for help .
Re: Self-triggered Autocomplete [message #1053557 is a reply to message #1053478] Mon, 06 May 2013 14:07 Go to previous messageGo to next message
junior developer is currently offline junior developer
Messages: 335
Registered: January 2013
Senior Member

Hi Christian ,

I used DefaultAutoEditStrategyProvider and i have been solve my problem. But When i add

string to end of program my offset of cursor not localate to end of string. So i want

to ask u How can i change my cursor location ?

Regards

Re: Self-triggered Autocomplete [message #1053561 is a reply to message #1053557] Mon, 06 May 2013 14:24 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian Dietrich
Messages: 6298
Registered: July 2009
Senior Member
Sorry no idea
Re: Self-triggered Autocomplete [message #1053572 is a reply to message #1053561] Mon, 06 May 2013 14:56 Go to previous messageGo to next message
junior developer is currently offline junior developer
Messages: 335
Registered: January 2013
Senior Member
Hi Christian

Thank you
Re: Self-triggered Autocomplete [message #1053588 is a reply to message #1053561] Mon, 06 May 2013 15:54 Go to previous message
Sebastian Zarnekow is currently offline Sebastian Zarnekow
Messages: 2829
Registered: July 2009
Senior Member
Am 06.05.13 16:24, schrieb Christian Dietrich:
> Sorry no idea
You may want to implement ISourceViewerAware which allows you to access
the source viewer in your auto edit strategy. This will in turn provide
means to set the selection, e.g. the cursor position.

Regards,
Sebastian
--
Looking for professional support for Xtext, Xtend or Eclipse Modeling?
Go visit: http://xtext.itemis.com
Previous Topic:ambiguity in the grammar
Next Topic:Weird Scope provider behavior
Goto Forum:
  


Current Time: Tue Sep 16 23:29:19 GMT 2014

Powered by FUDForum. Page generated in 0.01852 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software