Easy to Learn Java: Programming Articles, Examples and Tips

Start with Java in a few days with Java Lessons or Lectures

Home

Code Examples

Java Tools

More Java Tools!

Java Forum

All Java Tips

Books

Submit News
Search the site here...
Search...
 
Search the JavaFAQ.nu
1000 Java Tips ebook

1000 Java Tips - Click here for the high resolution copy!1000 Java Tips - Click here for the high resolution copy!

Java Screensaver, take it here

Free "1000 Java Tips" eBook is here! It is huge collection of big and small Java programming articles and tips. Please take your copy here.

Take your copy of free "Java Technology Screensaver"!.

IntelliJ IDEA vs. Eclipse vs. NetBeans: my personal experience, Part II

JavaFAQ Home » Java Tools Go to all tips in Java Tools


Bookmark and Share

In the Part 1 of this article I summarized my personal experience with Eclipse, NetBeans and JIdea Java IDEs. In this, Part II, I will describe in details most important changes in JIdea since 4.x version.

IntelliJ IDEA become for me the number one tool not only in Java programming, but also HTML code writing and validation. JSP code mostly produces different kind of HTML pages and it is important to have all HTML code clean.

We used that HTML code can be bad, not properly formatted, tags can be opened and never closed - modern browsers will swallow any HTML code and do the best...

I although thought like this until I realized that many problems with my pages not due to errors in my Java code. No, it was bad HTML code. Strange looking pages, different layout in different browsers. You probably say - yes, yes I know, it is from browsers war. Not always really...

It has much to do with bad habits on HTML code writing . A la FrontPage style...

Things changed when I started to use JIDEA! Not only layout, even speed of page rendering increased dramatically when browsers switched from "quirks" to  "standards compliance" mode.

What is that - the "quirks" mode? And how it affects your JSP generated pages? I will not give the answer right now, you will find it in one of my next articles, because today we will look at IntelliJ IDEA new features.

The descriptions below is mostly from Idea's site. The list is not full, mostly listed below is what I thought important for Java, especially JSP developers.

JSP support New

IntelliJ IDEA 5.0 has introduced an unprecedented level of support for JSP, including JSP-specific refactorings and support for JSP 2.0. Additionally, IntelliJ IDEA combines all of the support for HTML, CSS, and JavaScript into one seamless package, and provides full support for Java code inside JSP scriptlets. It is truly the best JSP editor in the world.

All of IntelliJ IDEA's smart Java features, like refactorings, intentions, inspections, etc., work in scriptlet and declarations code:

JSP 2.0 support

  • Expression language (EL) support
  • TagDir and TagFile support
  • Support for JSP Document format (JSPX)

JSP source-level debugging under WebSphere Application Server
JSP code formatting
Optimize Imports in JSP
Structure view for JSP files

HTML and XHTML support New

The support for coding HTML and XHTML in IntelliJ IDEA 5.0 rivals, and in many cases surpasses, dedicated HTML tools. IntelliJ IDEA's intelligence really shines, helping developers quickly navigate and code HTML and XHTML in ways that are simply not possible with other tools.

Code completion for tags (including auto-insertion of closing tags), attributes, styles, file references in hyperlinks, etc.
Find/highlight usages of tags, IDs, files, images, styles, etc.
Completion and validation for width and height attribute values in img tags
Code formatting according to HTML-specific Code Style (defined via a dedicated Code Style settings panel)
Matching brace highlighting + quick navigation to paired tag in HTML (Ctrl + ] / Ctrl + [)

HTML validation + several quick-fixes:

  • Wrong closing tag
  • Missing closing tag
  • Missing required attributes
  • Invalid attributes or illegal attribute values
  • Invalid local anchor
  • Wrong references to files in hyperlinks (e.g., values of attributes href and src)
  • Duplicate attributes

Syntax and error highlighting.

Refactoring:

  • Rename file, anchor, etc.

  • Move/Copy file

  • Safe Delete file

Show Applied Styles for Tag: Opens a tree-view of all styles that are applied to the tag by CSS
Quick doc (Ctrl + Q and Shift + F1) opens descriptions of HTML tags, attributes (with available values if defined), etc., from the official W3C standard:

  • HTML Colors and Fonts settings

  • HTML Structure View

  • HTML and XHTML on-demand validation

  • Convert HTML into XHTML

  • Surround with tag

  • Show Content (Ctrl + Shift + I):

    • on a tag - shows schema

    • on a file - shows file content

    • on an image - shows image

  • CSS support

    IntelliJ IDEA 5.0's support for CSS enables developers to quickly and easily edit HTML styles with code-completion, error highlighting, finding references, and more. IntelliJ IDEA shows the power of an IDE once again, eliminating the need for developers to wade through CSS references all day, or to waste time debugging conflicting styles.

    Code completion of CSS keywords, values, properties, classes, HTML IDs, syntax and error highlighting, on-the-fly validation and intention actions.

  • Missing or invalid closing braces

  • Invalid selector format

  • Invalid CSS properties

  • Unused CSS class definitions

  • Find/highlight usages

  • Quick doc (Ctrl + Q and Shift + F1) opens description from the official W3C standard

  • Unused CSS tags highlighting

  • Code Folding

  • Code formatting

  • CSS Structure view

  • Refactoring:

    • Rename (including the opportunity to rename CSS file, class or ID attribute, etc., directly from within HTML)

    • Move/Copy file

    • Safe Delete file

    • Extract inlined style block from HTML into a CSS file

  • I18N support New

    The new I18N support provides multiple important features that make working on internationalization issues simple and convenient. With enhancements introduced in version 5.1, IntelliJ IDEA can be justly named the best Java I18N / L10N tool.

    • Auto-detection of resource bundles

    • Convenient multi-language resource-bundle editor

    • I18N intention actions for smart internationalization of hard-coded String literals, both simple and concateneted

    • @NonNls annotation & intention action for excluding particular hard-coded strings from localization

    • I18N support for tag text in JSP files

    • Resource properties completion in Java references

    • Smart editing of .properties files

    Debugger  New

    IntelliJ IDEA 5.0 has several new debugging features, including some great breakpoint improvements to make debugging smarter, so developers can find bugs faster with less manual effort.

    • Custom object display in debugger: Most programmers write toString() methods so that objects are easier to browse and inspect during debugging. IntelliJ IDEA 5.0 makes it even easier and more powerful to customize any object display in the debugger, similar to the Alternate Collections View feature. It's especially useful to help inspect complex nested object structures.

    • JSP source-level debugging under WebSphere Application Server (5.1 & 6.0)

    • Shortcut to setting up a logging breakpoint: Select the expression to log, then Shift + Click in the gutter

    • Dependent breakpoints: The second breakpoint won't trigger unless the first breakpoint triggered

    • Muting breakpoints with one button

    • Smart step-into: Skip simple getters/setters

    • Force step-over, ignoring breakpoints

    • Drag and drop support for breakpoints

    JavaScript Support New

    IntelliJ IDEA 5.0 is the first IDE to provide serious support for JavaScript, introducing many of the useful features Java developers have become accustomed to.

    Code completion for JavaScript keywords, variables, parameters and functions, including completion in HTML event handlers, etc.

    Syntax and error highlighting, including on-the-fly validation

    Highlighting for escape sequences in String literals

    Enhancements in J2EE support New

    IntelliJ IDEA 5.1 enhances its support for J2EE development with several new features:

    • Detection of unbound namespace prefix in JSP and XML

    • Auto-import of tag libraries and XML schemas in JSP and XML

    • Completion/renaming for references to Java methods from Hibernate/Spring/JSF configuration files

    • JSP source-level debugging under WebSphere Application Server (5.1 & 6.0)

    J2ME support

    IntelliJ IDEA 5.0 supports developers for the increasingly popular J2ME platform with features to simplify configuring, compiling, running, and debugging J2ME modules with third-party toolkits and device emulators.

    • Support for mobile SDK MIDP1.0/MIDP2.0/NTT DoCoMo i-mode

    • Dedicated J2ME module type added

    • Building mobile applications (MIDlet suites)

    • J2ME Run/Debug configurations panel

    • Run/Debug mobile phone emulators

    Refactorings and Search

    IntelliJ IDEA is currently the undisputed leader in smart Java coding features. IntelliJ IDEA 5.0 sprints ahead even further with several additions and enhancements to its refactoring arsenal.

    • New Refactorings: IntelliJ IDEA has more and better quality refactoring features than any other IDE, and IntelliJ IDEA 5.0 adds even more.

      • Move Method: A separate refactoring from Move Static Method, this new refactoring safely moves non-static methods from one class to another. It correctly handles inner classes and honors method overriding

      • Inline Superclass

      • Move Field to Local Scope: Converts a field to a local variable, reducing the complexity of the class

    • Inline Constructor: When only this(...) is used

    • Safe Delete: Removes class from class hierarchy

    • Change Method Signature: This is one of IntelliJ IDEA's most powerful and useful refactorings, which saves a lot of time and tedious work. IntelliJ IDEA 5.0 allows added parameters and exceptions to be propagated throughout the method call hierarchy, as well as the ability to add/remove the throws clause

    • Introduce... refactorings are smarter at guessing types (e.g. when there are unresolved references in an expression)

    • Convert to Instance Method: Visibility options added

    • Rename Class: Suggests to rename a GUI form if one is bound to it

    • Find catch()es for thrown exceptions

    Code Analysis

    IntelliJ IDEA is currently the best tool available for static and on-the-fly code inspections. To get the same level of support from other tools would cost much more than IntelliJ IDEA itself! IntelliJ IDEA 5.0 brings code analysis to a whole new level, helping developers not only to understand code, but to find problems early, keep the design clean, and also to aid iterative design when used in combination with refactoring.

    That are all most important improvements and features. You can find more details on the feature you interested in if you go to JIdea home page or do further research on the Web.

    As I mentioned above I am going to write soon an article on importance of clean HTML code writing. I will do an overview on current situation with HTML standards and latest design trends (how to write most efficient HTML code). I thing it is important for those who works with JSP, servlets, web services and so on.

    You probably want that your customers see your application as a modern tool, not ugly formatted page from beginning of 90s of past century.

    Disclaimer: English is not native language for me and I appreciate if you correct my errors in a friendly way


     Printer Friendly Page  Printer Friendly Page
     Send to a Friend  Send to a Friend

    Bookmark and Share

    Search here again if you need more info!
    Custom Search



    Home Code Examples Java Forum All Java Tips Books Submit News, Code... Search... Offshore Software Tech Doodling

    RSS feed Java FAQ RSS feed Java FAQ News     

        RSS feed Java Forums RSS feed Java Forums

    All logos and trademarks in this site are property of their respective owner. The comments are property of their posters, all the rest 1999-2006 by Java FAQs Daily Tips.

    Interactive software released under GNU GPL, Code Credits, Privacy Policy