NetBeans Forums

 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
  

7.1 DEV "specified code style rules"

 
Post new topic   Reply to topic    NetBeans Forums -> NetBeans Users
View previous topic :: View next topic  
Author Message
Lurk King



Joined: 11 Aug 2011
Posts: 26

PostPosted: Thu Sep 08, 2011 9:37 pm    Post subject: 7.1 DEV "specified code style rules" Reply with quote

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

PostPosted: Thu Dec 01, 2011 3:45 pm    Post subject: Reply with quote

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.





PostPosted: Fri Dec 02, 2011 8:18 pm    Post subject: 7.1 DEV "specified code style rules" Reply with quote

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

PostPosted: Sat Jun 09, 2012 2:42 pm    Post subject: Reply with quote

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

PostPosted: Sat Jun 09, 2012 4:29 pm    Post subject: Reply with quote

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

PostPosted: Sun Jun 10, 2012 11:16 am    Post subject: Reply with quote

You have to be joking! That's enforced by the style police? They'll be checking for possible rude words in identifier names soon. Wink
Back to top
Display posts from previous:   
Post new topic   Reply to topic    NetBeans Forums -> NetBeans Users All times are GMT
Page 1 of 1

 
Jump to:  
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


Powered by phpBB
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