Bug 328397 - Reduce API tools footprint in releng scenarios
Summary: Reduce API tools footprint in releng scenarios
Status: CLOSED WONTFIX
Alias: None
Product: PDE
Classification: Eclipse Project
Component: API Tools (show other bugs)
Version: 3.7   Edit
Hardware: PC Mac OS X - Carbon (unsup.)
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: PDE API Tools Inbox CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords:
Depends on:
Blocks:
 
Reported: 2010-10-21 15:28 EDT by Jeff McAffer CLA
Modified: 2019-09-09 02:41 EDT (History)
1 user (show)

See Also:


Attachments
patch to decouple API tools (73.89 KB, patch)
2010-10-23 00:03 EDT, Jeff McAffer CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jeff McAffer CLA 2010-10-21 15:28:29 EDT
When trying to use API tools in a releng build scenario you have to consume quite a number of additional bundles to satisfy the requirements of the pde.apitools bundle. In particular, the dependency on pde.core brings in quite a number of other things (jdt.core, resources, launching, ...).  there are also a number of direct dependencies from API tools to things like team.core, jdt.core, text, ...  Many of these are single references from the Util class in pde.apitools.

This bug is to suggest that with what looks like a small amount of refactoring and a little use of optional dependencies, API tools could be quite simply consumed without a workspace, the rest of PDE and JDT.  This would be very useful to folks running build systems other than PDE or even using PDE without the entire IDE present.

I'm happy to help with any classloading or dependency issues that might come up but don't know enough of the code to take a crack at this without help/guidance.
Comment 1 Jeff McAffer CLA 2010-10-23 00:03:57 EDT
Created attachment 181572 [details]
patch to decouple API tools

I took a stab at this and it actually turns out to be relatively easy.  Well, at least I think it is.  The problem is that its hard to test because a) you can't use optional requirements in a feature based launch config (the optional things are added for free) and b) the API tools test suite is setup to use the workspace even for the Ant task tests.  So you can't test the use of API tools when core.resources is absent because core.resources is needed by the test infrastructure.

In any event, attached is a patch (against HEAD) that decouples things a bit more.  Basically the pde.core etc stuff is now optional.  It would be interesting to consider separate bundles for this but that is way beyond my scope of understanding on how the code works.

Summary of key changes
- split Util into two, WorkspaceUtil and Util moving anything that depends on the IDE
- Copy a very modest amount of jdt.core Flags (two tiny methods)

I did not look deeply at the Ant tasks. 

Let me know if this is an interesting direction and we can do further work.
Comment 2 Eclipse Webmaster CLA 2019-09-06 16:08:58 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.
Comment 3 Julian Honnen CLA 2019-09-09 02:41:57 EDT
Please remove the stalebug flag, if this issue is still relevant and can be reproduced on the latest release.