Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Web Tools Project (WTP) » JavaScript Formatter(White Space After Opening Paren in for)
JavaScript Formatter [message #882106] Tue, 05 June 2012 21:30 Go to next message
Jeff Wald is currently offline Jeff WaldFriend
Messages: 3
Registered: June 2012
Junior Member
I've got Indigo installed, and am trying to adjust my JavaScript formatter settings to prevent a space from being added after the opening parenthesis in a for statement.

When I export my current settings for my formatter, and examine the values, I see this particular value:

<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for" value="do not insert"/>

When I attempt to format my JavaScript, my "for" statements continue having a space added after the opening parenthesis.

It seems like a problem with the formatter (the other settings for the "for" statement appear to work as expected).

Can anyone confirm this is broken, or are my expectations incorrect?

FWIW, here is a sample statement this is being incorrectly formatted:

for ( var i = 0; i < keySplit.length; i++) { }

Thanks! Jeff.
Re: JavaScript Formatter [message #882551 is a reply to message #882106] Wed, 06 June 2012 17:49 Go to previous messageGo to next message
Nitin Dahyabhai is currently offline Nitin DahyabhaiFriend
Messages: 2333
Registered: July 2009
Senior Member
That's the JDT formatter preference for Java, not the JSDT preference for JavaScript.

---
Nitin Dahyabhai
Eclipse WTP, IBM
Re: JavaScript Formatter [message #882575 is a reply to message #882551] Wed, 06 June 2012 18:59 Go to previous messageGo to next message
Jeff Wald is currently offline Jeff WaldFriend
Messages: 3
Registered: June 2012
Junior Member
Ahhh...that line was from when I was grasping at straws, trying to make it work...the real line was this:

<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_paren_in_for" value="do not insert"/>

Giving me the same error....any other thoughts, Nitin?
Re: JavaScript Formatter [message #882915 is a reply to message #882575] Thu, 07 June 2012 13:20 Go to previous messageGo to next message
Nitin Dahyabhai is currently offline Nitin DahyabhaiFriend
Messages: 2333
Registered: July 2009
Senior Member
Bug? And a rather odd one at that.

---
Nitin Dahyabhai
Eclipse WTP, IBM
Re: JavaScript Formatter [message #882926 is a reply to message #882915] Thu, 07 June 2012 13:32 Go to previous messageGo to next message
Jeff Wald is currently offline Jeff WaldFriend
Messages: 3
Registered: June 2012
Junior Member
Okay, thank you for taking a look. I was going to open a bug report, but wanted another set of eyes to help verify that it really does seem to be a problem. Admittedly, it's not a big problem, but I'm trying to set up an SDE for a team, and JSLint has flagged that extra space after the opening paren as something to be fixed -- and I'd rather not have to start telling folks to disregard various JSLint warnings if I don't have to. For now, I'll tell my team it's a known issue....Thank you for your time!

Jeff.
Re: JavaScript Formatter [message #884664 is a reply to message #882926] Mon, 11 June 2012 15:20 Go to previous messageGo to next message
Nitin Dahyabhai is currently offline Nitin DahyabhaiFriend
Messages: 2333
Registered: July 2009
Senior Member
On 6/7/2012 9:32 AM, Jeff Wald wrote:
> For now, I'll tell my team it's a known issue....Thank you for your
> time!

It's not a known issue until you file the bug report.

---
Nitin Dahyabhai
Eclipse WTP Source Editing and JSDT
IBM Rational


---
Nitin Dahyabhai
Eclipse WTP, IBM
Re: JavaScript Formatter [message #886338 is a reply to message #884664] Thu, 14 June 2012 18:53 Go to previous message
Scott Hunter is currently offline Scott HunterFriend
Messages: 1
Registered: June 2012
Junior Member
Bug reports for this have already been filed:

357457
369785
Previous Topic:Can't get my web applications to deploy to Tomcat
Next Topic:Eclipse - JBoss Development problem
Goto Forum:
  


Current Time: Mon Nov 24 14:11:00 GMT 2014

Powered by FUDForum. Page generated in 0.02422 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software