Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Xtext Intellij Quick FIx
Xtext Intellij Quick FIx [message #1733654] Mon, 30 May 2016 17:40 Go to next message
Didier Didos is currently offline Didier DidosFriend
Messages: 14
Registered: April 2016
Junior Member
Hello,

I've implemented a quickfix using ISemanticModification interface.
I'de like to enable/do same thing using Intellij plugin.

Is it possible? Is there a sample somewhere?

Alternative using content assist?

Thanks for help
Re: Xtext Intellij Quick FIx [message #1733658 is a reply to message #1733654] Mon, 30 May 2016 18:28 Go to previous message
Anton Kosyakov is currently offline Anton KosyakovFriend
Messages: 9
Registered: March 2016
Junior Member
Hi,

No, you cannot use ISemanticModification for IntelliJ, since it is Eclipse specific API.

Please have a look at MyDslIntentionsProvider in the attached example. It registers an instance of CapitalizeNameIntentionAction intention for the invalid name issue. An intention in Intellij is an action that is used to fix a particular problem, similar to quick fixes in Eclipse. This intention uses document API to change the content. As an alternative you can change the psi model which will be synchronized with the document later. MyDslIntentionsProvider is bound in MyDslIdeaModule as an implementation of IdeaIntentionsProvider interface.

FYI:
1. get source code of Intellij CE and use Intellij to navigate whenever you have a question regarding usage of some Intellij API;
2. get familiar with basics of Intellij: http://www.jetbrains.org/intellij/sdk/docs/basics.html.

Regards,
Anton


Get professional support from the Xtext committers at www.typefox.io.

[Updated on: Mon, 30 May 2016 18:29]

Report message to a moderator

Previous Topic:TemplateProposal does not get inserted any more
Next Topic:Gradle RunIdea task error
Goto Forum:
  


Current Time: Sat Nov 16 02:29:07 GMT 2019

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

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

Back to the top