Skip to main content



      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 12:45 Go to next message
Eclipse UserFriend
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 14:41 Go to previous messageGo to next message
Eclipse UserFriend
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)
Re: How to add quickfix with LINKING_DIAGNOSTIC in xbase expression [message #1808195 is a reply to message #1808187] Wed, 19 June 2019 01:29 Go to previous messageGo to next message
Eclipse UserFriend
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 07:11 Go to previous message
Eclipse UserFriend
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: Sun Mar 16 04:41:56 EDT 2025

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

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

Back to the top