Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 363591 - [quick fix] Change visibility to default makes the suggested file not respond to saving
Summary: [quick fix] Change visibility to default makes the suggested file not respond...
Status: CLOSED DUPLICATE of bug 361136
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.8   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: JDT-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-11 10:26 EST by nickh186 CLA
Modified: 2011-11-11 10:38 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description nickh186 CLA 2011-11-11 10:26:41 EST
Build Identifier: 20110916-0149

I had a few private fields/methods in a separate class that I was trying to access in another class and when the suggestion popped up to "Change visibility of 'x' to default", I clicked on it.  The view switched to the other class at the point where I declared the changed item and when I tried to save, it wouldn't save.  

The star denoting that it has unsaved changes is present next to the name in the class tab, but the GUI save icon is disabled and CTRL-s doesn't work either.  The only way to save the file is to close it and choose to save it at the prompt.

Both of the classes in question are in the same package.  Also, it continues to work after I do the work around, but naturally Eclipse shows errors until the file with the changed visibility is saved.

Reproducible: Always

Steps to Reproduce:
1. Create two classes in the same package.
2. Add a method or field in one class with a private modifier.
3. Go to the other class and try to use the field/method as though it were not private.
4. When the auto-correct marks the item and suggests changing the visibility, allow it to and then try to save the file.

Expected: File is saved
Actual: File is unable to be saved until the class is closed and the user is prompted by the save prompt.
Comment 1 Deepak Azad CLA 2011-11-11 10:38:55 EST

*** This bug has been marked as a duplicate of bug 361136 ***