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 49235 - [40cat] Code completion doesn't show constants in implemented interfaces.
Summary: [40cat] Code completion doesn't show constants in implemented interfaces.
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Unsupported (show other bugs)
Version: 4.x
Hardware: PC Windows XP
: P3 blocker (vote)
Assignee: Martin Matula
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-09-18 17:46 UTC by gugrim
Modified: 2007-09-26 09:14 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description gugrim 2004-09-18 17:46:05 UTC
[ BUILD # : 200409170519 ]
[ JDK VERSION : J2SE 1.4.2 ]

Typing the first few chars in a constant that is
available through an implemented interface,
followed by ctrl+space often shows nothing. If I
then first type the interface name and a period,
then ctrl+space, all the constants show up.
Nothing is logged so I can't currently give any
more info.
Comment 1 Martin Matula 2004-09-19 14:23:49 UTC
reassgning to editor/code completion.
Comment 2 Martin Roskanin 2004-09-20 13:42:49 UTC
ClassDefinition.getFeatures doesn't return the fields of declared
interface if the source is not parseable (contains error)
Reassigning to java module...

Simple repro case:
1. public class NewClass implements NewInterface
2. where 
public interface NewInterface {
    public static String AHOJ = "";
}
3. ensure the both class and interface are compilable
4. type A in NewClass and invoke CC. AHOJ field is avaialble in CC.
5. wait few seconds for background parser (while CC is still open) and
type H  - field AHOJ cannot be retrieved.
Comment 3 Martin Matula 2004-09-22 11:07:28 UTC
Seems like a problem in parser's error recovery. I will look at it.
Comment 4 Martin Matula 2004-10-25 17:30:31 UTC
Fixed.

Checking in src/org/netbeans/modules/javacore/parser/ASTRepairer.java;
/cvs/java/javacore/src/org/netbeans/modules/javacore/parser/ASTRepairer.java,v
 <--  ASTRepairer.java
new revision: 1.2; previous revision: 1.1
done