Skip to main content



      Home
Home » Modeling » TMF (Xtext) » Self-triggered Autocomplete
Self-triggered Autocomplete [message #1053469] Mon, 06 May 2013 03:38 Go to next message
Eclipse UserFriend
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 04:28 Go to previous messageGo to next message
Eclipse UserFriend
Hi,

digg into DefaultAutoEditStrategyProvider
Re: Self-triggered Autocomplete [message #1053546 is a reply to message #1053478] Mon, 06 May 2013 09:12 Go to previous messageGo to next message
Eclipse UserFriend
Hi Christian,
thank you for help .
Re: Self-triggered Autocomplete [message #1053557 is a reply to message #1053478] Mon, 06 May 2013 10:07 Go to previous messageGo to next message
Eclipse UserFriend

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 10:24 Go to previous messageGo to next message
Eclipse UserFriend
Sorry no idea
Re: Self-triggered Autocomplete [message #1053572 is a reply to message #1053561] Mon, 06 May 2013 10:56 Go to previous messageGo to next message
Eclipse UserFriend
Hi Christian

Thank you
Re: Self-triggered Autocomplete [message #1053588 is a reply to message #1053561] Mon, 06 May 2013 11:54 Go to previous message
Eclipse UserFriend
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 Jul 22 18:01:12 EDT 2025

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

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

Back to the top