This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 159631 - No easy way to refresh sources after external changes
Summary: No easy way to refresh sources after external changes
Status: NEW
Alias: None
Product: java
Classification: Unclassified
Component: Source (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Rastislav Komara
Depends on:
Reported: 2009-03-04 18:02 UTC by Petr Jiricka
Modified: 2009-06-23 15:03 UTC (History)
0 users

See Also:
Exception Reporter:


Note You need to log in before you can comment on or make changes to this bug.
Description Petr Jiricka 2009-03-04 18:02:32 UTC
1. Create a new Java project
2. Create a class p.NewClass in this project, and add a static method m1 to this class
3. In the Main class (main method), type p.NewClass. and press Ctrl+Space: m1 is shown in code completion as expected.
4. Close the editor tabs with both Main and p.Class and restart the IDE
5. Use Go to Type to open the Main class
6. In an external editor, add a static method m2 to p.NewClass and save the file.
7. In the Main class, press Ctrl+Space again after p.NewClass.
=> m2 is not shown in code completion

The workaround is the restart the IDE (or possibly to expand the p package node). But this is not practical if the
external changes are larger. A better way could be to add a Reindex (Refresh) action as suggested in issue 150687.

I am filing this as a P3, but in the real world, the impact may be much bigger, for example after a VCS checkout, so I
am wondering if this should actually be a P2.
Comment 1 Jan Lahoda 2009-03-04 18:17:25 UTC
Actually for ant-based projects it should be enough to do "Clean and Build".
Comment 2 Petr Jiricka 2009-03-08 22:58:20 UTC
Thanks for the info, but I still think that for most people, Clean and Build is not intuitive. "Refresh" is something
everyone can understand.
Comment 3 Rastislav Komara 2009-03-25 14:39:29 UTC
We will consider this.
Comment 4 Petr Jiricka 2009-03-25 14:52:28 UTC
Thanks, but why was this changed from defect to enhancement? The steps to reproduce I provided show that this is clearly
a defect - code completion shows incorrect results.
Comment 5 Rastislav Komara 2009-03-25 15:22:17 UTC
From point "Clean and Build is not intuitive" this is just enhancement. If there is problem with code completion please
file this issue against code completion. But from my point of view is request for %SUMMARY% just enhancement.
Comment 6 Petr Jiricka 2009-06-23 15:03:14 UTC
In the t-team meeting today it was discussed that situations when index is not up to date should be treated as defects,
so I filed this as a new defect - see issue 167537.