Bug 206218 - OrganizeImports removes "import static xxx.*" creating syntax errors
OrganizeImports removes "import static xxx.*" creating syntax errors
Status: VERIFIED FIXED
Product: java
Classification: Unclassified
Component: Editor
7.1
PC Windows XP
: P2 (vote)
: 7.1.1
Assigned To: Dusan Balek
issues@java
71patch1-verified
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-12-10 14:47 UTC by err
Modified: 2012-02-13 13:56 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
:


Attachments
project with organize imports problem (200.69 KB, application/zip)
2012-01-03 16:44 UTC, err
Details

Note You need to log in before you can comment on or make changes to this bug.
Description err 2011-12-10 14:47:41 UTC
with settings

        * Use Single Class Imports
            |X| Class Count To Use Star Import              31
            | | Member Count To Use Static Star Import      2

        Import Layout:
            |X| Separate Static Imports
                | |     java
                | |     javax
                | |     <all other imports>
                | |     org
                | |     com.raelity
                |X|     <all other imports>
                |X|     com.raelity

            |X| Separate Groups

The list of imports at the end produce the hint "not ... code style rules". Executing OrganizeImports removes the marked (<<<) line (it does get rid of the hint).


import java.awt.CardLayout;
import java.awt.Component;
import java.util.logging.Level;
import java.util.logging.SimpleFormatter;
import java.util.logging.XMLFormatter;

import org.netbeans.validation.api.builtin.stringvalidation.StringValidators;
import org.netbeans.validation.api.ui.swing.SwingValidationGroup;
import org.netbeans.validation.api.ui.swing.ValidationPanel;

import com.raelity.logman.ConfigFormatter.Flag;
import com.raelity.logman.LogUtil;
import com.raelity.logman.ops.HandlerProps;
import com.raelity.logman.ops.LoggingProps;

import static com.raelity.logman.ops.LoggingProps.*; <<<<<<<<<<<<<<<<<<
Comment 1 err 2011-12-10 14:52:01 UTC
Product Version: NetBeans IDE 7.1 RC2 (Build 201111302200)
Java: 1.6.0_23; Java HotSpot(TM) Client VM 19.0-b09
System: Windows XP version 5.1 running on x86; Cp1252; en_US (nb)
Comment 2 Dusan Balek 2012-01-03 14:04:05 UTC
Unfortunately, I cannot reproduce the problem in the current dev build. Could you please create a simple test case and attach it to the issue? Thanks.
Comment 3 err 2012-01-03 16:42:46 UTC
Project attached

- open the project LogMan
  There are some unresolved projects. Ignore them.
- open com/raelity/logman/ui/HandlerFormatter
- organize imports
Observe the described problem
Comment 4 err 2012-01-03 16:44:52 UTC
Created attachment 114588 [details]
project with organize imports problem
Comment 5 Dusan Balek 2012-01-05 13:16:09 UTC
Fixed in jet-main.

http://hg.netbeans.org/jet-main/rev/a8856908cdcb
Comment 6 err 2012-01-05 18:01:47 UTC
Can/should this be "71patch1-candidate" ?
Comment 7 Marian Mirilovic 2012-01-06 06:30:25 UTC
(In reply to comment #6)
> Can/should this be "71patch1-candidate" ?

Sure, could you please verify the fix in trunk is working and it didn't cause any regression (mark as VERIFIED), please ? Thanks in advance.
Comment 8 Quality Engineering 2012-01-06 15:45:07 UTC
Integrated into 'main-golden'
Changeset: http://hg.netbeans.org/main-golden/rev/a8856908cdcb
User: Dusan Balek <dbalek@netbeans.org>
Log: Issue #206218: OrganizeImports removes "import static xxx.*" creating syntax errors - fixed.
Comment 9 Dusan Balek 2012-01-19 09:59:42 UTC
Integrated into release71_fixes.

http://hg.netbeans.org/releases/rev/f789519f2088
Comment 10 Jiri Prox 2012-02-13 13:56:58 UTC
verified in patch1


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo