Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[flux-dev] Fw: Quick Fix/Assist design discussion

Hello,

Here's what I have so far on the quick assist:




I am just making use of the hover service (given my limited skill with _javascript_ and little knowledge on Orion code) for now to display the list of proposals as a bullet list. Eventually, this will be something like the content assist service, so the user can select one of the proposed fixes. The way quick assist is written in JDT/UI, the assist logic is spread across multiple assist processors. For now, I only pulled what appeared to be the easiest of cases, but for prototyping, we can pick few more nice examples. After some clean up, I will try to put this in a fork, so people can play around with it.

Regards,
Jay

----- Forwarded by Jayaprakash Arthanareeswaran/India/IBM on 10/27/2014 09:30 PM -----

From:        John Arthorne/Ottawa/IBM@IBMCA
To:        Jayaprakash Arthanareeswaran/India/IBM@IBMIN@IBMAU@IBMUS
Cc:        "Martin Lippert" <mlippert@xxxxxxxxx>
Date:        10/15/2014 11:13 PM
Subject:        Re: Quick Fix/Assist design discussion



I have some thoughts on this, but would you mind repeating the question on the flux-dev mailing list so other interested people can join in? I hate making these design decisions in private email chains because I can never find them later when I want to refer back to them!

John




From:        Jayaprakash Arthanareeswaran/India/IBM@IBMIN
To:        John Arthorne/Ottawa/IBM@IBMCA, "Martin Lippert" <mlippert@xxxxxxxxx>,
Date:        10/15/2014 12:55 PM
Subject:        Quick Fix/Assist design discussion



Hi,

So, I have been thinking about the quick assist/fix and in the process of developing a prototype. I kind of figured out a way to isolate the JDT/UI code (code duplicated in Flux, of course). But wanted to share my thoughts and seek inputs on what we want the JDT's quick fix services should provide. I can think of these approaches:

The JDT service will send the list of proposals to the client (via Fux). When the user selects a proposal, JDT receives the proposal selection and performs an AST Rewrite. Now we have two options from here on:
     (a) JDT calculates the AST Rewrite and sends the content delta - the delta would be list of content changes where as 'change' should be one of "insert", "deletion" or "replacement" along with source ranges.
     (b)  JDT not only calculates the AST Rewrite, it updates the Java file itself and the Orion editor gets the updated content eventually.

I think (a) makes lot of sense to me and could be useful in other scenarios too. But I am not sure if the Orion editor has such a capability. Let me know what you think. Perhaps we can discuss more in tomorrow's call.

Regards,
Jay



Back to the top