Best approach for QuickFixes

Hi,

We currently are implementing the "Import Class" fix via a custom annotator.  I'm looking at how to best to implement the "Create X" quickfix on unknown types (e.g. "Create Class Foo")

I see that there is a service called com.intellij.codeInsight.intention.QuickFixFactory.  Should I look at implementing the quick fix this way?  Or should I use the annotator (which seems more consistent)?

Thanks,
Carson

2 comments
Comment actions Permalink

Hello Carson,

QuickFixFactory is something else entirely - it's a service that provides
a clean way to reuse IDEA's built-in fixes by third-party plugins. Custom
language plugins can register quickfixes either from annotators or from inspections,
depending on whether the highlighting and the corresponding quickfix can
be turned off by the user.

We currently are implementing the "Import Class" fix via a custom
annotator.  I'm looking at how to best to implement the "Create X"
quickfix on unknown types (e.g. "Create Class Foo")

I see that there is a service called
com.intellij.codeInsight.intention.QuickFixFactory.  Should I look at
implementing the quick fix this way?  Or should I use the annotator
(which seems more consistent)?


--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"


0
Comment actions Permalink

Got it.  We'll use our custom annotator then.

Thanks.

Cheers,
Carson

0

Please sign in to leave a comment.