Community
Participate
Working Groups
Created attachment 285871 [details] The minimal example to reproduce the bug The auto detection for property files (which apparently is based on detecting if ResourceBundle.getBundle() exists) is not working correctly. I attached a minimal example. When ctrl+hovering over Messages or the getString() method of Messages, you will see "Open in 'messages.properties'". Which doesn't make much sense, since what will exist are files like messages_de.properties or messages_en.properties. Therefore clicking that option also doesn't do anything, even if you have for example messages_de.properties in the right place, since it tries to open messages.properties which doesn't exist. In itself not a huge problem (aside from whenever working with a class that has this, just ctrl clicking to get to the source code is not possible). But it also causes some option from the "clean up" feature to fail with an exception in whatever class is calling the class containing the ResourceBundle call. This makes it impossible to use clean up on any package/project which contains such a class. Here is a pastebin of my cleanup settings: https://pastebin.com/gChqNUq0
Created attachment 285872 [details] cleanup settings
To break cleanup there needs to be done more, but i know this bug is a necessary requirement. The class from our actual project just is a bit more involved, so i cannot say which other conditions are required. But the problem there vanishes as soon as i delete all references to the ResourceBundle-containing class.
Please provide the cleanup exception stack trace. Also please provide a sample project with steps to reproduce this clean up exception.
Created attachment 285927 [details] stack trace of exception during clean up
@ka(In reply to Kalyan Prasad Tatavarthi from comment #3) > Please provide the cleanup exception stack trace. > Also please provide a sample project with steps to reproduce this clean up > exception. I attached the stack trace, i will try to setup a sample project for the clean up exception, but since the project i originally tried on is quite large, it might be hard to narrow it down.
Created attachment 285928 [details] sample project for clean up exception
(In reply to Kalyan Prasad Tatavarthi from comment #3) > Please provide the cleanup exception stack trace. > Also please provide a sample project with steps to reproduce this clean up > exception. I was able to reduce it further. It is actually not related to the property file thing (although that one is still a bug). I uploaded the sample project. Probably need to create a new issue from it.
(In reply to Andy Man from comment #7) > (In reply to Kalyan Prasad Tatavarthi from comment #3) > > Please provide the cleanup exception stack trace. > > Also please provide a sample project with steps to reproduce this clean up > > exception. > > I was able to reduce it further. It is actually not related to the property > file thing (although that one is still a bug). I uploaded the sample > project. Probably need to create a new issue from it. The cleanup issue is happening due to 'cleanup.switch' option being set to true. In UI it is "Convert if/else if/else chain to switch". Please open a separate bug for this issue and attach the same project attached here to that bug. With regards to this bug, please disable the above clean up action and see if you are seeing this issue of auto detection for property files. If so, please provide steps to reproduce this issue independent of the clean up related issue.
(In reply to Kalyan Prasad Tatavarthi from comment #8) > (In reply to Andy Man from comment #7) > > (In reply to Kalyan Prasad Tatavarthi from comment #3) > > > Please provide the cleanup exception stack trace. > > > Also please provide a sample project with steps to reproduce this clean up > > > exception. > > > > I was able to reduce it further. It is actually not related to the property > > file thing (although that one is still a bug). I uploaded the sample > > project. Probably need to create a new issue from it. > > The cleanup issue is happening due to 'cleanup.switch' option being set to > true. > > In UI it is "Convert if/else if/else chain to switch". > > Please open a separate bug for this issue and attach the same project > attached here to that bug. > > > With regards to this bug, please disable the above clean up action and see > if you are seeing this issue of auto detection for property files. If so, > please provide steps to reproduce this issue independent of the clean up > related issue. Done: https://bugs.eclipse.org/bugs/show_bug.cgi?id=572249 To clarify: The bug i'm describing here is actually NOT related to cleanup, it is simply the tooltip link to the properties file that is broken. I will edit the title accordingly, cannot change the original comment though.
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. -- The automated Eclipse Genie.