Bug 108840 - [open type] open type shows duplicate entry after type visibility change
Summary: [open type] open type shows duplicate entry after type visibility change
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.1   Edit
Hardware: PC All
: P3 normal (vote)
Target Milestone: 3.1.1   Edit
Assignee: Dirk Baeumer CLA Friend
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-09-06 11:31 EDT by Tom Hofmann CLA Friend
Modified: 2005-09-26 05:39 EDT (History)
1 user (show)

See Also:


Attachments
The actual patch (837 bytes, patch)
2005-09-06 13:51 EDT, Dirk Baeumer CLA Friend
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tom Hofmann CLA Friend 2005-09-06 11:31:34 EDT
3.1.1 maintenance build from Sept 1, 05

- have a type "public class Foo"
- open Foo using open type -> persisted in the open type history
- change visibility of Foo to package private
- open type
  -> note that the public type is still available from the history
  -> note that also the package private version can be opened via open type
  -> both types then show up side by side in open type

Expected: the public version gets pruned when the visibility changes.
Comment 1 Tom Hofmann CLA Friend 2005-09-06 11:31:49 EDT
also in HEAD of 20050906
Comment 2 Dirk Baeumer CLA Friend 2005-09-06 13:30:14 EDT
Is already the case in 3.1. The problem is that equals considers modifiers which
is bogus.
Comment 3 Dirk Baeumer CLA Friend 2005-09-06 13:51:11 EDT
A patch to fix the problem. This patch avoid doubling the items however it will
not fix the problem that the visibility isn't updated for history elements. 

Workaround is to remove the element from the history by pressing the delete key.
Comment 4 Dirk Baeumer CLA Friend 2005-09-06 13:51:50 EDT
Created attachment 26858 [details]
The actual patch
Comment 5 Dirk Baeumer CLA Friend 2005-09-06 13:53:21 EDT
Markus, Tom can you please vote on the patch. I would like to fix this for 3.1.1
Comment 6 Tom Hofmann CLA Friend 2005-09-07 03:46:22 EDT
Fix is trivial. It is impossible for two types to exist that merely differ in
visibility (or other modifiers) but are otherwise the same. Ok from my side.
Comment 7 Markus Keller CLA Friend 2005-09-07 04:39:14 EDT
Fix is good. The visibility update problem is bug 102645.
Comment 8 Dirk Baeumer CLA Friend 2005-09-07 05:13:04 EDT
Fixed for 3.1.1.

Tom, can you please verify the fix in the next M-Build.
Comment 9 Tom Hofmann CLA Friend 2005-09-26 05:39:33 EDT
verified fixed in M20050923-1430