Community
Participate
Working Groups
When you type the name of an unknown class the ctrl-space quick-assist should provide a list of classes not only from the already imported packages/bundles but from the whole target platform (PDE) and add the package to the bundles imports if not already imported. This would greatly help reduce clicks to first import a package to use classes from it. Furthermore the "The type <some class> cannot be resolved. It is indirectly referenced from required .class files" could also automatically add the needed import package to the bundle.
We kind of have a quickfix that does this already Philipp: http://archive.eclipse.org/eclipse/downloads/drops/S-3.4M2-200709210919/eclipse-news-M2.html Look at the N&N for 3.4M2 To assist plug-in developers, extra validation was added to help with access restriction issues that could be solved by exporting a package. For example, say you have two plug-ins: a and b. If a attempts to use a class from b and b doesn't export the package containing the class, you'll receive a warning and applicable quickfix. Does this work for you? Is it not working for you?
Thanks for the quick response. This only partially helps my second request. The first one about adding packages from classes contained in packages of the tartget platform would still be nice to have, wouldn't it?
Ok, fair enough, I see what you're trying to do. We can try to improve what we already have available by hooking into JDT problems.
Thanks! I think you should make this feature an optional one, cause it can cause a big hog on the memory consumption if you have a big target-platform. Thanks for considering!
not planned for 3.5
*** Bug 352523 has been marked as a duplicate of this bug. ***
Marking as a duplicate of a more recent fix that adds import package/require bundle proposals for unknown classes. *** This bug has been marked as a duplicate of bug 381975 ***