Lincoln,
1) I agree that we should get the framework in case and try to find at least one rule we
can test the basic functionality on, even if its a fake custom rule that replaces
<hello></hello> with <world></world>
2) From the Eclipse point of view I would need an API I could call that would say based on
this current input you give me what to replace it with. Then if memory severs correctly
what your API could return is a template that then Eclipse UI asks the user to fill out,
like here is what we are going to replace the code with, but give me thge name of this
variable or method or property that I can't infer from the existing code. Make sense?
~Ian
----- Original Message -----
From: "Lincoln Baxter, III" <lincolnbaxter(a)gmail.com>
To: "Windup-dev List" <windup-dev(a)lists.jboss.org>
Sent: Tuesday, April 28, 2015 1:52:27 PM
Subject: Re: [windup-dev] Sugested Fix Hints
Mostly, I'm having trouble thinking of any cases where we actually know the code that
we could replace. I think this is something we could begin to do, but it is largely a rule
quality issue. We just don't have the expert knowledge to supply this kind of info
yet. It's a problem we're thinking about. That said, having the functionality in
place for it might be a good idea.
Can templates be provided programmatically?
On Tue, Apr 28, 2015 at 12:17 PM, Ian Tewksbury < itewk(a)redhat.com > wrote:
Liconln,
I plan on including the links in the Warning/Error messages.
As far as quick fix, for the dead simple low hanging fruit it would need to be replace the
detected code with this code. Maybe there isnt such any cases.
The next more complicated case is replace detected code with this code template, then we
can use the template API in eclipse to fill out the template based on other information.
Then the last level up is to add an action to apply all the windup quick fixes at once.
So there would really just need to be one new API, "getSuggestedReplacment" (or
something like that). WHich would then return a block of code to replace the detected code
with. Later we can figure out how we could do Templating through that.
Do you think there are any cases where a template would not be needed?
~Ian
From: "Lincoln Baxter, III" < lincolnbaxter(a)gmail.com >
To: "Windup-dev List" < windup-dev(a)lists.jboss.org >
Sent: Tuesday, April 28, 2015 11:06:14 AM
Subject: Re: [windup-dev] Sugested Fix Hints
Hey Ian,
Hints are just HTML/Markdown, and don't provide anything that would really be useful
for a quick fix at this point, but... they should have the ability to include Links/HREFs
as well. If you look at the windup-tooling-api, you should see Hint, Classification, and
Link.
How do you envision the quick fix stuff working? What type of information would we need to
give you?
Does that answer your question?
Thanks!
~Lincoln
On Mon, Apr 27, 2015 at 8:24 AM, Ian Tewksbury < itewk(a)redhat.com > wrote:
<blockquote>
All,
Do any of the hints have a "suggested fix" built into them. I was looking at the
hint API but didnt see such a thing, but I know it had been talked about in the past.
If such a thing exists I want to detect hints with "suggested code fixes" and
auto generate Eclipse quick fixes for those hints so people can easily apply the quick
fixes to knock out the easy stuff in an automated fashion.
~Ian
_______________________________________________
windup-dev mailing list
windup-dev(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/windup-dev
--
Lincoln Baxter, III
http://ocpsoft.org
"Simpler is better."
_______________________________________________
windup-dev mailing list
windup-dev(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/windup-dev
_______________________________________________
windup-dev mailing list
windup-dev(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/windup-dev
</blockquote>
--
Lincoln Baxter, III
http://ocpsoft.org
"Simpler is better."
_______________________________________________
windup-dev mailing list
windup-dev(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/windup-dev