Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » The value for annotation attribute Component.property must be a constant expression(Wrong tooltip for error?)
The value for annotation attribute Component.property must be a constant expression [message #1757950] Wed, 22 March 2017 09:50 Go to next message
Marco Descher is currently offline Marco DescherFriend
Messages: 197
Registered: October 2010
Location: Austria
Senior Member
I think that the following tooltip is wrong

index.php/fa/28820/0/

Boolean.TRUE is a constant, and even Boolean.TRUE.toString() does not work out.

Wouldn't it be better to have a tooltip saying

The value for annotation attribute Component.property must be a String constant expression?

Thanks a lot

[Updated on: Wed, 22 March 2017 09:51]

Report message to a moderator

Re: The value for annotation attribute Component.property must be a constant expression [message #1757983 is a reply to message #1757950] Wed, 22 March 2017 14:25 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33226
Registered: July 2009
Senior Member
The whole expression is highlighted. If you had just the constant expression Boolean.TRUE, you'd get a different error, i.e., not one about it not being a constant expression but about it being a type mismatch. And an expression such as "tru" + 'e' + 1 is still a constant expression even though the parts aren't all string constants. So really your error is that the overall expression, although of type string, is not a constant, so I don't think adding the type to the error message is helpful because that's not what's wrong.

Ed Merks
Professional Support: https://www.macromodeling.com/
Re: The value for annotation attribute Component.property must be a constant expression [message #1757986 is a reply to message #1757983] Wed, 22 March 2017 14:42 Go to previous message
Marco Descher is currently offline Marco DescherFriend
Messages: 197
Registered: October 2010
Location: Austria
Senior Member
Hy Ed, thank you very much for explaining this!
Previous Topic:Importing Cordova 6.1.2-Project to Eclipse: cordovalib.jar missing in Android Dependencies
Next Topic:ECLIPSE TOMCAT INSTALLATION
Goto Forum:
  


Current Time: Sun Oct 13 18:01:17 GMT 2024

Powered by FUDForum. Page generated in 0.04624 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top