Links

Custom Button

Phorm Prohibited

The contents of this site, and communications between this site and its users, are protected by database right, copyright, confidentiality and the right not to be intercepted conferred by section 1(3) of the Regulation of Investigatory Powers Act 2000.

The use of those contents and communications by Internet Service Providers or others to profile or classify users of this site for advertising or other purposes is strictly forbidden.

DXL Explorer Plug-in

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


The DXL Explorer plug-in is a very experimental plug-in I started work on some months ago. Given the interest in DXL I figured I might as well make the code public so that it might inspire other people. Please note that this plug-in is buggy and doesn't actually do much. I'm also not sure if I'll ever develop it into anything useful...

Once upon a time I was looking at the Eclipse Modelling Framework (EMF) and wondering what it could be used for. The EMF project is a modeling framework and code generation facility for building tools and other applications based on a structured data model. The structured data model can be in a variety of formats including ecore, XML schemas and annotated Java. Hang on... did someone say XML schemas? Domino comes with with XML schemas that describe various versions of DXL, you can find them in the \xmlschemas directory called domino_8_0.xsd or similar. So, it ought to be possible to create an EMF model from the DXL schema and that's exactly what this plug-in does.

A picture named M2

Installing DXLExplorer

DXLExplorer Feature can be downloaded from the update site as usual. Refer to this page for installation instructions.

The feature contains three plug-ins; com.lotus.dxl and com.lotus.dxl.edit are two plug-ins created by EMF from the Domino XML schema. They shouldn't really be called com.lotus because they are nothing to do with Lotus. I might get round to renaming them one day.
The com.domiclipse.dxlexplorer plug-in is the perspective which ties together a database selection dialog, a resource tree and a Properties view.

Note, the DXLExplorer Feature has a dependency on the DbSelect Dialog feature so you will need to install this feature at the same time as you install DXLExplorer if you don't already have it installed.

DXLExplorer Source Code

The source code is in the CVS. Refer to this page for instructions on how to obtain the source code. You will need to import the following plug-ins:

com.domiclipse.dxlexplorer
com.domiclipse.dxlexplorer.feature
com.domiclipse.dxlexplorer.update
com.domiclipse.dbselect
com.lotus.dxl
com.lotus.dxl.edit

Using DXLExplorer
  • DXLExplorer is launched by clicking on the little sun icon A picture named M3.
  • Click on the Browse... button and select a database. You will need to have at least designer access to the database.
  • Ignore the DXL Options section. it doesn't work and isn't used.
  • Click on the Load DXL... button. This will build a NoteCollection of all the design elements in the selected database, export them as DXL create a Java model from the DXL and place the results in the tree. This action make take a minute or so if the database has a lot of design elements. It runs in the UI thread too, so it will lock up the Notes client whilst it is running.
  • After a few moments you will see a new entry in the tree. Expand a few of the nodes and you'll see all the different design elements.
  • For some reason the first database to be imported sometimes doesn't display in the tree. If this happens, try clicking on the Load DXL button again.
  • Selecting any node in the tree will display its properties in the Properties view.
  • Er, that's it.

Edit Model Customisation

The generated EMF edit model has been customised to make it a bit more friendly.
  • The default edit model displays all design elements in a flat list under the Database node. I have changed this so that the elements are organised under the usual categories, ie Agents, Forms etc.
  • Custom icons for most of the design elements. The default EMF icons can still be seen for elements such as Web Services.
  • Some of the nodes have been moved up into their parent node. For example, by default the <Noteinfo> node has child nodes such as <Created> and <LastAccessed>. These nodes have been moved up into the <Noteinfo> node to make the tree simpler. When you click on the <Noteinfo> node you'll see not just the properties of the Noteinfo but also the properties of the Created and LastAccessed nodes too.
  • By default all the properties of a particular node are displayed under the Misc category. For some of the nodes I have changed the category of various properties. For example, some of the properties of an Agent now appear under custom categories such as Trigger and DocumentSet.

In theory...

In theory the plug-in could do a lot more...

The single biggest feature which is missing is pushing changes in the model back to Domino. In theory this should be relatively straight forward. The current plug-in uses EMF to take an instance of an XML schema and converts it into a Java model which represents the schema. ie DXL -> Java Model. EMF is quite capable of transforming the Java model back into an instance of the XML Schema, ie Java Model -> DXL.The resulting DXL could then be imported back into Domino.

Other areas for improvement include:
  • Use the EMF Validation Framework to validate the Java model before writing it back to DXL.
  • Continue the customisation of the EMF Edit model.
  • Writing custom property editors so that, for example, the schedule of an agent could be edited via a custom dialog rather than editing each property individually.

Comments

GravatarImage1 - You've churned out some useful plugins! I have been using Domiclipse for my java dev since it's first incarnation, so congrats on that (although am in no way as skilled as you!!).

Just installed the DXL Explorer, I must be a being a bit dense, I can't see the lauch icon. How do I add the icon or can I launch it some other way? I had no installation errors.

Post A Comment

:-D:-o:-p:-x:-(:-):-\:angry::cool::cry::emb::grin::huh::laugh::lips::rolleyes:;-)