Thursday, March 23, 2006

Scripting CVS

Tonight, I created my first EclipseMonkey DOM - it allows you to check out CVS projects into your workspace from a script. I don't know when Bjorn will make the DOM available, but to whet your appetite, here is a script that shows how to use the DOM:

--- Came wiffling through the eclipsey wood ---
* Menu: CVS > Get JFace Data Binding
* Kudos: Boris Bokowski
* License: EPL 1.0
* DOM:

function main() {

var repository = "";
var projects = ["org.eclipse.jface.databinding", "org.eclipse.jface.examples.databinding", "org.eclipse.jface.tests.databinding"];
var tag = "HEAD";
for each(project in projects) {
var module = project;
cvs.checkOut(project, repository, module, tag);
--- And burbled as it ran! ---

Monday, February 20, 2006

New in JFace 3.2 M5: GridLayoutFactory

Have a look at GridLayoutFactory (new in M5). It can generate grid data for all the controls in a layout. See bug 123740 for a small SWT example application that creates this shell with only two lines of layout-related code:

Tuesday, February 14, 2006

New in JFace 3.2 M5: Virtual TreeViewer, and multiple equal elements

Two important enhancements were made to TreeViewer in 3.2 M5. I thought I should mention them somewhere - since they are not visible to end-users, the new and noteworthy document does not mention them:
  • Supporting elements that appear multiple times in a tree, as long as there are different parent paths - see bug 84314.
  • Support for SWT.VIRTUAL trees - see bug 112000. Note that all along, TreeViewer implemented lazy trees: the tree content provider's getChildren() method is only called when the user expands a node. The virtual tree viewer is helpful if there are lots of children per parent, or if it expensive to compute the information needed for each child.