Best source code formatter for Javascript? [closed] - java

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
I've been digging through Stack Overflow as well as a number of Google searches, and I cannot find a satisfactory code formatter for JavaScript.
I have found several related tools, such as syntax highlighters and pretty-printers, but I am looking for a tool that I can ideally create a wrapper for in Eclipse and simply run from the menu bar. Hence, if any Java-based ones are available, that is a big plus. Free and/or open-source is preferred as well.
I am looking for something that my development group can use to maintain a consistent code style.
Edit: Thanks to kRON for linking to the format customizations page.
Edit: Related question on Stack Overflow.

This is by far the best I've come across: http://jsbeautifier.org/
Available as an online tool, or on the command-line using node.js or python.
The source code is available.

In one breath: Aptana Studio! Yes, it's Java based and free (Eclipse, as standalone or plugin).
You can also customize the formatting.

If you already use Eclipse, I recommend you to try Aptana, you can install it as an Eclipse Plugin.

For Eclipse IDE you can use JavaScript Code Formatter based on Goolge's Style Guide
For IntelliJ IDEA you can use the same js code formatter xml file , but previously you have to install a special plugin Eclipse Code Formatter Plugin, which solves the problem of maintaining a common code style in team environments where both IDEA and Eclipse are used

If you also need Java programming I can recommend 'IntelliJ IDEA'
It offers excellent JavaScript formatting and refactoring out of the box.

Have you tried jsfiddler. It's great for trying things out with Javascript. Built in JSLint & something called Tidy. Not sure whether that infers jstidy Piotr Zalewa is the guy who wrote it. May be worth giving him a Tweet #zalun to confirm.

If you are using notepad++, you can try jsminnpp plugin

Related

IDE for Java Swing [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
I'm trying to learn how to build a basic GUI using Java Swing. Right now I know literally nothing about it but I'm going through this tutorial. The first thing I noticed right off the bat was the title: "Learning Swing with the NetBeans IDE." Up till now I thought an IDE was basically just something that you could write and run code within (I've been using Eclipse) Why does this tutorial specifically encourage the use of NetBeans?
Edit: And can I just keep using Eclipse?
Maybe because Oracle owns/creates NetBeans.
https://netbeans.org/about/history.html
Because Netbeans was acquired by Sun (now Oracle). However I suggest you to use Eclipse, as it has the WindowBuilder GUI visual editor, in my opinion the best tool for Java Swing development. The tutorial in the Oracle website however is a good start for a Java Swing novice. Another simple tutorial can be found in here
In a nutshell, NetBeans is owned by the Oracle Corporation and the document you are reading is provided by them as well, therefore it makes sense that the tutorial encourages the use of NetBeans. Yes, you can keep using Eclipse, see the differences/similarities between NetBeans and Eclipse below:
What is the difference between Eclipse and Netbeans if I want to use only the Java in it?

How to arrange java code in proper way [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
the code in .java file is not arranged or not in a formatted way.
Can anyone suggest me a software that can format or arrange the code in good manner.
for e.g. I have code like this...
class a{ public static void main(String s []){}}
but i want it arrange in a proper way like this
class a{
public static void main(String s[]){
}
}
I can suggest you to use Netbeans, you will get these advantages,
Formatting your code properly is very easy in Netbeans
If you make a new class, The class is shown with all formatting done,
Most IDEs these days (Eclipse, IntelliJ, NetBeans, ...) have code formatting capabilities built into them. They have many options to setup the exact style for you.
If you are not using an IDE, get one, Eclipse is free! :)
Or you could try something like Jalopy (it's a free version of a similar tool: JIndent)
Chances are the code you have copied has line breaks that are not compatible with your OS.
I would recommend getting an IDE like Netbeans or Eclipse and putting the code there, as they have linebreak adapters.
No need to manually insert your native linebreaks.
I would suggest you to use Eclipse IDE.
http://www.eclipse.org/downloads/
Eclispe has a default integrated code formatter and you are able to customize this feature:
http://www.ralfebert.de/blog/eclipseide/source_formatting/
You can also say eclipse to performe code formatting everytime you safe or run the code, so you normaly never need to format code by yourself.
Alternativly you could use netbeans, which is an open source ide as well which supports code formatting.

Best tool for creating JSF pages(Recommendation needed) [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
Its being a almost 2 months since is started to work with JEE6 and JSF 2.0.
I have to say that in this time i learned lots of things and every day i like the world of JEE6 more and more :)
Now that i understand the very basics the components that i use in my JSF pages, i would like to find some gadget that can help me speed up a little bit my programming(Currently i write all my pages in Eclipse Helios HTML editor).
What i am thinking about is a component palette, plugin for eclipse or desktop software (I dont need a brand new IDE, i already use eclipse Helios) that can help me create a JSF pages within minutes.
Back in college when i started using swing i discovered JFormDesigner it was a really great tool, i was able to create very rich GUI within minutes, it was really easy to use an very intuitive for learning.
I am wondering if is there any tool like that out there, but just for JSF 2.0.
Any suggestions?
You can try and use JBoss Tools.
I used to have all sorts of visual functionality with it - although, some times I tended to do things by hand as it was quicker.
You have the option to install the plugin or simply pay for the IDE: as you probably know, the difference is that buying the IDE you get support from JBoss. Using the open-source version you are getting a version with probable bugs, but workable.
I've been using the open-source version for almost 4 years now and love it.
Good luck!
Inside Netbeans, there is a Palette menu that allow you to create dataTable, edit form ... for entity object in one click. This become very handy for me. Oracle have JDeveloper which, imho, is very awesome. It allow you to create a simple CRUD Java EE web app without even writing a single line of codes. There is a demo on how to use JDeveloper here. Dont forget tool like DreamWeaver can allow you to create rich layout very quickly as well.

Where can I find a Java library for code highlighting? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
I'm trying to find a Java library to highlight code. I don't want to highlight Java code. I want a library that will easily allow me to highlight a macro language of my own, in a code editor of my own written in Java.
JSyntaxPane is decent. Advanced and decent IDEs use either Lexer/Parsers such as Antlr and Javacc or regular expressions. Implementing it correctly is not a trivial task.
As you mentioned "a macro language of my own", I suggest taking a look at Lexer/Parser generators for Java and maybe JEdit syntax package source code(google it, reached the maximum hyperlinks) for lexing strategies.
GesHi is pretty good. There is a list of highlighters here.
UPDATE: missed that you wanted a java lib. Try jedit syntax package.
You might look at the Java port of GeSHi named JaSHi. It looks like it is a complete rewrite of the popular PHP package, with Java bindings.
JSyntaxPane may be the way to go. It will highlight a number of languages and is extensible to handle others.
You may want to take a look at xtext - it does a lot more than syntax highlighting; in fact, you only have to define a grammar, and it will generate an eclipse editor plugin with outline, syntax highlighting, syntax checking and autocompletion automatically. It could save you a lot of work if an eclipse editor plugin is an acceptable end result for you.

Velocity editor plugin for Eclipse? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
I've seen Veloedit, which seems to have good syntax highlighting but doesn't allow tab characters in the file being edited (wtf?) and also has no understanding of HTML.
With a little bit of googling I've found Veloecipse, which claims to build upon Veloedit and also add HTML support - but doesn't seem to be compatible with Eclipse 3.4.
Are there any other Velocity template editor plugins for Eclipse that anyone is using?
The ideal solution would have the following features:
Syntax hightlighting of VTL
HTML syntax highlighting as well
Auto-complete of VTL syntax
Allows tabs!
Update: see my answer below
Here's an update: I've been using Veloeclipse and it works well, not sure what led to my original comment about not working with Eclipse 3.4 but I am definitely using it with 3.4 now. Veloeclipse works better than Veloedit and Velocity Web Editor, in my opinion.
I have installed Veloeclipse since Veloedit raised exceptions when opening the editor and it works fine with eclipse 3.5.2.
In order to install it, I had to deselect "Group items by category" in the "Install new software..." dialog.
just try
Velocity Web Edit
http://velocitywebedit.sourceforge.net/
you can download Veloeclipse for Velocity Template from http://code.google.com/p/veloeclipse/
According to
http://sourceforge.net/project/showfiles.php?group_id=126011
the last release was 2006 so, I don't think that it's actively maintained anymore.
Too bad that veloedit doesn't work.
Ok, I tried it again and now it worked. Must have something to do with my installation.
So for me veloedit is the way to go :)
Next Edit:
On the next day, I got Eclipse exceptions again, when I started to use the veloedit editor. Now I'm just using a regular html/jsp editor to have at least some kind oh html syntax highlighting...

Categories

Resources