Community
Participate
Working Groups
When Organize Imports is active (Save Actions) and I try to save this: package eclipse.bug.test; public final class Transaction { /** * @throws IllegalTransitionException */ public void lock() {} private enum State { ACTIVE; final class IllegalTransitionException extends RuntimeException {} } } it keeps adding: import eclipse.bug.test.Transaction.State.IllegalTransitionException; which displays the error: The type eclipse.bug.test.Transaction.State is not visible Should add the identifiers to IllegalTransitionException (@throws eclipse.bug.test.Transaction.State.IllegalTransitionException) - or not do anything preferably Eclipse Java EE IDE for Web Developers. Version: Luna M7 Release (4.4.0M7) Build id: 20140508-1440
Hi Palmer, I took May 1 release and tried the following: 1) Created a test project and changed the settings Preferences->Java->Editor->Save Actions->Configure and clicked on Organize imports. 2) Copy pasted the above code and pressed Ctrl + S multiple times (with minor edits). I don't see a error message. Could you please list down all your steps and also if possible attach the project. Thanks
Created attachment 244039 [details] File > Export > Preferences > All (In reply to comment #1) > Hi Palmer, > I took May 1 release and tried the following: I am on M7 (20140508-1440) Do you want any particular version numbers ? > > 1) Created a test project and changed the settings > > Preferences->Java->Editor->Save Actions->Configure > > and clicked on Organize imports. > > 2) Copy pasted the above code and pressed Ctrl + S multiple times (with minor > edits). > > I don't see a error message. > > Could you please list down all your steps and also if possible attach the > project. > The OP is a complete compiling example - the steps are: 1) Copy the code 2) Paste it in Project Explorer with no package selected 3) the error line is added in the file created in the _pasted_code_ project I attach my preferences > > Thanks
Created attachment 251501 [details] The project contains additional case of the bug I have the similar issue in Eclipse Java EE IDE for Web Developers (Version: Luna Service Release 2 (4.4.2) Build id: 20150219-0600). Steps to reproduce: 1. Download "Eclipse IDE for Java EE Developers" and unpack it into an empty folder (I use MS Windows, x64 version). 2. Start the unpacked eclipse. 3. Download and import attached project. 4. Open class EclipseJavadocNImportBug. 5. Press Ctrl-Shift-O. Expected result: 1. No new imports are added. Actual result: 1. Two new imports are added: import test.bug.EclipseJavadocNImportBug.InnerClass1; import test.bug.EclipseJavadocNImportBug.State.IllegalTransitionException; The first import is a cause of the warning message: "The import test.bug.EclipseJavadocNImportBug.InnerClass1 is never used". The second import is a cause of the error message: "The type test.bug.EclipseJavadocNImportBug.State is not visible".
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.