Java FX - Shapes, Binding, Animation Screencast By Josh Marinacci
Short and nice tutorial, which gives you an overview about Binding, Shapes and Animation (timelines and tweens) by Josh Marinacci Gesendet von admin [Netbeans] ( July 05, 2008 04:43 PM ) Permalink | Kommentare [0]Netbeans 6.1 Editor - One Of My Favorite Shortcuts / "Hidden" Functionalities
Netbeans 6.1 is able to automatically assign a return value and create a variable for you. This is really convenient. To try it out do the following:
- Type e.g. new java.util.Date(); (or new Date() with strg+space -> it will import it for you), or invoke an arbitrary method with a return value (e.g toString()).
- Then go with the cursor to Date() (or the method).
- You should see a yellow bulb on the left. Either click on the bulb, or click alt+enter.
- Netbeans should suggest you: "Assign Return Value To New Variable" just press Enter.
- Netbeans will create a variable, derive the name and the type. The end result is: Date date = new Date();
How To Start With Mercurial in 3 Minutes - or How Big Is The Netbeans Source Repo?
I read some installation instructions for installing Mercurial and checking out the sources. I got more and more confused - and I just tried it out. It turned out to be much easier, than expected. You just have to dowload the mercurial binaries, and execute the installation package (this is all you need for start). On Windows (Vista) it takes about 2 minutes. You don't even have to restart your machine (which is remarkable). Then restart Netbeans 6.1 (in case it is already running), go to Menu "Mercurial" -> "Clone Other". You will be asked for the Repository URL. Use this: http://hg.netbeans.org/main to download Netbeans sources. It will take some time to clone the repo. In my case it took about 40 minutes over slow DSL line. After this you will be asked to open 899 projects (it's a good performance test for netbeans). The whole repo is 1.5 GB big, it contains 167.269 files. Gesendet von admin [Netbeans] ( June 23, 2008 11:06 AM ) Permalink | Kommentare [1]Google Trends - Netbeans 6.1 More Popular Than Eclipse? What's about IntelliJ?- try it out...
I just couldn't believe the Amateur's Coding Post about Google Trends result and played around with this tool. Regardles which parameters I used - Eclipse became less and less interesting - and Netbeans the opposite. Both lines were crossed at the end of 2007. It's really surprising - the popularity of Netbeans seems to increase, and of Eclipse to decrease. I tried with Netbeans IDE as first parameter, and Eclipse IDE as first - but the result was in both cases the same - Netbeans is more popular regarding to Google Trends! The comparison between IntelliJ and Netbeans was even more surprising.
However the result could also mean: Eclipse has fewer bugs, than Netbeans - so developers do not have to search for it :-).
Gesendet von admin [Netbeans] ( May 26, 2008 12:35 PM ) Permalink | Kommentare [18]Netbeans 6.1 Support For Ant File Editing - One Thing What I Miss
The support for working with Ant-Files in Netbeans 6.1 is really good. However Eclipse provides a better editing experience right now. Especially useful in eclipse is the resolution of variables in the build.xml. If you hover over a variable in build.xml e.g. ${some.variable} which was defined in my.properties:
some.variable=hello world
Eclipse will show you the resolved values in a tool tip - however Netbeans 6.1 is not able to do that right now (or I didn't found the fuctionality :-)). Even more useful is the resolution of more complex ids:
<path id="appserver.client.classpath">
<fileset dir="${appserver.client.lib}">
<include name="*.jar"/>
</fileset>
</path>
In the upper case Eclipse would resolve the <path refid="appserver.client.classpath"/> in the editor (so you will see all JARs listed) - which is really useful.
It shouldn't be that hard to support this feature in Netbeans as well - then the Ant-support would be outstanding. Now Netbeans is able to map Ant-Task to IDE actions, so you are able to work with existing Ant-projects seemlessly. Beyond that, you can even create shortcuts (just go to a task, right mouse click and choose "create shortcut") and execute the Ant-Tasks from menues or toolbars. It takes about 2 seconds to do that ...and can save you a considerable amount of time afterwards.
"...Maven2 support in Eclipse sucks. Period." as Kristian wrote this comment to one of my posts I wondered about this strong opinion. I actually used Eclipse with Maven plugin and it worked well. With the eclipse:eclipse plugin, maven creates the whole Eclipse project for you (including all the dependencies and classpath entries) - and you can just start the development. It worked so well, that I actually used it to develop some of my leisure projects (before Netbeans 5.5) too. I begun to understand Kristians clear statement :-), as I opened accidentally some of the old eclipse projects with Netbeans 6.0. It just worked, the menu structured looked very similar, I only recognized a small m2 icon in the project explorer. I began to wonder - there was no netbeans:netbeans execution or something similar - it just worked. I looked deeper into the integration and it turned out, that Netbeans support for maven is native. Netbeans just uses Maven to build the artifact instead of the internal build system. This makes a huge difference between Netbeans and Eclipse (I believe IntelliJ as well). The Netbeans-Maven integration is DRYier (Don't Repeat Yourself - no redundancies) - you have only to maintain the Maven-dependencies and you do not have to repeat it again in the IDE. This makes the work with Maven really enjoyable.
I used Maven with Netbeans in my previous projects as well - however I thought someone generated the Netbeans project already for me. However for the Maven integration you have to extend Netbeans 6.0 with a plugin. The installation is really easy - only a plugin has to be installed (it takes few minutes). Netbeans 6.0 even provides a visualization of the maven dependencies - however this feature seems not to work with Netbeans 6.1rc1.
If you have already a maven project somewhere, just try to open it with netbeans - and drop a comment here. My opinion isn't so strong as Kristian's, however I like hat Maven's integration in Netbeans work... Whats nice as well is the maven repository explorer and dependency management. However this feature is available in eclipse too.
Proprietary Eclipse RCP as well as JSR-295 (Beans Binding) databinding frameworks require the realization of PropertyChangeSupport in the "model" entities. Otherwise changes in the JPA-layer wouldn't be automatically propagated to the UI.
Netbeans 6.1rc1 is able to generate the properties, the PropertyChangeSupport (listeners) as well as the accessors for you. You only need to enter the key-combination "Alt+Insert" and choose the "Add Property" option. In the popup select the option "Bound" - this will activate the generation of the PropertyChangeSupport.
For the generation of the following code (except the annotations and the class declaration) I had only to execute the wizard twice. Onces for the "name" and second time for the "description" attribute.
@Entity
public class Entity {
@Id
protected String name;
protected String description;
private PropertyChangeSupport propertyChangeSupport = new PropertyChangeSupport();;
public static final String PROP_DESCRIPTION = "description";
public static final String PROP_NAME = "name";
public String getDescription() {
return description;
}
public void setDescription(String description) {
String oldDescription = description;
this.description = description;
propertyChangeSupport.firePropertyChange(PROP_DESCRIPTION, oldDescription, description);
}
public String getName() {
return name;
}
public void setName(String name) {
String oldName = name;
this.name = name;
propertyChangeSupport.firePropertyChange(PROP_NAME, oldName, name);
}
}
Of course Netbeans 6.1RC1 is able to generate the whole code for you from the database with UI, binding and persistence. To try this, just use in the new project wizard the option "Desktop Application -> Database Application" and choose an existing table from the database.
Gesendet von admin [Netbeans] ( April 14, 2008 08:16 AM ) Permalink | Kommentare [2]Need For Speed with Netbeans 6.1rc1 and JDK 1.6 update 10
The installation wizzard of Netbeans 6.1rc1 asked me whether all the projects and settings should be imported from the Netbeans 6.0 installation. I confirmend - and had so two working installations: Netbeans 6.0 and 6.1rc1. I used this setup to measure the startup performance. In both cases I had 32 Projects, some of them bigger (e.g. wonderland, toplink essentials source code), the majority is Java EE 5 related with Glassfish v2, v2ur1 and v2ur3. Netbeans 6.1rc1 boots almost immediately (about 2 seconds) - however it takes some time until all projects are loaded and the workspace usable. However the difference is still huge. The whole start-time was massively improved:
- Netbeans 6.0: 2 Minutes 20 seconds (with 32 projects)
- Netbeans 6.1rc1: 45 seconds (with 32 projects)
Incremental Deployment With Netbeans 6.1 on Vista and JDK Update N is back
I complained already several times about the Netbeans 6.0 incremental deployment of enterprise apps to Glassfish v2. To work effectively on XP/Windows you had to disable the "directory deployment" option. Doing this the whole application was uninstalled and redeployed - what was at least semi-efficient. I'm working now on a smaller Java EE 5 project - and tried the incremental deployment again. It works suprisingly well. I was able to incrementally redeploy the whole EAR without any problems - the performance was really good (seconds), actually great. A hint: you have to use the "Run" option, rather than "Undeploy And Deploy"...
It works well - I had only to redeploy the whole app once, because of addition of an additional ejb-jar -> what is o.k.
Btw. Netbeans 6.1beta runs still stable on JDK 1.6 update 10 (N) - is rock solid. I only experiences some minor rendering problems with the small auto-completion pop up. It happened only once - and I couldn't reproduce it.
Netbeans on SWT/JFace (01.04) and the coolest reaction
My yesterday post about Netbeans on SWT wasn't serious (it was posted at 01.04...). However the coolest reaction was:
That's really embarrassing to Sun guys, cause they always talk about "pure Java"
Nowadays it is probably unpopular, but I like Swing and Netbeans :-). The only thing, what was true is my excitement about JavaONE :-).
Gesendet von admin [Netbeans] ( April 02, 2008 08:07 AM ) Permalink | Kommentare [7]







