Issue Details (XML | Word | Printable)

Key: IVYDE-82
Type: Bug Bug
Status: Resolved Resolved
Resolution: Won't Fix
Priority: Major Major
Assignee: Unassigned
Reporter: Nicolas Lalevée
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
IvyDE

Empty containers disappear with Eclipse 3.3

Created: 04/Mar/08 10:38 AM   Updated: 03/Aug/08 04:19 PM
Component/s: None
Affects Version/s: 2.0.0.alpha1
Fix Version/s: None

Time Tracking:
Not Specified

Environment:
with the IVYDE-70 patch
Eclipse 3.3, Eclipse 3.4M4

Resolution Date: 03/Aug/08 04:19 PM


 Description  « Hide
If the resolved dependencies are empty, due to an empty dependency tree or some dependencies errors, then the class path container disappears.

 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Nicolas Lalevée added a comment - 04/Mar/08 10:42 AM
I have found some code in m2eclipse, the Maven eclipse plugin that conatins a workaround to an eclipse missing feature. It refers to https://bugs.eclipse.org/bugs/show_bug.cgi?id=154071

I have tested the workaround, it make eclipse work better, even if as explain in the Maven plugin code a refresh of the project might be needed.

I cannot provide a patch as my working copy of IvyDE contains too many patch, maybe I should give a try to have a local svn-git repo.


Nicolas Lalevée added a comment - 01/Apr/08 10:02 AM
After looking deeply into Eclipse, it seems to be the normal behaviour. The same happens with the maven classpath container.

Knowing that the only way to trigger the resolve is to configure the container, it is problematic when the container doesn't show up. So I think we should let the container disappear, but add an entry in the context menu on the project to allow the user to trigger a resolve.


Xavier Hanin added a comment - 01/Apr/08 12:54 PM
Adding an action on the project would be interesting (ATM the only workaround is to use the resolve all action in the toolbar).

Another way to circumvent the problem would be to add a jar in the classpath when it's actually empty. For instance a jar called empty.jar, generated on the fly, and containing no class at all. In case of errors, we could name it error.jar. It's just a trick, but it would at least avoid to have people calling multiple times "Add Ivy library" when they don't see the container appear.

WDYT?


Nicolas Lalevée added a comment - 01/Apr/08 02:07 PM
I thought of that one, but it seems so dirty.
And note also that the current context menu on the classpath container is in fact bind on every classpath container. For instance, if I have a maven classpath container and an ivy one, I can right-click on the maven container, choose Edit, and then I get the editor of the ivy.xml, which is quite confusing (well, we could consider it as a feature to do some Ivy envangelism )
So it might be a good idea to refactor the ivy context menus too. But I am not sure how.

For the record, here is the Eclipse bugzilla entry about empty containers: https://bugs.eclipse.org/bugs/show_bug.cgi?id=167682


Xavier Hanin added a comment - 01/Apr/08 02:46 PM
I agree the hack I suggest is dirty. But I wonder if it isn't even worse to have the container disapear when we have an error, or even just when there's no dependency. People are really confused by this... With the trick I think people will understand much more easily. So, should we defend cleaness or ease of understanding? I don't know...

About the context menu, I agree it would be nice to have a finer grain control over when it is displayed.


Nicolas Lalevée added a comment - 03/Aug/08 04:18 PM
In Eclipse 3.4, there is now a filter option to allow to see "Empty library container".
So as there is a workaround to still be able edit the configuration of ivy container for Eclipse 3.3, I will close it as "Won't fix". Please reopen if somebody disagree.
I will add some doc about it.