Geertjan's Blog

  • February 19, 2007

Temporary in NetBeans Land?

Geertjan Wielenga
Product Manager
Temporary in Netbeans land might end up staying a bit longer. He has a genuinely good analysis of the pros and cons of desktop client development on the NetBeans Platform. On the 'pro' side we have... drum roll... Swing and Matisse. Exactly. Those are (also in my humble opinion) the distinguishing features. For the rest, look and feel, performance, extent of the infrastructure offered... not much difference between Eclipse RCP and NetBeans Platform. But the fact that we're using Swing and Matisse are the clinchers. Time and again, people in the real world (i.e., not in some marketing office, even assuming NetBeans had one of those) have testified to this being true.

On the 'con' side, however... there are some accurate assessments. See them here. However, if these are all his problems, then NetBeans IDE 6.0 Milestone 6 is going to put a smile on his face.

Firstly, let's look at his issue with error reporting:

It always takes a while to notice coding errors. I sometimes stop in the middle of typing, waiting for the errors to show and the small light bulb appear. Eclipse is much better in that respect. Also the quick fixes in Netbeans are not as good as in Eclipse.

I think this comment is inaccurate, in that it doesn't paint the full painful picture. Not only do the errors take a long time to show up, they also take a long time to go away! After fixing an error, I frequently need to either (1) ignore the remaining error marks or (2) do a "Clean and Build" to refresh the state of the error markings. So, things are worse than is stated in that blog entry. And that's just the start of it. I've been frustrated on a number of other levels in the editor in NetBeans IDE 5.5. Then... I tried NetBeans IDE 6.0 Milestone 6. Read this document and see why I am no longer concerned anymore about the issues I had with the editor before. They'll all be dealt with in 6.0. Most noticeably, aside from all the colors and highlights and so on, the speed of coding is vastly improved. I can code faster, see code completion earlier, and surround code much more easily. And when you press "Ctrl-R", each occurrence of the identifier under the cursor is highlighted and you can change them all instantly, in place, as shown here:

Your fingers need never leave the keyboard again!

Hints, also known as "quick fixes", have been beefed up as well. The one I particularly like is the hint that tells you when import statements are no longer used, by coloring the unused ones in grey, and then even offers to remove them for you, as shown here:

Secondly, here's another comment from that blog entry:

I’m mostly doing plugin projects and they behave different from Java projects. I can’t find a way to add more source directories.

Well, here's something really cool that I discovered today. In NetBeans 6 Milestone 6, you can drag and drop files from outside the IDE straight into either the editor or explorer views. This is pretty awesome. Literally, just go to your filesystem, (i.e., outside of NetBeans IDE) and simply start dragging. Once you get to the editor, you'll see the cursor change and you'll be able to drop the file and then the content is displayed in the editor. If you continue dragging, the file can be dropped in the Projects window, Files window, or Favorites window.

"That's nice, but it would be even better if you could drag an entire folder like that. That's when I'll raise an eyebrow. Not before." Glad you said that, my sceptical friend. Because that functionality is there too. Simply drag an entire folder and drop it wherever you like. For example, drag an entire folder of source files into the Source Package folder... and you have a new package in your application, as I did here with the "org" folder in my filesystem:

Woohoo. Better it doesn't get.

For the other issues mentioned in Temporary in Netbeans land, I totally agree with the gripe about the Library Wrapper Module Project. And many others would agree with my agreement and are arguing for having this aspect fixed. The other points mentioned in that blog entry, about CVS integration and JUnit tests... I don't know about the CVS problem, makes sense and I think that should be fixed, but I'm sure the JUnit test concern is solveable, because JUnit tests run fine in NetBeans module projects.

So, here's hoping that Temporary in Netbeans land will be a longer stay. Whether the stay is longer or not, it is clear that the majority of concerns raised are now part of the past, thanks to all the fantastic work done for NetBeans IDE 6.0.

Join the discussion

Comments ( 13 )
  • Markus Monday, February 19, 2007
    Hi Geertjan and thanks for the reply.
    The JUnit problem I had was that I checked out the project from CVS before there where any tests added. In a module project you can't add new source and test directories in the project properties.
    I tried to create the directory manually, but I must have done it in a wrong way.
    By the way, I'm waiting with my credit card in hand for The Book. :-)
  • Gustavo Monday, February 19, 2007
    > plugin projects and they behave different

    True. Did you try some refactorings, like a simple rename on a form? or a "surround with" fix on a form? You'll waste a lot of time trying to fix the mess.
    You have to choose: Matisse or refactorings. Of course, I prefer Matisse... but I hope 6.0 fixes these things for RCP projects.
  • Markus Monday, February 19, 2007
    Yes, and the wizards for TopComponent are "one way". I have renamed a few TopComponents and it takes a while, and some "grep -r OldName \*" to find all references.
    My posting was about the IDE, but I think I will write one on the Platform later. But since my biggest problem is with documentation, I will wait until I have read The Book.
    Right now I find myself jumping from example project to javadoc, to another example, to javadoc again.
  • Geertjan Monday, February 19, 2007
    Thanks for the responses, Markus and Gustavo. Markus -- what kind of things are you hoping to find in the book? Just asking so I can see whether your expectations are going to be met. Drop me an e-mail at geertjan DOT wielenga AT sun DOT com and we can talk some more.
  • Vincent Brabant Monday, February 19, 2007
    Please look at the flash demo of nb6 new editor's features
  • Geertjan Tuesday, February 20, 2007
    Wow, cool demo, thanks Vincent!
  • Cybernd Tuesday, February 20, 2007
    Thx! Maybe NB6 is able to compete against eclipse. p.s. white font on white background is not easy to read (i mean the 2 checkboxes for "Notify me by email of new comments" and "Remember Information?")
  • Daniel Sheppard Thursday, February 22, 2007
    Dragging a file into NetBeans sounds good, but the file type detection method is still flawed: some files are identified not by their extension, but by the start of their content. This is most notably true of XML files and UNIX shells scripts and Perl. Moreover, how would you distinguish between an ANTLR grammar and a Groovy script: both have the extension of .g! In this respect JEdit is easier for viewing ad hoc files.

    Also, NetBeans provides no means for me to tell it for a given file to treat it as a different file type that its default choice. This is a feature I have used on occasion in JEdit.

    Dragging directories into Favourites sounds good until you realise that the directory and its contents have been copied into a favourites folder. This is different to using the 'Add to favourites...' way of adding a directory where I get a view of the original files. This difference is misleading and the copy-on-drag feature is not very useful.

  • Geertjan Thursday, February 22, 2007
    Daniel, you can change a file type to be treated as a different file type. In the Options window, in the Advanced section, you can specify that a Java file should be treated as an HTML file, for example. Not sure about your first point and haven't tried the third point yet. Will get back to this soon. Thanks for the comments.
  • Daniel Sheppard Friday, February 23, 2007
    Thanks for your response. I should also say that I am a long-time NB user and happy to stay that way ;) I regularly use daily builds and think that the new changes are a great improvement.

    To clarify point 1: it appeals to the way the the UNIX file command and JEdit both work. JEdit not only looks at file extensions, but can also identify files from a pattern match of the first line (specified in the Editing section of global options). So if a line begins <\\?xml\* then it is an XML file, if it begins #!\*sh\* it is a UNIX shell-script or if it begins #!\*/\*python\* then it is a python script. (I got the extension of groovy scripts wrong though). I know that we have a number of scripts that have no extension. Indeed a number of UNIX commands are just shell-scripts that have no extension. NetBeans has no means to syntax highlight these files.

  • Geertjan Friday, February 23, 2007
    Hi Daniel, there are two ways in which a file is recognized in the IDE: either by its extension or, if it is an XML file, by its namespace or root elements. I imagine that if there are scripting languages that provide scripts without file extensions, then 6.0 will handle this somehow, because 6.0 will provide a lot of support for scripting languages. To make that support possible, I imagine somehow or another the scripting language of the script needs to be identifiable. If not by file extension, that will have to be done some other way that I am not aware of yet. I'd write to dev@openide.netbeans.org and ask there to see what the answer is to your question.
  • jianwu_Chen Thursday, March 15, 2007
    I set up a project, which depends on some libraries. Is there any easy way to export the library defination from my enviroment to my co-worker's pc. It seems they have to configure the library defination from scratch. This is very troublesome expecially for complex library definations such as Hibernate which need more than ten jar file inside the library.
  • Geertjan Thursday, March 15, 2007
    No sure, jianwu_Chen. Please write to nbusers@netbeans.org and ask this question.
Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.