Community
Participate
Working Groups
3.1 Steps to reproduce: - Open a public source type using Open Type - Change visibility of the type to default - Open the type again -> Type history displays the type as public, the workspace type match is correctly displayed as default
Thanks to a tip from Markus there is an easy fix for this problem now that we are listening to Java element deltas. I will attach the patch. Dani, Markus can you please comment on whether you think this is important for 3.1.1 (as a developer of a feature you are mostly biased) and if yes comment on the patch. The problem is that the stale history doesn't go away even if you shutdown Eclipse since the history gets persisted.
Created attachment 26898 [details] The patch
Created attachment 26899 [details] Complete patch ;-)
One additional note: makeing fModifiers not final isn't a problem since it isn't involved in equals and hashCode.
It looks quite strange and the fix is easy. +1
Created attachment 26903 [details] optimized patch > The problem is that the stale history doesn't go away even if you shutdown > Eclipse since the history gets persisted. That's the point which makes me say +1 for 3.1.1. The patch looks good, except for one spot that could be optimized for performance: In processDelta(..), the added test (isChanged && (delta.getFlags() & IJavaElementDelta.F_MODIFIERS) != 0) is currently executed for IJavaElement.JAVA_MODEL, JavaElement.PACKAGE_FRAGMENT, and IJavaElement.CLASS_FILE as well, but it only makes sense for JavaElement.TYPE. The attached patch has already been reviewed by Dani.
Thanks for the review and the optimized performance. Fix released to 3.1.1 and HEAD.
verified fixed in M20050923-1430