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 269208 - Ctrl + Space on static method call offers no suggestion when followed by any annotation
Summary: Ctrl + Space on static method call offers no suggestion when followed by any...
Status: NEW
Alias: None
Product: editor
Classification: Unclassified
Component: Completion & Templates (show other bugs)
Version: 8.2
Hardware: PC Windows 10 x64
: P3 normal (vote)
Assignee: Dusan Balek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-12-02 07:18 UTC by abc159abc
Modified: 2016-12-02 13:35 UTC (History)
0 users

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 abc159abc 2016-12-02 07:18:39 UTC
I have an interface with one method that I implement in a class.
In the class I want to instantiate a Logger (using SLF4J).
The jar are all presents on the classpath (through maven).

1. Create the interface and class:

public interface MyInterface {
    void doSomething();
}

public class MyClass implements MyInterface {
    @Override
    public void doSomething() {
        ...
    }
}

2. Get a logger instance right before the @Override:

public class MyClass implements MyInterface {
    // ---> I want to get the logger right here

    @Override
    public void doSomething() {

3. At the position indicated above, I start instantiating the logger (goal is to have: private static final Logger LOGGER = LoggerFactory.getLogger(MyClass.class)):

private static final Logger LOGGER = L// Suggestions stop working here. I should be offered several choices including LoggerFactory

4. Remove the @Override and try to get suggestions again. I will work as expected.
Comment 1 abc159abc 2016-12-02 13:35:32 UTC
Although I first encountered the problem for @Override, it happens for any annotation.