Title: IDE Bake Off IntelliJ IDEA 3'0
1IDE Bake OffIntelliJ IDEA 3.0
- Austin Java Users Group
- Razvan Surdulescu
- March 25, 2003
2IDEA Overview
- IDEA is 1.5 years old. Current version is 3.x.
- IDEAs primary strength is refactoring
- Rename/move/copy classes/methods/packages
- Extract field/method
- Many others
- Excellent (and unobtrusive) assistance
- parses the current source file
- provides hints, underlines errors, etc.
3IDEA Overview contd
- Many useful plug-ins written by the developer
community - Not free 499 (.com), 99 (.edu)
- Swing application
- Startup time TogetherJ lt IDEA lt Eclipse
- Memory footprint 100MB when warm
- Processor PIII equivalent or better
4Bake Off Environment
- Windows 2000 SP3
- Sun J2SE 1.3.1_06
- IntelliJ IDEA 3.0.2
- ANT 1.5.1 (built-in to IDEA)
- JUnit 3.8.1 (built-in to IDEA)
- CVS 1.11.2
- Tomcat 4.0.6
- Electric XML 6.0.3
51a. Projects
- Setup new project
- You can change the default project properties
- You can use an existing source tree or create a
new one. - IDEA stores all project settings in a.IPR and
.IWS file very clean and unobtrusive.
61b. Projects
- Changing the default editor
- Not possible, although you can obviously edit the
source files outside IDEA - The editor is very powerful and configurable
- Auto-complete, auto-indent, auto-import
- Class templates, code templates
- Many others
71c. Projects
- Configuring the class path
- Add/remove JAR/ZIP/directories to the class path.
- All class path elements become candidates for
auto-complete, code navigation, etc. - You can setup libraries
- Define associated classpath, JavaDoc, and source
directory - Use the library for compilation, documentation or
source code navigation - Share libraries across projects
82a. Integration
- ANT 1.5.1 comes packaged with IDEA
- You can add an existing build.xml to your project
- IDEA will allow you to execute, filter and log
ANT targets through the GUI - In case of error, you can double click on the
error line and go to the code that caused it - IDEA can validate the ANT build file (find
mistakes, unreferenced variables, etc.)
92b. Integration
- JUnit 3.8.1 comes packaged with IDEA
- You can setup JUnit test targets and execute them
- In case of failure, you can double-click on the
error line and go to the assertion that failed
102c. Integration
- CVS
- IDEA comes with support for CVS and Star Team
- If your sources are imported into CVS, you can do
all CVS operations directly from the GUI - If you rename or delete a source file, IDEA will
prompt you to keep the CVS repository in sync - IDEA comes with a nice visual diff tool, but you
can use an external diff tool as well
113. Refactoring
- IDEAs refactoring is exceptional
- Rename/move package
- Rename/move/copy/delete class
- Rename/move/copy/delete method
- Rename/move/copy/delete field
- Extract method
- Change method signature
- Many others
123. Refactoring contd
- Once I started refactoring in IDEA, I could never
go back to another IDE!
134. Debugging
- Local
- Full-featured debugger
- Code breakpoints (normal, conditional, counted)
- Exception breakpoints
- Thread, field inspector, watches
- Remote
- Connect to a remote JVM via JPDA
- Source path permits source breakpoints and
navigation while debugging
145. Time Savers
- Code navigation
- Go to class/file (ctrl(shift)N)
- Go to type/variable declaration (ctrl(shift)B)
- Go to override
- Go to JavaDoc (ctrlQ)
- Class structure (ctrlH, ctrlF12)
- Code format, layout (optimize imports)
- Standardized formatting gt easy diffs
- Refactoring (rename, move, delete, etc.)
155. Time Savers contd
- Search (usages, text in file, text in path)
- Code generation
- Live templates (psf-TAB, soutv-TAB)
- Implement methods (interface)
- Generate getX()/setX() accessors
- Generate equals()/hashCode()
- Surround with
- Smart complete
165. Time Savers contd
- Logical layout
- Almost everything can be done without the mouse
- Key combinations and menus are very logical
- Configurable key bindings (e.g. Emacs, Visual
J, ) - Able to save multiple code styles, and use them
per-project. - Really useful if you have multiple teams with
different coding standards.
175. Time Savers contd
- XML support
- Text format
- Auto-complete
- DTD, XML Schema validation
- Validation of XML references/external resources
185. Time Savers contd
- CVS Integration (operations, parse output)
- JUnit, ANT integration (parse output)
- Easy debugging (break points, source path)
- JAVAC launched in process (fast)
- Inspect code (critique)
- Many useful plug-ins written by the community
(Plug-in Manager)
196. Visual Modeling
- No built-in features
- SimpleUML plug-in covers the basics
207. Build a GUI
218. Build/deploy a JSP
- Strong JSP and Tomcat 4.x support
- Java syntax checking, code completion, and
refactoring in scriptlets - Integrated JSP and Servlet debugging
- Web application file management
- Pre-deployment JSP compilation checks
- JSP tag completion and syntax checking, including
custom tag libraries
228. Build/deploy a JSP contd
- No support for packaging WAR
- IDEA expects un-expanded WAR-like directory
structure - Easy to package this directory structure from ANT
(using the ltwar gt task)
239. Deploy an EJB
- Nominal support for creating new EJBs
- Automatic management of deployment descriptor
- Easy to add/delete EJBs
- Easy to setup Entity CMP relationships
- Functionality is still somewhat buggy/hokey
- No support for packaging/deploying EJBs
- This is always container specific anyway
2410a. Customization/Extension
- Installing/using plug-ins
- Copy the .JAR file to /idea_home/plugins
- Start IDEA
- The plug-in Plug-In Manager allows you to see
what plug-ins exist, download and install them
directly from the GUI
2510b. Customization/Extension
- Writing a plug-in
- IntelliJ Plug-in Documentation
- Plug-in FAQ
- Two kinds of plug-ins application-level (created
and initialized at start-up) and project-level
(created for every project) - The plug-in configuration is provided in plug-in
JAR/META-INF/plugin.xml
2610b. Customization/Extension contd
ltidea-plugingt ltnamegtVssIntegrationlt/namegt
ltdescriptiongtVss integration plug-Inlt/descriptiongt
ltversiongt1.0lt/versiongt ltvendorgtFoo
Inc.lt/vendorgt ltidea-version min3.0
max3.1/gt ltapplication-componentsgt
ltcomponentgt ltinterface-classgtcom.foo.C
omponent1Interfacelt/interface-classgt lt
implementation-classgtcom.foo.Component1Impllt/imple
mentation-classgt lt/componentgt lt/applic
ation-componentsgt ltproject-componentsgt
ltcomponentgt ltinterface-classgtcom.foo
.Component2lt/interface-classgt lt/componentgt
lt/project-componentsgt lt/idea-plugingt