NetBeans Forums
| View previous topic :: View next topic |
| Author |
Message |
Lurk King
Joined: 11 Aug 2011 Posts: 26
|
Posted: Thu Sep 08, 2011 9:37 pm Post subject: 7.1 DEV "specified code style rules" |
|
|
I am getting a warning next to imports that says: "Import section does not correspond to the specified code style rules."
Apparently there is a new "hint" called "Organize Imports" that causes this.
My problem is, where does one specify the "code style rules" for imports?
Product Version: NetBeans IDE Dev (Build 201109060600)
Java: 1.7.0; Java HotSpot(TM) Client VM 21.0-b17
System: Windows Vista version 6.0 running on x86; Cp1252; en_US (nb) |
|
| Back to top |
|
 |
vandunen
Joined: 11 Mar 2010 Posts: 2
|
Posted: Thu Dec 01, 2011 3:45 pm Post subject: |
|
|
Navigate to
Tools -> Options -> Editor -> Formatting -> Language:Java -> category: Imports)
Then uncheck Class Count and optionally Members Count |
|
| Back to top |
|
 |
Grant Gaines Posted via mailing list.
|
Posted: Fri Dec 02, 2011 8:18 pm Post subject: 7.1 DEV "specified code style rules" |
|
|
I just downloaded the new 7.1 rc1 yesterday, but when I write in C++ I get redlines underneath my code. I know I'm writing the correct code.#include<iostream>
using namespace std;
#define PI 3.14159
#define NEWLINE'\n'
int main()
{
double r=5.0;
double circle;
circle = 2 * PI * r;
cout<< circule;
cout<< NEWLINE;
return 0;
}
I get red flags on iostream and std . |
|
| Back to top |
|
 |
ptoye
Joined: 08 Dec 2009 Posts: 49 Location: Reading, England
|
Posted: Sat Jun 09, 2012 2:42 pm Post subject: |
|
|
| vandunen wrote: | Navigate to
Tools -> Options -> Editor -> Formatting -> Language:Java -> category: Imports)
Then uncheck Class Count and optionally Members Count |
I 've just upgraded from NB 7.0 to 7.1 and am told that my imports don't conform. So I've done what you suggest (both unchecked) and restarted NB. But still get the same issue. It's not a problem, but annoying (I don't like being nannied). Any idea how to get rid of them? |
|
| Back to top |
|
 |
Mack06
Joined: 04 Mar 2011 Posts: 499
|
Posted: Sat Jun 09, 2012 4:29 pm Post subject: |
|
|
| It will give the warning if the imports are not in alphabetical order. |
|
| Back to top |
|
 |
ptoye
Joined: 08 Dec 2009 Posts: 49 Location: Reading, England
|
Posted: Sun Jun 10, 2012 11:16 am Post subject: |
|
|
You have to be joking! That's enforced by the style police? They'll be checking for possible rude words in identifier names soon.  |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You can attach files in this forum You can download files in this forum
|
|