01/04/2010 Workspace Worms!

Category
The Lotus Notes Workspace. Love it or hate it. Can't live with it, can't live without it.

But don't get mad at it, get even!

The screenshot below shows the aftermath of a napalm strike by Mary Beth on Ben and Volker.

The aftermath of a napalm strike  by Mary Beth on Ben and
Volker

From a technical point of view the plug-in is fairly straight forward. The real heavy-lifting is done by the TPFM framework which let's us control any existing application from within Eclipse. In this example I'm using it to control an embedded instance of the fantastic Worms Armageddon game.

The plug-in first takes a snapshot of the selected Workspace tab and does some basic image processing to create an image suitable for using as a level in Worms.
The image is used to automatically create the new level and then TPFM launches the new level in Worms. Simples!
Bookmark : del.icio.us  Technorati  Digg This  Add To Furl  Add To YahooMyWeb  Add To Reddit  Add To NewsVine 

04/03/2010 DXL Importer wizard for Domino Designer 8.5

Category  
Here's the companion to the DXL Export wizard. The DXL Importer wizard for Domino Designer 8.5 is a plug-in that helps you to import DXL into a Domino database. It's a user interface to the Notes DxlImporter class.
  • The DXL Importer wizard can be invoked by clicking on the toolbar icon Toolbar icon.
  • On the first page choose which import to run.
  • Every import is saved as a Recent Import so it can be run again.
  • Recent imports can be saved as Named Imports.

    Job selection page
  • Select a source DXL file and a target database.

    Database selection page
  • Specify DXL Importer options.
  • DXL Importer settings can be saved as Named DXL Importers for reuse.

    DXL Importer settings page

    Note: You need to be really careful when importing DXL into Domino databases - it's easy to clobber the database if you're not careful.

    Installation

    The DXL Importer and Exporter wizards can be installed from the usual place. Both plug-ins are in the DXL Tools Feature

    Source Code

    The source code is available from the CVS.
Bookmark : del.icio.us  Technorati  Digg This  Add To Furl  Add To YahooMyWeb  Add To Reddit  Add To NewsVine 

22/02/2010 DXL Exporter wizard for Domino Designer 8.5

Category  
The DXL Exporter wizard for Domino Designer 8.5 is a plug-in that helps you to export DXL from a Domino database. It's a user interface to the Notes DxlExporter and NoteCollection classes.
  • The DXL Exporter wizard can be invoked by clicking on the toolbar icon Toolbar icon.
  • On the first page choose which export to run.
  • Every export is saved as a Recent Export so it can be run again.
  • Recent exports can be saved as Named Exports.

    Job selection page
  • Select a source database and specify a target DXL file.

    Database selection page
  • Specify the types of Note to export from the database.
  • Note Collection settings can be saved as Named Note Collections for reuse.

    Note Collection settings page
  • Specify DXL Exporter options.
  • DXL Exporter settings can be saved as Named DXL Exporters for reuse.

    DXL Exporter settings page
  • The wizard will create a dxl file in the workspace and optionally open it with the default editor.
  • Note: By default Domino Designer doesn't know what to do with a .dxl file so you will need to tell it.
  • Open the preferences via File -> Preferences...
  • Select General / Content Types
  • Expand the Text entry and then select the XML entry.
  • Add a new file association for *.dxl
  • Now when you open .dxl files eclipse will use the XML editor as show in the picture below.

    A DXL file open in the XML editor


    Installation

    The DXL Importer and Exporter wizards can be installed from the usual place. Both plug-ins are in the DXL Tools Feature

    Source Code

    The source code is available from the CVS.

Bookmark : del.icio.us  Technorati  Digg This  Add To Furl  Add To YahooMyWeb  Add To Reddit  Add To NewsVine 

03/02/2010 LOLCODE Editor for Domino Designer 8.5

Category  
Many moons ago the folk at Teamstudio tried a novel approach to recruiting. Rather than ask for a CV they set a programming task to write a program that can execute code written in the LOLCODE programming language.

Now that the position has been filled I'm free to unleash this ferocious beast upon the world. So here it is, my LOLCODE Editor for Domino Designer 8.5 (with a little help from the lolcode-java project).

The screenshot below shows test.lol open in the editor. The console shows the output from running the program.

A picture named M2

You can create customised Run Configurations which can be saved and reused.

A picture named M3

Other features include:

- No syntax checking
- No colour coding
- Or content assist
- All the features that come with any Eclipse editor, such as Undo/Redo, Compare, Local History etc.

Installation

If you want to join the growing band of LOLCODE developers you can install the plug-in from the usual place.

Source Code

The source code is available from the CVS. You will need the following plug-ins:

com.domiclipse.lolcode
com.domiclipse.lolcode.feature
com.domiclipse.lolcode.update
com.lolcode

OK, thanks, bye!
Bookmark : del.icio.us  Technorati  Digg This  Add To Furl  Add To YahooMyWeb  Add To Reddit  Add To NewsVine 

14/09/2009 Dodo: A code generation tool for Designer 8.5.1

Category
If you are a Notes developer the single best feature in Designer 8.5.1 is the new Lotusscript editor. The editor finally brings Lotusscript development into the 1980's with a built-in class browser and some other neat features.

Note: IBM Domino Designer 8.5.1 beta is pre-release code. The finished product might be different from the beta.

Now that we have a class browser it can make good sense to write object-oriented classes to control access to underlying Domino data.

For example, if we have a Person Form that contains a Text field called Name we could write a Lotusscript class called Person with two methods called getName() and setName(). The two methods, known as getters and setters, are then used to access the underlying Notes document.

This way of accessing data is very common. In Java you can't avoid it, they are called Java Beans. In Lotusscript it used to be a real pain to do because the Lotusscript editor didn't have an easy way to find what classes are available and what methods they have. That's all changed in Designer 8.5.1.

What hasn't changed is the fact that creating getters/setters is still a real pain. That's where the Dodo plug-in for Designer 8.5.1 comes in. It will automatically create object-oriented Lotusscript code for accessing Domino data.

Here's a Flash Movie which shows the plug-in in action.
Bookmark : del.icio.us  Technorati  Digg This  Add To Furl  Add To YahooMyWeb  Add To Reddit  Add To NewsVine 

11/07/2009 Java Editor Templates

Category   
Templates are a useful feature of the Java editor in Eclipse. Templates are a simple way to define common coding patterns and then write your code in a fill-in-the-blanks style.

For information about templates the Java developers user guide is a good reference and this Eclipse Zone article is a good tutorial.

The rest of this blog will discuss a few Lotus Notes specific templates.

To install the templates download nd_java_template.xml and import it into eclipse via Window -> Preferences -> Java -> Editor -> Templates -> Import... You will now see a set of new templates, named nd_*****. Sadly, the import is not very smart. If you import the file twice you will end up with duplicate templates.

screen0.jpg

The templates included are:
Name Description
nd_job Create a NotesJob and Session
nd_thread Create a NotesThread and Session
nd_create_doc Create and save a new Document
nd_dc_loop Loop through all the Documents in a DocumentCollection
nd_dd_loop Loop through all the Databases in a DbDirectory
nd_nc_loop Loop through all the Notes in a NoteCollection
nd_ve_loop Loop through all the ViewEntries in a ViewEntryCollection
nd_read_text_file Read text from a file using a Stream
nd_write_text_file Write text to a file using a Stream


Previous versions of the xml file:  
nd_java_templates_20090711.xml

To use a template type nd in the Java editor and press <ctrl>+<space> to invoke content assist. A list of all the valid templates will be displayed together with a brief description and a sample of the code it produces.

screen1.jpg

The Java editor inserts the code template into our source and highlights the fill-in-the-blanks or variables by drawing a box round them. The first variable, viewEntry is selected and highlighted in dark blue. Other occurrences of the variable are highlighted in light blue. If we are happy with the name of the variable just press tab to move to the next one. To change the variable, over-type the suggested name with a new one. If you do this all occurrences of the variable are also changed.

screen2.jpg

When we tab to the second variable the Java editor knows that the variable must be an existing ViewEntryCollection object so it prompts us with a list of all the valid objects in the current piece of code.

screen4.jpg

Pressing the tab key again takes us to the temp variable. Press tab once more and the cursor is positioned after the while statement ready for us to start typing some code to process the ViewEntry.

screen5.jpg

If anyone has suggestions for other Notes code templates let me know and I will add them to the xml file.
Bookmark : del.icio.us  Technorati  Digg This  Add To Furl  Add To YahooMyWeb  Add To Reddit  Add To NewsVine