Friday, August 15, 2008

Java Debugger New Feature

This is an attempt to create a short screencast about one new feature available in Java Debugger in NetBeans IDE 6.5 Beta onward releases.

video

If you happen to see this screencast please drop a comment. The quality of the screencast seems reduced after uploading to the blogger server. This way of blogging becomes handy when you want to show something you liked quickly to the community.

UPDATE: This screencast is now available on NetBeans.TV site. You can see the New Feature in Java Debugger with better quality there.

With Regards
Tushar Joshi, Nagpur

Thursday, August 14, 2008

Simplified GUI Code Generation

Fully Qualified Class Names
When we design JFrame, JPanels and any other GUI component in NetBeans the generated code contains fully qualified class names of the used classes.

For example let us create a sample JFrame form and add some components to that form through the form designer.

Let us keep the components to minimum as this is just an example. So we have added one label one text field and a button.
When we can see in the folded generated code for init components is all the components are defined and instanciated using the fully qualified class names.

More Human way of code writing
When we write code manually usually we do not write the fully qualified names, we make use of the import option and import all the classes at the top and use just the class names.

NetBeans IDE 6.5 Beta onwards we have a way to do just that. Now we can get simplified code through configuring NetBeans IDE and asking for simplified code.

Select the root component of the form from the Inspector panel. For our example we have clicked on the Form MainForm root node in the tree as shown above.

Now in the properties panel...

There is a new property named Generate Full Classnames and which will be by default checked if you havent done any setting yet. Let us uncheck that checkbox to make our code simpler.

Now the code looks simpler and easy to understand. This is how I will write the code if I write it manually, isn't it?

If you like this setting and if you want it to become the default behavior of the IDE then we have a global setting for it in the Tools > Options dialog box. Just select the Miscelleneous section and the GUI Builder tab. Ensure that Generate Fully Qualified Names of Classes checkbox is unckecked.

With Regards
Tushar Joshi, Nagpur

Wednesday, August 13, 2008

NetBeans IDE 6.5 Beta - Auto Download for Subversion Client 1.5 in Windows

NetBeans IDE 6.5 Beta no longer needs Subversion client installed on Windows XP machine. I got this information in the New and Noteworthy page and since then was excited to try out the NetBeans downloading feature of the Subversion Client 1.5 for Windows from the Update Center.

When you do not have Subversion client installed...


After creating a sample application and choosing the Import into Subversion repository... option, NetBeans IDE 6.5 Beta now shows a dialog box indicating that it could not find Subversion client installed and offers two ways to proceed.

NetBeans IDE 6.5 Beta Offers bundled client



Either choose to download the bundled Subversion 1.5 binaries for Windows from the Update Center or Install the SVN 1.5 Command Line client. It also recommends to choose the first bundled option.

After choosing the bundled Subversion option it shows the license agreement for downloading and installing the bundled Subversion Client.

Accepting the license starts the download in the background. We can see the progress of the download in the status bar of the IDE.


It installs the component smoothly and then asks to restart the IDE. Clicking the restart button makes the IDE shut down and start again. This time before the splash screen it shows an Update banner for some time and then the usual Splash screen.


We still need to create our own repository if we want to keep the project in local repository. If we have a remote Subversion server than we can directly use the server. The point is now NetBeans IDE 6.5 Beta is ready to work with Subversion repositories.

We will choose a local already created repository (through TortoiseSVN) for this example.


Rest all the dialog boxes for showing the list of files to be committed and asking the commit comment will be shown and the files will be committed to the Subversion repository.

Here we can see the project successfully committed to the local subversion repository. NetBeans IDE 6.5 Beta has taken a good step by providing the bundled Subversion client which makes installation and use of Subversion even more easier now.

with regards
Tushar Joshi, Nagpur

New Colors of the NetBeans IDE 6.5 Beta Installer

I joined the download party for NetBeans IDE 6.5 Beta today. This time the installer has new design and new 6.5 logo.

I downloaded the Java EE pack and this is what I got bundled in one installer. The Apache Tomcat 6.0 was not offered but through the Customize... button I got it listed in the list of to be installed components of the installer.

The installation was smooth. When I started NetBeans IDE 6.5 Beta I was surprised with the new design of the splash screen.

I liked what I saw. What about you?

With Regards
Tushar Joshi, Nagpur

Introducing NetBeans IDE 6.5 Beta

NetBeans IDE 6.5 Beta is released today.

Download NetBeans IDE 6.5 Beta Now



The NetBeans IDE 6.5 Beta release provides several new features and enhancements, such as a new IDE-wide QuickSearch shortcut, more user-friendly interface, and automatic Compile on Save.

In addition to full support of all Java editions (Java SE, Java EE, Java ME), the NetBeans IDE is the ideal tool for software development with PHP, C/C++, Groovy and Grails, Ruby and Rails, Ajax and JavaScript.

The 6.5 release also includes enhanced support for web frameworks (Hibernate, Spring, JSF, JPA), the GlassFish application server, and databases.

The main features supported and listed on netbeans site are

PHP

  • PHP Editor (Code completion, syntactic and semantic code highlighting)
  • Support for heredoc notation and PHTML
  • Xdebug
  • Generators for MySQL database code snippets
JavaScript and Ajax
  • JavaScript Editor and Debugger
  • JavaScript Library Manager
  • Yahoo UI, Woodstock, jQuery, Dojo, Scriptaculous, Prototype libraries
  • CSS Editor
Java EE & Web Development
  • Enhanced support for Spring, Hibernate, JSF, JSF CRUD generator, JPA (Java Persistence API)
  • Create RESTful web services from database tables or from JPA entities
  • Drag and drop SaaS services into PHP files
  • SQL Editor Improvements (code completion, save/recall queries, and more)

Groovy and Grails
  • Develop pure Groovy apps or use Groovy in Java SE projects
  • Groovy editor (code completion, highlighting, and more)
  • Grails web application framework
  • Open existing Grails applications without adding metadata

Ruby and Rails
  • Rake improvements: Rake Runner and a pre-generated Rake file
  • Debugger: Conditional breakpoints and catchpoints
  • Ruby projects accept JVM options from command line
  • New Test Runner interface for displaying test results

GlassFish v3 Prelude for Web Development
  • Modular, OSGi based architecture
  • Small footprint, fast startup and deployment
  • Support for scripting, including JRuby

C/C++
  • Improved code completion, error highlighting, and semantic highlighting
  • Call graph, Memory window
  • Remote development
  • Packaging of application as tar files, zip files, or SVR4 packages

Java ME
  • New project wizard for adding custom components to the Visual Designer Palette
  • New SVG UI components in the enhanced SVG Composer enable rich UI design
  • New Data Binding Custom Components in the Visual Designer Palette
  • Upgraded obfuscation tool to ProGuard 4.2 and test framework to JMUnit 1.1.0

Java SE
  • Multi-threaded Java debugging
  • Java Swing GUI Builder: TreeModel Editor for JTrees
  • Improved Eclipse project import and synchronization

IDE Tools and Usability
  • One QuickSearch shortcut for IDE actions, files, options, and docs
  • Support for Windows UNC paths (shared network folders)
  • Automatic Compile on Save / Deploy on Save
With Regards
Tushar Joshi, Nagpur