Česky   |  Deutsch   |  English   |  Español   |  Français   |  Indonesia   |  日本語   |  한글   |  Polski   |  Português (BR)   |  Türkçe   |  中文   |  正體中文   |  Your Language  
PlanetNetbeans
Planet NetBeans is an aggregation of NetBeans related musings from all over the Blogosphere.
The Aquarium - January 28, 2012 07:00 AM
Tab Sweep - GlassFish patch, is PaaS Middleware over IaaS, NetBeans tips, JCP updates, ...

Note: if you're reading this using a feedreader, please make sure you've updated to the updated TheAquarium feed.

Recent Tips and News on Java, Java EE 6, GlassFish & more :

Radio Receiver

GlassFish Enterprise Server v2.1.1 Patch 15 (GlassFish for Business)
PaaS is not Middleware over IaaS (Reza)
Sneak peak at Java EE 7 - Multitenant Examples with EclipseLink (Markus)
Building and testing ADF applications with Maven, JSFUnit, Arquillian and Embedded GlassFish (Dablomatique)
NetBeans 7.1 IDE: Shelve and Un-Shelve Changes (John)
NetBeans 7.1 IDE: Inspect and Transform to JDK 7 (John)
JUG Leaders Conference (The Java blog)
New JSR now open for review (The JCP blog)
JCP EC Updates (The JCP blog)

NetBeans Zone - The social network for developers - January 27, 2012 03:36 PM
Microchip Uses NetBeans as Springboard for Industry Awards

During the past month, Microchip has been honored with four industry awards for our MPLAB X IDE. In the U.S., we won ECN Magazine’s Readers’ Choice Tech Award in the Software category, and were named by the editors of EDN to their 2011 Hot 100 list, in the Development Tools category.

The Aquarium - January 27, 2012 12:46 PM
What's up with EclipseLink?

EclipseLink's Shaun Smith has recently been delivering a number of presentations on the status and future of the open source project. If you're curious about where innovative JPA projects are going, then you should check out this slide deck from Shaun.

ALT_DESCR

Here are the main themes covered:

REST: integration with JAX-RS to access relational data through REST with HTML 5 as the primary client with possibly JPA entities and persistence units defined via metadata with dynamic provisioning (i.e. no Java coding required).
EclipseLink NoSQL: annotations (@NoSql) and XML to identify NoSQL stored entities with initial support for MongoDB and Oracle NoSQL.
Multitenancy: already present in the shipping version of EclipseLink using the @Multitenant annotation and supporting different topologies with dedicated or shared application and/or database.

Next stop: EclipseLink 2.4 along with the June Juno Eclipse Release.

NetBeans Zone - The social network for developers - January 27, 2012 05:01 AM
Arquillian with NetBeans, GlassFish embedded, JPA and a MySQL Datasource

This is an, let's call it accidental post. I was looking into transactional CDI observers and playing around with GlassFish embedded to run some integration tests against it. But surprisingly this did not work too well and I am still figuring out, where exactly the problems are while using the plain embedded GlassFish for that. In the meantime I switched to Arquillian. ...

Geertjan's Blog - January 26, 2012 11:03 PM
Upcoming NetBeans Feature: Generate Implementing/Extending Class!

Another upcoming NetBeans IDE feature, already in the daily builds, is this hint, which appears when you put the cursor in a class declaration:

Similarly:

When the hint is invoked, the new class, with all its required methods, is automatically generated, as a separate class (a dialog pops up letting you specify the name of the class and the package where the class should be created).

How handy these small enhancements can be!

This particular enhancement was included for 7.2 specifically because of a remark Arun Gupta made during Devoxx last year. That small discussion in a hallway resulted in this issue being highlighted and implemented:

http://netbeans.org/bugzilla/show_bug.cgi?id=49559

Just pointing this out as yet further evidence that we're really listening to users and, between balancing the various requirements coming in from various sides, are making very sure that user requests are taken extremely seriously.

The Aquarium - January 26, 2012 07:00 AM
JCP.next with merged Executive Committee - JSR 355

The latest JSR filed is #355 and it's not a technical one - "JCP Executive Committee Merge". As the name implies this is about merging the current ME and SE/EE executive committees into a unified one.

If you've been following carefully the changes planned for the JCP, the 2-step process turned into a 3-step evolution:
1/ JSR 348, JCP transparency
2/ Merging the two existing Executive Committees
3/ Sorting out the more complicated legal issues

ALT_DESCR

If you're curious about the role of the executive committee members, check out this page on JCP.org. Hint: voting on JSRs is part of it, but there's more. The JSR Review Ballot starts on February 7th.

NetBeans Zone - The social network for developers - January 26, 2012 05:47 AM
Focus on JavaFX 2 FXML with NetBeans IDE 7.1

In October 2011, I used the post Hello JavaFX 2.0: Introduction by NetBeans IDE 7.1 beta to look at using NetBeans IDE 7.1 beta to build a simple Hello, World style of JavaFX 2.0 application. James Sugrue

The Aquarium - January 25, 2012 07:00 PM
Upcoming JavaOne conferences. Around the World.

JavaOne

Building on the successful Java One San Francisco and Latin America editions in 2011, the conference is on the road to three international destinations : Tokyo, Moscow and Hyderabad. Here are the details :

JavaOne Tokyo (Japan)
Date: April 4-5, 2012
Location: Academy Hills 49F, Roppongi Tokyo
Event Web site : Japanese | English

JavaOne Moscow (Russia)
Date: April 17-18, 2012
Location: Crocus Expo, International Exhibition Center

JavaOne Hyderabad (India)
Date: May 3-4, 2012
Location: Hyderabad International Convention Center

We're looking forward to meeting you at one of those events to chat anything Java EE and GlassFish!
By the way, the dates for JavaOne 2012 San Francisco are September 30th - October 4th and registration is open already.

NetBeans Ruminations » NetBeans - January 25, 2012 06:08 PM
Building a NetBeans Platform Application from the Command Line

During an average day working on an Ant-based NetBeans Platform application, a developer would constantly use the project actions such as “Build”, “Clean” and “Test” in the NetBeans IDE. But when the application needs to be built on a build server, a way needs to be found to perform these actions from the command line. Since the projects are already Ant-based, and the actions in the IDE are linked to Ant build scripts, this is luckily straight forward. The only question is which target(s) to call.

For more information about the Ant-based build harness and how it is structured, have a look at this article. (Note that there are multiple parts, and part 2 is especially useful in this context.) But for now the only really important part to note is that all Ant-based NetBeans Platform Applications (suites) and modules have a build.xml file.

Before listing the Ant targets that are generally useful, I would like to explain how to find them yourself. The first and most difficult way is to find the action in the IDE source code. I have done this before, but it is in almost all cases complete overkill. :) The second option is to expand the Build Script under Important Files in the project, to see a complete list of all the targets that are available. While this is much easier, it is still not the most direct route.

The best option in almost all cases is to perform the action and then look at the title of the Output window. The name of the project appears there, followed by the target(s) in brackets.

Targets applicable to NetBeans module projects

  • netbeansBuild action in the IDE – compile the module, creating artifacts in the build folder of the module as well as the build folder of the suite
  • cleanClean action in the IDE – removes the contents of the module’s build folder
  • nbmCreate NMB action in the IDE – creates an nmb file for the module in its build folder
  • test-unitTest action in the IDE – executes the unit tests in the module and creates artifacts in the build/test folder of the module

Note: For standalone modules, the same targets apply. The difference is that for the netbeans target, all the artifacts are placed in the module’s build folder.

Targets applicable to NetBeans Platform application suites

  • buildBuild All action in the IDE – builds all the modules contained in the suite
  • cleanClean All action in the IDE – cleans all the modules in the suite and removes the build and dist folders of the suite
  • build-zipPackage as > ZIP Distribution action in the IDE – builds all the modules in the suite and then creates a .zip file in the dist folder of the suite
  • nbmsPackage as > NBMs action in the IDE – builds all the modules in the suite and then creates a .nbm for each of the modules in the suite’s build/updates folder
  • testTest All action in the IDE – executes the unit tests in each of the modules contained in the suite and creates artifacts in the build/test folder of each module

Geertjan's Blog - January 25, 2012 12:56 PM
Upcoming NetBeans Feature: Multi-Row Editor Tabs!

Several NetBeans users have been asking, for a long time already, for multi-row tabs in the NetBeans editor.

Read the list of use cases and requests around this area in the issue:

http://netbeans.org/bugzilla/show_bug.cgi?id=172512

Today, Stan Aubrecht, the NetBeans Platform window system engineer, closed the above issue. Why? Because he fixed it. In the Options window, you'll see several new options in the Appearance tab:

Above, the "Tabs placement" and "Multi-row tabs" options did not exist before today. As you can see, not only will you be able to set multi-row tabs, but you'll also be able to set where the tabs should appear, whether they're multi-tab or not.

Here you see multi-row tabs, with "top" tab placement:

Multi-row tabs, with "bottom" tab placement:

Multi-row tabs, with "right" tab placement:

Of course, anyone creating their applications on the NetBeans Platform will automatically inherit this behavior too, if they're creating document-centric NetBeans Platform applications.

With this new level of flexibility, you're able to get even more comfortable in your development environment than before.

Thanks, Stan!

The Aquarium - January 25, 2012 07:00 AM
Help shape the future of GlassFish (we're hiring)!

The team is looking for talent to help build the future of our application server. If you are interested, check out this job posting. Here's an extract :

"Technical lead, design and develop features to manage the configuration of clustered, highly available deployments in elastic cloud environments that delivers massive scalability."

ALT_DESCR

This is a job based in the US to work on the admin infrastructure, including on PaaS features.

NetBeans Zone - The social network for developers - January 25, 2012 05:45 AM
NetBeans IDE 7.1's Unused Assignment and Dead Branch Hints

One of the new code hints provided by NetBeans 7.1 is the Unused Assignment hint. A simple code sample that will cause this hint to be displayed in NetBeans 7.1 is shown next. James Sugrue

The Aquarium - January 24, 2012 07:19 PM
New in JPA 2.1 Early Draft

Java EE 7 is moving along nicely at the speed of its various JSRs and Arun has a rundown of the new features planned for JPA 2.1 as described in the recent Early Draft document.

ALT_DESCR

The blog entry covers Stored Procedures (similar to named queries, defined on the entities themselves), bulk operations, new FUNCTION, ON, TREAT JPQL keywords, more alignment with CDI and unsynchronized persistence context.

There are more features planned for JPA 2.1 that didn't get in the early draft (such as multi-tenancy). As a reminder, EclipseLink is the reference implementation (RI) for this specification while GlassFish 4.0 will deliver the overal Java EE 7 RI.

NetBeans Zone - The social network for developers - January 24, 2012 03:52 PM
NetBeans Weekly News (Issue #521 - Jan 23, 2012)

Project News NetBeans at Free Virtual Developer Days! Starting this week, several virtual developer days will be held. NetBeans will be present too. Watch presentations and follow hands on labs where the IDE will be used for rapid Java EE 6 development.

NetBeans for PHP - January 24, 2012 03:18 PM
Identical Comparison Hint

<p>Hi everybody! Today we would like to introduce you some of our new hints. This one is called <strong>Identical Comparisons</strong> and checks whether you use more strict <em>identical</em> comparison instead of simple <em>equal</em> comparison. If not it suggests you to change it to identical one.</p> <p>If you don't know what is the difference between identical and equal comparisons, you can read it in official <a href="http://php.net/manual/en/language.operators.comparison.php">PHP manual</a>.</p> <p>And because we know, that sometimes there is a use case when you should use just <em>equal comparison</em>, this hint is <em>row sensitive</em>. It means that well known hint bulb will appear only if you are on the row with comparison. So no yellow warning triangle will scream on you ;) This hint just wants to help you :)</p> <p>But there is just another advantage of this hint. It can change your &quot;==&quot; sign to &quot;===&quot; as you certainly expected, but it can detect the type of the right hand side variable and make a type cast for you too!</p> <img src="http://blogs.oracle.com/netbeansphp/resource/article_images/identical-comparison-1.png" alt="Identical Comparisons" /> <p>That's all for today and as usual, please <a href="http://bits.netbeans.org/download/trunk/nightly/latest/">test it</a> and if you find something strange, don't hesitate to <a href="http://netbeans.org/community/issues.html">file a new issue</a> (component <em>php</em>, subcomponent <em>Editor</em>). Thanks.</p>

NetBeans Zone - The social network for developers - January 24, 2012 10:06 AM
NetBeans IDE 7.1 Review: NetBeans Platform Support

NetBeans IDE 7.1 adds JavaFX 2.0 Support (see my review of that) and a lot of new features and improvements including improvements to the NetBeans Platform itself. The NetBeans Platform is an application framework that can be used as a stable basis for mostly Java desktop applications. (Dozens of screenshots of applications using this framework can be found here.)

Geertjan's Blog - January 24, 2012 08:32 AM
Syntax Coloring for Clojure

Someone reading yesterday's blog entry might have thought: "OK. So you're not only able to create syntax coloring for some kind of trivial DSL. Yes, you're also able to do it for a real language, in this case, Ceylon. However, you caught a lucky break in that case, it's unlikely you'll be able to do it again for another real language."

Well, OK, take a look at this, my hypothetically sceptical imaginary friend:

What you see here is syntax coloring for Clojure (via the Clojure.g ANTLR file), created in about 45 minutes (Clojure turns out to have a lot less tokens than Ceylon), together with HTML embedding within Clojure comments. However, note that the embedding only supports syntax coloring, not code completion, not sure if that is possible nor how to do that.

Here's my embedding definition, i.e., this is all, no more or less than this:

@ServiceProvider(service = LanguageProvider.class)
public class HTMLEmbeddingLanguageProvider extends LanguageProvider {

    private Language embeddedLanguage;

    @Override
    public Language<?> findLanguage(String mimeType) {
	return ClojureTokenId.getLanguage();
    }

    @Override
    public LanguageEmbedding<?> findLanguageEmbedding(Token<?> token, LanguagePath languagePath, InputAttributes inputAttributes) {
	initLanguage();
	if (11 == token.id().ordinal()) { //11 is the token ordinal in Clojure for comments
	    return LanguageEmbedding.create(embeddedLanguage, 0, 0);
	}
	return null;
    }

    private void initLanguage() {
	embeddedLanguage = MimeLookup.getLookup("text/html").lookup(Language.class);
	if (embeddedLanguage == null) {
	    throw new NullPointerException("Can't find language for embedding");
	}
    }

}

Soon I'll be working on a tutorial showing how to create syntax coloring for the Movie Query DSL I showed over the last two days.

Adam Bien - January 24, 2012 06:00 AM
JavaFX 2.0 Is Available On ...Linux

JavaFX 2.0 SDK is available for Linux as Developer Preview Download. Enjoy FX-ing!
*NEW* Real World Java EE Night Hacks - Dissecting Best Practices ...and the bestseller Real World Java EE - Rethinking Best Practices

The Aquarium - January 24, 2012 01:00 AM
Java EE 7 progress - CDI 1.1 EDR and Weld 2.0 Alpha

Having the Early Draft Review of JSR 346 (CDI 1.1) available for review and studying is good but having an early implementation to go along is even better.

That's what JBoss' Jozef Hartinger has recently announced on his blog - an alpha release of the future Weld 2.0 reference implementation.

Weld Logo

According to Jozef, the main purpose of this release is in fact to provide a feature-complete implementation of this draft CDI specification and features such as CDI.current(), application life-cycle qualifiers, beans.xml manipulation using ProcessModule, and many others.

As a reminder CDI 1.1 is scheduled to be integrated in the upcoming Java EE 7 platform later this year.

NetBeans Zone - The social network for developers - January 23, 2012 09:29 AM
Video NetBeans 7.1 IDE: Using Inspect and Transform to JDK 7

This video demonstrates the Inspect and Transform functionality available in NetBeans 7.1. The inspect and transform refactoring function is used to migrate Apache Commons IO 2.0 from JDK 5 to JDK 7. This demonstration shows the ease of use in performing a sophisticated upgrade. A project this size would normally take weeks to upgrade is done in less than 20 minutes. ...

Geertjan's Blog - January 23, 2012 08:38 AM
Syntax Coloring for Ceylon

Yesterday's blog entry was a "smoke test" for generating syntax coloring and anyone reading it might have thought: "Big deal. Syntax coloring for a trivial query language is trivial. Call us again when you've provided syntax coloring for a real language."

And, justifiably so, since the DSL used yesterday is obviously, and appropriately, pretty simplistic:

OK, fine. So how about this. Syntax coloring for Ceylon (http://ceylon-lang.org/), which is one of the new JVM languages, (read about it here on Wikipedia):

(I literally know nothing about Ceylon, copied the code shown above from here.)

What's handy about Ceylon is that you don't even need to generate the lexer. The ANTLR-based lexer (and the parser) is already in the com.redhat.ceylon.typechecker-0.1.jar. So then it's a question of weaving the Ceylon lexer with the NetBeans APIs, which [as I pointed out yesterday] is actually a trivial task.

And it's even a trivial task for a real language, as you can see. I spent about 2 hours on this and only because Ceylon has a lot more tokens than my simple 'smoke test' of yesterday did. And a lot of those two hours was spent getting the coloring right, i.e., I wanted the colors to have exactly the right shade of purple, green, etc, which took a bit of experimentation. You don't like my colors? Also fine. Change them in the Options window:

So, since I imagine there's now even more interest in this topic than there was yesterday, I'm going to make a screencast that shows how to do this, with an accompanying tutorial, and a list of references that especially focuses on the existing implementations of these NetBeans APIs, which are extremely useful when you need to customize your implementations slightly and diverge from the standard path.

The Aquarium - January 23, 2012 01:00 AM
Admin Console, Community and Virtuous Circle

Note: if you're reading this using a feedreader, please make sure you've updated to the updated TheAquarium feed.

We haven't really covered this before, but there's been quite a bit of work on the admin console in the upcoming GlassFish 3.1.2 release (in addition to the other new features and theme and updated components).

Specifically in this release, the team worked on the following :

ALT_DESCR

• Performance startup (better figures by default and conditional automated console initialization).
Feature parity with CLI in the areas of Secure Admin config, JMS Cluster configuration, Monitoring Data consolidation, new Http Listeners page (à la GlassFish v2), listing EJB timers.
• Support for new product features such as DCOM cluster nodes.
• Ability to collect domain instance logs.
• More tests.

The best part about these improvements? There's almost all entirely driven by your feedback! So thank you to everyone that took time to help us understand how to make GlassFish a better product via bug reports, requests for enhancements and even phone calls in some cases. Let's keep doing this!

The GlassFish Web Console started off back in 2006 as the killer feature, especially compared to other open source offerings. With continued enhancements I think it still has a clear edge on them and longer-term plans shouldn't prove me wrong!

Adam Bien - January 22, 2012 10:30 AM
Upcoming Java EE / FX Events

  1. In this free event at 26.01.2012 in Munich: JavaFX 2.0, Lean, Productive and Maintainable I would like to explain why Java FX rocks and what happens, if you combine Java EE with Java FX.
  2. Session: "Less Patterns Is More - With Java EE 6",26.01.2012, 14:30-15:30 in Munich (OOP Conference)
  3. Workshop: "Java EE 6/7 Best Practices", 27.01.2012, 9:00-16:00 in Munich (OOP Conference)
  4. Real World Java EE 6 Bootstrap Workshop, Airport Munich, at 12.03.2011 There are already sufficient registrations--it will definitely take place. One day is more than enough to become really productive with Java EE :-)

*NEW* Real World Java EE Night Hacks - Dissecting Best Practices ...and the bestseller Real World Java EE - Rethinking Best Practices

Geertjan's Blog - January 22, 2012 09:05 AM
Generate Syntax Colors for a Domain Specific Language

In about 15 minutes of work, without typing a single line of actual code, I created syntax coloring for the domain specific language described here.

The result in a JEditorPane (and notice the non-printable characters are displayed, optionally, too) is as follows:

The user of the application is able to customize the colors:

Again, I did not type a single line of code to create the above. It was all as simple as using a lexer generator (JavaCC in this case) and then connecting the generated files into 100% standard NetBeans Lexer API implementations. I.e., all copy and paste stuff, together with a small bit of configuration and tweaking.

If anyone is interested in step by step instructions for getting to the above, again, without doing any actual coding at all, please leave a message and, based on whether there is some demand for this, I'll write a tutorial describing the procedure for this particular domain specific language.

NetBeans RSS Feed Filter - January 21, 2012 11:57 PM
NetBeans 7.1 IDE: Shelve and Un-Shelve Changes

The NetBeans 7.1 IDE introduces a really cool new feature called shelving. This allows a developer to make changes to a project without committing them to a source control system.

How often have you wanted to try out some new idea on your code without having to check it into source control? This allows you to do just that.

What is shelving?

Shelving creates a patch based on whether an individual file, files, or project is selected. This is a standard patch file and can be applied from the command line, or sent via email to others.

A nice feature is that you can provide meaningful names to the shelved changes. This makes it easier to go back later and apply them to your project.

Note: This functionality is only available for Subversion and Mercurial based projects.

I created a five minute video to demonstrate this really cool new feature.


NetBeans RSS Feed Filter - January 21, 2012 11:57 PM
NetBeans 7.1 IDE: Inspect and Transform to JDK 7

I gave a talk this month at the Greenville Java Users Group (GreenJUG) on the new features, and tips & tricks in the new NetBeans 7.1 IDE.

One of the most popular demonstrations was using NetBeans to download Apache Commons IO from the Apache Subversion repository, open the Apache Maven project natively, and upgrade it from JDK 5 to JDK 7.

This is a real world demonstration of the incredible and powerful new capabilities in the IDE. What is particularly interesting is that the Apache Commons IO project does a great job of providing  unit tests to validate our changes.

I created a 20 minute video which demonstrates this really vital new functionality to help you migrate your projects to JDK 7.


NetBeans RSS Feed Filter - January 21, 2012 11:57 PM
NetBeans 7.1 IDE: Remote Database Connections

The NetBeans 7.1 IDE has a feature that has been around for a while, but does not get as much attention as it should. NetBeans allows you to take advantage of using remote databases for doing Java development. There are a number of wizards which can take advantage of connections created in the Services → Database tab.

In the demonstration video, I connect to a remote Apache Derby Database, but the same principals apply to any database as long as you have JDBC drivers available.

Tips & Tricks


To verify that a remote database is Apache Derby (Java DB) which is listening on port 1527 (default Derby port). I connect to the remote application and append XXX;create=true; to the end of the connection string. When I test the database connection, if it is Apache Derby, it will create the new database which confirms our suspicion.

This 3 minute video demonstrates this valuable feature which developers should use for all their database needs.


The Aquarium - January 21, 2012 05:39 AM
Tab Sweep - GlassFish encoding, REST from NSA, OpenJDK on Mac progress, coding guidelines, Oracle ecosystem, ...

Note: if you're reading this using a feedreader, please make sure you've updated to the updated TheAquarium feed.

Recent Tips and News on Java, Java EE 6, GlassFish & more :

Radio Receiver

Mac OS X Port Project Status (OpenJDK Wiki)
Customize container-managed security with AuthenticRoast
(IBM developerWorks, uses GlassFish)
Guidelines for Implementation of REST (nsa, yes that NSA)
GlassFish Default Encoding ISO-8859-1 (John)
The CERT Oracle Secure Coding Standard for Java (cert.org)
Hoe to package @Local interfaces in an ear (Adam)
The Java Fluent API Designer Crash Course
Oracle and the Java Ecosystem (InfoQ)
Greg Luck and the return of JSR 107 (H-Online)
David Blevins discusses TomEE and JavaEE containers (YouTube)
How to fix the Glassfish GA 3.1.1 pkg error on Fedora 10 x86_64 (William)
DOAG@Talk: Ed Burns talks about (...) JSF and ADF (YouTube)
First Hudson Release from Eclipse Foundation (HudsonCentral)

NetBeans RSS Feed Filter - January 20, 2012 11:57 PM
Jersey Tip of the Day: Use GZIP compression

JAX-RS (Jersey) offers a GZIP filter to compress data for responses, and to handle GZIP compressed requests. This functionality is very easy to enable, and is configurable for both requests, and responses. That does not get much easier.


 You can prove that this works by querying your resource with Firebug, or Developer Tools (depending on browser). You can also confirm that it is working by performing a query like:

curl -HAccept-Encoding:gzip -HAccept:application/json http://localhost:8080/content-coding-gzip/webresources/widget > json.gz
gzip -v -l json.gz
method  crc     date  time           compressed        uncompressed  ratio uncompressed_name
defla 3a79ae18 Jan 20 15:25                1370                3389  60.3% json

The only issue that I have with the currently implemented version is that it does not use configurable compression level.


Geertjan's Blog - January 20, 2012 02:00 PM
Hidden NetBeans Feature: Drag/Drop to Create HTML Snippets

Here's another super hidden NetBeans feature. Because of the inherent functioning of this feature, it is completely hidden and undiscoverable from the point of view of the NetBeans user interface.

The scenario is that you've got an HTML file open and you're typing something in there. The 'something' is something that you're likely to reuse within the same HTML file or other files, such as the META tags that you see highlighted below:

Now, as you can see, I have the part of the file that I'd like to reuse highlighted.

And then... I drag my mouse into the palette, i.e., the palette that you see on the right of the image above. And then, guess what? This dialog automatically pops up:

The "Content" section above is automatically filled in, based on what I dragged. The other fields and icons are things I fill in myself. Then I click "Add to Palette", at which point the HTML snippet is added into the palette, from where it can then be dragged into an HTML file, like any other snippet in the palette.

Handy, isn't it? And really hidden. (I blogged about this before here in 2008, where you also see a Java file equivalent.)

In other news. There are two excellent new NetBeans blogs out there! The first is NetBeans Ruminations by Hermien Pellissier from South Africa and the other is the NetBeans category of Crazy Java Hacking by Martin Skurla from Slovakia. Check them out! Their blog entries are also going to be visible in the NetBeans welcome screen, because they've been included in the planetnetbeans.org aggregator. You have a NetBeans related blog too? Leave a message here. And if you don't have a NetBeans blog too, why not start one?