classpathContainerPage edit [message #242771] |
Thu, 12 April 2007 11:09  |
Eclipse User |
|
|
|
I have written an IClasspathContainerPage implementation that works fine
when clicking 'Add Library...' to add a new instance of the container.
It does not work, however, when selecting the container and clicking
'Edit...'. The container page class extends WizardPage and implements
IClasspathContainerPage and IClasspathContainerPageExtension. I do not
see anything in the Eclipse error log and the class is not called at all
when 'Edit...' is clicked. This would seem to point to an incorrect id
attribute in the classpathCotnainerPage extension, but I have verified
that the id attribute of my classpathContainerPage extension is the same
as the attribute in the classpathContainerInitializer extension. I am
working on Eclipse 3.2.2. I don't think this extension is broken since
the 'Edit...' works fine for the JRE container. What might I be doing
wrong?
|
|
|
Re: classpathContainerPage edit [message #242797 is a reply to message #242771] |
Thu, 12 April 2007 18:12  |
Eclipse User |
|
|
|
Aaron J Tarter wrote:
> I have written an IClasspathContainerPage implementation that works fine
> when clicking 'Add Library...' to add a new instance of the container.
> It does not work, however, when selecting the container and clicking
> 'Edit...'. The container page class extends WizardPage and implements
> IClasspathContainerPage and IClasspathContainerPageExtension. I do not
> see anything in the Eclipse error log and the class is not called at all
> when 'Edit...' is clicked. This would seem to point to an incorrect id
> attribute in the classpathCotnainerPage extension, but I have verified
> that the id attribute of my classpathContainerPage extension is the same
> as the attribute in the classpathContainerInitializer extension. I am
> working on Eclipse 3.2.2. I don't think this extension is broken since
> the 'Edit...' works fine for the JRE container. What might I be doing
> wrong?
I found the problem... I was extending the abstract
org.eclipse.jdt.core.ClasspathContainerInitializer, but I was not
overriding the default canUpdateClasspathContainer() method, so it was
returning false. Apparently, if this does not return true, then the
default page
(org.eclipse.jdt.internal.ui.wizards.buildpaths.ClasspathCon tainerDefaultPage)
is called when the user clicks 'Edit...'. It is not very clear the
javadoc or in the extension documentation that the
canUpdateClasspathContainer() on the initializer is controlling this.
|
|
|
Powered by
FUDForum. Page generated in 0.05498 seconds