Friday Feb 11, 2011

New Network Settings API in NetBeans 7.0 RCP

Network Settings API has been recently added into NetBeans 7.0 RCP to allow RCP users to access a network proxy setting. The native launchers of NetBeans Platform detects network settings, mainly a network proxy settings, from operating system. This setting if found any, is the initial for NetBeans plugins when accessing the network. End-users of application (or IDE) can customize these settings in Tools|Options dialog.

A note: Since Beta2 NetBeans 7.0 can interpret also PAC like setting, i.e. automatic proxy configuration URL which provides proxies dynamically according to asked URL.

Network settings are absolutely transparent to plugins built on RCP, these plugins don't need to care of it, RCP installs own java.net.ProxySelector which returns network proxies according of settings in NetBeans and plugins don't need to specify a proxy. However, in some cases a plugin need to know the network setting (e.g. if they are using a external tool and need to setup it for accessing network). For these cases there is Network Settings API as part of Utilities API.

Using this API is quite easy, just call NetworkSettings.getProxyHost(java.net.URI u) for given URI to get a host name of network proxy, use similar method for getting a proxy port. In case if a proxy requires user authentication, there are the methods for get username and password.

Wednesday May 26, 2010

Silent Update of RCP Application as NetBeans Module Sample

I got many requests to showing how to update Netbeans RCP Application silently. I blogged about long time ago - how_to_update_netbeans_platform including some code snippets. Right now I published on kenai.com a NetBeans Module Sample Sample Silent Update which allows you to add a sample doing Silent Update directly to your application.

How to try it?

[Read More]

Friday Jul 10, 2009

JavaOne 2009 hands-on labs are available in SDN

All Hands On Labs (including our NetBeans RCP Lab - 5540_netbeansrcp) from JavaOne 2009 are available at
http://developers.sun.com/learning/javaoneonline/j1labs2009.jsp?track=1&yr=2009 for public access. There are available all exercises, also there are solutions and guides how to use the exercises.

Enjoy it and try it at home.

Monday May 11, 2009

NetBeans Platform at JavaOne 2009

Hi. JavaOne 2009 is coming...

If you would like to learn more about developing over the NetBeans Platform (RCP), stop by at a technical session Porting an Application to the NetBeans™ IDE and at a hands-on lab Save Time — Build Desktop Applications Quickly with the NetBeans™ Platform.

I and Geertjan or Lukas (or maybe both) are giving hands-on lab Save Time — Build Desktop Applications Quickly with the NetBeans™ Platform on Thursday, 4th June, starting 3:30 PM - 5:10 PM PST in Hall E 130-131in the Moscone Centre.

You are highly welcome there.

Friday Jan 23, 2009

Quietly disable modules at runtime?

I was given a inquiry from user of NetBeans Platform. He want to know a way how to disable one or more modules in running application built on NetBeans Platform, in additional it must be perform silently, i.e. with no end-user intervention or any assistance.

Well, he requirement is clear but its fulfillment has several difficulties: first, modules in NetBeans Platform depends on each other and it's uneasy to discover modules which don't involve any essential module of platform. Second, modules can depend on each other even thought don't declare such dependency. Such ad-hoc dependencies are mistakes and NetBeans architecture is aiming to avoid them but few of them can still left there. This fact leaded NetBeans team to do disabling of module only in "offline" time, it means when NetBeans application is not running currently.

Okay. It was bad news, good news is that Autoupdate Services API has capability to perform disabling of module in currently running application (with awareness of possible problems stated above).

[Read More]

Monday Dec 22, 2008

How to update NetBeans Platform Application silently?

In a mail thread [openide-dev] Automatic Autoupdate I've been asked for a guidance how to use Autoupdate Services for installing updates of your NetBeans Platform Application with as few as possible user's interactions.

The blueprint should look like:

  1. check the server for any updates
  2. download any updates 
  3. install all updates (without prompting the user) 
  4. notify the user to restart the application, if necessary.
Look on the following recipe:
[Read More]

Friday Dec 05, 2008

Improved handling of file templates in NetBeans 7.0

NetBeans allows IDE users (or users of application built of top of NetBeans RCP) to use predefined templates of files for creating standard files (e.g. Java classes, Swing forms, Configurations etc.). Besides this, users would like to save own files as a template for further usage or customize predefined templates to their taste.

During recent NetBeans releases we got a lot of feedback about file templates handling, unluckily many of them were bug reports or other complaints. A pretty good summary did Petr Pisl in his blog http://blogs.sun.com/netbeansphp/entry/how_to_manage_templates_in. On base of that, on bug reports and using RFEs is Issuezilla I created a wikipage FileTemplatesOpenIssues where I did a evaluation of troubles in file templates handling and link up problems with corresponding issues in Issuezilla.

So, and now some better news :-) I've been aimed to fix some of them in current development phase of next NetBeans 7.0 release. Many of problem should be fixed in Milestone1 of NB7.0 which is coming soon - accorning to NetBeans70 plan.

In detail, which parts will be better:

  • newly created templates, or templates which come from Save as template action, have now attached a script engine, usually the Freemarker, for processing content of such templates,
  • there is a better support for customizing display names of templates,
  • template categories in Tools|Templates are sorted for easily navigating,
  • users now can customize of template properties in Tools|Templates dialog.
If you are interested in this area, wait for upcoming Milestone1 and review it. It should work much better I believe. Anyway, thanks for your feedback in advance.

Friday Nov 14, 2008

New Feature in NetBeans 7.0 - Plugin Importer

As you know, NetBeans 6.5 coming.... and contributing new features into NetBeans 7.0 (Dev) has started recently. One of them - importing plugins from previous release into new one - is here.


How does Plugin Import work?

  • If are you starting NetBeans 7.0 (Dev) for the first time e.g. with fresh userdir, you will be asked if you want to import settings from previous version (if any). Let's say Yes.
  • NetBeans imported your settings and then continue starting of IDE as usual.
  • After some delay, Plugin Import will investigate the previous version - the previous userdir - for NetBeans plugins placed there.
  • If any plugins found there:
    1. Plugin Import check if these plugins are installed already in running IDE.
    2. Plugin Import checks if these plugins are available on any subscribed Update Center in Tools|Plugins
    3. If none of that, Plugin Import investigates if these plugins could be copied into running IDE.
  • In case that some plugins can import, you will be notified by icon  in IDE status line, clicking on it you can invoked the dialog above.


So if you found any problems your feedback is more then welcomed. Either file a issue into Issuezilla (choose autoupdate category) or let me know here. Thanks

Design and UI outline is at http://wiki.netbeans.org/ImportPluginsFromReleaseToRelease

Q: There is a possibility to import plugins from different directory?

  • Yes, there is. Just run you NetBeans application (IDE) with command line switch -J-Dplugin.manager.import.from=/path/to/cluster
  • You need to specify path to any NetBeans userdir or whatever NetBeans cluster.

In the end, a small org announcement :-) Further developing or maintaining of Plugin Manager/Autoupdate Services have been overtaken by a team who cares for NetBeans IDE installation for whole and I'm going to support NetBeans Plugin Development aka apisupport. Thank you for your feedback and reporting problems you found in Plugin Manager which helping us to deliver Plugin Manager in a fair quality.

Thursday Sep 11, 2008

Problems with installing plugins on Windows Vista? No longer in NetBeans 6.5

Have you ever seen Access denied on Windows Vista while installing new plugins? It could happen on Vista in some certain cases in Plugin Manager.

Several issues have been fixed recently in NetBeans 6.5 in this area. Some of them caused by known (but very ugly behavior) problem directory.canWrite() could returns true (when directory is a java.io.File) even thought the directory is read only. As workaround I try to open java.io.InputStream to make sure if I can write them or not. Further, write permission should be checked not only on cluster directories, but also on subdirectories which can be owned by another user (namely the user Administrator if NetBeans are run in Vista admin mode sometime).

Other set of problems were caused by open file handlers in NetBeans launcher. Although there directories were hold, directory.delete() returns true as directory was successfully deleted, but it was not true, the directory left there. Then Java cannot open this one, write into nor use it anymore, it always ends Access denied until NetBeans was running.

For your information, there are such issues:

and maybe some more recently fixed in this area.

If you want to try nightly builds on NetBeans 6.5 on http://bits.netbeans.org/dev/nightly/latest/  and please send your feedback about this upcoming NetBeans release. Thanks

Wednesday Aug 27, 2008

Yet another significant speed up the Plugins Manager

As I was writing in my previous post I've continued on improving performance of Plugin Manager. After lowering memory consumption while parsing content of Update Centers I'm focusing speed of handling plugin's updates. I got feedback several times that install of the patches of NetBeans 6.1 IDE can be very slow, specially when installing a big patch into full IDE distribution. I that case IDE users have to sit by and be watching Please wait dialog for a few minutes.................... It was ugly :-(

It was really ugly but it won't be anymore. I achieved significant acceleration of processing plugin's updates. Thanksgiving Jara now I have a testing Update Center containing updates of all plugin's installed in Development build of NetBeans IDE. With that UC I investigated and measured processing update in Plugin Manager. I found out some methods has to be called million times. Although it made sense in the applied analysis model of plugins dependencies, model computation was inacceptable due to its slowness. So, that's the right momentum to start thinking about change the model. Right, I had to do it.

The former model works over plugin-to-plugin dependencies. Starting with some visible plugin goes down to else plugins on which depending on. If some of evaluated dependencies forced to add plugin within collection of updates, the dependencies evaluation will continue on itself and so on. It worked, but some dependency evaluation can become useless. If the case P1 depends on D and P2 depends on D as well, analysis model contains dependency P1->D and P2->D, it means two evaluations.

The new model does abstraction which plugin depends on another one and just evaluates dependency itself regardless which plugin declaring that on. In the previous example, the new analysis model works with ?->D dependency only, it means only once evaluation instead of twice. Just idea but with amazing consequence, on testing Update Center is much faster from 40s on old model to 2s (!!!) on the new one. In the Big O notation words, the former model was working with O(n2) but the new model has O(n) complexity I think.

Simply, fixing performance problems can be a amazing story sometime. I'm sure this algorithm change makes Plugin Manager better with much better impression while installing future patches into NetBeans 6.5. The new algorithm in Plugin Manager has been integrated just now, so in the daily development builds should be in a few days.

Just try it....

Tuesday Aug 12, 2008

Bye, Bye, DOM parser in Plugin Manager

NetBeans teams are in fixing and stabilization phase of upcoming release NetBeans 6.5. The modules Autoupdate (API) and Plugin Manager (UI) are in step of fixing as well. After most of functional bugs have been fixed in previous milestones of NetBeans, I'm targeting the performance area in these modules.

One of most reporting problems is a high memory consumption while parsing content of Update Centers. Because usually content of Update Center is represented in XML structure, Plugin Manager used DocumentBuilder to get DOM document and processing DOM Nodes. This way was easy and elegant but due to having many many modules in NetBeans codebase which made XML file too big, creating and processing that Document consumption too big memory, commonly 60-70MB on memory heap. Even though such big memory is allocated temporary and will return back to JVM, it could cause OutOfMemoryException sometimes.

Since NetBeans 6.5 (but not in NetBeans 6.5 Beta!) Autoupdate/Plugin Manager don't use DOM document for processing such XML files, uses SAX parser which is lighter and asks less memory to handling XML elements. By my memory measuring the Plugin Manager the memory consumption decreased to 30MB on the heap, it means 50-60%. It's not bad although it might have been better :-)

Stay tuned, more performance improvements have been integrated in NetBeans 6.5 Beta (coming soon) and some else are planning for fixing phase of NetBeans 6.5 after beta too.

Friday Jun 13, 2008

A secret tooltip in Options dialog

Now that we have been speaking of tooltips in NetBeans IDE (How do you like balloon-like tooltip?) I remembered a tooltip which I have recently added into NetBeans 6.1 IDE.

There is a new tooltip in Tools|Options dialog in General page over Use System Proxy Settings:


This tooltip shows a Network HTTP Proxy which was detected from user's operating system. It can help users to see what proxy is active right now, or to make them sure the right one proxy was found.

Just a note: If NetBeans launcher cannot found information if a proxy is active in user's system or it doesn't, the Use System Proxy Settings will be disabled.

In the case of launcher found that no proxy is currently active, the tooltip will show a message 'Direct connection'


What do you think of it? Doesn't it make sense?

And in general, what are your experiences with using Network Proxy support in NetBeans IDE? Do you need to do setup Network Proxy manually? Or, you don't care about Network Proxy because it works out-of-box? :-)

Thanks for your opinion.

Tuesday Jun 03, 2008

How do you like balloon-like tooltip?

NetBeans IDE regularly checks for available updates of your IDE's installed plugins. Since NetBeans 6.0 IDE the NetBeans team delivering patches almost monthly and it makes alerting users about new updates more important than ever.

On this account Stan introduced balloon-like tooltip in NetBeans 6.1 IDE. The balloon will notify IDE users about available updates in the IDE status line if some updates found. Like this

The balloon is showing for 30 seconds when Plugin Manager found available updates. Or an user can invoke it like tooltip on mouse over the update icon .

Some users (most of IDE users I believe) like this balloon and some don't. I got some feedback on NetBeans 6.1 IDE and did a little change for NetBeans 6.5 IDE:

  • balloon acts more as tooltip. If it shows on mouse event, it will close quickly on mouse exit.
  • balloon is showing only when Plugin Manager connects Update Centers and not while working over caches
  • power users can customize appearance of balloon by new options: FaqPluginManagerCustomization
  • beside this Stan have also changed UI of balloon a bit.

What about you? How do you like the balloon stuff? Thank you for feedback

Friday May 09, 2008

JavaOne 2008 is over!

As quickly as JavaOne 2008 was opened it was over.

I saw a couple of interesting sessions or BOFs, some of them were amazing, a few a little boring and I think it was good stuff. I can meet many of NetBeans platform users which the best one benefit such congresses.

Among other things, a lot amazing parties belong to JavaOne as well as technical sessions. In the end, the After Dark party with some Rock music on the stage. However it was over over very quickly too :-(



[Read More]

A few words about my BOF

Wednesday. The seventh of May. I attended couple of sessions and except that I was hearing the presentation matter I was watching speakers: theirs opening of session, how to do demonstration on the stage, how to recover if something went wrong and so on. I must say it made me calm down. Speakers as well as attendees take everything at ease, didn't worries anyhow. So, it was good message for me :-)

 

Geertjan and me did the last tuning of laptops for our demonstration, guys from Moscone setup mikes for us and all went good, we just were waiting on the stage when the first attendees came .... and our show started.

I dare to say the BOF went good, all demos were working (with a irrelevant exception), attendees didn't go away (with minor exceptions as well) and many of them looked like be interested in the matter of this BOF. Actually, we had to stop Questions/Answers because our time was out. However we weren't be faced to standing ovation :-) the applause sounded very good, anyway.

Just was a pity no NetBeans Platform guys came early to take some pictures. Maybe next time :-)

In the end I would like to say big THANKS to Geertjan for his support while preparing our talk.

About

Rechtacek's

Search

Categories
Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today