1

I've been having a problem since I started using Eclipse with nodeclipse plugin. When I call a javascript method that takes a callback, the editor jumps the the cursor to the position after the closing parenthesis of the object method, e.g.

obj.foo(a, function(){
  console.log('message');
});

as I type the console.log call, the cursor is inside the quotes, after message. I press tab once, and the cursor jumps outside the closing quote of 'message'. I press it again, and it jumps outside the closing parenthesis console.log('message'). I type semi-colon and press enter, and instead of the editor creating a new line under the console.log() call, it jumps to the end of the obj.foo() call.

I looked in the formatting options but I couldn't find a setting that addresses this functionality, and I tried searching SO and google,but can't find a search term that gives relevant results.

Please help? It's driving me nuts and killing my productivity.

djheru
  • 3,525
  • 2
  • 20
  • 20
  • http://www.nodeclipse.org/#support Should you report a bug, please include the following: Eclipse version number (like 4.2.2 or 3.8.0) Eclipse distribution (e.g. Eclipse for JEE Developers) A detailed description of the steps necessary to reproduce the problem. The '.log' file from the directory '.metadata' in your workspace. – Paul Verest Aug 26 '13 at 14:19
  • Please update your question with details mention above. I can't reproduce on Win7 in Kepler. This is JSDT (Eclipse JavaScript Tools functionality), so behavior should be the same in equal versions. – Paul Verest Aug 26 '13 at 14:30
  • Thank you for your response. I will update the question as requested tonight. – djheru Aug 26 '13 at 15:13
  • Hi djheru, does it make a difference if you deselect the "Link with Editor" option (icon has two arrows, going left and right) in your project explorer view, or if you collapse the file you're working on in project explorer? I came across the same (or at least a very similar) issue in Luna, and it seems to be eclipse trying to place the cursor/selection as though you'd jumped to the next element in the hierarchy when you type the closing bracket. – Amos M. Carpenter Apr 15 '15 at 06:32

1 Answers1

0

Generally when running into software strange behavior, the steps are (for the Nodeclipse)

  • update JDK
  • get latest Eclipse (now 4.3.0 Kepler)
  • get latest plugin version (Nodeclipse will be 0.5 next week)

In case you are using on Eclipse IDE for Java EE developers, I also ran into strangeness Delete key sometimes doesn't work in HTML Editor of Nodeclipse NTS (Based on Eclipse 4.3 Kepler)

Now I switched to SDK and IDE for Java/SDL developers, that seems more "tidy". Next Eclipse distribution "Enide Studio" will be based on Eclipse IDE for Java/SDL developers. The page with download recommendation http://www.nodeclipse.org/updates/ was updated.

BTW, I usually don't use Tab as in Editor it has meaning "several spaces". Just use arrows keys. Nice to know anyway.

Community
  • 1
  • 1
Paul Verest
  • 60,022
  • 51
  • 208
  • 332