Apr 29, 2009

cool new features in Netbeans 6.7 syncrhonizes Editor with Projects/Files

There is an other new cool feature in Netbeans 6.7beta

In the menu View activate Synchronize Editor with Views.

When you switch in the Editor window to a different file, the View in the
Project or Files is updated and the current file is selected automatically.

This is, what could be manually achieved by pressing - or
-.

using Python in NetBeans 6.7beta Release

The plugin-center for Netbeans 6.7beta does not contain the Python plugin.

I've installed the python plugin on the 6.7m3 platform.

So I copied the everything containing *ython* and the py-scripts. from $HOME/.netbeans/6.7m3 to $HOME/.netbeans/6.7beta

Look in
./modules
./modules/ext
./modules/ext
./config/nbPython
./config/Modules
./update_tracking
./jython-2.5
./pythonstubs
./*.py
for the pieces.

After this I removed everything under $HOME/.netbeans/6.7beta/var/cache
and the plugin worked in 6.7beta.

I hope this is everything to get Python working again, until the Plugin is
available for 6.7beta.

Netbeans 6.7 beta is available for download

The netbeans 6.7 beta is available for download.
Go here, because the download from the website lists currently still
the 6.7M3

Here are the news of the version.

My first very impressive new feature was the setting of keyboard shortcuts:



Now you must not search for the entry. There is a field where you type
e.g. Match and get to the functions allowing you to set the shotcuts for
matching braces.
The default match is not possible on a German keyboard.

What I'm currently missing is the Python plugin, which was for the 6.7m3 version via the plugin portal available.

What's also interesting, is the Macro expansion view for C/C++.

Seem's as there are coming a lot of new features for this new version.

Apr 28, 2009

Netbeans Python Hudson-Build 1044 and code completion.

Today I downloaded the netbeans IDE with the Python plugin from
http://deadlock.netbeans.org/hudson/job/python/ with the Buildnumber 1044.

The code completion in this version is not as good as with the 6.7M3 Plugin-version.

Event the completion of self. didn't work.

Perhaps I try a later version again.

GUI programming with Python and Tkinter

Python supports since a long time the GUI programming by using the
Tkinter module. With Version 3.0 on Windows the modules seems to be named
tkinter. On Version 2.6 it is still Tkinter.

I'm using Netbeans 6.7 M3 as an IDE for programming.
For a good introduction to Tkinter, I found the documentation from the
New Mexico Tech Computer Center. You find the Python section here and the
PDF for Tkinter here.

With 6.7 it is partly hard to program the GUI, when you do not know the API,
because the code completion works only with
from Tkinter import Tk

and then the code completion on the Tk doesn't work.
So you have to know the API.
What I do in this case, is to issue a
print dir(var)
So you can start the application in Netbeans, even with a Tkinter GUI and
the output window shows the attributes of the object.

Apr 27, 2009

testing if a http server is available

There is a simple way to check, if a http server is available.

telnet
GET /
The prerequisite is, that you do not use a proxy to get to the http server, but
for development in a local network it does it's job.

Apr 26, 2009

List of free Java Decompilers

Found on the Blog of Adam Bien an entry to a list of java decompilers.
see http://liztia.com/list/Free-Java-Decompilers

Glassfish Webinars

On the Blog of The Aquarium, is a link to the weekly webinars on TheAquariumChannel .

There are a lot of recording about subjects around Glassfish, EJB, ...

Apr 24, 2009

jEdit -> CodeBrowser with C/C++ Exuberant CTags

When using the java based Editor jEdit in Opensolaris, and you are editing
C/C++ source code, the Plugin CodeBrowser can be a help for you.
The prerequisite is the Exuberant Ctags executable. This one parses
the source code and display the functions and macros:


Now in Build 111a there is a new Package exuberant-ctags which installs
in /usr/bin/etags and /usr/bin/exctags.
Now you do not need to search and compile for your self.

Upgrade OpenSolaris on my Laptop to Build 111a

Today I upgraded the laptop from Build 111 to 111a.

HTTP_PROXY=http://:
HTTPS_PROXY=$HTTP_PROXY
pkg refresh
pkg install SUNWipkg
pkg image-update --be-name OpenSolaris-Build111a

Worked without problems. reboot worked fine.

bash-3.2$ uname -a
SunOS solewer 5.11 snv_111a i86pc i386 i86pc Solaris

How to name the new bootenvironment during the pkg image-udpate in OpenSolaris

The pkg command in OpenSolaris has an option, I didn't know during the last time.

The parameter is --be-name!! This let's set you the name of the new
bootenvironment during the upgrade.

pkg image-update --be-name


When not supplying the be-Name, the current name is used with an numeric
extension.
Also it is not always easy to change the new name.

The available bootenvironment can be listed with:
bash-3.2$ beadm list
BE Active Mountpoint Space Policy Created
-- ------ ---------- ----- ------ -------
OpenSolaris-Build111a NR / 19.32G static 2009-04-24 12:55
OpenSolaris-Build_110 - - 105.37M static 2009-03-29 14:50
OpenSolaris-Build_110-1 - - 26.75M static 2009-04-08 10:51

Apr 11, 2009

Adding a SWAP device with ZFS as root filesystem

In the OpenSolaris environment ZFS can now be used as root filesystem.

To add a new SWAP device you need a block device.
ZFS supports the creation of block devices in a pool

zfs create -V 1G -b 8k rpool/swap


this command creates a "virtual" disk:

ewer@squeezy:~$ ls -l /dev/zvol/rdsk/rpool/
total 3
lrwxrwxrwx 1 root root 39 2009-04-11 13:51 dump -> ../../../../devices/pseudo/zfs@0:2c,raw
drwxr-xr-x 3 root root 3 2009-04-11 12:49 ROOT
lrwxrwxrwx 1 root root 39 2009-04-11 13:51 swap -> ../../../../devices/pseudo/zfs@0:1c,raw
ewer@squeezy:~$ ls -l /dev/zvol/dsk/rpool
total 3
lrwxrwxrwx 1 root root 35 2009-04-11 13:51 dump -> ../../../../devices/pseudo/zfs@0:2c
drwxr-xr-x 3 root root 3 2009-04-11 12:49 ROOT
lrwxrwxrwx 1 root root 35 2009-04-11 13:51 swap -> ../../../../devices/pseudo/zfs@0:1c


So you can used

swap -a /dev/zvol/dsk/rpool/swap


to add the new device as swap or add it in the /etc/vfstab:
/dev/zvol/dsk/rpool/swap - - swap - no


Because my system was already installed before ZFS could be used as a root
filesystem, I didn't have such a swap device.
I have also a real disk slice as swap:
ewer@squeezy:~$ swap -l
swapfile dev swaplo blocks free
/dev/dsk/c4d0s1 102,1 8 2096632 1764704
/dev/zvol/dsk/rpool/swap 182,1 8 2097144 1780768

Also a dump device can be created in the same way as above. Just do a

zfs create -V 2G -b 8k rpool/dump
ewer@squeezy:~$ pfexec dumpadm -d /dev/zvol/dsk/rpool/dump
Dump content: kernel pages
Dump device: /dev/zvol/dsk/rpool/dump (dedicated)
Savecore directory: /var/crash/squeezy
Savecore enabled: yes

Upgraded HOME-PC to OpenSolaris Build 111

Today I upgraded my home PC to OpenSolaris Build 111.

The first problem, was to refresh the package repository.

I removed the lifewithsolaris publisher the IPS repostiroy under
http://pkg.lifewithsolaris.jp:10000/ supplied a lot of Multimedia packages, but
there are some copyright problems and the repository is not available:

pkg unset-publisher lifewithsolaris
After a
pkg refresh
pkg image-update --be-name OpenSolaris-Build111


everything was fine again.
After the reboot the system came back again.

I also logged in with the terminal mode and removed all .gnome* .gconf* .gtk*
to get the new desktop settings:


Apr 9, 2009

jedit getting a syntax tree from your traces

When I do not use the NetBeans IDE for editing, I'm using jEdit.
It is a java based editor with many features.

In the last time, we used Outline and Configureabel Fold Handler Plugins
to get a syntax tree in the Sidekick window from the traces for a
faster navigation.

The Default Characters are { and } for starting an indentation and
going one step back.

You see an example in this image:

For the mode, the folding mode must be set to explicit.
You can also configure you're own strings including regular expression,
which I've also used to get a "syntax tree" from an old variant of the trace,
without changing something in the trace.

Upgarde OpenSolaris Laptop to Dev-Build 111

Yesterday I upgraded the Laptop to OpenSolaris Build 111.

The upgrade didn't show any problems.

The remarkable difference to Build 110 is the usage of a dual monitor display.
The LCD display of the laptop and an external Monitor.

In Build 110 all maximized Windows used the place on one monitor. In Build 111
the window extends over all size on both screens.

The Panels of the GNOME desktop also extend in Build 111 over both monitors.


I used a different resolution on the LCD display and on the external monitor.
So I didn't see the bottom panel on the monitor with the smaller resolution.
I had to set both screens to the same resolution to see the bottom panel
with the list of open application windows.

Also all dialogs are displayed in the middle of both screen, so the
window is separated by the monitor borders.

Apr 7, 2009

Python & NetBeans 6.7M3

Today I downloaded NetBeans 6.7M3.
After installing, I also loaded the Python,Jython Plugins from the plugin manager.

I was really surprised about the functionality of the python plugin.
The last time, there was only a very few support but now.
I have to congratulate the team behind this plugin.

In the next picture you see the code generation function, which is also from the
Java development available. Pressing -.


Here you see the code completion working, giving only the data for the class.


and here is the completion of my own defined demo class form a new generated
package in the same project.


The Code completion seems only to work correct when doing a
from import

otherwise the IDE does not know the type.

There is also support to show the inline doc, like the javadoc from the libs.



This is a real improvement of the functionality.
The only thing form my side is the code completion with only
import ftplib
a=ftplib.FTP()
a.


The completion on this point should work.