Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » How to add quickfix with LINKING_DIAGNOSTIC in xbase expression
How to add quickfix with LINKING_DIAGNOSTIC in xbase expression [message #1808181] Tue, 18 June 2019 16:45 Go to next message
Missing name Mising name is currently offline Missing name Mising nameFriend
Messages: 6
Registered: June 2019
Junior Member
Hi,

I created a DSL like https://github.com/LorenzoBettini/packtpub-xtext-book-2nd-examples/tree/master/org.example.xbase.entities.parent using Xbase

I typed this code
entity A {

}

entity B {
  op test() {
      val a = new A
      a.nonExistingField
  }
}


Now I would like to add a quickfix to create the 'nonExistingField' to entity A.

How can I achieve this ?

I tried to create a Quickfix but I only have Jvm elements and not my model...

Thanks in advance
Re: How to add quickfix with LINKING_DIAGNOSTIC in xbase expression [message #1808187 is a reply to message #1808181] Tue, 18 June 2019 18:41 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
hi, can you be more specific about your problem?
- what do you want to do (e.g. pseudo code)
- what dont you have in hand?

you may have a look at the missing member quickfixes in xtend (org.eclipse.xtend.ide.quickfix.CreateMemberQuickfixes)


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: How to add quickfix with LINKING_DIAGNOSTIC in xbase expression [message #1808195 is a reply to message #1808187] Wed, 19 June 2019 05:29 Go to previous messageGo to next message
Tamas Miklossy is currently offline Tamas MiklossyFriend
Messages: 157
Registered: February 2016
Senior Member
You can find a detailed description with examples in the book of Lorenzo Bettini:
Implementing Domain-Specific Languages with Xtext and Xtend (Second Edition)
- Quickfixes for default validators (page 82)
Re: How to add quickfix with LINKING_DIAGNOSTIC in xbase expression [message #1808210 is a reply to message #1808195] Wed, 19 June 2019 11:11 Go to previous message
Missing name Mising name is currently offline Missing name Mising nameFriend
Messages: 6
Registered: June 2019
Junior Member
Hi,

Thank you very much Christian ! I found the answer to my problems:

  • CommonTypeComputationServices
  • ILogicalContainerProvider

About the books, I sold the first edition a long time ago. Maybe I have to buy the second one !
Previous Topic:extension of the dsl files
Next Topic:Eclipse 2019-06 + Xtext 2.18
Goto Forum:
  


Current Time: Thu Apr 25 04:46:37 GMT 2024

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

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

Back to the top