Community
Participate
Working Groups
I have a IClasspathContainerPage [1] that allows to set the test-flag of the claspathcontainer beforehand (instead of using the dialog and hit the "toggle" button). I can see in the debugger that the IClasspathEntry contains the test-flag, but if I finish the wizard the flag is not taken into account. Also if I instantly hot "edit" afterwards the flag is lost. When I use the Toggle button everything works. So it seems to me that somewhere the flag is discarded when returning from the wizard. [1] https://github.com/laeubisoft/osgi-toolbox/blob/main/plugins/de.laeubisoft.osgitoolbox.ui/src/de/laeubisoft/osgitoolbox/ui/container/OSGiClasspathContainerPage.java#L138
(In reply to Christoph Laeubrich from comment #0) > I have a IClasspathContainerPage [1] that allows to set the test-flag of the > claspathcontainer beforehand (instead of using the dialog and hit the > "toggle" button). I can see in the debugger that the IClasspathEntry > contains the test-flag, but if I finish the wizard the flag is not taken > into account. > Also if I instantly hot "edit" afterwards the flag is lost. When I use the > Toggle button everything works. So it seems to me that somewhere the flag is > discarded when returning from the wizard. > > > [1] > https://github.com/laeubisoft/osgi-toolbox/blob/main/plugins/de.laeubisoft. > osgitoolbox.ui/src/de/laeubisoft/osgitoolbox/ui/container/ > OSGiClasspathContainerPage.java#L138 Looking at the code [1], you never set the flag isTest unless through the toggle button. In getSelection(), you always create a new entry to return and set the TEST property using the value of the isTest flag. Am I missing something?
is initialized in setSelection isTest = containerEntry.isTest(); and toggled via the button. I also checked ClasspathContainerDefaultPage and its also returning a new entry every time, as IClasspathEntry is modifiable, if I start with debugger I see that the flag is toggled as expected extraAttributes IClasspathAttribute[1] (id=276) [test=false] and extraAttributes IClasspathAttribute[1] (id=298) [test=true] so I would assume that this works, or do I get your question wrong? If I toggle the flag with the toggle button in the Libraries tab this is reflected in my dialog as well so I assume that this also works.
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. -- The automated Eclipse Genie.