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 245234

Summary: Spring Environment Property usage in @Value annotation and in env.getProperty to recognize property name and property value for autocomplete and hints
Product: javaee Reporter: elennaro
Component: SpringAssignee: Martin Fousek <marfous>
Status: NEW ---    
Severity: normal    
Priority: P1    
Version: 8.0.1   
Hardware: PC   
OS: Other   
Issue Type: ENHANCEMENT Exception Reporter:

Description elennaro 2014-06-25 13:33:37 UTC
For example when we have some.properties file in resources:
settings/some.properties
my.first.prop=hello
my.second.prop=world

and we added it to class by @PropertySource("classpath:/settings/some.properties")annotation

After we auto-wire environment like

@Autowire 
Environment env;

and than try to use any of property by calling:
env.getProperty("my.first.prop");
or
env.getRequiredProperty("my.second.prop")

It will be great to be able to use ctrl+space autocomplete and to see value set in some.properties file in hint or somewhere.

Same for @Value("my.second.prop") annotation for class property.
Comment 1 Martin Fousek 2014-07-03 06:34:50 UTC
Thanks for your report. It's a good tip, but I can't promise any target milestone since I don't know how much we'll invest in Spring area into the next release. :/
Comment 2 elennaro 2014-07-05 09:03:24 UTC
Thanks for an answer. It sounds pretty sad. But I hope a lot of developers will be happy to see this feature in future releases.