2

Recently I've needed to write a small utility for Acrobat in its JavaScript.

Because the editor in Acrobat is pretty limited, I've installed the latest release of Eclipse IDE for JavaScript and Web Developers (Neon). It should already include the latest JSDT 2.0.

However, I've been surprised, that Eclipse's JavaScript editor does not correctly parse even simple common JavaScript patterns, like namespaces, modules, single global variable, etc. Also code folding is missing, except the very first function.

I do not expect to debug Acrobat's JavaScript code in Eclipse, but I wanted to have a smart JavaScript editor and also projects, where I could gather a few non-JavaScript resources. Some automation possibilities would be also nice, of course.

I've played with Eclipse preferences a lot and I've also searched on Internet, but I was not able to find anything really helpful.

Have I missed something in Eclipse configuration or is it really wasting of time and I should use something else?

For small projects a free IDE would be preferable, but also reasonably priced commercial products would be acceptable.

A configuration solution in Eclipse would be the most welcome, of course.

Thanks a lot for your help.

Mias
  • 21
  • 2

2 Answers2

0

The support for newer Javascript Syntax is very bad in Eclipse (Bug).

You can use Tern.js it has a good ES5 and ES6 support.

But for Javascript development there are a lot of much better editors like Webstorm, VisualStudio, Sublime out there. You'll like more!

muetzerich
  • 5,600
  • 7
  • 37
  • 52
0

From my experience with Acrobat JavaScript, and the Acroforms technology (which you use when you work in PDF), there are not that many advantages you get from an IDE.

In fact, for my work (which IS extensive), a good text editor, with quote and parentheses balancing, maybe even auto-indent, and basic JavaScript code coloring is pretty much sufficient. I personally do write the scripts in BBEdit, and then copy/paste them into the Acrobat JavaScript editor window.

Keep in mind that JavaScripts in Acrobat/PDF are generally quite short, because they do not have to deal with DOM overhead, and because the field event sequence is quite structured (and it is really important to understand this sequence… more important than fancy JavaScript constructs). You also have to be aware that the JavaScript core implementation in Acrobat is relatively old (recently, they did upgrade it, but if your forms/applications are for the general public, you can't rely on them having the very newest version of Acrobat/Reader).

Max Wyss
  • 3,549
  • 2
  • 20
  • 26
  • Thank you for your answer. I agree, this is what I've found too. If I'll find some well balanced toolset, I'll share my experience here. – Mias Jul 09 '16 at 08:38