Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [ease-dev] GSoC code competion commits

Hi Christian,

I can understand your concern about the IModuleWrapper interface, I actually just implemented the code there because you suggested it in the initial refactor mail. I guess the best solution would be to add a new interface that provides code completion for each scripting language. The actual implementation of the interface can be done very fast, because I only need to move the corresponding methods. One problem I have at the moment is where to integrate the querying for the instance. The IScriptService interface has a method to get the ModuleWrapper and it would probably be best to add a method to get the CompletionAnalyzer there as well. If I change the IScriptService interface though, we are back to where we started. One solution would be to create a new extension for this code analyzer and add a static method in the concrete ScriptService implementation to query for it. Do you have any other/better solutions?

Regarding the hardcoded completion providers, I was already working on this. I needed to change the extension point to take care of the things you mentioned, that's why I haven't committed it yet. The providers were hardcoded because it was the fastest way to show they are working.

I guess it will be easiest if I discard the commits after the one breaking the interface, wait for the new interface to be accepted and then commit the following changes again. Most of them do not depend on the interface directly (they only need a refined context) and I could reintegrate everything very fast (mostly copy + paste).

I actually gave every commit a different message but always started out with the bug ID line and since Hudson only displays the first line of a commit message this may have let to some confusion. I will open some more bugs to make distinguishing a bit easier...

Hope this sheds some light on the situation and that we can fix this fast and move on to more fun stuff :-)

Best regards,
Martin


Am 2015-07-31 um 23:24 schrieb Christian Pontesegger:
Hi Martin,

your latest commits brought us in a delicate situation.
You commited 14 topics, all depending on each other. Some of them will need some adaptions/discussions. But if 1 patch set is declined, the next elements in the chain cannot be merged anymore. So you have to step back to the first declined topic and start from there to rework the topic. Also having 14 commits with the exact same commit message is not exactly what I was expecting. As discussed offline: smaller commits do not only help to avoid the 1000 LOC rule. They also help to cluster topics and make reviews easier.

One major concern of mine are those changes to the IModuleWrapper interface. While you adapted the one for Rhino, your changes will break compatibility for our external interpreters for Python, Groovy and Ruby. IModuleWrappers are there to generate code chunks, so I think they might be useful when you want to convert a java call to a scripted command, but currently I see no point in changing them for code completion proposals. If you think these changes are needed, we should discuss it on the list.

A second topic is that the script shell should not need knowledge of several code completion implementations. Your adapter should take care of chosing the correct completion providers depending whether we are working on a live interpreter or within an editor. So one option would be to set a script interpreter instance and/or a script type in the adapter. Then the adapter can chose matching completion providers by itself.

Completion providers generally should not be hard coded into the system. We should use extension points to register them along with some metadata (eg a language filter, whether they are applicable on a script interpreter or also offline, ...). Then the adapter should load them dynamically depending on the environment.

HTH
Christian
_______________________________________________
ease-dev mailing list
ease-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/ease-dev



Back to the top