Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[eclipse-dev] Variables in UserLibrary

I've implemented the ability to use Classpath Variables in the definition of a User Library, but there are 2 minor issues which I'd like to resolve before submitting a patch, so hopefully someone here can help. Both issues have to deal with the preference page - the underlying functionality works (dare I say it :) flawlessly.

Firstly, I reused the NewVariableEntryDialog class for creating the variable. It has a button "Configure...", which normally takes one to the classpath variable preference page. This is a problem since I'm in a dialog that was created from the User Library preference page. Right now I just have it disabled, but it would be nice if I had an easy way to pop up the same preference page in a dialog.

Secondly, and more of a concern, my UserLibraryContainer.getClasspathEntries() resolves the variables before returning the result so that things work smoothly with the java build path (by spec, CPE_CONTAINER cannot return CPE_VARIABLEs). When I first define a user library, the ClasspathContainer is of type CPUserLibraryElement.UpdatedClasspathContainer, and so the preference page sees the variable nature of the classpath entries because this class does not resolve variables (which is against spec but...). However if I have restarted eclipse since I defined my user library, then the type of the user library is UserLibraryContainer, and thus the preference page no longer sees the variable nature. Any ideas on the best way to resolve this?

If none of this makes sense, I could always submit the patch to help clear things up.



Back to the top