cocoon-docs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <>
Subject [Cocoon Wiki] Update of "LepidoSitemapDebugger" by JensMaukisch
Date Tue, 13 Sep 2005 08:56:03 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Cocoon Wiki" for change notification.

The following page has been changed by JensMaukisch:

New page:
= Lepido Sitemap Debugger Contribution =

== Introduction ==

The Sitemap Debugger offers an Eclipse based GUI to trace the processing of the Cocoon sitemap.
It consists of two main parts: An Eclipse plugin and a cocoon extension. For Cocoon 2.1.8dev
there is a patched version of the treeprocessor which adds debugging support. Cocoon 2.2 provides
a debugging interface which makes it easy to add a the debugger. A default implementation,
which works with the provided debugger, is included in the profiler-block. The debugging interfaces
should be backported to Cocoon 2.1.8 if they are finished to ease the development.

== Current Functions ==

 * request based tracing of the sitemap 
 * display sitemap variables 
 * supported sitemap elements: 
  * matcher 
  * generator 
  * transformer 
  * serializer 
  * ... 
 * supported Cocoon Versions: 2.1.8dev and 2.2dev 
 * supported Eclipse Verison: 3.1 

== ToDo-List ==

 * add support for the missing sitemap elements 
 * add support for chanding sitemap variables 
 * discuss if it usefull to port it to the Eclipse debugging infrastructure 
 * dicsuss new features 
 * backport the sever-side debugging-interaces to Cocoon 2.1.8dev if they are finished 
 * extend the documentation 

== Dev Info ==

=== Eclipse Client ===

The basic function of the Eclipse debugging client is rather easy: read a message from the
server, parse the message and update the views, send the next command to the server. But the
code in fact is in some cases not so easy to understand :-)

Here is a short overview what the classes do:

package org.eclipse.lepido.debugger:

DebuggerPlugin: Main plugin class, provides some functionality for logging. 
BrowserControl: Helper to launch an external browser (should be replaced with the SWT browser

package org.eclipse.lepido.debugger.sitemap

DebugView: Main view of the Plugin, displays the sitemap and provides the controls to start,
stop and configure the debugger
MessageBroker: Provides functions to process the incoming messages 

Perspective: The Eclipse perspective 

RequestThread: Reads a stream from an URL, used if you don't want to view the result in the

Sitemap: Holds the sitemap as a dom4j-object 

SitemapContentProvider: provider for the treeview to display the sitemap 

SitemapLabelProvider: provider for the treeview to display the labels 

SocketControlerThread: Thread to start and stop the server, to read and send messages 

StartDialog: Dialog that pops up if you want to start the debugger 

StatementMessage: Represents a <sitemap-element> message 

StatementPropertySheetEntry: PropertySheetEntry for the information values of a statement-message

StreamView: This view displays the processd streams 

ViewRunnable: Forwards method calls from the SocketControlerThread to the DebugView 

XMLMessage: Represents a XML-message from cocoon 

package org.eclipse.lepido.debugger.xmlsourceviewer:

This package contains a simple source viewer to display nice colored xml in the StreamView

=== Cocoon Extension ===

==== 2.1.8dev ====

The Cocoon extension for 2.1.8 is a patched TreeProcessor with some modified sitemap classes.
Have a look at the treeprocessor package and search for references of the Debugger class.

==== 2.2dev =====

Cocoon 2.2 provides a debugger interface for the TreeProcessor. A default implementation is
provided in the profiler block. The source can be found in the org.apache.cocoon.profiler.debugging
package ( and 

==== Protocol ====

The debugmode is invoked via a special request parametert: 

If the connection is established Cocoon sends the sitemap with the first message:

   <sitemap src="..">
  	 <!-- Here is the sitemap -->

The following message is send for every processd sitemap element:

 	  <!-- Result from the previous element -->
 		  	<value name="...">___</value>
   	 <statement type="..."> <!-- type is match, generate... -->
  		 <!-- type specific information, one element for each attribute: -->
  		 	<parameter name="..">...</parameter>

If a stream is processd (generator or transformer) the result will be send    to the client:


Finish messagen::


The client will only send short status messages:


0 = next message
-1 = cancel current operation

View raw message