Bug 281223 - [ltk] org.eclipse.ltk.ui.refactoring should not have dependencies on IDE and Team bundles
Summary: [ltk] org.eclipse.ltk.ui.refactoring should not have dependencies on IDE and ...
Status: ASSIGNED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.5   Edit
Hardware: All All
: P5 enhancement with 1 vote (vote)
Target Milestone: ---   Edit
Assignee: JDT-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-06-23 10:43 EDT by Philipp Kursawe CLA
Modified: 2011-07-07 03:38 EDT (History)
6 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Philipp Kursawe CLA 2009-06-23 10:43:58 EDT
It would be nice if the LTK UI bundle would not depend on all the compare,editors,team and IDE bundles. I assume it does depend on them to provide the preview viewer for textual changes. However it would be better if the preview viewer could be moved into a separate bundle. That way the LTK UI would be usable inside a standard RCP application.
Comment 1 Dani Megert CLA 2009-06-23 10:47:55 EDT
Are you saying you would want to re-implement the whole preview/compare stuff?
Comment 2 Philipp Kursawe CLA 2009-06-23 11:34:41 EDT
No, Dani. I just do not need it in my case. I am developing a warehouse management RCP. We do not do text changes but for instance changes on orders. I would have to implement my own IChangeViewer anyway (to display a map of the warehouse, or a list of new goods in a tray if you have a goods move change).
It would be nice if we could factor the IDE/Editor/Text code out of the base ltk UI bundle, or otherwise I would have to implement my own LTK UI all-together.
LTK is very nice. I was about to implement something like that myself. Despite its name, its fitting my domain perfectly well :)
Comment 3 Dani Megert CLA 2009-06-23 11:38:50 EDT
If size of your RCP doesn't matter too much you could simply life with the additional bundles for now. Maybe you have to cut away some unwanted UI contributions though.
Comment 4 Philipp Kursawe CLA 2009-06-23 14:10:24 EDT
This is indeed a very big size overhead. I would rather implement my own very little wizard then to perform the change operations. Or copy the code for the wizards from ltk.
Also is it currently possible in LTK to have participants contribute to the UI too? For instance, in my special case, lets say I want the user to decide to reassign a picker to an order after the split process has been performed. The participant would have to let the user choose a picker to assign to the newly created orders and therefore the user should choose one from a listbox/combo. The refactoring process of course does not know about this special requirement of the participant. The UI code that generates the wizard would have to allow the participant to add content to the wizard. I know that participants are in Core and have no access to the UI. However they are supplied with the refactoring parameters. If maybe another extension could create a view binding to the particpant and create additional data for it that it then can use for its change creation?
Comment 5 Dani Megert CLA 2009-06-24 03:47:05 EDT
>Also is it currently possible in LTK to have participants contribute to the UI
>too?
No, see bug 68609.
Comment 6 Philipp Kursawe CLA 2009-06-24 06:06:19 EDT
Thanks Dani, I have commented to that bug. What do you think of splitting the compare stuff and preview viewer out of the base ltk UI bundle? Would that be possible to do?
Comment 7 Dani Megert CLA 2009-06-24 09:48:34 EDT
>What do you think of splitting the
>compare stuff and preview viewer out of the base ltk UI bundle?
We'd have to see how much the separation really brings given it was not designed to run in RCP only. For sure not something we plan to do but if someone has time and wants to try it we can take a look at the patch.
Comment 8 Philipp Kursawe CLA 2009-06-25 12:00:23 EDT
I will try to do it and check in a patch
Comment 9 Karsten Thoms CLA 2010-09-02 03:44:19 EDT
Could the dependencies to the team plugins be set to optional, please? If I try to set up a minimal run configuration the team.core and team.ui plugins are included into the configuration, just because they are not optional. The impact should be minimal.
Comment 10 Dani Megert CLA 2010-09-03 02:28:56 EDT
>Could the dependencies to the team plugins be set to optional, please? 
Which parts of LTK UI are you using that don't require Team?
Comment 11 Karsten Thoms CLA 2010-09-05 15:03:32 EDT
I want to set up a minimal launch config for a GMF editor. It requires at least org.eclipse.ui.workbench, which includes org.eclipse.ui.navigator.resources, which has a dependency to ltk.core.refactoring and ltk.ui.refactoring. The same issue there, it would be nice if they don't strongly rely on LTK. However, if o.e.ui.navigator.resources is in the launch config, it pulls the both ltk plugins, which include o.e.team. In my situation I neither want ltk to be included nor the team plugins. The config should really be minimal.
I think it would not harm for LTK if the dependency is optional, wouldn't it?
Comment 12 Dani Megert CLA 2010-09-14 10:51:24 EDT
In order to mark a bundle optional, we would have to exactly define which parts of the main bundle still work and which don't if the optional bundle is not present. This is too much work for us to do at this point.
Comment 13 Markus Keller CLA 2010-11-19 09:40:12 EST
(In reply to comment #12)
> In order to mark a bundle optional, we would have to exactly define which parts
> of the main bundle still work and which don't if the optional bundle is not
> present. This is too much work for us to do at this point.

I agree. But to solve Karsten's problem (comment 11), we would only have to touch org.eclipse.ui.navigator.resources.ResourceDropAdapterAssistant and pull out the direct dependencies on the ltk.*.refactoring plug-ins. Then we could make org.eclipse.ui.navigator.resources only depend optionally on the ltk.*.refactoring plug-ins.

I won't have time to implement this, but I can review a patch if someone writes one.