The rule in BlueJ should be that whenever you leave an edited line, the code is saved and everything updated accordingly. However, you can suppress this auto-save if you make a quick edit after pressing the compile shortcut. Most noticeable if you edit out a dependency, as that still shows in the class diagram even though if the code was saved as it should be, the dependency should vanish.
Steps to reproduce:
- Hit compile
- Quickly make an edit which changes a dependency (e.g. commenting out a field declaration)
- The class gets marked as compiled in the diagram, the editor is marked bottom-right as "changed" but moving caret does not trigger a further save or compile. The class diagram shows the old dependency, though it does correctly disappear if the class is saved, e.g. by making a further edit.
The problem is fixed by closing and re-opening the project: the class is saved on exit, and on reload it is shown as uncompiled.