Tuesday, June 30, 2009

Matrex 1.3.6

A few days ago the Eclipse Foundation published version 3.5 of SWT.
I was waiting for this because it means that Mac users can finally use Matrex with bot Java 5 and Java 6, and with better graphics, because the new version is based on Cocoa.
So, as soon as this new version has become available, I have published the new version of Matrex, 1.3.6.
Together with the new SWT, 1.3.6 comes the following changes:
  • There was still some incompatibilities with Java 5, so it was not possible to run Matrex 1.3.5 with Java 5. This problem was hitting mainly the Mac users, that could not use Java 6 because SWT was not working with it. Now I made sure this problem will not show up again.
  • From Matrex 1.3.5 maximizing the main window means maximizing only vertically, leaving the horizontal size of the window the same. In Windows it could happen that maximizing the main window it disappeared from the screen. In Linux from time to time the main window was becoming insensible to the mouse after the maximization. These problems got fixed.
  • Matrex is able now to read script templates from the script classpath defined in the Files Locations dialog. In this way also the script languages plugins (groovy, jruby...) can be installed outside the Matrex directory.
  • Minor bug fixing.
Now the versions are the follwing:

The choice between 32 and 64 bits depends by the Java runtime interpreter used.

Monday, May 25, 2009

About MacOSX

If you are not able to install Matrex 1.3.5 on MacOSX, please check the article about this topic.
You can download a more recent beta version of the SWT library for Cocoa here.
As soon as Eclipse 3.5 Galileo will be released, I will update the setup files to use the new SWT library, which will probably solve the problem.

Saturday, May 23, 2009

Matrex 1.3.5 has been released

Matrex 1.3.5 has finally been released.

It should have been called 1.4 for the new features it contains, but when the coding started it was called 1.3.5 and so it remained.
As the notes that come in the setup file report, these are the new features:

GUI:
  • Project diagram.
  • Plugins dialog has been evolved to a more general locations dialog:


    In this way it is possible to add plugins to Matrex without installing anything in its directory.

  • If a toolbar becomes too small to contain all buttons, it displays a menu containing the missing buttons:



  • Progress bar that shows loading of the single items of a project:


  • The matrix editor has a toolbar, to make the GUI uniform in the whole application:


Internal:
  • Configuration files containing the location of the other Matrex files (see locations dialogs). With this Matrex becomes easy to package for specific operating systems.
  • Able to read/write tab separated files (together with the CSV files).

Test:
  • More unit testing (> 280 tests). The idea is to have a set of tests to fire to check the project before each release.
  • GUI unit testing of an editor (Function Editor) with SWTBot.
  • Used Findbugs annotations.

Several bugs have been fixed.

You can download it here.

Thursday, May 07, 2009

Matrex 1.3.5 almost ready.

Last tests for the version 1.3.5 of Matrex, which will be probably released in the last half of May.
The changes are many, but surely the most important are:
together with many bug fixes.

Monday, March 30, 2009

Project diagram

Matrex version 1.3.5 will have the possibility to show the project in form of a diagram.
Here is the diagram for the example project projection, that is included in the Matrex setup:


It shows all items of the projects (but timers) and their connections.
Each item is labeled with its type (matrix, function...), each connection is displayed as an arrow.

Compared to the item trees and to the information views, the project diagram has the advantage that It gives a global overview of the project. In one single window it is possible to see all items of the project.

The meaning of the arrows is the following:
  • An arrow from a matrix to a function means that the matrix is input of the function
  • An arrow from a function to a matrix means that the matrix is output (result) of the function
  • An arrow from a matrix to a presentation or chart means that the matrix is used in the presentation or chart.
Since a project can contain many items and therefore many connections among them items, the project diagram can become complex.
To make it easier to understand it, it is possible to:
  • Click on an item: the item becomes green and all the connected items and their arrows become blue (in) and red (out).
  • Click on one of the items type on the tool bar: all the items of that type become green.
In the tool bar there is also a button to print the diagram.

Monday, March 09, 2009

Matrex easier to package

Until now once you installed Matrex in a directory, Matrex used the same directory to:
  • write its log file
  • write the changes to its configuration files
  • write additional templates
  • write scripts used as base of templates
This is natural for a java application that is installed with a java installer and does not pretend to integrate with the platform in which it is installed.

But what if we want to create installers for specific platforms (Windows setup, MacOSX application bundles, Linux .deb and .rpm files)?
In this case:
  • it is the operating system that defines in which directory or directories Matrex is installed.
  • Matrex cannot write the files it produces (templates, configurations, log...) in the directories in which it is installed, but must use a writable directory, which can be under Documents and Settings in Windows or under the home directory in Linux.
Version 1.3.5 will make this possible with two changes:
  • the new configuration file main.properties, which contains the paths of all other configuration files (which can contain environment variables).
  • the new concept of configuration files that contain the locations of other files.
The configuration files that contain the locations of other files are:
  • templates.cld, which contains the paths of the top directories of directory trees containing functions templates.
  • plugins.cld, which contains the directories and jar files containing additional java classes used as plugins and their dependencies.
  • scrips.cld, which contains the top directories of directory trees containing scripts used by templates.
With the addition of main.properties and of the .cld files it is possible to have the configuration files that change after the installation and additional templates, java classes and scripts in writable directories.
In this way anyone can change these files, add them or delete them without touching the original installation.

It will be then easy to install Matrex:
  • In Windows in a directory under the Program Files directory, with the additional files and the writable configuration files in a directory under Documents and Settings.
  • In Linux in the standard directories (/usr/bin, usr/share...), with the additional files and the writable configuration files in a directory (.matrex ?) under the home directory.
  • In MacOSX in a directory under the Applications directory, with the additional files and the writable configuration files in a directory under Users
I tested this new feature installing version 1.3.5 under a read-only directory and configuring it so that it keeps all the files that need to be changed under a writable directory.
It works fine.
As soon as possible I will release a beta of this version.

Thursday, February 26, 2009

ToolBarWithMenu component

The SWT ToolBar component has a minor problem: when there is no space enough to show all the buttons contained in the ToolBar, it just shows the first ones.
It is true that the SWT.WRAP property partially fixes the problem wrapping the buttons in two or more lines, but this does not work in some platforms (e.g. Linux) in which the property is ignored.
This can be a problem, because the user of the application can be completely unaware of the buttons that are not displayed.
I have seen other graphical libraries solve this problem adding an additional button at the end of the toolbar. This button when clicked shows a menu with the missing buttons.
So I adopted the same logic in SWT: I made a class called ToolBarWithMenu
, which adds a button at the start of the toolbar. The button has a menu showing the buttons that are not displayed in the toolbar because there is no space. Here is an example in Matrex:


Clicking on one of the menu items has the same effect as clicking on the related toolbar button.
It works as expected also for a button with an attached menu, if the button's selection listener that shows the menu implements the IHasMenu interface.

Matrex on MacOSX

Matrex uses the SWT library for its GUI. SWT uses the native GUI of the platform. The current version of Matrex, 1.3, uses SWT 3.4.
On MacOSX SWT 3.4 is based on Carbon, which is only 32 bits.
So Matrex 1.3 on MacOSX does not work using Java 1.6 (Java 6), which is only 64 bits and therefore not compatible with Carbon.
If you want to use Matrex 1.3 in MacOSX please either:

  • run it with Java 1.5 (Java 5) instead of Java 1.6
  • try the beta version of SWT 3.5 for Cocoa 64 bits. Download the zip file and unzip it in the /swt directory, where is the directory where you installed Matrex.

The following is the description of the SWT 3.4 problem written by the SWT developers:

SWT cannot be used with OS X JRE version 1.6 (Mac OSX only)

OS X JRE version 1.6 assumes that pointers have a size of 64 bits, but SWT's Carbon port only uses 32-bit pointers, so SWT and Eclipse cannot be used with OS X JRE version 1.6. The workaround is to use an earlier supported version of the OS X JRE.