Archive

Archive for the ‘Mercurial’ Category

taT | I want to use GSF API’s?

November 11, 2008 Varun 2 comments

Blogging after 2 weeks…I have been focusing on my college activities more, I should rather say that I was working on my final year project. So, I thought of sharing some key learnings with you!

Final Year Project

I am working on a project that’s based on NetBeans Platform. Initially, its intended to provide first-class support for NetBeans Wiki markup editing, syntax highlighting, auto completion, etc. This would help any user using NetBeans Wiki, to edit/create the pages and then, preview them locally (offline).

So, I asked Caoyuan Deng (NetBeans Dream Team Member), winner of NBIG Gold Award, experienced developer on integrating languages like Erlang, Scala into the IDE, on how to go about using GSF?

If you want to make use of Specification Version of GSF modules, he suggested to add my module as friend to the GSF modules. Making friends is an easy task (as per my experience). That’s possible in two ways-

Case #1- I commit my code to /main/contrib and request the GSF Module Owner to add my specific modules as friends. As I had already versioned my project with SVN at java.net! So, I went for the second way.

Case #2- I should clone the NetBeans sources, and then run my choice of NetBeans IDE. Then, open the necessary GSF modules (from the clone repos)- tweak them (so as to add my module as a friend).

Tips and Tricks

Actually, I made my module friend of all the three GSF modules- /gsf, /gsf.api and /gsfpath.api

So, you are required to open the /nbproject/project.xml file of one of the GSF modules and add a friend tag with text equivalent to the Code Name Base of your module.

<friend-packages>
   <!--Many modules added as friends are added here-->
   <friend>code.name.base.of.my.module</friend>
</friend-packages>

So, open all these modules in your NetBeans IDE (6.0/6.1 onwards). Tweak those project.xml files by searching for a tag “<friend-packages>” there you would see many module’s code name base have been added as friends using tag “<friend>”, also specific packages can be added using tag “<package>”.

Build the sources…

Once you have followed the second approach, its time to build the sources. Firstly, open the project NetBeans Build System (/main-golden/nbbuild). To know more about how to build the sources, give it a read :) Here’s an excerpt from the entry-

I referred a document for information on Mercurial Access. So, I found out /main-golden would be fine for us. As its guaranteed that build would succeed..

Once you get the build successful, you must now run the IDE either from /main-golden/nbbuild/netbeans/bin/ OR extract the distributable zip you must have created by running the target “build”.

This blog has been contributed to NetBeans Community Docs Program and for latest updates on this content, refer to the contribution.

Finally,

Its done, now you can open your project modules in the newly created build of NetBeans IDE. As and when you make use of the Gsf API’s, build would definitely succeed.

Build Successful

October 23, 2008 Varun 1 comment

BUILD SUCCESSFUL (total time: 97 minutes 14 seconds)

This is what was the last statement in the Output Window of NetBeans 6.5 RC1 running on Java(TM) SE Runtime Environment 1.6.0_10-b33, when I build NetBeans Sources I got from cloning /main-golden

Thanks, mate!

Amidst the NetBeans Birthday Bash, I would like to thank my friend who took out some time to make a clone repository of /main-golden, as both of us are working on a project and looking forward to make use of Generic Scripting Framework.

Also, I came to know through this Developer FAQ (pointed out by someone) to make use of Specification Version, instead of Implementation Version of the Gsf Module Dependency… Read that Developer FAQ for more info!

Why /main-golden?

I referred a document for information on Mercurial Access. So, I found out /main-golden would be fine for us. As its guaranteed that build would succeed..

Using Java Platforms

I got recently introduced to JDK 6u10 when I attended a conference call few days back, where Java Champions, JUG Leaders and my fellow NetBeans Dream Team Members attended a presentation made by Danny Coward and Ethan Nicholas, and it was wonderful experience listening to them, by the way JavaPosse Team Members were there as well.

So, following day I downloaded JDK 6u10 and soon NetBeans 6.5 RC1 was made available too! I installed the Release Candidate using JDK 6u10 as my friend made a clone repository.

Today, I copied it onto my system (Windows), and then, opened NetBeans Build System Freeform Project in the NetBeans 6.5 RC1, created user.build.properties, added few properties.

Forgot to use JDK 1.5

I started building the sources, and soon realised I forgot to use JDK 1.5 to build it, so after downloading binaries, build failed. It took nearly 100 minutes.

Then, I made the required changes in the user.build.properties, and build again…This time build was successful, no more downloading happened and it took 97 minutes and 14 seconds to finish.

Build Successful

This way I successfully build NetBeans IDE Dev using JDK 1.5_0_10 and JDK 6u10. Also, as soon as I ran the build, 2 updates followed by 67 updates were found, I updated, restarted and its running smoothly. Time to play with the NetBeans Build, hopefully many tips and Tricks would follow soon!

Categories: Mercurial, NetBeans, Platform

Beta to FCS | Cloning continues…

May 30, 2008 Varun Leave a comment

Hello,

When NetBeans 6.1 Beta was released, I saw Mercurial in-built support, and after using it for sometime, I feel it is really amazing. However, my first reaction (somewhat negative) was expressed in my other blog, where I discussed about the Past, Present and Future of NetBeans Sources!

Here are few blogs which I did related to Mercurial;

This year in April, I had made a clone of main repos of NB 6.1 Beta sources. Yesterday, I did it again for cloning a fresh repos, i.e. for NB 6.1 FCS. I am looking forward to explore the source code, this time which would help me making an efficient, stable module, which could be really useful too!

sTay Tuned for more… eNjoy Technology…

Categories: Mercurial, NetBeans, SCM

OpenJDK, Mercurial and NetBeans

April 4, 2008 Varun 1 comment

Guys,

Recently I came across this website -http://nb-openjdk.netbeans.org/-, and I realised that there was indeed a blog, which was related to building OpenJDK using NetBeans, too.

I am still exploring this new dimension, and really excited to work on the language, which I love the most.

We all know that their source code is version-ed by Mercurial, so I realised one more thing that NetBeans also has Mercurial SCM, so why not “Checkout” their code first.

Did I say “Checkout”? Sorry, actually its “Cloning“, which basically creates the copy of the code (stored at the remote repos) to a local repos on your Hard Disk. I used the NetBeans 6.1 Beta to “Clone Other…”

You may then, use various Mercurial commands to tweak your local copy, and then later on, contribute a patch to the community, when the patch is ready…

eNjoy TechnOlogy…

Categories: Mercurial, NetBeans, OpenJDK