[savara-commits] savara SVN: r168 - in tools/eclipse/trunk: distribution and 566 other directories.

do-not-reply at jboss.org do-not-reply at jboss.org
Sat Mar 6 15:53:59 EST 2010


Author: objectiser
Date: 2010-03-06 15:53:29 -0500 (Sat, 06 Mar 2010)
New Revision: 168

Added:
   tools/eclipse/trunk/plugins/eclipse-build/
   tools/eclipse/trunk/plugins/eclipse-build/allElements.xml
   tools/eclipse/trunk/plugins/eclipse-build/build.properties
   tools/eclipse/trunk/plugins/eclipse-build/build.xml
   tools/eclipse/trunk/plugins/eclipse-build/customTargets.xml
   tools/eclipse/trunk/plugins/eclipse-build/dependencies/
   tools/eclipse/trunk/plugins/eclipse-build/dependencies/javax.wsdl_1.5.1.v200806030408.jar
   tools/eclipse/trunk/plugins/eclipse-build/dependencies/javax.xml_1.3.4.v200902170245.jar
   tools/eclipse/trunk/plugins/eclipse-build/dependencies/org.apache.xalan_2.7.1.v200905122109.jar
   tools/eclipse/trunk/plugins/eclipse-build/dependencies/org.apache.xerces_2.9.0.v200909240008.jar
   tools/eclipse/trunk/plugins/eclipse-build/dependencies/org.apache.xml.resolver_1.2.0.v200902170519.jar
   tools/eclipse/trunk/plugins/eclipse-build/dependencies/org.apache.xml.serializer_2.7.1.v200902170519.jar
   tools/eclipse/trunk/plugins/eclipse-build/genericTargets.xml
   tools/eclipse/trunk/plugins/eclipse-build/installJBossTools.xml
   tools/eclipse/trunk/plugins/eclipse-build/package.xml
   tools/eclipse/trunk/plugins/eclipse-build/pom.xml
   tools/eclipse/trunk/plugins/eclipse-build/setupEclipse.xml
   tools/eclipse/trunk/plugins/org.jboss.savara.tools.bpel.feature/
   tools/eclipse/trunk/plugins/org.jboss.savara.tools.jbossesb.feature/
   tools/eclipse/trunk/plugins/org.pi4soa.bpmn.feature/
   tools/eclipse/trunk/plugins/org.pi4soa.monitor.feature/
   tools/eclipse/trunk/plugins/org.scribble.conformance/
   tools/eclipse/trunk/plugins/org.scribble.conformance/.classpath
   tools/eclipse/trunk/plugins/org.scribble.conformance/.project
   tools/eclipse/trunk/plugins/org.scribble.conformance/LICENSE.txt
   tools/eclipse/trunk/plugins/org.scribble.conformance/META-INF/
   tools/eclipse/trunk/plugins/org.scribble.conformance/META-INF/MANIFEST.MF
   tools/eclipse/trunk/plugins/org.scribble.conformance/build.properties
   tools/eclipse/trunk/plugins/org.scribble.conformance/classes/
   tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/
   tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/
   tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/
   tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/comparator/
   tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/comparator/BehaviourListComparatorRule.class
   tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/comparator/BehaviourListComparatorRuleTest$1.class
   tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/comparator/BehaviourListComparatorRuleTest$10.class
   tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/comparator/BehaviourListComparatorRuleTest$11.class
   tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/comparator/BehaviourListComparatorRuleTest$12.class
   tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/comparator/BehaviourListComparatorRuleTest$13.class
   tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/comparator/BehaviourListComparatorRuleTest$14.class
   tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/comparator/BehaviourListComparatorRuleTest$15.class
   tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/comparator/BehaviourListComparatorRuleTest$16.class
   tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/comparator/BehaviourListComparatorRuleTest$17.class
   tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/comparator/BehaviourListComparatorRuleTest$18.class
   tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/comparator/BehaviourListComparatorRuleTest$19.class
   tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/comparator/BehaviourListComparatorRuleTest$2.class
   tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/comparator/BehaviourListComparatorRuleTest$20.class
   tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/comparator/BehaviourListComparatorRuleTest$3.class
   tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/comparator/BehaviourListComparatorRuleTest$4.class
   tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/comparator/BehaviourListComparatorRuleTest$5.class
   tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/comparator/BehaviourListComparatorRuleTest$6.class
   tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/comparator/BehaviourListComparatorRuleTest$7.class
   tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/comparator/BehaviourListComparatorRuleTest$8.class
   tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/comparator/BehaviourListComparatorRuleTest$9.class
   tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/comparator/BehaviourListComparatorRuleTest.class
   tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/comparator/Messages.properties
   tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/comparator/StatelessDefinitionComparatorRule.class
   tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/comparator/SyncPoint.class
   tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/comparator/TestBehaviour1ComparatorRule.class
   tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/comparator/TestBehaviour2ComparatorRule.class
   tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/comparator/TestMultiPathComparatorRule.class
   tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/comparator/TestSinglePathComparatorRule.class
   tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/model/
   tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/model/BehaviourList.class
   tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/model/BehaviourListIterator.class
   tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/model/BehaviourListPaths.class
   tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/model/BehaviourListTest.class
   tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/model/TestBehaviour1.class
   tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/model/TestBehaviour2.class
   tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/model/TestBehaviourList.class
   tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/model/TestDefinition.class
   tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/model/TestModelInclude.class
   tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/model/TestMultiPath.class
   tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/model/TestSinglePath.class
   tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/model/transform/
   tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/model/transform/AbstractDefinitionStatelessTransformationRule.class
   tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/model/transform/AbstractStatelessTransformationRule.class
   tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/model/transform/BlockStatelessTransformationRule.class
   tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/model/transform/DefaultStatelessTransformationContext.class
   tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/model/transform/DefaultStatelessTransformer.class
   tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/model/transform/InteractionStatelessTransformationRule.class
   tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/model/transform/MessageSignatureStatelessTransformationRule.class
   tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/model/transform/RoleStatelessTransformationRule.class
   tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/model/transform/StatelessTransformationContext.class
   tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/model/transform/StatelessTransformationRule.class
   tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/model/transform/StatelessTransformer.class
   tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/model/transform/TransformState.class
   tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/model/transform/TransformTest$StatefulToStatelessTest.class
   tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/model/transform/TransformTest.class
   tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/model/transform/TypeReferenceStatelessTransformationRule.class
   tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/model/transform/results/
   tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/model/transform/results/Interaction1 at R1.scv
   tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/model/transform/results/Interaction1 at R2.scv
   tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/model/transform/results/Interaction2 at R2.scv
   tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/model/transform/testmodels/
   tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/model/transform/testmodels/Interaction1 at R1.scv
   tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/model/transform/testmodels/Interaction1 at R2.scv
   tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/model/transform/testmodels/Interaction2 at R2.scv
   tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/osgi/
   tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/osgi/Activator.class
   tools/eclipse/trunk/plugins/org.scribble.conformance/src/
   tools/eclipse/trunk/plugins/org.scribble.conformance/src/java/
   tools/eclipse/trunk/plugins/org.scribble.conformance/src/java/org/
   tools/eclipse/trunk/plugins/org.scribble.conformance/src/java/org/scribble/
   tools/eclipse/trunk/plugins/org.scribble.conformance/src/java/org/scribble/conformance/
   tools/eclipse/trunk/plugins/org.scribble.conformance/src/java/org/scribble/conformance/comparator/
   tools/eclipse/trunk/plugins/org.scribble.conformance/src/java/org/scribble/conformance/comparator/BehaviourListComparatorRule.java
   tools/eclipse/trunk/plugins/org.scribble.conformance/src/java/org/scribble/conformance/comparator/Messages.properties
   tools/eclipse/trunk/plugins/org.scribble.conformance/src/java/org/scribble/conformance/comparator/StatelessDefinitionComparatorRule.java
   tools/eclipse/trunk/plugins/org.scribble.conformance/src/java/org/scribble/conformance/comparator/SyncPoint.java
   tools/eclipse/trunk/plugins/org.scribble.conformance/src/java/org/scribble/conformance/model/
   tools/eclipse/trunk/plugins/org.scribble.conformance/src/java/org/scribble/conformance/model/BehaviourList.java
   tools/eclipse/trunk/plugins/org.scribble.conformance/src/java/org/scribble/conformance/model/BehaviourListIterator.java
   tools/eclipse/trunk/plugins/org.scribble.conformance/src/java/org/scribble/conformance/model/BehaviourListPaths.java
   tools/eclipse/trunk/plugins/org.scribble.conformance/src/java/org/scribble/conformance/model/transform/
   tools/eclipse/trunk/plugins/org.scribble.conformance/src/java/org/scribble/conformance/model/transform/AbstractDefinitionStatelessTransformationRule.java
   tools/eclipse/trunk/plugins/org.scribble.conformance/src/java/org/scribble/conformance/model/transform/AbstractStatelessTransformationRule.java
   tools/eclipse/trunk/plugins/org.scribble.conformance/src/java/org/scribble/conformance/model/transform/BlockStatelessTransformationRule.java
   tools/eclipse/trunk/plugins/org.scribble.conformance/src/java/org/scribble/conformance/model/transform/DefaultStatelessTransformationContext.java
   tools/eclipse/trunk/plugins/org.scribble.conformance/src/java/org/scribble/conformance/model/transform/DefaultStatelessTransformer.java
   tools/eclipse/trunk/plugins/org.scribble.conformance/src/java/org/scribble/conformance/model/transform/InteractionStatelessTransformationRule.java
   tools/eclipse/trunk/plugins/org.scribble.conformance/src/java/org/scribble/conformance/model/transform/MessageSignatureStatelessTransformationRule.java
   tools/eclipse/trunk/plugins/org.scribble.conformance/src/java/org/scribble/conformance/model/transform/RoleStatelessTransformationRule.java
   tools/eclipse/trunk/plugins/org.scribble.conformance/src/java/org/scribble/conformance/model/transform/StatelessTransformationContext.java
   tools/eclipse/trunk/plugins/org.scribble.conformance/src/java/org/scribble/conformance/model/transform/StatelessTransformationRule.java
   tools/eclipse/trunk/plugins/org.scribble.conformance/src/java/org/scribble/conformance/model/transform/StatelessTransformer.java
   tools/eclipse/trunk/plugins/org.scribble.conformance/src/java/org/scribble/conformance/model/transform/TransformState.java
   tools/eclipse/trunk/plugins/org.scribble.conformance/src/java/org/scribble/conformance/model/transform/TypeReferenceStatelessTransformationRule.java
   tools/eclipse/trunk/plugins/org.scribble.conformance/src/java/org/scribble/conformance/osgi/
   tools/eclipse/trunk/plugins/org.scribble.conformance/src/java/org/scribble/conformance/osgi/Activator.java
   tools/eclipse/trunk/plugins/org.scribble.conformance/src/plugintest/
   tools/eclipse/trunk/plugins/org.scribble.conformance/src/plugintest/org/
   tools/eclipse/trunk/plugins/org.scribble.conformance/src/plugintest/org/scribble/
   tools/eclipse/trunk/plugins/org.scribble.conformance/src/plugintest/org/scribble/conformance/
   tools/eclipse/trunk/plugins/org.scribble.conformance/src/plugintest/org/scribble/conformance/model/
   tools/eclipse/trunk/plugins/org.scribble.conformance/src/plugintest/org/scribble/conformance/model/transform/
   tools/eclipse/trunk/plugins/org.scribble.conformance/src/plugintest/org/scribble/conformance/model/transform/TransformTest.java
   tools/eclipse/trunk/plugins/org.scribble.conformance/src/plugintest/org/scribble/conformance/model/transform/results/
   tools/eclipse/trunk/plugins/org.scribble.conformance/src/plugintest/org/scribble/conformance/model/transform/results/Interaction1 at R1.scv
   tools/eclipse/trunk/plugins/org.scribble.conformance/src/plugintest/org/scribble/conformance/model/transform/results/Interaction1 at R2.scv
   tools/eclipse/trunk/plugins/org.scribble.conformance/src/plugintest/org/scribble/conformance/model/transform/results/Interaction2 at R2.scv
   tools/eclipse/trunk/plugins/org.scribble.conformance/src/plugintest/org/scribble/conformance/model/transform/testmodels/
   tools/eclipse/trunk/plugins/org.scribble.conformance/src/plugintest/org/scribble/conformance/model/transform/testmodels/Interaction1 at R1.scv
   tools/eclipse/trunk/plugins/org.scribble.conformance/src/plugintest/org/scribble/conformance/model/transform/testmodels/Interaction1 at R2.scv
   tools/eclipse/trunk/plugins/org.scribble.conformance/src/plugintest/org/scribble/conformance/model/transform/testmodels/Interaction2 at R2.scv
   tools/eclipse/trunk/plugins/org.scribble.conformance/src/test/
   tools/eclipse/trunk/plugins/org.scribble.conformance/src/test/org/
   tools/eclipse/trunk/plugins/org.scribble.conformance/src/test/org/scribble/
   tools/eclipse/trunk/plugins/org.scribble.conformance/src/test/org/scribble/conformance/
   tools/eclipse/trunk/plugins/org.scribble.conformance/src/test/org/scribble/conformance/comparator/
   tools/eclipse/trunk/plugins/org.scribble.conformance/src/test/org/scribble/conformance/comparator/BehaviourListComparatorRuleTest.java
   tools/eclipse/trunk/plugins/org.scribble.conformance/src/test/org/scribble/conformance/comparator/TestBehaviour1ComparatorRule.java
   tools/eclipse/trunk/plugins/org.scribble.conformance/src/test/org/scribble/conformance/comparator/TestBehaviour2ComparatorRule.java
   tools/eclipse/trunk/plugins/org.scribble.conformance/src/test/org/scribble/conformance/comparator/TestMultiPathComparatorRule.java
   tools/eclipse/trunk/plugins/org.scribble.conformance/src/test/org/scribble/conformance/comparator/TestSinglePathComparatorRule.java
   tools/eclipse/trunk/plugins/org.scribble.conformance/src/test/org/scribble/conformance/model/
   tools/eclipse/trunk/plugins/org.scribble.conformance/src/test/org/scribble/conformance/model/BehaviourListTest.java
   tools/eclipse/trunk/plugins/org.scribble.conformance/src/test/org/scribble/conformance/model/TestBehaviour1.java
   tools/eclipse/trunk/plugins/org.scribble.conformance/src/test/org/scribble/conformance/model/TestBehaviour2.java
   tools/eclipse/trunk/plugins/org.scribble.conformance/src/test/org/scribble/conformance/model/TestBehaviourList.java
   tools/eclipse/trunk/plugins/org.scribble.conformance/src/test/org/scribble/conformance/model/TestDefinition.java
   tools/eclipse/trunk/plugins/org.scribble.conformance/src/test/org/scribble/conformance/model/TestModelInclude.java
   tools/eclipse/trunk/plugins/org.scribble.conformance/src/test/org/scribble/conformance/model/TestMultiPath.java
   tools/eclipse/trunk/plugins/org.scribble.conformance/src/test/org/scribble/conformance/model/TestSinglePath.java
   tools/eclipse/trunk/plugins/org.scribble.contract.model/
   tools/eclipse/trunk/plugins/org.scribble.contract.model/.classpath
   tools/eclipse/trunk/plugins/org.scribble.contract.model/.project
   tools/eclipse/trunk/plugins/org.scribble.contract.model/LICENSE.txt
   tools/eclipse/trunk/plugins/org.scribble.contract.model/META-INF/
   tools/eclipse/trunk/plugins/org.scribble.contract.model/META-INF/MANIFEST.MF
   tools/eclipse/trunk/plugins/org.scribble.contract.model/build.properties
   tools/eclipse/trunk/plugins/org.scribble.contract.model/classes/
   tools/eclipse/trunk/plugins/org.scribble.contract.model/classes/org/
   tools/eclipse/trunk/plugins/org.scribble.contract.model/classes/org/scribble/
   tools/eclipse/trunk/plugins/org.scribble.contract.model/classes/org/scribble/contract/
   tools/eclipse/trunk/plugins/org.scribble.contract.model/classes/org/scribble/contract/model/
   tools/eclipse/trunk/plugins/org.scribble.contract.model/classes/org/scribble/contract/model/Contract.class
   tools/eclipse/trunk/plugins/org.scribble.contract.model/classes/org/scribble/contract/model/FaultDetails.class
   tools/eclipse/trunk/plugins/org.scribble.contract.model/classes/org/scribble/contract/model/Interface.class
   tools/eclipse/trunk/plugins/org.scribble.contract.model/classes/org/scribble/contract/model/MessageExchangePattern.class
   tools/eclipse/trunk/plugins/org.scribble.contract.model/classes/org/scribble/contract/model/Namespace.class
   tools/eclipse/trunk/plugins/org.scribble.contract.model/classes/org/scribble/contract/model/OneWayRequestMEP.class
   tools/eclipse/trunk/plugins/org.scribble.contract.model/classes/org/scribble/contract/model/RequestResponseMEP.class
   tools/eclipse/trunk/plugins/org.scribble.contract.model/classes/org/scribble/contract/model/osgi/
   tools/eclipse/trunk/plugins/org.scribble.contract.model/classes/org/scribble/contract/model/osgi/Activator.class
   tools/eclipse/trunk/plugins/org.scribble.contract.model/src/
   tools/eclipse/trunk/plugins/org.scribble.contract.model/src/java/
   tools/eclipse/trunk/plugins/org.scribble.contract.model/src/java/org/
   tools/eclipse/trunk/plugins/org.scribble.contract.model/src/java/org/scribble/
   tools/eclipse/trunk/plugins/org.scribble.contract.model/src/java/org/scribble/contract/
   tools/eclipse/trunk/plugins/org.scribble.contract.model/src/java/org/scribble/contract/model/
   tools/eclipse/trunk/plugins/org.scribble.contract.model/src/java/org/scribble/contract/model/Contract.java
   tools/eclipse/trunk/plugins/org.scribble.contract.model/src/java/org/scribble/contract/model/FaultDetails.java
   tools/eclipse/trunk/plugins/org.scribble.contract.model/src/java/org/scribble/contract/model/Interface.java
   tools/eclipse/trunk/plugins/org.scribble.contract.model/src/java/org/scribble/contract/model/MessageExchangePattern.java
   tools/eclipse/trunk/plugins/org.scribble.contract.model/src/java/org/scribble/contract/model/Namespace.java
   tools/eclipse/trunk/plugins/org.scribble.contract.model/src/java/org/scribble/contract/model/OneWayRequestMEP.java
   tools/eclipse/trunk/plugins/org.scribble.contract.model/src/java/org/scribble/contract/model/RequestResponseMEP.java
   tools/eclipse/trunk/plugins/org.scribble.contract.model/src/java/org/scribble/contract/model/osgi/
   tools/eclipse/trunk/plugins/org.scribble.contract.model/src/java/org/scribble/contract/model/osgi/Activator.java
   tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/
   tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/.classpath
   tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/.project
   tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/LICENSE.txt
   tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/META-INF/
   tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/META-INF/MANIFEST.MF
   tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/build.properties
   tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/classes/
   tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/classes/org/
   tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/classes/org/scribble/
   tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/classes/org/scribble/conversation/
   tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/classes/org/scribble/conversation/comparator/
   tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/classes/org/scribble/conversation/comparator/CatchBlockComparatorRule.class
   tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/classes/org/scribble/conversation/comparator/CatchBlockComparatorRuleTest.class
   tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/classes/org/scribble/conversation/comparator/CatchBlockProtocolComparatorRule.class
   tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/classes/org/scribble/conversation/comparator/CatchBlockProtocolComparatorRuleTest.class
   tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/classes/org/scribble/conversation/comparator/ConditionalBlockComparatorRule.class
   tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/classes/org/scribble/conversation/comparator/ConditionalBlockComparatorRuleTest.class
   tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/classes/org/scribble/conversation/comparator/ConversationComparatorRule.class
   tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/classes/org/scribble/conversation/comparator/ConversationComparatorRuleTest.class
   tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/classes/org/scribble/conversation/comparator/ConversationModelProtocolModelComparatorRule.class
   tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/classes/org/scribble/conversation/comparator/ConversationModelProtocolModelComparatorRuleTest.class
   tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/classes/org/scribble/conversation/comparator/IfChoiceComparatorRule.class
   tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/classes/org/scribble/conversation/comparator/IfChoiceComparatorRuleTest.class
   tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/classes/org/scribble/conversation/comparator/IfComparatorRule.class
   tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/classes/org/scribble/conversation/comparator/IfComparatorRuleTest.class
   tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/classes/org/scribble/conversation/comparator/InterruptBlockComparatorRule.class
   tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/classes/org/scribble/conversation/comparator/InterruptBlockComparatorRuleTest.class
   tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/classes/org/scribble/conversation/comparator/InterruptBlockProtocolComparatorRule.class
   tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/classes/org/scribble/conversation/comparator/InterruptBlockProtocolComparatorRuleTest.class
   tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/classes/org/scribble/conversation/comparator/ParallelComparatorRule.class
   tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/classes/org/scribble/conversation/comparator/ParallelComparatorRuleTest.class
   tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/classes/org/scribble/conversation/comparator/ParallelProtocolParallelComparatorRule.class
   tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/classes/org/scribble/conversation/comparator/ParallelProtocolParallelComparatorRuleTest.class
   tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/classes/org/scribble/conversation/comparator/RaiseComparatorRule.class
   tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/classes/org/scribble/conversation/comparator/RaiseComparatorRuleTest.class
   tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/classes/org/scribble/conversation/comparator/RaiseProtocolComparatorRule.class
   tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/classes/org/scribble/conversation/comparator/RaiseProtocolComparatorRuleTest.class
   tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/classes/org/scribble/conversation/comparator/SpawnComparatorRule.class
   tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/classes/org/scribble/conversation/comparator/SpawnProtocolSpawnComparatorRule.class
   tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/classes/org/scribble/conversation/comparator/TryEscapeComparatorRule.class
   tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/classes/org/scribble/conversation/comparator/TryEscapeProtocolComparatorRule.class
   tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/classes/org/scribble/conversation/comparator/WhenChoiceComparatorRule.class
   tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/classes/org/scribble/conversation/comparator/WhenComparatorRule.class
   tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/classes/org/scribble/conversation/comparator/WhileComparatorRule.class
   tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/classes/org/scribble/conversation/comparator/model/
   tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/classes/org/scribble/conversation/comparator/model/transform/
   tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/classes/org/scribble/conversation/comparator/model/transform/ConversationInteractionStatelessTransformationRule.class
   tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/classes/org/scribble/conversation/comparator/model/transform/ConversationStatelessTransformationRule.class
   tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/classes/org/scribble/conversation/comparator/model/transform/IfStatelessTransformationRule.class
   tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/classes/org/scribble/conversation/comparator/model/transform/ParallelStatelessTransformationRule.class
   tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/classes/org/scribble/conversation/comparator/model/transform/RunStatelessTransformationRule.class
   tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/classes/org/scribble/conversation/comparator/model/transform/SpawnStatelessTransformationRule.class
   tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/classes/org/scribble/conversation/comparator/model/transform/TransformTest$StatefulToStatelessTest.class
   tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/classes/org/scribble/conversation/comparator/model/transform/TransformTest.class
   tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/classes/org/scribble/conversation/comparator/model/transform/WhileStatelessTransformationRule.class
   tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/classes/org/scribble/conversation/comparator/model/transform/results/
   tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/classes/org/scribble/conversation/comparator/model/transform/results/ESBBroker at Broker.scv
   tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/classes/org/scribble/conversation/comparator/model/transform/results/InteractionRun1 at R2.scv
   tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/classes/org/scribble/conversation/comparator/model/transform/testmodels/
   tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/classes/org/scribble/conversation/comparator/model/transform/testmodels/ESBBroker at Broker.scv
   tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/classes/org/scribble/conversation/comparator/model/transform/testmodels/InteractionRun1 at R2.scv
   tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/classes/org/scribble/conversation/comparator/osgi/
   tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/classes/org/scribble/conversation/comparator/osgi/Activator.class
   tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/
   tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/java/
   tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/java/org/
   tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/java/org/scribble/
   tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/java/org/scribble/conversation/
   tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/java/org/scribble/conversation/comparator/
   tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/java/org/scribble/conversation/comparator/CatchBlockComparatorRule.java
   tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/java/org/scribble/conversation/comparator/CatchBlockProtocolComparatorRule.java
   tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/java/org/scribble/conversation/comparator/ConditionalBlockComparatorRule.java
   tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/java/org/scribble/conversation/comparator/ConversationComparatorRule.java
   tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/java/org/scribble/conversation/comparator/ConversationModelProtocolModelComparatorRule.java
   tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/java/org/scribble/conversation/comparator/IfChoiceComparatorRule.java
   tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/java/org/scribble/conversation/comparator/IfComparatorRule.java
   tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/java/org/scribble/conversation/comparator/InterruptBlockComparatorRule.java
   tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/java/org/scribble/conversation/comparator/InterruptBlockProtocolComparatorRule.java
   tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/java/org/scribble/conversation/comparator/ParallelComparatorRule.java
   tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/java/org/scribble/conversation/comparator/ParallelProtocolParallelComparatorRule.java
   tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/java/org/scribble/conversation/comparator/RaiseComparatorRule.java
   tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/java/org/scribble/conversation/comparator/RaiseProtocolComparatorRule.java
   tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/java/org/scribble/conversation/comparator/SpawnComparatorRule.java
   tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/java/org/scribble/conversation/comparator/SpawnProtocolSpawnComparatorRule.java
   tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/java/org/scribble/conversation/comparator/TryEscapeComparatorRule.java
   tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/java/org/scribble/conversation/comparator/TryEscapeProtocolComparatorRule.java
   tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/java/org/scribble/conversation/comparator/WhenChoiceComparatorRule.java
   tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/java/org/scribble/conversation/comparator/WhenComparatorRule.java
   tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/java/org/scribble/conversation/comparator/WhileComparatorRule.java
   tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/java/org/scribble/conversation/comparator/model/
   tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/java/org/scribble/conversation/comparator/model/transform/
   tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/java/org/scribble/conversation/comparator/model/transform/ConversationInteractionStatelessTransformationRule.java
   tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/java/org/scribble/conversation/comparator/model/transform/ConversationStatelessTransformationRule.java
   tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/java/org/scribble/conversation/comparator/model/transform/IfStatelessTransformationRule.java
   tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/java/org/scribble/conversation/comparator/model/transform/ParallelStatelessTransformationRule.java
   tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/java/org/scribble/conversation/comparator/model/transform/RunStatelessTransformationRule.java
   tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/java/org/scribble/conversation/comparator/model/transform/SpawnStatelessTransformationRule.java
   tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/java/org/scribble/conversation/comparator/model/transform/WhileStatelessTransformationRule.java
   tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/java/org/scribble/conversation/comparator/osgi/
   tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/java/org/scribble/conversation/comparator/osgi/Activator.java
   tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/plugintest/
   tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/plugintest/org/
   tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/plugintest/org/scribble/
   tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/plugintest/org/scribble/conversation/
   tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/plugintest/org/scribble/conversation/comparator/
   tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/plugintest/org/scribble/conversation/comparator/model/
   tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/plugintest/org/scribble/conversation/comparator/model/transform/
   tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/plugintest/org/scribble/conversation/comparator/model/transform/TransformTest.java
   tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/plugintest/org/scribble/conversation/comparator/model/transform/results/
   tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/plugintest/org/scribble/conversation/comparator/model/transform/results/ESBBroker at Broker.scv
   tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/plugintest/org/scribble/conversation/comparator/model/transform/results/InteractionRun1 at R2.scv
   tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/plugintest/org/scribble/conversation/comparator/model/transform/testmodels/
   tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/plugintest/org/scribble/conversation/comparator/model/transform/testmodels/ESBBroker at Broker.scv
   tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/plugintest/org/scribble/conversation/comparator/model/transform/testmodels/InteractionRun1 at R2.scv
   tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/test/
   tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/test/org/
   tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/test/org/scribble/
   tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/test/org/scribble/conversation/
   tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/test/org/scribble/conversation/comparator/
   tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/test/org/scribble/conversation/comparator/CatchBlockComparatorRuleTest.java
   tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/test/org/scribble/conversation/comparator/CatchBlockProtocolComparatorRuleTest.java
   tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/test/org/scribble/conversation/comparator/ConditionalBlockComparatorRuleTest.java
   tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/test/org/scribble/conversation/comparator/ConversationComparatorRuleTest.java
   tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/test/org/scribble/conversation/comparator/ConversationModelProtocolModelComparatorRuleTest.java
   tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/test/org/scribble/conversation/comparator/IfChoiceComparatorRuleTest.java
   tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/test/org/scribble/conversation/comparator/IfComparatorRuleTest.java
   tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/test/org/scribble/conversation/comparator/InterruptBlockComparatorRuleTest.java
   tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/test/org/scribble/conversation/comparator/InterruptBlockProtocolComparatorRuleTest.java
   tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/test/org/scribble/conversation/comparator/ParallelComparatorRuleTest.java
   tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/test/org/scribble/conversation/comparator/ParallelProtocolParallelComparatorRuleTest.java
   tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/test/org/scribble/conversation/comparator/RaiseComparatorRuleTest.java
   tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/test/org/scribble/conversation/comparator/RaiseProtocolComparatorRuleTest.java
   tools/eclipse/trunk/plugins/org.scribble.conversation.eclipse/
   tools/eclipse/trunk/plugins/org.scribble.conversation.eclipse/.classpath
   tools/eclipse/trunk/plugins/org.scribble.conversation.eclipse/.project
   tools/eclipse/trunk/plugins/org.scribble.conversation.eclipse/META-INF/
   tools/eclipse/trunk/plugins/org.scribble.conversation.eclipse/META-INF/MANIFEST.MF
   tools/eclipse/trunk/plugins/org.scribble.conversation.eclipse/build.properties
   tools/eclipse/trunk/plugins/org.scribble.conversation.eclipse/classes/
   tools/eclipse/trunk/plugins/org.scribble.conversation.eclipse/classes/org/
   tools/eclipse/trunk/plugins/org.scribble.conversation.eclipse/classes/org/scribble/
   tools/eclipse/trunk/plugins/org.scribble.conversation.eclipse/classes/org/scribble/conversation/
   tools/eclipse/trunk/plugins/org.scribble.conversation.eclipse/classes/org/scribble/conversation/eclipse/
   tools/eclipse/trunk/plugins/org.scribble.conversation.eclipse/classes/org/scribble/conversation/eclipse/Activator.class
   tools/eclipse/trunk/plugins/org.scribble.conversation.eclipse/classes/org/scribble/conversation/eclipse/model/
   tools/eclipse/trunk/plugins/org.scribble.conversation.eclipse/classes/org/scribble/conversation/eclipse/model/images/
   tools/eclipse/trunk/plugins/org.scribble.conversation.eclipse/classes/org/scribble/conversation/eclipse/model/images/ScribbleImages.class
   tools/eclipse/trunk/plugins/org.scribble.conversation.eclipse/classes/org/scribble/conversation/eclipse/model/images/conversation.png
   tools/eclipse/trunk/plugins/org.scribble.conversation.eclipse/classes/org/scribble/conversation/eclipse/model/images/variable.png
   tools/eclipse/trunk/plugins/org.scribble.conversation.eclipse/classes/org/scribble/conversation/eclipse/model/outliner/
   tools/eclipse/trunk/plugins/org.scribble.conversation.eclipse/classes/org/scribble/conversation/eclipse/model/outliner/ConversationModelOutlinerRule.class
   tools/eclipse/trunk/plugins/org.scribble.conversation.eclipse/classes/org/scribble/conversation/model/
   tools/eclipse/trunk/plugins/org.scribble.conversation.eclipse/src/
   tools/eclipse/trunk/plugins/org.scribble.conversation.eclipse/src/java/
   tools/eclipse/trunk/plugins/org.scribble.conversation.eclipse/src/java/org/
   tools/eclipse/trunk/plugins/org.scribble.conversation.eclipse/src/java/org/scribble/
   tools/eclipse/trunk/plugins/org.scribble.conversation.eclipse/src/java/org/scribble/conversation/
   tools/eclipse/trunk/plugins/org.scribble.conversation.eclipse/src/java/org/scribble/conversation/eclipse/
   tools/eclipse/trunk/plugins/org.scribble.conversation.eclipse/src/java/org/scribble/conversation/eclipse/Activator.java
   tools/eclipse/trunk/plugins/org.scribble.conversation.eclipse/src/java/org/scribble/conversation/eclipse/model/
   tools/eclipse/trunk/plugins/org.scribble.conversation.eclipse/src/java/org/scribble/conversation/eclipse/model/images/
   tools/eclipse/trunk/plugins/org.scribble.conversation.eclipse/src/java/org/scribble/conversation/eclipse/model/images/ScribbleImages.java
   tools/eclipse/trunk/plugins/org.scribble.conversation.eclipse/src/java/org/scribble/conversation/eclipse/model/images/conversation.png
   tools/eclipse/trunk/plugins/org.scribble.conversation.eclipse/src/java/org/scribble/conversation/eclipse/model/images/variable.png
   tools/eclipse/trunk/plugins/org.scribble.conversation.eclipse/src/java/org/scribble/conversation/eclipse/model/outliner/
   tools/eclipse/trunk/plugins/org.scribble.conversation.eclipse/src/java/org/scribble/conversation/eclipse/model/outliner/ConversationModelOutlinerRule.java
   tools/eclipse/trunk/plugins/org.scribble.conversation.eclipse/src/java/org/scribble/conversation/model/
   tools/eclipse/trunk/plugins/org.scribble.conversation.export.monitor/
   tools/eclipse/trunk/plugins/org.scribble.conversation.export.monitor/.classpath
   tools/eclipse/trunk/plugins/org.scribble.conversation.export.monitor/.project
   tools/eclipse/trunk/plugins/org.scribble.conversation.export.monitor/META-INF/
   tools/eclipse/trunk/plugins/org.scribble.conversation.export.monitor/META-INF/MANIFEST.MF
   tools/eclipse/trunk/plugins/org.scribble.conversation.export.monitor/build.properties
   tools/eclipse/trunk/plugins/org.scribble.conversation.export.monitor/classes/
   tools/eclipse/trunk/plugins/org.scribble.conversation.export.monitor/classes/org/
   tools/eclipse/trunk/plugins/org.scribble.conversation.export.monitor/classes/org/scribble/
   tools/eclipse/trunk/plugins/org.scribble.conversation.export.monitor/classes/org/scribble/conversation/
   tools/eclipse/trunk/plugins/org.scribble.conversation.export.monitor/classes/org/scribble/conversation/export/
   tools/eclipse/trunk/plugins/org.scribble.conversation.export.monitor/classes/org/scribble/conversation/export/monitor/
   tools/eclipse/trunk/plugins/org.scribble.conversation.export.monitor/classes/org/scribble/conversation/export/monitor/ConversationModelMonitorExportRule.class
   tools/eclipse/trunk/plugins/org.scribble.conversation.export.monitor/classes/org/scribble/conversation/export/monitor/ConversationMonitorExportRule.class
   tools/eclipse/trunk/plugins/org.scribble.conversation.export.monitor/classes/org/scribble/conversation/export/monitor/MonitorExportTest$ConversationToBPELTest.class
   tools/eclipse/trunk/plugins/org.scribble.conversation.export.monitor/classes/org/scribble/conversation/export/monitor/MonitorExportTest.class
   tools/eclipse/trunk/plugins/org.scribble.conversation.export.monitor/classes/org/scribble/conversation/export/monitor/osgi/
   tools/eclipse/trunk/plugins/org.scribble.conversation.export.monitor/classes/org/scribble/conversation/export/monitor/osgi/Activator.class
   tools/eclipse/trunk/plugins/org.scribble.conversation.export.monitor/classes/org/scribble/conversation/export/monitor/results/
   tools/eclipse/trunk/plugins/org.scribble.conversation.export.monitor/classes/org/scribble/conversation/export/monitor/testmodels/
   tools/eclipse/trunk/plugins/org.scribble.conversation.export.monitor/classes/org/scribble/conversation/export/monitor/testmodels/EventHandler at Store.scv
   tools/eclipse/trunk/plugins/org.scribble.conversation.export.monitor/src/
   tools/eclipse/trunk/plugins/org.scribble.conversation.export.monitor/src/java/
   tools/eclipse/trunk/plugins/org.scribble.conversation.export.monitor/src/java/org/
   tools/eclipse/trunk/plugins/org.scribble.conversation.export.monitor/src/java/org/scribble/
   tools/eclipse/trunk/plugins/org.scribble.conversation.export.monitor/src/java/org/scribble/conversation/
   tools/eclipse/trunk/plugins/org.scribble.conversation.export.monitor/src/java/org/scribble/conversation/export/
   tools/eclipse/trunk/plugins/org.scribble.conversation.export.monitor/src/java/org/scribble/conversation/export/monitor/
   tools/eclipse/trunk/plugins/org.scribble.conversation.export.monitor/src/java/org/scribble/conversation/export/monitor/ConversationModelMonitorExportRule.java
   tools/eclipse/trunk/plugins/org.scribble.conversation.export.monitor/src/java/org/scribble/conversation/export/monitor/ConversationMonitorExportRule.java
   tools/eclipse/trunk/plugins/org.scribble.conversation.export.monitor/src/java/org/scribble/conversation/export/monitor/osgi/
   tools/eclipse/trunk/plugins/org.scribble.conversation.export.monitor/src/java/org/scribble/conversation/export/monitor/osgi/Activator.java
   tools/eclipse/trunk/plugins/org.scribble.conversation.export.monitor/src/plugintest/
   tools/eclipse/trunk/plugins/org.scribble.conversation.export.monitor/src/plugintest/org/
   tools/eclipse/trunk/plugins/org.scribble.conversation.export.monitor/src/plugintest/org/scribble/
   tools/eclipse/trunk/plugins/org.scribble.conversation.export.monitor/src/plugintest/org/scribble/conversation/
   tools/eclipse/trunk/plugins/org.scribble.conversation.export.monitor/src/plugintest/org/scribble/conversation/export/
   tools/eclipse/trunk/plugins/org.scribble.conversation.export.monitor/src/plugintest/org/scribble/conversation/export/monitor/
   tools/eclipse/trunk/plugins/org.scribble.conversation.export.monitor/src/plugintest/org/scribble/conversation/export/monitor/MonitorExportTest.java
   tools/eclipse/trunk/plugins/org.scribble.conversation.export.monitor/src/plugintest/org/scribble/conversation/export/monitor/results/
   tools/eclipse/trunk/plugins/org.scribble.conversation.export.monitor/src/plugintest/org/scribble/conversation/export/monitor/testmodels/
   tools/eclipse/trunk/plugins/org.scribble.conversation.export.monitor/src/plugintest/org/scribble/conversation/export/monitor/testmodels/EventHandler at Store.scv
   tools/eclipse/trunk/plugins/org.scribble.conversation.export.text/
   tools/eclipse/trunk/plugins/org.scribble.conversation.export.text/.classpath
   tools/eclipse/trunk/plugins/org.scribble.conversation.export.text/.project
   tools/eclipse/trunk/plugins/org.scribble.conversation.export.text/LICENSE.txt
   tools/eclipse/trunk/plugins/org.scribble.conversation.export.text/META-INF/
   tools/eclipse/trunk/plugins/org.scribble.conversation.export.text/META-INF/MANIFEST.MF
   tools/eclipse/trunk/plugins/org.scribble.conversation.export.text/build.properties
   tools/eclipse/trunk/plugins/org.scribble.conversation.export.text/classes/
   tools/eclipse/trunk/plugins/org.scribble.conversation.export.text/classes/org/
   tools/eclipse/trunk/plugins/org.scribble.conversation.export.text/classes/org/scribble/
   tools/eclipse/trunk/plugins/org.scribble.conversation.export.text/classes/org/scribble/conversation/
   tools/eclipse/trunk/plugins/org.scribble.conversation.export.text/classes/org/scribble/conversation/export/
   tools/eclipse/trunk/plugins/org.scribble.conversation.export.text/classes/org/scribble/conversation/export/stream/
   tools/eclipse/trunk/plugins/org.scribble.conversation.export.text/classes/org/scribble/conversation/export/stream/ConversationModelStreamExportRule.class
   tools/eclipse/trunk/plugins/org.scribble.conversation.export.text/classes/org/scribble/conversation/export/text/
   tools/eclipse/trunk/plugins/org.scribble.conversation.export.text/classes/org/scribble/conversation/export/text/AssignmentTextExportRule.class
   tools/eclipse/trunk/plugins/org.scribble.conversation.export.text/classes/org/scribble/conversation/export/text/CatchBlockTextExportRule.class
   tools/eclipse/trunk/plugins/org.scribble.conversation.export.text/classes/org/scribble/conversation/export/text/ConditionalBlockTextExportRule.class
   tools/eclipse/trunk/plugins/org.scribble.conversation.export.text/classes/org/scribble/conversation/export/text/ConversationInteractionTextExportRule.class
   tools/eclipse/trunk/plugins/org.scribble.conversation.export.text/classes/org/scribble/conversation/export/text/ConversationModelTextExportRule.class
   tools/eclipse/trunk/plugins/org.scribble.conversation.export.text/classes/org/scribble/conversation/export/text/ConversationReferenceTextExportRule.class
   tools/eclipse/trunk/plugins/org.scribble.conversation.export.text/classes/org/scribble/conversation/export/text/ConversationTextExportRule.class
   tools/eclipse/trunk/plugins/org.scribble.conversation.export.text/classes/org/scribble/conversation/export/text/IfTextExportRule.class
   tools/eclipse/trunk/plugins/org.scribble.conversation.export.text/classes/org/scribble/conversation/export/text/InterruptBlockTextExportRule.class
   tools/eclipse/trunk/plugins/org.scribble.conversation.export.text/classes/org/scribble/conversation/export/text/ParallelTextExportRule.class
   tools/eclipse/trunk/plugins/org.scribble.conversation.export.text/classes/org/scribble/conversation/export/text/RaiseTextExportRule.class
   tools/eclipse/trunk/plugins/org.scribble.conversation.export.text/classes/org/scribble/conversation/export/text/RunTextExportRule.class
   tools/eclipse/trunk/plugins/org.scribble.conversation.export.text/classes/org/scribble/conversation/export/text/SpawnTextExportRule.class
   tools/eclipse/trunk/plugins/org.scribble.conversation.export.text/classes/org/scribble/conversation/export/text/TryEscapeTextExportRule.class
   tools/eclipse/trunk/plugins/org.scribble.conversation.export.text/classes/org/scribble/conversation/export/text/VariableListTextExportRule.class
   tools/eclipse/trunk/plugins/org.scribble.conversation.export.text/classes/org/scribble/conversation/export/text/VariableTextExportRule.class
   tools/eclipse/trunk/plugins/org.scribble.conversation.export.text/classes/org/scribble/conversation/export/text/WhenTextExportRule.class
   tools/eclipse/trunk/plugins/org.scribble.conversation.export.text/classes/org/scribble/conversation/export/text/WhileTextExportRule.class
   tools/eclipse/trunk/plugins/org.scribble.conversation.export.text/classes/org/scribble/conversation/export/text/osgi/
   tools/eclipse/trunk/plugins/org.scribble.conversation.export.text/classes/org/scribble/conversation/export/text/osgi/Activator.class
   tools/eclipse/trunk/plugins/org.scribble.conversation.export.text/src/
   tools/eclipse/trunk/plugins/org.scribble.conversation.export.text/src/java/
   tools/eclipse/trunk/plugins/org.scribble.conversation.export.text/src/java/org/
   tools/eclipse/trunk/plugins/org.scribble.conversation.export.text/src/java/org/scribble/
   tools/eclipse/trunk/plugins/org.scribble.conversation.export.text/src/java/org/scribble/conversation/
   tools/eclipse/trunk/plugins/org.scribble.conversation.export.text/src/java/org/scribble/conversation/export/
   tools/eclipse/trunk/plugins/org.scribble.conversation.export.text/src/java/org/scribble/conversation/export/stream/
   tools/eclipse/trunk/plugins/org.scribble.conversation.export.text/src/java/org/scribble/conversation/export/stream/ConversationModelStreamExportRule.java
   tools/eclipse/trunk/plugins/org.scribble.conversation.export.text/src/java/org/scribble/conversation/export/text/
   tools/eclipse/trunk/plugins/org.scribble.conversation.export.text/src/java/org/scribble/conversation/export/text/AssignmentTextExportRule.java
   tools/eclipse/trunk/plugins/org.scribble.conversation.export.text/src/java/org/scribble/conversation/export/text/CatchBlockTextExportRule.java
   tools/eclipse/trunk/plugins/org.scribble.conversation.export.text/src/java/org/scribble/conversation/export/text/ConditionalBlockTextExportRule.java
   tools/eclipse/trunk/plugins/org.scribble.conversation.export.text/src/java/org/scribble/conversation/export/text/ConversationInteractionTextExportRule.java
   tools/eclipse/trunk/plugins/org.scribble.conversation.export.text/src/java/org/scribble/conversation/export/text/ConversationModelTextExportRule.java
   tools/eclipse/trunk/plugins/org.scribble.conversation.export.text/src/java/org/scribble/conversation/export/text/ConversationReferenceTextExportRule.java
   tools/eclipse/trunk/plugins/org.scribble.conversation.export.text/src/java/org/scribble/conversation/export/text/ConversationTextExportRule.java
   tools/eclipse/trunk/plugins/org.scribble.conversation.export.text/src/java/org/scribble/conversation/export/text/IfTextExportRule.java
   tools/eclipse/trunk/plugins/org.scribble.conversation.export.text/src/java/org/scribble/conversation/export/text/InterruptBlockTextExportRule.java
   tools/eclipse/trunk/plugins/org.scribble.conversation.export.text/src/java/org/scribble/conversation/export/text/ParallelTextExportRule.java
   tools/eclipse/trunk/plugins/org.scribble.conversation.export.text/src/java/org/scribble/conversation/export/text/RaiseTextExportRule.java
   tools/eclipse/trunk/plugins/org.scribble.conversation.export.text/src/java/org/scribble/conversation/export/text/RunTextExportRule.java
   tools/eclipse/trunk/plugins/org.scribble.conversation.export.text/src/java/org/scribble/conversation/export/text/SpawnTextExportRule.java
   tools/eclipse/trunk/plugins/org.scribble.conversation.export.text/src/java/org/scribble/conversation/export/text/TryEscapeTextExportRule.java
   tools/eclipse/trunk/plugins/org.scribble.conversation.export.text/src/java/org/scribble/conversation/export/text/VariableListTextExportRule.java
   tools/eclipse/trunk/plugins/org.scribble.conversation.export.text/src/java/org/scribble/conversation/export/text/VariableTextExportRule.java
   tools/eclipse/trunk/plugins/org.scribble.conversation.export.text/src/java/org/scribble/conversation/export/text/WhenTextExportRule.java
   tools/eclipse/trunk/plugins/org.scribble.conversation.export.text/src/java/org/scribble/conversation/export/text/WhileTextExportRule.java
   tools/eclipse/trunk/plugins/org.scribble.conversation.export.text/src/java/org/scribble/conversation/export/text/osgi/
   tools/eclipse/trunk/plugins/org.scribble.conversation.export.text/src/java/org/scribble/conversation/export/text/osgi/Activator.java
   tools/eclipse/trunk/plugins/org.scribble.conversation.feature/
   tools/eclipse/trunk/plugins/org.scribble.conversation.feature/.project
   tools/eclipse/trunk/plugins/org.scribble.conversation.feature/LICENSE.txt
   tools/eclipse/trunk/plugins/org.scribble.conversation.feature/build.properties
   tools/eclipse/trunk/plugins/org.scribble.conversation.feature/feature.xml
   tools/eclipse/trunk/plugins/org.scribble.conversation.model/
   tools/eclipse/trunk/plugins/org.scribble.conversation.model/.classpath
   tools/eclipse/trunk/plugins/org.scribble.conversation.model/.project
   tools/eclipse/trunk/plugins/org.scribble.conversation.model/LICENSE.txt
   tools/eclipse/trunk/plugins/org.scribble.conversation.model/META-INF/
   tools/eclipse/trunk/plugins/org.scribble.conversation.model/META-INF/MANIFEST.MF
   tools/eclipse/trunk/plugins/org.scribble.conversation.model/build.properties
   tools/eclipse/trunk/plugins/org.scribble.conversation.model/classes/
   tools/eclipse/trunk/plugins/org.scribble.conversation.model/classes/org/
   tools/eclipse/trunk/plugins/org.scribble.conversation.model/classes/org/scribble/
   tools/eclipse/trunk/plugins/org.scribble.conversation.model/classes/org/scribble/conversation/
   tools/eclipse/trunk/plugins/org.scribble.conversation.model/classes/org/scribble/conversation/model/
   tools/eclipse/trunk/plugins/org.scribble.conversation.model/classes/org/scribble/conversation/model/Assignment.class
   tools/eclipse/trunk/plugins/org.scribble.conversation.model/classes/org/scribble/conversation/model/CatchBlock.class
   tools/eclipse/trunk/plugins/org.scribble.conversation.model/classes/org/scribble/conversation/model/Compose.class
   tools/eclipse/trunk/plugins/org.scribble.conversation.model/classes/org/scribble/conversation/model/ConditionalBlock.class
   tools/eclipse/trunk/plugins/org.scribble.conversation.model/classes/org/scribble/conversation/model/Conversation.class
   tools/eclipse/trunk/plugins/org.scribble.conversation.model/classes/org/scribble/conversation/model/ConversationInteraction.class
   tools/eclipse/trunk/plugins/org.scribble.conversation.model/classes/org/scribble/conversation/model/ConversationModel.class
   tools/eclipse/trunk/plugins/org.scribble.conversation.model/classes/org/scribble/conversation/model/ConversationNotation.class
   tools/eclipse/trunk/plugins/org.scribble.conversation.model/classes/org/scribble/conversation/model/ConversationReference.class
   tools/eclipse/trunk/plugins/org.scribble.conversation.model/classes/org/scribble/conversation/model/EscapeBlock.class
   tools/eclipse/trunk/plugins/org.scribble.conversation.model/classes/org/scribble/conversation/model/Expression.class
   tools/eclipse/trunk/plugins/org.scribble.conversation.model/classes/org/scribble/conversation/model/Identity.class
   tools/eclipse/trunk/plugins/org.scribble.conversation.model/classes/org/scribble/conversation/model/IdentityLocator.class
   tools/eclipse/trunk/plugins/org.scribble.conversation.model/classes/org/scribble/conversation/model/IdentityType.class
   tools/eclipse/trunk/plugins/org.scribble.conversation.model/classes/org/scribble/conversation/model/If.class
   tools/eclipse/trunk/plugins/org.scribble.conversation.model/classes/org/scribble/conversation/model/IfTest$1.class
   tools/eclipse/trunk/plugins/org.scribble.conversation.model/classes/org/scribble/conversation/model/IfTest$2.class
   tools/eclipse/trunk/plugins/org.scribble.conversation.model/classes/org/scribble/conversation/model/IfTest.class
   tools/eclipse/trunk/plugins/org.scribble.conversation.model/classes/org/scribble/conversation/model/InterruptBlock.class
   tools/eclipse/trunk/plugins/org.scribble.conversation.model/classes/org/scribble/conversation/model/Parallel.class
   tools/eclipse/trunk/plugins/org.scribble.conversation.model/classes/org/scribble/conversation/model/Raise.class
   tools/eclipse/trunk/plugins/org.scribble.conversation.model/classes/org/scribble/conversation/model/Run.class
   tools/eclipse/trunk/plugins/org.scribble.conversation.model/classes/org/scribble/conversation/model/Spawn.class
   tools/eclipse/trunk/plugins/org.scribble.conversation.model/classes/org/scribble/conversation/model/TryEscape.class
   tools/eclipse/trunk/plugins/org.scribble.conversation.model/classes/org/scribble/conversation/model/Variable.class
   tools/eclipse/trunk/plugins/org.scribble.conversation.model/classes/org/scribble/conversation/model/VariableList.class
   tools/eclipse/trunk/plugins/org.scribble.conversation.model/classes/org/scribble/conversation/model/When.class
   tools/eclipse/trunk/plugins/org.scribble.conversation.model/classes/org/scribble/conversation/model/While.class
   tools/eclipse/trunk/plugins/org.scribble.conversation.model/classes/org/scribble/conversation/model/WhileTest$1.class
   tools/eclipse/trunk/plugins/org.scribble.conversation.model/classes/org/scribble/conversation/model/WhileTest$2.class
   tools/eclipse/trunk/plugins/org.scribble.conversation.model/classes/org/scribble/conversation/model/WhileTest.class
   tools/eclipse/trunk/plugins/org.scribble.conversation.model/classes/org/scribble/conversation/model/osgi/
   tools/eclipse/trunk/plugins/org.scribble.conversation.model/classes/org/scribble/conversation/model/osgi/Activator.class
   tools/eclipse/trunk/plugins/org.scribble.conversation.model/src/
   tools/eclipse/trunk/plugins/org.scribble.conversation.model/src/java/
   tools/eclipse/trunk/plugins/org.scribble.conversation.model/src/java/org/
   tools/eclipse/trunk/plugins/org.scribble.conversation.model/src/java/org/scribble/
   tools/eclipse/trunk/plugins/org.scribble.conversation.model/src/java/org/scribble/conversation/
   tools/eclipse/trunk/plugins/org.scribble.conversation.model/src/java/org/scribble/conversation/model/
   tools/eclipse/trunk/plugins/org.scribble.conversation.model/src/java/org/scribble/conversation/model/Assignment.java
   tools/eclipse/trunk/plugins/org.scribble.conversation.model/src/java/org/scribble/conversation/model/CatchBlock.java
   tools/eclipse/trunk/plugins/org.scribble.conversation.model/src/java/org/scribble/conversation/model/Compose.java
   tools/eclipse/trunk/plugins/org.scribble.conversation.model/src/java/org/scribble/conversation/model/ConditionalBlock.java
   tools/eclipse/trunk/plugins/org.scribble.conversation.model/src/java/org/scribble/conversation/model/Conversation.java
   tools/eclipse/trunk/plugins/org.scribble.conversation.model/src/java/org/scribble/conversation/model/ConversationInteraction.java
   tools/eclipse/trunk/plugins/org.scribble.conversation.model/src/java/org/scribble/conversation/model/ConversationModel.java
   tools/eclipse/trunk/plugins/org.scribble.conversation.model/src/java/org/scribble/conversation/model/ConversationNotation.java
   tools/eclipse/trunk/plugins/org.scribble.conversation.model/src/java/org/scribble/conversation/model/ConversationReference.java
   tools/eclipse/trunk/plugins/org.scribble.conversation.model/src/java/org/scribble/conversation/model/EscapeBlock.java
   tools/eclipse/trunk/plugins/org.scribble.conversation.model/src/java/org/scribble/conversation/model/Expression.java
   tools/eclipse/trunk/plugins/org.scribble.conversation.model/src/java/org/scribble/conversation/model/Identity.java
   tools/eclipse/trunk/plugins/org.scribble.conversation.model/src/java/org/scribble/conversation/model/IdentityLocator.java
   tools/eclipse/trunk/plugins/org.scribble.conversation.model/src/java/org/scribble/conversation/model/IdentityType.java
   tools/eclipse/trunk/plugins/org.scribble.conversation.model/src/java/org/scribble/conversation/model/If.java
   tools/eclipse/trunk/plugins/org.scribble.conversation.model/src/java/org/scribble/conversation/model/InterruptBlock.java
   tools/eclipse/trunk/plugins/org.scribble.conversation.model/src/java/org/scribble/conversation/model/Parallel.java
   tools/eclipse/trunk/plugins/org.scribble.conversation.model/src/java/org/scribble/conversation/model/Raise.java
   tools/eclipse/trunk/plugins/org.scribble.conversation.model/src/java/org/scribble/conversation/model/Run.java
   tools/eclipse/trunk/plugins/org.scribble.conversation.model/src/java/org/scribble/conversation/model/Spawn.java
   tools/eclipse/trunk/plugins/org.scribble.conversation.model/src/java/org/scribble/conversation/model/TryEscape.java
   tools/eclipse/trunk/plugins/org.scribble.conversation.model/src/java/org/scribble/conversation/model/Variable.java
   tools/eclipse/trunk/plugins/org.scribble.conversation.model/src/java/org/scribble/conversation/model/VariableList.java
   tools/eclipse/trunk/plugins/org.scribble.conversation.model/src/java/org/scribble/conversation/model/When.java
   tools/eclipse/trunk/plugins/org.scribble.conversation.model/src/java/org/scribble/conversation/model/While.java
   tools/eclipse/trunk/plugins/org.scribble.conversation.model/src/java/org/scribble/conversation/model/osgi/
   tools/eclipse/trunk/plugins/org.scribble.conversation.model/src/java/org/scribble/conversation/model/osgi/Activator.java
   tools/eclipse/trunk/plugins/org.scribble.conversation.model/src/test/
   tools/eclipse/trunk/plugins/org.scribble.conversation.model/src/test/org/
   tools/eclipse/trunk/plugins/org.scribble.conversation.model/src/test/org/scribble/
   tools/eclipse/trunk/plugins/org.scribble.conversation.model/src/test/org/scribble/conversation/
   tools/eclipse/trunk/plugins/org.scribble.conversation.model/src/test/org/scribble/conversation/model/
   tools/eclipse/trunk/plugins/org.scribble.conversation.model/src/test/org/scribble/conversation/model/IfTest.java
   tools/eclipse/trunk/plugins/org.scribble.conversation.model/src/test/org/scribble/conversation/model/WhileTest.java
   tools/eclipse/trunk/plugins/org.scribble.conversation.parser/
   tools/eclipse/trunk/plugins/org.scribble.conversation.parser/.classpath
   tools/eclipse/trunk/plugins/org.scribble.conversation.parser/.project
   tools/eclipse/trunk/plugins/org.scribble.conversation.parser/LICENSE.txt
   tools/eclipse/trunk/plugins/org.scribble.conversation.parser/META-INF/
   tools/eclipse/trunk/plugins/org.scribble.conversation.parser/META-INF/MANIFEST.MF
   tools/eclipse/trunk/plugins/org.scribble.conversation.parser/build.properties
   tools/eclipse/trunk/plugins/org.scribble.conversation.parser/classes/
   tools/eclipse/trunk/plugins/org.scribble.conversation.parser/classes/org/
   tools/eclipse/trunk/plugins/org.scribble.conversation.parser/classes/org/scribble/
   tools/eclipse/trunk/plugins/org.scribble.conversation.parser/classes/org/scribble/conversation/
   tools/eclipse/trunk/plugins/org.scribble.conversation.parser/classes/org/scribble/conversation/parser/
   tools/eclipse/trunk/plugins/org.scribble.conversation.parser/classes/org/scribble/conversation/parser/CatchBlockParserRule.class
   tools/eclipse/trunk/plugins/org.scribble.conversation.parser/classes/org/scribble/conversation/parser/ConversationInteractionParserRule.class
   tools/eclipse/trunk/plugins/org.scribble.conversation.parser/classes/org/scribble/conversation/parser/ConversationKeyWordProvider.class
   tools/eclipse/trunk/plugins/org.scribble.conversation.parser/classes/org/scribble/conversation/parser/ConversationModelParserRule.class
   tools/eclipse/trunk/plugins/org.scribble.conversation.parser/classes/org/scribble/conversation/parser/ConversationParserRule.class
   tools/eclipse/trunk/plugins/org.scribble.conversation.parser/classes/org/scribble/conversation/parser/ConversationReferenceParserRule.class
   tools/eclipse/trunk/plugins/org.scribble.conversation.parser/classes/org/scribble/conversation/parser/IdentityLocatorParserRule.class
   tools/eclipse/trunk/plugins/org.scribble.conversation.parser/classes/org/scribble/conversation/parser/IfParserRule.class
   tools/eclipse/trunk/plugins/org.scribble.conversation.parser/classes/org/scribble/conversation/parser/InterruptBlockParserRule.class
   tools/eclipse/trunk/plugins/org.scribble.conversation.parser/classes/org/scribble/conversation/parser/Messages.properties
   tools/eclipse/trunk/plugins/org.scribble.conversation.parser/classes/org/scribble/conversation/parser/ParallelParserRule.class
   tools/eclipse/trunk/plugins/org.scribble.conversation.parser/classes/org/scribble/conversation/parser/ProtocolImplementsReferenceParserRule.class
   tools/eclipse/trunk/plugins/org.scribble.conversation.parser/classes/org/scribble/conversation/parser/RaiseParserRule.class
   tools/eclipse/trunk/plugins/org.scribble.conversation.parser/classes/org/scribble/conversation/parser/RunConversationParserRule.class
   tools/eclipse/trunk/plugins/org.scribble.conversation.parser/classes/org/scribble/conversation/parser/RunParserRule.class
   tools/eclipse/trunk/plugins/org.scribble.conversation.parser/classes/org/scribble/conversation/parser/SpawnConversationParserRule.class
   tools/eclipse/trunk/plugins/org.scribble.conversation.parser/classes/org/scribble/conversation/parser/SpawnParserRule.class
   tools/eclipse/trunk/plugins/org.scribble.conversation.parser/classes/org/scribble/conversation/parser/TryEscapeParserRule.class
   tools/eclipse/trunk/plugins/org.scribble.conversation.parser/classes/org/scribble/conversation/parser/VariableListParserRule.class
   tools/eclipse/trunk/plugins/org.scribble.conversation.parser/classes/org/scribble/conversation/parser/WhenParserRule.class
   tools/eclipse/trunk/plugins/org.scribble.conversation.parser/classes/org/scribble/conversation/parser/WhileParserRule.class
   tools/eclipse/trunk/plugins/org.scribble.conversation.parser/classes/org/scribble/conversation/parser/osgi/
   tools/eclipse/trunk/plugins/org.scribble.conversation.parser/classes/org/scribble/conversation/parser/osgi/Activator.class
   tools/eclipse/trunk/plugins/org.scribble.conversation.parser/src/
   tools/eclipse/trunk/plugins/org.scribble.conversation.parser/src/java/
   tools/eclipse/trunk/plugins/org.scribble.conversation.parser/src/java/org/
   tools/eclipse/trunk/plugins/org.scribble.conversation.parser/src/java/org/scribble/
   tools/eclipse/trunk/plugins/org.scribble.conversation.parser/src/java/org/scribble/conversation/
   tools/eclipse/trunk/plugins/org.scribble.conversation.parser/src/java/org/scribble/conversation/parser/
   tools/eclipse/trunk/plugins/org.scribble.conversation.parser/src/java/org/scribble/conversation/parser/CatchBlockParserRule.java
   tools/eclipse/trunk/plugins/org.scribble.conversation.parser/src/java/org/scribble/conversation/parser/ConversationInteractionParserRule.java
   tools/eclipse/trunk/plugins/org.scribble.conversation.parser/src/java/org/scribble/conversation/parser/ConversationKeyWordProvider.java
   tools/eclipse/trunk/plugins/org.scribble.conversation.parser/src/java/org/scribble/conversation/parser/ConversationModelParserRule.java
   tools/eclipse/trunk/plugins/org.scribble.conversation.parser/src/java/org/scribble/conversation/parser/ConversationParserRule.java
   tools/eclipse/trunk/plugins/org.scribble.conversation.parser/src/java/org/scribble/conversation/parser/ConversationReferenceParserRule.java
   tools/eclipse/trunk/plugins/org.scribble.conversation.parser/src/java/org/scribble/conversation/parser/IdentityLocatorParserRule.java
   tools/eclipse/trunk/plugins/org.scribble.conversation.parser/src/java/org/scribble/conversation/parser/IfParserRule.java
   tools/eclipse/trunk/plugins/org.scribble.conversation.parser/src/java/org/scribble/conversation/parser/InterruptBlockParserRule.java
   tools/eclipse/trunk/plugins/org.scribble.conversation.parser/src/java/org/scribble/conversation/parser/Messages.properties
   tools/eclipse/trunk/plugins/org.scribble.conversation.parser/src/java/org/scribble/conversation/parser/ParallelParserRule.java
   tools/eclipse/trunk/plugins/org.scribble.conversation.parser/src/java/org/scribble/conversation/parser/ProtocolImplementsReferenceParserRule.java
   tools/eclipse/trunk/plugins/org.scribble.conversation.parser/src/java/org/scribble/conversation/parser/RaiseParserRule.java
   tools/eclipse/trunk/plugins/org.scribble.conversation.parser/src/java/org/scribble/conversation/parser/RunConversationParserRule.java
   tools/eclipse/trunk/plugins/org.scribble.conversation.parser/src/java/org/scribble/conversation/parser/RunParserRule.java
   tools/eclipse/trunk/plugins/org.scribble.conversation.parser/src/java/org/scribble/conversation/parser/SpawnConversationParserRule.java
   tools/eclipse/trunk/plugins/org.scribble.conversation.parser/src/java/org/scribble/conversation/parser/SpawnParserRule.java
   tools/eclipse/trunk/plugins/org.scribble.conversation.parser/src/java/org/scribble/conversation/parser/TryEscapeParserRule.java
   tools/eclipse/trunk/plugins/org.scribble.conversation.parser/src/java/org/scribble/conversation/parser/VariableListParserRule.java
   tools/eclipse/trunk/plugins/org.scribble.conversation.parser/src/java/org/scribble/conversation/parser/WhenParserRule.java
   tools/eclipse/trunk/plugins/org.scribble.conversation.parser/src/java/org/scribble/conversation/parser/WhileParserRule.java
   tools/eclipse/trunk/plugins/org.scribble.conversation.parser/src/java/org/scribble/conversation/parser/osgi/
   tools/eclipse/trunk/plugins/org.scribble.conversation.parser/src/java/org/scribble/conversation/parser/osgi/Activator.java
   tools/eclipse/trunk/plugins/org.scribble.conversation.projector/
   tools/eclipse/trunk/plugins/org.scribble.conversation.projector/.classpath
   tools/eclipse/trunk/plugins/org.scribble.conversation.projector/.project
   tools/eclipse/trunk/plugins/org.scribble.conversation.projector/LICENSE.txt
   tools/eclipse/trunk/plugins/org.scribble.conversation.projector/META-INF/
   tools/eclipse/trunk/plugins/org.scribble.conversation.projector/META-INF/MANIFEST.MF
   tools/eclipse/trunk/plugins/org.scribble.conversation.projector/build.properties
   tools/eclipse/trunk/plugins/org.scribble.conversation.projector/classes/
   tools/eclipse/trunk/plugins/org.scribble.conversation.projector/classes/org/
   tools/eclipse/trunk/plugins/org.scribble.conversation.projector/classes/org/scribble/
   tools/eclipse/trunk/plugins/org.scribble.conversation.projector/classes/org/scribble/conversation/
   tools/eclipse/trunk/plugins/org.scribble.conversation.projector/classes/org/scribble/conversation/projector/
   tools/eclipse/trunk/plugins/org.scribble.conversation.projector/classes/org/scribble/conversation/projector/CatchBlockProjectorRule.class
   tools/eclipse/trunk/plugins/org.scribble.conversation.projector/classes/org/scribble/conversation/projector/ComposeProjectorRule.class
   tools/eclipse/trunk/plugins/org.scribble.conversation.projector/classes/org/scribble/conversation/projector/ConditionalBlockProjectorRule.class
   tools/eclipse/trunk/plugins/org.scribble.conversation.projector/classes/org/scribble/conversation/projector/ConversationInteractionProjectorRule.class
   tools/eclipse/trunk/plugins/org.scribble.conversation.projector/classes/org/scribble/conversation/projector/ConversationModelProjectorRule.class
   tools/eclipse/trunk/plugins/org.scribble.conversation.projector/classes/org/scribble/conversation/projector/ConversationProjectorRule.class
   tools/eclipse/trunk/plugins/org.scribble.conversation.projector/classes/org/scribble/conversation/projector/ConversationReferenceProjectorRule.class
   tools/eclipse/trunk/plugins/org.scribble.conversation.projector/classes/org/scribble/conversation/projector/IdentityLocatorProjectorRule.class
   tools/eclipse/trunk/plugins/org.scribble.conversation.projector/classes/org/scribble/conversation/projector/IdentityProjectorRule.class
   tools/eclipse/trunk/plugins/org.scribble.conversation.projector/classes/org/scribble/conversation/projector/IfProjectorRule.class
   tools/eclipse/trunk/plugins/org.scribble.conversation.projector/classes/org/scribble/conversation/projector/InterruptBlockProjectorRule.class
   tools/eclipse/trunk/plugins/org.scribble.conversation.projector/classes/org/scribble/conversation/projector/ParallelProjectorRule.class
   tools/eclipse/trunk/plugins/org.scribble.conversation.projector/classes/org/scribble/conversation/projector/RaiseProjectorRule.class
   tools/eclipse/trunk/plugins/org.scribble.conversation.projector/classes/org/scribble/conversation/projector/RunProjectorRule.class
   tools/eclipse/trunk/plugins/org.scribble.conversation.projector/classes/org/scribble/conversation/projector/SpawnProjectorRule.class
   tools/eclipse/trunk/plugins/org.scribble.conversation.projector/classes/org/scribble/conversation/projector/TryEscapeProjectorRule.class
   tools/eclipse/trunk/plugins/org.scribble.conversation.projector/classes/org/scribble/conversation/projector/VariableListProjectorRule.class
   tools/eclipse/trunk/plugins/org.scribble.conversation.projector/classes/org/scribble/conversation/projector/WhenProjectorRule.class
   tools/eclipse/trunk/plugins/org.scribble.conversation.projector/classes/org/scribble/conversation/projector/WhileProjectorRule.class
   tools/eclipse/trunk/plugins/org.scribble.conversation.projector/classes/org/scribble/conversation/projector/osgi/
   tools/eclipse/trunk/plugins/org.scribble.conversation.projector/classes/org/scribble/conversation/projector/osgi/Activator.class
   tools/eclipse/trunk/plugins/org.scribble.conversation.projector/src/
   tools/eclipse/trunk/plugins/org.scribble.conversation.projector/src/java/
   tools/eclipse/trunk/plugins/org.scribble.conversation.projector/src/java/org/
   tools/eclipse/trunk/plugins/org.scribble.conversation.projector/src/java/org/scribble/
   tools/eclipse/trunk/plugins/org.scribble.conversation.projector/src/java/org/scribble/conversation/
   tools/eclipse/trunk/plugins/org.scribble.conversation.projector/src/java/org/scribble/conversation/projector/
   tools/eclipse/trunk/plugins/org.scribble.conversation.projector/src/java/org/scribble/conversation/projector/CatchBlockProjectorRule.java
   tools/eclipse/trunk/plugins/org.scribble.conversation.projector/src/java/org/scribble/conversation/projector/ComposeProjectorRule.java
   tools/eclipse/trunk/plugins/org.scribble.conversation.projector/src/java/org/scribble/conversation/projector/ConditionalBlockProjectorRule.java
   tools/eclipse/trunk/plugins/org.scribble.conversation.projector/src/java/org/scribble/conversation/projector/ConversationInteractionProjectorRule.java
   tools/eclipse/trunk/plugins/org.scribble.conversation.projector/src/java/org/scribble/conversation/projector/ConversationModelProjectorRule.java
   tools/eclipse/trunk/plugins/org.scribble.conversation.projector/src/java/org/scribble/conversation/projector/ConversationProjectorRule.java
   tools/eclipse/trunk/plugins/org.scribble.conversation.projector/src/java/org/scribble/conversation/projector/ConversationReferenceProjectorRule.java
   tools/eclipse/trunk/plugins/org.scribble.conversation.projector/src/java/org/scribble/conversation/projector/IdentityLocatorProjectorRule.java
   tools/eclipse/trunk/plugins/org.scribble.conversation.projector/src/java/org/scribble/conversation/projector/IdentityProjectorRule.java
   tools/eclipse/trunk/plugins/org.scribble.conversation.projector/src/java/org/scribble/conversation/projector/IfProjectorRule.java
   tools/eclipse/trunk/plugins/org.scribble.conversation.projector/src/java/org/scribble/conversation/projector/InterruptBlockProjectorRule.java
   tools/eclipse/trunk/plugins/org.scribble.conversation.projector/src/java/org/scribble/conversation/projector/ParallelProjectorRule.java
   tools/eclipse/trunk/plugins/org.scribble.conversation.projector/src/java/org/scribble/conversation/projector/RaiseProjectorRule.java
   tools/eclipse/trunk/plugins/org.scribble.conversation.projector/src/java/org/scribble/conversation/projector/RunProjectorRule.java
   tools/eclipse/trunk/plugins/org.scribble.conversation.projector/src/java/org/scribble/conversation/projector/SpawnProjectorRule.java
   tools/eclipse/trunk/plugins/org.scribble.conversation.projector/src/java/org/scribble/conversation/projector/TryEscapeProjectorRule.java
   tools/eclipse/trunk/plugins/org.scribble.conversation.projector/src/java/org/scribble/conversation/projector/VariableListProjectorRule.java
   tools/eclipse/trunk/plugins/org.scribble.conversation.projector/src/java/org/scribble/conversation/projector/WhenProjectorRule.java
   tools/eclipse/trunk/plugins/org.scribble.conversation.projector/src/java/org/scribble/conversation/projector/WhileProjectorRule.java
   tools/eclipse/trunk/plugins/org.scribble.conversation.projector/src/java/org/scribble/conversation/projector/osgi/
   tools/eclipse/trunk/plugins/org.scribble.conversation.projector/src/java/org/scribble/conversation/projector/osgi/Activator.java
   tools/eclipse/trunk/plugins/org.scribble.conversation.validation/
   tools/eclipse/trunk/plugins/org.scribble.conversation.validation/.classpath
   tools/eclipse/trunk/plugins/org.scribble.conversation.validation/.project
   tools/eclipse/trunk/plugins/org.scribble.conversation.validation/LICENSE.txt
   tools/eclipse/trunk/plugins/org.scribble.conversation.validation/META-INF/
   tools/eclipse/trunk/plugins/org.scribble.conversation.validation/META-INF/MANIFEST.MF
   tools/eclipse/trunk/plugins/org.scribble.conversation.validation/build.properties
   tools/eclipse/trunk/plugins/org.scribble.conversation.validation/classes/
   tools/eclipse/trunk/plugins/org.scribble.conversation.validation/classes/org/
   tools/eclipse/trunk/plugins/org.scribble.conversation.validation/classes/org/scribble/
   tools/eclipse/trunk/plugins/org.scribble.conversation.validation/classes/org/scribble/conversation/
   tools/eclipse/trunk/plugins/org.scribble.conversation.validation/classes/org/scribble/conversation/validation/
   tools/eclipse/trunk/plugins/org.scribble.conversation.validation/classes/org/scribble/conversation/validation/BehaviourValidationRule.class
   tools/eclipse/trunk/plugins/org.scribble.conversation.validation/classes/org/scribble/conversation/validation/ComposeValidationRule.class
   tools/eclipse/trunk/plugins/org.scribble.conversation.validation/classes/org/scribble/conversation/validation/ConditionalBlockValidationRule.class
   tools/eclipse/trunk/plugins/org.scribble.conversation.validation/classes/org/scribble/conversation/validation/ConversationInteractionValidationRule.class
   tools/eclipse/trunk/plugins/org.scribble.conversation.validation/classes/org/scribble/conversation/validation/ConversationModelValidationRule.class
   tools/eclipse/trunk/plugins/org.scribble.conversation.validation/classes/org/scribble/conversation/validation/ConversationValidationRule.class
   tools/eclipse/trunk/plugins/org.scribble.conversation.validation/classes/org/scribble/conversation/validation/IfValidationRule.class
   tools/eclipse/trunk/plugins/org.scribble.conversation.validation/classes/org/scribble/conversation/validation/Messages.properties
   tools/eclipse/trunk/plugins/org.scribble.conversation.validation/classes/org/scribble/conversation/validation/ParallelValidationRule.class
   tools/eclipse/trunk/plugins/org.scribble.conversation.validation/classes/org/scribble/conversation/validation/RaiseValidationRule.class
   tools/eclipse/trunk/plugins/org.scribble.conversation.validation/classes/org/scribble/conversation/validation/TryEscapeValidationRule.class
   tools/eclipse/trunk/plugins/org.scribble.conversation.validation/classes/org/scribble/conversation/validation/VariableListValidationRule.class
   tools/eclipse/trunk/plugins/org.scribble.conversation.validation/classes/org/scribble/conversation/validation/VariableValidationRule.class
   tools/eclipse/trunk/plugins/org.scribble.conversation.validation/classes/org/scribble/conversation/validation/WhenValidationRule.class
   tools/eclipse/trunk/plugins/org.scribble.conversation.validation/classes/org/scribble/conversation/validation/WhileValidationRule.class
   tools/eclipse/trunk/plugins/org.scribble.conversation.validation/classes/org/scribble/conversation/validation/osgi/
   tools/eclipse/trunk/plugins/org.scribble.conversation.validation/classes/org/scribble/conversation/validation/osgi/Activator.class
   tools/eclipse/trunk/plugins/org.scribble.conversation.validation/src/
   tools/eclipse/trunk/plugins/org.scribble.conversation.validation/src/java/
   tools/eclipse/trunk/plugins/org.scribble.conversation.validation/src/java/org/
   tools/eclipse/trunk/plugins/org.scribble.conversation.validation/src/java/org/scribble/
   tools/eclipse/trunk/plugins/org.scribble.conversation.validation/src/java/org/scribble/conversation/
   tools/eclipse/trunk/plugins/org.scribble.conversation.validation/src/java/org/scribble/conversation/validation/
   tools/eclipse/trunk/plugins/org.scribble.conversation.validation/src/java/org/scribble/conversation/validation/BehaviourValidationRule.java
   tools/eclipse/trunk/plugins/org.scribble.conversation.validation/src/java/org/scribble/conversation/validation/ComposeValidationRule.java
   tools/eclipse/trunk/plugins/org.scribble.conversation.validation/src/java/org/scribble/conversation/validation/ConditionalBlockValidationRule.java
   tools/eclipse/trunk/plugins/org.scribble.conversation.validation/src/java/org/scribble/conversation/validation/ConversationInteractionValidationRule.java
   tools/eclipse/trunk/plugins/org.scribble.conversation.validation/src/java/org/scribble/conversation/validation/ConversationModelValidationRule.java
   tools/eclipse/trunk/plugins/org.scribble.conversation.validation/src/java/org/scribble/conversation/validation/ConversationValidationRule.java
   tools/eclipse/trunk/plugins/org.scribble.conversation.validation/src/java/org/scribble/conversation/validation/IfValidationRule.java
   tools/eclipse/trunk/plugins/org.scribble.conversation.validation/src/java/org/scribble/conversation/validation/Messages.properties
   tools/eclipse/trunk/plugins/org.scribble.conversation.validation/src/java/org/scribble/conversation/validation/ParallelValidationRule.java
   tools/eclipse/trunk/plugins/org.scribble.conversation.validation/src/java/org/scribble/conversation/validation/RaiseValidationRule.java
   tools/eclipse/trunk/plugins/org.scribble.conversation.validation/src/java/org/scribble/conversation/validation/TryEscapeValidationRule.java
   tools/eclipse/trunk/plugins/org.scribble.conversation.validation/src/java/org/scribble/conversation/validation/VariableListValidationRule.java
   tools/eclipse/trunk/plugins/org.scribble.conversation.validation/src/java/org/scribble/conversation/validation/VariableValidationRule.java
   tools/eclipse/trunk/plugins/org.scribble.conversation.validation/src/java/org/scribble/conversation/validation/WhenValidationRule.java
   tools/eclipse/trunk/plugins/org.scribble.conversation.validation/src/java/org/scribble/conversation/validation/WhileValidationRule.java
   tools/eclipse/trunk/plugins/org.scribble.conversation.validation/src/java/org/scribble/conversation/validation/osgi/
   tools/eclipse/trunk/plugins/org.scribble.conversation.validation/src/java/org/scribble/conversation/validation/osgi/Activator.java
   tools/eclipse/trunk/plugins/org.scribble.core/
   tools/eclipse/trunk/plugins/org.scribble.core/.classpath
   tools/eclipse/trunk/plugins/org.scribble.core/.project
   tools/eclipse/trunk/plugins/org.scribble.core/Issues.txt
   tools/eclipse/trunk/plugins/org.scribble.core/LICENSE.txt
   tools/eclipse/trunk/plugins/org.scribble.core/META-INF/
   tools/eclipse/trunk/plugins/org.scribble.core/META-INF/MANIFEST.MF
   tools/eclipse/trunk/plugins/org.scribble.core/build.properties
   tools/eclipse/trunk/plugins/org.scribble.core/classes/
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/comparator/
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/comparator/BlockComparatorRule.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/comparator/BlockComparatorRuleTest.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/comparator/ChannelComparatorRule.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/comparator/ChannelComparatorRuleTest.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/comparator/Comparator.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/comparator/ComparatorContext.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/comparator/ComparatorRule.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/comparator/DefaultComparator.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/comparator/DefaultComparatorContext.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/comparator/DefaultNameMap.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/comparator/DefaultNameMapTest.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/comparator/GlobalToLocalModelComparatorRule.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/comparator/GlobalToLocalModelComparatorRuleTest$1.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/comparator/GlobalToLocalModelComparatorRuleTest$10.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/comparator/GlobalToLocalModelComparatorRuleTest$11.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/comparator/GlobalToLocalModelComparatorRuleTest$12.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/comparator/GlobalToLocalModelComparatorRuleTest$2.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/comparator/GlobalToLocalModelComparatorRuleTest$3.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/comparator/GlobalToLocalModelComparatorRuleTest$4.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/comparator/GlobalToLocalModelComparatorRuleTest$5.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/comparator/GlobalToLocalModelComparatorRuleTest$6.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/comparator/GlobalToLocalModelComparatorRuleTest$7.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/comparator/GlobalToLocalModelComparatorRuleTest$8.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/comparator/GlobalToLocalModelComparatorRuleTest$9.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/comparator/GlobalToLocalModelComparatorRuleTest.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/comparator/InteractionComparatorRule.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/comparator/InteractionComparatorRuleTest.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/comparator/LocalToLocalModelComparatorRule.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/comparator/MessageSignatureComparatorRule.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/comparator/MessageSignatureComparatorRuleTest.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/comparator/Messages.properties
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/comparator/NameMap.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/comparator/NamespaceComparatorRule.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/comparator/NamespaceComparatorRuleTest.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/comparator/RoleComparatorRule.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/comparator/RoleComparatorRuleTest.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/comparator/TestComparatorRule.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/comparator/TypeReferenceComparatorRule.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/comparator/TypeReferenceComparatorRuleTest.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/editor/
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/editor/AbstractEditorManager.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/editor/EditorManager.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/export/
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/export/AbstractFormatter.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/export/DefaultExporter.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/export/DefaultExporterContext.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/export/ExportRule.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/export/Exporter.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/export/ExporterContext.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/export/Formatter.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/export/monitor/
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/export/monitor/AbstractModelMonitorExportRule.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/export/monitor/MonitorFormatter.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/export/stream/
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/export/stream/AbstractModelStreamExportRule.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/export/stream/StreamFormatter.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/export/text/
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/export/text/AbstractBlockTextExportRule.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/export/text/AbstractModelReferenceTextExportRule.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/export/text/AbstractModelTextExportRule.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/export/text/BlockTextExportRule.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/export/text/ChannelListTextExportRule.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/export/text/ChannelTextExportRule.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/export/text/ConformanceReferenceTextExportRule.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/export/text/ImplementsReferenceTextExportRule.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/export/text/ImportTextExportRule.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/export/text/InteractionTextExportRule.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/export/text/MessageSignatureTextExportRule.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/export/text/ModelNameTextExportRule.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/export/text/NamespaceTextExportRule.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/export/text/RoleListTextExportRule.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/export/text/RoleTextExportRule.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/export/text/TextFormatter.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/export/text/TypeReferenceTextExportRule.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/extensions/
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/extensions/AbstractRegistry$NotationDetails.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/extensions/AbstractRegistry.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/extensions/AbstractRegistryTest$NotationA.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/extensions/AbstractRegistryTest$NotationB.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/extensions/AbstractRegistryTest$NotationC.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/extensions/AbstractRegistryTest$TestExtension.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/extensions/AbstractRegistryTest$TestExtensionAImpl.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/extensions/AbstractRegistryTest$TestExtensionBImpl.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/extensions/AbstractRegistryTest.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/extensions/ClasspathRegistry.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/extensions/OSGiRegistry.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/extensions/Registry.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/extensions/RegistryException.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/extensions/RegistryFactory.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/extensions/RegistryInfo.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/extensions/TestRegistry.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/extensions/TestSingleExtensionRegistry.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/extensions/TestTypeMapRegistry.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/extensions/test/
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/extensions/test/Extension1.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/extensions/test/Extension1Rule.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/extensions/test/Extension1Rule_Derived_SN1A.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/extensions/test/Extension1Rule_MN1.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/extensions/test/Extension1Rule_MN2.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/extensions/test/Extension1Rule_SN1A.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/extensions/test/MainNotation1.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/extensions/test/MainNotation2.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/extensions/test/SubNotation1A.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/AbstractNotation.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/Activity.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/Annotations.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/Behaviour.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/Block.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/Channel.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/ChannelList.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/ConformanceReference.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/ContainmentList.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/Declaration.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/DeclarationBinding.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/Definition.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/ImplementsReference.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/Import.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/Interaction.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/InteractionTest$1.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/InteractionTest$2.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/InteractionTest$3.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/InteractionTest$4.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/InteractionTest.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/LocatedName.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/MessageSignature.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/Model$1.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/Model.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/ModelInclude.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/ModelObject.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/ModelObjectTest$Bottom.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/ModelObjectTest$Middle.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/ModelObjectTest$Top.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/ModelObjectTest.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/ModelReference.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/ModelReferenceTest.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/ModelTest$Bottom.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/ModelTest$Middle.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/ModelTest$TopModel.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/ModelTest.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/MultiPathBehaviour.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/NameMappingReference.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/Namespace.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/Notation.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/OrderingConstraint.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/Reference.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/Role.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/RoleList.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/SinglePathBehaviour.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/SourceRef.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/Statement.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/SubDefinitionPath.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/TestDefinition.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/TestModel.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/TestMultiPathBehaviour.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/TestSinglePathBehaviour.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/TypeModel.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/TypeNotation.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/TypeReference.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/Visitor.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/admin/
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/admin/AbstractDependencyManager$1.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/admin/AbstractDependencyManager$DependencyInfo.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/admin/AbstractDependencyManager.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/admin/AbstractDependencyManagerTest$1.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/admin/AbstractDependencyManagerTest$2.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/admin/AbstractDependencyManagerTest$3.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/admin/AbstractDependencyManagerTest$4.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/admin/AbstractDependencyManagerTest.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/admin/AbstractModelRepository.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/admin/DefaultModelChangeListener.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/admin/DefaultModelListener.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/admin/DefaultModelListenerTest.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/admin/DefaultResolution.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/admin/DependencyHandler.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/admin/DependencyManager.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/admin/DependencyType.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/admin/ErrorRecorder.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/admin/Messages.properties
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/admin/ModelChangeListener.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/admin/ModelInfo.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/admin/ModelIssue.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/admin/ModelListener.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/admin/ModelRepository.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/admin/ModelResource.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/admin/TestModelResource.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/analysis/
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/analysis/BlockLookaheadRule.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/analysis/DefaultLookaheadAnalyser.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/analysis/DefaultLookaheadContext.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/analysis/InteractionLookaheadRule.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/analysis/LookaheadAnalyser.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/analysis/LookaheadContext.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/analysis/LookaheadRule.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/analysis/ModelIncludeLookaheadRule.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/analysis/MultiPathBehaviourLookaheadRule.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/analysis/SinglePathBehaviourLookaheadRule.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/analysis/TestLookaheadAnalyser.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/change/
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/change/AbstractModelChangeRule.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/change/DefaultModelChangeContext.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/change/DefaultModelGenerator.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/change/ModelChangeContext.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/change/ModelChangeRule.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/change/ModelGenerator.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/change/TestChangeInformation.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/change/TestModelChangeContext.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/filter/
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/filter/DefaultModelFilter.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/filter/DefaultModelFilterTest$TestDefinition.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/filter/DefaultModelFilterTest$TestModel.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/filter/DefaultModelFilterTest.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/filter/ModelFilter.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/resolutions/
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/resolutions/DeleteFromModel.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/resolutions/InsertFromReferencedDescription.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/resolutions/Messages.properties
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/resolutions/Resolution.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/resolutions/ResolutionException.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/resolutions/ShowComposedIssue.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/resolutions/ShowReferencedDescription.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/resolutions/UpdateFromReferencedDescription.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/types/
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/types/DefaultTypeResolver.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/types/TypeInformation.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/types/TypeResolver.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/types/TypeResolverRule.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/types/TypeSystem.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/util/
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/util/InteractionUtil.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/util/InteractionUtilTest.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/osgi/
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/osgi/Activator.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/parser/
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/parser/AbstractImplementsReferenceParserRule.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/parser/AbstractModelParserRule.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/parser/AbstractModelReferenceParserRule.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/parser/AbstractParserRule.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/parser/ChannelListParserRule.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/parser/ChannelListParserRuleTest.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/parser/ConformanceReferenceParserRule.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/parser/ConformanceReferenceParserRuleTest.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/parser/DefaultKeyWordProvider.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/parser/DefaultParser.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/parser/DefaultParserContext.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/parser/DefaultParserContextTest.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/parser/DefaultTokenizer.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/parser/GenericKeyWordProvider.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/parser/GenericParser.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/parser/ImportParserRule.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/parser/ImportParserRuleTest.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/parser/InteractionParserRule.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/parser/InteractionParserRuleTest.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/parser/KeyWordProvider.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/parser/MessageSignatureParserRule.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/parser/MessageSignatureParserRuleTest.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/parser/Messages.properties
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/parser/ModelNameParserRule.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/parser/ModelNameParserRuleTest.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/parser/NamespaceParserRule.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/parser/NamespaceParserRuleTest.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/parser/Parser.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/parser/ParserConstants.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/parser/ParserContext.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/parser/ParserRule.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/parser/ParserRuleType.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/parser/RoleListParserRule.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/parser/RoleListParserRuleTest.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/parser/TestModelRepository.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/parser/TestParserContext.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/parser/TestTypeReferenceParserRule.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/parser/Token.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/parser/TokenType.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/parser/Tokenizer.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/parser/TypeReferenceParserRule.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/parser/TypeReferenceParserRuleTest.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/projector/
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/projector/AbstractBlockProjectorRule.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/projector/BlockProjectorRule.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/projector/ChannelListProjectorRule.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/projector/ConformanceReferenceProjectorRule.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/projector/DefaultProjector.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/projector/DefaultProjectorContext.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/projector/ImplementsReferenceProjectorRule.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/projector/ImportProjectorRule.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/projector/InteractionProjectorRule.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/projector/LocatedNameProjectorRule.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/projector/MessageSignatureProjectorRule.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/projector/Messages.properties
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/projector/ModelIncludeProjectorRule.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/projector/ModelProjectorRule.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/projector/ModelReferenceProjectorRule.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/projector/NamespaceProjectorRule.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/projector/Projector.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/projector/ProjectorContext.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/projector/ProjectorRule.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/projector/RoleListProjectorRule.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/projector/RoleProjectorRule.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/projector/TestProjector.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/projector/TypeReferenceProjectorRule.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/util/
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/util/MessageUtil.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/util/ModelIssueUtil.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/util/ModelIssueUtilTest$Resolution1.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/util/ModelIssueUtilTest$Resolution2.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/util/ModelIssueUtilTest.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/util/ResourceUtil.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/util/Scope.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/util/ScopeTest.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/validation/
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/validation/AbstractValidationRule.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/validation/BlockValidationRule.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/validation/ChannelListValidationRule.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/validation/ChannelValidationRule.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/validation/DefaultValidationContext$1.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/validation/DefaultValidationContext.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/validation/DefaultValidator.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/validation/InteractionValidationRule.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/validation/MessageSignatureValidationRule.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/validation/Messages.properties
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/validation/ModelReferenceValidationRule.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/validation/ModelValidationRule.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/validation/RoleListValidationRule.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/validation/RoleValidationRule.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/validation/TypeReferenceValidationRule.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/validation/ValidationContext.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/validation/ValidationRule.class
   tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/validation/Validator.class
   tools/eclipse/trunk/plugins/org.scribble.core/schema/
   tools/eclipse/trunk/plugins/org.scribble.core/src/
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/comparator/
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/comparator/BlockComparatorRule.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/comparator/ChannelComparatorRule.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/comparator/Comparator.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/comparator/ComparatorContext.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/comparator/ComparatorRule.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/comparator/DefaultComparator.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/comparator/DefaultComparatorContext.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/comparator/DefaultNameMap.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/comparator/GlobalToLocalModelComparatorRule.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/comparator/InteractionComparatorRule.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/comparator/LocalToLocalModelComparatorRule.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/comparator/MessageSignatureComparatorRule.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/comparator/Messages.properties
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/comparator/NameMap.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/comparator/NamespaceComparatorRule.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/comparator/RoleComparatorRule.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/comparator/TypeReferenceComparatorRule.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/editor/
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/editor/AbstractEditorManager.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/editor/EditorManager.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/export/
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/export/AbstractFormatter.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/export/DefaultExporter.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/export/DefaultExporterContext.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/export/ExportRule.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/export/Exporter.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/export/ExporterContext.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/export/Formatter.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/export/monitor/
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/export/monitor/AbstractModelMonitorExportRule.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/export/monitor/MonitorFormatter.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/export/stream/
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/export/stream/AbstractModelStreamExportRule.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/export/stream/StreamFormatter.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/export/text/
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/export/text/AbstractBlockTextExportRule.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/export/text/AbstractModelReferenceTextExportRule.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/export/text/AbstractModelTextExportRule.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/export/text/BlockTextExportRule.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/export/text/ChannelListTextExportRule.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/export/text/ChannelTextExportRule.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/export/text/ConformanceReferenceTextExportRule.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/export/text/ImplementsReferenceTextExportRule.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/export/text/ImportTextExportRule.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/export/text/InteractionTextExportRule.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/export/text/MessageSignatureTextExportRule.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/export/text/ModelNameTextExportRule.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/export/text/NamespaceTextExportRule.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/export/text/RoleListTextExportRule.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/export/text/RoleTextExportRule.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/export/text/TextFormatter.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/export/text/TypeReferenceTextExportRule.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/extensions/
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/extensions/AbstractRegistry.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/extensions/ClasspathRegistry.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/extensions/OSGiRegistry.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/extensions/Registry.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/extensions/RegistryException.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/extensions/RegistryFactory.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/extensions/RegistryInfo.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/AbstractNotation.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/Activity.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/Annotations.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/Behaviour.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/Block.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/Channel.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/ChannelList.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/ConformanceReference.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/ContainmentList.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/Declaration.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/DeclarationBinding.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/Definition.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/ImplementsReference.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/Import.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/Interaction.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/LocatedName.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/MessageSignature.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/Model.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/ModelInclude.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/ModelObject.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/ModelReference.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/MultiPathBehaviour.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/NameMappingReference.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/Namespace.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/Notation.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/OrderingConstraint.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/Reference.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/Role.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/RoleList.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/SinglePathBehaviour.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/SourceRef.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/Statement.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/SubDefinitionPath.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/TypeModel.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/TypeNotation.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/TypeReference.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/Visitor.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/admin/
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/admin/AbstractDependencyManager.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/admin/AbstractModelRepository.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/admin/DefaultModelChangeListener.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/admin/DefaultModelListener.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/admin/DefaultResolution.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/admin/DependencyHandler.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/admin/DependencyManager.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/admin/DependencyType.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/admin/Messages.properties
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/admin/ModelChangeListener.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/admin/ModelInfo.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/admin/ModelIssue.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/admin/ModelListener.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/admin/ModelRepository.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/admin/ModelResource.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/analysis/
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/analysis/BlockLookaheadRule.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/analysis/DefaultLookaheadAnalyser.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/analysis/DefaultLookaheadContext.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/analysis/InteractionLookaheadRule.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/analysis/LookaheadAnalyser.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/analysis/LookaheadContext.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/analysis/LookaheadRule.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/analysis/ModelIncludeLookaheadRule.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/analysis/MultiPathBehaviourLookaheadRule.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/analysis/SinglePathBehaviourLookaheadRule.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/change/
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/change/AbstractModelChangeRule.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/change/DefaultModelChangeContext.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/change/DefaultModelGenerator.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/change/ModelChangeContext.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/change/ModelChangeRule.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/change/ModelGenerator.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/filter/
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/filter/DefaultModelFilter.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/filter/ModelFilter.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/resolutions/
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/resolutions/DeleteFromModel.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/resolutions/InsertFromReferencedDescription.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/resolutions/Messages.properties
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/resolutions/Resolution.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/resolutions/ResolutionException.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/resolutions/ShowComposedIssue.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/resolutions/ShowReferencedDescription.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/resolutions/UpdateFromReferencedDescription.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/types/
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/types/DefaultTypeResolver.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/types/TypeInformation.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/types/TypeResolver.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/types/TypeResolverRule.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/types/TypeSystem.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/util/
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/util/InteractionUtil.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/osgi/
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/osgi/Activator.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/parser/
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/parser/AbstractImplementsReferenceParserRule.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/parser/AbstractModelParserRule.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/parser/AbstractModelReferenceParserRule.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/parser/AbstractParserRule.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/parser/ChannelListParserRule.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/parser/ConformanceReferenceParserRule.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/parser/DefaultKeyWordProvider.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/parser/DefaultParser.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/parser/DefaultParserContext.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/parser/DefaultTokenizer.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/parser/ImportParserRule.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/parser/InteractionParserRule.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/parser/KeyWordProvider.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/parser/MessageSignatureParserRule.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/parser/Messages.properties
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/parser/ModelNameParserRule.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/parser/NamespaceParserRule.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/parser/Parser.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/parser/ParserConstants.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/parser/ParserContext.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/parser/ParserRule.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/parser/ParserRuleType.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/parser/RoleListParserRule.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/parser/Token.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/parser/TokenType.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/parser/Tokenizer.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/parser/TypeReferenceParserRule.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/projector/
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/projector/AbstractBlockProjectorRule.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/projector/BlockProjectorRule.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/projector/ChannelListProjectorRule.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/projector/ConformanceReferenceProjectorRule.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/projector/DefaultProjector.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/projector/DefaultProjectorContext.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/projector/ImplementsReferenceProjectorRule.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/projector/ImportProjectorRule.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/projector/InteractionProjectorRule.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/projector/LocatedNameProjectorRule.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/projector/MessageSignatureProjectorRule.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/projector/Messages.properties
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/projector/ModelIncludeProjectorRule.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/projector/ModelProjectorRule.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/projector/ModelReferenceProjectorRule.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/projector/NamespaceProjectorRule.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/projector/Projector.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/projector/ProjectorContext.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/projector/ProjectorRule.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/projector/RoleListProjectorRule.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/projector/RoleProjectorRule.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/projector/TypeReferenceProjectorRule.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/util/
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/util/MessageUtil.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/util/ModelIssueUtil.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/util/ResourceUtil.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/util/Scope.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/validation/
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/validation/AbstractValidationRule.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/validation/BlockValidationRule.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/validation/ChannelListValidationRule.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/validation/ChannelValidationRule.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/validation/DefaultValidationContext.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/validation/DefaultValidator.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/validation/InteractionValidationRule.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/validation/MessageSignatureValidationRule.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/validation/Messages.properties
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/validation/ModelReferenceValidationRule.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/validation/ModelValidationRule.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/validation/RoleListValidationRule.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/validation/RoleValidationRule.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/validation/TypeReferenceValidationRule.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/validation/ValidationContext.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/validation/ValidationRule.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/validation/Validator.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/test/
   tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/
   tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/
   tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/comparator/
   tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/comparator/BlockComparatorRuleTest.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/comparator/ChannelComparatorRuleTest.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/comparator/DefaultNameMapTest.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/comparator/GlobalToLocalModelComparatorRuleTest.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/comparator/InteractionComparatorRuleTest.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/comparator/MessageSignatureComparatorRuleTest.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/comparator/NamespaceComparatorRuleTest.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/comparator/RoleComparatorRuleTest.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/comparator/TestComparatorRule.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/comparator/TypeReferenceComparatorRuleTest.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/extensions/
   tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/extensions/AbstractRegistryTest.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/extensions/TestRegistry.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/extensions/TestSingleExtensionRegistry.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/extensions/TestTypeMapRegistry.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/extensions/test/
   tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/extensions/test/Extension1.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/extensions/test/Extension1Rule.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/extensions/test/Extension1Rule_Derived_SN1A.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/extensions/test/Extension1Rule_MN1.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/extensions/test/Extension1Rule_MN2.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/extensions/test/Extension1Rule_SN1A.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/extensions/test/MainNotation1.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/extensions/test/MainNotation2.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/extensions/test/SubNotation1A.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/model/
   tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/model/InteractionTest.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/model/ModelObjectTest.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/model/ModelReferenceTest.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/model/ModelTest.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/model/TestDefinition.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/model/TestModel.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/model/TestMultiPathBehaviour.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/model/TestSinglePathBehaviour.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/model/admin/
   tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/model/admin/AbstractDependencyManagerTest.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/model/admin/DefaultModelListenerTest.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/model/admin/ErrorRecorder.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/model/admin/TestModelResource.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/model/analysis/
   tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/model/analysis/TestLookaheadAnalyser.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/model/change/
   tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/model/change/TestChangeInformation.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/model/change/TestModelChangeContext.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/model/filter/
   tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/model/filter/DefaultModelFilterTest.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/model/util/
   tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/model/util/InteractionUtilTest.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/parser/
   tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/parser/ChannelListParserRuleTest.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/parser/ConformanceReferenceParserRuleTest.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/parser/DefaultParserContextTest.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/parser/GenericKeyWordProvider.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/parser/GenericParser.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/parser/ImportParserRuleTest.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/parser/InteractionParserRuleTest.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/parser/MessageSignatureParserRuleTest.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/parser/ModelNameParserRuleTest.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/parser/NamespaceParserRuleTest.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/parser/RoleListParserRuleTest.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/parser/TestModelRepository.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/parser/TestParserContext.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/parser/TestTypeReferenceParserRule.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/parser/TypeReferenceParserRuleTest.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/projector/
   tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/projector/TestProjector.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/util/
   tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/util/ModelIssueUtilTest.java
   tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/util/ScopeTest.java
   tools/eclipse/trunk/plugins/org.scribble.eclipse/
   tools/eclipse/trunk/plugins/org.scribble.eclipse/.classpath
   tools/eclipse/trunk/plugins/org.scribble.eclipse/.project
   tools/eclipse/trunk/plugins/org.scribble.eclipse/LICENSE.txt
   tools/eclipse/trunk/plugins/org.scribble.eclipse/META-INF/
   tools/eclipse/trunk/plugins/org.scribble.eclipse/META-INF/MANIFEST.MF
   tools/eclipse/trunk/plugins/org.scribble.eclipse/build.properties
   tools/eclipse/trunk/plugins/org.scribble.eclipse/classes/
   tools/eclipse/trunk/plugins/org.scribble.eclipse/classes/org/
   tools/eclipse/trunk/plugins/org.scribble.eclipse/classes/org/scribble/
   tools/eclipse/trunk/plugins/org.scribble.eclipse/classes/org/scribble/eclipse/
   tools/eclipse/trunk/plugins/org.scribble.eclipse/classes/org/scribble/eclipse/actions/
   tools/eclipse/trunk/plugins/org.scribble.eclipse/classes/org/scribble/eclipse/actions/ExportTextAction.class
   tools/eclipse/trunk/plugins/org.scribble.eclipse/classes/org/scribble/eclipse/actions/ProjectAction.class
   tools/eclipse/trunk/plugins/org.scribble.eclipse/classes/org/scribble/eclipse/model/
   tools/eclipse/trunk/plugins/org.scribble.eclipse/classes/org/scribble/eclipse/model/admin/
   tools/eclipse/trunk/plugins/org.scribble.eclipse/classes/org/scribble/eclipse/model/admin/OSGIDefinitions.class
   tools/eclipse/trunk/plugins/org.scribble.eclipse/classes/org/scribble/eclipse/model/admin/OSGIDependencyManager.class
   tools/eclipse/trunk/plugins/org.scribble.eclipse/classes/org/scribble/eclipse/model/admin/OSGIModelListener$1.class
   tools/eclipse/trunk/plugins/org.scribble.eclipse/classes/org/scribble/eclipse/model/admin/OSGIModelListener$ReportEntry.class
   tools/eclipse/trunk/plugins/org.scribble.eclipse/classes/org/scribble/eclipse/model/admin/OSGIModelListener.class
   tools/eclipse/trunk/plugins/org.scribble.eclipse/classes/org/scribble/eclipse/model/admin/OSGIModelRepository$1$1.class
   tools/eclipse/trunk/plugins/org.scribble.eclipse/classes/org/scribble/eclipse/model/admin/OSGIModelRepository$1.class
   tools/eclipse/trunk/plugins/org.scribble.eclipse/classes/org/scribble/eclipse/model/admin/OSGIModelRepository$2.class
   tools/eclipse/trunk/plugins/org.scribble.eclipse/classes/org/scribble/eclipse/model/admin/OSGIModelRepository$3.class
   tools/eclipse/trunk/plugins/org.scribble.eclipse/classes/org/scribble/eclipse/model/admin/OSGIModelRepository$4.class
   tools/eclipse/trunk/plugins/org.scribble.eclipse/classes/org/scribble/eclipse/model/admin/OSGIModelRepository$5.class
   tools/eclipse/trunk/plugins/org.scribble.eclipse/classes/org/scribble/eclipse/model/admin/OSGIModelRepository$6.class
   tools/eclipse/trunk/plugins/org.scribble.eclipse/classes/org/scribble/eclipse/model/admin/OSGIModelRepository$ValidationJob.class
   tools/eclipse/trunk/plugins/org.scribble.eclipse/classes/org/scribble/eclipse/model/admin/OSGIModelRepository.class
   tools/eclipse/trunk/plugins/org.scribble.eclipse/classes/org/scribble/eclipse/model/admin/OSGIModelResource.class
   tools/eclipse/trunk/plugins/org.scribble.eclipse/classes/org/scribble/eclipse/model/admin/ReValidationDependencyHandler.class
   tools/eclipse/trunk/plugins/org.scribble.eclipse/classes/org/scribble/eclipse/model/images/
   tools/eclipse/trunk/plugins/org.scribble.eclipse/classes/org/scribble/eclipse/model/images/ScribbleImages.class
   tools/eclipse/trunk/plugins/org.scribble.eclipse/classes/org/scribble/eclipse/model/images/activity.png
   tools/eclipse/trunk/plugins/org.scribble.eclipse/classes/org/scribble/eclipse/model/images/declaration.png
   tools/eclipse/trunk/plugins/org.scribble.eclipse/classes/org/scribble/eclipse/model/images/import.png
   tools/eclipse/trunk/plugins/org.scribble.eclipse/classes/org/scribble/eclipse/model/images/namespace.png
   tools/eclipse/trunk/plugins/org.scribble.eclipse/classes/org/scribble/eclipse/model/images/role.png
   tools/eclipse/trunk/plugins/org.scribble.eclipse/classes/org/scribble/eclipse/model/outliner/
   tools/eclipse/trunk/plugins/org.scribble.eclipse/classes/org/scribble/eclipse/model/outliner/AbstractModelOutlinerRule.class
   tools/eclipse/trunk/plugins/org.scribble.eclipse/classes/org/scribble/eclipse/model/outliner/DefaultModelOutliner.class
   tools/eclipse/trunk/plugins/org.scribble.eclipse/classes/org/scribble/eclipse/model/outliner/ModelOutliner.class
   tools/eclipse/trunk/plugins/org.scribble.eclipse/classes/org/scribble/eclipse/model/outliner/OutlinerRule.class
   tools/eclipse/trunk/plugins/org.scribble.eclipse/classes/org/scribble/eclipse/osgi/
   tools/eclipse/trunk/plugins/org.scribble.eclipse/classes/org/scribble/eclipse/osgi/Activator.class
   tools/eclipse/trunk/plugins/org.scribble.eclipse/classes/org/scribble/eclipse/resolutions/
   tools/eclipse/trunk/plugins/org.scribble.eclipse/classes/org/scribble/eclipse/resolutions/MarkerResolutionGenerator$MarkerResolutionWrapper.class
   tools/eclipse/trunk/plugins/org.scribble.eclipse/classes/org/scribble/eclipse/resolutions/MarkerResolutionGenerator$ResolutionComparator.class
   tools/eclipse/trunk/plugins/org.scribble.eclipse/classes/org/scribble/eclipse/resolutions/MarkerResolutionGenerator.class
   tools/eclipse/trunk/plugins/org.scribble.eclipse/classes/org/scribble/eclipse/util/
   tools/eclipse/trunk/plugins/org.scribble.eclipse/classes/org/scribble/eclipse/util/ResourceUtil.class
   tools/eclipse/trunk/plugins/org.scribble.eclipse/plugin.xml
   tools/eclipse/trunk/plugins/org.scribble.eclipse/src/
   tools/eclipse/trunk/plugins/org.scribble.eclipse/src/java/
   tools/eclipse/trunk/plugins/org.scribble.eclipse/src/java/org/
   tools/eclipse/trunk/plugins/org.scribble.eclipse/src/java/org/scribble/
   tools/eclipse/trunk/plugins/org.scribble.eclipse/src/java/org/scribble/eclipse/
   tools/eclipse/trunk/plugins/org.scribble.eclipse/src/java/org/scribble/eclipse/actions/
   tools/eclipse/trunk/plugins/org.scribble.eclipse/src/java/org/scribble/eclipse/actions/ExportTextAction.java
   tools/eclipse/trunk/plugins/org.scribble.eclipse/src/java/org/scribble/eclipse/actions/ProjectAction.java
   tools/eclipse/trunk/plugins/org.scribble.eclipse/src/java/org/scribble/eclipse/model/
   tools/eclipse/trunk/plugins/org.scribble.eclipse/src/java/org/scribble/eclipse/model/admin/
   tools/eclipse/trunk/plugins/org.scribble.eclipse/src/java/org/scribble/eclipse/model/admin/OSGIDefinitions.java
   tools/eclipse/trunk/plugins/org.scribble.eclipse/src/java/org/scribble/eclipse/model/admin/OSGIDependencyManager.java
   tools/eclipse/trunk/plugins/org.scribble.eclipse/src/java/org/scribble/eclipse/model/admin/OSGIModelListener.java
   tools/eclipse/trunk/plugins/org.scribble.eclipse/src/java/org/scribble/eclipse/model/admin/OSGIModelRepository.java
   tools/eclipse/trunk/plugins/org.scribble.eclipse/src/java/org/scribble/eclipse/model/admin/OSGIModelResource.java
   tools/eclipse/trunk/plugins/org.scribble.eclipse/src/java/org/scribble/eclipse/model/admin/ReValidationDependencyHandler.java
   tools/eclipse/trunk/plugins/org.scribble.eclipse/src/java/org/scribble/eclipse/model/images/
   tools/eclipse/trunk/plugins/org.scribble.eclipse/src/java/org/scribble/eclipse/model/images/ScribbleImages.java
   tools/eclipse/trunk/plugins/org.scribble.eclipse/src/java/org/scribble/eclipse/model/images/activity.png
   tools/eclipse/trunk/plugins/org.scribble.eclipse/src/java/org/scribble/eclipse/model/images/declaration.png
   tools/eclipse/trunk/plugins/org.scribble.eclipse/src/java/org/scribble/eclipse/model/images/import.png
   tools/eclipse/trunk/plugins/org.scribble.eclipse/src/java/org/scribble/eclipse/model/images/namespace.png
   tools/eclipse/trunk/plugins/org.scribble.eclipse/src/java/org/scribble/eclipse/model/images/role.png
   tools/eclipse/trunk/plugins/org.scribble.eclipse/src/java/org/scribble/eclipse/model/outliner/
   tools/eclipse/trunk/plugins/org.scribble.eclipse/src/java/org/scribble/eclipse/model/outliner/AbstractModelOutlinerRule.java
   tools/eclipse/trunk/plugins/org.scribble.eclipse/src/java/org/scribble/eclipse/model/outliner/DefaultModelOutliner.java
   tools/eclipse/trunk/plugins/org.scribble.eclipse/src/java/org/scribble/eclipse/model/outliner/ModelOutliner.java
   tools/eclipse/trunk/plugins/org.scribble.eclipse/src/java/org/scribble/eclipse/model/outliner/OutlinerRule.java
   tools/eclipse/trunk/plugins/org.scribble.eclipse/src/java/org/scribble/eclipse/osgi/
   tools/eclipse/trunk/plugins/org.scribble.eclipse/src/java/org/scribble/eclipse/osgi/Activator.java
   tools/eclipse/trunk/plugins/org.scribble.eclipse/src/java/org/scribble/eclipse/resolutions/
   tools/eclipse/trunk/plugins/org.scribble.eclipse/src/java/org/scribble/eclipse/resolutions/MarkerResolutionGenerator.java
   tools/eclipse/trunk/plugins/org.scribble.eclipse/src/java/org/scribble/eclipse/util/
   tools/eclipse/trunk/plugins/org.scribble.eclipse/src/java/org/scribble/eclipse/util/ResourceUtil.java
   tools/eclipse/trunk/plugins/org.scribble.experimental.feature/
   tools/eclipse/trunk/plugins/org.scribble.experimental.feature/.project
   tools/eclipse/trunk/plugins/org.scribble.experimental.feature/LICENSE.txt
   tools/eclipse/trunk/plugins/org.scribble.experimental.feature/build.properties
   tools/eclipse/trunk/plugins/org.scribble.experimental.feature/feature.xml
   tools/eclipse/trunk/plugins/org.scribble.expression.xpath/
   tools/eclipse/trunk/plugins/org.scribble.expression.xpath/.classpath
   tools/eclipse/trunk/plugins/org.scribble.expression.xpath/.project
   tools/eclipse/trunk/plugins/org.scribble.expression.xpath/LICENSE.txt
   tools/eclipse/trunk/plugins/org.scribble.expression.xpath/META-INF/
   tools/eclipse/trunk/plugins/org.scribble.expression.xpath/META-INF/MANIFEST.MF
   tools/eclipse/trunk/plugins/org.scribble.expression.xpath/build.properties
   tools/eclipse/trunk/plugins/org.scribble.expression.xpath/classes/
   tools/eclipse/trunk/plugins/org.scribble.expression.xpath/classes/org/
   tools/eclipse/trunk/plugins/org.scribble.expression.xpath/classes/org/scribble/
   tools/eclipse/trunk/plugins/org.scribble.expression.xpath/classes/org/scribble/expression/
   tools/eclipse/trunk/plugins/org.scribble.expression.xpath/classes/org/scribble/expression/xpath/
   tools/eclipse/trunk/plugins/org.scribble.expression.xpath/classes/org/scribble/expression/xpath/export/
   tools/eclipse/trunk/plugins/org.scribble.expression.xpath/classes/org/scribble/expression/xpath/export/text/
   tools/eclipse/trunk/plugins/org.scribble.expression.xpath/classes/org/scribble/expression/xpath/export/text/XPathExpressionTextExportRule.class
   tools/eclipse/trunk/plugins/org.scribble.expression.xpath/classes/org/scribble/expression/xpath/model/
   tools/eclipse/trunk/plugins/org.scribble.expression.xpath/classes/org/scribble/expression/xpath/model/XPathExpression.class
   tools/eclipse/trunk/plugins/org.scribble.expression.xpath/classes/org/scribble/expression/xpath/model/types/
   tools/eclipse/trunk/plugins/org.scribble.expression.xpath/classes/org/scribble/expression/xpath/model/types/XPathExpressionTypeResolverRule.class
   tools/eclipse/trunk/plugins/org.scribble.expression.xpath/classes/org/scribble/expression/xpath/osgi/
   tools/eclipse/trunk/plugins/org.scribble.expression.xpath/classes/org/scribble/expression/xpath/osgi/Activator.class
   tools/eclipse/trunk/plugins/org.scribble.expression.xpath/classes/org/scribble/expression/xpath/validation/
   tools/eclipse/trunk/plugins/org.scribble.expression.xpath/classes/org/scribble/expression/xpath/validation/XPathExpressionValidationRule.class
   tools/eclipse/trunk/plugins/org.scribble.expression.xpath/src/
   tools/eclipse/trunk/plugins/org.scribble.expression.xpath/src/java/
   tools/eclipse/trunk/plugins/org.scribble.expression.xpath/src/java/org/
   tools/eclipse/trunk/plugins/org.scribble.expression.xpath/src/java/org/scribble/
   tools/eclipse/trunk/plugins/org.scribble.expression.xpath/src/java/org/scribble/expression/
   tools/eclipse/trunk/plugins/org.scribble.expression.xpath/src/java/org/scribble/expression/xpath/
   tools/eclipse/trunk/plugins/org.scribble.expression.xpath/src/java/org/scribble/expression/xpath/export/
   tools/eclipse/trunk/plugins/org.scribble.expression.xpath/src/java/org/scribble/expression/xpath/export/text/
   tools/eclipse/trunk/plugins/org.scribble.expression.xpath/src/java/org/scribble/expression/xpath/export/text/XPathExpressionTextExportRule.java
   tools/eclipse/trunk/plugins/org.scribble.expression.xpath/src/java/org/scribble/expression/xpath/model/
   tools/eclipse/trunk/plugins/org.scribble.expression.xpath/src/java/org/scribble/expression/xpath/model/XPathExpression.java
   tools/eclipse/trunk/plugins/org.scribble.expression.xpath/src/java/org/scribble/expression/xpath/model/types/
   tools/eclipse/trunk/plugins/org.scribble.expression.xpath/src/java/org/scribble/expression/xpath/model/types/XPathExpressionTypeResolverRule.java
   tools/eclipse/trunk/plugins/org.scribble.expression.xpath/src/java/org/scribble/expression/xpath/osgi/
   tools/eclipse/trunk/plugins/org.scribble.expression.xpath/src/java/org/scribble/expression/xpath/osgi/Activator.java
   tools/eclipse/trunk/plugins/org.scribble.expression.xpath/src/java/org/scribble/expression/xpath/validation/
   tools/eclipse/trunk/plugins/org.scribble.expression.xpath/src/java/org/scribble/expression/xpath/validation/XPathExpressionValidationRule.java
   tools/eclipse/trunk/plugins/org.scribble.feature/
   tools/eclipse/trunk/plugins/org.scribble.feature/.project
   tools/eclipse/trunk/plugins/org.scribble.feature/LICENSE.txt
   tools/eclipse/trunk/plugins/org.scribble.feature/build.properties
   tools/eclipse/trunk/plugins/org.scribble.feature/feature.xml
   tools/eclipse/trunk/plugins/org.scribble.java.feature/
   tools/eclipse/trunk/plugins/org.scribble.java.feature/.project
   tools/eclipse/trunk/plugins/org.scribble.java.feature/build.properties
   tools/eclipse/trunk/plugins/org.scribble.java.feature/feature.xml
   tools/eclipse/trunk/plugins/org.scribble.lang.comparator/
   tools/eclipse/trunk/plugins/org.scribble.lang.comparator/.classpath
   tools/eclipse/trunk/plugins/org.scribble.lang.comparator/.project
   tools/eclipse/trunk/plugins/org.scribble.lang.comparator/LICENSE.txt
   tools/eclipse/trunk/plugins/org.scribble.lang.comparator/META-INF/
   tools/eclipse/trunk/plugins/org.scribble.lang.comparator/META-INF/MANIFEST.MF
   tools/eclipse/trunk/plugins/org.scribble.lang.comparator/build.properties
   tools/eclipse/trunk/plugins/org.scribble.lang.comparator/classes/
   tools/eclipse/trunk/plugins/org.scribble.lang.comparator/classes/org/
   tools/eclipse/trunk/plugins/org.scribble.lang.comparator/classes/org/scribble/
   tools/eclipse/trunk/plugins/org.scribble.lang.comparator/classes/org/scribble/lang/
   tools/eclipse/trunk/plugins/org.scribble.lang.comparator/classes/org/scribble/lang/comparator/
   tools/eclipse/trunk/plugins/org.scribble.lang.comparator/classes/org/scribble/lang/comparator/LanguageModelComparatorRule.class
   tools/eclipse/trunk/plugins/org.scribble.lang.comparator/classes/org/scribble/lang/comparator/osgi/
   tools/eclipse/trunk/plugins/org.scribble.lang.comparator/classes/org/scribble/lang/comparator/osgi/Activator.class
   tools/eclipse/trunk/plugins/org.scribble.lang.comparator/src/
   tools/eclipse/trunk/plugins/org.scribble.lang.comparator/src/java/
   tools/eclipse/trunk/plugins/org.scribble.lang.comparator/src/java/org/
   tools/eclipse/trunk/plugins/org.scribble.lang.comparator/src/java/org/scribble/
   tools/eclipse/trunk/plugins/org.scribble.lang.comparator/src/java/org/scribble/lang/
   tools/eclipse/trunk/plugins/org.scribble.lang.comparator/src/java/org/scribble/lang/comparator/
   tools/eclipse/trunk/plugins/org.scribble.lang.comparator/src/java/org/scribble/lang/comparator/LanguageModelComparatorRule.java
   tools/eclipse/trunk/plugins/org.scribble.lang.comparator/src/java/org/scribble/lang/comparator/osgi/
   tools/eclipse/trunk/plugins/org.scribble.lang.comparator/src/java/org/scribble/lang/comparator/osgi/Activator.java
   tools/eclipse/trunk/plugins/org.scribble.lang.model/
   tools/eclipse/trunk/plugins/org.scribble.lang.model/.classpath
   tools/eclipse/trunk/plugins/org.scribble.lang.model/.project
   tools/eclipse/trunk/plugins/org.scribble.lang.model/LICENSE.txt
   tools/eclipse/trunk/plugins/org.scribble.lang.model/META-INF/
   tools/eclipse/trunk/plugins/org.scribble.lang.model/META-INF/MANIFEST.MF
   tools/eclipse/trunk/plugins/org.scribble.lang.model/build.properties
   tools/eclipse/trunk/plugins/org.scribble.lang.model/classes/
   tools/eclipse/trunk/plugins/org.scribble.lang.model/classes/org/
   tools/eclipse/trunk/plugins/org.scribble.lang.model/classes/org/scribble/
   tools/eclipse/trunk/plugins/org.scribble.lang.model/classes/org/scribble/lang/
   tools/eclipse/trunk/plugins/org.scribble.lang.model/classes/org/scribble/lang/model/
   tools/eclipse/trunk/plugins/org.scribble.lang.model/classes/org/scribble/lang/model/JavaLanguageModel.class
   tools/eclipse/trunk/plugins/org.scribble.lang.model/classes/org/scribble/lang/model/LanguageModel$1.class
   tools/eclipse/trunk/plugins/org.scribble.lang.model/classes/org/scribble/lang/model/LanguageModel$2.class
   tools/eclipse/trunk/plugins/org.scribble.lang.model/classes/org/scribble/lang/model/LanguageModel.class
   tools/eclipse/trunk/plugins/org.scribble.lang.model/classes/org/scribble/lang/model/osgi/
   tools/eclipse/trunk/plugins/org.scribble.lang.model/classes/org/scribble/lang/model/osgi/Activator.class
   tools/eclipse/trunk/plugins/org.scribble.lang.model/src/
   tools/eclipse/trunk/plugins/org.scribble.lang.model/src/java/
   tools/eclipse/trunk/plugins/org.scribble.lang.model/src/java/org/
   tools/eclipse/trunk/plugins/org.scribble.lang.model/src/java/org/scribble/
   tools/eclipse/trunk/plugins/org.scribble.lang.model/src/java/org/scribble/lang/
   tools/eclipse/trunk/plugins/org.scribble.lang.model/src/java/org/scribble/lang/model/
   tools/eclipse/trunk/plugins/org.scribble.lang.model/src/java/org/scribble/lang/model/JavaLanguageModel.java
   tools/eclipse/trunk/plugins/org.scribble.lang.model/src/java/org/scribble/lang/model/LanguageModel.java
   tools/eclipse/trunk/plugins/org.scribble.lang.model/src/java/org/scribble/lang/model/osgi/
   tools/eclipse/trunk/plugins/org.scribble.lang.model/src/java/org/scribble/lang/model/osgi/Activator.java
   tools/eclipse/trunk/plugins/org.scribble.monitor/
   tools/eclipse/trunk/plugins/org.scribble.monitor/.classpath
   tools/eclipse/trunk/plugins/org.scribble.monitor/.project
   tools/eclipse/trunk/plugins/org.scribble.monitor/Issues.txt
   tools/eclipse/trunk/plugins/org.scribble.monitor/META-INF/
   tools/eclipse/trunk/plugins/org.scribble.monitor/META-INF/MANIFEST.MF
   tools/eclipse/trunk/plugins/org.scribble.monitor/build.properties
   tools/eclipse/trunk/plugins/org.scribble.monitor/classes/
   tools/eclipse/trunk/plugins/org.scribble.monitor/classes/org/
   tools/eclipse/trunk/plugins/org.scribble.monitor/classes/org/scribble/
   tools/eclipse/trunk/plugins/org.scribble.monitor/classes/org/scribble/monitor/
   tools/eclipse/trunk/plugins/org.scribble.monitor/classes/org/scribble/monitor/Conversation.class
   tools/eclipse/trunk/plugins/org.scribble.monitor/classes/org/scribble/monitor/ConversationIdentity.class
   tools/eclipse/trunk/plugins/org.scribble.monitor/classes/org/scribble/monitor/ConversationIdentityType.class
   tools/eclipse/trunk/plugins/org.scribble.monitor/classes/org/scribble/monitor/ConversationListener.class
   tools/eclipse/trunk/plugins/org.scribble.monitor/classes/org/scribble/monitor/ConversationManager.class
   tools/eclipse/trunk/plugins/org.scribble.monitor/classes/org/scribble/monitor/ConversationTypeName.class
   tools/eclipse/trunk/plugins/org.scribble.monitor/classes/org/scribble/monitor/ConversationTypeRepository.class
   tools/eclipse/trunk/plugins/org.scribble.monitor/classes/org/scribble/monitor/InvokedConversationFinishedEvent.class
   tools/eclipse/trunk/plugins/org.scribble.monitor/classes/org/scribble/monitor/Message.class
   tools/eclipse/trunk/plugins/org.scribble.monitor/classes/org/scribble/monitor/MessageSignature.class
   tools/eclipse/trunk/plugins/org.scribble.monitor/classes/org/scribble/monitor/Monitor.class
   tools/eclipse/trunk/plugins/org.scribble.monitor/classes/org/scribble/monitor/MonitorContext.class
   tools/eclipse/trunk/plugins/org.scribble.monitor/classes/org/scribble/monitor/MonitorEvent.class
   tools/eclipse/trunk/plugins/org.scribble.monitor/classes/org/scribble/monitor/MonitorException.class
   tools/eclipse/trunk/plugins/org.scribble.monitor/classes/org/scribble/monitor/MonitorFactory.class
   tools/eclipse/trunk/plugins/org.scribble.monitor/classes/org/scribble/monitor/MonitorListener.class
   tools/eclipse/trunk/plugins/org.scribble.monitor/classes/org/scribble/monitor/MonitoringService.class
   tools/eclipse/trunk/plugins/org.scribble.monitor/classes/org/scribble/monitor/Result.class
   tools/eclipse/trunk/plugins/org.scribble.monitor/classes/org/scribble/monitor/expression/
   tools/eclipse/trunk/plugins/org.scribble.monitor/classes/org/scribble/monitor/expression/Expression.class
   tools/eclipse/trunk/plugins/org.scribble.monitor/classes/org/scribble/monitor/expression/ExpressionFactory.class
   tools/eclipse/trunk/plugins/org.scribble.monitor/classes/org/scribble/monitor/expression/Function.class
   tools/eclipse/trunk/plugins/org.scribble.monitor/classes/org/scribble/monitor/expression/FunctionContext.class
   tools/eclipse/trunk/plugins/org.scribble.monitor/classes/org/scribble/monitor/expression/FunctionRegistry.class
   tools/eclipse/trunk/plugins/org.scribble.monitor/classes/org/scribble/monitor/expression/NamespaceResolver.class
   tools/eclipse/trunk/plugins/org.scribble.monitor/classes/org/scribble/monitor/expression/jaxen/
   tools/eclipse/trunk/plugins/org.scribble.monitor/classes/org/scribble/monitor/expression/jaxen/JaxenDOMExpression.class
   tools/eclipse/trunk/plugins/org.scribble.monitor/classes/org/scribble/monitor/expression/jaxen/JaxenDOMExpressionTest$1.class
   tools/eclipse/trunk/plugins/org.scribble.monitor/classes/org/scribble/monitor/expression/jaxen/JaxenDOMExpressionTest.class
   tools/eclipse/trunk/plugins/org.scribble.monitor/classes/org/scribble/monitor/expression/jaxen/JaxenDOMVariableContextImpl.class
   tools/eclipse/trunk/plugins/org.scribble.monitor/classes/org/scribble/monitor/expression/jaxen/JaxenFunctionContextImpl$FunctionProxy.class
   tools/eclipse/trunk/plugins/org.scribble.monitor/classes/org/scribble/monitor/expression/jaxen/JaxenFunctionContextImpl.class
   tools/eclipse/trunk/plugins/org.scribble.monitor/classes/org/scribble/monitor/expression/jaxen/JaxenJavaBeanExpression.class
   tools/eclipse/trunk/plugins/org.scribble.monitor/classes/org/scribble/monitor/expression/jaxen/JaxenJavaBeanExpressionTest$1.class
   tools/eclipse/trunk/plugins/org.scribble.monitor/classes/org/scribble/monitor/expression/jaxen/JaxenJavaBeanExpressionTest$Main.class
   tools/eclipse/trunk/plugins/org.scribble.monitor/classes/org/scribble/monitor/expression/jaxen/JaxenJavaBeanExpressionTest$Sub.class
   tools/eclipse/trunk/plugins/org.scribble.monitor/classes/org/scribble/monitor/expression/jaxen/JaxenJavaBeanExpressionTest.class
   tools/eclipse/trunk/plugins/org.scribble.monitor/classes/org/scribble/monitor/expression/jaxen/JaxenJavaBeanVariableContextImpl.class
   tools/eclipse/trunk/plugins/org.scribble.monitor/classes/org/scribble/monitor/expression/jaxen/NamespaceContextImpl.class
   tools/eclipse/trunk/plugins/org.scribble.monitor/classes/org/scribble/monitor/expression/xalan/
   tools/eclipse/trunk/plugins/org.scribble.monitor/classes/org/scribble/monitor/expression/xalan/XalanDOMExpression.class
   tools/eclipse/trunk/plugins/org.scribble.monitor/classes/org/scribble/monitor/impl/
   tools/eclipse/trunk/plugins/org.scribble.monitor/classes/org/scribble/monitor/impl/ConversationImpl.class
   tools/eclipse/trunk/plugins/org.scribble.monitor/classes/org/scribble/monitor/impl/ConversationInstanceRef.class
   tools/eclipse/trunk/plugins/org.scribble.monitor/classes/org/scribble/monitor/impl/DefaultConversationManager.class
   tools/eclipse/trunk/plugins/org.scribble.monitor/classes/org/scribble/monitor/impl/DefaultConversationTypeRepository.class
   tools/eclipse/trunk/plugins/org.scribble.monitor/classes/org/scribble/monitor/impl/DefaultMonitor.class
   tools/eclipse/trunk/plugins/org.scribble.monitor/classes/org/scribble/monitor/impl/DefaultMonitorContext.class
   tools/eclipse/trunk/plugins/org.scribble.monitor/classes/org/scribble/monitor/impl/Scope.class
   tools/eclipse/trunk/plugins/org.scribble.monitor/classes/org/scribble/monitor/model/
   tools/eclipse/trunk/plugins/org.scribble.monitor/classes/org/scribble/monitor/model/ChoiceNode.class
   tools/eclipse/trunk/plugins/org.scribble.monitor/classes/org/scribble/monitor/model/ConditionalNode.class
   tools/eclipse/trunk/plugins/org.scribble.monitor/classes/org/scribble/monitor/model/ConversationContext.class
   tools/eclipse/trunk/plugins/org.scribble.monitor/classes/org/scribble/monitor/model/ConversationType.class
   tools/eclipse/trunk/plugins/org.scribble.monitor/classes/org/scribble/monitor/model/MessageBasedNode.class
   tools/eclipse/trunk/plugins/org.scribble.monitor/classes/org/scribble/monitor/model/MonitorNode.class
   tools/eclipse/trunk/plugins/org.scribble.monitor/classes/org/scribble/monitor/model/ParallelNode.class
   tools/eclipse/trunk/plugins/org.scribble.monitor/classes/org/scribble/monitor/model/ReceiveNode.class
   tools/eclipse/trunk/plugins/org.scribble.monitor/classes/org/scribble/monitor/model/RecordActivity.class
   tools/eclipse/trunk/plugins/org.scribble.monitor/classes/org/scribble/monitor/model/RunNode.class
   tools/eclipse/trunk/plugins/org.scribble.monitor/classes/org/scribble/monitor/model/SendNode.class
   tools/eclipse/trunk/plugins/org.scribble.monitor/classes/org/scribble/monitor/model/SequenceNode.class
   tools/eclipse/trunk/plugins/org.scribble.monitor/classes/org/scribble/monitor/model/SpawnNode.class
   tools/eclipse/trunk/plugins/org.scribble.monitor/classes/org/scribble/monitor/osgi/
   tools/eclipse/trunk/plugins/org.scribble.monitor/classes/org/scribble/monitor/osgi/Activator.class
   tools/eclipse/trunk/plugins/org.scribble.monitor/classes/performance/
   tools/eclipse/trunk/plugins/org.scribble.monitor/classes/performance/PerformanceTests$PerformanceTestCase.class
   tools/eclipse/trunk/plugins/org.scribble.monitor/classes/performance/PerformanceTests.class
   tools/eclipse/trunk/plugins/org.scribble.monitor/classes/performance/expressions/
   tools/eclipse/trunk/plugins/org.scribble.monitor/classes/performance/expressions/JaxenExpressionTest$Main.class
   tools/eclipse/trunk/plugins/org.scribble.monitor/classes/performance/expressions/JaxenExpressionTest$Sub.class
   tools/eclipse/trunk/plugins/org.scribble.monitor/classes/performance/expressions/JaxenExpressionTest.class
   tools/eclipse/trunk/plugins/org.scribble.monitor/classes/performance/monitor/
   tools/eclipse/trunk/plugins/org.scribble.monitor/classes/performance/monitor/DynaTest$Broker.class
   tools/eclipse/trunk/plugins/org.scribble.monitor/classes/performance/monitor/DynaTest$BrokerImpl.class
   tools/eclipse/trunk/plugins/org.scribble.monitor/classes/performance/monitor/DynaTest$BrokerProxy.class
   tools/eclipse/trunk/plugins/org.scribble.monitor/classes/performance/monitor/DynaTest$BuyConfirmed.class
   tools/eclipse/trunk/plugins/org.scribble.monitor/classes/performance/monitor/DynaTest$BuyFailed.class
   tools/eclipse/trunk/plugins/org.scribble.monitor/classes/performance/monitor/DynaTest$BuyRequest.class
   tools/eclipse/trunk/plugins/org.scribble.monitor/classes/performance/monitor/DynaTest$CreditAgency.class
   tools/eclipse/trunk/plugins/org.scribble.monitor/classes/performance/monitor/DynaTest$CreditAgencyImpl.class
   tools/eclipse/trunk/plugins/org.scribble.monitor/classes/performance/monitor/DynaTest$CreditAgencyProxy.class
   tools/eclipse/trunk/plugins/org.scribble.monitor/classes/performance/monitor/DynaTest$CreditCheck.class
   tools/eclipse/trunk/plugins/org.scribble.monitor/classes/performance/monitor/DynaTest$CreditInvalid.class
   tools/eclipse/trunk/plugins/org.scribble.monitor/classes/performance/monitor/DynaTest$CreditValid.class
   tools/eclipse/trunk/plugins/org.scribble.monitor/classes/performance/monitor/DynaTest$InboundMonitorProxy.class
   tools/eclipse/trunk/plugins/org.scribble.monitor/classes/performance/monitor/DynaTest$OrderConfirmed.class
   tools/eclipse/trunk/plugins/org.scribble.monitor/classes/performance/monitor/DynaTest$OrderRequest.class
   tools/eclipse/trunk/plugins/org.scribble.monitor/classes/performance/monitor/DynaTest$OutOfStock.class
   tools/eclipse/trunk/plugins/org.scribble.monitor/classes/performance/monitor/DynaTest$OutboundMonitorProxy.class
   tools/eclipse/trunk/plugins/org.scribble.monitor/classes/performance/monitor/DynaTest$Supplier.class
   tools/eclipse/trunk/plugins/org.scribble.monitor/classes/performance/monitor/DynaTest$SupplierImpl.class
   tools/eclipse/trunk/plugins/org.scribble.monitor/classes/performance/monitor/DynaTest$SupplierProxy.class
   tools/eclipse/trunk/plugins/org.scribble.monitor/classes/performance/monitor/DynaTest.class
   tools/eclipse/trunk/plugins/org.scribble.monitor/classes/performance/monitor/MonitorTestCase.class
   tools/eclipse/trunk/plugins/org.scribble.monitor/classes/performance/monitor/MonitorTestCase1.class
   tools/eclipse/trunk/plugins/org.scribble.monitor/classes/performance/monitor/MonitorTestCase2.class
   tools/eclipse/trunk/plugins/org.scribble.monitor/classes/performance/monitor/MonitorTestCase3.class
   tools/eclipse/trunk/plugins/org.scribble.monitor/classes/performance/monitor/MonitorTestCase4.class
   tools/eclipse/trunk/plugins/org.scribble.monitor/classes/performance/monitor/MonitorTestCase5.class
   tools/eclipse/trunk/plugins/org.scribble.monitor/classes/performance/monitor/MonitorTestCase6.class
   tools/eclipse/trunk/plugins/org.scribble.monitor/classes/performance/monitor/TestData.class
   tools/eclipse/trunk/plugins/org.scribble.monitor/classes/performance/monitor/TestMonitor$1.class
   tools/eclipse/trunk/plugins/org.scribble.monitor/classes/performance/monitor/TestMonitor$DummyMonitor.class
   tools/eclipse/trunk/plugins/org.scribble.monitor/classes/performance/monitor/TestMonitor.class
   tools/eclipse/trunk/plugins/org.scribble.monitor/src/
   tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/
   tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/
   tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/
   tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/
   tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/Conversation.java
   tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/ConversationIdentity.java
   tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/ConversationIdentityType.java
   tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/ConversationListener.java
   tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/ConversationManager.java
   tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/ConversationTypeName.java
   tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/ConversationTypeRepository.java
   tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/InvokedConversationFinishedEvent.java
   tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/Message.java
   tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/MessageSignature.java
   tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/Monitor.java
   tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/MonitorContext.java
   tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/MonitorEvent.java
   tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/MonitorException.java
   tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/MonitorFactory.java
   tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/MonitorListener.java
   tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/MonitoringService.java
   tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/Result.java
   tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/expression/
   tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/expression/Expression.java
   tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/expression/ExpressionFactory.java
   tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/expression/Function.java
   tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/expression/FunctionContext.java
   tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/expression/FunctionRegistry.java
   tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/expression/NamespaceResolver.java
   tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/expression/jaxen/
   tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/expression/jaxen/JaxenDOMExpression.java
   tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/expression/jaxen/JaxenDOMVariableContextImpl.java
   tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/expression/jaxen/JaxenFunctionContextImpl.java
   tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/expression/jaxen/JaxenJavaBeanExpression.java
   tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/expression/jaxen/JaxenJavaBeanVariableContextImpl.java
   tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/expression/jaxen/NamespaceContextImpl.java
   tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/expression/xalan/
   tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/expression/xalan/XalanDOMExpression.java
   tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/impl/
   tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/impl/ConversationImpl.java
   tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/impl/ConversationInstanceRef.java
   tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/impl/DefaultConversationManager.java
   tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/impl/DefaultConversationTypeRepository.java
   tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/impl/DefaultMonitor.java
   tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/impl/DefaultMonitorContext.java
   tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/impl/Scope.java
   tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/model/
   tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/model/ChoiceNode.java
   tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/model/ConditionalNode.java
   tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/model/ConversationContext.java
   tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/model/ConversationType.java
   tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/model/MessageBasedNode.java
   tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/model/MonitorNode.java
   tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/model/ParallelNode.java
   tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/model/ReceiveNode.java
   tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/model/RecordActivity.java
   tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/model/RunNode.java
   tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/model/SendNode.java
   tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/model/SequenceNode.java
   tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/model/SpawnNode.java
   tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/osgi/
   tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/osgi/Activator.java
   tools/eclipse/trunk/plugins/org.scribble.monitor/src/lib/
   tools/eclipse/trunk/plugins/org.scribble.monitor/src/lib/jaxen-1.1.1.jar
   tools/eclipse/trunk/plugins/org.scribble.monitor/src/perftest/
   tools/eclipse/trunk/plugins/org.scribble.monitor/src/perftest/performance/
   tools/eclipse/trunk/plugins/org.scribble.monitor/src/perftest/performance/PerformanceTests.java
   tools/eclipse/trunk/plugins/org.scribble.monitor/src/perftest/performance/expressions/
   tools/eclipse/trunk/plugins/org.scribble.monitor/src/perftest/performance/expressions/JaxenExpressionTest.java
   tools/eclipse/trunk/plugins/org.scribble.monitor/src/perftest/performance/monitor/
   tools/eclipse/trunk/plugins/org.scribble.monitor/src/perftest/performance/monitor/DynaTest.java
   tools/eclipse/trunk/plugins/org.scribble.monitor/src/perftest/performance/monitor/MonitorTestCase.java
   tools/eclipse/trunk/plugins/org.scribble.monitor/src/perftest/performance/monitor/MonitorTestCase1.java
   tools/eclipse/trunk/plugins/org.scribble.monitor/src/perftest/performance/monitor/MonitorTestCase2.java
   tools/eclipse/trunk/plugins/org.scribble.monitor/src/perftest/performance/monitor/MonitorTestCase3.java
   tools/eclipse/trunk/plugins/org.scribble.monitor/src/perftest/performance/monitor/MonitorTestCase4.java
   tools/eclipse/trunk/plugins/org.scribble.monitor/src/perftest/performance/monitor/MonitorTestCase5.java
   tools/eclipse/trunk/plugins/org.scribble.monitor/src/perftest/performance/monitor/MonitorTestCase6.java
   tools/eclipse/trunk/plugins/org.scribble.monitor/src/perftest/performance/monitor/TestData.java
   tools/eclipse/trunk/plugins/org.scribble.monitor/src/perftest/performance/monitor/TestMonitor.java
   tools/eclipse/trunk/plugins/org.scribble.monitor/src/test/
   tools/eclipse/trunk/plugins/org.scribble.monitor/src/test/org/
   tools/eclipse/trunk/plugins/org.scribble.monitor/src/test/org/scribble/
   tools/eclipse/trunk/plugins/org.scribble.monitor/src/test/org/scribble/monitor/
   tools/eclipse/trunk/plugins/org.scribble.monitor/src/test/org/scribble/monitor/expression/
   tools/eclipse/trunk/plugins/org.scribble.monitor/src/test/org/scribble/monitor/expression/jaxen/
   tools/eclipse/trunk/plugins/org.scribble.monitor/src/test/org/scribble/monitor/expression/jaxen/JaxenDOMExpressionTest.java
   tools/eclipse/trunk/plugins/org.scribble.monitor/src/test/org/scribble/monitor/expression/jaxen/JaxenJavaBeanExpressionTest.java
   tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/
   tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/.classpath
   tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/.project
   tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/META-INF/
   tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/META-INF/MANIFEST.MF
   tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/build.properties
   tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/classes/
   tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/classes/org/
   tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/classes/org/scribble/
   tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/classes/org/scribble/pi4soa/
   tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/classes/org/scribble/pi4soa/cdm/
   tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/classes/org/scribble/pi4soa/cdm/CDMDefinitions.class
   tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/classes/org/scribble/pi4soa/cdm/editor/
   tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/classes/org/scribble/pi4soa/cdm/editor/CDMEditorManager.class
   tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/classes/org/scribble/pi4soa/cdm/model/
   tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/classes/org/scribble/pi4soa/cdm/model/CDMNotation.class
   tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/classes/org/scribble/pi4soa/cdm/osgi/
   tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/classes/org/scribble/pi4soa/cdm/osgi/Activator.class
   tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/classes/org/scribble/pi4soa/cdm/parser/
   tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/classes/org/scribble/pi4soa/cdm/parser/CDMModelParserRule.class
   tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/classes/org/scribble/pi4soa/cdm/parser/CDMTokenizer.class
   tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/classes/org/scribble/pi4soa/cdm/parser/rules/
   tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/classes/org/scribble/pi4soa/cdm/parser/rules/AssignConverterRuleImpl.class
   tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/classes/org/scribble/pi4soa/cdm/parser/rules/ConversationConverterRuleImpl$1.class
   tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/classes/org/scribble/pi4soa/cdm/parser/rules/ConversationConverterRuleImpl$InterfaceVisitorImpl.class
   tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/classes/org/scribble/pi4soa/cdm/parser/rules/ConversationConverterRuleImpl.class
   tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/classes/org/scribble/pi4soa/cdm/parser/rules/ConversationInteractionConverterRuleImpl.class
   tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/classes/org/scribble/pi4soa/cdm/parser/rules/ConversationModelConverterRuleImpl.class
   tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/classes/org/scribble/pi4soa/cdm/parser/rules/ConverterContext.class
   tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/classes/org/scribble/pi4soa/cdm/parser/rules/ConverterRule.class
   tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/classes/org/scribble/pi4soa/cdm/parser/rules/ConverterRuleFactory.class
   tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/classes/org/scribble/pi4soa/cdm/parser/rules/ConverterUtil.class
   tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/classes/org/scribble/pi4soa/cdm/parser/rules/DefaultConverterContext.class
   tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/classes/org/scribble/pi4soa/cdm/parser/rules/FinalizeConverterRuleImpl.class
   tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/classes/org/scribble/pi4soa/cdm/parser/rules/FinalizerHandlerConverterRuleImpl$1.class
   tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/classes/org/scribble/pi4soa/cdm/parser/rules/FinalizerHandlerConverterRuleImpl.class
   tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/classes/org/scribble/pi4soa/cdm/parser/rules/IfConverterRuleImpl.class
   tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/classes/org/scribble/pi4soa/cdm/parser/rules/IfOrWhenConverterRuleImpl.class
   tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/classes/org/scribble/pi4soa/cdm/parser/rules/ParallelConverterRuleImpl.class
   tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/classes/org/scribble/pi4soa/cdm/parser/rules/PerformConverterRuleImpl.class
   tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/classes/org/scribble/pi4soa/cdm/parser/rules/SequenceConverterRuleImpl.class
   tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/classes/org/scribble/pi4soa/cdm/parser/rules/WhenConverterRuleImpl.class
   tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/classes/org/scribble/pi4soa/cdm/parser/rules/WhileConverterRuleImpl.class
   tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/classes/org/scribble/pi4soa/cdm/validation/
   tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/classes/org/scribble/pi4soa/cdm/validation/TypeReferenceValidationRule.class
   tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/src/
   tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/src/java/
   tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/src/java/org/
   tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/src/java/org/scribble/
   tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/src/java/org/scribble/pi4soa/
   tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/src/java/org/scribble/pi4soa/cdm/
   tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/src/java/org/scribble/pi4soa/cdm/CDMDefinitions.java
   tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/src/java/org/scribble/pi4soa/cdm/editor/
   tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/src/java/org/scribble/pi4soa/cdm/editor/CDMEditorManager.java
   tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/src/java/org/scribble/pi4soa/cdm/model/
   tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/src/java/org/scribble/pi4soa/cdm/model/CDMNotation.java
   tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/src/java/org/scribble/pi4soa/cdm/osgi/
   tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/src/java/org/scribble/pi4soa/cdm/osgi/Activator.java
   tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/src/java/org/scribble/pi4soa/cdm/parser/
   tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/src/java/org/scribble/pi4soa/cdm/parser/CDMModelParserRule.java
   tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/src/java/org/scribble/pi4soa/cdm/parser/CDMTokenizer.java
   tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/src/java/org/scribble/pi4soa/cdm/parser/rules/
   tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/src/java/org/scribble/pi4soa/cdm/parser/rules/AssignConverterRuleImpl.java
   tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/src/java/org/scribble/pi4soa/cdm/parser/rules/ConversationConverterRuleImpl.java
   tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/src/java/org/scribble/pi4soa/cdm/parser/rules/ConversationInteractionConverterRuleImpl.java
   tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/src/java/org/scribble/pi4soa/cdm/parser/rules/ConversationModelConverterRuleImpl.java
   tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/src/java/org/scribble/pi4soa/cdm/parser/rules/ConverterContext.java
   tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/src/java/org/scribble/pi4soa/cdm/parser/rules/ConverterRule.java
   tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/src/java/org/scribble/pi4soa/cdm/parser/rules/ConverterRuleFactory.java
   tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/src/java/org/scribble/pi4soa/cdm/parser/rules/ConverterUtil.java
   tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/src/java/org/scribble/pi4soa/cdm/parser/rules/DefaultConverterContext.java
   tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/src/java/org/scribble/pi4soa/cdm/parser/rules/FinalizeConverterRuleImpl.java
   tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/src/java/org/scribble/pi4soa/cdm/parser/rules/FinalizerHandlerConverterRuleImpl.java
   tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/src/java/org/scribble/pi4soa/cdm/parser/rules/IfConverterRuleImpl.java
   tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/src/java/org/scribble/pi4soa/cdm/parser/rules/IfOrWhenConverterRuleImpl.java
   tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/src/java/org/scribble/pi4soa/cdm/parser/rules/ParallelConverterRuleImpl.java
   tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/src/java/org/scribble/pi4soa/cdm/parser/rules/PerformConverterRuleImpl.java
   tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/src/java/org/scribble/pi4soa/cdm/parser/rules/SequenceConverterRuleImpl.java
   tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/src/java/org/scribble/pi4soa/cdm/parser/rules/WhenConverterRuleImpl.java
   tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/src/java/org/scribble/pi4soa/cdm/parser/rules/WhileConverterRuleImpl.java
   tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/src/java/org/scribble/pi4soa/cdm/validation/
   tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/src/java/org/scribble/pi4soa/cdm/validation/TypeReferenceValidationRule.java
   tools/eclipse/trunk/plugins/org.scribble.pi4soa.feature/
   tools/eclipse/trunk/plugins/org.scribble.pi4soa.feature/.project
   tools/eclipse/trunk/plugins/org.scribble.pi4soa.feature/LICENSE.txt
   tools/eclipse/trunk/plugins/org.scribble.pi4soa.feature/build.properties
   tools/eclipse/trunk/plugins/org.scribble.pi4soa.feature/feature.xml
   tools/eclipse/trunk/plugins/org.scribble.protocol.comparator/
   tools/eclipse/trunk/plugins/org.scribble.protocol.comparator/.classpath
   tools/eclipse/trunk/plugins/org.scribble.protocol.comparator/.project
   tools/eclipse/trunk/plugins/org.scribble.protocol.comparator/LICENSE.txt
   tools/eclipse/trunk/plugins/org.scribble.protocol.comparator/META-INF/
   tools/eclipse/trunk/plugins/org.scribble.protocol.comparator/META-INF/MANIFEST.MF
   tools/eclipse/trunk/plugins/org.scribble.protocol.comparator/build.properties
   tools/eclipse/trunk/plugins/org.scribble.protocol.comparator/classes/
   tools/eclipse/trunk/plugins/org.scribble.protocol.comparator/classes/org/
   tools/eclipse/trunk/plugins/org.scribble.protocol.comparator/classes/org/scribble/
   tools/eclipse/trunk/plugins/org.scribble.protocol.comparator/classes/org/scribble/protocol/
   tools/eclipse/trunk/plugins/org.scribble.protocol.comparator/classes/org/scribble/protocol/comparator/
   tools/eclipse/trunk/plugins/org.scribble.protocol.comparator/classes/org/scribble/protocol/comparator/CatchBlockComparatorRule.class
   tools/eclipse/trunk/plugins/org.scribble.protocol.comparator/classes/org/scribble/protocol/comparator/ChoiceComparatorRule.class
   tools/eclipse/trunk/plugins/org.scribble.protocol.comparator/classes/org/scribble/protocol/comparator/InterruptBlockComparatorRule.class
   tools/eclipse/trunk/plugins/org.scribble.protocol.comparator/classes/org/scribble/protocol/comparator/Messages.properties
   tools/eclipse/trunk/plugins/org.scribble.protocol.comparator/classes/org/scribble/protocol/comparator/ParallelComparatorRule.class
   tools/eclipse/trunk/plugins/org.scribble.protocol.comparator/classes/org/scribble/protocol/comparator/ProtocolComparatorRule.class
   tools/eclipse/trunk/plugins/org.scribble.protocol.comparator/classes/org/scribble/protocol/comparator/ProtocolComparatorRuleTest.class
   tools/eclipse/trunk/plugins/org.scribble.protocol.comparator/classes/org/scribble/protocol/comparator/RaiseComparatorRule.class
   tools/eclipse/trunk/plugins/org.scribble.protocol.comparator/classes/org/scribble/protocol/comparator/SpawnComparatorRule.class
   tools/eclipse/trunk/plugins/org.scribble.protocol.comparator/classes/org/scribble/protocol/comparator/TryEscapeComparatorRule.class
   tools/eclipse/trunk/plugins/org.scribble.protocol.comparator/classes/org/scribble/protocol/comparator/osgi/
   tools/eclipse/trunk/plugins/org.scribble.protocol.comparator/classes/org/scribble/protocol/comparator/osgi/Activator.class
   tools/eclipse/trunk/plugins/org.scribble.protocol.comparator/src/
   tools/eclipse/trunk/plugins/org.scribble.protocol.comparator/src/java/
   tools/eclipse/trunk/plugins/org.scribble.protocol.comparator/src/java/org/
   tools/eclipse/trunk/plugins/org.scribble.protocol.comparator/src/java/org/scribble/
   tools/eclipse/trunk/plugins/org.scribble.protocol.comparator/src/java/org/scribble/protocol/
   tools/eclipse/trunk/plugins/org.scribble.protocol.comparator/src/java/org/scribble/protocol/comparator/
   tools/eclipse/trunk/plugins/org.scribble.protocol.comparator/src/java/org/scribble/protocol/comparator/CatchBlockComparatorRule.java
   tools/eclipse/trunk/plugins/org.scribble.protocol.comparator/src/java/org/scribble/protocol/comparator/ChoiceComparatorRule.java
   tools/eclipse/trunk/plugins/org.scribble.protocol.comparator/src/java/org/scribble/protocol/comparator/InterruptBlockComparatorRule.java
   tools/eclipse/trunk/plugins/org.scribble.protocol.comparator/src/java/org/scribble/protocol/comparator/Messages.properties
   tools/eclipse/trunk/plugins/org.scribble.protocol.comparator/src/java/org/scribble/protocol/comparator/ParallelComparatorRule.java
   tools/eclipse/trunk/plugins/org.scribble.protocol.comparator/src/java/org/scribble/protocol/comparator/ProtocolComparatorRule.java
   tools/eclipse/trunk/plugins/org.scribble.protocol.comparator/src/java/org/scribble/protocol/comparator/RaiseComparatorRule.java
   tools/eclipse/trunk/plugins/org.scribble.protocol.comparator/src/java/org/scribble/protocol/comparator/SpawnComparatorRule.java
   tools/eclipse/trunk/plugins/org.scribble.protocol.comparator/src/java/org/scribble/protocol/comparator/TryEscapeComparatorRule.java
   tools/eclipse/trunk/plugins/org.scribble.protocol.comparator/src/java/org/scribble/protocol/comparator/osgi/
   tools/eclipse/trunk/plugins/org.scribble.protocol.comparator/src/java/org/scribble/protocol/comparator/osgi/Activator.java
   tools/eclipse/trunk/plugins/org.scribble.protocol.comparator/src/test/
   tools/eclipse/trunk/plugins/org.scribble.protocol.comparator/src/test/org/
   tools/eclipse/trunk/plugins/org.scribble.protocol.comparator/src/test/org/scribble/
   tools/eclipse/trunk/plugins/org.scribble.protocol.comparator/src/test/org/scribble/protocol/
   tools/eclipse/trunk/plugins/org.scribble.protocol.comparator/src/test/org/scribble/protocol/comparator/
   tools/eclipse/trunk/plugins/org.scribble.protocol.comparator/src/test/org/scribble/protocol/comparator/ProtocolComparatorRuleTest.java
   tools/eclipse/trunk/plugins/org.scribble.protocol.eclipse/
   tools/eclipse/trunk/plugins/org.scribble.protocol.eclipse/.classpath
   tools/eclipse/trunk/plugins/org.scribble.protocol.eclipse/.project
   tools/eclipse/trunk/plugins/org.scribble.protocol.eclipse/LICENSE.txt
   tools/eclipse/trunk/plugins/org.scribble.protocol.eclipse/META-INF/
   tools/eclipse/trunk/plugins/org.scribble.protocol.eclipse/META-INF/MANIFEST.MF
   tools/eclipse/trunk/plugins/org.scribble.protocol.eclipse/build.properties
   tools/eclipse/trunk/plugins/org.scribble.protocol.eclipse/classes/
   tools/eclipse/trunk/plugins/org.scribble.protocol.eclipse/classes/org/
   tools/eclipse/trunk/plugins/org.scribble.protocol.eclipse/classes/org/scribble/
   tools/eclipse/trunk/plugins/org.scribble.protocol.eclipse/classes/org/scribble/protocol/
   tools/eclipse/trunk/plugins/org.scribble.protocol.eclipse/classes/org/scribble/protocol/eclipse/
   tools/eclipse/trunk/plugins/org.scribble.protocol.eclipse/classes/org/scribble/protocol/eclipse/Activator.class
   tools/eclipse/trunk/plugins/org.scribble.protocol.eclipse/classes/org/scribble/protocol/eclipse/model/
   tools/eclipse/trunk/plugins/org.scribble.protocol.eclipse/classes/org/scribble/protocol/eclipse/model/images/
   tools/eclipse/trunk/plugins/org.scribble.protocol.eclipse/classes/org/scribble/protocol/eclipse/model/images/ScribbleImages.class
   tools/eclipse/trunk/plugins/org.scribble.protocol.eclipse/classes/org/scribble/protocol/eclipse/model/images/protocol.png
   tools/eclipse/trunk/plugins/org.scribble.protocol.eclipse/classes/org/scribble/protocol/eclipse/model/outliner/
   tools/eclipse/trunk/plugins/org.scribble.protocol.eclipse/classes/org/scribble/protocol/eclipse/model/outliner/ProtocolModelOutlinerRule.class
   tools/eclipse/trunk/plugins/org.scribble.protocol.eclipse/classes/org/scribble/protocol/model/
   tools/eclipse/trunk/plugins/org.scribble.protocol.eclipse/src/
   tools/eclipse/trunk/plugins/org.scribble.protocol.eclipse/src/java/
   tools/eclipse/trunk/plugins/org.scribble.protocol.eclipse/src/java/org/
   tools/eclipse/trunk/plugins/org.scribble.protocol.eclipse/src/java/org/scribble/
   tools/eclipse/trunk/plugins/org.scribble.protocol.eclipse/src/java/org/scribble/protocol/
   tools/eclipse/trunk/plugins/org.scribble.protocol.eclipse/src/java/org/scribble/protocol/eclipse/
   tools/eclipse/trunk/plugins/org.scribble.protocol.eclipse/src/java/org/scribble/protocol/eclipse/Activator.java
   tools/eclipse/trunk/plugins/org.scribble.protocol.eclipse/src/java/org/scribble/protocol/eclipse/model/
   tools/eclipse/trunk/plugins/org.scribble.protocol.eclipse/src/java/org/scribble/protocol/eclipse/model/images/
   tools/eclipse/trunk/plugins/org.scribble.protocol.eclipse/src/java/org/scribble/protocol/eclipse/model/images/ScribbleImages.java
   tools/eclipse/trunk/plugins/org.scribble.protocol.eclipse/src/java/org/scribble/protocol/eclipse/model/images/protocol.png
   tools/eclipse/trunk/plugins/org.scribble.protocol.eclipse/src/java/org/scribble/protocol/eclipse/model/outliner/
   tools/eclipse/trunk/plugins/org.scribble.protocol.eclipse/src/java/org/scribble/protocol/eclipse/model/outliner/ProtocolModelOutlinerRule.java
   tools/eclipse/trunk/plugins/org.scribble.protocol.eclipse/src/java/org/scribble/protocol/model/
   tools/eclipse/trunk/plugins/org.scribble.protocol.export.text/
   tools/eclipse/trunk/plugins/org.scribble.protocol.export.text/.classpath
   tools/eclipse/trunk/plugins/org.scribble.protocol.export.text/.project
   tools/eclipse/trunk/plugins/org.scribble.protocol.export.text/LICENSE.txt
   tools/eclipse/trunk/plugins/org.scribble.protocol.export.text/META-INF/
   tools/eclipse/trunk/plugins/org.scribble.protocol.export.text/META-INF/MANIFEST.MF
   tools/eclipse/trunk/plugins/org.scribble.protocol.export.text/build.properties
   tools/eclipse/trunk/plugins/org.scribble.protocol.export.text/classes/
   tools/eclipse/trunk/plugins/org.scribble.protocol.export.text/classes/org/
   tools/eclipse/trunk/plugins/org.scribble.protocol.export.text/classes/org/scribble/
   tools/eclipse/trunk/plugins/org.scribble.protocol.export.text/classes/org/scribble/protocol/
   tools/eclipse/trunk/plugins/org.scribble.protocol.export.text/classes/org/scribble/protocol/export/
   tools/eclipse/trunk/plugins/org.scribble.protocol.export.text/classes/org/scribble/protocol/export/text/
   tools/eclipse/trunk/plugins/org.scribble.protocol.export.text/classes/org/scribble/protocol/export/text/CatchBlockTextExportRule.class
   tools/eclipse/trunk/plugins/org.scribble.protocol.export.text/classes/org/scribble/protocol/export/text/ChoiceTextExportRule.class
   tools/eclipse/trunk/plugins/org.scribble.protocol.export.text/classes/org/scribble/protocol/export/text/InterruptBlockTextExportRule.class
   tools/eclipse/trunk/plugins/org.scribble.protocol.export.text/classes/org/scribble/protocol/export/text/ParallelTextExportRule.class
   tools/eclipse/trunk/plugins/org.scribble.protocol.export.text/classes/org/scribble/protocol/export/text/ProtocolModelTextExportRule.class
   tools/eclipse/trunk/plugins/org.scribble.protocol.export.text/classes/org/scribble/protocol/export/text/ProtocolReferenceTextExportRule.class
   tools/eclipse/trunk/plugins/org.scribble.protocol.export.text/classes/org/scribble/protocol/export/text/ProtocolTextExportRule.class
   tools/eclipse/trunk/plugins/org.scribble.protocol.export.text/classes/org/scribble/protocol/export/text/RaiseTextExportRule.class
   tools/eclipse/trunk/plugins/org.scribble.protocol.export.text/classes/org/scribble/protocol/export/text/RecurTextExportRule.class
   tools/eclipse/trunk/plugins/org.scribble.protocol.export.text/classes/org/scribble/protocol/export/text/RecursionBlockTextExportRule.class
   tools/eclipse/trunk/plugins/org.scribble.protocol.export.text/classes/org/scribble/protocol/export/text/RepeatTextExportRule.class
   tools/eclipse/trunk/plugins/org.scribble.protocol.export.text/classes/org/scribble/protocol/export/text/RunTextExportRule.class
   tools/eclipse/trunk/plugins/org.scribble.protocol.export.text/classes/org/scribble/protocol/export/text/TryEscapeTextExportRule.class
   tools/eclipse/trunk/plugins/org.scribble.protocol.export.text/classes/org/scribble/protocol/export/text/osgi/
   tools/eclipse/trunk/plugins/org.scribble.protocol.export.text/classes/org/scribble/protocol/export/text/osgi/Activator.class
   tools/eclipse/trunk/plugins/org.scribble.protocol.export.text/src/
   tools/eclipse/trunk/plugins/org.scribble.protocol.export.text/src/java/
   tools/eclipse/trunk/plugins/org.scribble.protocol.export.text/src/java/org/
   tools/eclipse/trunk/plugins/org.scribble.protocol.export.text/src/java/org/scribble/
   tools/eclipse/trunk/plugins/org.scribble.protocol.export.text/src/java/org/scribble/protocol/
   tools/eclipse/trunk/plugins/org.scribble.protocol.export.text/src/java/org/scribble/protocol/export/
   tools/eclipse/trunk/plugins/org.scribble.protocol.export.text/src/java/org/scribble/protocol/export/text/
   tools/eclipse/trunk/plugins/org.scribble.protocol.export.text/src/java/org/scribble/protocol/export/text/CatchBlockTextExportRule.java
   tools/eclipse/trunk/plugins/org.scribble.protocol.export.text/src/java/org/scribble/protocol/export/text/ChoiceTextExportRule.java
   tools/eclipse/trunk/plugins/org.scribble.protocol.export.text/src/java/org/scribble/protocol/export/text/InterruptBlockTextExportRule.java
   tools/eclipse/trunk/plugins/org.scribble.protocol.export.text/src/java/org/scribble/protocol/export/text/ParallelTextExportRule.java
   tools/eclipse/trunk/plugins/org.scribble.protocol.export.text/src/java/org/scribble/protocol/export/text/ProtocolModelTextExportRule.java
   tools/eclipse/trunk/plugins/org.scribble.protocol.export.text/src/java/org/scribble/protocol/export/text/ProtocolReferenceTextExportRule.java
   tools/eclipse/trunk/plugins/org.scribble.protocol.export.text/src/java/org/scribble/protocol/export/text/ProtocolTextExportRule.java
   tools/eclipse/trunk/plugins/org.scribble.protocol.export.text/src/java/org/scribble/protocol/export/text/RaiseTextExportRule.java
   tools/eclipse/trunk/plugins/org.scribble.protocol.export.text/src/java/org/scribble/protocol/export/text/RecurTextExportRule.java
   tools/eclipse/trunk/plugins/org.scribble.protocol.export.text/src/java/org/scribble/protocol/export/text/RecursionBlockTextExportRule.java
   tools/eclipse/trunk/plugins/org.scribble.protocol.export.text/src/java/org/scribble/protocol/export/text/RepeatTextExportRule.java
   tools/eclipse/trunk/plugins/org.scribble.protocol.export.text/src/java/org/scribble/protocol/export/text/RunTextExportRule.java
   tools/eclipse/trunk/plugins/org.scribble.protocol.export.text/src/java/org/scribble/protocol/export/text/TryEscapeTextExportRule.java
   tools/eclipse/trunk/plugins/org.scribble.protocol.export.text/src/java/org/scribble/protocol/export/text/osgi/
   tools/eclipse/trunk/plugins/org.scribble.protocol.export.text/src/java/org/scribble/protocol/export/text/osgi/Activator.java
   tools/eclipse/trunk/plugins/org.scribble.protocol.feature/
   tools/eclipse/trunk/plugins/org.scribble.protocol.feature/.project
   tools/eclipse/trunk/plugins/org.scribble.protocol.feature/LICENSE.txt
   tools/eclipse/trunk/plugins/org.scribble.protocol.feature/build.properties
   tools/eclipse/trunk/plugins/org.scribble.protocol.feature/feature.xml
   tools/eclipse/trunk/plugins/org.scribble.protocol.model/
   tools/eclipse/trunk/plugins/org.scribble.protocol.model/.classpath
   tools/eclipse/trunk/plugins/org.scribble.protocol.model/.project
   tools/eclipse/trunk/plugins/org.scribble.protocol.model/LICENSE.txt
   tools/eclipse/trunk/plugins/org.scribble.protocol.model/META-INF/
   tools/eclipse/trunk/plugins/org.scribble.protocol.model/META-INF/MANIFEST.MF
   tools/eclipse/trunk/plugins/org.scribble.protocol.model/build.properties
   tools/eclipse/trunk/plugins/org.scribble.protocol.model/classes/
   tools/eclipse/trunk/plugins/org.scribble.protocol.model/classes/org/
   tools/eclipse/trunk/plugins/org.scribble.protocol.model/classes/org/scribble/
   tools/eclipse/trunk/plugins/org.scribble.protocol.model/classes/org/scribble/protocol/
   tools/eclipse/trunk/plugins/org.scribble.protocol.model/classes/org/scribble/protocol/model/
   tools/eclipse/trunk/plugins/org.scribble.protocol.model/classes/org/scribble/protocol/model/CatchBlock.class
   tools/eclipse/trunk/plugins/org.scribble.protocol.model/classes/org/scribble/protocol/model/Choice.class
   tools/eclipse/trunk/plugins/org.scribble.protocol.model/classes/org/scribble/protocol/model/ChoiceTest$1.class
   tools/eclipse/trunk/plugins/org.scribble.protocol.model/classes/org/scribble/protocol/model/ChoiceTest$2.class
   tools/eclipse/trunk/plugins/org.scribble.protocol.model/classes/org/scribble/protocol/model/ChoiceTest.class
   tools/eclipse/trunk/plugins/org.scribble.protocol.model/classes/org/scribble/protocol/model/Compose.class
   tools/eclipse/trunk/plugins/org.scribble.protocol.model/classes/org/scribble/protocol/model/EscapeBlock.class
   tools/eclipse/trunk/plugins/org.scribble.protocol.model/classes/org/scribble/protocol/model/InterruptBlock.class
   tools/eclipse/trunk/plugins/org.scribble.protocol.model/classes/org/scribble/protocol/model/Parallel.class
   tools/eclipse/trunk/plugins/org.scribble.protocol.model/classes/org/scribble/protocol/model/Protocol.class
   tools/eclipse/trunk/plugins/org.scribble.protocol.model/classes/org/scribble/protocol/model/ProtocolModel$1.class
   tools/eclipse/trunk/plugins/org.scribble.protocol.model/classes/org/scribble/protocol/model/ProtocolModel$2.class
   tools/eclipse/trunk/plugins/org.scribble.protocol.model/classes/org/scribble/protocol/model/ProtocolModel.class
   tools/eclipse/trunk/plugins/org.scribble.protocol.model/classes/org/scribble/protocol/model/ProtocolModelTest.class
   tools/eclipse/trunk/plugins/org.scribble.protocol.model/classes/org/scribble/protocol/model/ProtocolNotation.class
   tools/eclipse/trunk/plugins/org.scribble.protocol.model/classes/org/scribble/protocol/model/ProtocolReference.class
   tools/eclipse/trunk/plugins/org.scribble.protocol.model/classes/org/scribble/protocol/model/Raise.class
   tools/eclipse/trunk/plugins/org.scribble.protocol.model/classes/org/scribble/protocol/model/Recur.class
   tools/eclipse/trunk/plugins/org.scribble.protocol.model/classes/org/scribble/protocol/model/RecursionBlock.class
   tools/eclipse/trunk/plugins/org.scribble.protocol.model/classes/org/scribble/protocol/model/Repeat.class
   tools/eclipse/trunk/plugins/org.scribble.protocol.model/classes/org/scribble/protocol/model/RepeatTest$1.class
   tools/eclipse/trunk/plugins/org.scribble.protocol.model/classes/org/scribble/protocol/model/RepeatTest$2.class
   tools/eclipse/trunk/plugins/org.scribble.protocol.model/classes/org/scribble/protocol/model/RepeatTest.class
   tools/eclipse/trunk/plugins/org.scribble.protocol.model/classes/org/scribble/protocol/model/Run.class
   tools/eclipse/trunk/plugins/org.scribble.protocol.model/classes/org/scribble/protocol/model/Spawn.class
   tools/eclipse/trunk/plugins/org.scribble.protocol.model/classes/org/scribble/protocol/model/TryEscape.class
   tools/eclipse/trunk/plugins/org.scribble.protocol.model/classes/org/scribble/protocol/model/osgi/
   tools/eclipse/trunk/plugins/org.scribble.protocol.model/classes/org/scribble/protocol/model/osgi/Activator.class
   tools/eclipse/trunk/plugins/org.scribble.protocol.model/src/
   tools/eclipse/trunk/plugins/org.scribble.protocol.model/src/java/
   tools/eclipse/trunk/plugins/org.scribble.protocol.model/src/java/org/
   tools/eclipse/trunk/plugins/org.scribble.protocol.model/src/java/org/scribble/
   tools/eclipse/trunk/plugins/org.scribble.protocol.model/src/java/org/scribble/protocol/
   tools/eclipse/trunk/plugins/org.scribble.protocol.model/src/java/org/scribble/protocol/model/
   tools/eclipse/trunk/plugins/org.scribble.protocol.model/src/java/org/scribble/protocol/model/CatchBlock.java
   tools/eclipse/trunk/plugins/org.scribble.protocol.model/src/java/org/scribble/protocol/model/Choice.java
   tools/eclipse/trunk/plugins/org.scribble.protocol.model/src/java/org/scribble/protocol/model/Compose.java
   tools/eclipse/trunk/plugins/org.scribble.protocol.model/src/java/org/scribble/protocol/model/EscapeBlock.java
   tools/eclipse/trunk/plugins/org.scribble.protocol.model/src/java/org/scribble/protocol/model/InterruptBlock.java
   tools/eclipse/trunk/plugins/org.scribble.protocol.model/src/java/org/scribble/protocol/model/Parallel.java
   tools/eclipse/trunk/plugins/org.scribble.protocol.model/src/java/org/scribble/protocol/model/Protocol.java
   tools/eclipse/trunk/plugins/org.scribble.protocol.model/src/java/org/scribble/protocol/model/ProtocolModel.java
   tools/eclipse/trunk/plugins/org.scribble.protocol.model/src/java/org/scribble/protocol/model/ProtocolNotation.java
   tools/eclipse/trunk/plugins/org.scribble.protocol.model/src/java/org/scribble/protocol/model/ProtocolReference.java
   tools/eclipse/trunk/plugins/org.scribble.protocol.model/src/java/org/scribble/protocol/model/Raise.java
   tools/eclipse/trunk/plugins/org.scribble.protocol.model/src/java/org/scribble/protocol/model/Recur.java
   tools/eclipse/trunk/plugins/org.scribble.protocol.model/src/java/org/scribble/protocol/model/RecursionBlock.java
   tools/eclipse/trunk/plugins/org.scribble.protocol.model/src/java/org/scribble/protocol/model/Repeat.java
   tools/eclipse/trunk/plugins/org.scribble.protocol.model/src/java/org/scribble/protocol/model/Run.java
   tools/eclipse/trunk/plugins/org.scribble.protocol.model/src/java/org/scribble/protocol/model/Spawn.java
   tools/eclipse/trunk/plugins/org.scribble.protocol.model/src/java/org/scribble/protocol/model/TryEscape.java
   tools/eclipse/trunk/plugins/org.scribble.protocol.model/src/java/org/scribble/protocol/model/osgi/
   tools/eclipse/trunk/plugins/org.scribble.protocol.model/src/java/org/scribble/protocol/model/osgi/Activator.java
   tools/eclipse/trunk/plugins/org.scribble.protocol.model/src/test/
   tools/eclipse/trunk/plugins/org.scribble.protocol.model/src/test/org/
   tools/eclipse/trunk/plugins/org.scribble.protocol.model/src/test/org/scribble/
   tools/eclipse/trunk/plugins/org.scribble.protocol.model/src/test/org/scribble/protocol/
   tools/eclipse/trunk/plugins/org.scribble.protocol.model/src/test/org/scribble/protocol/model/
   tools/eclipse/trunk/plugins/org.scribble.protocol.model/src/test/org/scribble/protocol/model/ChoiceTest.java
   tools/eclipse/trunk/plugins/org.scribble.protocol.model/src/test/org/scribble/protocol/model/ProtocolModelTest.java
   tools/eclipse/trunk/plugins/org.scribble.protocol.model/src/test/org/scribble/protocol/model/RepeatTest.java
   tools/eclipse/trunk/plugins/org.scribble.protocol.parser/
   tools/eclipse/trunk/plugins/org.scribble.protocol.parser/.classpath
   tools/eclipse/trunk/plugins/org.scribble.protocol.parser/.project
   tools/eclipse/trunk/plugins/org.scribble.protocol.parser/LICENSE.txt
   tools/eclipse/trunk/plugins/org.scribble.protocol.parser/META-INF/
   tools/eclipse/trunk/plugins/org.scribble.protocol.parser/META-INF/MANIFEST.MF
   tools/eclipse/trunk/plugins/org.scribble.protocol.parser/build.properties
   tools/eclipse/trunk/plugins/org.scribble.protocol.parser/classes/
   tools/eclipse/trunk/plugins/org.scribble.protocol.parser/classes/org/
   tools/eclipse/trunk/plugins/org.scribble.protocol.parser/classes/org/scribble/
   tools/eclipse/trunk/plugins/org.scribble.protocol.parser/classes/org/scribble/protocol/
   tools/eclipse/trunk/plugins/org.scribble.protocol.parser/classes/org/scribble/protocol/parser/
   tools/eclipse/trunk/plugins/org.scribble.protocol.parser/classes/org/scribble/protocol/parser/CatchBlockParserRule.class
   tools/eclipse/trunk/plugins/org.scribble.protocol.parser/classes/org/scribble/protocol/parser/ChoiceParserRule.class
   tools/eclipse/trunk/plugins/org.scribble.protocol.parser/classes/org/scribble/protocol/parser/ChoiceParserRuleTest.class
   tools/eclipse/trunk/plugins/org.scribble.protocol.parser/classes/org/scribble/protocol/parser/InterruptBlockParserRule.class
   tools/eclipse/trunk/plugins/org.scribble.protocol.parser/classes/org/scribble/protocol/parser/Messages.properties
   tools/eclipse/trunk/plugins/org.scribble.protocol.parser/classes/org/scribble/protocol/parser/ParallelParserRule.class
   tools/eclipse/trunk/plugins/org.scribble.protocol.parser/classes/org/scribble/protocol/parser/ProtocolKeyWordProvider.class
   tools/eclipse/trunk/plugins/org.scribble.protocol.parser/classes/org/scribble/protocol/parser/ProtocolModelParserRule.class
   tools/eclipse/trunk/plugins/org.scribble.protocol.parser/classes/org/scribble/protocol/parser/ProtocolParserRule.class
   tools/eclipse/trunk/plugins/org.scribble.protocol.parser/classes/org/scribble/protocol/parser/ProtocolReferenceParserRule.class
   tools/eclipse/trunk/plugins/org.scribble.protocol.parser/classes/org/scribble/protocol/parser/RaiseParserRule.class
   tools/eclipse/trunk/plugins/org.scribble.protocol.parser/classes/org/scribble/protocol/parser/RecurParserRule.class
   tools/eclipse/trunk/plugins/org.scribble.protocol.parser/classes/org/scribble/protocol/parser/RecursionBlockParserRule.class
   tools/eclipse/trunk/plugins/org.scribble.protocol.parser/classes/org/scribble/protocol/parser/RepeatParserRule.class
   tools/eclipse/trunk/plugins/org.scribble.protocol.parser/classes/org/scribble/protocol/parser/RunParserRule.class
   tools/eclipse/trunk/plugins/org.scribble.protocol.parser/classes/org/scribble/protocol/parser/RunProtocolParserRule.class
   tools/eclipse/trunk/plugins/org.scribble.protocol.parser/classes/org/scribble/protocol/parser/TryEscapeParserRule.class
   tools/eclipse/trunk/plugins/org.scribble.protocol.parser/classes/org/scribble/protocol/parser/osgi/
   tools/eclipse/trunk/plugins/org.scribble.protocol.parser/classes/org/scribble/protocol/parser/osgi/Activator.class
   tools/eclipse/trunk/plugins/org.scribble.protocol.parser/src/
   tools/eclipse/trunk/plugins/org.scribble.protocol.parser/src/java/
   tools/eclipse/trunk/plugins/org.scribble.protocol.parser/src/java/org/
   tools/eclipse/trunk/plugins/org.scribble.protocol.parser/src/java/org/scribble/
   tools/eclipse/trunk/plugins/org.scribble.protocol.parser/src/java/org/scribble/protocol/
   tools/eclipse/trunk/plugins/org.scribble.protocol.parser/src/java/org/scribble/protocol/parser/
   tools/eclipse/trunk/plugins/org.scribble.protocol.parser/src/java/org/scribble/protocol/parser/CatchBlockParserRule.java
   tools/eclipse/trunk/plugins/org.scribble.protocol.parser/src/java/org/scribble/protocol/parser/ChoiceParserRule.java
   tools/eclipse/trunk/plugins/org.scribble.protocol.parser/src/java/org/scribble/protocol/parser/InterruptBlockParserRule.java
   tools/eclipse/trunk/plugins/org.scribble.protocol.parser/src/java/org/scribble/protocol/parser/Messages.properties
   tools/eclipse/trunk/plugins/org.scribble.protocol.parser/src/java/org/scribble/protocol/parser/ParallelParserRule.java
   tools/eclipse/trunk/plugins/org.scribble.protocol.parser/src/java/org/scribble/protocol/parser/ProtocolKeyWordProvider.java
   tools/eclipse/trunk/plugins/org.scribble.protocol.parser/src/java/org/scribble/protocol/parser/ProtocolModelParserRule.java
   tools/eclipse/trunk/plugins/org.scribble.protocol.parser/src/java/org/scribble/protocol/parser/ProtocolParserRule.java
   tools/eclipse/trunk/plugins/org.scribble.protocol.parser/src/java/org/scribble/protocol/parser/ProtocolReferenceParserRule.java
   tools/eclipse/trunk/plugins/org.scribble.protocol.parser/src/java/org/scribble/protocol/parser/RaiseParserRule.java
   tools/eclipse/trunk/plugins/org.scribble.protocol.parser/src/java/org/scribble/protocol/parser/RecurParserRule.java
   tools/eclipse/trunk/plugins/org.scribble.protocol.parser/src/java/org/scribble/protocol/parser/RecursionBlockParserRule.java
   tools/eclipse/trunk/plugins/org.scribble.protocol.parser/src/java/org/scribble/protocol/parser/RepeatParserRule.java
   tools/eclipse/trunk/plugins/org.scribble.protocol.parser/src/java/org/scribble/protocol/parser/RunParserRule.java
   tools/eclipse/trunk/plugins/org.scribble.protocol.parser/src/java/org/scribble/protocol/parser/RunProtocolParserRule.java
   tools/eclipse/trunk/plugins/org.scribble.protocol.parser/src/java/org/scribble/protocol/parser/TryEscapeParserRule.java
   tools/eclipse/trunk/plugins/org.scribble.protocol.parser/src/java/org/scribble/protocol/parser/osgi/
   tools/eclipse/trunk/plugins/org.scribble.protocol.parser/src/java/org/scribble/protocol/parser/osgi/Activator.java
   tools/eclipse/trunk/plugins/org.scribble.protocol.parser/src/test/
   tools/eclipse/trunk/plugins/org.scribble.protocol.parser/src/test/org/
   tools/eclipse/trunk/plugins/org.scribble.protocol.parser/src/test/org/scribble/
   tools/eclipse/trunk/plugins/org.scribble.protocol.parser/src/test/org/scribble/protocol/
   tools/eclipse/trunk/plugins/org.scribble.protocol.parser/src/test/org/scribble/protocol/parser/
   tools/eclipse/trunk/plugins/org.scribble.protocol.parser/src/test/org/scribble/protocol/parser/ChoiceParserRuleTest.java
   tools/eclipse/trunk/plugins/org.scribble.protocol.projector/
   tools/eclipse/trunk/plugins/org.scribble.protocol.projector/.classpath
   tools/eclipse/trunk/plugins/org.scribble.protocol.projector/.project
   tools/eclipse/trunk/plugins/org.scribble.protocol.projector/LICENSE.txt
   tools/eclipse/trunk/plugins/org.scribble.protocol.projector/META-INF/
   tools/eclipse/trunk/plugins/org.scribble.protocol.projector/META-INF/MANIFEST.MF
   tools/eclipse/trunk/plugins/org.scribble.protocol.projector/build.properties
   tools/eclipse/trunk/plugins/org.scribble.protocol.projector/classes/
   tools/eclipse/trunk/plugins/org.scribble.protocol.projector/classes/org/
   tools/eclipse/trunk/plugins/org.scribble.protocol.projector/classes/org/scribble/
   tools/eclipse/trunk/plugins/org.scribble.protocol.projector/classes/org/scribble/protocol/
   tools/eclipse/trunk/plugins/org.scribble.protocol.projector/classes/org/scribble/protocol/projector/
   tools/eclipse/trunk/plugins/org.scribble.protocol.projector/classes/org/scribble/protocol/projector/CatchBlockProjectorRule.class
   tools/eclipse/trunk/plugins/org.scribble.protocol.projector/classes/org/scribble/protocol/projector/ChoiceProjectorRule.class
   tools/eclipse/trunk/plugins/org.scribble.protocol.projector/classes/org/scribble/protocol/projector/ComposeProjectorRule.class
   tools/eclipse/trunk/plugins/org.scribble.protocol.projector/classes/org/scribble/protocol/projector/InterruptBlockProjectorRule.class
   tools/eclipse/trunk/plugins/org.scribble.protocol.projector/classes/org/scribble/protocol/projector/ParallelProjectorRule.class
   tools/eclipse/trunk/plugins/org.scribble.protocol.projector/classes/org/scribble/protocol/projector/ProtocolModelProjectorRule.class
   tools/eclipse/trunk/plugins/org.scribble.protocol.projector/classes/org/scribble/protocol/projector/ProtocolProjectorRule.class
   tools/eclipse/trunk/plugins/org.scribble.protocol.projector/classes/org/scribble/protocol/projector/ProtocolReferenceProjectorRule.class
   tools/eclipse/trunk/plugins/org.scribble.protocol.projector/classes/org/scribble/protocol/projector/RaiseProjectorRule.class
   tools/eclipse/trunk/plugins/org.scribble.protocol.projector/classes/org/scribble/protocol/projector/RecurProjectorRule.class
   tools/eclipse/trunk/plugins/org.scribble.protocol.projector/classes/org/scribble/protocol/projector/RecursionBlockProjectorRule.class
   tools/eclipse/trunk/plugins/org.scribble.protocol.projector/classes/org/scribble/protocol/projector/RepeatProjectorRule.class
   tools/eclipse/trunk/plugins/org.scribble.protocol.projector/classes/org/scribble/protocol/projector/RunProjectorRule.class
   tools/eclipse/trunk/plugins/org.scribble.protocol.projector/classes/org/scribble/protocol/projector/SpawnProjectorRule.class
   tools/eclipse/trunk/plugins/org.scribble.protocol.projector/classes/org/scribble/protocol/projector/TryEscapeProjectorRule.class
   tools/eclipse/trunk/plugins/org.scribble.protocol.projector/classes/org/scribble/protocol/projector/osgi/
   tools/eclipse/trunk/plugins/org.scribble.protocol.projector/classes/org/scribble/protocol/projector/osgi/Activator.class
   tools/eclipse/trunk/plugins/org.scribble.protocol.projector/src/
   tools/eclipse/trunk/plugins/org.scribble.protocol.projector/src/java/
   tools/eclipse/trunk/plugins/org.scribble.protocol.projector/src/java/org/
   tools/eclipse/trunk/plugins/org.scribble.protocol.projector/src/java/org/scribble/
   tools/eclipse/trunk/plugins/org.scribble.protocol.projector/src/java/org/scribble/protocol/
   tools/eclipse/trunk/plugins/org.scribble.protocol.projector/src/java/org/scribble/protocol/projector/
   tools/eclipse/trunk/plugins/org.scribble.protocol.projector/src/java/org/scribble/protocol/projector/CatchBlockProjectorRule.java
   tools/eclipse/trunk/plugins/org.scribble.protocol.projector/src/java/org/scribble/protocol/projector/ChoiceProjectorRule.java
   tools/eclipse/trunk/plugins/org.scribble.protocol.projector/src/java/org/scribble/protocol/projector/ComposeProjectorRule.java
   tools/eclipse/trunk/plugins/org.scribble.protocol.projector/src/java/org/scribble/protocol/projector/InterruptBlockProjectorRule.java
   tools/eclipse/trunk/plugins/org.scribble.protocol.projector/src/java/org/scribble/protocol/projector/ParallelProjectorRule.java
   tools/eclipse/trunk/plugins/org.scribble.protocol.projector/src/java/org/scribble/protocol/projector/ProtocolModelProjectorRule.java
   tools/eclipse/trunk/plugins/org.scribble.protocol.projector/src/java/org/scribble/protocol/projector/ProtocolProjectorRule.java
   tools/eclipse/trunk/plugins/org.scribble.protocol.projector/src/java/org/scribble/protocol/projector/ProtocolReferenceProjectorRule.java
   tools/eclipse/trunk/plugins/org.scribble.protocol.projector/src/java/org/scribble/protocol/projector/RaiseProjectorRule.java
   tools/eclipse/trunk/plugins/org.scribble.protocol.projector/src/java/org/scribble/protocol/projector/RecurProjectorRule.java
   tools/eclipse/trunk/plugins/org.scribble.protocol.projector/src/java/org/scribble/protocol/projector/RecursionBlockProjectorRule.java
   tools/eclipse/trunk/plugins/org.scribble.protocol.projector/src/java/org/scribble/protocol/projector/RepeatProjectorRule.java
   tools/eclipse/trunk/plugins/org.scribble.protocol.projector/src/java/org/scribble/protocol/projector/RunProjectorRule.java
   tools/eclipse/trunk/plugins/org.scribble.protocol.projector/src/java/org/scribble/protocol/projector/SpawnProjectorRule.java
   tools/eclipse/trunk/plugins/org.scribble.protocol.projector/src/java/org/scribble/protocol/projector/TryEscapeProjectorRule.java
   tools/eclipse/trunk/plugins/org.scribble.protocol.projector/src/java/org/scribble/protocol/projector/osgi/
   tools/eclipse/trunk/plugins/org.scribble.protocol.projector/src/java/org/scribble/protocol/projector/osgi/Activator.java
   tools/eclipse/trunk/plugins/org.scribble.protocol.validation/
   tools/eclipse/trunk/plugins/org.scribble.protocol.validation/.classpath
   tools/eclipse/trunk/plugins/org.scribble.protocol.validation/.project
   tools/eclipse/trunk/plugins/org.scribble.protocol.validation/LICENSE.txt
   tools/eclipse/trunk/plugins/org.scribble.protocol.validation/META-INF/
   tools/eclipse/trunk/plugins/org.scribble.protocol.validation/META-INF/MANIFEST.MF
   tools/eclipse/trunk/plugins/org.scribble.protocol.validation/build.properties
   tools/eclipse/trunk/plugins/org.scribble.protocol.validation/classes/
   tools/eclipse/trunk/plugins/org.scribble.protocol.validation/classes/org/
   tools/eclipse/trunk/plugins/org.scribble.protocol.validation/classes/org/scribble/
   tools/eclipse/trunk/plugins/org.scribble.protocol.validation/classes/org/scribble/protocol/
   tools/eclipse/trunk/plugins/org.scribble.protocol.validation/classes/org/scribble/protocol/validation/
   tools/eclipse/trunk/plugins/org.scribble.protocol.validation/classes/org/scribble/protocol/validation/ChoiceValidationRule.class
   tools/eclipse/trunk/plugins/org.scribble.protocol.validation/classes/org/scribble/protocol/validation/ComposeValidationRule.class
   tools/eclipse/trunk/plugins/org.scribble.protocol.validation/classes/org/scribble/protocol/validation/Messages.properties
   tools/eclipse/trunk/plugins/org.scribble.protocol.validation/classes/org/scribble/protocol/validation/ParallelValidationRule.class
   tools/eclipse/trunk/plugins/org.scribble.protocol.validation/classes/org/scribble/protocol/validation/ProtocolModelValidationRule.class
   tools/eclipse/trunk/plugins/org.scribble.protocol.validation/classes/org/scribble/protocol/validation/ProtocolValidationRule.class
   tools/eclipse/trunk/plugins/org.scribble.protocol.validation/classes/org/scribble/protocol/validation/RaiseValidationRule.class
   tools/eclipse/trunk/plugins/org.scribble.protocol.validation/classes/org/scribble/protocol/validation/RecursionBlockValidationRule.class
   tools/eclipse/trunk/plugins/org.scribble.protocol.validation/classes/org/scribble/protocol/validation/RepeatValidationRule.class
   tools/eclipse/trunk/plugins/org.scribble.protocol.validation/classes/org/scribble/protocol/validation/TryEscapeValidationRule.class
   tools/eclipse/trunk/plugins/org.scribble.protocol.validation/classes/org/scribble/protocol/validation/osgi/
   tools/eclipse/trunk/plugins/org.scribble.protocol.validation/classes/org/scribble/protocol/validation/osgi/Activator.class
   tools/eclipse/trunk/plugins/org.scribble.protocol.validation/src/
   tools/eclipse/trunk/plugins/org.scribble.protocol.validation/src/java/
   tools/eclipse/trunk/plugins/org.scribble.protocol.validation/src/java/org/
   tools/eclipse/trunk/plugins/org.scribble.protocol.validation/src/java/org/scribble/
   tools/eclipse/trunk/plugins/org.scribble.protocol.validation/src/java/org/scribble/protocol/
   tools/eclipse/trunk/plugins/org.scribble.protocol.validation/src/java/org/scribble/protocol/validation/
   tools/eclipse/trunk/plugins/org.scribble.protocol.validation/src/java/org/scribble/protocol/validation/ChoiceValidationRule.java
   tools/eclipse/trunk/plugins/org.scribble.protocol.validation/src/java/org/scribble/protocol/validation/ComposeValidationRule.java
   tools/eclipse/trunk/plugins/org.scribble.protocol.validation/src/java/org/scribble/protocol/validation/Messages.properties
   tools/eclipse/trunk/plugins/org.scribble.protocol.validation/src/java/org/scribble/protocol/validation/ParallelValidationRule.java
   tools/eclipse/trunk/plugins/org.scribble.protocol.validation/src/java/org/scribble/protocol/validation/ProtocolModelValidationRule.java
   tools/eclipse/trunk/plugins/org.scribble.protocol.validation/src/java/org/scribble/protocol/validation/ProtocolValidationRule.java
   tools/eclipse/trunk/plugins/org.scribble.protocol.validation/src/java/org/scribble/protocol/validation/RaiseValidationRule.java
   tools/eclipse/trunk/plugins/org.scribble.protocol.validation/src/java/org/scribble/protocol/validation/RecursionBlockValidationRule.java
   tools/eclipse/trunk/plugins/org.scribble.protocol.validation/src/java/org/scribble/protocol/validation/RepeatValidationRule.java
   tools/eclipse/trunk/plugins/org.scribble.protocol.validation/src/java/org/scribble/protocol/validation/TryEscapeValidationRule.java
   tools/eclipse/trunk/plugins/org.scribble.protocol.validation/src/java/org/scribble/protocol/validation/osgi/
   tools/eclipse/trunk/plugins/org.scribble.protocol.validation/src/java/org/scribble/protocol/validation/osgi/Activator.java
   tools/eclipse/trunk/plugins/pom.xml
Removed:
   tools/eclipse/trunk/distribution/src/files/
   tools/eclipse/trunk/features/org.jboss.savara.tools.bpel.feature/Copyright.txt
   tools/eclipse/trunk/features/org.jboss.savara.tools.bpel.feature/build.properties
   tools/eclipse/trunk/features/org.jboss.savara.tools.bpel.feature/feature.xml
   tools/eclipse/trunk/features/org.jboss.savara.tools.jbossesb.feature/Copyright.txt
   tools/eclipse/trunk/features/org.jboss.savara.tools.jbossesb.feature/build.properties
   tools/eclipse/trunk/features/org.jboss.savara.tools.jbossesb.feature/feature.xml
   tools/eclipse/trunk/features/org.pi4soa.bpmn.feature/build.properties
   tools/eclipse/trunk/features/org.pi4soa.bpmn.feature/feature.xml
   tools/eclipse/trunk/features/org.pi4soa.monitor.feature/build.properties
   tools/eclipse/trunk/features/org.pi4soa.monitor.feature/feature.xml
Modified:
   tools/eclipse/trunk/distribution/pom.xml
   tools/eclipse/trunk/distribution/src/main/assembly/bin.xml
   tools/eclipse/trunk/docs/gettingstartedguide/pom.xml
   tools/eclipse/trunk/docs/pom.xml
   tools/eclipse/trunk/docs/userguide/pom.xml
   tools/eclipse/trunk/pom.xml
Log:
Update to include pi4scribble plugins, as these will only be used for savara version 1. Added initial scripts to auto-build the Eclipse plugins - still need to solve fully qualified path and BPMN modeller inclusion.

Modified: tools/eclipse/trunk/distribution/pom.xml
===================================================================
--- tools/eclipse/trunk/distribution/pom.xml	2010-02-16 21:31:20 UTC (rev 167)
+++ tools/eclipse/trunk/distribution/pom.xml	2010-03-06 20:53:29 UTC (rev 168)
@@ -23,13 +23,13 @@
     <artifactId>distribution</artifactId>
     <packaging>pom</packaging>
     <name>Savara::Tools::Eclipse::Distribution</name>
-    <version>1.0-M1</version>
+    <version>1.0-SNAPSHOT</version>
     <url>http://www.jboss.org/savara</url>
 
 	<parent>
 		<groupId>org.jboss.savara.tools</groupId>
 		<artifactId>eclipse</artifactId>
-		<version>1.0-M1</version>
+		<version>1.0-SNAPSHOT</version>
 		<relativePath>../pom.xml</relativePath>
 	</parent>
 

Modified: tools/eclipse/trunk/distribution/src/main/assembly/bin.xml
===================================================================
--- tools/eclipse/trunk/distribution/src/main/assembly/bin.xml	2010-02-16 21:31:20 UTC (rev 167)
+++ tools/eclipse/trunk/distribution/src/main/assembly/bin.xml	2010-03-06 20:53:29 UTC (rev 168)
@@ -40,8 +40,11 @@
 
         <!-- copy Eclipse update site -->
         <fileSet>
-		   <directory>src/files/eclipse</directory>
+		   <directory>../plugins/eclipse-build/target</directory>
 		   <outputDirectory>eclipse</outputDirectory>
+			<includes>
+			  <include>*.zip</include>
+			</includes>
 		</fileSet>
 
         <!-- copy samples -->

Modified: tools/eclipse/trunk/docs/gettingstartedguide/pom.xml
===================================================================
--- tools/eclipse/trunk/docs/gettingstartedguide/pom.xml	2010-02-16 21:31:20 UTC (rev 167)
+++ tools/eclipse/trunk/docs/gettingstartedguide/pom.xml	2010-03-06 20:53:29 UTC (rev 168)
@@ -8,12 +8,12 @@
     <artifactId>gettingstartedguide</artifactId>
     <packaging>jdocbook</packaging>
     <name>Savara::Tools::Eclipse::Docs::GettingStartedGuide</name>
-    <version>1.0-M1</version>
+    <version>1.0-SNAPSHOT</version>
 
    <parent>
     <groupId>org.jboss.savara.tools.eclipse</groupId>
     <artifactId>docs</artifactId>
-    <version>1.0-M1</version>
+    <version>1.0-SNAPSHOT</version>
    </parent>
 
 

Modified: tools/eclipse/trunk/docs/pom.xml
===================================================================
--- tools/eclipse/trunk/docs/pom.xml	2010-02-16 21:31:20 UTC (rev 167)
+++ tools/eclipse/trunk/docs/pom.xml	2010-03-06 20:53:29 UTC (rev 168)
@@ -8,12 +8,12 @@
     <artifactId>docs</artifactId>
     <packaging>pom</packaging>
     <name>Savara::Tools::Eclipse::Docs</name>
-    <version>1.0-M1</version>
+    <version>1.0-SNAPSHOT</version>
     
     <parent>
 	  <groupId>org.jboss.savara.tools</groupId>
 	  <artifactId>eclipse</artifactId>
-      <version>1.0-M1</version>
+      <version>1.0-SNAPSHOT</version>
 	</parent>
   
     <modules>

Modified: tools/eclipse/trunk/docs/userguide/pom.xml
===================================================================
--- tools/eclipse/trunk/docs/userguide/pom.xml	2010-02-16 21:31:20 UTC (rev 167)
+++ tools/eclipse/trunk/docs/userguide/pom.xml	2010-03-06 20:53:29 UTC (rev 168)
@@ -8,12 +8,12 @@
     <artifactId>userguide</artifactId>
     <packaging>jdocbook</packaging>
     <name>Savara::Tools::Eclipse::Docs::UserGuide</name>
-    <version>1.0-M1</version>
+    <version>1.0-SNAPSHOT</version>
 
    <parent>
     <groupId>org.jboss.savara.tools.eclipse</groupId>
     <artifactId>docs</artifactId>
-    <version>1.0-M1</version>
+    <version>1.0-SNAPSHOT</version>
    </parent>
 
 

Deleted: tools/eclipse/trunk/features/org.jboss.savara.tools.bpel.feature/Copyright.txt
===================================================================
--- tools/eclipse/trunk/features/org.jboss.savara.tools.bpel.feature/Copyright.txt	2010-02-16 21:31:20 UTC (rev 167)
+++ tools/eclipse/trunk/features/org.jboss.savara.tools.bpel.feature/Copyright.txt	2010-03-06 20:53:29 UTC (rev 168)
@@ -1,17 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and others contributors as indicated
- * by the @authors tag. All rights reserved.
- * See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- * This copyrighted material is made available to anyone wishing to use,
- * modify, copy, or redistribute it subject to the terms and conditions
- * of the GNU Lesser General Public License, v. 2.1.
- * This program is distributed in the hope that it will be useful, but WITHOUT A
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
- * PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more details.
- * You should have received a copy of the GNU Lesser General Public License,
- * v.2.1 along with this distribution; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
- * MA  02110-1301, USA.
- */

Deleted: tools/eclipse/trunk/features/org.jboss.savara.tools.bpel.feature/build.properties
===================================================================
--- tools/eclipse/trunk/features/org.jboss.savara.tools.bpel.feature/build.properties	2010-02-16 21:31:20 UTC (rev 167)
+++ tools/eclipse/trunk/features/org.jboss.savara.tools.bpel.feature/build.properties	2010-03-06 20:53:29 UTC (rev 168)
@@ -1,6 +0,0 @@
-bin.includes = feature.xml,\
-               Copyright.txt
-src.includes = .project,\
-               Copyright.txt,\
-               build.properties,\
-               feature.xml

Deleted: tools/eclipse/trunk/features/org.jboss.savara.tools.bpel.feature/feature.xml
===================================================================
--- tools/eclipse/trunk/features/org.jboss.savara.tools.bpel.feature/feature.xml	2010-02-16 21:31:20 UTC (rev 167)
+++ tools/eclipse/trunk/features/org.jboss.savara.tools.bpel.feature/feature.xml	2010-03-06 20:53:29 UTC (rev 168)
@@ -1,205 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<feature
-      id="org.jboss.savara.tools.bpel.feature"
-      label="JBoss SAVARA Tools BPEL Feature"
-      version="1.0.0.qualifier"
-      provider-name="www.jboss.org">
-
-   <description>
-      The JBoss Tools for BPEL support in Savara.
-   </description>
-
-   <copyright>
-      /*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and others contributors as indicated
- * by the @authors tag. All rights reserved.
- * See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- * This copyrighted material is made available to anyone wishing to use,
- * modify, copy, or redistribute it subject to the terms and conditions
- * of the GNU Lesser General Public License, v. 2.1.
- * This program is distributed in the hope that it will be useful, but WITHOUT A
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
- * PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more details.
- * You should have received a copy of the GNU Lesser General Public License,
- * v.2.1 along with this distribution; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
- * MA  02110-1301, USA.
- */
-   </copyright>
-
-   <license url="http://www.gnu.org/licenses/lgpl-2.1.html">
-      GNU LESSER GENERAL PUBLIC LICENSE
-
-Version 2.1, February 1999
-
-Copyright (C) 1991, 1999 Free Software Foundation, Inc.
-51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
-Everyone is permitted to copy and distribute verbatim copies
-of this license document, but changing it is not allowed.
-
-[This is the first released version of the Lesser GPL.  It also counts
- as the successor of the GNU Library Public License, version 2, hence
- the version number 2.1.]
-
-Preamble
-
-The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public Licenses are intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users.
-
-This license, the Lesser General Public License, applies to some specially designated software packages--typically libraries--of the Free Software Foundation and other authors who decide to use it. You can use it too, but we suggest you first think carefully about whether this license or the ordinary General Public License is the better strategy to use in any particular case, based on the explanations below.
-
-When we speak of free software, we are referring to freedom of use, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish); that you receive source code or can get it if you want it; that you can change the software and use pieces of it in new free programs; and that you are informed that you can do these things.
-
-To protect your rights, we need to make restrictions that forbid distributors to deny you these rights or to ask you to surrender these rights. These restrictions translate to certain responsibilities for you if you distribute copies of the library or if you modify it.
-
-For example, if you distribute copies of the library, whether gratis or for a fee, you must give the recipients all the rights that we gave you. You must make sure that they, too, receive or can get the source code. If you link other code with the library, you must provide complete object files to the recipients, so that they can relink them with the library after making changes to the library and recompiling it. And you must show them these terms so they know their rights.
-
-We protect your rights with a two-step method: (1) we copyright the library, and (2) we offer you this license, which gives you legal permission to copy, distribute and/or modify the library.
-
-To protect each distributor, we want to make it very clear that there is no warranty for the free library. Also, if the library is modified by someone else and passed on, the recipients should know that what they have is not the original version, so that the original author&apos;s reputation will not be affected by problems that might be introduced by others.
-
-Finally, software patents pose a constant threat to the existence of any free program. We wish to make sure that a company cannot effectively restrict the users of a free program by obtaining a restrictive license from a patent holder. Therefore, we insist that any patent license obtained for a version of the library must be consistent with the full freedom of use specified in this license.
-
-Most GNU software, including some libraries, is covered by the ordinary GNU General Public License. This license, the GNU Lesser General Public License, applies to certain designated libraries, and is quite different from the ordinary General Public License. We use this license for certain libraries in order to permit linking those libraries into non-free programs.
-
-When a program is linked with a library, whether statically or using a shared library, the combination of the two is legally speaking a combined work, a derivative of the original library. The ordinary General Public License therefore permits such linking only if the entire combination fits its criteria of freedom. The Lesser General Public License permits more lax criteria for linking other code with the library.
-
-We call this license the &quot;Lesser&quot; General Public License because it does Less to protect the user&apos;s freedom than the ordinary General Public License. It also provides other free software developers Less of an advantage over competing non-free programs. These disadvantages are the reason we use the ordinary General Public License for many libraries. However, the Lesser license provides advantages in certain special circumstances.
-
-For example, on rare occasions, there may be a special need to encourage the widest possible use of a certain library, so that it becomes a de-facto standard. To achieve this, non-free programs must be allowed to use the library. A more frequent case is that a free library does the same job as widely used non-free libraries. In this case, there is little to gain by limiting the free library to free software only, so we use the Lesser General Public License.
-
-In other cases, permission to use a particular library in non-free programs enables a greater number of people to use a large body of free software. For example, permission to use the GNU C Library in non-free programs enables many more people to use the whole GNU operating system, as well as its variant, the GNU/Linux operating system.
-
-Although the Lesser General Public License is Less protective of the users&apos; freedom, it does ensure that the user of a program that is linked with the Library has the freedom and the wherewithal to run that program using a modified version of the Library.
-
-The precise terms and conditions for copying, distribution and modification follow. Pay close attention to the difference between a &quot;work based on the library&quot; and a &quot;work that uses the library&quot;. The former contains code derived from the library, whereas the latter must be combined with the library in order to run.
-
-TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
-0. This License Agreement applies to any software library or other program which contains a notice placed by the copyright holder or other authorized party saying it may be distributed under the terms of this Lesser General Public License (also called &quot;this License&quot;). Each licensee is addressed as &quot;you&quot;.
-
-A &quot;library&quot; means a collection of software functions and/or data prepared so as to be conveniently linked with application programs (which use some of those functions and data) to form executables.
-
-The &quot;Library&quot;, below, refers to any such software library or work which has been distributed under these terms. A &quot;work based on the Library&quot; means either the Library or any derivative work under copyright law: that is to say, a work containing the Library or a portion of it, either verbatim or with modifications and/or translated straightforwardly into another language. (Hereinafter, translation is included without limitation in the term &quot;modification&quot;.)
-
-&quot;Source code&quot; for a work means the preferred form of the work for making modifications to it. For a library, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the library.
-
-Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running a program using the Library is not restricted, and output from such a program is covered only if its contents constitute a work based on the Library (independent of the use of the Library in a tool for writing it). Whether that is true depends on what the Library does and what the program that uses the Library does.
-
-1. You may copy and distribute verbatim copies of the Library&apos;s complete source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and distribute a copy of this License along with the Library.
-
-You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee.
-
-2. You may modify your copy or copies of the Library or any portion of it, thus forming a work based on the Library, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions:
-
-    * a) The modified work must itself be a software library.
-    * b) You must cause the files modified to carry prominent notices stating that you changed the files and the date of any change.
-    * c) You must cause the whole of the work to be licensed at no charge to all third parties under the terms of this License.
-    * d) If a facility in the modified Library refers to a function or a table of data to be supplied by an application program that uses the facility, other than as an argument passed when the facility is invoked, then you must make a good faith effort to ensure that, in the event an application does not supply such function or table, the facility still operates, and performs whatever part of its purpose remains meaningful.
-
-      (For example, a function in a library to compute square roots has a purpose that is entirely well-defined independent of the application. Therefore, Subsection 2d requires that any application-supplied function or table used by this function must be optional: if the application does not supply it, the square root function must still compute square roots.) 
-
-These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Library, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Library, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it.
-
-Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Library.
-
-In addition, mere aggregation of another work not based on the Library with the Library (or with a work based on the Library) on a volume of a storage or distribution medium does not bring the other work under the scope of this License.
-
-3. You may opt to apply the terms of the ordinary GNU General Public License instead of this License to a given copy of the Library. To do this, you must alter all the notices that refer to this License, so that they refer to the ordinary GNU General Public License, version 2, instead of to this License. (If a newer version than version 2 of the ordinary GNU General Public License has appeared, then you can specify that version instead if you wish.) Do not make any other change in these notices.
-
-Once this change is made in a given copy, it is irreversible for that copy, so the ordinary GNU General Public License applies to all subsequent copies and derivative works made from that copy.
-
-This option is useful when you wish to copy part of the code of the Library into a program that is not a library.
-
-4. You may copy and distribute the Library (or a portion or derivative of it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange.
-
-If distribution of object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place satisfies the requirement to distribute the source code, even though third parties are not compelled to copy the source along with the object code.
-
-5. A program that contains no derivative of any portion of the Library, but is designed to work with the Library by being compiled or linked with it, is called a &quot;work that uses the Library&quot;. Such a work, in isolation, is not a derivative work of the Library, and therefore falls outside the scope of this License.
-
-However, linking a &quot;work that uses the Library&quot; with the Library creates an executable that is a derivative of the Library (because it contains portions of the Library), rather than a &quot;work that uses the library&quot;. The executable is therefore covered by this License. Section 6 states terms for distribution of such executables.
-
-When a &quot;work that uses the Library&quot; uses material from a header file that is part of the Library, the object code for the work may be a derivative work of the Library even though the source code is not. Whether this is true is especially significant if the work can be linked without the Library, or if the work is itself a library. The threshold for this to be true is not precisely defined by law.
-
-If such an object file uses only numerical parameters, data structure layouts and accessors, and small macros and small inline functions (ten lines or less in length), then the use of the object file is unrestricted, regardless of whether it is legally a derivative work. (Executables containing this object code plus portions of the Library will still fall under Section 6.)
-
-Otherwise, if the work is a derivative of the Library, you may distribute the object code for the work under the terms of Section 6. Any executables containing that work also fall under Section 6, whether or not they are linked directly with the Library itself.
-
-6. As an exception to the Sections above, you may also combine or link a &quot;work that uses the Library&quot; with the Library to produce a work containing portions of the Library, and distribute that work under terms of your choice, provided that the terms permit modification of the work for the customer&apos;s own use and reverse engineering for debugging such modifications.
-
-You must give prominent notice with each copy of the work that the Library is used in it and that the Library and its use are covered by this License. You must supply a copy of this License. If the work during execution displays copyright notices, you must include the copyright notice for the Library among them, as well as a reference directing the user to the copy of this License. Also, you must do one of these things:
-
-    * a) Accompany the work with the complete corresponding machine-readable source code for the Library including whatever changes were used in the work (which must be distributed under Sections 1 and 2 above); and, if the work is an executable linked with the Library, with the complete machine-readable &quot;work that uses the Library&quot;, as object code and/or source code, so that the user can modify the Library and then relink to produce a modified executable containing the modified Library. (It is understood that the user who changes the contents of definitions files in the Library will not necessarily be able to recompile the application to use the modified definitions.)
-    * b) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (1) uses at run time a copy of the library already present on the user&apos;s computer system, rather than copying library functions into the executable, and (2) will operate properly with a modified version of the library, if the user installs one, as long as the modified version is interface-compatible with the version that the work was made with.
-    * c) Accompany the work with a written offer, valid for at least three years, to give the same user the materials specified in Subsection 6a, above, for a charge no more than the cost of performing this distribution.
-    * d) If distribution of the work is made by offering access to copy from a designated place, offer equivalent access to copy the above specified materials from the same place.
-    * e) Verify that the user has already received a copy of these materials or that you have already sent this user a copy. 
-
-For an executable, the required form of the &quot;work that uses the Library&quot; must include any data and utility programs needed for reproducing the executable from it. However, as a special exception, the materials to be distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable.
-
-It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system. Such a contradiction means you cannot use both them and the Library together in an executable that you distribute.
-
-7. You may place library facilities that are a work based on the Library side-by-side in a single library together with other library facilities not covered by this License, and distribute such a combined library, provided that the separate distribution of the work based on the Library and of the other library facilities is otherwise permitted, and provided that you do these two things:
-
-    * a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities. This must be distributed under the terms of the Sections above.
-    * b) Give prominent notice with the combined library of the fact that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work. 
-
-8. You may not copy, modify, sublicense, link with, or distribute the Library except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, link with, or distribute the Library is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance.
-
-9. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Library or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Library (or any work based on the Library), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Library or works based on it.
-
-10. Each time you redistribute the Library (or any work based on the Library), the recipient automatically receives a license from the original licensor to copy, distribute, link with or modify the Library subject to these terms and conditions. You may not impose any further restrictions on the recipients&apos; exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties with this License.
-
-11. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Library at all. For example, if a patent license would not permit royalty-free redistribution of the Library by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Library.
-
-If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply, and the section as a whole is intended to apply in other circumstances.
-
-It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice.
-
-This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License.
-
-12. If the distribution and/or use of the Library is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Library under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License.
-
-13. The Free Software Foundation may publish revised and/or new versions of the Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns.
-
-Each version is given a distinguishing version number. If the Library specifies a version number of this License which applies to it and &quot;any later version&quot;, you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Library does not specify a license version number, you may choose any version ever published by the Free Software Foundation.
-
-14. If you wish to incorporate parts of the Library into other free programs whose distribution conditions are incompatible with these, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally.
-
-NO WARRANTY
-
-15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE LIBRARY &quot;AS IS&quot; WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
-
-16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
-   </license>
-
-   <requires>
-      <import plugin="org.eclipse.ui"/>
-      <import plugin="org.eclipse.core.runtime"/>
-      <import plugin="org.scribble.conversation.model"/>
-      <import plugin="org.scribble.core"/>
-      <import plugin="org.scribble.lang.model"/>
-      <import plugin="org.eclipse.core.resources"/>
-      <import plugin="org.scribble.eclipse"/>
-      <import plugin="org.eclipse.jdt.core"/>
-      <import plugin="org.junit"/>
-      <import plugin="org.scribble.conversation.parser"/>
-      <import plugin="org.apache.log4j" version="1.2.13" match="greaterOrEqual"/>
-   </requires>
-
-   <plugin
-         id="org.jboss.savara.tools.bpel"
-         download-size="0"
-         install-size="0"
-         version="0.0.0"
-         unpack="false"/>
-
-   <plugin
-         id="org.jboss.savara.tools.wsdl"
-         download-size="0"
-         install-size="0"
-         version="0.0.0"
-         unpack="false"/>
-
-</feature>

Deleted: tools/eclipse/trunk/features/org.jboss.savara.tools.jbossesb.feature/Copyright.txt
===================================================================
--- tools/eclipse/trunk/features/org.jboss.savara.tools.jbossesb.feature/Copyright.txt	2010-02-16 21:31:20 UTC (rev 167)
+++ tools/eclipse/trunk/features/org.jboss.savara.tools.jbossesb.feature/Copyright.txt	2010-03-06 20:53:29 UTC (rev 168)
@@ -1,17 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and others contributors as indicated
- * by the @authors tag. All rights reserved.
- * See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- * This copyrighted material is made available to anyone wishing to use,
- * modify, copy, or redistribute it subject to the terms and conditions
- * of the GNU Lesser General Public License, v. 2.1.
- * This program is distributed in the hope that it will be useful, but WITHOUT A
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
- * PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more details.
- * You should have received a copy of the GNU Lesser General Public License,
- * v.2.1 along with this distribution; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
- * MA  02110-1301, USA.
- */

Deleted: tools/eclipse/trunk/features/org.jboss.savara.tools.jbossesb.feature/build.properties
===================================================================
--- tools/eclipse/trunk/features/org.jboss.savara.tools.jbossesb.feature/build.properties	2010-02-16 21:31:20 UTC (rev 167)
+++ tools/eclipse/trunk/features/org.jboss.savara.tools.jbossesb.feature/build.properties	2010-03-06 20:53:29 UTC (rev 168)
@@ -1,6 +0,0 @@
-bin.includes = feature.xml,\
-               Copyright.txt
-src.includes = build.properties,\
-               feature.xml,\
-               Copyright.txt,\
-               .project

Deleted: tools/eclipse/trunk/features/org.jboss.savara.tools.jbossesb.feature/feature.xml
===================================================================
--- tools/eclipse/trunk/features/org.jboss.savara.tools.jbossesb.feature/feature.xml	2010-02-16 21:31:20 UTC (rev 167)
+++ tools/eclipse/trunk/features/org.jboss.savara.tools.jbossesb.feature/feature.xml	2010-03-06 20:53:29 UTC (rev 168)
@@ -1,202 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<feature
-      id="org.jboss.savara.tools.jbossesb.feature"
-      label="JBoss SAVARA Tools JBossESB Feature"
-      version="1.0.0.qualifier"
-      provider-name="www.jboss.org">
-
-   <description>
-      The JBoss Tools for JBossESB support in Savara.
-   </description>
-
-   <copyright>
-      /*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and others contributors as indicated
- * by the @authors tag. All rights reserved.
- * See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- * This copyrighted material is made available to anyone wishing to use,
- * modify, copy, or redistribute it subject to the terms and conditions
- * of the GNU Lesser General Public License, v. 2.1.
- * This program is distributed in the hope that it will be useful, but WITHOUT A
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
- * PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more details.
- * You should have received a copy of the GNU Lesser General Public License,
- * v.2.1 along with this distribution; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
- * MA  02110-1301, USA.
- */
-   </copyright>
-
-   <license url="http://www.gnu.org/licenses/lgpl-2.1.html">
-      GNU LESSER GENERAL PUBLIC LICENSE
-
-Version 2.1, February 1999
-
-Copyright (C) 1991, 1999 Free Software Foundation, Inc.
-51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
-Everyone is permitted to copy and distribute verbatim copies
-of this license document, but changing it is not allowed.
-
-[This is the first released version of the Lesser GPL.  It also counts
- as the successor of the GNU Library Public License, version 2, hence
- the version number 2.1.]
-
-Preamble
-
-The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public Licenses are intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users.
-
-This license, the Lesser General Public License, applies to some specially designated software packages--typically libraries--of the Free Software Foundation and other authors who decide to use it. You can use it too, but we suggest you first think carefully about whether this license or the ordinary General Public License is the better strategy to use in any particular case, based on the explanations below.
-
-When we speak of free software, we are referring to freedom of use, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish); that you receive source code or can get it if you want it; that you can change the software and use pieces of it in new free programs; and that you are informed that you can do these things.
-
-To protect your rights, we need to make restrictions that forbid distributors to deny you these rights or to ask you to surrender these rights. These restrictions translate to certain responsibilities for you if you distribute copies of the library or if you modify it.
-
-For example, if you distribute copies of the library, whether gratis or for a fee, you must give the recipients all the rights that we gave you. You must make sure that they, too, receive or can get the source code. If you link other code with the library, you must provide complete object files to the recipients, so that they can relink them with the library after making changes to the library and recompiling it. And you must show them these terms so they know their rights.
-
-We protect your rights with a two-step method: (1) we copyright the library, and (2) we offer you this license, which gives you legal permission to copy, distribute and/or modify the library.
-
-To protect each distributor, we want to make it very clear that there is no warranty for the free library. Also, if the library is modified by someone else and passed on, the recipients should know that what they have is not the original version, so that the original author&apos;s reputation will not be affected by problems that might be introduced by others.
-
-Finally, software patents pose a constant threat to the existence of any free program. We wish to make sure that a company cannot effectively restrict the users of a free program by obtaining a restrictive license from a patent holder. Therefore, we insist that any patent license obtained for a version of the library must be consistent with the full freedom of use specified in this license.
-
-Most GNU software, including some libraries, is covered by the ordinary GNU General Public License. This license, the GNU Lesser General Public License, applies to certain designated libraries, and is quite different from the ordinary General Public License. We use this license for certain libraries in order to permit linking those libraries into non-free programs.
-
-When a program is linked with a library, whether statically or using a shared library, the combination of the two is legally speaking a combined work, a derivative of the original library. The ordinary General Public License therefore permits such linking only if the entire combination fits its criteria of freedom. The Lesser General Public License permits more lax criteria for linking other code with the library.
-
-We call this license the &quot;Lesser&quot; General Public License because it does Less to protect the user&apos;s freedom than the ordinary General Public License. It also provides other free software developers Less of an advantage over competing non-free programs. These disadvantages are the reason we use the ordinary General Public License for many libraries. However, the Lesser license provides advantages in certain special circumstances.
-
-For example, on rare occasions, there may be a special need to encourage the widest possible use of a certain library, so that it becomes a de-facto standard. To achieve this, non-free programs must be allowed to use the library. A more frequent case is that a free library does the same job as widely used non-free libraries. In this case, there is little to gain by limiting the free library to free software only, so we use the Lesser General Public License.
-
-In other cases, permission to use a particular library in non-free programs enables a greater number of people to use a large body of free software. For example, permission to use the GNU C Library in non-free programs enables many more people to use the whole GNU operating system, as well as its variant, the GNU/Linux operating system.
-
-Although the Lesser General Public License is Less protective of the users&apos; freedom, it does ensure that the user of a program that is linked with the Library has the freedom and the wherewithal to run that program using a modified version of the Library.
-
-The precise terms and conditions for copying, distribution and modification follow. Pay close attention to the difference between a &quot;work based on the library&quot; and a &quot;work that uses the library&quot;. The former contains code derived from the library, whereas the latter must be combined with the library in order to run.
-
-TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
-0. This License Agreement applies to any software library or other program which contains a notice placed by the copyright holder or other authorized party saying it may be distributed under the terms of this Lesser General Public License (also called &quot;this License&quot;). Each licensee is addressed as &quot;you&quot;.
-
-A &quot;library&quot; means a collection of software functions and/or data prepared so as to be conveniently linked with application programs (which use some of those functions and data) to form executables.
-
-The &quot;Library&quot;, below, refers to any such software library or work which has been distributed under these terms. A &quot;work based on the Library&quot; means either the Library or any derivative work under copyright law: that is to say, a work containing the Library or a portion of it, either verbatim or with modifications and/or translated straightforwardly into another language. (Hereinafter, translation is included without limitation in the term &quot;modification&quot;.)
-
-&quot;Source code&quot; for a work means the preferred form of the work for making modifications to it. For a library, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the library.
-
-Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running a program using the Library is not restricted, and output from such a program is covered only if its contents constitute a work based on the Library (independent of the use of the Library in a tool for writing it). Whether that is true depends on what the Library does and what the program that uses the Library does.
-
-1. You may copy and distribute verbatim copies of the Library&apos;s complete source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and distribute a copy of this License along with the Library.
-
-You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee.
-
-2. You may modify your copy or copies of the Library or any portion of it, thus forming a work based on the Library, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions:
-
-    * a) The modified work must itself be a software library.
-    * b) You must cause the files modified to carry prominent notices stating that you changed the files and the date of any change.
-    * c) You must cause the whole of the work to be licensed at no charge to all third parties under the terms of this License.
-    * d) If a facility in the modified Library refers to a function or a table of data to be supplied by an application program that uses the facility, other than as an argument passed when the facility is invoked, then you must make a good faith effort to ensure that, in the event an application does not supply such function or table, the facility still operates, and performs whatever part of its purpose remains meaningful.
-
-      (For example, a function in a library to compute square roots has a purpose that is entirely well-defined independent of the application. Therefore, Subsection 2d requires that any application-supplied function or table used by this function must be optional: if the application does not supply it, the square root function must still compute square roots.) 
-
-These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Library, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Library, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it.
-
-Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Library.
-
-In addition, mere aggregation of another work not based on the Library with the Library (or with a work based on the Library) on a volume of a storage or distribution medium does not bring the other work under the scope of this License.
-
-3. You may opt to apply the terms of the ordinary GNU General Public License instead of this License to a given copy of the Library. To do this, you must alter all the notices that refer to this License, so that they refer to the ordinary GNU General Public License, version 2, instead of to this License. (If a newer version than version 2 of the ordinary GNU General Public License has appeared, then you can specify that version instead if you wish.) Do not make any other change in these notices.
-
-Once this change is made in a given copy, it is irreversible for that copy, so the ordinary GNU General Public License applies to all subsequent copies and derivative works made from that copy.
-
-This option is useful when you wish to copy part of the code of the Library into a program that is not a library.
-
-4. You may copy and distribute the Library (or a portion or derivative of it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange.
-
-If distribution of object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place satisfies the requirement to distribute the source code, even though third parties are not compelled to copy the source along with the object code.
-
-5. A program that contains no derivative of any portion of the Library, but is designed to work with the Library by being compiled or linked with it, is called a &quot;work that uses the Library&quot;. Such a work, in isolation, is not a derivative work of the Library, and therefore falls outside the scope of this License.
-
-However, linking a &quot;work that uses the Library&quot; with the Library creates an executable that is a derivative of the Library (because it contains portions of the Library), rather than a &quot;work that uses the library&quot;. The executable is therefore covered by this License. Section 6 states terms for distribution of such executables.
-
-When a &quot;work that uses the Library&quot; uses material from a header file that is part of the Library, the object code for the work may be a derivative work of the Library even though the source code is not. Whether this is true is especially significant if the work can be linked without the Library, or if the work is itself a library. The threshold for this to be true is not precisely defined by law.
-
-If such an object file uses only numerical parameters, data structure layouts and accessors, and small macros and small inline functions (ten lines or less in length), then the use of the object file is unrestricted, regardless of whether it is legally a derivative work. (Executables containing this object code plus portions of the Library will still fall under Section 6.)
-
-Otherwise, if the work is a derivative of the Library, you may distribute the object code for the work under the terms of Section 6. Any executables containing that work also fall under Section 6, whether or not they are linked directly with the Library itself.
-
-6. As an exception to the Sections above, you may also combine or link a &quot;work that uses the Library&quot; with the Library to produce a work containing portions of the Library, and distribute that work under terms of your choice, provided that the terms permit modification of the work for the customer&apos;s own use and reverse engineering for debugging such modifications.
-
-You must give prominent notice with each copy of the work that the Library is used in it and that the Library and its use are covered by this License. You must supply a copy of this License. If the work during execution displays copyright notices, you must include the copyright notice for the Library among them, as well as a reference directing the user to the copy of this License. Also, you must do one of these things:
-
-    * a) Accompany the work with the complete corresponding machine-readable source code for the Library including whatever changes were used in the work (which must be distributed under Sections 1 and 2 above); and, if the work is an executable linked with the Library, with the complete machine-readable &quot;work that uses the Library&quot;, as object code and/or source code, so that the user can modify the Library and then relink to produce a modified executable containing the modified Library. (It is understood that the user who changes the contents of definitions files in the Library will not necessarily be able to recompile the application to use the modified definitions.)
-    * b) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (1) uses at run time a copy of the library already present on the user&apos;s computer system, rather than copying library functions into the executable, and (2) will operate properly with a modified version of the library, if the user installs one, as long as the modified version is interface-compatible with the version that the work was made with.
-    * c) Accompany the work with a written offer, valid for at least three years, to give the same user the materials specified in Subsection 6a, above, for a charge no more than the cost of performing this distribution.
-    * d) If distribution of the work is made by offering access to copy from a designated place, offer equivalent access to copy the above specified materials from the same place.
-    * e) Verify that the user has already received a copy of these materials or that you have already sent this user a copy. 
-
-For an executable, the required form of the &quot;work that uses the Library&quot; must include any data and utility programs needed for reproducing the executable from it. However, as a special exception, the materials to be distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable.
-
-It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system. Such a contradiction means you cannot use both them and the Library together in an executable that you distribute.
-
-7. You may place library facilities that are a work based on the Library side-by-side in a single library together with other library facilities not covered by this License, and distribute such a combined library, provided that the separate distribution of the work based on the Library and of the other library facilities is otherwise permitted, and provided that you do these two things:
-
-    * a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities. This must be distributed under the terms of the Sections above.
-    * b) Give prominent notice with the combined library of the fact that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work. 
-
-8. You may not copy, modify, sublicense, link with, or distribute the Library except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, link with, or distribute the Library is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance.
-
-9. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Library or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Library (or any work based on the Library), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Library or works based on it.
-
-10. Each time you redistribute the Library (or any work based on the Library), the recipient automatically receives a license from the original licensor to copy, distribute, link with or modify the Library subject to these terms and conditions. You may not impose any further restrictions on the recipients&apos; exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties with this License.
-
-11. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Library at all. For example, if a patent license would not permit royalty-free redistribution of the Library by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Library.
-
-If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply, and the section as a whole is intended to apply in other circumstances.
-
-It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice.
-
-This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License.
-
-12. If the distribution and/or use of the Library is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Library under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License.
-
-13. The Free Software Foundation may publish revised and/or new versions of the Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns.
-
-Each version is given a distinguishing version number. If the Library specifies a version number of this License which applies to it and &quot;any later version&quot;, you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Library does not specify a license version number, you may choose any version ever published by the Free Software Foundation.
-
-14. If you wish to incorporate parts of the Library into other free programs whose distribution conditions are incompatible with these, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally.
-
-NO WARRANTY
-
-15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE LIBRARY &quot;AS IS&quot; WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
-
-16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
-   </license>
-
-   <requires>
-      <import plugin="org.eclipse.ui"/>
-      <import plugin="org.eclipse.core.runtime"/>
-      <import plugin="org.eclipse.core.resources"/>
-      <import plugin="org.eclipse.jdt.core"/>
-      <import plugin="org.scribble.eclipse"/>
-      <import plugin="org.scribble.conversation.model"/>
-      <import plugin="org.scribble.lang.model"/>
-      <import plugin="org.scribble.core"/>
-   </requires>
-
-   <plugin
-         id="org.jboss.savara.tools.jbossesb"
-         download-size="0"
-         install-size="0"
-         version="0.0.0"
-         unpack="false"/>
-
-   <plugin
-         id="org.jboss.savara.tools.jbossesb.cdl"
-         download-size="0"
-         install-size="0"
-         version="0.0.0"
-         unpack="false"/>
-
-</feature>

Deleted: tools/eclipse/trunk/features/org.pi4soa.bpmn.feature/build.properties
===================================================================
--- tools/eclipse/trunk/features/org.pi4soa.bpmn.feature/build.properties	2010-02-16 21:31:20 UTC (rev 167)
+++ tools/eclipse/trunk/features/org.pi4soa.bpmn.feature/build.properties	2010-03-06 20:53:29 UTC (rev 168)
@@ -1 +0,0 @@
-bin.includes = feature.xml

Deleted: tools/eclipse/trunk/features/org.pi4soa.bpmn.feature/feature.xml
===================================================================
--- tools/eclipse/trunk/features/org.pi4soa.bpmn.feature/feature.xml	2010-02-16 21:31:20 UTC (rev 167)
+++ tools/eclipse/trunk/features/org.pi4soa.bpmn.feature/feature.xml	2010-03-06 20:53:29 UTC (rev 168)
@@ -1,41 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<feature
-      id="org.pi4soa.feature.bpmn"
-      label="pi4soa BPMN Feature"
-      version="3.0.0.qualifier"
-      provider-name="www.pi4soa.org">
-
-   <description>
-      This is the pi4soa BPMN feature.
-   </description>
-
-   <copyright url="http://www.pi4tech.com">
-      Copyright 2005-7 Pi4 Technologies Ltd
-   </copyright>
-
-   <license url="http://www.apache.org/licenses/LICENSE-2.0.html">
-      The pi4soa tools suite is licensed under the open source Apache License, version 2.0.
-http://www.apache.org/licenses/LICENSE-2.0.html
-   </license>
-
-   <includes
-         id="org.eclipse.stp.bpmn.feature"
-         version="0.0.0"/>
-
-   <requires>
-      <import plugin="org.eclipse.ui"/>
-      <import plugin="org.eclipse.core.runtime"/>
-      <import plugin="org.pi4soa.service"/>
-      <import plugin="org.pi4soa.cdl"/>
-      <import plugin="org.eclipse.gmf.runtime.notation"/>
-      <import plugin="org.eclipse.core.resources"/>
-   </requires>
-
-   <plugin
-         id="org.pi4soa.bpmn"
-         download-size="0"
-         install-size="0"
-         version="0.0.0"
-         unpack="false"/>
-
-</feature>

Deleted: tools/eclipse/trunk/features/org.pi4soa.monitor.feature/build.properties
===================================================================
--- tools/eclipse/trunk/features/org.pi4soa.monitor.feature/build.properties	2010-02-16 21:31:20 UTC (rev 167)
+++ tools/eclipse/trunk/features/org.pi4soa.monitor.feature/build.properties	2010-03-06 20:53:29 UTC (rev 168)
@@ -1,4 +0,0 @@
-bin.includes = feature.xml
-src.includes = feature.xml,\
-               build.properties,\
-               .project

Deleted: tools/eclipse/trunk/features/org.pi4soa.monitor.feature/feature.xml
===================================================================
--- tools/eclipse/trunk/features/org.pi4soa.monitor.feature/feature.xml	2010-02-16 21:31:20 UTC (rev 167)
+++ tools/eclipse/trunk/features/org.pi4soa.monitor.feature/feature.xml	2010-03-06 20:53:29 UTC (rev 168)
@@ -1,53 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<feature
-      id="org.pi4soa.monitor.feature"
-      label="pi4soa Monitor"
-      version="3.0.0.qualifier"
-      provider-name="www.pi4soa.org">
-
-   <description>
-      This is the pi4soa monitor feature.
-   </description>
-
-   <copyright url="http://www.example.com/copyright">
-      Copyright 2005-7 Pi4 Technologies Ltd
-
-Licensed under the Apache License, Version 2.0 (the &quot;License&quot;); you may not use this file except in compliance with the License.
-
-You may obtain a copy of the License at
-
-     http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an &quot;AS IS&quot; BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
-   </copyright>
-
-   <license url="http://www.apache.org/licenses/LICENSE-2.0.html">
-      The pi4soa tools suite is licensed under the open source Apache License, version 2.0.
-http://www.apache.org/licenses/LICENSE-2.0.html
-   </license>
-
-   <requires>
-      <import plugin="org.eclipse.ui"/>
-      <import plugin="org.eclipse.core.runtime"/>
-      <import plugin="org.pi4soa.service"/>
-      <import plugin="org.pi4soa.cdl"/>
-      <import plugin="org.eclipse.core.resources"/>
-      <import plugin="org.eclipse.debug.core"/>
-      <import plugin="org.eclipse.jdt.launching"/>
-      <import plugin="org.eclipse.ui.ide"/>
-      <import plugin="org.eclipse.jface"/>
-      <import plugin="org.eclipse.jdt.debug.ui"/>
-      <import plugin="org.eclipse.ui.console"/>
-      <import plugin="org.eclipse.debug.ui"/>
-      <import plugin="org.eclipse.jdt.core"/>
-      <import feature="org.pi4soa.core.feature" version="3.0.0" match="greaterOrEqual"/>
-   </requires>
-
-   <plugin
-         id="org.pi4soa.monitor"
-         download-size="0"
-         install-size="0"
-         version="0.0.0"
-         unpack="false"/>
-
-</feature>

Added: tools/eclipse/trunk/plugins/eclipse-build/allElements.xml
===================================================================
--- tools/eclipse/trunk/plugins/eclipse-build/allElements.xml	                        (rev 0)
+++ tools/eclipse/trunk/plugins/eclipse-build/allElements.xml	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,118 @@
+<project name="allElements Delegator">
+ 	<!-- ===================================================================== -->
+ 	<!-- Run a given ${target} on all elements being built                     -->
+ 	<!-- Replace element.id with the id of the top level element being built.    -->
+	<!-- If element.id does not exist in ${buildDirectory}/features/element.id   -->
+	<!-- or ${baseLocation}/features/element.id, then you must provide the       -->
+	<!-- location by setting the property "pluginPath"                           -->
+ 	<!-- Add on <ant> task for each top level element being built.             -->
+ 	<!-- ===================================================================== -->
+ 	<target name="allElementsDelegator">
+    	<antcall target="org.scribble.feature"  />
+ 	</target>
+
+ 	<target name="org.scribble.feature" if="mavenCompilePhase">
+ 		<ant antfile="${genericTargets}" target="${target}">
+	 		<property name="type" value="feature" />
+	 		<property name="id" value="org.jboss.savara.tools.bpel.feature" />
+ 		</ant>
+ 		<ant antfile="${genericTargets}" target="${target}">
+	 		<property name="type" value="feature" />
+	 		<property name="id" value="org.jboss.savara.tools.jbossesb.feature" />
+ 		</ant>
+ 		<!--
+ 		<ant antfile="${genericTargets}" target="${target}">
+	 		<property name="type" value="feature" />
+	 		<property name="id" value="org.pi4soa.bpmn.feature" />
+ 		</ant>
+ 		-->
+ 		<ant antfile="${genericTargets}" target="${target}">
+	 		<property name="type" value="feature" />
+	 		<property name="id" value="org.pi4soa.monitor.feature" />
+ 		</ant>
+ 		<ant antfile="${genericTargets}" target="${target}">
+	 		<property name="type" value="feature" />
+	 		<property name="id" value="org.scribble.conversation.feature" />
+ 		</ant>
+ 		<ant antfile="${genericTargets}" target="${target}">
+	 		<property name="type" value="feature" />
+	 		<property name="id" value="org.scribble.experimental.feature" />
+ 		</ant>	
+ 		<ant antfile="${genericTargets}" target="${target}">
+	 		<property name="type" value="feature" />
+	 		<property name="id" value="org.scribble.feature" />
+ 		</ant>
+ 		
+ 		<!--
+ 		<ant antfile="${genericTargets}" target="${target}">
+	 		<property name="type" value="feature" />
+	 		<property name="id" value="org.scribble.java.feature" />
+ 		</ant>
+ 		-->
+ 		
+ 		<ant antfile="${genericTargets}" target="${target}">
+	 		<property name="type" value="feature" />
+	 		<property name="id" value="org.scribble.pi4soa.feature" />
+ 		</ant>
+ 		<ant antfile="${genericTargets}" target="${target}">
+	 		<property name="type" value="feature" />
+	 		<property name="id" value="org.scribble.protocol.feature" />
+ 		</ant>
+ 	</target>    
+
+    
+ 	<!-- ===================================================================== -->
+ 	<!-- Targets to assemble the built elements for particular configurations  -->
+ 	<!-- These generally call the generated assemble scripts (named in         -->
+ 	<!-- ${assembleScriptName}) but may also add pre and post processing       -->
+ 	<!-- Add one target for each root element and each configuration           -->
+ 	<!-- Replace element.id with the id of the top level element being built   -->
+ 	<!-- ===================================================================== -->
+ 	<target name="assemble.org.jboss.savara.tools.bpel.feature">
+ 		<property name="archiveName" value="${org.jboss.savara.tools.bpel.zipFile}"/>
+ 		<ant antfile="${assembleScriptName}" dir="${buildDirectory}"/>
+ 	</target>
+ 	<target name="assemble.org.jboss.savara.tools.jbossesb.feature">
+ 		<property name="archiveName" value="${org.jboss.savara.tools.jbossesb.zipFile}"/>
+ 		<ant antfile="${assembleScriptName}" dir="${buildDirectory}"/>
+ 	</target>
+	<!--
+ 	<target name="assemble.org.pi4soa.bpmn.feature">
+ 		<property name="archiveName" value="${org.pi4soa.bpmn.zipFile}"/>
+ 		<ant antfile="${assembleScriptName}" dir="${buildDirectory}"/>
+ 	</target>
+ 	-->
+ 	<target name="assemble.org.pi4soa.monitor.feature">
+ 		<property name="archiveName" value="${org.pi4soa.monitor.zipFile}"/>
+ 		<ant antfile="${assembleScriptName}" dir="${buildDirectory}"/>
+ 	</target>
+ 	<target name="assemble.org.scribble.conversation.feature">
+ 		<property name="archiveName" value="${org.scribble.conversation.zipFile}"/>
+ 		<ant antfile="${assembleScriptName}" dir="${buildDirectory}"/>
+ 	</target>
+ 	<target name="assemble.org.scribble.experimental.feature">
+ 		<property name="archiveName" value="${org.scribble.experimental.zipFile}"/>
+ 		<ant antfile="${assembleScriptName}" dir="${buildDirectory}"/>
+ 	</target>
+ 	<target name="assemble.org.scribble.feature">
+ 		<property name="archiveName" value="${org.scribble.zipFile}"/>
+ 		<ant antfile="${assembleScriptName}" dir="${buildDirectory}"/>
+ 	</target>
+	
+	<!--
+ 	<target name="assemble.org.scribble.java.feature">
+ 		<property name="archiveName" value="${org.scribble.java.zipFile}"/>
+ 		<ant antfile="${assembleScriptName}" dir="${buildDirectory}"/>
+ 	</target>
+ 	-->
+	
+ 	<target name="assemble.org.scribble.pi4soa.feature">
+ 		<property name="archiveName" value="${org.scribble.pi4soa.zipFile}"/>
+ 		<ant antfile="${assembleScriptName}" dir="${buildDirectory}"/>
+ 	</target>
+ 	<target name="assemble.org.scribble.protocol.feature">
+ 		<property name="archiveName" value="${org.scribble.protocol.zipFile}"/>
+ 		<ant antfile="${assembleScriptName}" dir="${buildDirectory}"/>
+ 	</target>
+    
+</project>

Added: tools/eclipse/trunk/plugins/eclipse-build/build.properties
===================================================================
--- tools/eclipse/trunk/plugins/eclipse-build/build.properties	                        (rev 0)
+++ tools/eclipse/trunk/plugins/eclipse-build/build.properties	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,102 @@
+#product=/plugin or feature id/path/to/.product
+runPackager=true
+scribbleVersion=1.0-SNAPSHOT
+
+# The prefix that will be used in the generated archive.
+archivePrefix=
+# The location underwhich all of the build output will be collected.
+collectingFolder=${archivePrefix}
+
+##sets the zip name
+org.jboss.savara.tools.bpel.zipFile=org.jboss.savara.tools.bpel-eclipse-${scribbleVersion}.zip
+org.jboss.savara.tools.jbossesb.zipFile=org.jboss.savara.tools.jbossesb-eclipse-${scribbleVersion}.zip
+#org.pi4soa.bpmn.zipFile=org.pi4soa.bpmn-eclipse-${scribbleVersion}.zip
+org.pi4soa.monitor.zipFile=org.pi4soa.monitor-eclipse-${scribbleVersion}.zip
+org.scribble.conversation.zipFile=org.scribble.conversation-eclipse-${scribbleVersion}.zip
+org.scribble.experimental.zipFile=org.scribble.experimental-eclipse-${scribbleVersion}.zip
+org.scribble.zipFile=org.scribble-eclipse-${scribbleVersion}.zip
+#org.scribble.java.zipFile=org.scribble.java-eclipse-${scribbleVersion}.zip
+org.scribble.pi4soa.zipFile=org.scribble.pi4soa-eclipse-${scribbleVersion}.zip
+org.scribble.protocol.zipFile=org.scribble.protocol-eclipse-${scribbleVersion}.zip
+
+#Set to true if you want the output to be ready for an update jar (no site.xml g
+
+# Timestamp for the build.  Used in naming the build output
+timestamp=007
+
+# Type of build.  Used in naming the build output.  Typically this value is
+# one of I, N, M, S, ...
+buildType=N
+
+# ID of the build.  Used in naming the build output.
+buildId=scribble-build
+
+# Label for the build.  Used in naming the build output
+buildLabel=${buildType}.${buildId}
+
+#Where the customised scripts live
+builder=.
+base=${builder}/target
+buildDirectory=${base}/eclipse.build
+baseLocation=${base}/eclipse
+
+eclipseDir=/home/gbrown/repositories/savara/tools-eclipse-trunk/plugins/eclipse-build/target
+
+#Os/Ws/Arch/nl of the eclipse specified by baseLocation
+#baseos=win32
+#basews=win32
+#basearch=x86
+
+eclipseGefURL=http://download.eclipse.org/tools/gef/downloads/drops
+eclipseEMFURL=http://download.eclipse.org/modeling/emf/emf/downloads/drops
+eclipseURL=http://download.eclipse.org/eclipse/downloads/drops
+pi4soaURL=http://download.jboss.org/jbosstools/builds/nightly/trunk
+
+orbitURL=http://repository.jboss.com/eclipse/galileo/repos
+
+#eclipseBuildRevision=R-3.4-200806172000
+eclipseBuildRevision=R-3.5.1-200909170800
+#eclipseGefBuildRevision=R200806091334
+eclipseGefBuildRevision=R200909151220
+eclipseEMFBuildRevision=R200906151043
+
+eclipsePi4soaBuildRevision=201003050650
+
+orbitBuildRevision=R20100114021427
+
+#eclipseBuildId=3.4
+eclipseBuildId=3.5.1
+#eclipseGefBuildId=3.4.0
+eclipseGefBuildId=3.5.1
+eclipseEMFBuildId=2.5.0
+
+eclipsePi4soaBuildId=3.2.0.v201003050650N-H45-beta1
+
+#http://download.jboss.org/jbosstools/builds/nightly/trunk/201003050650/all/JBossTools-Update-3.2.0.v201003050650N-H45-beta1.zip
+#http://downloads.sourceforge.net/project/jboss/JBossTools/JBossTools3.1.0.x/JBossTools-Update-3.1.0.v201002250004M-H277-CR2.zip?use_mirror=garr
+
+# We don't want any SCM automation
+skipFetch=true
+
+# Specify the output format of the compiler log when eclipse jdt is used
+logExtension=.log
+
+# Whether or not to include debug info in the output jars
+javacDebugInfo=false
+
+# Whether or not to fail the build if there are compiler errors
+javacFailOnError=true
+
+# Enable or disable verbose mode of the compiler
+javacVerbose=true
+
+# Extra arguments for the compiler. These are specific to the java compiler being used.
+#compilerArg=
+
+# Default value for the version of the source code. This value is used when compiling plug-ins that do not set the Bundle-RequiredExecutionEnvironment or set javacSource in build.properties
+javacSource=1.5
+
+# Default value for the version of the byte code targeted. This value is used when compiling plug-ins that do not set the Bundle-RequiredExecutionEnvironment or set javacTarget in build.properties.
+javacTarget=1.5
+
+

Added: tools/eclipse/trunk/plugins/eclipse-build/build.xml
===================================================================
--- tools/eclipse/trunk/plugins/eclipse-build/build.xml	                        (rev 0)
+++ tools/eclipse/trunk/plugins/eclipse-build/build.xml	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,126 @@
+<project name="Build All Elements" default="main">
+
+<!-- ===================================================================== -->
+<!-- Global properties.  See the build.properties for information on -->
+<!-- the properties which callers can control. -->
+<!-- ===================================================================== -->
+<property name="builder" location="${user.dir}"/>
+<property name="builderDirectory" location="${builder}"/>
+<property name="buildProperties" location="${builder}/build.properties"/>
+<property file="${buildProperties}"/>
+<available property="customTargets" file="${builder}/customTargets.xml" value="${builder}/customTargets.xml"/>
+<property name="customTargets" location="${eclipse.pdebuild.templates}/headless-build/customTargets.xml"/>
+<property name="genericTargets" location="${eclipse.pdebuild.scripts}/genericTargets.xml"/>
+
+<!-- ===================================================================== -->
+<!-- main entry point to setup, fetch, generate, build etc. Use -->
+<!-- the customTargets.xml to modify the build behaviour. -->
+<!-- ===================================================================== -->
+
+<!-- ******* add in the descriptions for each of the top level targets to teh target decl -->
+<target name="main" description="the main build target">	
+  	<antcall target="preBuild" /> 
+ 	<antcall target="fetch" />
+	<antcall target="generate" /> 
+	<antcall target="process" /> 
+	<antcall target="assemble" />
+	<antcall target="package" />
+	<antcall target="postBuild" />
+</target>
+
+<!-- ===================================================================== -->
+<!-- Steps to do before starting the build.  Typical setup includes -->
+<!-- fetching the map files and building the directory.  -->
+<!-- ===================================================================== -->
+<target name="preBuild">
+	<mkdir dir="${buildDirectory}" />
+	<ant antfile="${customTargets}" target="preSetup" /> 
+	<ant antfile="${customTargets}" target="getMapFiles" /> 
+	<concat destfile="${buildDirectory}/directory.txt" fixlastline="yes">
+		<fileset dir="${buildDirectory}" includes="maps/**/*.map"/>
+	</concat>
+	<ant antfile="${customTargets}" target="postSetup" />
+</target>
+
+<!-- ===================================================================== -->
+<!-- Fetch the elements identified in the customTargets -->
+<!-- ===================================================================== -->
+<target name="fetch" unless="skipFetch">
+	<ant antfile="${customTargets}" target="preFetch"/>
+	<!-- Generates and then execute the fetch scripts for each build element-->
+	<ant antfile="${customTargets}" target="allElements">
+		<property name="target" value="fetchElement" />
+	</ant>
+	
+	<ant antfile="${customTargets}" target="postFetch"/>
+</target>
+
+<!-- ===================================================================== -->
+<!-- Generate the build scripts for each element identified in the customTargets -->
+<!-- ===================================================================== -->
+<target name="generate">
+	<ant antfile="${customTargets}" target="preGenerate"/>
+	<!-- Generate the build.xml for each build element-->
+	<ant antfile="${customTargets}" target="allElements">
+		<property name="target" value="generateScript" />
+	</ant>
+	<ant antfile="${customTargets}" target="postGenerate"/>	
+</target>
+
+<!-- ===================================================================== -->
+<!-- Run the build scripts for each element identified in the customTargets -->
+<!-- ===================================================================== -->
+<target name="process">
+	<!-- Run custom tasks before processing, i.e. creating source build zip files -->
+	<ant antfile="${customTargets}" target="preProcess" />
+
+	<!-- Process all of the build elements-->
+	<ant antfile="${customTargets}" target="allElements">
+		<property name="target" value="processElement" />
+	</ant>
+
+	<!-- Run custom tasks after compiling, i.e. reporting compile errors -->
+	<ant antfile="${customTargets}" target="postProcess" />
+</target>
+
+<!-- ===================================================================== -->
+<!-- Assemble the build elements into final distributions -->
+<!-- ===================================================================== -->
+<target name="assemble">
+	<ant antfile="${customTargets}" target="preAssemble"/>
+	<ant antfile="${customTargets}" target="allElements">
+		<property name="target" value="assembleElement"/>
+	</ant>
+	<ant antfile="${customTargets}" target="postAssemble"/>	
+</target>
+
+<!-- ===================================================================== -->
+<!-- Package the build elements into final distributions -->
+<!-- ===================================================================== -->
+<target name="package" if="runPackager">
+	<ant antfile="${customTargets}" target="prePackage"/>
+	<ant antfile="${customTargets}" target="allElements">
+		<property name="target" value="packageElement"/>
+	</ant>
+	<ant antfile="${customTargets}" target="postPackage"/>	
+</target>
+
+<!-- ===================================================================== -->
+<!-- Do any steps required after the build (e.g., posting, testing, ...) -->
+<!-- ===================================================================== -->
+<target name="postBuild">
+	<ant antfile="${customTargets}" target="postBuild" />
+</target>
+
+<!-- ===================================================================== -->
+<!-- Clean the build elements.  This target is here as an entry -->
+<!-- point to the customTargets.  It is not called directly in the normal -->
+<!-- course of events. -->
+<!-- ===================================================================== -->
+<target name="clean">
+  <ant antfile="${customTargets}" target="allElements">
+     <property name="target" value="cleanElement"/>
+  </ant>
+</target>
+
+</project>

Added: tools/eclipse/trunk/plugins/eclipse-build/customTargets.xml
===================================================================
--- tools/eclipse/trunk/plugins/eclipse-build/customTargets.xml	                        (rev 0)
+++ tools/eclipse/trunk/plugins/eclipse-build/customTargets.xml	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,340 @@
+<project name="Build specific targets and properties" default="noDefault">
+	<!-- ===================================================================== -->
+	<!-- Run a given ${base} on all elements being built -->
+	<!-- Add on <ant> task for each top level element being built. -->
+	<!-- ===================================================================== -->
+	<property name="allElementsFile" value="${builder}/allElements.xml"/>
+	<import file="${allElementsFile}" />
+	<target name="allElements">
+		<antcall target="allElementsDelegator" />
+	</target>
+
+	<!-- ===================================================================== -->
+	<!-- ===================================================================== -->
+	<!-- Check out map files from correct repository -->
+	<!-- Replace values for mapsCheckoutTag as desired. -->
+	<!-- ===================================================================== -->
+	<target name="getMapFiles" depends="checkLocalMaps" unless="skipMaps">
+		<property name="mapsCheckoutTag" value="HEAD" />
+		<cvs cvsRoot="${mapsRepo}" package="${mapsRoot}" dest="${buildDirectory}/maps" tag="${mapsCheckoutTag}" />
+	</target>
+
+	<target name="checkLocalMaps">
+		<available property="skipMaps" file="${buildDirectory}/maps" />
+	</target>
+
+	<target name="tagMapFiles" if="tagMaps">
+		<cvs dest="${buildDirectory}/maps/${mapsRoot}" command="tag ${mapsTagTag}" />
+	</target>
+
+	<!-- ===================================================================== -->
+
+	<target name="clean" unless="noclean">
+		<antcall target="allElements">
+			<param name="target" value="cleanElement" />
+		</antcall>
+	</target>
+
+	<target name="gatherLogs">
+		<mkdir dir="${buildDirectory}/${buildLabel}/compilelogs" />
+		<antcall target="allElements">
+			<param name="target" value="gatherLogs" />
+		</antcall>
+		<unzip dest="${buildDirectory}/${buildLabel}/compilelogs" overwrite="true">
+			<fileset dir="${buildDirectory}/features">
+				<include name="**/*.log.zip" />
+			</fileset>
+		</unzip>
+	</target>
+
+	<!-- ===================================================================== -->
+	<!-- Steps to do before setup -->
+	<!-- ===================================================================== -->
+	<target name="preSetup">
+	    <echo>preSetup</echo>	  
+        <!--cleanup -->
+        <delete failonerror="false" file="${baseLocation}/org.drools.eclipse*.xml" />
+        <delete failonerror="false" dir="${base}/test-workspace"/>
+        
+        <delete failonerror="false" dir="${baseLocation}/features/org.scribble.protocol.feature_${scribbleVersion}" />
+        <delete failonerror="false" dir="${baseLocation}/features/org.scribble.protocol.feature_${scribbleVersion}" />
+	</target>
+	
+	<!-- ===================================================================== -->
+	<!-- Steps to do after setup but before starting the build proper -->
+	<!-- ===================================================================== -->
+	<target name="postSetup">		
+		<mkdir dir="${buildDirectory}/features"/>
+		<mkdir dir="${buildDirectory}/plugins"/>
+		
+		<antcall target="compilePostSetup" />
+		<antcall target="testPostSetup" />
+	</target>
+	
+	<target name="compilePostSetup" if="mavenCompilePhase">
+		<copy todir="${buildDirectory}/features/org.jboss.savara.tools.bpel.feature">
+			<fileset dir="${builder}/../org.jboss.savara.tools.bpel.feature"/>
+		</copy>
+  
+		<copy todir="${buildDirectory}/features/org.jboss.savara.tools.jbossesb.feature">
+			<fileset dir="${builder}/../org.jboss.savara.tools.jbossesb.feature"/>
+		</copy>
+  
+		<!--
+		<copy todir="${buildDirectory}/features/org.pi4soa.bpmn.feature">
+			<fileset dir="${builder}/../org.pi4soa.bpmn.feature"/>
+		</copy>
+		-->
+  
+		<copy todir="${buildDirectory}/features/org.pi4soa.monitor.feature">
+			<fileset dir="${builder}/../org.pi4soa.monitor.feature"/>
+		</copy>
+  
+		<copy todir="${buildDirectory}/features/org.scribble.conversation.feature">
+			<fileset dir="${builder}/../org.scribble.conversation.feature"/>
+		</copy>
+  
+		<copy todir="${buildDirectory}/features/org.scribble.experimental.feature">
+			<fileset dir="${builder}/../org.scribble.experimental.feature"/>
+		</copy>
+  
+		<copy todir="${buildDirectory}/features/org.scribble.feature">
+			<fileset dir="${builder}/../org.scribble.feature"/>
+		</copy>
+  
+		<!--
+		<copy todir="${buildDirectory}/features/org.scribble.java.feature">
+			<fileset dir="${builder}/../org.scribble.java.feature"/>
+		</copy>
+		-->
+  
+		<copy todir="${buildDirectory}/features/org.scribble.pi4soa.feature">
+			<fileset dir="${builder}/../org.scribble.pi4soa.feature"/>
+		</copy>
+  
+		<copy todir="${buildDirectory}/features/org.scribble.protocol.feature">
+			<fileset dir="${builder}/../org.scribble.protocol.feature"/>
+		</copy>
+	  
+        <copy todir="${buildDirectory}/plugins/org.jboss.savara.tools.bpel">
+			<fileset dir="${builder}/../org.jboss.savara.tools.bpel"/>
+		</copy>         
+        
+        <copy todir="${buildDirectory}/plugins/org.jboss.savara.tools.jbossesb">
+			<fileset dir="${builder}/../org.jboss.savara.tools.jbossesb"/>
+		</copy>         
+        
+        <copy todir="${buildDirectory}/plugins/org.jboss.savara.tools.jbossesb.cdl">
+			<fileset dir="${builder}/../org.jboss.savara.tools.jbossesb.cdl"/>
+		</copy>         
+        
+        <copy todir="${buildDirectory}/plugins/org.jboss.savara.tools.wsdl">
+			<fileset dir="${builder}/../org.jboss.savara.tools.wsdl"/>
+		</copy>         
+        
+		<!--
+        <copy todir="${buildDirectory}/plugins/org.pi4soa.bpmn">
+			<fileset dir="${builder}/../org.pi4soa.bpmn"/>
+		</copy>
+		-->         
+        
+        <copy todir="${buildDirectory}/plugins/org.pi4soa.monitor">
+			<fileset dir="${builder}/../org.pi4soa.monitor"/>
+		</copy>         
+        
+        <copy todir="${buildDirectory}/plugins/org.scribble.conformance">
+			<fileset dir="${builder}/../org.scribble.conformance"/>
+		</copy>         
+        
+        <copy todir="${buildDirectory}/plugins/org.scribble.contract.model">
+			<fileset dir="${builder}/../org.scribble.contract.model"/>
+		</copy>         
+        
+        <copy todir="${buildDirectory}/plugins/org.scribble.conversation.comparator">
+			<fileset dir="${builder}/../org.scribble.conversation.comparator"/>
+		</copy>         
+        
+        <copy todir="${buildDirectory}/plugins/org.scribble.conversation.eclipse">
+			<fileset dir="${builder}/../org.scribble.conversation.eclipse"/>
+		</copy>         
+        
+        <copy todir="${buildDirectory}/plugins/org.scribble.conversation.export.monitor">
+			<fileset dir="${builder}/../org.scribble.conversation.export.monitor"/>
+		</copy>         
+        
+        <copy todir="${buildDirectory}/plugins/org.scribble.conversation.export.text">
+			<fileset dir="${builder}/../org.scribble.conversation.export.text"/>
+		</copy>         
+        
+        <copy todir="${buildDirectory}/plugins/org.scribble.conversation.model">
+			<fileset dir="${builder}/../org.scribble.conversation.model"/>
+		</copy>         
+        
+        <copy todir="${buildDirectory}/plugins/org.scribble.conversation.parser">
+			<fileset dir="${builder}/../org.scribble.conversation.parser"/>
+		</copy>         
+        
+        <copy todir="${buildDirectory}/plugins/org.scribble.conversation.projector">
+			<fileset dir="${builder}/../org.scribble.conversation.projector"/>
+		</copy>         
+        
+        <copy todir="${buildDirectory}/plugins/org.scribble.conversation.validation">
+			<fileset dir="${builder}/../org.scribble.conversation.validation"/>
+		</copy>         
+        
+        <copy todir="${buildDirectory}/plugins/org.scribble.core">
+			<fileset dir="${builder}/../org.scribble.core"/>
+		</copy>         
+        
+        <copy todir="${buildDirectory}/plugins/org.scribble.eclipse">
+			<fileset dir="${builder}/../org.scribble.eclipse"/>
+		</copy>         
+        
+        <copy todir="${buildDirectory}/plugins/org.scribble.expression.xpath">
+			<fileset dir="${builder}/../org.scribble.expression.xpath"/>
+		</copy>         
+        
+        <copy todir="${buildDirectory}/plugins/org.scribble.lang.comparator">
+			<fileset dir="${builder}/../org.scribble.lang.comparator"/>
+		</copy>         
+            
+        <copy todir="${buildDirectory}/plugins/org.scribble.lang.model">
+			<fileset dir="${builder}/../org.scribble.lang.model"/>
+		</copy>         
+            
+        <copy todir="${buildDirectory}/plugins/org.scribble.monitor">
+			<fileset dir="${builder}/../org.scribble.monitor"/>
+		</copy>         
+            
+        <copy todir="${buildDirectory}/plugins/org.scribble.pi4soa.cdm">
+			<fileset dir="${builder}/../org.scribble.pi4soa.cdm"/>
+		</copy>         
+            
+        <copy todir="${buildDirectory}/plugins/org.scribble.protocol.comparator">
+			<fileset dir="${builder}/../org.scribble.protocol.comparator"/>
+		</copy>         
+            
+        <copy todir="${buildDirectory}/plugins/org.scribble.protocol.eclipse">
+			<fileset dir="${builder}/../org.scribble.protocol.eclipse"/>
+		</copy>         
+            
+        <copy todir="${buildDirectory}/plugins/org.scribble.protocol.export.text">
+			<fileset dir="${builder}/../org.scribble.protocol.export.text"/>
+		</copy>         
+            
+        <copy todir="${buildDirectory}/plugins/org.scribble.protocol.model">
+			<fileset dir="${builder}/../org.scribble.protocol.model"/>
+		</copy>         
+            
+        <copy todir="${buildDirectory}/plugins/org.scribble.protocol.parser">
+			<fileset dir="${builder}/../org.scribble.protocol.parser"/>
+		</copy>         
+            
+        <copy todir="${buildDirectory}/plugins/org.scribble.protocol.projector">
+			<fileset dir="${builder}/../org.scribble.protocol.projector"/>
+		</copy>         
+                
+        <copy todir="${buildDirectory}/plugins/org.scribble.protocol.validation">
+			<fileset dir="${builder}/../org.scribble.protocol.validation"/>
+		</copy>         
+                
+	</target>
+
+	<target name="testPostSetup" if="mavenTestPhase">		
+		
+	</target>
+
+	<!-- ===================================================================== -->
+	<!-- Steps to do before fetching the build elements -->
+	<!-- ===================================================================== -->
+	<target name="preFetch">
+	</target>
+
+	<!-- ===================================================================== -->
+	<!-- Steps to do after fetching the build elements -->
+	<!-- ===================================================================== -->
+	<target name="postFetch">
+	</target>
+
+	<!-- ===================================================================== -->
+	<!-- Steps to do before generating the build scripts. -->
+	<!-- ===================================================================== -->
+	<target name="preGenerate">
+	</target>
+
+	<!-- ===================================================================== -->
+	<!-- Steps to do after generating the build scripts. -->
+	<!-- ===================================================================== -->
+	<target name="postGenerate">
+		<antcall target="clean" />
+	</target>
+
+	<!-- ===================================================================== -->
+	<!-- Steps to do before running the build.xmls for the elements being built. -->
+	<!-- ===================================================================== -->
+	<target name="preProcess">
+	</target>
+
+	<!-- ===================================================================== -->
+	<!-- Steps to do after running the build.xmls for the elements being built. -->
+	<!-- ===================================================================== -->
+	<target name="postProcess">
+	</target>
+
+	<!-- ===================================================================== -->
+	<!-- Steps to do before running assemble. -->
+	<!-- ===================================================================== -->
+	<target name="preAssemble">
+	</target>
+
+	<!-- ===================================================================== -->
+	<!-- Steps to do after  running assemble. -->
+	<!-- ===================================================================== -->
+	<target name="postAssemble">
+	</target>
+
+	<!-- ===================================================================== -->
+	<!-- Steps to do before running package. -->
+	<!-- ===================================================================== -->
+	<target name="prePackage">
+	</target>
+
+	<!-- ===================================================================== -->
+	<!-- Steps to do after  running package. -->
+	<!-- ===================================================================== -->
+	<target name="postPackage" if="mavenCompilePhase">
+        <copy todir="${base}">
+            <fileset dir="${buildDirectory}/${buildLabel}">
+                <include name="*.zip"/>
+            </fileset>
+        </copy>
+	</target>
+
+	<!-- ===================================================================== -->
+	<!-- Steps to do after the build is done. -->
+	<!-- ===================================================================== -->
+	<target name="postBuild">
+		<antcall target="gatherLogs" />
+		<antcall target="test" />
+	</target>	
+
+	<!-- ===================================================================== -->
+	<!-- Steps to do to test the build results -->
+	<!-- ===================================================================== -->
+  <target name="test" if="mavenTestPhase">  
+  </target>
+
+	<!-- ===================================================================== -->
+	<!-- Steps to do to publish the build results -->
+	<!-- ===================================================================== -->
+	<target name="publish">
+	</target>
+
+	<!-- ===================================================================== -->
+	<!-- Default target                                                        -->
+	<!-- ===================================================================== -->
+	<target name="noDefault">
+		<echo message="You must specify a target when invoking this file" />
+	</target>
+
+</project>

Added: tools/eclipse/trunk/plugins/eclipse-build/dependencies/javax.wsdl_1.5.1.v200806030408.jar
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/eclipse-build/dependencies/javax.wsdl_1.5.1.v200806030408.jar
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/eclipse-build/dependencies/javax.xml_1.3.4.v200902170245.jar
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/eclipse-build/dependencies/javax.xml_1.3.4.v200902170245.jar
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/eclipse-build/dependencies/org.apache.xalan_2.7.1.v200905122109.jar
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/eclipse-build/dependencies/org.apache.xalan_2.7.1.v200905122109.jar
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/eclipse-build/dependencies/org.apache.xerces_2.9.0.v200909240008.jar
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/eclipse-build/dependencies/org.apache.xerces_2.9.0.v200909240008.jar
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/eclipse-build/dependencies/org.apache.xml.resolver_1.2.0.v200902170519.jar
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/eclipse-build/dependencies/org.apache.xml.resolver_1.2.0.v200902170519.jar
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/eclipse-build/dependencies/org.apache.xml.serializer_2.7.1.v200902170519.jar
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/eclipse-build/dependencies/org.apache.xml.serializer_2.7.1.v200902170519.jar
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/eclipse-build/genericTargets.xml
===================================================================
--- tools/eclipse/trunk/plugins/eclipse-build/genericTargets.xml	                        (rev 0)
+++ tools/eclipse/trunk/plugins/eclipse-build/genericTargets.xml	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,175 @@
+<project name="Generic Build Targets" default="noDefault">
+
+<!-- Properties that must be passed to this script:
+	buildDirectory
+	id
+	type
+	ignoreTagInfo
+	recursiveGeneration
+	workingDirectory
+	configInfo
+-->
+
+<!-- ===================================================================== -->
+<!-- Setup default values -->
+<!--   configs : by default build a platform-independent configuration -->
+<!--   fetchTag : by default use the CVS tags as spec'd in directory.txt -->
+<!-- ===================================================================== -->
+<property name="configs" value="*,*,*"/>
+<property name="fetchTag" value=""/>
+<property name="buildingOSGi" value="true"/>
+<property name="generateJnlp" value="false"/>
+<property name="signJars" value="false"/>
+<property name="generateFeatureVersionSuffix" value="false" />
+<property name="generateVersionsLists" value="true" />
+<property name="groupConfigurations" value="false"/>
+<property name="pluginPath" value=""/>
+<property name="filteredDependencyCheck" value="false"/>
+
+<!-- ===================================================================== -->
+<!-- Fetch a single element (feature, plugin, fragment) -->
+<!-- ===================================================================== -->
+<target name="fetchElement" description="Checking out source from repository..." depends="init">
+	<mkdir dir="${buildDirectory}/features"/>
+	<mkdir dir="${buildDirectory}/plugins"/>
+	<eclipse.fetch
+		elements="${type}@${id}"
+		buildDirectory="${buildDirectory}"
+		directory="${buildDirectory}/directory.txt"
+		fetchTag="${fetchTag}"
+		configInfo="${configs}"
+		baseLocation="${baseLocation}"
+	/>
+	
+	<!-- Run generated fetch script -->
+	<ant antfile="${buildDirectory}/fetch_${id}.xml">
+		<!-- ************  should not have to spec these  *************** -->
+		<property name="featureOnly" value="true"/>
+		<property name="featureAndPlugins" value="true"/>
+		<property name="featuresRecursively" value="true"/>
+	</ant>
+</target>
+
+<!-- ===================================================================== -->
+<!-- Clean previously built elements -->
+<!-- ===================================================================== -->
+<target name="cleanElement" description="Scrubbing features and plugins of old jars..." depends="init">
+<echo message="${elementPath}"/>
+	<ant antfile="build.xml" dir="${elementPath}" target="clean"/>
+</target>
+
+<!-- ===================================================================== -->
+<!-- Generate a build.xml file for an element -->
+<!-- ===================================================================== -->
+<target name="generateScript" description="Generating build scripts..." depends="init">
+	<eclipse.buildScript 
+		elements="${type}@${id}" 
+		buildDirectory="${buildDirectory}"
+		configInfo="${configs}"
+		baseLocation="${baseLocation}"
+		buildingOSGi="${buildingOSGi}"
+		outputUpdateJars="${outputUpdateJars}"
+		archivesFormat="${archivesFormat}"
+		product="${product}"
+		forceContextQualifier="${forceContextQualifier}"
+		generateJnlp="${generateJnlp}"
+		signJars="${signJars}"
+		generateFeatureVersionSuffix="${generateFeatureVersionSuffix}"
+		significantVersionDigits="${significantVersionDigits}"
+		generatedVersionLength="${generatedVersionLength}"
+		generateVersionsLists="${generateVersionsLists}"
+		groupConfiguration="${groupConfigurations}"
+		pluginPath="${pluginPath}"
+		filteredDependencyCheck="${filteredDependencyCheck}"
+		platformProperties="${platformProperties}"
+	/>
+</target>
+
+<!-- ===================================================================== -->
+<!-- Run build.xml for a single element-->
+<!-- ===================================================================== -->
+<target name="processElement" description="Processing build scripts..." depends="init">
+	<ant antfile="build.xml" dir="${elementPath}" target="build.jars">
+		<property name="target" value="build.jars"/>
+	</ant>
+</target>
+
+<!-- **********************
+1) the gather targets do more than just gather.  These are packaging targets.
+We need to continue ot separate the two concepts (gather and package) as 
+the packaging is different if we wanted to create an update site packaging
+(for example).  The gathers are commented out for now as the new generated
+scripts do not seem to have them.
+
+2) do we really need the ws and os properties?  In all cases?  Do they have to be 
+set here?
+-->
+
+<!-- ===================================================================== -->
+<!-- Gather items listed in bin.includes -->
+<!-- ===================================================================== -->
+<target name="gatherBinaries" description="Gathering binary distribution..." depends="init">
+	<!-- ant antfile="build.xml" dir="${elementPath}" target="gather.bin.parts"/ -->
+	<ant antfile="build.xml" dir="${elementPath}" target="zip.distribution">
+		<property name="os" value="${os}" />
+		<property name="ws" value="${ws}" />	
+	</ant>
+</target>
+
+<!-- ===================================================================== -->
+<!-- Gather source for a build element -->
+<!-- ===================================================================== -->
+<target name="gatherSources" description="Gathering source distribution..." depends="init">
+	<!--suspect:  this call is required to create the *.src.zip inside each plugin-->
+	<ant antfile="build.xml" dir="${elementPath}" target="build.sources">
+		<property name="os" value="${os}" />
+		<property name="ws" value="${ws}" />	
+	</ant>
+	<ant antfile="build.xml" dir="${elementPath}" target="zip.sources">
+		<property name="os" value="${os}" />
+		<property name="ws" value="${ws}" />	
+	</ant>
+</target>
+
+<!-- ===================================================================== -->
+<!-- Gather log files for an element -->
+<!-- Suspect: We just unzip these right away -->
+<!-- ===================================================================== -->
+<target name="gatherLogs" description="Gathering build logs..." depends="init">
+	<ant antfile="build.xml" dir="${elementPath}" target="zip.logs" >
+		<property name="buildDirectory" value="${buildDirectory}" />
+	</ant>
+</target>
+
+<!-- ===================================================================== -->
+<!-- Default target                                                        -->
+<!-- ===================================================================== -->
+<target name="noDefault">
+	<echo message="This file must be called with explicit targets" />
+</target>
+
+<!-- ===================================================================== -->
+<!-- Assemble one build element -->
+<!-- ===================================================================== -->
+<target name="assembleElement" description="Assembling the build..." depends="init">
+	<ant antfile="assemble.${id}.all.xml" dir="${buildDirectory}"/>
+</target>
+
+<!-- ===================================================================== -->
+<!-- Package one build element -->
+<!-- ===================================================================== -->
+<target name="packageElement" description="Packaging the build..." depends="init">
+	<ant antfile="package.${id}.all.xml" dir="${buildDirectory}"/>
+</target>
+	
+<!-- ===================================================================== -->
+<!-- Miscellaneous helper targets -->
+<!-- ===================================================================== -->
+<target name="init">
+	<condition property="elementPath" value="${buildDirectory}/plugins/${id}">
+		<equals arg1="${type}" arg2="fragment" />
+	</condition>
+	<property name="elementPath" value="${buildDirectory}/${type}s/${id}" />
+</target>
+
+</project>

Added: tools/eclipse/trunk/plugins/eclipse-build/installJBossTools.xml
===================================================================
--- tools/eclipse/trunk/plugins/eclipse-build/installJBossTools.xml	                        (rev 0)
+++ tools/eclipse/trunk/plugins/eclipse-build/installJBossTools.xml	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,232 @@
+<project default="install">
+	<!-- 
+	
+		REQUIRMENTS:
+		
+		This script requires Ant-Contrib. If missing, it will attempt to download 
+		it from Sourceforge.net for you.
+		
+		COMMANDLINE PARAMS:
+		
+		install   - csv list of features to install; if missing, install ALL found features.
+		
+		sourceZip - /full/path/to/jboss-tools-update.zip; zip must exist
+		
+		targetDir - /full/path/to/an/existing/jbdevstudio/eclipse; folder must exist
+		
+		OPTIONAL / MAY BE REQUIRED:
+		
+		JAVA_HOME - /full/path/to/java/home; default to /usr/lib/jvm/java
+		
+		otherRepos - csv list of local, zipped, or remote update sites from which to install 
+			prereqs (eg., BIRT, Maven); may want these sites: 
+			http://download.eclipse.org/releases/galileo/,\
+			http://download.eclipse.org/birt/update-site/2.5/,\
+			http://m2eclipse.sonatype.org/update-dev
+			
+		RUNNING THIS SCRIPT:
+		
+		ant -f installJBossTools.xml \
+			-DJAVA_HOME=/usr/lib/jvm/java \
+			-DsourceZip=/home/nboldt/eclipse/35clean/JBossTools-Update-3.1.0.v200909102049M-H274-M3.zip \
+			-DtargetDir=/home/nboldt/eclipse/35clean/eclipse \
+			-Dinstall=org.jboss.tools.jmx.sdk.feature.feature.group
+	-->
+	
+	<property name="install" value=""/>
+	<property name="otherRepos" value=""/>
+
+	<property name="sourceZip" value=""/>
+	<property name="targetDir" value=""/>
+	<property name="JAVA_HOME" value="/usr/lib/jvm/java"/>
+
+	<target name="install" depends="init">
+		<if>
+			<or>
+				<not>
+					<isset property="targetDir"/>
+				</not>
+				<equals arg1="${targetDir}" arg2=""/>
+				<not>
+					<available file="${targetDir}" type="dir"/>
+				</not>
+			</or>
+			<then>
+				<fail>
+				ERROR!
+				Must specify path to an existing Eclipse or JBoss Developer Studio  
+				install folder into which features will be installed.
+				</fail>
+			</then>
+		</if>
+
+		<if>
+			<or>
+				<not>
+					<isset property="sourceZip"/>
+				</not>
+				<equals arg1="${sourceZip}" arg2=""/>
+			</or>
+			<then>
+				<fail>
+ERROR!
+Must specify path to a previously downloaded JBoss Tools 
+or JBoss Developer Studio Update site zip.  
+</fail>
+			</then>
+		</if>
+
+		<if>
+			<not>
+				<available file="${sourceZip}" type="file"/>
+			</not>
+			<then>
+				<fail>ERROR!
+Cannot find sourceZip in ${sourceZip}. 
+</fail>
+			</then>
+		</if>
+
+		<if>
+			<or>
+				<not>
+					<isset property="install"/>
+				</not>
+				<equals arg1="${install}" arg2=""/>
+			</or>
+			<then>
+				<!-- for update site zips, dest must be ${temp.dir}/eclipse; for SDKs, ${temp.dir} -->
+				<tempfile property="temp.dir"/>
+				<mkdir dir="${temp.dir}/eclipse"/>
+				<unzip src="${sourceZip}" dest="${temp.dir}/eclipse" overwrite="false"/>
+
+				<!-- collect features to install if not specified -->
+				<var name="install" value=""/>
+				<for param="featureJar">
+					<path>
+						<fileset dir="${temp.dir}/eclipse/features" includes="*.jar"/>
+					</path>
+					<sequential>
+						<var name="feature.jarfile" unset="true"/>
+						<var name="feature.id" unset="true"/>
+						<propertyregex property="feature.jarfile" defaultvalue="@{featureJar}" input="@{featureJar}" regexp=".+/features/([^/]+\.jar)" replace="\1" override="true"/>
+						<propertyregex property="feature.id" defaultvalue="${feature.jarfile}" input="${feature.jarfile}" regexp="([^_]+)_(\d+\.\d+\.\d+\..+)\.jar" replace="\1" override="true"/>
+						<var name="install" value="${install},${feature.id}.feature.group"/>
+						<var name="feature.jarfile" unset="true"/>
+						<var name="feature.id" unset="true"/>
+					</sequential>
+				</for>
+				<!-- trim prefix "," -->
+				<propertyregex property="install" input="${install}" defaultvalue="${install}" regexp=",(.+)" replace="\1" override="true"/>
+				<delete dir="${temp.dir}"/>
+			</then>
+		</if>
+
+		<if>
+			<and>
+				<isset property="otherRepos"/>
+				<not>
+					<equals arg1="${otherRepos}" arg2=""/>
+				</not>
+			</and>
+			<then>
+				<var name="p2.director.input.repo" value="jar:file:${sourceZip}!/,${otherRepos}"/>
+			</then>
+			<else>
+				<var name="p2.director.input.repo" value="jar:file:${sourceZip}!/"/>
+			</else>
+		</if>
+
+
+		<antcall target="run.director">
+			<param name="p2.director.installIU" value="${install}"/>
+			<param name="p2.director.install.path" value="${targetDir}"/>
+			<param name="p2.director.input.repo" value="${p2.director.input.repo}"/>
+		</antcall>
+
+	</target>
+
+	<target name="run.director">
+		<property name="p2.director.extraArgs" value=""/>
+		<property name="p2.director.installIU" value="${install}"/>
+		<property name="p2.director.install.path" value="${targetDir}"/>
+		<property name="p2.director.input.repo" value="jar:file:${sourceZip}!/"/>
+		<echo>
+Source Repo(s): ${p2.director.input.repo}
+Install Path: ${p2.director.install.path}
+Feature(s) or Plugin(s) to Install:
+${install}
+ </echo>
+
+		<mkdir dir="${p2.director.install.path}"/>
+		<chmod perm="ugo+rwx" file="${p2.director.install.path}/eclipse"/>
+		<exec executable="${p2.director.install.path}/eclipse" failonerror="true" dir="${p2.director.install.path}" timeout="900000" taskname="p2.dir">
+			<arg line=" -vm ${JAVA_HOME}/bin/java"/>
+			<!-- deprecated application for Eclipse 3.4: org.eclipse.equinox.p2.director.app.application -->
+			<arg line=" -application org.eclipse.equinox.p2.director"/>
+			<arg line=" -nosplash"/>
+			<arg line=" --launcher.suppressErrors"/>
+			<arg line=" -consoleLog"/>
+			<arg line=" -flavor tooling"/>
+			<arg line=" -roaming"/>
+			<arg line=" -profile SDKProfile"/>
+			<arg line=" -destination ${p2.director.install.path}"/>
+			<arg line=" -bundlepool ${p2.director.install.path}"/>
+			<arg line=" -installIU ${p2.director.installIU}"/>
+			<arg line=" -metadataRepository ${p2.director.input.repo},file:${p2.director.install.path}/p2/org.eclipse.equinox.p2.engine/profileRegistry/SDKProfile.profile"/>
+			<arg line=" -artifactRepository ${p2.director.input.repo},file:${p2.director.install.path}"/>
+			<arg line=" -profileProperties org.eclipse.update.install.features=true"/>
+			<arg line=" -vmargs"/>
+			<arg line=" -Declipse.p2.data.area=${p2.director.install.path}/p2"/>
+			<arg line=" -Declipse.p2.MD5Check=false"/>
+		</exec>
+	</target>
+
+	<target name="check.ant-contrib" if="antContribJarUnavailable">
+		<antcall target="get.ant-contrib"/>
+		<available file="ant-contrib.jar" property="antContribJarAvailable"/>
+		<fail unless="antContribJarAvailable">Error! 
+
+Ant-Contrib 1.0b2 is required. Download it from http://downloads.sourceforge.net/ant-contrib/ant-contrib-1.0b2-bin.zip,
+then place it in one of the following 4 locations. You can also redefine these paths in your build.properties file:
+
+./ant-contrib.jar
+  or
+/usr/share/java/ant-contrib.jar
+</fail>
+	</target>
+
+	<target name="get.ant-contrib">
+		<get src="http://downloads.sourceforge.net/ant-contrib/ant-contrib-1.0b2-bin.zip" dest="/tmp/ant-contrib-1.0b2-bin.zip" usetimestamp="true"/>
+		<touch file="/tmp/ant-contrib-1.0b2-bin.zip"/>
+		<unzip src="/tmp/ant-contrib-1.0b2-bin.zip" dest="/tmp/ant-contrib-1.0b2-bin.zip_" overwrite="true"/>
+		<copy file="/tmp/ant-contrib-1.0b2-bin.zip_/ant-contrib/lib/ant-contrib.jar" tofile="./ant-contrib.jar" failonerror="true"/>
+		<delete dir="/tmp/ant-contrib-1.0b2-bin.zip_" includeemptydirs="true" quiet="true"/>
+		<delete file="/tmp/ant-contrib-1.0b2-bin.zip" quiet="true"/>
+	</target>
+
+	<target name="init">
+		<condition property="antContribJarUnavailable">
+			<not>
+				<or>
+					<available file="/usr/share/java/ant-contrib.jar" type="file"/>
+					<available file="../lib/ant-contrib.jar" type="file"/>
+					<available file="./ant-contrib.jar" type="file"/>
+				</or>
+			</not>
+		</condition>
+		<antcall target="check.ant-contrib"/>
+		<!-- This will fail if ant-contrib.jar cannot be found. You can install Ant-Contrib via RPM, or download it here:
+			http://downloads.sourceforge.net/ant-contrib/ant-contrib-1.0b2-bin.zip
+	-->
+		<taskdef resource="net/sf/antcontrib/antlib.xml">
+			<classpath>
+				<pathelement location="/usr/share/java/ant-contrib.jar"/>
+				<pathelement location="../lib/ant-contrib.jar"/>
+				<pathelement location="./ant-contrib.jar"/>
+			</classpath>
+		</taskdef>
+
+	</target>
+
+</project>

Added: tools/eclipse/trunk/plugins/eclipse-build/package.xml
===================================================================
--- tools/eclipse/trunk/plugins/eclipse-build/package.xml	                        (rev 0)
+++ tools/eclipse/trunk/plugins/eclipse-build/package.xml	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,88 @@
+<project name="packager" default="main" basedir=".">
+	<target name="init">
+		<mkdir dir="${workingDirectory}"/>
+		<mkdir dir="${downloadDirectory}"/>
+		<mkdir dir="${tempDirectory}"/>
+	</target>
+
+	<target name="retrieveMapFiles" unless="skipMaps">
+		<available property="mapsFetched" file="${workingDirectory}/all.maps"/>
+		<ant antfile="${customTargets}" target="getMapFiles" />
+		<concat destfile="${workingDirectory}/all.maps">
+			<fileset dir="${downloadDirectory}" includes="**/*.map"/>
+		</concat>
+	</target>
+
+	<!-- take the content of all.maps, retrieve the files according to the filtering options (config, content), 
+	and generate a directory.txt for the rest of the process using config as a key, and containing the name of the zip and the directory -->
+	<target name="retrieveFiles" unless="skipFetch">
+		<eclipse.fetchFilesGenerator map="${workingDirectory}/all.maps"
+									workingDirectory="${workingDirectory}"
+									configInfo="${config}"
+									contentFilter="${contentFilter}"
+									componentFilter="${componentFilter}"/>
+		<ant antfile="fetch.xml" dir="${workingDirectory}" />
+	</target>
+
+	<!-- Process the directory.txt to create unzipper.xml, and run unzipper.xml-->
+	<target name="prepareResources" unless="skipUnzip">
+		<eclipse.unzipperBuilder 	workingDirectory="${workingDirectory}" 
+											configInfo="${config}"
+											packagePropertyFile="${packagingPropertyFile}"/>
+		<ant antfile="${workingDirectory}/unzipper.xml"/>
+	</target>
+
+	<!-- Generate an assemble script (assemble.xml) for the given features -->
+	<target name="generateAssembleScripts">
+		<echo message="${target}"/>
+		<eclipse.assembler featureList="${featureList}" 
+									workingDirectory="${workingDirectory}" 
+									configInfo="${config}" 
+									baseLocation="${target}" 
+									packagePropertyFile="${packagingPropertyFile}" 
+									deltaPack="${deltaPack}"
+									archivesFormat="${archivesFormat}"
+									filteredDependencyCheck="${filteredDependencyCheck}"
+									normalize="${normalizeWhilePackaging}"/>
+	</target>
+
+	<!-- Call the assemble.xml script -->
+	<target name="callAssembleScripts">
+		<ant antfile="package.all.xml" dir="${workingDirectory}"/>
+	</target>
+
+	<target name="main" description="Start the packager for a given config">
+		<property file="${packagingInfo}/packager.properties" />
+		<property name="customTargets" location="${packagingInfo}/customTargets.xml" />
+		<property name="packagingPropertyFile" location="${packagingInfo}/${packagingProperties}" />
+		
+		<condition property="skipMaps" value="true">
+			<isset property="prefilledTarget" />
+		</condition>
+		<condition property="skipFetch" value="true">
+			<isset property="prefilledTarget" />
+		</condition>
+		<condition property="skipUnzip" value="true">
+			<isset property="prefilledTarget" />
+		</condition>
+		
+		<!-- Compatibility -->
+		<property name="filteredDependencyCheck" value="false"/>
+		<condition property="skipMaps" value="true">
+			<isset property="localMaps"/>
+		</condition>
+		<condition property="target" value="${tempDirectory}/${featurePaths}">
+			<isset property="featurePaths"/>
+		</condition>
+		<property name="normalizeWhilePackaging" value="true"/>
+		
+		<!-- End of compatibility -->
+			
+		<antcall target="init" />
+		<antcall target="retrieveMapFiles"/>
+		<antcall target="retrieveFiles"/>
+		<antcall target="prepareResources"/>
+		<antcall target="generateAssembleScripts"/>
+		<antcall target="callAssembleScripts"/>
+	</target>
+</project>
\ No newline at end of file

Added: tools/eclipse/trunk/plugins/eclipse-build/pom.xml
===================================================================
--- tools/eclipse/trunk/plugins/eclipse-build/pom.xml	                        (rev 0)
+++ tools/eclipse/trunk/plugins/eclipse-build/pom.xml	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,195 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+	<modelVersion>4.0.0</modelVersion>
+
+    <groupId>org.jboss.savara.tools.eclipse.plugins</groupId>
+    <artifactId>build</artifactId>
+    <packaging>pom</packaging>
+    <name>Savara::Tools::Eclipse::Plugins::Build</name>
+    <version>1.0-SNAPSHOT</version>
+    
+    <parent>
+	  <groupId>org.jboss.savara.tools.eclipse</groupId>
+	  <artifactId>plugins</artifactId>
+      <version>1.0-SNAPSHOT</version>
+	</parent>
+  
+  <build>
+    <plugins>    
+     <plugin>
+       <artifactId>maven-antrun-plugin</artifactId>
+       <inherited>false</inherited>
+       <executions>
+         <execution>
+           <id>compile-plugin</id>
+           <phase>compile</phase>
+           <configuration>
+             <tasks>                              
+                <property name="eclipse.home" value="target/eclipse" />             
+                
+                <property name="localEclipseDrop" value="${basedir}/local-eclipse-drop-mirror" />   
+
+                <delete failonerror="false" dir="target/eclipse.build"/>     
+
+                <delete failonerror="false" includeemptydirs="true">
+                  <fileset dir="target" includes="*.zip"/>
+                </delete>                 
+                
+                <ant target="setupLocalEclipse" antfile="setupEclipse.xml">
+                  <property name="localEclipseDrop" value="${localEclipseDrop}" />
+                </ant>                
+                 
+                <java jar="${eclipse.home}/plugins/org.eclipse.equinox.launcher_1.0.201.R35x_v20090715.jar"
+                      fork="true"
+                      failonerror="true"
+                      maxmemory="128m">
+                     <arg line="-application org.eclipse.ant.core.antRunner -consoleLog -data '${basedir}/target/workspace' -DmavenCompilePhase=true"/>
+                </java>                 
+             </tasks>
+           </configuration>
+           <goals>
+             <goal>run</goal>
+           </goals>
+         </execution>
+         
+         <execution>
+           <id>test-plugin</id>
+           <phase>test</phase>
+           <configuration>
+             <tasks>            
+               <!-- Determine OS -->
+               <condition property="baseos" value="win32">
+                   <contains string="${os.name}" substring="Windows" />
+               </condition>
+             
+               <condition property="baseos" value="linux">
+                   <contains string="${os.name}" substring="Linux" />
+               </condition>
+               
+               <condition property="baseos" value="macosx">
+                   <contains string="${os.name}" substring="Mac OS X" />
+               </condition>
+               
+               <condition property="baseos" value="win32">
+                   <contains string="${os.name}" substring="Windows" />
+               </condition>        
+             
+               <condition property="baseos" value="aix">
+                   <contains string="${os.name}" substring="AIX" />
+               </condition>    
+               
+               <condition property="baseos" value="hpux">
+                   <contains string="${os.name}" substring="HP-UX" />
+               </condition> 
+               
+               <condition property="baseos" value="solaris">
+                   <contains string="${os.name}" substring="Solaris" />
+               </condition>  
+               
+               <condition property="baseos" value="qnx">
+                   <contains string="${os.name}" substring="QNX" />
+               </condition>                        
+               
+               <!-- Determine WS -->
+               <condition property="basews" value="win32">
+                   <contains string="${os.name}" substring="Windows" />
+               </condition>    
+               
+               <condition property="basews" value="gtk">
+                   <contains string="${os.name}" substring="Linux" />
+               </condition>    
+               
+               <condition property="basews" value="carbon">
+                   <contains string="${os.name}" substring="Mac OS X" />
+               </condition>        
+                   
+               <!-- Determine ARCH -->
+               <condition property="basearch" value="x86">
+                 <or>
+                   <contains string="${os.arch}" substring="i386" />
+                   <contains string="${os.arch}" substring="i686" />
+                   <contains string="${os.arch}" substring="x86" />
+                   <contains string="${os.arch}" substring="Pentium" />
+                 </or>
+               </condition>
+             
+               <condition property="basearch" value="linux">
+                   <contains string="${os.name}" substring="Linux" />
+               </condition>
+               
+               <condition property="basearch" value="ppc">
+                   <contains string="${os.name}" substring="ppc" />
+               </condition>                     
+               
+               <condition property="basearch" value="sparc">
+                   <contains string="${os.name}" substring="sparc" />
+               </condition>                   
+               
+               <condition property="mavenTestPhase" value="" else="-DmavenTestPhase=true">
+                   <isset property="maven.test.skip" />
+               </condition>                
+              
+                <property name="eclipse.home" value="target/eclipse" />                             
+                
+                <echo>-application org.eclipse.ant.core.antRunner -Dbaseos=${baseos} -Dbasews=${basews} -Dbasearch=${basearch} ${mavenTestPhase}</echo>
+                 
+                <java jar="${eclipse.home}/plugins/org.eclipse.equinox.launcher_1.0.201.R35x_v20090715.jar"
+                      fork="true"
+                      failonerror="true"
+                      maxmemory="128m">
+                     <arg line="-application org.eclipse.ant.core.antRunner -consoleLog -data '${basedir}/target/workspace' -Dbaseos=${baseos} -Dbasews=${basews} -Dbasearch=${basearch} ${mavenTestPhase}"/>
+                </java>                 
+             </tasks>
+           </configuration>
+           <goals>
+             <goal>run</goal>
+           </goals>
+         </execution>    
+
+         <execution>
+           <id>unzip</id>
+           <phase>package</phase>
+           <configuration>
+             <tasks>                
+                <unzip src="target/org.jboss.savara.tools.bpel-eclipse-${project.version}.zip" dest="../../target/eclipse"/>                         
+                <unzip src="target/org.jboss.savara.tools.jbossesb-eclipse-${project.version}.zip" dest="../../target/eclipse"/>                         
+                <!--
+                <unzip src="target/org.pi4soa.bpmn-eclipse-${project.version}.zip" dest="../../target/eclipse"/>
+                -->                         
+                <unzip src="target/org.pi4soa.monitor-eclipse-${project.version}.zip" dest="../../target/eclipse"/>                         
+                <unzip src="target/org.scribble.conversation-eclipse-${project.version}.zip" dest="../../target/eclipse"/>                         
+                <unzip src="target/org.scribble.experimental-eclipse-${project.version}.zip" dest="../../target/eclipse"/>                         
+                <unzip src="target/org.scribble-eclipse-${project.version}.zip" dest="../../target/eclipse"/>                         
+                <!--
+                <unzip src="target/org.scribble.java-eclipse-${project.version}.zip" dest="../../target/eclipse"/>
+                -->                         
+                <unzip src="target/org.scribble.pi4soa-eclipse-${project.version}.zip" dest="../../target/eclipse"/>                         
+                <unzip src="target/org.scribble.protocol-eclipse-${project.version}.zip" dest="../../target/eclipse"/>                         
+                <copy todir="../../target">
+                    <fileset dir="target/">
+                      <include name="*.zip"/>
+                    </fileset>                    
+		        </copy>
+             </tasks>
+           </configuration>
+           <goals>
+             <goal>run</goal>
+           </goals>
+         </execution> 
+                 
+       </executions>
+     </plugin>
+       
+    </plugins>
+  </build>
+
+  <dependencies>
+    <!-- this should include core and compiler -->
+    <!--dependency>
+      <groupId>org.drools</groupId>
+      <artifactId>drools-eclipse-plugin</artifactId>
+    </dependency-->
+</dependencies>
+
+</project>

Added: tools/eclipse/trunk/plugins/eclipse-build/setupEclipse.xml
===================================================================
--- tools/eclipse/trunk/plugins/eclipse-build/setupEclipse.xml	                        (rev 0)
+++ tools/eclipse/trunk/plugins/eclipse-build/setupEclipse.xml	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,182 @@
+<project name="Setup Local  Eclipse" default="setupLocalEclipse">   
+  
+  <property file="build.properties"/>
+
+	<property name="localEclipseDrop" value="${basedir}/local-eclipse-drop-mirror" />   
+	<property name="dependenciesDir" value="${basedir}/dependencies" />   
+ 
+  <!-- set the OS name, make sure each condition is mutally exclusive -->
+	<condition property="download.type" value="win32">
+		<os family="windows" />
+	</condition>	
+			
+	<condition property="download.type" value="macosx-carbon">
+		<and>
+			<os family="mac" />
+			<os family="unix" />
+		</and>
+	</condition>
+	
+	<condition property="download.type" value="linux-gtk">
+		<and>
+			<not>
+				<os family="mac" />
+			</not>
+			<os family="unix" />
+		</and>
+	</condition>		
+	
+	<condition property="download.extension" value="zip">
+		<os family="windows" />
+	</condition>		
+	
+	<condition property="download.extension" value="tar.gz">
+		<or>
+			<os family="mac" />
+			<os family="unix" />
+		</or>
+	</condition>	
+		  		        
+   <condition property="expandTypeZip" value="true">
+       <equals arg1="${download.extension}" arg2="zip" />
+   </condition>   
+
+   <condition property="expandTypeTarGz" value="true">
+       <equals arg1="${download.extension}" arg2="tar.gz" />
+   </condition>   
+   
+  <!-- make sure the directory exists -->   
+  <target name="makeLocalEclipseDropDir">
+    <mkdir dir="${localEclipseDrop}" />    
+  </target>   
+   
+  <target name="getEclipseJar" depends="checkEclipseJar" unless="skipGetEclipseJar">
+    <mkdir dir="${localEclipseDrop}/eclipse/${eclipseBuildRevision}" />    
+    
+    <get usetimestamp="true" src="${eclipseURL}/${eclipseBuildRevision}/eclipse-SDK-${eclipseBuildId}-${download.type}.${download.extension}" 
+         dest="${localEclipseDrop}/eclipse/${eclipseBuildRevision}/eclipse-SDK-${eclipseBuildId}-${download.type}.${download.extension}" /> 
+  </target>  
+  
+  <target name="getTestJar" depends="checkTestJar" unless="skipGetTestJar">
+    <mkdir dir="${localEclipseDrop}/eclipse/${eclipseBuildRevision}" />    
+    <get usetimestamp="true" src="${eclipseURL}/${eclipseBuildRevision}/eclipse-test-framework-${eclipseBuildId}.zip"
+         dest="${localEclipseDrop}/eclipse/${eclipseBuildRevision}/eclipse-test-framework-${eclipseBuildId}.zip"/>    
+  </target>
+
+	  <target name="getGefJar" depends="checkGefJar" unless="skipGetGefJar">
+	    <mkdir dir="${localEclipseDrop}/tools/gef/${eclipseGefBuildRevision}" />    
+	    <get usetimestamp="true" src="${eclipseGefURL}/${eclipseGefBuildId}/${eclipseGefBuildRevision}/GEF-runtime-${eclipseGefBuildId}.zip" 
+	         dest="${localEclipseDrop}/tools/gef/${eclipseGefBuildRevision}/GEF-runtime-${eclipseGefBuildId}.zip" />
+	  </target>      
+
+	  <target name="getEMFJar" depends="checkEMFJar" unless="skipGetEMFJar">
+	    <mkdir dir="${localEclipseDrop}/tools/emf/${eclipseEMFBuildRevision}" />    
+	    <get usetimestamp="true" src="${eclipseEMFURL}/${eclipseEMFBuildId}/${eclipseEMFBuildRevision}/emf-xsd-SDK-${eclipseEMFBuildId}.zip" 
+	         dest="${localEclipseDrop}/tools/emf/${eclipseEMFBuildRevision}/emf-xsd-SDK-${eclipseEMFBuildId}.zip" />
+	  </target>      
+	
+	  <target name="getOrbitJar" depends="checkOrbitJar" unless="skipGetOrbitJar">
+	    <mkdir dir="${localEclipseDrop}/tools/orbit" />    
+	    <get usetimestamp="true" src="${orbitURL}/orbit-${orbitBuildRevision}-updateSite.zip" 
+	         dest="${localEclipseDrop}/tools/orbit/orbit-${orbitBuildRevision}-updateSite.zip" />
+	  </target>      
+	
+	  <target name="getPi4soaJar" depends="checkPi4soaJar" unless="skipGetPi4soaJar">
+	    <mkdir dir="${localEclipseDrop}/tools/pi4soa/${eclipsePi4soaBuildRevision}" />    
+	    <get usetimestamp="true" src="${pi4soaURL}/${eclipsePi4soaBuildRevision}/all/JBossTools-Update-${eclipsePi4soaBuildId}.zip" 
+	         dest="${localEclipseDrop}/tools/pi4soa/JBossTools-Update-${eclipsePi4soaBuildId}.zip" />
+	  </target>      
+
+	<target name="checkEclipseJar">	
+		<available file="${localEclipseDrop}/eclipse/${eclipseBuildRevision}/eclipse-SDK-${eclipseBuildId}-${download.type}.zip" property="skipGetEclipseJar" />
+	</target>
+	
+	<target name="checkTestJar">	
+		<available file="${localEclipseDrop}/eclipse/${eclipseBuildRevision}/eclipse-test-framework-${eclipseBuildId}.zip" property="skipGetTestJar" />
+	</target>	
+		
+	<target name="checkGefJar">	
+		<available file="${localEclipseDrop}/tools/gef/${eclipseGefBuildRevision}/GEF-runtime-${eclipseGefBuildId}.zip" property="skipGetGefJar" />
+	</target>	  
+
+	<target name="checkEMFJar">	
+		<available file="${localEclipseDrop}/tools/emf/${eclipseEMFBuildRevision}/emf-xsd-SDK-${eclipseEMFBuildId}.zip" property="skipGetEMFJar" />
+	</target>	  
+
+	<target name="checkOrbitJar">	
+		<available file="${localEclipseDrop}/tools/orbit/orbit-${orbitBuildRevision}-updateSite.zip" property="skipGetOrderJar" />
+	</target>	  
+
+	<target name="checkPi4soaJar">	
+		<available file="${localEclipseDrop}/tools/pi4soa/JBossTools-Update-${eclipsePi4soaBuildId}.zip" property="skipGetPi4soaJar" />
+	</target>	  
+
+  <target name="setupLocalEclipseDrop"  depends="checkEclipseDir" unless="skipUnzipEclipseJars">
+    <antcall target="makeLocalEclipseDropDir" />
+    <antcall target="getEclipseJar" />
+    <antcall target="getTestJar" />    
+    <antcall target="getGefJar" />      
+    <antcall target="getEMFJar" />      
+  	<antcall target="getOrbitJar" />
+    <antcall target="getPi4soaJar" />      
+  </target>
+  
+  <target name="expandEclipseJars">   
+    <antcall target="unzipEclipse" />	
+    <antcall target="untarEclipse" />
+    
+    <unzip dest="${base}" overwrite="true"
+           src="${localEclipseDrop}/eclipse/${eclipseBuildRevision}/eclipse-test-framework-${eclipseBuildId}.zip" />   				
+		
+	<unzip dest="${base}" overwrite="true" 
+			src="${localEclipseDrop}/tools/gef/${eclipseGefBuildRevision}/GEF-runtime-${eclipseGefBuildId}.zip" />				         
+		
+	<unzip dest="${base}" overwrite="true" 
+			src="${localEclipseDrop}/tools/emf/${eclipseEMFBuildRevision}/emf-xsd-SDK-${eclipseEMFBuildId}.zip" />				         
+	
+  	<!--
+	<unzip dest="${base}/eclipse" overwrite="true" 
+			src="${localEclipseDrop}/tools/orbit/orbit-${orbitBuildRevision}-updateSite.zip" />				         
+	-->
+  	
+  	<copy todir="${base}/eclipse/plugins">
+  	    <fileset dir="${dependenciesDir}" />
+  	</copy>
+  	
+	<!-- unzip dest="${base}/eclipse" overwrite="true" 
+			src="${localEclipseDrop}/tools/pi4soa/JBossTools-Update-${eclipsePi4soaBuildId}.zip" /-->
+  	
+  	<ant antfile="installJBossTools.xml">
+    	  <property name="sourceZip" value="${localEclipseDrop}/tools/pi4soa/JBossTools-Update-${eclipsePi4soaBuildId}.zip"/>
+    	  <property name="targetDir" value="${eclipseDir}/eclipse"/>
+    	  <property name="install" value="org.pi4soa.core.feature.feature.group"/>
+  		<property name="eclipseDir" value="${eclipseDir}" />
+  		<property name="JAVA_HOME" value="/home/gbrown/tools/jdk1.6.0_18" />
+  	</ant>
+  </target>    
+  
+  <target name="unzipEclipse" if="expandTypeZip">
+  	<unzip dest="${base}" overwrite="true" 
+  	       src="${localEclipseDrop}/eclipse/${eclipseBuildRevision}/eclipse-SDK-${eclipseBuildId}-${download.type}.${download.extension}" />  
+  </target>
+
+  <target name="untarEclipse" if="expandTypeTarGz">
+	<gunzip src="${localEclipseDrop}/eclipse/${eclipseBuildRevision}/eclipse-SDK-${eclipseBuildId}-${download.type}.tar.gz"/>
+	<untar dest="${base}" src="${localEclipseDrop}/eclipse/${eclipseBuildRevision}/eclipse-SDK-${eclipseBuildId}-${download.type}.tar" />
+  </target>
+  
+  <target name="checkEclipseDir">
+    <available file="${baseLocation}" property="skipUnzipEclipseJars" />
+  </target>
+    
+  <target name="setupLocalEclipse" depends="checkLocalEclipse" unless="skipSetupLocalEcipse">  
+    <echo>local eclipse drop mirror - ${localEclipseDrop}</echo>
+    <antcall target="setupLocalEclipseDrop" />
+    <antcall target="expandEclipseJars" />
+  </target>	
+  
+  <target name="checkLocalEclipse">
+      <available type="dir" file="${baseLocation}" property="skipSetupLocalEcipse" />
+  </target>
+  
+</project>

Copied: tools/eclipse/trunk/plugins/org.jboss.savara.tools.bpel.feature (from rev 162, tools/eclipse/trunk/features/org.jboss.savara.tools.bpel.feature)

Copied: tools/eclipse/trunk/plugins/org.jboss.savara.tools.jbossesb.feature (from rev 162, tools/eclipse/trunk/features/org.jboss.savara.tools.jbossesb.feature)

Copied: tools/eclipse/trunk/plugins/org.pi4soa.bpmn.feature (from rev 162, tools/eclipse/trunk/features/org.pi4soa.bpmn.feature)

Copied: tools/eclipse/trunk/plugins/org.pi4soa.monitor.feature (from rev 162, tools/eclipse/trunk/features/org.pi4soa.monitor.feature)

Added: tools/eclipse/trunk/plugins/org.scribble.conformance/.classpath
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conformance/.classpath	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conformance/.classpath	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="src" path="src/java"/>
+	<classpathentry kind="src" path="src/test"/>
+	<classpathentry kind="src" path="src/plugintest"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/3"/>
+	<classpathentry kind="output" path="classes"/>
+</classpath>

Added: tools/eclipse/trunk/plugins/org.scribble.conformance/.project
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conformance/.project	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conformance/.project	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>org.scribble.conformance</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.ManifestBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.SchemaBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.pde.PluginNature</nature>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+	</natures>
+</projectDescription>

Added: tools/eclipse/trunk/plugins/org.scribble.conformance/LICENSE.txt
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conformance/LICENSE.txt	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conformance/LICENSE.txt	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,201 @@
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.

Added: tools/eclipse/trunk/plugins/org.scribble.conformance/META-INF/MANIFEST.MF
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conformance/META-INF/MANIFEST.MF	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conformance/META-INF/MANIFEST.MF	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,23 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Scribble Conformance Plug-in
+Bundle-SymbolicName: org.scribble.conformance;singleton:=true
+Bundle-Version: 0.1.0.qualifier
+Bundle-Activator: org.scribble.conformance.osgi.Activator
+Bundle-Vendor: www.scribble.org
+Import-Package: org.osgi.framework;version="1.3.0"
+Require-Bundle: org.scribble.core,
+ org.eclipse.core.runtime;resolution:=optional,
+ org.junit;resolution:=optional
+Bundle-ActivationPolicy: lazy
+Export-Package: org.scribble.conformance.comparator,
+ org.scribble.conformance.model,
+ org.scribble.conformance.model.transform
+Scribble-Extensions: org.scribble.conformance.comparator.BehaviourListComparatorRule,
+  org.scribble.conformance.comparator.StatelessDefinitionComparatorRule,
+  org.scribble.conformance.model.transform.DefaultStatelessTransformer,
+  org.scribble.conformance.model.transform.BlockStatelessTransformationRule,
+  org.scribble.conformance.model.transform.InteractionStatelessTransformationRule,
+  org.scribble.conformance.model.transform.MessageSignatureStatelessTransformationRule,
+  org.scribble.conformance.model.transform.RoleStatelessTransformationRule,
+  org.scribble.conformance.model.transform.TypeReferenceStatelessTransformationRule

Added: tools/eclipse/trunk/plugins/org.scribble.conformance/build.properties
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conformance/build.properties	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conformance/build.properties	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,5 @@
+source.. = src/java/
+output.. = classes/
+bin.includes = META-INF/,\
+               .,\
+               plugin.xml

Added: tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/comparator/BehaviourListComparatorRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/comparator/BehaviourListComparatorRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/comparator/BehaviourListComparatorRuleTest$1.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/comparator/BehaviourListComparatorRuleTest$1.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/comparator/BehaviourListComparatorRuleTest$10.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/comparator/BehaviourListComparatorRuleTest$10.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/comparator/BehaviourListComparatorRuleTest$11.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/comparator/BehaviourListComparatorRuleTest$11.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/comparator/BehaviourListComparatorRuleTest$12.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/comparator/BehaviourListComparatorRuleTest$12.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/comparator/BehaviourListComparatorRuleTest$13.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/comparator/BehaviourListComparatorRuleTest$13.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/comparator/BehaviourListComparatorRuleTest$14.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/comparator/BehaviourListComparatorRuleTest$14.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/comparator/BehaviourListComparatorRuleTest$15.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/comparator/BehaviourListComparatorRuleTest$15.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/comparator/BehaviourListComparatorRuleTest$16.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/comparator/BehaviourListComparatorRuleTest$16.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/comparator/BehaviourListComparatorRuleTest$17.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/comparator/BehaviourListComparatorRuleTest$17.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/comparator/BehaviourListComparatorRuleTest$18.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/comparator/BehaviourListComparatorRuleTest$18.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/comparator/BehaviourListComparatorRuleTest$19.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/comparator/BehaviourListComparatorRuleTest$19.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/comparator/BehaviourListComparatorRuleTest$2.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/comparator/BehaviourListComparatorRuleTest$2.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/comparator/BehaviourListComparatorRuleTest$20.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/comparator/BehaviourListComparatorRuleTest$20.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/comparator/BehaviourListComparatorRuleTest$3.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/comparator/BehaviourListComparatorRuleTest$3.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/comparator/BehaviourListComparatorRuleTest$4.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/comparator/BehaviourListComparatorRuleTest$4.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/comparator/BehaviourListComparatorRuleTest$5.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/comparator/BehaviourListComparatorRuleTest$5.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/comparator/BehaviourListComparatorRuleTest$6.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/comparator/BehaviourListComparatorRuleTest$6.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/comparator/BehaviourListComparatorRuleTest$7.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/comparator/BehaviourListComparatorRuleTest$7.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/comparator/BehaviourListComparatorRuleTest$8.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/comparator/BehaviourListComparatorRuleTest$8.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/comparator/BehaviourListComparatorRuleTest$9.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/comparator/BehaviourListComparatorRuleTest$9.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/comparator/BehaviourListComparatorRuleTest.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/comparator/BehaviourListComparatorRuleTest.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/comparator/Messages.properties
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/comparator/Messages.properties	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/comparator/Messages.properties	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,24 @@
+# /*
+# * Copyright 2007 Pi4 Technologies Ltd
+# *
+# * Licensed under the Apache License, Version 2.0 (the "License");
+# * you may not use this file except in compliance with the License.
+# * You may obtain a copy of the License at
+# *
+# *     http://www.apache.org/licenses/LICENSE-2.0
+# *
+# * Unless required by applicable law or agreed to in writing, software
+# * distributed under the License is distributed on an "AS IS" BASIS,
+# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# * See the License for the specific language governing permissions and
+# * limitations under the License.
+# *
+# *
+# * Change History:
+# * 24 Nov 2007 : Initial version created by gary
+# */
+
+_ADDITIONAL_UNMATCHED_PATHS=Additional unmatched paths in model
+_ADDITIONAL_UNMATCHED_REF_PATHS=Additional unmatched paths in reference description
+_EXPECTING_ACTIVITY=Expecting additional activities as defined in referenced description
+_NO_MATCHING_PATH=No matching path

Added: tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/comparator/StatelessDefinitionComparatorRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/comparator/StatelessDefinitionComparatorRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/comparator/SyncPoint.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/comparator/SyncPoint.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/comparator/TestBehaviour1ComparatorRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/comparator/TestBehaviour1ComparatorRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/comparator/TestBehaviour2ComparatorRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/comparator/TestBehaviour2ComparatorRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/comparator/TestMultiPathComparatorRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/comparator/TestMultiPathComparatorRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/comparator/TestSinglePathComparatorRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/comparator/TestSinglePathComparatorRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/model/BehaviourList.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/model/BehaviourList.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/model/BehaviourListIterator.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/model/BehaviourListIterator.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/model/BehaviourListPaths.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/model/BehaviourListPaths.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/model/BehaviourListTest.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/model/BehaviourListTest.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/model/TestBehaviour1.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/model/TestBehaviour1.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/model/TestBehaviour2.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/model/TestBehaviour2.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/model/TestBehaviourList.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/model/TestBehaviourList.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/model/TestDefinition.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/model/TestDefinition.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/model/TestModelInclude.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/model/TestModelInclude.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/model/TestMultiPath.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/model/TestMultiPath.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/model/TestSinglePath.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/model/TestSinglePath.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/model/transform/AbstractDefinitionStatelessTransformationRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/model/transform/AbstractDefinitionStatelessTransformationRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/model/transform/AbstractStatelessTransformationRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/model/transform/AbstractStatelessTransformationRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/model/transform/BlockStatelessTransformationRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/model/transform/BlockStatelessTransformationRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/model/transform/DefaultStatelessTransformationContext.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/model/transform/DefaultStatelessTransformationContext.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/model/transform/DefaultStatelessTransformer.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/model/transform/DefaultStatelessTransformer.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/model/transform/InteractionStatelessTransformationRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/model/transform/InteractionStatelessTransformationRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/model/transform/MessageSignatureStatelessTransformationRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/model/transform/MessageSignatureStatelessTransformationRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/model/transform/RoleStatelessTransformationRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/model/transform/RoleStatelessTransformationRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/model/transform/StatelessTransformationContext.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/model/transform/StatelessTransformationContext.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/model/transform/StatelessTransformationRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/model/transform/StatelessTransformationRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/model/transform/StatelessTransformer.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/model/transform/StatelessTransformer.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/model/transform/TransformState.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/model/transform/TransformState.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/model/transform/TransformTest$StatefulToStatelessTest.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/model/transform/TransformTest$StatefulToStatelessTest.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/model/transform/TransformTest.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/model/transform/TransformTest.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/model/transform/TypeReferenceStatelessTransformationRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/model/transform/TypeReferenceStatelessTransformationRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/model/transform/results/Interaction1 at R1.scv
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/model/transform/results/Interaction1 at R1.scv	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/model/transform/results/Interaction1 at R1.scv	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,11 @@
+stateless conversation Interaction1 at R1 {
+	role	R2;
+	if {
+		M1 to R2;
+	} else if {
+		M2 from R2;
+		M3 to R2;
+	} else if {
+		M4 from R2;
+	}
+}
\ No newline at end of file

Added: tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/model/transform/results/Interaction1 at R2.scv
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/model/transform/results/Interaction1 at R2.scv	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/model/transform/results/Interaction1 at R2.scv	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,10 @@
+stateless conversation Interaction1 at R2 {
+	role	R1;
+	if {
+		M1 from R1;
+		M2 to R1;
+	} else if {
+		M3 from R1;
+		M4 to R1;
+	}
+}
\ No newline at end of file

Added: tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/model/transform/results/Interaction2 at R2.scv
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/model/transform/results/Interaction2 at R2.scv	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/model/transform/results/Interaction2 at R2.scv	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,11 @@
+stateless conversation Interaction1 at R2 {
+	role	R1;
+	if {
+		M1 from R1;
+		if {
+			M2 to R1;
+		} else if {
+			M3 to R1;
+		}
+	}
+}
\ No newline at end of file

Added: tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/model/transform/testmodels/Interaction1 at R1.scv
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/model/transform/testmodels/Interaction1 at R1.scv	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/model/transform/testmodels/Interaction1 at R1.scv	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,11 @@
+namespace test;
+
+conversation Interaction1 at R1 {
+	role	R2;
+	
+	M1 to R2;
+	M2 from R2;
+	
+	M3 to R2;
+	M4 from R2;
+}

Added: tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/model/transform/testmodels/Interaction1 at R2.scv
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/model/transform/testmodels/Interaction1 at R2.scv	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/model/transform/testmodels/Interaction1 at R2.scv	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,11 @@
+namespace test;
+
+conversation Interaction1 at R2 {
+	role	R1;
+	
+	M1 from R1;
+	M2 to R1;
+	
+	M3 from R1;
+	M4 to R1;
+}

Added: tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/model/transform/testmodels/Interaction2 at R2.scv
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/model/transform/testmodels/Interaction2 at R2.scv	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/model/transform/testmodels/Interaction2 at R2.scv	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,11 @@
+namespace test;
+
+conversation Interaction1 at R2 {
+	role	R1;
+	
+	M1 from R1;
+	M2 to R1;
+	
+	M1 from R1;
+	M3 to R1;
+}

Added: tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/osgi/Activator.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conformance/classes/org/scribble/conformance/osgi/Activator.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conformance/src/java/org/scribble/conformance/comparator/BehaviourListComparatorRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conformance/src/java/org/scribble/conformance/comparator/BehaviourListComparatorRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conformance/src/java/org/scribble/conformance/comparator/BehaviourListComparatorRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,881 @@
+/*
+ * Copyright 2007 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 27 Nov 2007 : Initial version created by gary
+ */
+package org.scribble.conformance.comparator;
+
+import org.scribble.model.*;
+import org.scribble.model.admin.DefaultModelListener;
+import org.scribble.model.admin.ModelIssue;
+import org.scribble.model.admin.ModelListener;
+import org.scribble.model.resolutions.*;
+import org.scribble.comparator.*;
+import org.scribble.conformance.model.*;
+import org.scribble.extensions.RegistryInfo;
+
+/**
+ * This class provides the BehaviourList comparator rule.
+ */
+ at RegistryInfo(extension=ComparatorRule.class)
+public class BehaviourListComparatorRule implements ComparatorRule {
+
+	/**
+	 * This method determines whether the comparison rule is
+	 * associated with the supplied type.
+	 * 
+	 * @param obj The object to check
+	 * @return Whether the object is of a type supported by the
+	 * 					comparison rule
+	 */
+	public boolean isTypeSupported(ModelObject obj) {
+		return(obj instanceof BehaviourList);
+	}
+	
+	/**
+	 * This method determines whether the comparison rule is
+	 * appropriate for the supplied model objects.
+	 * 
+	 * @param main The main model object to be compared
+	 * @param ref The reference model object to be compared against
+	 * @return Whether the rule is relevant for the
+	 * 				model objects
+	 */
+	public boolean isComparisonSupported(ModelObject main, ModelObject ref) {
+		return(main instanceof BehaviourList &&
+				ref instanceof BehaviourList);
+	}
+	
+	/**
+	 * This method compares a model object against a reference
+	 * component to determine if they are equal.
+	 * 
+	 * @param context The context
+	 * @param main The main model object
+	 * @param reference The reference model object
+	 * @param l The model listener
+	 * @param deep Perform a deep compare
+	 * @return Whether the model objects are comparable
+	 */
+	public boolean compare(ComparatorContext context, ModelObject main,
+					ModelObject reference, ModelListener l, boolean deep) {
+		boolean ret=false;
+		BehaviourList mainbl=(BehaviourList)main;
+		BehaviourList refbl=(BehaviourList)reference;
+
+		if (context.compare(mainbl.getBlock(), refbl.getBlock(),
+							l, false)) {
+		
+			ret = true;
+			
+			// Get iterators for the two lists
+			BehaviourListIterator mainiter=mainbl.getIterator();
+			BehaviourListIterator refiter=refbl.getIterator();
+			
+			SyncPoint syncPoint=null;
+			
+			while ((syncPoint=findNextSyncPoint(context, mainiter, refiter,
+								true, null)) != null) {
+				
+				// Process behaviours between previous and new sync point
+				if (syncPoint.isGap()) {
+					BehaviourListIterator innerMainIter=mainiter.snapshot();
+					BehaviourListIterator innerRefIter=refiter.snapshot();
+					
+					SyncPoint innerSyncPoint=null;
+					
+					while ((innerSyncPoint=findNextSyncPoint(context, innerMainIter,
+									innerRefIter, false, syncPoint)) != null) {
+											
+						if (innerSyncPoint.isGap()) {
+							int mainCount=innerSyncPoint.getMainCount();
+							int refCount=innerSyncPoint.getReferenceCount();
+							Behaviour mainPoint=null;
+							
+							while (mainCount > 0) {
+								mainPoint = innerMainIter.next();
+							
+								if (isConditionalDecisionMaker(mainPoint) == false) {
+									String mesg=org.scribble.util.MessageUtil.format(
+										java.util.PropertyResourceBundle.getBundle(
+										"org.scribble.comparator.Messages").
+										getString("_UNEXPECTED_BEHAVIOUR"), null);
+								
+									ModelIssue issue=new ModelIssue(mainPoint, mesg);
+								
+									issue.getResolutions().add(new DeleteFromModel());
+								
+									l.error(issue);
+								
+									ret = false;
+									
+									// Exit loop
+									mainCount = 0;
+								} else {
+									mainCount--;
+								}
+							}
+							
+							// Get main activity to be compared
+							mainPoint = innerMainIter.next();
+							
+							Behaviour refPoint=null;
+							
+							while (refCount > 0) {
+								refPoint = innerRefIter.next();
+
+								if (isConditionalDecisionMaker(refPoint) == false) {
+									
+									// TODO: Check if 'refPoint' is a conditional
+									// activity that is located at the projected role
+									// and if so, then don't report as an expected
+									// activity error
+									
+									String mesg=org.scribble.util.MessageUtil.format(
+											java.util.PropertyResourceBundle.getBundle(
+											"org.scribble.conformance.comparator.Messages").
+											getString("_EXPECTING_ACTIVITY"), null);
+										
+									ModelIssue issue=null;
+									
+									if (mainPoint != null) {
+										issue = new ModelIssue(mainPoint, mesg);
+									} else {
+										issue = new ModelIssue(mainbl.getBlock(), mesg);
+									}
+									
+									// Add 'show reference description' resolution
+									ShowReferencedDescription showrefd=new ShowReferencedDescription();
+									
+									if (refiter.getComposedSource() != null) {
+										showrefd.setModel(refiter.getComposedSource());
+									} else {
+										showrefd.setModel(context.getReferenceSource());
+									}
+									showrefd.setSourceReference(refPoint.getSource());
+									
+									issue.getResolutions().add(showrefd);
+									
+									// Add 'insert model object' resolution
+									InsertFromReferencedDescription imo=new InsertFromReferencedDescription();
+									
+									if (refiter.getComposedSource() != null) {
+										imo.setModel(refiter.getComposedSource());
+									} else {
+										imo.setModel(context.getReferenceSource());
+									}
+									imo.setSourceReference(refPoint.getSource());
+									
+									issue.getResolutions().add(imo);
+									
+									l.error(issue);
+									
+									ret = false;
+									
+									// Exit loop
+									refCount = 0;
+								} else {
+									refCount--;
+								}
+							}
+
+							// Get ref activity to be compared
+							refPoint = innerRefIter.next();
+
+							/*
+							 * Perform comparison after dealing with
+							 * additional or missing activities,
+							 * when reached sync point, in case
+							 * not fully compaible (i.e. full compare
+							 * was set to false to find this inner
+							 * sync point)
+							 */
+							if (mainPoint != null && refPoint != null) {
+								DefaultModelListener subl=new 
+								DefaultModelListener(innerMainIter.getComposedSource());
+						
+								// Redo comparison with model listener
+								if (compareBehaviours(context, mainPoint, refPoint,
+										mainiter, refiter, subl, true) == false) {
+									ret = false;
+								}
+												
+								subl.apply(l, innerMainIter.getModelInclude(), null, null);		
+							}
+						} else {
+							Behaviour mainPoint=innerMainIter.next();
+							Behaviour refPoint=innerRefIter.next();
+
+							DefaultModelListener subl=new 
+									DefaultModelListener(innerMainIter.getComposedSource());
+							
+							// Redo comparison with model listener
+							ret = compareBehaviours(context, mainPoint, refPoint,
+									mainiter, refiter, subl, true);
+											
+							subl.apply(l, innerMainIter.getModelInclude(), null, null);
+						}
+	
+						// Move iterators to the sync point
+						innerMainIter = innerSyncPoint.getMainIterator();
+						innerRefIter = innerSyncPoint.getReferenceIterator();
+					}
+	
+					//ret = false;
+				}
+				
+				// Move iterators to the sync point
+				mainiter = syncPoint.getMainIterator();
+				refiter = syncPoint.getReferenceIterator();
+			}
+		}
+		
+		return(ret);
+	}
+	
+	/**
+	 * This method finds the point in both descriptions where
+	 * the behaviour is the same (i.e. they are synchronized).
+	 * 
+	 * @param context The context
+	 * @param mainiter The main behaviour iterator
+	 * @param refiter The reference behaviour iterator
+	 * @param fullCompare Whether to do a full or basic comparison
+	 * @param end An optional sync point where this search should
+	 * 					finish
+	 * @return The sync point
+	 */
+	protected SyncPoint findNextSyncPoint(ComparatorContext context,
+					BehaviourListIterator mainiter,
+					BehaviourListIterator refiter,
+					boolean fullCompare, SyncPoint end) {
+		SyncPoint ret=null;
+		SyncPoint mainSyncPoint=null;
+		SyncPoint refSyncPoint=null;
+		int mainCount=0;
+		int refCount=0;
+		int maxMainCount=0;
+		int maxRefCount=0;
+		
+		if (mainiter != null && refiter != null) {
+			BehaviourListIterator mainiter2=mainiter.snapshot();
+			boolean f_end=false;
+			
+			while (f_end == false && mainSyncPoint == null && 
+								mainiter2.hasNext()) {
+				Behaviour main=mainiter2.next();
+				
+				if (end != null && end.getMain() == main) {
+					f_end = true;
+				} else {
+					BehaviourListIterator refiter2=refiter.snapshot();
+					
+					refCount = 0;
+					
+					boolean f_innerEnd=false;
+					
+					while (f_innerEnd == false && mainSyncPoint == null &&
+									refiter2.hasNext()) {
+						Behaviour ref=refiter2.next();
+						
+						if (end != null && end.getReference() == ref) {
+							f_innerEnd = true;
+						} else {
+							DefaultModelListener l=new DefaultModelListener(refiter2.getComposedSource());
+							
+							if (compareBehaviours(context, main, ref,
+									mainiter, refiter, l, fullCompare)) {
+								
+								mainSyncPoint = new SyncPoint(main, ref,
+										mainiter2, refiter2, mainCount, refCount);
+							} else {
+								refCount++;
+							}
+						}
+					}
+					
+					if (mainSyncPoint == null) {
+						mainCount++;
+						maxMainCount++;
+					}
+				}
+			}
+			
+			BehaviourListIterator refiter2=refiter.snapshot();
+			refCount = 0;
+			f_end = false;
+			
+			while (f_end == false && refSyncPoint == null &&
+							refiter2.hasNext()) {
+				Behaviour ref=refiter2.next();
+				if (end != null && end.getReference() == ref) {
+					f_end = true;
+				} else {
+					mainiter2 = mainiter.snapshot();
+					
+					mainCount = 0;
+					
+					boolean f_innerEnd=false;
+					
+					while (f_innerEnd == false &&
+							refSyncPoint == null && mainiter2.hasNext()) {
+						Behaviour main=mainiter2.next();
+						
+						if (end != null && end.getMain() == main) {
+							f_innerEnd = true;
+						} else {
+							DefaultModelListener l=new DefaultModelListener();
+							
+							if (compareBehaviours(context, main, ref,
+									mainiter, refiter, l, fullCompare)) {
+								
+								refSyncPoint = new SyncPoint(main, ref,
+										mainiter2, refiter2, mainCount, refCount);
+							} else {
+								mainCount++;
+							}
+						}
+					}
+					
+					if (refSyncPoint == null) {
+						refCount++;
+						maxRefCount++;					
+					}
+				}
+			}
+			
+			if (mainSyncPoint != null && refSyncPoint != null) {
+				if (mainSyncPoint.getTotal() <=
+								refSyncPoint.getTotal()) {
+					ret = mainSyncPoint;
+				} else {
+					ret = refSyncPoint;
+				}
+			} else if (mainSyncPoint != null) {
+				ret = mainSyncPoint;
+			} else {
+				ret = refSyncPoint;
+			}
+			
+			// If no sync point found, but components were remaining
+			// in main and/or ref list, then return a sync point with
+			// the number of components skipped
+			if (ret == null && (maxMainCount+maxRefCount) > 0) {
+				ret = new SyncPoint(null, null, null, null, maxMainCount, maxRefCount);
+			}
+		}
+		
+		return(ret);
+	}
+	
+	protected boolean compareBehaviours(ComparatorContext context,
+			Behaviour mainb, Behaviour refb,
+			BehaviourListIterator mainiter, BehaviourListIterator refiter,
+			ModelListener l, boolean fullCompare) {
+		boolean ret=false;
+		
+		if (mainb != null && refb != null) {
+			// TODO:
+			// how do we deal with grouping constructs - 
+			// they are behaviours, but if different, then
+			// no comparator rule will be found, which will
+			// currently default to true - should it return
+			// false???
+			
+			if (fullCompare) {
+			
+				// Check if multi-path elements
+				if (mainb instanceof BehaviourListPaths &&
+						refb instanceof BehaviourListPaths) {
+					
+					ret = compareMultiplePaths(context,
+							(BehaviourListPaths)mainb,
+							(BehaviourListPaths)refb,
+							mainiter, refiter, l, true);
+					
+				} else {
+					ret = compareSingleComponents(context,
+							mainb, refb, mainiter, refiter, l, true);
+				}
+				
+			} else if (mainb instanceof BehaviourListPaths &&
+					refb instanceof BehaviourListPaths) {
+				ret = context.isComparisonSupported(
+						((BehaviourListPaths)mainb).getSourceBehaviour(),
+						((BehaviourListPaths)refb).getSourceBehaviour());
+			} else {
+				
+				// Just check that a rule exists for the types
+				ret = context.isComparisonSupported(mainb, refb);
+			}
+		}
+
+		return(ret);
+	}
+	
+	protected boolean compareSingleComponents(ComparatorContext context,
+			Behaviour mainb, Behaviour refb,
+			BehaviourListIterator mainiter, BehaviourListIterator refiter,
+			ModelListener l, boolean deep) {
+		boolean ret=false;
+		
+		DefaultModelListener dml=new DefaultModelListener(
+					mainiter.getComposedSource());
+
+		// Add name map to comparator context
+		context.pushMainNameMap(mainiter.getNameMap());
+		context.pushReferenceNameMap(refiter.getNameMap());
+		
+		// Do shallow compare, to just check 
+		ret = context.compare(mainb, refb, dml, true);
+		
+		context.popReferenceNameMap();
+		context.popMainNameMap();
+		
+		ModelObject override=null;
+		
+		if (mainiter.getComposedSource() != null) {
+			override = mainiter.getModelInclude();
+		}
+		
+		// Associate reference description information
+		java.util.Map<String,Object> props=new java.util.HashMap<String,Object>();
+		
+		// TODO: GPB: NEED TO ADD 'ShowReferencedRescription'
+		// resolution ?????
+
+		/*
+		if (refiter.getExternalSource() != null) {
+			props.put(ModelListener.REFERENCE_MODEL,
+						refiter.getExternalSource());
+		} else {
+			props.put(ModelListener.REFERENCE_MODEL,
+						context.getReferenceSource());
+		}
+		
+		props.put(ModelListener.REFERENCE_MODEL_START_POSITION,
+						refb.getSource().getStartPosition());
+		props.put(ModelListener.REFERENCE_MODEL_END_POSITION,
+					refb.getSource().getEndPosition());
+		if (refb.getSource().getComponentURI() != null) {
+			props.put(ModelListener.REFERENCE_MODEL_COMPONENT,
+							refb.getSource().getComponentURI());
+		}
+		props.put(ModelListener.RESOLUTIONS,
+				ModelListener.SHOW_REFERENCE_DESCRIPTION_RESOLUTION);
+		*/
+		
+		java.util.List<Resolution> resolutions=new java.util.Vector<Resolution>();
+		
+		ShowReferencedDescription res=new ShowReferencedDescription();
+		res.setSourceReference(refb.getSource());
+
+		if (refiter.getComposedSource() != null) {
+			res.setModel(refiter.getComposedSource());
+		} else {
+			res.setModel(context.getReferenceSource());
+		}
+		
+		resolutions.add(res);
+
+		dml.apply(l, override, props, resolutions);
+
+		return(ret);
+	}
+	
+	protected boolean compareMultiplePaths(ComparatorContext context,
+			BehaviourListPaths mainblp, BehaviourListPaths refblp,
+			BehaviourListIterator mainiter, BehaviourListIterator refiter,
+					ModelListener l, boolean deep) {
+		boolean ret=false;
+		
+		DefaultModelListener dml=new DefaultModelListener(
+				mainiter.getComposedSource());
+		
+		ret = context.compare(mainblp.getSourceBehaviour(),
+				refblp.getSourceBehaviour(), dml, false);
+		
+		if (ret) {
+			dml = null;
+			
+			// Work through paths to find matching pairs and
+			// remove them from the lists
+			BehaviourList mainlist=null;
+			
+			while ((mainlist=mainblp.getNext()) != null) {
+				
+				refblp.reset();
+				
+				BehaviourList reflist=null;
+				boolean pathvalid=false;
+				
+				do {
+					reflist = refblp.getNext();
+					
+					if (reflist != null) {
+						
+						// TODO: Need to record model
+						// listener messages in temporary
+						// place and transfer
+						DefaultModelListener tmpl=
+							new DefaultModelListener(mainiter.getComposedSource());
+						
+						pathvalid = context.compare(mainlist,
+								reflist, tmpl, true);
+						
+						if (pathvalid) {
+							// Remove found list
+							refblp.handled(reflist);
+						}
+					}
+				} while (reflist != null && pathvalid == false);
+				
+				if (pathvalid) {
+					mainblp.handled(mainlist);
+				}
+			}
+			
+			// Reset main, to find errors in matching
+			mainblp.reset();
+			
+			// This time, the checks will focus on finding
+			// errors in the remaining unmatched paths
+			while (ret && (mainlist=mainblp.getNext()) != null) {
+				
+				refblp.reset();
+				
+				BehaviourList reflist=null;
+				
+				do {
+					reflist = refblp.getNext();
+					
+					if (reflist != null) {
+						
+						// TODO: Need to record model
+						// listener messages in temporary
+						// place and transfer
+						dml = new DefaultModelListener(mainiter.getComposedSource());
+								//mainlist.getModelInclude().getReference());
+						
+						ret = context.compare(mainlist,
+								reflist, dml, true);
+						
+						if (ret == true) {
+							dml = null;
+						}
+					}
+				} while (ret && reflist != null);
+			}
+
+			if (ret) {
+				refblp.reset();
+				mainblp.reset();
+				
+				// If reference behaviour list paths still exist, and the
+				// main behaviour list paths are not the decision maker,
+				// then check the paths for error.
+				// NOTE: Checking for main blp being decision maker, for
+				// situations where checking composability - so not related
+				// to whether ref blp is decision maker (as this will be
+				// determined when checking each path), but if main is
+				// decision maker, then additional paths are not relevant.
+				if (refblp.hasNext() &&
+						isMutuallyExclusiveDecisionMaker(mainblp) == false) {// &&
+						//isMutuallyExclusiveDecisionMaker(refblp) == false) {
+					BehaviourList refb=null;
+					
+					while ((refb=refblp.getNext()) != null) { //&&
+							//isMutuallyExclusiveDecisionMaker(refblp) == false) {
+						
+						if (isDecisionMaker(refb) == false &&
+								refb.getBehaviourList().size() > 0) {
+						
+							// TODO: Need to check if additional ref
+							// path belongs to a conditional multipath
+							// construct that is located at the projected
+							// role
+							
+							String mesg=java.util.PropertyResourceBundle.getBundle(
+									"org.scribble.conformance.comparator.Messages").
+									getString("_ADDITIONAL_UNMATCHED_REF_PATHS");
+							
+							ModelIssue issue=new ModelIssue(mainblp, mesg);
+							
+							ShowReferencedDescription res=new ShowReferencedDescription();
+							
+							if (refiter.getComposedSource() != null) {
+								res.setModel(refiter.getComposedSource());
+							} else {
+								res.setModel(context.getReferenceSource());
+							}
+							res.setSourceReference(refb.getSource());
+							
+							issue.getResolutions().add(res);
+	
+							l.error(issue);
+							
+							ret = false;
+						}
+					}
+					
+					//ret = false;
+					
+				}// else if (mainblp.hasNext() &&
+				//		isMutuallyExclusiveDecisionMaker(mainblp) == false) {
+				
+				if (mainblp.hasNext()&&
+						isMutuallyExclusiveDecisionMaker(refblp) == false) {
+					BehaviourList src=null;
+					
+					while ((src=mainblp.getNext()) != null) {
+		
+						if (isDecisionMaker(src) == false &&
+								src.getBehaviourList().size() > 0) {
+
+							String mesg=java.util.PropertyResourceBundle.getBundle(
+									"org.scribble.conformance.comparator.Messages").
+									getString("_ADDITIONAL_UNMATCHED_PATHS");
+					
+							ModelIssue issue=new ModelIssue(src, mesg);
+							
+							ShowReferencedDescription res=new ShowReferencedDescription();
+							
+							if (refiter.getComposedSource() != null) {
+								res.setModel(refiter.getComposedSource());
+							} else {
+								res.setModel(context.getReferenceSource());
+							}
+							
+							issue.getResolutions().add(res);
+							
+							l.error(issue);
+							
+							ret = false;
+						}
+					}
+					
+					//ret = false;
+				}
+			}
+		}
+		
+		// Copy errors into the main listener
+		if (dml != null) {
+			ModelObject override=null;
+			
+			if (mainiter.getComposedSource() != null) {
+				override = mainiter.getModelInclude();
+			}
+			
+			// Associate reference description information
+			java.util.Map<String,Object> props=
+				new java.util.HashMap<String,Object>();
+
+			// TODO: GPB: NEED TO ADD 'ShowReferencedRescription'
+			// resolution ?????
+			
+			/*
+			
+			if (refiter.getExternalSource() != null) {
+				props.put(ModelListener.REFERENCE_MODEL,
+							refiter.getExternalSource());
+			} else {
+				props.put(ModelListener.REFERENCE_MODEL,
+							context.getReferenceSource());
+			}
+			
+			props.put(ModelListener.REFERENCE_MODEL_START_POSITION,
+						refblp.getSource().getStartPosition());
+			props.put(ModelListener.REFERENCE_MODEL_END_POSITION,
+						refblp.getSource().getEndPosition());
+			if (refblp.getSource().getComponentURI() != null) {
+				props.put(ModelListener.REFERENCE_MODEL_COMPONENT,
+								refblp.getSource().getComponentURI());
+			}
+			props.put(ModelListener.RESOLUTIONS,
+					ModelListener.SHOW_REFERENCE_DESCRIPTION_RESOLUTION);
+			
+			*/
+			
+			java.util.List<Resolution> resolutions=new java.util.Vector<Resolution>();
+			
+			ShowReferencedDescription res=new ShowReferencedDescription();
+			res.setSourceReference(refblp.getSource());
+
+			if (refiter.getComposedSource() != null) {
+				res.setModel(refiter.getComposedSource());
+			} else {
+				res.setModel(context.getReferenceSource());
+			}
+			
+			resolutions.add(res);
+			
+			dml.apply(l, override, props, resolutions);
+			
+		/*
+		} else if (ret == false) {
+			// TODO: Need to report fact that
+			// no more reference lists are
+			// available
+			String mesg=java.util.PropertyResourceBundle.getBundle(
+					"org.scribble.conformance.comparator.Messages").
+					getString("_NO_MATCHING_PATH");
+			
+			
+			l.error(mainblp, mesg, null);
+		*/
+		}
+		
+		return(ret);
+	}
+	
+	protected Behaviour getNextBehaviour(ComparatorContext context,
+						BehaviourListIterator iter) {
+		Behaviour ret=null;
+		
+		while (ret == null && iter.hasNext()) {
+			Behaviour behaviour=iter.next();
+			if ((behaviour instanceof BehaviourListPaths &&
+					context.isTypeSupported(((BehaviourListPaths)
+							behaviour).getSourceBehaviour())) ||
+					context.isTypeSupported(behaviour)) {
+				ret = behaviour;
+			}
+		}
+		
+		return(ret);
+	}
+	
+	/**
+	 * This method helps to locate the relevant top level behaviour
+	 * list, where comparison should start from.
+	 * 
+	 * @param bl The proposed behaviour list
+	 * @return The actual top level behaviour list of interest
+	 */
+	protected BehaviourList getTopLevelBehaviourList(BehaviourList bl) {
+		BehaviourList ret=bl;
+		
+		if (ret.getBehaviourList().size() == 1) {
+			
+			if (ret.getBehaviourList().get(0) instanceof BehaviourList) {
+				ret = getTopLevelBehaviourList((BehaviourList)
+								ret.getBehaviourList().get(0));
+			} else if (ret.getBehaviourList().get(0) instanceof
+							BehaviourListPaths) {
+				BehaviourListPaths blps=(BehaviourListPaths)
+							ret.getBehaviourList().get(0);
+				
+				if (blps.getPaths().size() == 1) {
+					ret = getTopLevelBehaviourList(blps.getPaths().get(0));
+				}
+			}
+		}
+		
+		return(ret);
+	}
+	
+	/**
+	 * This method determines whether the supplied behaviour
+	 * is a conditional grouping construct that is the
+	 * decision maker - i.e. its located role is the same as
+	 * the projected role associated with the local model
+	 * definition.
+	 * 
+	 * @param b The behaviour
+	 * @return Whether the behaviour is a conditional decision
+	 * 						maker
+	 */
+	protected boolean isConditionalDecisionMaker(Behaviour b) {
+		boolean ret=false;
+		
+		// TODO: Check if conditional and a grouping construct
+		// rather than single or multi path. Then make 'if'
+		// conditional if it does not have a default 'else'
+		// clause
+		
+		//if (b instanceof SinglePathBehaviour &&
+		if (b.isGroupingConstruct() &&
+				b.isConditional()) {
+			Definition d=b.getEnclosingDefinition();
+			
+			if (d != null && d.getLocatedName() != null &&
+					d.getLocatedName().getRole() != null &&
+					b.getInitiatorRoles().contains(
+							d.getLocatedName().getRole())) {
+				ret = true;
+			}
+		}
+		
+		return(ret);
+	}
+	
+	/**
+	 * This method determines whether the supplied behaviour
+	 * is a conditional grouping construct that is the
+	 * decision maker - i.e. its located role is the same as
+	 * the projected role associated with the local model
+	 * definition.
+	 * 
+	 * @param b The behaviour
+	 * @return Whether the behaviour is a conditional decision
+	 * 						maker
+	 */
+	protected boolean isMutuallyExclusiveDecisionMaker(BehaviourListPaths blp) {
+		boolean ret=false;
+		
+		if (blp.getSourceBehaviour() instanceof MultiPathBehaviour &&
+				((MultiPathBehaviour)blp.getSourceBehaviour()).
+							isMutuallyExclusivePaths()) {
+			Definition d=blp.getSourceBehaviour().getEnclosingDefinition();
+			
+			if (d != null && d.getLocatedName() != null &&
+					d.getLocatedName().getRole() != null &&
+					blp.getSourceBehaviour().getInitiatorRoles().contains(
+							d.getLocatedName().getRole())) {
+				ret = true;
+			}
+		}
+		
+		return(ret);
+	}
+	
+	/**
+	 * This method determines whether the supplied behaviour
+	 * is a block that is the decision maker - i.e. it is
+	 * located role is the same as the projected role associated 
+	 * with the local model definition.
+	 * 
+	 * @param b The behaviour list
+	 * @return Whether the behaviour is a block initiated at the
+	 * 					located role.
+	 */
+	protected boolean isDecisionMaker(BehaviourList b) {
+		boolean ret=false;
+		
+		Definition d=b.getBlock().getEnclosingDefinition();
+			
+		if (d != null && d.getLocatedName() != null &&
+				d.getLocatedName().getRole() != null &&
+				b.getBlock().getInitiatorRoles().contains(
+							d.getLocatedName().getRole())) {
+			ret = true;
+		}
+		
+		return(ret);
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.conformance/src/java/org/scribble/conformance/comparator/Messages.properties
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conformance/src/java/org/scribble/conformance/comparator/Messages.properties	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conformance/src/java/org/scribble/conformance/comparator/Messages.properties	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,24 @@
+# /*
+# * Copyright 2007 Pi4 Technologies Ltd
+# *
+# * Licensed under the Apache License, Version 2.0 (the "License");
+# * you may not use this file except in compliance with the License.
+# * You may obtain a copy of the License at
+# *
+# *     http://www.apache.org/licenses/LICENSE-2.0
+# *
+# * Unless required by applicable law or agreed to in writing, software
+# * distributed under the License is distributed on an "AS IS" BASIS,
+# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# * See the License for the specific language governing permissions and
+# * limitations under the License.
+# *
+# *
+# * Change History:
+# * 24 Nov 2007 : Initial version created by gary
+# */
+
+_ADDITIONAL_UNMATCHED_PATHS=Additional unmatched paths in model
+_ADDITIONAL_UNMATCHED_REF_PATHS=Additional unmatched paths in reference description
+_EXPECTING_ACTIVITY=Expecting additional activities as defined in referenced description
+_NO_MATCHING_PATH=No matching path

Added: tools/eclipse/trunk/plugins/org.scribble.conformance/src/java/org/scribble/conformance/comparator/StatelessDefinitionComparatorRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conformance/src/java/org/scribble/conformance/comparator/StatelessDefinitionComparatorRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conformance/src/java/org/scribble/conformance/comparator/StatelessDefinitionComparatorRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,217 @@
+/*
+ * Copyright 2007-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 22 Nov 2008 : Initial version created by gary
+ */
+package org.scribble.conformance.comparator;
+
+import org.scribble.model.*;
+import org.scribble.model.admin.DefaultModelListener;
+import org.scribble.model.admin.ModelIssue;
+import org.scribble.model.admin.ModelListener;
+import org.scribble.model.resolutions.*;
+import org.scribble.comparator.*;
+import org.scribble.conformance.model.*;
+import org.scribble.conformance.model.transform.StatelessTransformer;
+import org.scribble.extensions.RegistryFactory;
+import org.scribble.extensions.RegistryInfo;
+
+/**
+ * This class provides the comparator rule for creating a
+ * stateless reference model for comparison against a
+ * stateless main model.
+ */
+ at RegistryInfo(extension=ComparatorRule.class)
+public class StatelessDefinitionComparatorRule implements ComparatorRule {
+
+	/**
+	 * This method determines whether the comparison rule is
+	 * associated with the supplied type.
+	 * 
+	 * @param obj The object to check
+	 * @return Whether the object is of a type supported by the
+	 * 					comparison rule
+	 */
+	public boolean isTypeSupported(ModelObject obj) {
+		// Don't want this to indicate that the definition
+		// has a comparator rule - only want to use this
+		// rule to trigger a stateless conversion if necessary
+		return(false);
+	}
+	
+	/**
+	 * This method determines whether the comparison rule is
+	 * appropriate for the supplied model objects.
+	 * 
+	 * @param main The main model object to be compared
+	 * @param ref The reference model object to be compared against
+	 * @return Whether the rule is relevant for the
+	 * 				model objects
+	 */
+	public boolean isComparisonSupported(ModelObject main, ModelObject ref) {
+		return(main instanceof Definition &&
+				ref instanceof Definition &&
+				((Definition)main).isStateless() !=
+					((Definition)ref).isStateless() &&
+				((Definition)main).getLocatedName().getRole() != null &&
+				((Definition)ref).getLocatedName().getRole() != null);
+	}
+	
+	/**
+	 * This method compares a model object against a reference
+	 * component to determine if they are equal.
+	 * 
+	 * @param context The context
+	 * @param main The main model object
+	 * @param reference The reference model object
+	 * @param l The model listener
+	 * @param deep Perform a deep compare
+	 * @return Whether the model objects are comparable
+	 */
+	public boolean compare(ComparatorContext context, ModelObject main,
+					ModelObject reference, ModelListener l, boolean deep) {
+		boolean ret=false;
+		
+		// Generate a stateless (or rather stateful fragments) version of the
+		// reference definition, and then compare this against the main model
+		if (((Definition)reference).isStateless() == false) {
+			StatelessTransformer transformer=
+				(StatelessTransformer)
+					RegistryFactory.getRegistry().getExtension(
+						StatelessTransformer.class,
+						context.getReferenceSource().getNotation());
+
+			if (transformer != null) {				
+				org.scribble.export.Exporter exporter=
+					(org.scribble.export.Exporter)
+					RegistryFactory.getRegistry().getExtension(
+							org.scribble.export.Exporter.class, null);
+
+				try {
+					org.scribble.export.text.TextFormatter formatter=
+						new org.scribble.export.text.TextFormatter();
+					
+					java.io.ByteArrayOutputStream os=
+						new java.io.ByteArrayOutputStream();
+					
+					formatter.setOutputStream(os);
+					
+					exporter.export(context.getReferenceSource(),
+								reference, formatter);
+					
+					String str=new String(os.toByteArray());
+					
+					System.out.println("EXPORTED REFERENCE STATEFUL:");
+					System.out.println(str);
+					
+				} catch(Exception e) {
+					e.printStackTrace();
+				}
+				
+				reference = transformer.transform((Definition)reference,
+							context.getReferenceSource());
+
+				try {
+					org.scribble.export.text.TextFormatter formatter=
+						new org.scribble.export.text.TextFormatter();
+					
+					java.io.ByteArrayOutputStream os=
+						new java.io.ByteArrayOutputStream();
+					
+					formatter.setOutputStream(os);
+					
+					exporter.export(context.getReferenceSource(),
+							reference, formatter);
+					
+					String str=new String(os.toByteArray());
+					
+					System.out.println("EXPORTED REFERENCE STATELESS:");
+					System.out.println(str);
+					
+				} catch(Exception e) {
+					e.printStackTrace();
+				}
+			}
+		} else if (((Definition)main).isStateless() == false) {
+			StatelessTransformer transformer=
+				(StatelessTransformer)
+					RegistryFactory.getRegistry().getExtension(
+						StatelessTransformer.class,
+						context.getMainSource().getNotation());
+
+			if (transformer != null) {				
+				org.scribble.export.Exporter exporter=
+					(org.scribble.export.Exporter)
+					RegistryFactory.getRegistry().getExtension(
+							org.scribble.export.Exporter.class, null);
+				
+				try {
+					org.scribble.export.text.TextFormatter formatter=
+						new org.scribble.export.text.TextFormatter();
+					
+					java.io.ByteArrayOutputStream os=
+						new java.io.ByteArrayOutputStream();
+					
+					formatter.setOutputStream(os);
+					
+					exporter.export(context.getMainSource(),
+							main, formatter);
+					
+					String str=new String(os.toByteArray());
+					
+					System.out.println("EXPORTED MAIN STATEFUL:");
+					System.out.println(str);
+					
+				} catch(Exception e) {
+					e.printStackTrace();
+				}
+
+				main = transformer.transform((Definition)main,
+						context.getMainSource());
+
+				try {
+					org.scribble.export.text.TextFormatter formatter=
+						new org.scribble.export.text.TextFormatter();
+					
+					java.io.ByteArrayOutputStream os=
+						new java.io.ByteArrayOutputStream();
+					
+					formatter.setOutputStream(os);
+					
+					exporter.export(context.getMainSource(),
+							main, formatter);
+					
+					String str=new String(os.toByteArray());
+					
+					System.out.println("EXPORTED MAIN STATELESS:");
+					System.out.println(str);
+					
+				} catch(Exception e) {
+					e.printStackTrace();
+				}
+			}
+		}
+				
+		if (reference != null && main != null &&
+				((Definition)main).isStateless() &&
+				((Definition)reference).isStateless()) {
+			ret = context.compare(main, reference, l, deep);
+		}
+		
+		return(ret);
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.conformance/src/java/org/scribble/conformance/comparator/SyncPoint.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conformance/src/java/org/scribble/conformance/comparator/SyncPoint.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conformance/src/java/org/scribble/conformance/comparator/SyncPoint.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,77 @@
+/*
+ * Copyright 2005-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 18 Jul 2008 : Initial version created by gary
+ */
+package org.scribble.conformance.comparator;
+
+import org.scribble.model.*;
+import org.scribble.conformance.model.*;
+
+public class SyncPoint {
+
+	public SyncPoint(Behaviour main, Behaviour ref,
+			BehaviourListIterator mainiter,
+			BehaviourListIterator refiter,
+			int mainCount, int refCount) {
+		m_main = main;
+		m_reference = ref;
+		m_mainIterator = mainiter;
+		m_referenceIterator = refiter;
+		m_mainCount = mainCount;
+		m_referenceCount = refCount;
+	}
+	
+	public Behaviour getMain() {
+		return(m_main);
+	}
+	
+	public Behaviour getReference() {
+		return(m_reference);
+	}
+	
+	public BehaviourListIterator getMainIterator() {
+		return(m_mainIterator);
+	}
+	
+	public BehaviourListIterator getReferenceIterator() {
+		return(m_referenceIterator);
+	}
+	
+	public int getMainCount() {
+		return(m_mainCount);
+	}
+	
+	public int getReferenceCount() {
+		return(m_referenceCount);
+	}
+	
+	public int getTotal() {
+		return(m_mainCount+m_referenceCount);
+	}
+	
+	public boolean isGap() {
+		return(getTotal() > 0);
+	}
+	
+	private Behaviour m_main=null;
+	private Behaviour m_reference=null;
+	private BehaviourListIterator m_mainIterator=null;
+	private BehaviourListIterator m_referenceIterator=null;
+	private int m_mainCount=0;
+	private int m_referenceCount=0;
+}

Added: tools/eclipse/trunk/plugins/org.scribble.conformance/src/java/org/scribble/conformance/model/BehaviourList.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conformance/src/java/org/scribble/conformance/model/BehaviourList.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conformance/src/java/org/scribble/conformance/model/BehaviourList.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,356 @@
+/*
+ * Copyright 2007 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 27 Nov 2007 : Initial version created by gary
+ */
+package org.scribble.conformance.model;
+
+import org.scribble.model.*;
+
+/**
+ * This class provides a list mechanism for serialising the
+ * behaviours associated with a definition. This makes it
+ * easier to compare the behaviours between definitions.
+ */
+public class BehaviourList extends Behaviour
+						implements org.scribble.model.Visitor,
+								org.scribble.comparator.NameMap {
+
+	/**
+	 * This method returns the top level behaviour list associated
+	 * with the supplied block.
+	 * 
+	 * @param defn The block
+	 * @return The top level behaviour list
+	 */
+	public static BehaviourList createBehaviourList(Block defn) {
+		BehaviourList ret=new BehaviourList(defn);
+		
+		ret = getTopLevelBehaviourList(ret);
+		
+		return(ret);
+	}
+	
+	/**
+	 * This constructor initializes the behaviour list with the
+	 * supplied block.
+	 * 
+	 * @param defn The block
+	 */
+	protected BehaviourList(Block defn) {
+		m_block = defn;
+		
+		initialize();
+	}
+
+	/**
+	 * This constructor initializes the behaviour list with the
+	 * supplied block and model inclusion.
+	 * 
+	 * @param defn The block
+	 * @param include The model inclusion construct
+	 */
+	protected BehaviourList(Block defn, org.scribble.model.ModelInclude include) {
+		m_block = defn;
+		m_include = include;
+		
+		initialize();
+	}
+	
+	protected BehaviourList() {
+		// Create a dummy block associated with the
+		// behaviour list - required for test purposes,
+		// to report as target of errors if comparison
+		// detects a missing activity at the end of the
+		// block.
+		m_block = new Block();
+	}
+	
+	protected void initialize() {
+		derivedFrom(m_block);
+		m_block.visit(this);
+	}
+	
+	/**
+	 * This method sets the name map associated with the behaviour
+	 * list.
+	 * 
+	 * @param map The name map
+	 */
+	public void setNameMap(java.util.Map<String,String> map) {
+		m_nameMap = map;
+	}
+	
+	/**
+	 * This method returns the name that has been mapped
+	 * to the supplied name. If the supplied name has
+	 * no mapping, then the same name will be returned.
+	 * 
+	 * @param name The current name
+	 * @return The original name
+	 */
+	public String getName(String name) {
+		return(m_nameMap == null || m_nameMap.containsKey(name) == false
+					? name : m_nameMap.get(name));
+	}
+	
+	public boolean visit(ModelObject obj) {
+		boolean ret=false;
+		
+		if (obj instanceof org.scribble.model.MultiPathBehaviour) {
+			org.scribble.model.MultiPathBehaviour paths=
+					(org.scribble.model.MultiPathBehaviour)obj;
+			java.util.List<BehaviourList> bllist=
+					new java.util.Vector<BehaviourList>();
+			
+			for (int i=0; i < paths.getPaths().size(); i++) {
+				org.scribble.model.Block block=paths.getPaths().get(i);
+				
+				BehaviourList bl=new BehaviourList(block);
+				
+				//bl.derivedFrom(block);
+				
+				bl.setNameMap(m_nameMap);
+				
+				//block.visit(bl);
+				
+				bllist.add(bl);
+			}
+			
+			BehaviourListPaths blpaths=new BehaviourListPaths((Behaviour)obj,
+									bllist);
+			
+			if (blpaths.isVisible()) {
+				addToList(blpaths);
+			}
+
+		} else if (obj instanceof org.scribble.model.SinglePathBehaviour) {
+			org.scribble.model.SinglePathBehaviour path=
+					(org.scribble.model.SinglePathBehaviour)obj;
+			java.util.List<BehaviourList> bllist=
+					new java.util.Vector<BehaviourList>();
+			
+			BehaviourList bl=new BehaviourList(path.getBlock());
+				
+			//bl.derivedFrom(path.getBlock());
+				
+			bl.setNameMap(m_nameMap);
+				
+			//path.getBlock().visit(bl);
+				
+			bllist.add(bl);
+			
+			BehaviourListPaths blpaths=new BehaviourListPaths((Behaviour)obj,
+									bllist);
+			
+			if (blpaths.isVisible()) {
+				addToList(blpaths);
+			}
+
+		} else if (obj instanceof org.scribble.model.ModelInclude) {
+			org.scribble.model.ModelInclude include=
+					(org.scribble.model.ModelInclude)obj;
+			org.scribble.model.Definition defn=
+					((org.scribble.model.ModelInclude)obj).getDefinition();
+			
+			if (defn != null) {
+				BehaviourList list=null;
+				
+				// Check if external model - if so, then
+				// need to supply reference to list, so can be
+				// used in error reporting
+				if (include.getReference() != null &&
+							include.getReference().isInner() == false) {
+					list = new BehaviourList(defn.getBlock(), include);
+				} else {
+					list = new BehaviourList(defn.getBlock());
+				}
+				
+				list.setNameMap(getNameMap(include.getBindings()));
+				
+//				list.derivedFrom(include);
+				
+//				defn.visit(list);
+			
+				// Add list, if async (to identify existence of
+				// async composed conversation), or if the list
+				// has elements
+				if (include.isAsynchronous()) {
+					
+					// If async, then need to add 'behaviour
+					// list path' to isolate the behaviour
+					// list, to ensure it does not get merged
+					// into the outer list (as with the
+					// sync run)
+					java.util.List<BehaviourList> bllist=
+						new java.util.Vector<BehaviourList>();
+				
+					bllist.add(list);
+				
+					BehaviourListPaths blpaths=new BehaviourListPaths((Behaviour)obj,
+										bllist);
+				
+					addToList(blpaths);
+					
+				} else if (list.getBehaviourList().size() > 0) {
+					addToList(list);					
+				}
+			}
+			
+		} else if (obj instanceof org.scribble.model.Block) {
+			
+			// Iterate through each activity checking its a behaviour
+			ret = true;
+			
+		} else if (obj instanceof org.scribble.model.Behaviour) {
+			addToList((Behaviour)obj);
+		
+			// Only recursively check for behaviours
+			// inside other behaviours. This will ensure
+			// inner protocols will not be indirectly
+			// processed - only if invoked as part of
+			// a run statement.
+			ret = true;
+			
+		} else if (obj == m_block) {
+			// Visiting the main definition, so visit contents
+			ret = true;
+		}
+		
+		return(ret);
+	}
+	
+	/**
+	 * This method adds the supplied behaviour to the list.
+	 * 
+	 * @param behaviour The behaviour
+	 */
+	protected void addToList(Behaviour behaviour) {
+		boolean f_added=false;
+		
+		if (m_list.size() > 0) {
+			// Check behaviour at the end of the list, to determine
+			// whether the behaviour to be added to be added to
+			// a contained single or multi path behaviour
+			Behaviour prev=m_list.get(m_list.size()-1);
+			
+			if (prev instanceof BehaviourListPaths &&
+					((BehaviourListPaths)prev).isStrictScope() == false) {
+				BehaviourListPaths blpaths=(BehaviourListPaths)prev;
+				
+				// Place the entry to be added in each of the paths
+				for (int i=0; i < blpaths.getPaths().size(); i++) {
+					
+					// Recursively perform the add-to-list, so if
+					// another non-strict scope construct gets added
+					// then subsequent activities will be contained
+					// within it, rather than the outer one
+					blpaths.getPaths().get(i).addToList(behaviour);
+					
+					f_added = true;
+				}
+			}
+		}
+		
+		if (f_added == false) {
+			m_list.add(behaviour);
+		}
+	}
+	
+	/**
+	 * This method returns the name map associated with the supplied
+	 * binding information. The returned name map links the bound name
+	 * back to the original declaration name.
+	 * 
+	 * @param bindings The bindings
+	 * @return The name map
+	 */
+	protected java.util.Map<String,String> getNameMap(java.util.List<DeclarationBinding> bindings) {
+		java.util.Map<String,String> ret=new java.util.Hashtable<String,String>();
+		
+		java.util.Iterator<DeclarationBinding> iter=bindings.iterator();
+		while (iter.hasNext()) {
+			DeclarationBinding db=iter.next();
+			
+			ret.put(db.getBoundName(), db.getDeclaration().getName());
+		}
+		
+		return(ret);
+	}
+	
+	public BehaviourListIterator getIterator() {
+		return(new BehaviourListIterator(this));
+	}
+
+	public java.util.List<Behaviour> getBehaviourList() {
+		return(m_list);
+	}
+	
+	/**
+	 * This method returns the optional model include
+	 * associated with the contained behaviour activities.
+	 * 
+	 * @return The optional model include
+	 */
+	public org.scribble.model.ModelInclude getModelInclude() {
+		return(m_include);
+	}
+	
+	/**
+	 * This method returns the model object associated with the
+	 * list.
+	 * 
+	 * @return The model object
+	 */
+	public Block getBlock() {
+		return(m_block);
+	}
+	
+	/**
+	 * This method helps to locate the relevant top level behaviour
+	 * list, where comparison should start from.
+	 * 
+	 * @param bl The proposed behaviour list
+	 * @return The actual top level behaviour list of interest
+	 */
+	protected static BehaviourList getTopLevelBehaviourList(BehaviourList bl) {
+		BehaviourList ret=bl;
+		
+		if (ret.getBehaviourList().size() == 1) {
+			
+			if (ret.getBehaviourList().get(0) instanceof BehaviourList) {
+				ret = getTopLevelBehaviourList((BehaviourList)
+								ret.getBehaviourList().get(0));
+			} else if (ret.getBehaviourList().get(0) instanceof
+							BehaviourListPaths) {
+				BehaviourListPaths blps=(BehaviourListPaths)
+							ret.getBehaviourList().get(0);
+				
+				if (blps.getPaths().size() == 1) {
+					ret = getTopLevelBehaviourList(blps.getPaths().get(0));
+				}
+			}
+		}
+		
+		return(ret);
+	}
+
+	private Block m_block=null;
+	private org.scribble.model.ModelInclude m_include=null;
+	private java.util.Map<String,String> m_nameMap=null;
+	private java.util.List<Behaviour> m_list=new java.util.Vector<Behaviour>();
+}

Added: tools/eclipse/trunk/plugins/org.scribble.conformance/src/java/org/scribble/conformance/model/BehaviourListIterator.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conformance/src/java/org/scribble/conformance/model/BehaviourListIterator.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conformance/src/java/org/scribble/conformance/model/BehaviourListIterator.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,124 @@
+/*
+ * Copyright 2007 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 29 Nov 2007 : Initial version created by gary
+ */
+package org.scribble.conformance.model;
+
+import org.scribble.model.*;
+
+/**
+ * This class provides an iterator implementation over a behaviour list.
+ */
+public class BehaviourListIterator implements java.util.Iterator<Behaviour> {
+
+	public BehaviourListIterator(BehaviourList list) {
+		m_list = list;
+	}
+	
+	protected BehaviourListIterator(BehaviourListIterator iter) {
+		m_list = iter.m_list;
+		m_index = iter.m_index;
+		if (iter.m_subList != null) {
+			m_subList = iter.m_subList.snapshot();
+		}
+	}
+	
+	public BehaviourListIterator snapshot() {
+		return(new BehaviourListIterator(this));
+	}
+	
+	public boolean hasNext() {
+		boolean ret=false;
+		
+		if (m_index < m_list.getBehaviourList().size() ||
+				(m_subList != null && m_subList.hasNext())) {
+			ret = true;
+		}
+		
+		return(ret);
+	}
+
+	public Behaviour next() {
+		Behaviour ret=null;
+		boolean f_end=false;
+		
+		do {
+			if (m_subList != null) {
+				
+				// Check if sublist has next
+				if (m_subList.hasNext()) {
+					ret = m_subList.next();
+				} else {
+					// Clear the list
+					m_subList = null;
+				}
+			} else if (m_index < m_list.getBehaviourList().size()) {
+				
+				ret = m_list.getBehaviourList().get(m_index++);
+				
+				if (ret instanceof BehaviourList) {
+					m_subList = ((BehaviourList)ret).getIterator();
+					ret = null;
+				}
+			} else {
+				f_end = true;
+			}
+		} while(ret == null && f_end == false);
+		
+		return(ret);
+	}
+
+	public void remove() {
+	}
+	
+	public ModelReference getComposedSource() {
+		ModelReference ret=null;
+		
+		if (m_subList != null) {
+			ret = m_subList.getComposedSource();
+		} else if (m_list.getModelInclude() != null) {
+			ret = m_list.getModelInclude().getReference();
+		}
+		
+		return(ret);
+	}
+	
+	public ModelInclude getModelInclude() {
+		ModelInclude ret=m_list.getModelInclude();
+		
+		if (ret == null && m_subList != null) {
+			ret = m_subList.getModelInclude();
+		}
+		
+		return(ret);
+	}
+	
+	public org.scribble.comparator.NameMap getNameMap() {
+		org.scribble.comparator.NameMap ret=m_list;
+		
+		if (m_subList != null) {
+			ret = m_subList.getNameMap();
+		}
+		
+		return(ret);
+	}
+
+	private BehaviourList m_list=null;
+	private int m_index=0;
+	private BehaviourListIterator m_subList=null;
+}

Added: tools/eclipse/trunk/plugins/org.scribble.conformance/src/java/org/scribble/conformance/model/BehaviourListPaths.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conformance/src/java/org/scribble/conformance/model/BehaviourListPaths.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conformance/src/java/org/scribble/conformance/model/BehaviourListPaths.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,214 @@
+/*
+ * Copyright 2007 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 29 Nov 2007 : Initial version created by gary
+ */
+package org.scribble.conformance.model;
+
+import org.scribble.model.*;
+
+/**
+ * This class represents the group of behaviour list paths
+ * that need to be compared.
+ */
+public class BehaviourListPaths extends org.scribble.model.Behaviour {
+
+	/**
+	 * This constructor initializes the list of paths.
+	 * 
+	 * @param source The source behaviour
+	 * @param lists The list of BehaviourList objects
+	 */
+	public BehaviourListPaths(Behaviour source,
+					java.util.List<BehaviourList> lists) {
+		m_source = source;
+		m_lists = lists;
+		
+		derivedFrom(source);
+	}
+	
+	/**
+	 * This method returns the source behaviour associated
+	 * with the multiple paths.
+	 * 
+	 * @return The source behaviour
+	 */
+	public Behaviour getSourceBehaviour() {
+		return(m_source);
+	}
+	
+	/**
+	 * This method resets the index to the current path
+	 * to the beginning.
+	 */
+	public void reset() {
+		m_index = 0;
+	}
+	
+	/**
+	 * This method returns the next appropriate BehaviourList.
+	 * 
+	 * @return The BehaviourList
+	 */
+	public BehaviourList getNext() {
+		BehaviourList ret=null;
+		
+		if (m_index < m_lists.size()) {
+			ret = m_lists.get(m_index++);
+		}
+		
+		return(ret);
+	}
+	
+	/**
+	 * This method determines whether there are more behaviour
+	 * lists to return.
+	 * 
+	 * @return Whether more behaviour lists to process
+	 */
+	public boolean hasNext() {
+		return(m_index < m_lists.size());
+	}
+	
+	/**
+	 * This method removes the handled behaviour list from
+	 * the list, to mark it as handled, and sets the
+	 * position to be the next list after the one that is
+	 * handled.
+	 * 
+	 * @param list The list that has been handled
+	 */
+	public void handled(BehaviourList list) {
+		if (m_lists.contains(list)) {
+			m_index = m_lists.indexOf(list);
+			m_lists.remove(list);
+		}
+	}
+	
+	/**
+	 * This method determines whether this multipath
+	 * construct is 'visible' in terms of conformance.
+	 * 
+	 * @return Whether the construct is visible (or
+	 * 				observable)
+	 */
+	public boolean isVisible() {
+		boolean ret=false;
+		
+		for (int i=0; ret == false && i < m_lists.size(); i++) {
+			if (m_lists.get(i).getBehaviourList().size() > 0) {
+				ret = true;
+			}
+		}
+		
+		return(ret);
+	}
+	
+	/**
+	 * This method returns whether the behaviour is a grouping
+	 * construct.
+	 * 
+	 * @return Whether the behaviour is a grouping construct 
+	 */
+	@Override
+	public boolean isGroupingConstruct() {
+		return(m_source.isGroupingConstruct());
+	}
+	
+	/**
+	 * This method indicates whether the activity
+	 * is a conditional construct.
+	 * 
+	 * @return Whether the activity is conditional
+	 */
+	@Override
+	public boolean isConditional() {
+		return(m_source.isConditional());
+	}
+	
+	/**
+	 * This method returns whether the behaviour is a wait
+	 * state.
+	 * 
+	 * @return Whether the behaviour is a wait state
+	 */
+	@Override
+	public boolean isWaitState() {
+		return(m_source.isWaitState());
+	}
+	
+	/**
+	 * This method returns the behaviour lists representing the
+	 * paths associated with a single or multi-path construct.
+	 * 
+	 * @return The paths
+	 */
+	public java.util.List<BehaviourList> getPaths() {
+		return(m_lists);
+	}
+	
+	/**
+	 * This method determines if the underlying grouping construct
+	 * has strict scope.
+	 * 
+	 * @return Whether the behaviour represents a strict scope
+	 */
+	public boolean isStrictScope() {
+		boolean ret=true;
+		
+		// Default is to be strict scope. Only change if
+		// explicitly set to false by single or multiple path
+		// behaviour
+		if (m_source instanceof SinglePathBehaviour) {
+			ret = ((SinglePathBehaviour)m_source).isStrictScope();
+			
+		} else if (m_source instanceof MultiPathBehaviour) {
+			ret = ((MultiPathBehaviour)m_source).isStrictScope();
+		}
+		
+		return(ret);
+	}
+	
+	/**
+	 * This method returns the definition in which this
+	 * activity is contained.
+	 * 
+	 * @return The definition, or null if not found
+	 */
+	@Override
+	public Definition getEnclosingDefinition() {
+		return(m_source.getEnclosingDefinition());
+	}
+	
+	/**
+	 * This method returns the list of roles that are
+	 * responsible for initiating the activity. This can
+	 * be used to determine whether the model is
+	 * consistent in terms of decision makers subsequently
+	 * initiating actions.
+	 * 
+	 * @return The list of initiator roles
+	 */
+	@Override
+	public java.util.List<Role> getInitiatorRoles() {
+		return(m_source.getInitiatorRoles());
+	}
+
+	private Behaviour m_source=null;
+	private java.util.List<BehaviourList> m_lists=null;
+	private int m_index=0;
+}

Added: tools/eclipse/trunk/plugins/org.scribble.conformance/src/java/org/scribble/conformance/model/transform/AbstractDefinitionStatelessTransformationRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conformance/src/java/org/scribble/conformance/model/transform/AbstractDefinitionStatelessTransformationRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conformance/src/java/org/scribble/conformance/model/transform/AbstractDefinitionStatelessTransformationRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,163 @@
+/*
+ * Copyright 2005-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 13 Dec 2008 : Initial version created by gary
+ */
+package org.scribble.conformance.model.transform;
+
+import org.scribble.conformance.model.BehaviourList;
+import org.scribble.extensions.RegistryFactory;
+import org.scribble.model.*;
+import org.scribble.model.admin.DefaultModelListener;
+
+/**
+ * This class represents an abstract definition stateless
+ * transformation rule. This class initialises the context
+ * with appropriate top level information which can be used
+ * when processing other transformations.
+ */
+public abstract class AbstractDefinitionStatelessTransformationRule
+						extends AbstractStatelessTransformationRule {
+
+	/**
+	 * This method returns a new definition of the appropriate
+	 * type.
+	 * 
+	 * @param context The context
+	 * @return The definition
+	 */
+	protected abstract Definition createDefinition(StatelessTransformationContext context);
+	
+	/**
+	 * This method returns a new multi-path behaviour, of the
+	 * appropriate type, to represent the mutually exclusive
+	 * choice construct at the top level of the stateless definition.
+	 * 
+	 * @param context The context
+	 * @return The multi-path behaviour
+	 */
+	protected abstract MultiPathBehaviour createMultiPathBehaviour(StatelessTransformationContext context);
+	
+	/**
+	 * This method transforms the supplied model object into
+	 * a stateless equivalent.
+	 * 
+	 * @param context The context
+	 * @param modelObject The model object to transform
+	 * @return The transformed object
+	 */
+	@Override
+	public ModelObject transform(StatelessTransformationContext context,
+							ModelObject modelObject) {
+		Definition ret=null;
+		Definition src=(Definition)modelObject;
+		
+		if (src.isStateless() == false) {
+			ret = createDefinition(context);
+			
+			ret.setStateless(true);
+			
+			LocatedName name=new LocatedName();
+			name.setName(src.getLocatedName().getName());
+			
+			if (src.getLocatedName().getRole() != null) {
+				Role role=new Role();
+				role.setName(src.getLocatedName().getRole().getName());
+				
+				name.setRole(role);
+			}
+			
+			name.derivedFrom(src.getLocatedName());
+			
+			ret.setLocatedName(name);
+			
+			// Convert conforms-to references
+			for (int i=0; i < src.getConformsTo().size(); i++) {
+				ConformanceReference ref=src.getConformsTo().get(i);
+				
+				ConformanceReference newref=new ConformanceReference(ref);
+				
+				ret.getConformsTo().add(newref);
+			}
+			
+			// Convert implements references
+			for (int i=0; i < src.getImplements().size(); i++) {
+				ImplementsReference ref=src.getImplements().get(i);
+				
+				ImplementsReference newref=new ImplementsReference(ref);
+				
+				ret.getImplements().add(newref);
+			}
+			
+			// Create role list
+			RoleList roleList=new RoleList();
+			
+			((DefaultStatelessTransformationContext)context).setRoleList(roleList);
+			
+			ret.getBlock().getContents().add(roleList);
+			
+			// Create the multi-path behaviour
+			MultiPathBehaviour mpb=createMultiPathBehaviour(context);
+			
+			if (mpb instanceof Activity) {
+				ret.getBlock().getContents().add((Activity)mpb);
+				
+				((DefaultStatelessTransformationContext)context).setMultiPathBehaviour(mpb);
+			}
+			
+			// Create initial path and process contents of the
+			// definition
+			Block newPath=context.createNewPath();
+			
+			context.transform(src.getBlock(), newPath);
+			
+			// Check for duplicate paths in multi-path behaviour
+			org.scribble.comparator.Comparator comparator=
+				(org.scribble.comparator.Comparator)
+				RegistryFactory.getRegistry().getExtension(
+						org.scribble.comparator.Comparator.class, null);
+
+			for (int i=mpb.getPaths().size()-1; i >= 0; i--) {
+				Block path=mpb.getPaths().get(i);
+				boolean f_duplicate=false;
+				
+				for (int j=0; f_duplicate == false &&
+									j < i; j++) {
+					Block path2=mpb.getPaths().get(j);
+					
+					DefaultModelListener l=new DefaultModelListener();
+					
+					BehaviourList mainBehaviourList=BehaviourList.createBehaviourList(path);
+					BehaviourList refBehaviourList=BehaviourList.createBehaviourList(path2);
+					
+					if (comparator.compare(mainBehaviourList,
+							context.getSource(), refBehaviourList,
+							context.getSource(), l)) {
+						f_duplicate = true;
+					}
+				}
+				
+				if (f_duplicate) {
+					mpb.removePath(path);
+				}
+			}
+		}
+		
+		return(ret);
+	}
+
+}

Added: tools/eclipse/trunk/plugins/org.scribble.conformance/src/java/org/scribble/conformance/model/transform/AbstractStatelessTransformationRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conformance/src/java/org/scribble/conformance/model/transform/AbstractStatelessTransformationRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conformance/src/java/org/scribble/conformance/model/transform/AbstractStatelessTransformationRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,57 @@
+/*
+ * Copyright 2005-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 13 Dec 2008 : Initial version created by gary
+ */
+package org.scribble.conformance.model.transform;
+
+import org.scribble.model.*;
+
+/**
+ * This class represents an abstract stateless
+ * transformation rule.
+ */
+public abstract class AbstractStatelessTransformationRule
+						implements StatelessTransformationRule {
+
+	/**
+	 * This method transforms the supplied block activities into
+	 * a stateless equivalent.
+	 * 
+	 * @param context The context
+	 * @param src The source block
+	 * @param target The target block
+	 * @return Whether the block has been fully transformed
+	 */
+	public boolean transform(StatelessTransformationContext context,
+						Block src, Block target) {
+		return(true);
+	}
+	
+	/**
+	 * This method transforms the supplied model object into
+	 * a stateless equivalent.
+	 * 
+	 * @param context The context
+	 * @param modelObject The model object to transform
+	 * @return The transformed object
+	 */
+	public ModelObject transform(StatelessTransformationContext context,
+						ModelObject modelObject) {
+		return(null);
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.conformance/src/java/org/scribble/conformance/model/transform/BlockStatelessTransformationRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conformance/src/java/org/scribble/conformance/model/transform/BlockStatelessTransformationRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conformance/src/java/org/scribble/conformance/model/transform/BlockStatelessTransformationRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,243 @@
+/*
+ * Copyright 2005-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 13 Dec 2008 : Initial version created by gary
+ */
+package org.scribble.conformance.model.transform;
+
+import org.scribble.extensions.RegistryInfo;
+import org.scribble.model.*;
+
+/**
+ * This class implements the stateless transformation
+ * rule for the Block component.
+ */
+ at RegistryInfo(extension=StatelessTransformationRule.class)
+public class BlockStatelessTransformationRule
+						extends AbstractStatelessTransformationRule {
+
+	/**
+	 * This method determines whether the stateless
+	 * transformation rule is applicable to the
+	 * supplied model object.
+	 * 
+	 * @param modelObject The model object
+	 * @return Whether the model object can be transformed
+	 */
+	public boolean isSupported(ModelObject modelObject) {
+		return(modelObject instanceof Block);
+	}
+	
+	/**
+	 * This method transforms the supplied model object into
+	 * a stateless equivalent.
+	 * 
+	 * @param context The context
+	 * @param modelObject The model object to transform
+	 * @return The transformed object
+	 */
+	public ModelObject transform(StatelessTransformationContext context,
+						ModelObject modelObject) {
+		return(null);
+	}
+	
+	/**
+	 * This method transforms the supplied block activities into
+	 * a stateless equivalent.
+	 * 
+	 * @param context The context
+	 * @param src The source block
+	 * @param target The target block
+	 * @return Whether the block has been fully transformed
+	 */
+	public boolean transform(StatelessTransformationContext context,
+						Block src, Block target) {
+		return(processBlock(context, src, target, 0, true));
+	}
+	
+	/**
+	 * This method processes the block of activities, to determine
+	 * whether some or all should be in a particular stateless
+	 * path.
+	 * 
+	 * @param context The context
+	 * @param block The target block associated with the stateless path
+	 * @param src The source block
+	 * @param pos The position to start in the source block
+	 * @return Whether the complete src block was processed
+	 */
+	public static boolean processBlock(StatelessTransformationContext context,
+						Block src, Block target, int pos, boolean full) {
+		boolean ret=true;
+		Block initialPath=context.getCurrentPath();
+		
+		for (int i=pos; src != null &&
+					i < src.getContents().size(); i++) {
+			Activity act=src.getContents().get(i);
+			
+			if (act instanceof Behaviour) {
+				if (((Behaviour)act).isWaitState()) {
+				
+					if (act instanceof MultiPathBehaviour) {
+						MultiPathBehaviour mpb=(MultiPathBehaviour)act;
+						
+						for (int j=0; j < mpb.getPaths().size(); j++) {
+							// Save return position
+							context.push(new TransformState((Behaviour)act,
+											src, i));
+							
+							Block p=context.createNewPath();
+							
+							if (p != null) {
+								context.transform(mpb.getPaths().get(j),
+										p);
+							}
+							
+							context.pop();
+						}
+						
+						if (((MultiPathBehaviour)act).isConditional() == false) {
+							src = null;
+						}
+						
+					} else if (act instanceof SinglePathBehaviour) {
+						SinglePathBehaviour spb=(SinglePathBehaviour)act;
+						
+						context.push(new TransformState((Behaviour)act,
+											src, i));
+			
+						Block p=context.createNewPath();
+						
+						if (p != null) {
+							context.transform(spb.getBlock(), p);
+						}
+						
+						context.pop();
+	
+						if (((SinglePathBehaviour)act).isConditional() == false) {
+							src = null;
+						}
+	
+					} else {
+						target = context.createNewPath();
+						
+						if (target != null) {
+							ModelObject newact=context.transform(act);
+							
+							if (newact instanceof Block) {
+								target.getContents().addAll(((Block)newact).getContents());
+							} else if (newact instanceof Activity) {
+								target.getContents().add((Activity)newact);
+							}
+						} else {
+							src = null;
+						}
+					}
+					
+					ret = false;
+				} else {
+					if (act instanceof SinglePathBehaviour ||
+							act instanceof MultiPathBehaviour ||
+							(act instanceof ModelInclude &&
+									!((ModelInclude)act).isAsynchronous())) {
+						context.push(new TransformState((Behaviour)act,
+											src, i));
+					}
+					
+					Block localPath=context.getCurrentPath();
+					
+					ModelObject newact=context.transform(act);
+					
+					if (newact instanceof Block) {
+						target.getContents().addAll(((Block)newact).getContents());
+					} else if (newact instanceof Activity) {
+						target.getContents().add((Activity)newact);
+					}
+					
+					if (localPath != context.getCurrentPath()) {
+						ret = false;
+					}
+					
+					if (act instanceof SinglePathBehaviour ||
+							act instanceof MultiPathBehaviour ||
+							(act instanceof ModelInclude &&
+									!((ModelInclude)act).isAsynchronous())) {
+						context.pop();
+						
+						src = null;
+					}
+				}
+			}
+		}
+		
+		if (src != null && full) {
+			// Came to end of block, so check if state from
+			// parent construct has been stored to enable
+			// further processing
+			//java.util.List<TransformState> stack=
+			//				context.getStack();
+			boolean f_continue=true;
+			
+			java.util.List<TransformState> tmpstack=
+					new java.util.Vector<TransformState>();
+			TransformState bp=null;
+			
+			//for (int i=0; f_continue && i < stack.size(); i++) {
+				//TransformState bp=stack.get(i);
+				
+			while (f_continue && (bp=context.pop()) != null) {
+				
+				tmpstack.add(bp);
+				
+				if (bp.getParent() instanceof SinglePathBehaviour &&
+						bp.getParent().isWaitState() == false &&
+						((SinglePathBehaviour)bp.getParent()).isRepetition()) {
+					
+					// Only process if the path has changed
+					if (initialPath != context.getCurrentPath()) {
+						context.disallowNewPaths();
+						
+						context.push(bp);
+						
+						ModelObject newact=context.transform(bp.getParent());
+						
+						context.pop();
+						
+						if (newact instanceof Block) {
+							target.getContents().addAll(((Block)newact).getContents());
+						} else if (newact instanceof Activity) {
+							target.getContents().add((Activity)newact);
+						}
+						
+						context.allowNewPaths();
+					}
+					
+					f_continue = false;
+				} else {
+					f_continue = processBlock(context, bp.getBlock(),
+									target, bp.getPosition()+1, false);
+				}
+			}
+			
+			for (int i=tmpstack.size()-1; i >= 0; i--) {
+				context.push(tmpstack.get(i));
+			}
+		}
+		
+		return(ret);
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.conformance/src/java/org/scribble/conformance/model/transform/DefaultStatelessTransformationContext.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conformance/src/java/org/scribble/conformance/model/transform/DefaultStatelessTransformationContext.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conformance/src/java/org/scribble/conformance/model/transform/DefaultStatelessTransformationContext.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,236 @@
+/*
+ * Copyright 2005-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 13 Dec 2008 : Initial version created by gary
+ */
+package org.scribble.conformance.model.transform;
+
+import org.scribble.model.*;
+
+/**
+ * This class provides the default implementation of the
+ * stateless transformation context.
+ */
+public class DefaultStatelessTransformationContext 
+					implements StatelessTransformationContext {
+
+	/**
+	 * This is the constructor for the default context.
+	 * 
+	 * @param ref The model reference for the definition being
+	 * 				transformed
+	 */
+	public DefaultStatelessTransformationContext(ModelReference ref) {
+		
+		m_source = ref;
+		
+		java.util.List<Object> rules=
+			org.scribble.extensions.RegistryFactory.getRegistry().
+						getExtensions(StatelessTransformationRule.class,
+									ref.getNotation());
+		
+		// Transfer to typed list
+		for (int i=0; i < rules.size(); i++) {
+			if (rules.get(i) instanceof StatelessTransformationRule) {
+				m_rules.add((StatelessTransformationRule)rules.get(i));
+			}
+		}
+	}
+	
+	/**
+	 * This method returns the model reference associated with
+	 * the definition being transformed.
+	 * 
+	 * @return The model reference for the definition being
+	 * 					transformed
+	 */
+	public ModelReference getSource() {
+		return(m_source);
+	}
+	
+	/**
+	 * This method transforms the supplied model object.
+	 * 
+	 * @param src The source block
+	 * @param target The target block
+	 * @return Whether the block was fully transformed
+	 */
+	public boolean transform(Block src, Block target) {
+		boolean ret=false;
+		boolean f_processed=false;
+		
+		for (int i=0; f_processed == false &&
+						i < m_rules.size(); i++) {
+			if (m_rules.get(i).isSupported(src)) {
+				ret = m_rules.get(i).transform(this, src, target);
+				f_processed = true;
+			}
+		}
+		
+		return(ret);
+	}
+	
+	/**
+	 * This method transforms the supplied model object.
+	 * 
+	 * @param modelObject The model object
+	 * @return The transformed model object
+	 */
+	public ModelObject transform(ModelObject modelObject) {
+		ModelObject ret=null;
+		
+		for (int i=0; ret == null &&
+							i < m_rules.size(); i++) {
+			if (m_rules.get(i).isSupported(modelObject)) {
+				ret = m_rules.get(i).transform(this, modelObject);
+			}
+		}
+		
+		return(ret);
+	}
+	
+	/**
+	 * This method returns a new path from the top
+	 * level stateless choice construct, or null if 
+	 * new stateless paths should not be processed at
+	 * this time.
+	 * 
+	 * @return The new path, or null if new  paths
+	 * 				should not be processed
+	 */
+	public org.scribble.model.Block createNewPath() {
+		org.scribble.model.Block ret=null;
+		
+		if (m_multiPathBehaviour != null && m_allowNewPaths) {
+			if (m_lastPath != null && m_lastPath.getContents().size() == 0) {
+				ret = m_lastPath;
+			} else {
+				ret = m_multiPathBehaviour.createNewPath();
+				
+				m_lastPath = ret;
+			}
+		} else {
+			// Clear the last path
+			m_lastPath = null;
+		}
+		
+		return(ret);
+	}
+	
+	/**
+	 * This method returns the current stateless path. If
+	 * no path is returned, then it is not currently possible
+	 * to record the stateless behaviour.
+	 * 
+	 * @return The current path, or null if no path associated
+	 */
+	public Block getCurrentPath() {
+		return(m_lastPath);
+	}
+	
+	/**
+	 * This method indicates that new paths are allowed.
+	 */
+	public void allowNewPaths() {
+		m_allowNewPaths = true;
+	}
+	
+	/**
+	 * This method indicates that new paths should not be
+	 * created.
+	 */
+	public void disallowNewPaths() {
+		m_allowNewPaths = false;
+	}
+	
+	/**
+	 * This method sets the multipath behaviour representing
+	 * the top level mutually exclusive construct used to
+	 * model the different stateless paths.
+	 * 
+	 * @param mpb The multi-path beheaviour
+	 */
+	protected void setMultiPathBehaviour(org.scribble.model.MultiPathBehaviour mpb) {
+		m_multiPathBehaviour = mpb;
+	}
+	
+	/**
+	 * This method returns the list of roles that
+	 * are defined at the top level, associated
+	 * with the stateless definition.
+	 * 
+	 * @return The role list
+	 */
+	public org.scribble.model.RoleList getRoleList() {
+		return(m_roleList);
+	}
+
+	/**
+	 * This method sets the role list.
+	 * 
+	 * @param roleList The role list
+	 */
+	protected void setRoleList(org.scribble.model.RoleList roleList) {
+		m_roleList = roleList;
+	}
+	
+	/**
+	 * This method pushes the supplied state on to
+	 * the top of the stack.
+	 * 
+	 *@param state The state
+	 */
+	public void push(TransformState state) {
+		m_stack.add(0, state);
+	}
+	
+	/**
+	 * This method returns the state at the top of the
+	 * stack.
+	 * 
+	 * @return The state on top of the stack, or null
+	 * 				if the stack is empty
+	 */
+	public TransformState pop() {
+		TransformState ret=null;
+		
+		if (m_stack.size() > 0) {
+			ret = m_stack.remove(0);
+		}
+		
+		return(ret);
+	}
+	
+	/**
+	 * This method returns the stack, with the first
+	 * element being the top of the stack.
+	 * 
+	 * @return The stack
+	 */
+	public java.util.List<TransformState> getStack() {
+		return(m_stack);
+	}
+	
+	private ModelReference m_source=null;
+	private org.scribble.model.MultiPathBehaviour m_multiPathBehaviour=null;
+	private boolean m_allowNewPaths=true;
+	private Block m_lastPath=null;
+	private java.util.List<TransformState> m_stack=new java.util.Vector<TransformState>();
+	private org.scribble.model.RoleList m_roleList=null;
+	private java.util.List<StatelessTransformationRule> m_rules=
+				new java.util.Vector<StatelessTransformationRule>();
+}

Added: tools/eclipse/trunk/plugins/org.scribble.conformance/src/java/org/scribble/conformance/model/transform/DefaultStatelessTransformer.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conformance/src/java/org/scribble/conformance/model/transform/DefaultStatelessTransformer.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conformance/src/java/org/scribble/conformance/model/transform/DefaultStatelessTransformer.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,60 @@
+/*
+ * Copyright 2005-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 7 Dec 2008 : Initial version created by gary
+ */
+package org.scribble.conformance.model.transform;
+
+import org.scribble.extensions.RegistryInfo;
+import org.scribble.model.Definition;
+import org.scribble.model.ModelReference;
+
+/**
+ * This class provides a tool for transforming a stateful
+ * local definition into a stateless definition. 
+ */
+ at RegistryInfo(extension=StatelessTransformer.class)
+public class DefaultStatelessTransformer
+						implements StatelessTransformer {
+
+	/**
+	 * The constructor for the stateful to stateless
+	 * model transformation tool.
+	 */
+	public DefaultStatelessTransformer() {
+	}
+	
+	/**
+	 * This method transforms the supplied definition.
+	 * 
+	 * @param stateful The stateful definition
+	 * @param ref The model reference associated with the
+	 * 						definition
+	 * @return The stateless definition
+	 */
+	public Definition transform(Definition stateful,
+						ModelReference ref) {
+		Definition ret=null;
+		
+		DefaultStatelessTransformationContext context=
+				new DefaultStatelessTransformationContext(ref);
+		
+		ret = (Definition)context.transform(stateful);
+		
+		return(ret);
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.conformance/src/java/org/scribble/conformance/model/transform/InteractionStatelessTransformationRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conformance/src/java/org/scribble/conformance/model/transform/InteractionStatelessTransformationRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conformance/src/java/org/scribble/conformance/model/transform/InteractionStatelessTransformationRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,93 @@
+/*
+ * Copyright 2005-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 13 Dec 2008 : Initial version created by gary
+ */
+package org.scribble.conformance.model.transform;
+
+import org.scribble.extensions.RegistryInfo;
+import org.scribble.model.*;
+
+/**
+ * This class implements the stateless transformation
+ * rule for the Interaction component.
+ */
+ at RegistryInfo(extension=StatelessTransformationRule.class) //,category=Interaction.class)
+public class InteractionStatelessTransformationRule
+						extends AbstractStatelessTransformationRule {
+
+	/**
+	 * This method determines whether the stateless
+	 * transformation rule is applicable to the
+	 * supplied model object.
+	 * 
+	 * @param modelObject The model object
+	 * @return
+	 */
+	public boolean isSupported(ModelObject modelObject) {
+		return(modelObject instanceof Interaction);
+	}
+	
+	/**
+	 * This method returns the new interaction.
+	 * 
+	 * @return The new interaction
+	 */
+	protected Interaction createInteraction() {
+		return(new Interaction());
+	}
+	
+	/**
+	 * This method transforms the supplied model object into
+	 * a stateless equivalent.
+	 * 
+	 * @param context The context
+	 * @param modelObject The model object to transform
+	 * @return The transformed object
+	 */
+	public ModelObject transform(StatelessTransformationContext context,
+						ModelObject modelObject) {
+		Interaction ret=null;
+		Interaction src=(Interaction)modelObject;
+		
+		ret = createInteraction();
+		
+		ret.derivedFrom(src);
+		
+		// Configure the interaction
+		if (src.getMessageSignature() != null) {
+			ret.setMessageSignature((MessageSignature)
+					context.transform(src.getMessageSignature()));
+		}
+		
+		if (src.getFromRole() != null) {
+			ret.setFromRole((Role)context.transform(src.getFromRole()));
+		}
+		
+		if (src.getToRole() != null) {
+			ret.setToRole((Role)context.transform(src.getToRole()));
+		}
+		
+		ret.setRequestLabel(src.getRequestLabel());
+		ret.setReplyToLabel(src.getReplyToLabel());
+
+		// TODO: Transform channel??
+		
+		return(ret);
+	}
+	
+}

Added: tools/eclipse/trunk/plugins/org.scribble.conformance/src/java/org/scribble/conformance/model/transform/MessageSignatureStatelessTransformationRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conformance/src/java/org/scribble/conformance/model/transform/MessageSignatureStatelessTransformationRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conformance/src/java/org/scribble/conformance/model/transform/MessageSignatureStatelessTransformationRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,76 @@
+/*
+ * Copyright 2005-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 13 Dec 2008 : Initial version created by gary
+ */
+package org.scribble.conformance.model.transform;
+
+import org.scribble.extensions.RegistryInfo;
+import org.scribble.model.*;
+
+/**
+ * This class implements the stateless transformation
+ * rule for the MessageSignature component.
+ */
+ at RegistryInfo(extension=StatelessTransformationRule.class)
+public class MessageSignatureStatelessTransformationRule
+				extends AbstractStatelessTransformationRule {
+
+	/**
+	 * This method determines whether the stateless
+	 * transformation rule is applicable to the
+	 * supplied model object.
+	 * 
+	 * @param modelObject The model object
+	 * @return Whether the model object can be transformed
+	 */
+	public boolean isSupported(ModelObject modelObject) {
+		return(modelObject instanceof MessageSignature);
+	}
+	
+	/**
+	 * This method transforms the supplied model object into
+	 * a stateless equivalent.
+	 * 
+	 * @param context The context
+	 * @param modelObject The model object to transform
+	 * @return The transformed object
+	 */
+	public ModelObject transform(StatelessTransformationContext context,
+							ModelObject modelObject) {
+		MessageSignature ret=null;
+		MessageSignature src=(MessageSignature)modelObject;
+		
+		ret = new MessageSignature();
+		
+		ret.derivedFrom(src);
+		
+		ret.setOperation(src.getOperation());
+		
+		for (int i=0; i < src.getTypes().size(); i++) {
+			TypeReference ref=(TypeReference)
+					context.transform(src.getTypes().get(i));
+			
+			if (ref != null) {
+				ret.getTypes().add(ref);
+			}
+		}
+		
+		return(ret);
+	}
+	
+}

Added: tools/eclipse/trunk/plugins/org.scribble.conformance/src/java/org/scribble/conformance/model/transform/RoleStatelessTransformationRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conformance/src/java/org/scribble/conformance/model/transform/RoleStatelessTransformationRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conformance/src/java/org/scribble/conformance/model/transform/RoleStatelessTransformationRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,74 @@
+/*
+ * Copyright 2005-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 13 Dec 2008 : Initial version created by gary
+ */
+package org.scribble.conformance.model.transform;
+
+import org.scribble.extensions.RegistryInfo;
+import org.scribble.model.*;
+
+/**
+ * This class implements the stateless transformation
+ * rule for the Role component.
+ */
+ at RegistryInfo(extension=StatelessTransformationRule.class)
+public class RoleStatelessTransformationRule
+						extends AbstractStatelessTransformationRule {
+
+	/**
+	 * This method determines whether the stateless
+	 * transformation rule is applicable to the
+	 * supplied model object.
+	 * 
+	 * @param modelObject The model object
+	 * @return Whether the model object can be transformed
+	 */
+	public boolean isSupported(ModelObject modelObject) {
+		return(modelObject instanceof Role);
+	}
+	
+	/**
+	 * This method transforms the supplied model object into
+	 * a stateless equivalent.
+	 * 
+	 * @param context The context
+	 * @param modelObject The model object to transform
+	 * @return The transformed object
+	 */
+	public ModelObject transform(StatelessTransformationContext context,
+						ModelObject modelObject) {
+		Role ret=null;
+		Role src=(Role)modelObject;
+		
+		// Check if already defined in role list associated with
+		// the context
+		ret = context.getRoleList().getRole(src.getName());
+		
+		if (ret == null) {
+			ret = new Role();
+			ret.setName(src.getName());
+			
+			ret.derivedFrom(src);
+			
+			context.getRoleList().getRoles().add(ret);
+		}
+		
+		return(ret);
+	}
+	
+}

Added: tools/eclipse/trunk/plugins/org.scribble.conformance/src/java/org/scribble/conformance/model/transform/StatelessTransformationContext.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conformance/src/java/org/scribble/conformance/model/transform/StatelessTransformationContext.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conformance/src/java/org/scribble/conformance/model/transform/StatelessTransformationContext.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,126 @@
+/*
+ * Copyright 2005-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 13 Dec 2008 : Initial version created by gary
+ */
+package org.scribble.conformance.model.transform;
+
+import org.scribble.model.*;
+
+/**
+ * This interface provides the context for the stateless
+ * transformation rules.
+ */
+public interface StatelessTransformationContext {
+
+	/**
+	 * This method returns the model reference associated with
+	 * the definition being transformed.
+	 * 
+	 * @return The model reference for the definition being
+	 * 					transformed
+	 */
+	public ModelReference getSource();
+	
+	/**
+	 * This method transforms the supplied block.
+	 * 
+	 * @param src The source block
+	 * @param target The target block
+	 * @return Whether the block was fully transformed
+	 */
+	public boolean transform(Block src, Block target);
+	
+	/**
+	 * This method transforms the supplied model object.
+	 * 
+	 * @param modelObject The model object
+	 * @return The transformed model object
+	 */
+	public ModelObject transform(ModelObject modelObject);
+	
+	/**
+	 * This method returns a new path from the top
+	 * level stateless choice construct, or null if 
+	 * new stateless paths should not be processed at
+	 * this time.
+	 * 
+	 * @return The new path, or null if new  paths
+	 * 				should not be processed
+	 */
+	public Block createNewPath();
+	
+	/**
+	 * This method returns the current stateless path. If
+	 * no path is returned, then it is not currently possible
+	 * to record the stateless behaviour.
+	 * 
+	 * @return The current path, or null if no path associated
+	 */
+	public Block getCurrentPath();
+	
+	/**
+	 * This method indicates that new paths are allowed.
+	 */
+	public void allowNewPaths();
+	
+	/**
+	 * This method indicates that new paths should not be
+	 * created.
+	 */
+	public void disallowNewPaths();
+
+	/**
+	 * This method returns the list of roles that
+	 * are defined at the top level, associated
+	 * with the stateless definition.
+	 * 
+	 * @return The role list
+	 */
+	public RoleList getRoleList();
+	
+	/**
+	 * This method pushes the supplied state on to
+	 * the top of the stack.
+	 * 
+	 *@param state The state
+	 */
+	public void push(TransformState state);
+	
+	/**
+	 * This method returns the state at the top of the
+	 * stack.
+	 * 
+	 * @return The state on top of the stack, or null
+	 * 				if the stack is empty
+	 */
+	public TransformState pop();
+	
+	/**
+	 * This method returns the stack, with the first
+	 * element being the top of the stack.
+	 * 
+	 * @return The stack
+	 */
+	public java.util.List<TransformState> getStack();
+	
+	// TODO: Will need support for name mapping, as
+	// (for example) roles in a sub-conversation,
+	// when moved to be accessible at the top level
+	// in a path, will need to use the role names
+	// defined at the top level.
+}

Added: tools/eclipse/trunk/plugins/org.scribble.conformance/src/java/org/scribble/conformance/model/transform/StatelessTransformationRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conformance/src/java/org/scribble/conformance/model/transform/StatelessTransformationRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conformance/src/java/org/scribble/conformance/model/transform/StatelessTransformationRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,64 @@
+/*
+ * Copyright 2005-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 13 Dec 2008 : Initial version created by gary
+ */
+package org.scribble.conformance.model.transform;
+
+import org.scribble.model.*;
+
+/**
+ * This interface represents a rule that is responsible
+ * for transforming a supplied model element into
+ * a stateless model element.
+ */
+public interface StatelessTransformationRule {
+
+	/**
+	 * This method determines whether the stateless
+	 * transformation rule is applicable to the
+	 * supplied model object.
+	 * 
+	 * @param modelObject The model object
+	 * @return Whether the model object can be transformed
+	 */
+	public boolean isSupported(ModelObject modelObject);
+	
+	/**
+	 * This method transforms the supplied block activities into
+	 * a stateless equivalent.
+	 * 
+	 * @param context The context
+	 * @param src The source block
+	 * @param target The target block
+	 * @return Whether the block has been fully transformed
+	 */
+	public boolean transform(StatelessTransformationContext context,
+						Block src, Block target);
+	
+	/**
+	 * This method transforms the supplied model object into
+	 * a stateless equivalent.
+	 * 
+	 * @param context The context
+	 * @param modelObject The model object to transform
+	 * @return The transformed object
+	 */
+	public ModelObject transform(StatelessTransformationContext context,
+						ModelObject modelObject);
+	
+}

Added: tools/eclipse/trunk/plugins/org.scribble.conformance/src/java/org/scribble/conformance/model/transform/StatelessTransformer.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conformance/src/java/org/scribble/conformance/model/transform/StatelessTransformer.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conformance/src/java/org/scribble/conformance/model/transform/StatelessTransformer.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,41 @@
+/*
+ * Copyright 2005-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 7 Dec 2008 : Initial version created by gary
+ */
+package org.scribble.conformance.model.transform;
+
+import org.scribble.model.*;
+
+/**
+ * This class provides a tool for transforming a stateful
+ * local definition into a stateless definition. 
+ */
+public interface StatelessTransformer {
+
+	/**
+	 * This method transforms the supplied definition.
+	 * 
+	 * @param stateful The stateful definition
+	 * @param ref The model reference associated with the
+	 * 						definition
+	 * @return The stateless definition
+	 */
+	public Definition transform(Definition stateful,
+						ModelReference ref);
+	
+}

Added: tools/eclipse/trunk/plugins/org.scribble.conformance/src/java/org/scribble/conformance/model/transform/TransformState.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conformance/src/java/org/scribble/conformance/model/transform/TransformState.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conformance/src/java/org/scribble/conformance/model/transform/TransformState.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,53 @@
+/*
+ * Copyright 2005-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 22 Dec 2008 : Initial version created by gary
+ */
+package org.scribble.conformance.model.transform;
+
+import org.scribble.model.Behaviour;
+import org.scribble.model.Block;
+
+/**
+ * This class provides the state for the transformation
+ * of a stateless model object.
+ */
+public class TransformState {
+
+	public TransformState(Behaviour parent,
+					Block block, int pos) {
+		m_parent = parent;
+		m_block = block;
+		m_position = pos;
+	}
+
+	public Behaviour getParent() {
+		return(m_parent);
+	}
+	
+	public Block getBlock() {
+		return(m_block);
+	}
+	
+	public int getPosition() {
+		return(m_position);
+	}
+	
+	private Behaviour m_parent=null;
+	private Block m_block=null;
+	private int m_position=0;
+}

Added: tools/eclipse/trunk/plugins/org.scribble.conformance/src/java/org/scribble/conformance/model/transform/TypeReferenceStatelessTransformationRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conformance/src/java/org/scribble/conformance/model/transform/TypeReferenceStatelessTransformationRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conformance/src/java/org/scribble/conformance/model/transform/TypeReferenceStatelessTransformationRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,71 @@
+/*
+ * Copyright 2005-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 13 Dec 2008 : Initial version created by gary
+ */
+package org.scribble.conformance.model.transform;
+
+import org.scribble.extensions.RegistryInfo;
+import org.scribble.model.*;
+
+/**
+ * This class implements the stateless transformation
+ * rule for the TypeReference component.
+ */
+ at RegistryInfo(extension=StatelessTransformationRule.class)
+public class TypeReferenceStatelessTransformationRule
+						extends AbstractStatelessTransformationRule {
+
+	/**
+	 * This method determines whether the stateless
+	 * transformation rule is applicable to the
+	 * supplied model object.
+	 * 
+	 * @param modelObject The model object
+	 * @return Whether the model object can be transformed
+	 */
+	public boolean isSupported(ModelObject modelObject) {
+		return(modelObject instanceof TypeReference);
+	}
+	
+	/**
+	 * This method transforms the supplied model object into
+	 * a stateless equivalent.
+	 * 
+	 * @param context The context
+	 * @param modelObject The model object to transform
+	 * @return The transformed object
+	 */
+	public ModelObject transform(StatelessTransformationContext context,
+					ModelObject modelObject) {
+		TypeReference ret=null;
+		TypeReference src=(TypeReference)modelObject;
+		
+		ret = new TypeReference();
+		
+		ret.derivedFrom(src);
+		
+		ret.setAlias(src.getAlias());
+		ret.setLocalpart(src.getLocalpart());
+		ret.setLocatedRole(src.getLocatedRole());
+		ret.setNamespace(src.getNamespace());		
+		ret.setNotation(src.getNotation());
+		
+		return(ret);
+	}
+	
+}

Added: tools/eclipse/trunk/plugins/org.scribble.conformance/src/java/org/scribble/conformance/osgi/Activator.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conformance/src/java/org/scribble/conformance/osgi/Activator.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conformance/src/java/org/scribble/conformance/osgi/Activator.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,48 @@
+package org.scribble.conformance.osgi;
+
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class Activator implements BundleActivator {
+
+	// The plug-in ID
+	public static final String PLUGIN_ID = "org.scribble.experimental.comparator";
+
+	// The shared instance
+	private static Activator plugin;
+	
+	/**
+	 * The constructor
+	 */
+	public Activator() {
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.eclipse.core.runtime.Plugins#start(org.osgi.framework.BundleContext)
+	 */
+	public void start(BundleContext context) throws Exception {
+		plugin = this;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.eclipse.core.runtime.Plugin#stop(org.osgi.framework.BundleContext)
+	 */
+	public void stop(BundleContext context) throws Exception {
+		plugin = null;
+	}
+
+	/**
+	 * Returns the shared instance
+	 *
+	 * @return the shared instance
+	 */
+	public static Activator getDefault() {
+		return plugin;
+	}
+
+}

Added: tools/eclipse/trunk/plugins/org.scribble.conformance/src/plugintest/org/scribble/conformance/model/transform/TransformTest.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conformance/src/plugintest/org/scribble/conformance/model/transform/TransformTest.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conformance/src/plugintest/org/scribble/conformance/model/transform/TransformTest.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,279 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA  02110-1301, USA.
+ */
+package org.scribble.conformance.model.transform;
+
+import junit.framework.TestCase;
+import junit.framework.TestResult;
+import junit.framework.TestSuite;
+
+import org.scribble.extensions.RegistryFactory;
+import org.scribble.model.Definition;
+
+public class TransformTest extends TestCase {
+
+    public static TestSuite suite() {
+        TestSuite suite = new TestSuite("Stateful -> Stateless Transform Tests");
+        
+        suite.addTest(new StatefulToStatelessTest("Interaction1", "R1", "scv"));
+        suite.addTest(new StatefulToStatelessTest("Interaction1", "R2", "scv"));
+        
+        // TODO: Need to handle common start with diverging behaviour
+        //suite.addTest(new StatefulToStatelessTest("Interaction2", "R2", "scv"));
+        
+        return suite;
+    }
+    
+    /**
+     * The test case for running the stateful to stateless test.
+     */
+	protected static class StatefulToStatelessTest extends TestCase {
+
+		/**
+		 * This constructor is initialized with the test
+		 * name.
+		 * 
+		 * @param name The test name
+		 * @param role The role
+		 * @param notation The notation
+		 */
+		public StatefulToStatelessTest(String name,
+							String role, String notation) {
+			super(name+"@"+role+"."+notation);
+			
+			m_name = name+"@"+role+"."+notation;
+			m_role = role;
+			m_notation = notation;
+		}
+		
+		/**
+		 * This method runs the test.
+		 * 
+		 * @param result The test result
+		 */
+		public void run(TestResult result) {
+			result.startTest(this);
+			
+			String filename="testmodels/"+m_name;
+			
+			java.io.InputStream is=
+				TransformTest.class.getResourceAsStream(filename);
+			
+			if (is == null) {
+				result.addError(this,
+						new Throwable("Unable to locate resource: "+filename));
+			} else {			
+				org.scribble.parser.Parser p=new org.scribble.parser.DefaultParser();
+				org.scribble.model.ModelReference ref=
+						new org.scribble.model.ModelReference(m_notation);
+				org.scribble.model.admin.ModelListener l=
+						new org.scribble.model.admin.DefaultModelListener();
+				
+				org.scribble.model.Model model=p.parse(ref, is, l);
+				
+				if (model == null) {
+					result.addError(this, new Throwable("Model is null"));
+				} else {
+					
+					/*
+					org.scribble.projector.Projector projector=
+						new org.scribble.projector.DefaultProjector();
+					*/
+					
+					//org.scribble.model.Role role=null;
+					
+					// Obtain role from definition
+					java.util.List<Definition> defns=model.getDefinitions();
+					Definition defn=null;
+					
+					if (defns.size() == 1) {
+						defn = defns.get(0);
+					}
+					
+					/*
+					java.util.List<org.scribble.model.Role> roles=defn.getRoles();
+					
+					for (int i=0; role == null && i < roles.size(); i++) {
+						if (roles.get(i).getName().equals(m_role)) {
+							role = roles.get(i);
+						}
+					}
+					
+					if (role == null) {
+						result.addError(this,
+								new Throwable("Role '"+m_role+"' not found"));						
+					} else {
+					*/
+						//org.scribble.model.Model projected=
+						//		projector.project(ref, model,role, l);
+						
+						StatelessTransformer transformer=(StatelessTransformer)
+								RegistryFactory.getRegistry().getExtension(
+										StatelessTransformer.class, null);
+					
+						defns = model.getDefinitions();
+						defn = null;
+						
+						if (defns.size() == 1) {
+							defn = defns.get(0);
+						}
+						
+						if (transformer != null && defn != null) {
+							
+							org.scribble.model.Definition transformed=
+										transformer.transform(defn, ref);
+							
+							org.scribble.export.Exporter exporter=
+								(org.scribble.export.Exporter)
+								RegistryFactory.getRegistry().getExtension(
+										org.scribble.export.Exporter.class, null);
+
+							org.scribble.export.text.TextFormatter formatter=
+								new org.scribble.export.text.TextFormatter();
+							
+							java.io.ByteArrayOutputStream os=
+								new java.io.ByteArrayOutputStream();
+							
+							formatter.setOutputStream(os);
+								
+							try {
+								exporter.export(ref, transformed, formatter);
+								
+								String text=new String(os.toByteArray());
+
+								checkResults(result, text);
+							} catch(Exception e) {
+								result.addError(this, e);
+							}
+							
+						} else {
+							result.addError(this,
+									new Throwable("Unable to find Model Generator"));						
+						}
+					//}
+				}
+			}
+			
+			result.endTest(this);
+		}
+		
+		/**
+		 * This method checks the generated stateless against a
+		 * previously stored correct version.
+		 * 
+		 * @param result The test result
+		 * @param text The stateless definition
+		 */
+		protected void checkResults(TestResult result, String text) {
+			boolean f_valid=false;
+
+			String filename="results/"+m_name;
+			
+			java.io.InputStream is=
+				TransformTest.class.getResourceAsStream(filename);
+			
+			if (is != null) {
+				
+				try {
+					byte[] b=new byte[is.available()];
+				
+					is.read(b);
+					
+					is.close();
+					
+					String orig=new String(b);
+					
+					if (orig.equals(text) == false) {
+						result.addError(this,
+								new Throwable("Transformed stateless definition does not match stored version"));
+					} else {
+						f_valid = true;
+					}
+				} catch(Exception e) {
+					result.addError(this, e);
+				}
+			} else {
+				result.addError(this,
+						new Throwable("Resulting stateless definition '"+filename+
+								"' not found for comparison"));
+			}
+			
+			if (f_valid == false) {
+				String modelfile="testmodels/"+m_name;
+				
+				java.net.URL url=TransformTest.class.getResource(modelfile);
+				
+				try {
+					url = org.eclipse.core.runtime.FileLocator.toFileURL(url);
+				} catch(Exception e) {
+					e.printStackTrace();
+				}
+				
+				if (url != null) {
+					// URL will point to copy of test models in the classes folder, so need
+					// to obtain reference back to source version
+					java.io.File f=null;
+					
+					if (url.getFile().indexOf("classes") != -1) {
+						f = new java.io.File(url.getFile().replaceFirst("classes","src/plugintest"));
+					} else if (url.getFile().indexOf("bin") != -1) {						
+						f = new java.io.File(url.getFile().replaceFirst("bin","src/plugintest"));
+					} else {
+						result.addError(this, new Exception("Could not locate results folder to record expected result"));
+					}
+					
+					if (f != null && f.exists()) {
+						f = f.getParentFile().getParentFile();
+						
+						java.io.File resultsDir=new java.io.File(f, "results");
+						
+						if (resultsDir.exists() == false) {
+							resultsDir.mkdirs();
+						}
+						
+						java.io.File resultFile=new java.io.File(resultsDir,
+											m_name+".expected");
+						
+						if (resultFile.exists() == false) {
+							try {
+								java.io.FileOutputStream fos=new java.io.FileOutputStream(resultFile);
+								
+								fos.write(text.getBytes());
+								
+								fos.flush();
+								fos.close();
+								
+							} catch(Exception e){
+								result.addError(this, e);
+							}
+						} else {
+							System.err.println("NOTE: Expected output '"+resultFile+
+										"' already exists - not being overwritten");
+						}
+					} else {
+						result.addError(this, new Throwable("Unable to obtain URL for stateful model source '"+
+								m_name+"': "+url));
+					}
+				}
+			}
+		}
+
+		private String m_name=null;
+		private String m_role=null;
+		private String m_notation=null;
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.conformance/src/plugintest/org/scribble/conformance/model/transform/results/Interaction1 at R1.scv
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conformance/src/plugintest/org/scribble/conformance/model/transform/results/Interaction1 at R1.scv	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conformance/src/plugintest/org/scribble/conformance/model/transform/results/Interaction1 at R1.scv	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,11 @@
+stateless conversation Interaction1 at R1 {
+	role	R2;
+	if {
+		M1 to R2;
+	} else if {
+		M2 from R2;
+		M3 to R2;
+	} else if {
+		M4 from R2;
+	}
+}
\ No newline at end of file

Added: tools/eclipse/trunk/plugins/org.scribble.conformance/src/plugintest/org/scribble/conformance/model/transform/results/Interaction1 at R2.scv
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conformance/src/plugintest/org/scribble/conformance/model/transform/results/Interaction1 at R2.scv	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conformance/src/plugintest/org/scribble/conformance/model/transform/results/Interaction1 at R2.scv	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,10 @@
+stateless conversation Interaction1 at R2 {
+	role	R1;
+	if {
+		M1 from R1;
+		M2 to R1;
+	} else if {
+		M3 from R1;
+		M4 to R1;
+	}
+}
\ No newline at end of file

Added: tools/eclipse/trunk/plugins/org.scribble.conformance/src/plugintest/org/scribble/conformance/model/transform/results/Interaction2 at R2.scv
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conformance/src/plugintest/org/scribble/conformance/model/transform/results/Interaction2 at R2.scv	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conformance/src/plugintest/org/scribble/conformance/model/transform/results/Interaction2 at R2.scv	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,11 @@
+stateless conversation Interaction1 at R2 {
+	role	R1;
+	if {
+		M1 from R1;
+		if {
+			M2 to R1;
+		} else if {
+			M3 to R1;
+		}
+	}
+}
\ No newline at end of file

Added: tools/eclipse/trunk/plugins/org.scribble.conformance/src/plugintest/org/scribble/conformance/model/transform/testmodels/Interaction1 at R1.scv
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conformance/src/plugintest/org/scribble/conformance/model/transform/testmodels/Interaction1 at R1.scv	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conformance/src/plugintest/org/scribble/conformance/model/transform/testmodels/Interaction1 at R1.scv	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,11 @@
+namespace test;
+
+conversation Interaction1 at R1 {
+	role	R2;
+	
+	M1 to R2;
+	M2 from R2;
+	
+	M3 to R2;
+	M4 from R2;
+}

Added: tools/eclipse/trunk/plugins/org.scribble.conformance/src/plugintest/org/scribble/conformance/model/transform/testmodels/Interaction1 at R2.scv
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conformance/src/plugintest/org/scribble/conformance/model/transform/testmodels/Interaction1 at R2.scv	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conformance/src/plugintest/org/scribble/conformance/model/transform/testmodels/Interaction1 at R2.scv	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,11 @@
+namespace test;
+
+conversation Interaction1 at R2 {
+	role	R1;
+	
+	M1 from R1;
+	M2 to R1;
+	
+	M3 from R1;
+	M4 to R1;
+}

Added: tools/eclipse/trunk/plugins/org.scribble.conformance/src/plugintest/org/scribble/conformance/model/transform/testmodels/Interaction2 at R2.scv
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conformance/src/plugintest/org/scribble/conformance/model/transform/testmodels/Interaction2 at R2.scv	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conformance/src/plugintest/org/scribble/conformance/model/transform/testmodels/Interaction2 at R2.scv	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,11 @@
+namespace test;
+
+conversation Interaction1 at R2 {
+	role	R1;
+	
+	M1 from R1;
+	M2 to R1;
+	
+	M1 from R1;
+	M3 to R1;
+}

Added: tools/eclipse/trunk/plugins/org.scribble.conformance/src/test/org/scribble/conformance/comparator/BehaviourListComparatorRuleTest.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conformance/src/test/org/scribble/conformance/comparator/BehaviourListComparatorRuleTest.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conformance/src/test/org/scribble/conformance/comparator/BehaviourListComparatorRuleTest.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,1877 @@
+/*
+ * Copyright 2005-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 14 Jul 2008 : Initial version created by gary
+ */
+package org.scribble.conformance.comparator;
+
+import junit.framework.TestCase;
+
+import org.scribble.conformance.model.*;
+import org.scribble.comparator.*;
+import org.scribble.model.*;
+import org.scribble.model.admin.ErrorRecorder;
+
+public class BehaviourListComparatorRuleTest extends TestCase {
+	
+	protected java.util.List<ComparatorRule> getRules() {
+		java.util.List<ComparatorRule> ret=new java.util.Vector<ComparatorRule>();
+		ret.add(new BehaviourListComparatorRule());
+		ret.add(new TestBehaviour1ComparatorRule());
+		ret.add(new TestSinglePathComparatorRule());
+		ret.add(new TestMultiPathComparatorRule());
+		ret.add(new org.scribble.comparator.BlockComparatorRule());
+		return(ret);
+	}
+	
+	public void testCompareSimpleBehaviour() {
+		
+		ModelReference ref=new ModelReference((String)null);
+		
+		DefaultComparatorContext context=
+					new DefaultComparatorContext(ref, ref, getRules());
+		
+		BehaviourList mainList=new TestBehaviourList();
+		BehaviourList refList=new TestBehaviourList();
+		
+		TestBehaviour1 mtb=new TestBehaviour1();
+		TestBehaviour1 rtb=new TestBehaviour1();
+		
+		mtb.setMatchWith(rtb);
+		
+		mainList.getBehaviourList().add(mtb);
+		refList.getBehaviourList().add(rtb);
+		
+		ErrorRecorder l=new ErrorRecorder();
+		
+		BehaviourListComparatorRule rule=new BehaviourListComparatorRule();
+		
+		if (rule.compare(context, mainList, refList, l, true) == false) {
+			fail("Comparison failed");
+		}
+		
+		if (l.isValid() == false) {
+			fail(l.invalidMessage());
+		}
+	}
+	
+	public void testCompareSimpleSequence() {
+		
+		ModelReference ref=new ModelReference((String)null);
+		
+		DefaultComparatorContext context=
+					new DefaultComparatorContext(ref, ref, getRules());
+		
+		BehaviourList mainList=new TestBehaviourList();
+		BehaviourList refList=new TestBehaviourList();
+		
+		TestBehaviour1 mtb1=new TestBehaviour1();
+		TestBehaviour1 rtb1=new TestBehaviour1();
+		
+		mtb1.setMatchWith(rtb1);
+		
+		mainList.getBehaviourList().add(mtb1);
+		refList.getBehaviourList().add(rtb1);
+		
+		TestBehaviour1 mtb2=new TestBehaviour1();
+		TestBehaviour1 rtb2=new TestBehaviour1();
+		
+		mtb2.setMatchWith(rtb2);
+		
+		mainList.getBehaviourList().add(mtb2);
+		refList.getBehaviourList().add(rtb2);
+		
+		TestBehaviour1 mtb3=new TestBehaviour1();
+		TestBehaviour1 rtb3=new TestBehaviour1();
+		
+		mtb3.setMatchWith(rtb3);
+		
+		mainList.getBehaviourList().add(mtb3);
+		refList.getBehaviourList().add(rtb3);
+		
+		ErrorRecorder l=new ErrorRecorder();
+		
+		BehaviourListComparatorRule rule=new BehaviourListComparatorRule();
+		
+		if (rule.compare(context, mainList, refList, l, true) == false) {
+			fail("Comparison failed");
+		}
+		
+		if (l.isValid() == false) {
+			fail(l.invalidMessage());
+		}
+	}
+	
+	public void testCompareSimpleComposedSyncSequence() {
+		
+		ModelReference ref=new ModelReference((String)null);
+		
+		DefaultComparatorContext context=
+					new DefaultComparatorContext(ref, ref, getRules());
+		
+		BehaviourList mainList=new TestBehaviourList();
+		BehaviourList refList=new TestBehaviourList();
+		
+		TestBehaviour1 mtb1=new TestBehaviour1();
+		TestBehaviour1 rtb1=new TestBehaviour1();
+		
+		mtb1.setMatchWith(rtb1);
+		
+		mainList.getBehaviourList().add(mtb1);
+		refList.getBehaviourList().add(rtb1);
+		
+		BehaviourList subMainList=new TestBehaviourList();
+		BehaviourList subRefList=new TestBehaviourList();
+		
+		TestBehaviour1 mtb2=new TestBehaviour1();
+		TestBehaviour1 rtb2=new TestBehaviour1();
+		
+		mtb2.setMatchWith(rtb2);
+		
+		subMainList.getBehaviourList().add(mtb2);
+		subRefList.getBehaviourList().add(rtb2);
+		
+		mainList.getBehaviourList().add(subMainList);
+		refList.getBehaviourList().add(subRefList);
+		
+		TestBehaviour1 mtb3=new TestBehaviour1();
+		TestBehaviour1 rtb3=new TestBehaviour1();
+		
+		mtb3.setMatchWith(rtb3);
+		
+		mainList.getBehaviourList().add(mtb3);
+		refList.getBehaviourList().add(rtb3);
+		
+		ErrorRecorder l=new ErrorRecorder();
+		
+		BehaviourListComparatorRule rule=new BehaviourListComparatorRule();
+		
+		if (rule.compare(context, mainList, refList, l, true) == false) {
+			fail("Comparison failed");
+		}
+		
+		if (l.isValid() == false) {
+			fail(l.invalidMessage());
+		}
+	}
+	
+	public void testCompareSimpleComposedSyncSequenceMain() {
+		
+		ModelReference ref=new ModelReference((String)null);
+		
+		DefaultComparatorContext context=
+					new DefaultComparatorContext(ref, ref, getRules());
+		
+		BehaviourList mainList=new TestBehaviourList();
+		BehaviourList refList=new TestBehaviourList();
+		
+		TestBehaviour1 mtb1=new TestBehaviour1();
+		TestBehaviour1 rtb1=new TestBehaviour1();
+		
+		mtb1.setMatchWith(rtb1);
+		
+		mainList.getBehaviourList().add(mtb1);
+		refList.getBehaviourList().add(rtb1);
+		
+		BehaviourList subMainList=new TestBehaviourList();
+		
+		TestBehaviour1 mtb2=new TestBehaviour1();
+		TestBehaviour1 rtb2=new TestBehaviour1();
+		
+		mtb2.setMatchWith(rtb2);
+		
+		subMainList.getBehaviourList().add(mtb2);
+		refList.getBehaviourList().add(rtb2);
+		
+		mainList.getBehaviourList().add(subMainList);
+		
+		TestBehaviour1 mtb3=new TestBehaviour1();
+		TestBehaviour1 rtb3=new TestBehaviour1();
+		
+		mtb3.setMatchWith(rtb3);
+		
+		mainList.getBehaviourList().add(mtb3);
+		refList.getBehaviourList().add(rtb3);
+		
+		ErrorRecorder l=new ErrorRecorder();
+		
+		BehaviourListComparatorRule rule=new BehaviourListComparatorRule();
+		
+		if (rule.compare(context, mainList, refList, l, true) == false) {
+			fail("Comparison failed");
+		}
+		
+		if (l.isValid() == false) {
+			fail(l.invalidMessage());
+		}
+	}
+
+	public void testCompareSimpleComposedSyncSequenceRef() {
+		
+		ModelReference ref=new ModelReference((String)null);
+		
+		DefaultComparatorContext context=
+					new DefaultComparatorContext(ref, ref, getRules());
+		
+		BehaviourList mainList=new TestBehaviourList();
+		BehaviourList refList=new TestBehaviourList();
+		
+		TestBehaviour1 mtb1=new TestBehaviour1();
+		TestBehaviour1 rtb1=new TestBehaviour1();
+		
+		mtb1.setMatchWith(rtb1);
+		
+		mainList.getBehaviourList().add(mtb1);
+		refList.getBehaviourList().add(rtb1);
+		
+		BehaviourList subRefList=new TestBehaviourList();
+		
+		TestBehaviour1 mtb2=new TestBehaviour1();
+		TestBehaviour1 rtb2=new TestBehaviour1();
+		
+		mtb2.setMatchWith(rtb2);
+		
+		mainList.getBehaviourList().add(mtb2);
+		subRefList.getBehaviourList().add(rtb2);
+		
+		refList.getBehaviourList().add(subRefList);
+		
+		TestBehaviour1 mtb3=new TestBehaviour1();
+		TestBehaviour1 rtb3=new TestBehaviour1();
+		
+		mtb3.setMatchWith(rtb3);
+		
+		mainList.getBehaviourList().add(mtb3);
+		refList.getBehaviourList().add(rtb3);
+		
+		ErrorRecorder l=new ErrorRecorder();
+		
+		BehaviourListComparatorRule rule=new BehaviourListComparatorRule();
+		
+		if (rule.compare(context, mainList, refList, l, true) == false) {
+			fail("Comparison failed");
+		}
+		
+		if (l.isValid() == false) {
+			fail(l.invalidMessage());
+		}
+	}
+	
+	public void testCompareMissingMidRef() {
+		
+		Definition maindefn=new Definition() {};
+		Definition refdefn=new Definition() {};
+		
+		Role role=new Role();
+		role.setName("role");
+		
+		LocatedName mn=new LocatedName();
+		mn.setRole(role);
+		
+		maindefn.setLocatedName(mn);
+		refdefn.setLocatedName(mn);
+		
+		ModelReference ref=new ModelReference((String)null);
+		
+		DefaultComparatorContext context=
+					new DefaultComparatorContext(ref, ref, getRules());
+		
+		BehaviourList mainList=new TestBehaviourList();
+		BehaviourList refList=new TestBehaviourList();
+		
+		TestBehaviour1 mtb1=new TestBehaviour1();
+		maindefn.getBlock().getContents().add(mtb1);
+
+		TestBehaviour1 rtb1=new TestBehaviour1();
+		refdefn.getBlock().getContents().add(rtb1);
+
+		mtb1.setMatchWith(rtb1);
+		
+		mainList.getBehaviourList().add(mtb1);
+		refList.getBehaviourList().add(rtb1);
+		
+		TestBehaviour1 mtb2=new TestBehaviour1();
+		maindefn.getBlock().getContents().add(mtb2);
+		
+		mainList.getBehaviourList().add(mtb2);
+		
+		TestBehaviour1 mtb3=new TestBehaviour1();
+		maindefn.getBlock().getContents().add(mtb3);
+		TestBehaviour1 rtb3=new TestBehaviour1();
+		refdefn.getBlock().getContents().add(rtb3);
+		
+		mtb3.setMatchWith(rtb3);
+		
+		mainList.getBehaviourList().add(mtb3);
+		refList.getBehaviourList().add(rtb3);
+		
+		ErrorRecorder l=new ErrorRecorder();
+
+		//l.addExpectedError(TestBehaviourComparatorRule.TEST_BEHAVIOUR_COMPARE_FAILED);
+		
+		l.addExpectedError(org.scribble.util.MessageUtil.format(
+				java.util.PropertyResourceBundle.getBundle(
+						"org.scribble.comparator.Messages").
+						getString("_UNEXPECTED_BEHAVIOUR"), null));
+		
+		BehaviourListComparatorRule rule=new BehaviourListComparatorRule();
+		
+		if (rule.compare(context, mainList, refList, l, true) == true) {
+			fail("Comparison should have failed");
+		}
+		
+		if (l.isValid() == false) {
+			fail(l.invalidMessage());
+		}
+	}
+	
+	public void testCompareMissingConditionalMidRef() {
+		
+		Definition maindefn=new Definition() {};
+		Definition refdefn=new Definition() {};
+		
+		Role role=new Role();
+		role.setName("role");
+		
+		LocatedName mn=new LocatedName();
+		mn.setRole(role);
+		
+		maindefn.setLocatedName(mn);
+		refdefn.setLocatedName(mn);
+		
+		ModelReference ref=new ModelReference((String)null);
+		
+		DefaultComparatorContext context=
+					new DefaultComparatorContext(ref, ref, getRules());
+		
+		BehaviourList mainList=new TestBehaviourList();
+		BehaviourList refList=new TestBehaviourList();
+		
+		TestBehaviour1 mtb1=new TestBehaviour1();
+		maindefn.getBlock().getContents().add(mtb1);
+
+		TestBehaviour1 rtb1=new TestBehaviour1();
+		refdefn.getBlock().getContents().add(rtb1);
+
+		mtb1.setMatchWith(rtb1);
+		
+		mainList.getBehaviourList().add(mtb1);
+		refList.getBehaviourList().add(rtb1);
+		
+		TestSinglePath mtb2=new TestSinglePath();
+		mtb2.setConditional(true);
+		
+		maindefn.getBlock().getContents().add(mtb2);
+		
+		mainList.getBehaviourList().add(mtb2);
+		
+		TestBehaviour1 mtb3=new TestBehaviour1();
+		maindefn.getBlock().getContents().add(mtb3);
+		TestBehaviour1 rtb3=new TestBehaviour1();
+		refdefn.getBlock().getContents().add(rtb3);
+		
+		mtb3.setMatchWith(rtb3);
+		
+		mainList.getBehaviourList().add(mtb3);
+		refList.getBehaviourList().add(rtb3);
+		
+		ErrorRecorder l=new ErrorRecorder();
+
+		//l.addExpectedError(TestBehaviourComparatorRule.TEST_BEHAVIOUR_COMPARE_FAILED);
+		
+		l.addExpectedError(org.scribble.util.MessageUtil.format(
+				java.util.PropertyResourceBundle.getBundle(
+						"org.scribble.comparator.Messages").
+						getString("_UNEXPECTED_BEHAVIOUR"), null));
+		
+		BehaviourListComparatorRule rule=new BehaviourListComparatorRule();
+		
+		if (rule.compare(context, mainList, refList, l, true) == true) {
+			fail("Comparison should have failed");
+		}
+		
+		if (l.isValid() == false) {
+			fail(l.invalidMessage());
+		}
+	}
+	
+	public void testCompareDiffMidBehaviour() {
+		
+		ModelReference ref=new ModelReference((String)null);
+		
+		DefaultComparatorContext context=
+					new DefaultComparatorContext(ref, ref, getRules());
+		
+		BehaviourList mainList=new TestBehaviourList();
+		BehaviourList refList=new TestBehaviourList();
+		
+		TestBehaviour1 mtb1=new TestBehaviour1();
+		TestBehaviour1 rtb1=new TestBehaviour1();
+		
+		mtb1.setMatchWith(rtb1);
+		
+		mainList.getBehaviourList().add(mtb1);
+		refList.getBehaviourList().add(rtb1);
+		
+		TestBehaviour1 mtb2=new TestBehaviour1();
+		TestBehaviour2 rtb2=new TestBehaviour2();
+		
+		mainList.getBehaviourList().add(mtb2);
+		refList.getBehaviourList().add(rtb2);
+		
+		TestBehaviour1 mtb3=new TestBehaviour1();
+		TestBehaviour1 rtb3=new TestBehaviour1();
+		
+		mtb3.setMatchWith(rtb3);
+		
+		mainList.getBehaviourList().add(mtb3);
+		refList.getBehaviourList().add(rtb3);
+		
+		ErrorRecorder l=new ErrorRecorder();
+
+		//l.addExpectedError(TestBehaviourComparatorRule.TEST_BEHAVIOUR_COMPARE_FAILED);
+		
+		l.addExpectedError(org.scribble.util.MessageUtil.format(
+				java.util.PropertyResourceBundle.getBundle(
+						"org.scribble.comparator.Messages").
+						getString("_UNEXPECTED_BEHAVIOUR"), null));
+		l.addExpectedError(org.scribble.util.MessageUtil.format(
+				java.util.PropertyResourceBundle.getBundle(
+				"org.scribble.conformance.comparator.Messages").
+				getString("_EXPECTING_ACTIVITY"), null));
+		
+		BehaviourListComparatorRule rule=new BehaviourListComparatorRule();
+		
+		if (rule.compare(context, mainList, refList, l, true) == true) {
+			fail("Comparison should have failed");
+		}
+		
+		if (l.isValid() == false) {
+			fail(l.invalidMessage());
+		}
+	}
+	
+	public void testCompareMissingMidMain() {
+		
+		Definition maindefn=new Definition() {};
+		Definition refdefn=new Definition() {};
+		
+		Role role=new Role();
+		role.setName("role");
+		
+		LocatedName mn=new LocatedName();
+		mn.setRole(role);
+		
+		maindefn.setLocatedName(mn);
+		refdefn.setLocatedName(mn);
+		
+		ModelReference ref=new ModelReference((String)null);
+		
+		DefaultComparatorContext context=
+					new DefaultComparatorContext(ref, ref, getRules());
+		
+		BehaviourList mainList=new TestBehaviourList();
+		BehaviourList refList=new TestBehaviourList();
+		
+		TestBehaviour1 mtb1=new TestBehaviour1();
+		maindefn.getBlock().getContents().add(mtb1);
+
+		TestBehaviour1 rtb1=new TestBehaviour1();
+		refdefn.getBlock().getContents().add(rtb1);
+
+		mtb1.setMatchWith(rtb1);
+		
+		mainList.getBehaviourList().add(mtb1);
+		refList.getBehaviourList().add(rtb1);
+		
+		TestBehaviour1 rtb2=new TestBehaviour1();
+		refdefn.getBlock().getContents().add(rtb2);
+		
+		refList.getBehaviourList().add(rtb2);
+		
+		TestBehaviour1 mtb3=new TestBehaviour1();
+		maindefn.getBlock().getContents().add(mtb3);
+		TestBehaviour1 rtb3=new TestBehaviour1();
+		refdefn.getBlock().getContents().add(rtb3);
+		
+		mtb3.setMatchWith(rtb3);
+		
+		mainList.getBehaviourList().add(mtb3);
+		refList.getBehaviourList().add(rtb3);
+		
+		ErrorRecorder l=new ErrorRecorder();
+		
+		//l.addExpectedError(TestBehaviourComparatorRule.TEST_BEHAVIOUR_COMPARE_FAILED);
+		
+		l.addExpectedError(org.scribble.util.MessageUtil.format(
+							java.util.PropertyResourceBundle.getBundle(
+							"org.scribble.conformance.comparator.Messages").
+							getString("_EXPECTING_ACTIVITY"), null));
+		
+		BehaviourListComparatorRule rule=new BehaviourListComparatorRule();
+		
+		if (rule.compare(context, mainList, refList, l, true) == true) {
+			fail("Comparison should have failed");
+		}
+		
+		if (l.isValid() == false) {
+			fail(l.invalidMessage());
+		}
+	}
+	
+	public void testCompareMissingConditionalMidMain() {
+		
+		Definition maindefn=new Definition() {};
+		Definition refdefn=new Definition() {};
+		
+		Role role=new Role();
+		role.setName("role");
+		
+		LocatedName mn=new LocatedName();
+		mn.setRole(role);
+		
+		maindefn.setLocatedName(mn);
+		refdefn.setLocatedName(mn);
+		
+		ModelReference ref=new ModelReference((String)null);
+		
+		DefaultComparatorContext context=
+					new DefaultComparatorContext(ref, ref, getRules());
+		
+		BehaviourList mainList=new TestBehaviourList();
+		BehaviourList refList=new TestBehaviourList();
+		
+		TestBehaviour1 mtb1=new TestBehaviour1();
+		maindefn.getBlock().getContents().add(mtb1);
+
+		TestBehaviour1 rtb1=new TestBehaviour1();
+		refdefn.getBlock().getContents().add(rtb1);
+
+		mtb1.setMatchWith(rtb1);
+		
+		mainList.getBehaviourList().add(mtb1);
+		refList.getBehaviourList().add(rtb1);
+		
+		TestSinglePath rtb2=new TestSinglePath();
+		rtb2.setConditional(true);
+		refdefn.getBlock().getContents().add(rtb2);
+		
+		refList.getBehaviourList().add(rtb2);
+		
+		TestBehaviour1 mtb3=new TestBehaviour1();
+		maindefn.getBlock().getContents().add(mtb3);
+		TestBehaviour1 rtb3=new TestBehaviour1();
+		refdefn.getBlock().getContents().add(rtb3);
+		
+		mtb3.setMatchWith(rtb3);
+		
+		mainList.getBehaviourList().add(mtb3);
+		refList.getBehaviourList().add(rtb3);
+		
+		ErrorRecorder l=new ErrorRecorder();
+		
+		//l.addExpectedError(TestBehaviourComparatorRule.TEST_BEHAVIOUR_COMPARE_FAILED);
+		
+		l.addExpectedError(org.scribble.util.MessageUtil.format(
+							java.util.PropertyResourceBundle.getBundle(
+							"org.scribble.conformance.comparator.Messages").
+							getString("_EXPECTING_ACTIVITY"), null));
+		
+		BehaviourListComparatorRule rule=new BehaviourListComparatorRule();
+		
+		if (rule.compare(context, mainList, refList, l, true) == true) {
+			fail("Comparison should have failed");
+		}
+		
+		if (l.isValid() == false) {
+			fail(l.invalidMessage());
+		}
+	}
+	
+	public void testCompareMissingEndRef() {
+		
+		ModelReference ref=new ModelReference((String)null);
+		
+		DefaultComparatorContext context=
+					new DefaultComparatorContext(ref, ref, getRules());
+		
+		BehaviourList mainList=new TestBehaviourList();
+		BehaviourList refList=new TestBehaviourList();
+		
+		TestBehaviour1 mtb1=new TestBehaviour1();
+		TestBehaviour1 rtb1=new TestBehaviour1();
+		
+		mtb1.setMatchWith(rtb1);
+		
+		mainList.getBehaviourList().add(mtb1);
+		refList.getBehaviourList().add(rtb1);
+		
+		TestBehaviour1 mtb2=new TestBehaviour1();
+		TestBehaviour1 rtb2=new TestBehaviour1();
+		
+		mtb2.setMatchWith(rtb2);
+		
+		mainList.getBehaviourList().add(mtb2);
+		refList.getBehaviourList().add(rtb2);
+				
+		TestBehaviour1 mtb3=new TestBehaviour1();
+		
+		mainList.getBehaviourList().add(mtb3);
+		
+		ErrorRecorder l=new ErrorRecorder();
+
+		//l.addExpectedError(TestBehaviourComparatorRule.TEST_BEHAVIOUR_COMPARE_FAILED);
+		
+		l.addExpectedError(org.scribble.util.MessageUtil.format(
+				java.util.PropertyResourceBundle.getBundle(
+						"org.scribble.comparator.Messages").
+						getString("_UNEXPECTED_BEHAVIOUR"), null));
+		
+		BehaviourListComparatorRule rule=new BehaviourListComparatorRule();
+		
+		if (rule.compare(context, mainList, refList, l, true) == true) {
+			fail("Comparison should have failed");
+		}
+		
+		if (l.isValid() == false) {
+			fail(l.invalidMessage());
+		}
+	}
+	
+	public void testCompareMissingEndMain() {
+		
+		ModelReference ref=new ModelReference((String)null);
+		
+		DefaultComparatorContext context=
+					new DefaultComparatorContext(ref, ref, getRules());
+
+		BehaviourList mainList=new TestBehaviourList();
+		BehaviourList refList=new TestBehaviourList();
+		
+		TestBehaviour1 mtb1=new TestBehaviour1();
+		TestBehaviour1 rtb1=new TestBehaviour1();
+		
+		mtb1.setMatchWith(rtb1);
+		
+		mainList.getBehaviourList().add(mtb1);
+		refList.getBehaviourList().add(rtb1);
+		
+		TestBehaviour1 mtb2=new TestBehaviour1();
+		TestBehaviour1 rtb2=new TestBehaviour1();
+		
+		mtb2.setMatchWith(rtb2);
+		
+		mainList.getBehaviourList().add(mtb2);
+		refList.getBehaviourList().add(rtb2);
+				
+		TestBehaviour1 rtb3=new TestBehaviour1();
+		
+		refList.getBehaviourList().add(rtb3);
+		
+		ErrorRecorder l=new ErrorRecorder();
+
+		//l.addExpectedError(TestBehaviourComparatorRule.TEST_BEHAVIOUR_COMPARE_FAILED);
+		
+		l.addExpectedError(org.scribble.util.MessageUtil.format(
+				java.util.PropertyResourceBundle.getBundle(
+				"org.scribble.conformance.comparator.Messages").
+				getString("_EXPECTING_ACTIVITY"), null));
+		
+		BehaviourListComparatorRule rule=new BehaviourListComparatorRule();
+		
+		if (rule.compare(context, mainList, refList, l, true) == true) {
+			fail("Comparison should have failed");
+		}
+		
+		if (l.isValid() == false) {
+			fail(l.invalidMessage());
+		}
+	}
+	
+	public void testCompareMismatchMidBehaviour() {
+		
+		ModelReference ref=new ModelReference((String)null);
+		
+		DefaultComparatorContext context=
+					new DefaultComparatorContext(ref, ref, getRules());
+		
+		BehaviourList mainList=new TestBehaviourList();
+		BehaviourList refList=new TestBehaviourList();
+		
+		TestBehaviour1 mtb1=new TestBehaviour1();
+		TestBehaviour1 rtb1=new TestBehaviour1();
+		
+		mtb1.setMatchWith(rtb1);
+		
+		mainList.getBehaviourList().add(mtb1);
+		refList.getBehaviourList().add(rtb1);
+		
+		TestBehaviour1 mtb2=new TestBehaviour1();
+		TestBehaviour1 rtb2=new TestBehaviour1();
+		
+		//mtb2.setMatchWith(rtb2);
+		
+		mainList.getBehaviourList().add(mtb2);
+		refList.getBehaviourList().add(rtb2);
+		
+		TestBehaviour1 mtb3=new TestBehaviour1();
+		TestBehaviour1 rtb3=new TestBehaviour1();
+		
+		mtb3.setMatchWith(rtb3);
+		
+		mainList.getBehaviourList().add(mtb3);
+		refList.getBehaviourList().add(rtb3);
+		
+		ErrorRecorder l=new ErrorRecorder();
+		
+		l.addExpectedError(TestBehaviour1ComparatorRule.TEST_BEHAVIOUR_COMPARE_FAILED);
+		
+		BehaviourListComparatorRule rule=new BehaviourListComparatorRule();
+		
+		if (rule.compare(context, mainList, refList, l, true) == true) {
+			fail("Comparison should have failed");
+		}
+		
+		if (l.isValid() == false) {
+			fail(l.invalidMessage());
+		}
+	}
+	
+	public void testCompareMismatchStartBehaviour() {
+		
+		ModelReference ref=new ModelReference((String)null);
+		
+		DefaultComparatorContext context=
+					new DefaultComparatorContext(ref, ref, getRules());
+		
+		BehaviourList mainList=new TestBehaviourList();
+		BehaviourList refList=new TestBehaviourList();
+		
+		TestBehaviour1 mtb1=new TestBehaviour1();
+		TestBehaviour1 rtb1=new TestBehaviour1();
+		
+		//mtb1.setMatchWith(rtb1);
+		
+		mainList.getBehaviourList().add(mtb1);
+		refList.getBehaviourList().add(rtb1);
+		
+		TestBehaviour1 mtb2=new TestBehaviour1();
+		TestBehaviour1 rtb2=new TestBehaviour1();
+		
+		//mtb2.setMatchWith(rtb2);
+		
+		mainList.getBehaviourList().add(mtb2);
+		refList.getBehaviourList().add(rtb2);
+		
+		TestBehaviour1 mtb3=new TestBehaviour1();
+		TestBehaviour1 rtb3=new TestBehaviour1();
+		
+		mtb3.setMatchWith(rtb3);
+		
+		mainList.getBehaviourList().add(mtb3);
+		refList.getBehaviourList().add(rtb3);
+		
+		ErrorRecorder l=new ErrorRecorder();
+		
+		l.addExpectedError(TestBehaviour1ComparatorRule.TEST_BEHAVIOUR_COMPARE_FAILED);
+		l.addExpectedError(TestBehaviour1ComparatorRule.TEST_BEHAVIOUR_COMPARE_FAILED);
+		
+		BehaviourListComparatorRule rule=new BehaviourListComparatorRule();
+		
+		if (rule.compare(context, mainList, refList, l, true) == true) {
+			fail("Comparison should have failed");
+		}
+		
+		if (l.isValid() == false) {
+			fail(l.invalidMessage());
+		}
+	}
+	
+	public void testCompareSameMidNonStrictSinglePath() {
+		
+		ModelReference ref=new ModelReference((String)null);
+		
+		DefaultComparatorContext context=
+					new DefaultComparatorContext(ref, ref, getRules());
+		
+		BehaviourList mainList=new TestBehaviourList();
+		BehaviourList refList=new TestBehaviourList();
+		
+		TestBehaviour1 mtb1=new TestBehaviour1();
+		TestBehaviour1 rtb1=new TestBehaviour1();
+		
+		mtb1.setMatchWith(rtb1);
+		
+		mainList.getBehaviourList().add(mtb1);
+		refList.getBehaviourList().add(rtb1);
+		
+		TestSinglePath mtsp=new TestSinglePath();
+		TestSinglePath rtsp=new TestSinglePath();
+		
+		//mainList.getBehaviourList().add(mtsp);
+		//refList.getBehaviourList().add(rtsp);
+
+		TestBehaviour1 mtb2=new TestBehaviour1();
+		TestBehaviour1 rtb2=new TestBehaviour1();
+		
+		mtb2.setMatchWith(rtb2);
+		
+		mtsp.getBlock().getContents().add(mtb2);
+		rtsp.getBlock().getContents().add(rtb2);
+
+		mainList.visit(mtsp);
+		refList.visit(rtsp);
+		
+		TestBehaviour1 mtb3=new TestBehaviour1();
+		TestBehaviour1 rtb3=new TestBehaviour1();
+		
+		mtb3.setMatchWith(rtb3);
+		
+		mainList.getBehaviourList().add(mtb3);
+		refList.getBehaviourList().add(rtb3);
+		
+		ErrorRecorder l=new ErrorRecorder();
+		
+		BehaviourListComparatorRule rule=new BehaviourListComparatorRule();
+		
+		if (rule.compare(context, mainList, refList, l, true) == false) {
+			fail("Comparison should NOT have failed");
+		}
+		
+		if (l.isValid() == false) {
+			fail(l.invalidMessage());
+		}
+	}
+
+	public void testCompareSameMidStrictSinglePath() {
+		
+		ModelReference ref=new ModelReference((String)null);
+		
+		DefaultComparatorContext context=
+					new DefaultComparatorContext(ref, ref, getRules());
+		
+		BehaviourList mainList=new TestBehaviourList();
+		BehaviourList refList=new TestBehaviourList();
+		
+		TestBehaviour1 mtb1=new TestBehaviour1();
+		TestBehaviour1 rtb1=new TestBehaviour1();
+		
+		mtb1.setMatchWith(rtb1);
+		
+		mainList.getBehaviourList().add(mtb1);
+		refList.getBehaviourList().add(rtb1);
+		
+		TestSinglePath mtsp=new TestSinglePath();
+		mtsp.setStrictScope(true);
+		TestSinglePath rtsp=new TestSinglePath();
+		rtsp.setStrictScope(true);
+		
+		//mainList.getBehaviourList().add(mtsp);
+		//refList.getBehaviourList().add(rtsp);
+
+		TestBehaviour1 mtb2=new TestBehaviour1();
+		TestBehaviour1 rtb2=new TestBehaviour1();
+		
+		mtb2.setMatchWith(rtb2);
+		
+		mtsp.getBlock().getContents().add(mtb2);
+		rtsp.getBlock().getContents().add(rtb2);
+		
+		mainList.visit(mtsp);
+		refList.visit(rtsp);
+
+		TestBehaviour1 mtb3=new TestBehaviour1();
+		TestBehaviour1 rtb3=new TestBehaviour1();
+		
+		mtb3.setMatchWith(rtb3);
+		
+		mainList.getBehaviourList().add(mtb3);
+		refList.getBehaviourList().add(rtb3);
+		
+		ErrorRecorder l=new ErrorRecorder();
+		
+		BehaviourListComparatorRule rule=new BehaviourListComparatorRule();
+		
+		if (rule.compare(context, mainList, refList, l, true) == false) {
+			fail("Comparison should NOT have failed");
+		}
+		
+		if (l.isValid() == false) {
+			fail(l.invalidMessage());
+		}
+	}
+
+	public void testCompareDiffMidNonStrictSinglePath() {
+		
+		ModelReference ref=new ModelReference((String)null);
+		
+		DefaultComparatorContext context=
+					new DefaultComparatorContext(ref, ref, getRules());
+		
+		BehaviourList mainList=new TestBehaviourList();
+		BehaviourList refList=new TestBehaviourList();
+		
+		TestBehaviour1 mtb1=new TestBehaviour1();
+		TestBehaviour1 rtb1=new TestBehaviour1();
+		
+		mtb1.setMatchWith(rtb1);
+		
+		mainList.getBehaviourList().add(mtb1);
+		refList.getBehaviourList().add(rtb1);
+		
+		TestSinglePath mtsp=new TestSinglePath();
+		TestSinglePath rtsp=new TestSinglePath();
+		
+		//mainList.getBehaviourList().add(mtsp);
+		//refList.getBehaviourList().add(rtsp);
+
+		TestBehaviour1 mtb2=new TestBehaviour1();
+		TestBehaviour1 rtb2=new TestBehaviour1();
+		
+		//mtb2.setMatchWith(rtb2);
+		
+		mtsp.getBlock().getContents().add(mtb2);
+		rtsp.getBlock().getContents().add(rtb2);
+		
+		mainList.visit(mtsp);
+		refList.visit(rtsp);
+
+		TestBehaviour1 mtb3=new TestBehaviour1();
+		TestBehaviour1 rtb3=new TestBehaviour1();
+		
+		mtb3.setMatchWith(rtb3);
+		
+		mainList.getBehaviourList().add(mtb3);
+		refList.getBehaviourList().add(rtb3);
+		
+		ErrorRecorder l=new ErrorRecorder();
+		
+		l.addExpectedError(TestBehaviour1ComparatorRule.TEST_BEHAVIOUR_COMPARE_FAILED);
+		
+		BehaviourListComparatorRule rule=new BehaviourListComparatorRule();
+		
+		if (rule.compare(context, mainList, refList, l, true) == true) {
+			fail("Comparison should have failed");
+		}
+		
+		if (l.isValid() == false) {
+			fail(l.invalidMessage());
+		}
+	}
+
+	public void testCompareDiffMidStrictSinglePath() {
+		
+		ModelReference ref=new ModelReference((String)null);
+		
+		DefaultComparatorContext context=
+					new DefaultComparatorContext(ref, ref, getRules());
+		
+		BehaviourList mainList=new TestBehaviourList();
+		BehaviourList refList=new TestBehaviourList();
+		
+		TestBehaviour1 mtb1=new TestBehaviour1();
+		TestBehaviour1 rtb1=new TestBehaviour1();
+		
+		mtb1.setMatchWith(rtb1);
+		
+		mainList.getBehaviourList().add(mtb1);
+		refList.getBehaviourList().add(rtb1);
+		
+		TestSinglePath mtsp=new TestSinglePath();
+		mtsp.setStrictScope(true);
+		TestSinglePath rtsp=new TestSinglePath();
+		rtsp.setStrictScope(true);
+		
+		//mainList.getBehaviourList().add(mtsp);
+		//refList.getBehaviourList().add(rtsp);
+
+		TestBehaviour1 mtb2=new TestBehaviour1();
+		TestBehaviour1 rtb2=new TestBehaviour1();
+		
+		//mtb2.setMatchWith(rtb2);
+		
+		mtsp.getBlock().getContents().add(mtb2);
+		rtsp.getBlock().getContents().add(rtb2);
+		
+		mainList.visit(mtsp);
+		refList.visit(rtsp);
+
+		TestBehaviour1 mtb3=new TestBehaviour1();
+		TestBehaviour1 rtb3=new TestBehaviour1();
+		
+		mtb3.setMatchWith(rtb3);
+		
+		mainList.getBehaviourList().add(mtb3);
+		refList.getBehaviourList().add(rtb3);
+		
+		ErrorRecorder l=new ErrorRecorder();
+		
+		l.addExpectedError(TestBehaviour1ComparatorRule.TEST_BEHAVIOUR_COMPARE_FAILED);
+		
+		BehaviourListComparatorRule rule=new BehaviourListComparatorRule();
+		
+		if (rule.compare(context, mainList, refList, l, true) == true) {
+			fail("Comparison should have failed");
+		}
+		
+		if (l.isValid() == false) {
+			fail(l.invalidMessage());
+		}
+	}
+
+	public void testCompareMultipleDiffMidEndWithSinglePath() {
+		
+		ModelReference ref=new ModelReference((String)null);
+		
+		DefaultComparatorContext context=
+					new DefaultComparatorContext(ref, ref, getRules());
+		
+		BehaviourList mainList=new TestBehaviourList();
+		BehaviourList refList=new TestBehaviourList();
+		
+		TestBehaviour1 mtb1=new TestBehaviour1();
+		TestBehaviour1 rtb1=new TestBehaviour1();
+		
+		mtb1.setMatchWith(rtb1);
+		
+		mainList.getBehaviourList().add(mtb1);
+		refList.getBehaviourList().add(rtb1);
+		
+		TestBehaviour1 mtb1_1=new TestBehaviour1();
+		TestBehaviour1 rtb1_1=new TestBehaviour1();
+		
+		mainList.getBehaviourList().add(mtb1_1);
+		refList.getBehaviourList().add(rtb1_1);
+
+		TestBehaviour1 mtb1_2=new TestBehaviour1();
+		TestBehaviour1 rtb1_2=new TestBehaviour1();
+		
+		mainList.getBehaviourList().add(mtb1_2);
+		refList.getBehaviourList().add(rtb1_2);
+
+		TestSinglePath mtsp=new TestSinglePath();
+		mtsp.setStrictScope(true);
+		TestSinglePath rtsp=new TestSinglePath();
+		rtsp.setStrictScope(true);
+		
+		//mainList.getBehaviourList().add(mtsp);
+		//refList.getBehaviourList().add(rtsp);
+
+		TestBehaviour1 mtb2=new TestBehaviour1();
+		TestBehaviour1 rtb2=new TestBehaviour1();
+		
+		mtb2.setMatchWith(rtb2);
+		
+		mtsp.getBlock().getContents().add(mtb2);
+		rtsp.getBlock().getContents().add(rtb2);
+		
+		mainList.visit(mtsp);
+		refList.visit(rtsp);
+
+		TestBehaviour1 mtb3=new TestBehaviour1();
+		TestBehaviour1 rtb3=new TestBehaviour1();
+		
+		mtb3.setMatchWith(rtb3);
+		
+		mainList.getBehaviourList().add(mtb3);
+		refList.getBehaviourList().add(rtb3);
+		
+		ErrorRecorder l=new ErrorRecorder();
+		
+		l.addExpectedError(TestBehaviour1ComparatorRule.TEST_BEHAVIOUR_COMPARE_FAILED);
+		l.addExpectedError(TestBehaviour1ComparatorRule.TEST_BEHAVIOUR_COMPARE_FAILED);
+		
+		BehaviourListComparatorRule rule=new BehaviourListComparatorRule();
+		
+		if (rule.compare(context, mainList, refList, l, true) == true) {
+			fail("Comparison should have failed");
+		}
+		
+		if (l.isValid() == false) {
+			fail(l.invalidMessage());
+		}
+	}
+
+	public void testCompareMultipleSameMidEndWithMultiPath() {
+		
+		ModelReference ref=new ModelReference((String)null);
+		
+		DefaultComparatorContext context=
+					new DefaultComparatorContext(ref, ref, getRules());
+		
+		BehaviourList mainList=new TestBehaviourList();
+		BehaviourList refList=new TestBehaviourList();
+		
+		TestBehaviour1 mtb1=new TestBehaviour1();
+		TestBehaviour1 rtb1=new TestBehaviour1();
+		
+		mtb1.setMatchWith(rtb1);
+		
+		mainList.getBehaviourList().add(mtb1);
+		refList.getBehaviourList().add(rtb1);
+		
+		TestMultiPath mtmp=new TestMultiPath();
+		mtmp.setStrictScope(true);
+		TestMultiPath rtmp=new TestMultiPath();
+		rtmp.setStrictScope(true);
+		
+		//mainList.getBehaviourList().add(mtsp);
+		//refList.getBehaviourList().add(rtsp);
+
+		TestBehaviour1 mtb2_1=new TestBehaviour1();
+		TestBehaviour1 rtb2_1=new TestBehaviour1();
+		
+		mtb2_1.setMatchWith(rtb2_1);
+		
+		Block bmtb2_1=new Block();
+		bmtb2_1.getContents().add(mtb2_1);
+		
+		Block brtb2_1=new Block();
+		brtb2_1.getContents().add(rtb2_1);
+		
+		mtmp.getPaths().add(bmtb2_1);
+		rtmp.getPaths().add(brtb2_1);
+		
+		TestBehaviour1 mtb2_2=new TestBehaviour1();
+		TestBehaviour1 rtb2_2=new TestBehaviour1();
+		
+		mtb2_2.setMatchWith(rtb2_2);
+		
+		Block bmtb2_2=new Block();
+		bmtb2_2.getContents().add(mtb2_2);
+		
+		Block brtb2_2=new Block();
+		brtb2_2.getContents().add(rtb2_2);
+		
+		mtmp.getPaths().add(bmtb2_2);
+		rtmp.getPaths().add(brtb2_2);
+		
+		mainList.visit(mtmp);
+		refList.visit(rtmp);
+
+		TestBehaviour1 mtb3=new TestBehaviour1();
+		TestBehaviour1 rtb3=new TestBehaviour1();
+		
+		mtb3.setMatchWith(rtb3);
+		
+		mainList.getBehaviourList().add(mtb3);
+		refList.getBehaviourList().add(rtb3);
+		
+		ErrorRecorder l=new ErrorRecorder();
+		
+		//l.addExpectedError(TestBehaviourComparatorRule.TEST_BEHAVIOUR_COMPARE_FAILED);
+		//l.addExpectedError(TestBehaviourComparatorRule.TEST_BEHAVIOUR_COMPARE_FAILED);
+		
+		BehaviourListComparatorRule rule=new BehaviourListComparatorRule();
+		
+		if (rule.compare(context, mainList, refList, l, true) == false) {
+			fail("Comparison should NOT have failed");
+		}
+		
+		if (l.isValid() == false) {
+			fail(l.invalidMessage());
+		}
+	}
+
+	public void testCompareMultipleDiffMidEndWithMultiPath() {
+		
+		ModelReference ref=new ModelReference((String)null);
+		
+		DefaultComparatorContext context=
+					new DefaultComparatorContext(ref, ref, getRules());
+		
+		BehaviourList mainList=new TestBehaviourList();
+		BehaviourList refList=new TestBehaviourList();
+		
+		TestBehaviour1 mtb1=new TestBehaviour1();
+		TestBehaviour1 rtb1=new TestBehaviour1();
+		
+		mtb1.setMatchWith(rtb1);
+		
+		mainList.getBehaviourList().add(mtb1);
+		refList.getBehaviourList().add(rtb1);
+		
+		TestBehaviour1 mtb1_1=new TestBehaviour1();
+		TestBehaviour1 rtb1_1=new TestBehaviour1();
+		
+		mainList.getBehaviourList().add(mtb1_1);
+		refList.getBehaviourList().add(rtb1_1);
+
+		TestBehaviour1 mtb1_2=new TestBehaviour1();
+		TestBehaviour1 rtb1_2=new TestBehaviour1();
+		
+		mainList.getBehaviourList().add(mtb1_2);
+		refList.getBehaviourList().add(rtb1_2);
+		
+		TestMultiPath mtmp=new TestMultiPath();
+		mtmp.setStrictScope(true);
+		TestMultiPath rtmp=new TestMultiPath();
+		rtmp.setStrictScope(true);
+		
+		//mainList.getBehaviourList().add(mtsp);
+		//refList.getBehaviourList().add(rtsp);
+
+		TestBehaviour1 mtb2_1=new TestBehaviour1();
+		TestBehaviour1 rtb2_1=new TestBehaviour1();
+		
+		mtb2_1.setMatchWith(rtb2_1);
+		
+		Block bmtb2_1=new Block();
+		bmtb2_1.getContents().add(mtb2_1);
+		
+		Block brtb2_1=new Block();
+		brtb2_1.getContents().add(rtb2_1);
+		
+		mtmp.getPaths().add(bmtb2_1);
+		rtmp.getPaths().add(brtb2_1);
+		
+		TestBehaviour1 mtb2_2=new TestBehaviour1();
+		TestBehaviour1 rtb2_2=new TestBehaviour1();
+		
+		mtb2_2.setMatchWith(rtb2_2);
+		
+		Block bmtb2_2=new Block();
+		bmtb2_2.getContents().add(mtb2_2);
+		
+		Block brtb2_2=new Block();
+		brtb2_2.getContents().add(rtb2_2);
+		
+		mtmp.getPaths().add(bmtb2_2);
+		rtmp.getPaths().add(brtb2_2);
+		
+		mainList.visit(mtmp);
+		refList.visit(rtmp);
+
+		TestBehaviour1 mtb3=new TestBehaviour1();
+		TestBehaviour1 rtb3=new TestBehaviour1();
+		
+		mtb3.setMatchWith(rtb3);
+		
+		mainList.getBehaviourList().add(mtb3);
+		refList.getBehaviourList().add(rtb3);
+		
+		ErrorRecorder l=new ErrorRecorder();
+		
+		l.addExpectedError(TestBehaviour1ComparatorRule.TEST_BEHAVIOUR_COMPARE_FAILED);
+		l.addExpectedError(TestBehaviour1ComparatorRule.TEST_BEHAVIOUR_COMPARE_FAILED);
+		
+		BehaviourListComparatorRule rule=new BehaviourListComparatorRule();
+		
+		if (rule.compare(context, mainList, refList, l, true) == true) {
+			fail("Comparison should have failed");
+		}
+		
+		if (l.isValid() == false) {
+			fail(l.invalidMessage());
+		}
+	}
+
+	public void testCompareMultipleDiffInMultiPath() {
+		
+		ModelReference ref=new ModelReference((String)null);
+		
+		DefaultComparatorContext context=
+					new DefaultComparatorContext(ref, ref, getRules());
+		
+		BehaviourList mainList=new TestBehaviourList();
+		BehaviourList refList=new TestBehaviourList();
+		
+		TestBehaviour1 mtb1=new TestBehaviour1();
+		TestBehaviour1 rtb1=new TestBehaviour1();
+		
+		mtb1.setMatchWith(rtb1);
+		
+		mainList.getBehaviourList().add(mtb1);
+		refList.getBehaviourList().add(rtb1);
+		
+		TestMultiPath mtmp=new TestMultiPath();
+		mtmp.setStrictScope(true);
+		TestMultiPath rtmp=new TestMultiPath();
+		rtmp.setStrictScope(true);
+		
+		//mainList.getBehaviourList().add(mtsp);
+		//refList.getBehaviourList().add(rtsp);
+
+		TestBehaviour1 mtb2_1=new TestBehaviour1();
+		TestBehaviour1 rtb2_1=new TestBehaviour1();
+		
+		mtb2_1.setMatchWith(rtb2_1);
+		
+		Block bmtb2_1=new Block();
+		bmtb2_1.getContents().add(mtb2_1);
+		
+		Block brtb2_1=new Block();
+		brtb2_1.getContents().add(rtb2_1);
+		
+		mtmp.getPaths().add(bmtb2_1);
+		rtmp.getPaths().add(brtb2_1);
+		
+		TestBehaviour1 mtb2_2=new TestBehaviour1();
+		TestBehaviour1 rtb2_2=new TestBehaviour1();
+		
+		//mtb2_2.setMatchWith(rtb2_2);
+		
+		Block bmtb2_2=new Block();
+		bmtb2_2.getContents().add(mtb2_2);
+		
+		Block brtb2_2=new Block();
+		brtb2_2.getContents().add(rtb2_2);
+		
+		mtmp.getPaths().add(bmtb2_2);
+		rtmp.getPaths().add(brtb2_2);
+		
+		mainList.visit(mtmp);
+		refList.visit(rtmp);
+
+		TestBehaviour1 mtb3=new TestBehaviour1();
+		TestBehaviour1 rtb3=new TestBehaviour1();
+		
+		mtb3.setMatchWith(rtb3);
+		
+		mainList.getBehaviourList().add(mtb3);
+		refList.getBehaviourList().add(rtb3);
+		
+		ErrorRecorder l=new ErrorRecorder();
+		
+		l.addExpectedError(TestBehaviour1ComparatorRule.TEST_BEHAVIOUR_COMPARE_FAILED);
+		
+		BehaviourListComparatorRule rule=new BehaviourListComparatorRule();
+		
+		if (rule.compare(context, mainList, refList, l, true) == true) {
+			fail("Comparison should have failed");
+		}
+		
+		if (l.isValid() == false) {
+			fail(l.invalidMessage());
+		}
+	}
+
+	public void testCompareAdditionalMainPathInMultiPath() {
+		
+		Definition maindefn=new Definition() {};
+		Definition refdefn=new Definition() {};
+		
+		Role role=new Role();
+		role.setName("role");
+		
+		LocatedName mn=new LocatedName();
+		mn.setRole(role);
+		
+		maindefn.setLocatedName(mn);
+		refdefn.setLocatedName(mn);
+		
+		ModelReference ref=new ModelReference((String)null);
+		
+		DefaultComparatorContext context=
+					new DefaultComparatorContext(ref, ref, getRules());
+		
+		BehaviourList mainList=new TestBehaviourList();
+		BehaviourList refList=new TestBehaviourList();
+		
+		TestMultiPath mtmp=new TestMultiPath();
+		mtmp.setStrictScope(true);
+		mtmp.setMutuallyExclusivePaths(true);
+		maindefn.getBlock().getContents().add(mtmp);
+
+		TestMultiPath rtmp=new TestMultiPath();
+		rtmp.setStrictScope(true);
+		rtmp.setMutuallyExclusivePaths(true);
+		refdefn.getBlock().getContents().add(rtmp);
+		
+		TestBehaviour1 mtb2_1=new TestBehaviour1();
+		TestBehaviour1 rtb2_1=new TestBehaviour1();
+		
+		mtb2_1.setMatchWith(rtb2_1);
+		
+		Block bmtb2_1=new Block();
+		bmtb2_1.getContents().add(mtb2_1);
+		
+		Block brtb2_1=new Block();
+		brtb2_1.getContents().add(rtb2_1);
+		
+		mtmp.getPaths().add(bmtb2_1);
+		rtmp.getPaths().add(brtb2_1);
+		
+		TestBehaviour1 mtb2_2=new TestBehaviour1();
+		//TestBehaviour1 rtb2_2=new TestBehaviour1();
+		
+		//mtb2_2.setMatchWith(rtb2_2);
+		
+		Block bmtb2_2=new Block();
+		bmtb2_2.getContents().add(mtb2_2);
+		
+		//Block brtb2_2=new Block();
+		//brtb2_2.getContents().add(rtb2_2);
+		
+		mtmp.getPaths().add(bmtb2_2);
+		//rtmp.getPaths().add(brtb2_2);
+		
+		TestBehaviour1 mtb2_3=new TestBehaviour1();
+		TestBehaviour1 rtb2_3=new TestBehaviour1();
+		
+		mtb2_3.setMatchWith(rtb2_3);
+		
+		Block bmtb2_3=new Block();
+		bmtb2_3.getContents().add(mtb2_3);
+		
+		Block brtb2_3=new Block();
+		brtb2_3.getContents().add(rtb2_3);
+		
+		mtmp.getPaths().add(bmtb2_3);
+		rtmp.getPaths().add(brtb2_3);
+		
+		mainList.visit(mtmp);
+		refList.visit(rtmp);
+
+		ErrorRecorder l=new ErrorRecorder();
+		
+		l.addExpectedError(java.util.PropertyResourceBundle.getBundle(
+		"org.scribble.conformance.comparator.Messages").
+		getString("_ADDITIONAL_UNMATCHED_PATHS"));
+		
+		BehaviourListComparatorRule rule=new BehaviourListComparatorRule();
+		
+		if (rule.compare(context, mainList, refList, l, true) == true) {
+			fail("Comparison should have failed");
+		}
+		
+		if (l.isValid() == false) {
+			fail(l.invalidMessage());
+		}
+	}
+
+	public void testCompareAdditionalRefPathInMultiPath() {
+		
+		Definition maindefn=new Definition() {};
+		Definition refdefn=new Definition() {};
+		
+		Role role=new Role();
+		role.setName("role");
+		
+		LocatedName mn=new LocatedName();
+		mn.setRole(role);
+		
+		maindefn.setLocatedName(mn);
+		refdefn.setLocatedName(mn);
+		
+		ModelReference ref=new ModelReference((String)null);
+		
+		DefaultComparatorContext context=
+					new DefaultComparatorContext(ref, ref, getRules());
+		
+		BehaviourList mainList=new TestBehaviourList();
+		BehaviourList refList=new TestBehaviourList();
+		
+		TestMultiPath mtmp=new TestMultiPath();
+		mtmp.setStrictScope(true);
+		mtmp.setMutuallyExclusivePaths(true);
+		maindefn.getBlock().getContents().add(mtmp);
+
+		TestMultiPath rtmp=new TestMultiPath();
+		rtmp.setStrictScope(true);
+		rtmp.setMutuallyExclusivePaths(true);
+		refdefn.getBlock().getContents().add(rtmp);
+		
+		TestBehaviour1 mtb2_1=new TestBehaviour1();
+		TestBehaviour1 rtb2_1=new TestBehaviour1();
+		
+		mtb2_1.setMatchWith(rtb2_1);
+		
+		Block bmtb2_1=new Block();
+		bmtb2_1.getContents().add(mtb2_1);
+		
+		Block brtb2_1=new Block();
+		brtb2_1.getContents().add(rtb2_1);
+		
+		mtmp.getPaths().add(bmtb2_1);
+		rtmp.getPaths().add(brtb2_1);
+		
+		//TestBehaviour1 mtb2_2=new TestBehaviour1();
+		TestBehaviour1 rtb2_2=new TestBehaviour1();
+		
+		//mtb2_2.setMatchWith(rtb2_2);
+		
+		//Block bmtb2_2=new Block();
+		//bmtb2_2.getContents().add(mtb2_2);
+		
+		Block brtb2_2=new Block();
+		brtb2_2.getContents().add(rtb2_2);
+		
+		//mtmp.getPaths().add(bmtb2_2);
+		rtmp.getPaths().add(brtb2_2);
+		
+		TestBehaviour1 mtb2_3=new TestBehaviour1();
+		TestBehaviour1 rtb2_3=new TestBehaviour1();
+		
+		mtb2_3.setMatchWith(rtb2_3);
+		
+		Block bmtb2_3=new Block();
+		bmtb2_3.getContents().add(mtb2_3);
+		
+		Block brtb2_3=new Block();
+		brtb2_3.getContents().add(rtb2_3);
+		
+		mtmp.getPaths().add(bmtb2_3);
+		rtmp.getPaths().add(brtb2_3);
+		
+		mainList.visit(mtmp);
+		refList.visit(rtmp);
+
+		ErrorRecorder l=new ErrorRecorder();
+		
+		l.addExpectedError(java.util.PropertyResourceBundle.getBundle(
+				"org.scribble.conformance.comparator.Messages").
+					getString("_ADDITIONAL_UNMATCHED_REF_PATHS"));
+		
+		BehaviourListComparatorRule rule=new BehaviourListComparatorRule();
+		
+		if (rule.compare(context, mainList, refList, l, true) == true) {
+			fail("Comparison should have failed");
+		}
+		
+		if (l.isValid() == false) {
+			fail(l.invalidMessage());
+		}
+	}
+	
+	public void testCompareMissingConditionalDecisionMidRef() {
+		
+		Definition maindefn=new Definition() {};
+		Definition refdefn=new Definition() {};
+		
+		Role role=new Role();
+		role.setName("role");
+		
+		LocatedName mn=new LocatedName();
+		mn.setRole(role);
+		
+		maindefn.setLocatedName(mn);
+		refdefn.setLocatedName(mn);
+		
+		ModelReference ref=new ModelReference((String)null);
+		
+		DefaultComparatorContext context=
+					new DefaultComparatorContext(ref, ref, getRules());
+		
+		BehaviourList mainList=new TestBehaviourList();
+		BehaviourList refList=new TestBehaviourList();
+		
+		TestBehaviour1 mtb1=new TestBehaviour1();
+		maindefn.getBlock().getContents().add(mtb1);
+		
+		TestBehaviour1 rtb1=new TestBehaviour1();
+		refdefn.getBlock().getContents().add(rtb1);
+		
+		mtb1.setMatchWith(rtb1);
+		
+		mainList.getBehaviourList().add(mtb1);
+		refList.getBehaviourList().add(rtb1);
+		
+		TestSinglePath rtb2=new TestSinglePath();
+		rtb2.getInitiatorRoles().add(role);
+		rtb2.setConditional(true);
+		refdefn.getBlock().getContents().add(rtb2);
+
+		refList.getBehaviourList().add(rtb2);
+		
+		TestBehaviour1 mtb3=new TestBehaviour1();
+		maindefn.getBlock().getContents().add(mtb3);
+
+		TestBehaviour1 rtb3=new TestBehaviour1();
+		refdefn.getBlock().getContents().add(rtb3);
+		
+		mtb3.setMatchWith(rtb3);
+		
+		mainList.getBehaviourList().add(mtb3);
+		refList.getBehaviourList().add(rtb3);
+		
+		ErrorRecorder l=new ErrorRecorder();
+		
+		BehaviourListComparatorRule rule=new BehaviourListComparatorRule();
+		
+		if (rule.compare(context, mainList, refList, l, true) == false) {
+			fail("Comparison should NOT have failed");
+		}
+		
+		if (l.isValid() == false) {
+			fail(l.invalidMessage());
+		}
+	}
+	
+	public void testCompareMissingConditionalDecisionMidMain() {
+		
+		Definition maindefn=new Definition() {};
+		Definition refdefn=new Definition() {};
+		
+		Role role=new Role();
+		role.setName("role");
+		
+		LocatedName mn=new LocatedName();
+		mn.setRole(role);
+		
+		maindefn.setLocatedName(mn);
+		refdefn.setLocatedName(mn);
+		
+		ModelReference ref=new ModelReference((String)null);
+		
+		DefaultComparatorContext context=
+					new DefaultComparatorContext(ref, ref, getRules());
+		
+		BehaviourList mainList=new TestBehaviourList();
+		BehaviourList refList=new TestBehaviourList();
+		
+		TestBehaviour1 mtb1=new TestBehaviour1();
+		maindefn.getBlock().getContents().add(mtb1);
+		
+		TestBehaviour1 rtb1=new TestBehaviour1();
+		refdefn.getBlock().getContents().add(rtb1);
+		
+		mtb1.setMatchWith(rtb1);
+		
+		mainList.getBehaviourList().add(mtb1);
+		refList.getBehaviourList().add(rtb1);
+		
+		TestSinglePath mtb2=new TestSinglePath();
+		mtb2.getInitiatorRoles().add(role);
+		mtb2.setConditional(true);
+		maindefn.getBlock().getContents().add(mtb2);
+
+		mainList.getBehaviourList().add(mtb2);
+		
+		TestBehaviour1 mtb3=new TestBehaviour1();
+		maindefn.getBlock().getContents().add(mtb3);
+
+		TestBehaviour1 rtb3=new TestBehaviour1();
+		refdefn.getBlock().getContents().add(rtb3);
+		
+		mtb3.setMatchWith(rtb3);
+		
+		mainList.getBehaviourList().add(mtb3);
+		refList.getBehaviourList().add(rtb3);
+		
+		ErrorRecorder l=new ErrorRecorder();
+		
+		BehaviourListComparatorRule rule=new BehaviourListComparatorRule();
+		
+		if (rule.compare(context, mainList, refList, l, true) == false) {
+			fail("Comparison should NOT have failed");
+		}
+		
+		if (l.isValid() == false) {
+			fail(l.invalidMessage());
+		}
+	}
+	
+	public void testCompareAdditionalMainDecisionPathInMultiPath() {
+		
+		Definition maindefn=new Definition() {};
+		Definition refdefn=new Definition() {};
+		
+		Role role=new Role();
+		role.setName("role");
+		
+		LocatedName mn=new LocatedName();
+		mn.setRole(role);
+		
+		maindefn.setLocatedName(mn);
+		refdefn.setLocatedName(mn);
+		
+		ModelReference ref=new ModelReference((String)null);
+		
+		DefaultComparatorContext context=
+					new DefaultComparatorContext(ref, ref, getRules());
+		
+		BehaviourList mainList=new TestBehaviourList();
+		BehaviourList refList=new TestBehaviourList();
+		
+		TestMultiPath mtmp=new TestMultiPath();
+		mtmp.getInitiatorRoles().add(role);
+		mtmp.setStrictScope(true);
+		mtmp.setMutuallyExclusivePaths(true);
+		
+		maindefn.getBlock().getContents().add(mtmp);
+		
+		TestMultiPath rtmp=new TestMultiPath();
+		rtmp.getInitiatorRoles().add(role);
+		rtmp.setStrictScope(true);
+		rtmp.setMutuallyExclusivePaths(true);
+		refdefn.getBlock().getContents().add(rtmp);
+		
+		TestBehaviour1 mtb2_1=new TestBehaviour1();
+		TestBehaviour1 rtb2_1=new TestBehaviour1();
+		
+		mtb2_1.setMatchWith(rtb2_1);
+		
+		Block bmtb2_1=new Block();
+		bmtb2_1.getContents().add(mtb2_1);
+		
+		Block brtb2_1=new Block();
+		brtb2_1.getContents().add(rtb2_1);
+		
+		mtmp.getPaths().add(bmtb2_1);
+		rtmp.getPaths().add(brtb2_1);
+		
+		TestBehaviour1 mtb2_2=new TestBehaviour1();
+		//TestBehaviour1 rtb2_2=new TestBehaviour1();
+		
+		//mtb2_2.setMatchWith(rtb2_2);
+		
+		Block bmtb2_2=new Block();
+		bmtb2_2.getContents().add(mtb2_2);
+		
+		//Block brtb2_2=new Block();
+		//brtb2_2.getContents().add(rtb2_2);
+		
+		mtmp.getPaths().add(bmtb2_2);
+		//rtmp.getPaths().add(brtb2_2);
+		
+		TestBehaviour1 mtb2_3=new TestBehaviour1();
+		TestBehaviour1 rtb2_3=new TestBehaviour1();
+		
+		mtb2_3.setMatchWith(rtb2_3);
+		
+		Block bmtb2_3=new Block();
+		bmtb2_3.getContents().add(mtb2_3);
+		
+		Block brtb2_3=new Block();
+		brtb2_3.getContents().add(rtb2_3);
+		
+		mtmp.getPaths().add(bmtb2_3);
+		rtmp.getPaths().add(brtb2_3);
+		
+		mainList.visit(mtmp);
+		refList.visit(rtmp);
+
+		ErrorRecorder l=new ErrorRecorder();
+		
+		/*
+		l.addExpectedError(java.util.PropertyResourceBundle.getBundle(
+					"org.scribble.conformance.comparator.Messages").
+						getString("_ADDITIONAL_UNMATCHED_PATHS"));
+		*/
+		
+		BehaviourListComparatorRule rule=new BehaviourListComparatorRule();
+		
+		if (rule.compare(context, mainList, refList, l, true) == false) {
+			fail("Comparison should NOT have failed");
+		}
+		
+		if (l.isValid() == false) {
+			fail(l.invalidMessage());
+		}
+	}
+	
+	public void testCompareAdditionalRefDecisionPathInMultiPath() {
+		
+		Definition maindefn=new Definition() {};
+		Definition refdefn=new Definition() {};
+		
+		Role role=new Role();
+		role.setName("role");
+		
+		LocatedName mn=new LocatedName();
+		mn.setRole(role);
+		
+		maindefn.setLocatedName(mn);
+		refdefn.setLocatedName(mn);
+		
+		ModelReference ref=new ModelReference((String)null);
+		
+		DefaultComparatorContext context=
+					new DefaultComparatorContext(ref, ref, getRules());
+		
+		BehaviourList mainList=new TestBehaviourList();
+		BehaviourList refList=new TestBehaviourList();
+		
+		TestMultiPath mtmp=new TestMultiPath();
+		mtmp.getInitiatorRoles().add(role);
+		mtmp.setStrictScope(true);
+		mtmp.setMutuallyExclusivePaths(true);
+		maindefn.getBlock().getContents().add(mtmp);
+
+		TestMultiPath rtmp=new TestMultiPath();
+		rtmp.getInitiatorRoles().add(role);
+		rtmp.setStrictScope(true);
+		rtmp.setMutuallyExclusivePaths(true);
+		refdefn.getBlock().getContents().add(rtmp);
+		
+		TestBehaviour1 mtb2_1=new TestBehaviour1();
+		TestBehaviour1 rtb2_1=new TestBehaviour1();
+		
+		mtb2_1.setMatchWith(rtb2_1);
+		
+		Block bmtb2_1=new Block();
+		bmtb2_1.getContents().add(mtb2_1);
+		
+		Block brtb2_1=new Block();
+		brtb2_1.getContents().add(rtb2_1);
+		
+		mtmp.getPaths().add(bmtb2_1);
+		rtmp.getPaths().add(brtb2_1);
+		
+		//TestBehaviour1 mtb2_2=new TestBehaviour1();
+		TestBehaviour1 rtb2_2=new TestBehaviour1();
+		
+		//mtb2_2.setMatchWith(rtb2_2);
+		
+		//Block bmtb2_2=new Block();
+		//bmtb2_2.getContents().add(mtb2_2);
+		
+		Block brtb2_2=new Block();
+		brtb2_2.getContents().add(rtb2_2);
+		
+		//mtmp.getPaths().add(bmtb2_2);
+		rtmp.getPaths().add(brtb2_2);
+		
+		TestBehaviour1 mtb2_3=new TestBehaviour1();
+		TestBehaviour1 rtb2_3=new TestBehaviour1();
+		
+		mtb2_3.setMatchWith(rtb2_3);
+		
+		Block bmtb2_3=new Block();
+		bmtb2_3.getContents().add(mtb2_3);
+		
+		Block brtb2_3=new Block();
+		brtb2_3.getContents().add(rtb2_3);
+		
+		mtmp.getPaths().add(bmtb2_3);
+		rtmp.getPaths().add(brtb2_3);
+		
+		mainList.visit(mtmp);
+		refList.visit(rtmp);
+
+		ErrorRecorder l=new ErrorRecorder();
+		
+		/*
+		l.addExpectedError(java.util.PropertyResourceBundle.getBundle(
+				"org.scribble.conformance.comparator.Messages").
+					getString("_ADDITIONAL_UNMATCHED_REF_PATHS"));
+		*/
+		
+		BehaviourListComparatorRule rule=new BehaviourListComparatorRule();
+		
+		if (rule.compare(context, mainList, refList, l, true) == false) {
+			fail("Comparison should NOT have failed");
+		}
+		
+		if (l.isValid() == false) {
+			fail(l.invalidMessage());
+		}
+	}
+
+	// TODO: Test insertion/deletion numbers
+}

Added: tools/eclipse/trunk/plugins/org.scribble.conformance/src/test/org/scribble/conformance/comparator/TestBehaviour1ComparatorRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conformance/src/test/org/scribble/conformance/comparator/TestBehaviour1ComparatorRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conformance/src/test/org/scribble/conformance/comparator/TestBehaviour1ComparatorRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,59 @@
+/*
+ * Copyright 2005-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 14 Jul 2008 : Initial version created by gary
+ */
+package org.scribble.conformance.comparator;
+
+import org.scribble.comparator.ComparatorContext;
+import org.scribble.conformance.model.TestBehaviour1;
+import org.scribble.model.ModelObject;
+import org.scribble.model.admin.ModelIssue;
+import org.scribble.model.admin.ModelListener;
+
+public class TestBehaviour1ComparatorRule implements org.scribble.comparator.ComparatorRule {
+
+	public static final String TEST_BEHAVIOUR_COMPARE_FAILED = "Test behaviour compare failed";
+	public static final String TEST_REF = "TEST_REF";
+
+	public boolean compare(ComparatorContext context, ModelObject main,
+			ModelObject reference, ModelListener l, boolean deep) {
+		boolean ret=false;
+		
+		TestBehaviour1 maintb=(TestBehaviour1)main;
+		TestBehaviour1 reftb=(TestBehaviour1)reference;
+		
+		ret = maintb.matchWith(reftb);
+		
+		if (ret == false) {
+			java.util.Map<String,Object> props=new java.util.HashMap<String,Object>();
+			props.put(TEST_REF, reftb);
+			l.error(new ModelIssue(main, TEST_BEHAVIOUR_COMPARE_FAILED, props));
+		}
+		
+		return(ret);
+	}
+
+	public boolean isComparisonSupported(ModelObject main, ModelObject ref) {
+		return(main instanceof TestBehaviour1 &&
+				ref instanceof TestBehaviour1);
+	}
+
+	public boolean isTypeSupported(ModelObject obj) {
+		return(obj instanceof TestBehaviour1);
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.conformance/src/test/org/scribble/conformance/comparator/TestBehaviour2ComparatorRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conformance/src/test/org/scribble/conformance/comparator/TestBehaviour2ComparatorRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conformance/src/test/org/scribble/conformance/comparator/TestBehaviour2ComparatorRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,59 @@
+/*
+ * Copyright 2005-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 14 Jul 2008 : Initial version created by gary
+ */
+package org.scribble.conformance.comparator;
+
+import org.scribble.comparator.ComparatorContext;
+import org.scribble.conformance.model.TestBehaviour2;
+import org.scribble.model.ModelObject;
+import org.scribble.model.admin.ModelIssue;
+import org.scribble.model.admin.ModelListener;
+
+public class TestBehaviour2ComparatorRule implements org.scribble.comparator.ComparatorRule {
+
+	public static final String TEST_BEHAVIOUR_COMPARE_FAILED = "Test behaviour compare failed";
+	public static final String TEST_REF = "TEST_REF";
+
+	public boolean compare(ComparatorContext context, ModelObject main,
+			ModelObject reference, ModelListener l, boolean deep) {
+		boolean ret=false;
+		
+		TestBehaviour2 maintb=(TestBehaviour2)main;
+		TestBehaviour2 reftb=(TestBehaviour2)reference;
+		
+		ret = maintb.matchWith(reftb);
+		
+		if (ret == false) {
+			java.util.Map<String,Object> props=new java.util.HashMap<String,Object>();
+			props.put(TEST_REF, reftb);
+			l.error(new ModelIssue(main, TEST_BEHAVIOUR_COMPARE_FAILED, props));
+		}
+		
+		return(ret);
+	}
+
+	public boolean isComparisonSupported(ModelObject main, ModelObject ref) {
+		return(main instanceof TestBehaviour2 &&
+				ref instanceof TestBehaviour2);
+	}
+
+	public boolean isTypeSupported(ModelObject obj) {
+		return(obj instanceof TestBehaviour2);
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.conformance/src/test/org/scribble/conformance/comparator/TestMultiPathComparatorRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conformance/src/test/org/scribble/conformance/comparator/TestMultiPathComparatorRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conformance/src/test/org/scribble/conformance/comparator/TestMultiPathComparatorRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,43 @@
+/*
+ * Copyright 2005-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 19 Jul 2008 : Initial version created by gary
+ */
+package org.scribble.conformance.comparator;
+
+import org.scribble.comparator.ComparatorContext;
+import org.scribble.conformance.model.TestMultiPath;
+import org.scribble.model.ModelObject;
+import org.scribble.model.admin.ModelListener;
+
+public class TestMultiPathComparatorRule implements org.scribble.comparator.ComparatorRule {
+
+	public boolean compare(ComparatorContext context, ModelObject main,
+			ModelObject reference, ModelListener l, boolean deep) {
+		boolean ret=true;
+		return(ret);
+	}
+
+	public boolean isComparisonSupported(ModelObject main, ModelObject ref) {
+		return(main instanceof TestMultiPath &&
+				ref instanceof TestMultiPath);
+	}
+
+	public boolean isTypeSupported(ModelObject obj) {
+		return(obj instanceof TestMultiPath);
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.conformance/src/test/org/scribble/conformance/comparator/TestSinglePathComparatorRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conformance/src/test/org/scribble/conformance/comparator/TestSinglePathComparatorRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conformance/src/test/org/scribble/conformance/comparator/TestSinglePathComparatorRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,43 @@
+/*
+ * Copyright 2005-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 19 Jul 2008 : Initial version created by gary
+ */
+package org.scribble.conformance.comparator;
+
+import org.scribble.comparator.ComparatorContext;
+import org.scribble.conformance.model.TestSinglePath;
+import org.scribble.model.ModelObject;
+import org.scribble.model.admin.ModelListener;
+
+public class TestSinglePathComparatorRule implements org.scribble.comparator.ComparatorRule {
+
+	public boolean compare(ComparatorContext context, ModelObject main,
+			ModelObject reference, ModelListener l, boolean deep) {
+		boolean ret=true;
+		return(ret);
+	}
+
+	public boolean isComparisonSupported(ModelObject main, ModelObject ref) {
+		return(main instanceof TestSinglePath &&
+				ref instanceof TestSinglePath);
+	}
+
+	public boolean isTypeSupported(ModelObject obj) {
+		return(obj instanceof TestSinglePath);
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.conformance/src/test/org/scribble/conformance/model/BehaviourListTest.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conformance/src/test/org/scribble/conformance/model/BehaviourListTest.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conformance/src/test/org/scribble/conformance/model/BehaviourListTest.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,189 @@
+/*
+ * Copyright 2005-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 20 Aug 2008 : Initial version created by gary
+ */
+package org.scribble.conformance.model;
+
+import junit.framework.TestCase;
+
+public class BehaviourListTest extends TestCase {
+
+	public void testBehaviourListSingleBehaviour() {
+		
+		TestBehaviour1 b1=new TestBehaviour1();
+		
+		org.scribble.model.Block group=new org.scribble.model.Block();
+		group.getContents().add(b1);
+		
+		BehaviourList bl=new BehaviourList(group);
+		
+		if (bl.getBehaviourList().size() != 1) {
+			fail("Expecting 1 behaviour, but got: "+bl.getBehaviourList().size());
+		}
+		
+		if (bl.getBehaviourList().get(0) != b1) {
+			fail("Behaviour not expected");
+		}
+	}
+
+	public void testBehaviourListMultipleBehaviours() {
+		
+		TestBehaviour1 b1=new TestBehaviour1();
+		TestBehaviour1 b2=new TestBehaviour1();
+		TestBehaviour1 b3=new TestBehaviour1();
+		TestBehaviour1 b4=new TestBehaviour1();
+		
+		org.scribble.model.Block group=new org.scribble.model.Block();
+		group.getContents().add(b1);
+		group.getContents().add(b2);
+		group.getContents().add(b3);
+		group.getContents().add(b4);
+		
+		BehaviourList bl=new BehaviourList(group);
+		
+		if (bl.getBehaviourList().size() != 4) {
+			fail("Expecting 4 behaviours, but got: "+bl.getBehaviourList().size());
+		}
+		
+		if (bl.getBehaviourList().get(0) != b1) {
+			fail("Behaviour 1 not expected");
+		}
+		
+		if (bl.getBehaviourList().get(1) != b2) {
+			fail("Behaviour 2 not expected");
+		}
+		
+		if (bl.getBehaviourList().get(2) != b3) {
+			fail("Behaviour 3 not expected");
+		}
+		
+		if (bl.getBehaviourList().get(3) != b4) {
+			fail("Behaviour 4 not expected");
+		}
+	}
+
+	public void testBehaviourListSyncComposition() {
+		
+		TestBehaviour1 b1=new TestBehaviour1();
+		TestBehaviour1 b2=new TestBehaviour1();
+		TestBehaviour1 b3=new TestBehaviour1();
+		TestBehaviour1 b4=new TestBehaviour1();
+		
+		org.scribble.model.Block group=new org.scribble.model.Block();
+		group.getContents().add(b1);
+		
+		TestModelInclude mi=new TestModelInclude(false);
+		
+		mi.getDefinition().getBlock().getContents().add(b2);
+		mi.getDefinition().getBlock().getContents().add(b3);
+		
+		group.getContents().add(mi);
+		
+		group.getContents().add(b4);
+		
+		BehaviourList bl=new BehaviourList(group);
+		
+		if (bl.getBehaviourList().size() != 3) {
+			fail("Expecting 3 behaviours, but got: "+bl.getBehaviourList().size());
+		}
+		
+		if (bl.getBehaviourList().get(0) != b1) {
+			fail("Behaviour 1 not expected");
+		}
+		
+		if ((bl.getBehaviourList().get(1) instanceof BehaviourList) == false) {
+			fail("Second element not a behaviour list");
+		}
+		
+		BehaviourList sublist=(BehaviourList)bl.getBehaviourList().get(1);
+	
+		if (sublist.getBehaviourList().size() != 2) {
+			fail("Expecting 2 sub behaviours, but got: "+sublist.getBehaviourList().size());
+		}
+		
+		if (sublist.getBehaviourList().get(0) != b2) {
+			fail("Behaviour 2 not expected");
+		}
+		
+		if (sublist.getBehaviourList().get(1) != b3) {
+			fail("Behaviour 3 not expected");
+		}
+		
+		if (bl.getBehaviourList().get(2) != b4) {
+			fail("Behaviour 4 not expected");
+		}
+	}
+
+	public void testBehaviourListAsyncComposition() {
+		
+		TestBehaviour1 b1=new TestBehaviour1();
+		TestBehaviour1 b2=new TestBehaviour1();
+		TestBehaviour1 b3=new TestBehaviour1();
+		TestBehaviour1 b4=new TestBehaviour1();
+		
+		org.scribble.model.Block group=new org.scribble.model.Block();
+		group.getContents().add(b1);
+		
+		TestModelInclude mi=new TestModelInclude(true);
+		
+		mi.getDefinition().getBlock().getContents().add(b2);
+		mi.getDefinition().getBlock().getContents().add(b3);
+		
+		group.getContents().add(mi);
+		
+		group.getContents().add(b4);
+		
+		BehaviourList bl=new BehaviourList(group);
+		
+		if (bl.getBehaviourList().size() != 3) {
+			fail("Expecting 3 behaviours, but got: "+bl.getBehaviourList().size());
+		}
+		
+		if (bl.getBehaviourList().get(0) != b1) {
+			fail("Behaviour 1 not expected");
+		}
+		
+		if ((bl.getBehaviourList().get(1) instanceof BehaviourListPaths) == false) {
+			fail("Second element not a BehaviourListPaths");
+		}
+		
+		BehaviourListPaths blp=(BehaviourListPaths)bl.getBehaviourList().get(1);
+	
+		if (blp.getPaths().size() != 1) {
+			fail("Only 1 path expected, but got: "+blp.getPaths().size());
+		}
+		
+		BehaviourList sublist=blp.getPaths().get(0);
+		
+		if (sublist.getBehaviourList().size() != 2) {
+			fail("Expecting 2 sub behaviours, but got: "+sublist.getBehaviourList().size());
+		}
+		
+		if (sublist.getBehaviourList().get(0) != b2) {
+			fail("Behaviour 2 not expected");
+		}
+		
+		if (sublist.getBehaviourList().get(1) != b3) {
+			fail("Behaviour 3 not expected");
+		}
+		
+		if (bl.getBehaviourList().get(2) != b4) {
+			fail("Behaviour 4 not expected");
+		}
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.conformance/src/test/org/scribble/conformance/model/TestBehaviour1.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conformance/src/test/org/scribble/conformance/model/TestBehaviour1.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conformance/src/test/org/scribble/conformance/model/TestBehaviour1.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,35 @@
+/*
+ * Copyright 2005-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 14 Jul 2008 : Initial version created by gary
+ */
+package org.scribble.conformance.model;
+
+import org.scribble.model.ModelObject;
+
+public class TestBehaviour1 extends org.scribble.model.Behaviour {
+
+	public boolean matchWith(ModelObject obj) {
+		return(obj == m_matchWith);
+	}
+	
+	public void setMatchWith(ModelObject obj) {
+		m_matchWith = obj;
+	}
+	
+	private ModelObject m_matchWith=null;
+}

Added: tools/eclipse/trunk/plugins/org.scribble.conformance/src/test/org/scribble/conformance/model/TestBehaviour2.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conformance/src/test/org/scribble/conformance/model/TestBehaviour2.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conformance/src/test/org/scribble/conformance/model/TestBehaviour2.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,35 @@
+/*
+ * Copyright 2005-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 19 Jul 2008 : Initial version created by gary
+ */
+package org.scribble.conformance.model;
+
+import org.scribble.model.ModelObject;
+
+public class TestBehaviour2 extends org.scribble.model.Behaviour {
+
+	public boolean matchWith(ModelObject obj) {
+		return(obj == m_matchWith);
+	}
+	
+	public void setMatchWith(ModelObject obj) {
+		m_matchWith = obj;
+	}
+	
+	private ModelObject m_matchWith=null;
+}

Added: tools/eclipse/trunk/plugins/org.scribble.conformance/src/test/org/scribble/conformance/model/TestBehaviourList.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conformance/src/test/org/scribble/conformance/model/TestBehaviourList.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conformance/src/test/org/scribble/conformance/model/TestBehaviourList.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,24 @@
+/*
+ * Copyright 2005-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 20 Aug 2008 : Initial version created by gary
+ */
+package org.scribble.conformance.model;
+
+public class TestBehaviourList extends BehaviourList {
+
+}

Added: tools/eclipse/trunk/plugins/org.scribble.conformance/src/test/org/scribble/conformance/model/TestDefinition.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conformance/src/test/org/scribble/conformance/model/TestDefinition.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conformance/src/test/org/scribble/conformance/model/TestDefinition.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,37 @@
+/*
+ * Copyright 2005-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 20 Aug 2008 : Initial version created by gary
+ */
+package org.scribble.conformance.model;
+
+import org.scribble.model.Declaration;
+
+public class TestDefinition extends org.scribble.model.Definition {
+
+	/**
+	 * This method return the top level declarations associated
+	 * with the definition.
+	 * 
+	 * @return The declarations
+	 */
+	public java.util.Set<Declaration> getDeclarations() {
+		java.util.Set<Declaration> ret=new java.util.HashSet<Declaration>();
+		
+		return(ret);
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.conformance/src/test/org/scribble/conformance/model/TestModelInclude.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conformance/src/test/org/scribble/conformance/model/TestModelInclude.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conformance/src/test/org/scribble/conformance/model/TestModelInclude.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,48 @@
+/*
+ * Copyright 2005-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 20 Aug 2008 : Initial version created by gary
+ */
+package org.scribble.conformance.model;
+
+import org.scribble.model.*;
+
+public class TestModelInclude extends ModelInclude {
+
+	public TestModelInclude(boolean async) {
+		m_async = async;
+	}
+	
+	@Override
+	public Definition getDefinition() {
+		return(m_definition);
+	}
+
+	@Override
+	public ModelReference getReference() {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	@Override
+	public boolean isAsynchronous() {
+		return(m_async);
+	}
+
+	private boolean m_async=false;
+	private Definition m_definition=new TestDefinition();
+}

Added: tools/eclipse/trunk/plugins/org.scribble.conformance/src/test/org/scribble/conformance/model/TestMultiPath.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conformance/src/test/org/scribble/conformance/model/TestMultiPath.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conformance/src/test/org/scribble/conformance/model/TestMultiPath.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,77 @@
+/*
+ * Copyright 2005-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 19 Jul 2008 : Initial version created by gary
+ */
+package org.scribble.conformance.model;
+
+import java.util.List;
+
+import org.scribble.model.Block;
+import org.scribble.model.OrderingConstraint;
+import org.scribble.model.Role;
+
+public class TestMultiPath extends org.scribble.model.MultiPathBehaviour {
+
+	@Override
+	public java.util.List<Role> getInitiatorRoles() {
+		return(m_initiatorRoles);
+	}
+	
+	public List<Block> getPaths() {
+		return(m_paths);
+	}
+
+	public Block createNewPath() {
+		Block ret=null;
+		
+		return(ret);
+	}
+	
+	public boolean removePath(Block path) {
+		boolean ret=false;
+		
+		return(ret);
+	}
+	
+	public boolean isStrictScope() {
+		return(m_strictScope);
+	}
+	
+	public void setStrictScope(boolean strict) {
+		m_strictScope = strict;
+	}
+
+	public boolean isMutuallyExclusivePaths() {
+		return(m_mutuallyExclusivePaths);
+	}
+	
+	public void setMutuallyExclusivePaths(boolean me) {
+		m_mutuallyExclusivePaths = me;
+	}
+	
+	public OrderingConstraint getOrdering() {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	private boolean m_strictScope=false;
+	private boolean m_mutuallyExclusivePaths=false;
+	private List<Block> m_paths=new java.util.Vector<Block>();
+	private java.util.List<Role> m_initiatorRoles=
+		new java.util.Vector<Role>();
+}

Added: tools/eclipse/trunk/plugins/org.scribble.conformance/src/test/org/scribble/conformance/model/TestSinglePath.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conformance/src/test/org/scribble/conformance/model/TestSinglePath.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conformance/src/test/org/scribble/conformance/model/TestSinglePath.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,75 @@
+/*
+ * Copyright 2005-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 19 Jul 2008 : Initial version created by gary
+ */
+package org.scribble.conformance.model;
+
+import org.scribble.model.Block;
+import org.scribble.model.Role;
+
+public class TestSinglePath extends org.scribble.model.SinglePathBehaviour {
+
+	@Override
+	public java.util.List<Role> getInitiatorRoles() {
+		return(m_initiatorRoles);
+	}
+	
+	public Block getBlock() {
+		return(m_block);
+	}
+
+	public boolean isStrictScope() {
+		return(m_strictScope);
+	}
+	
+	public void setStrictScope(boolean strict) {
+		m_strictScope = strict;
+	}
+
+	public void setConditional(boolean conditional) {
+		m_conditional = conditional;
+	}
+	
+	public boolean isConditional() {
+		return(m_conditional);
+	}
+	
+	public boolean isGroupingConstruct() {
+		return(m_groupingConstruct);
+	}
+	
+	public void setGroupingConstruct(boolean b) {
+		m_groupingConstruct = b; 
+	}
+
+	public boolean isRepetition() {
+		return(m_repetition);
+	}
+	
+	public void setRepetition(boolean b) {
+		m_repetition = b; 
+	}
+
+	private boolean m_conditional=false;
+	private boolean m_repetition=false;
+	private boolean m_strictScope=false;
+	private boolean m_groupingConstruct=true;
+	private Block m_block=new Block();
+	private java.util.List<Role> m_initiatorRoles=
+					new java.util.Vector<Role>();
+}

Added: tools/eclipse/trunk/plugins/org.scribble.contract.model/.classpath
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.contract.model/.classpath	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.contract.model/.classpath	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+	<classpathentry kind="src" path="src/java"/>
+	<classpathentry kind="output" path="classes"/>
+</classpath>

Added: tools/eclipse/trunk/plugins/org.scribble.contract.model/.project
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.contract.model/.project	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.contract.model/.project	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>org.scribble.contract.model</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.ManifestBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.SchemaBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.pde.PluginNature</nature>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+	</natures>
+</projectDescription>

Added: tools/eclipse/trunk/plugins/org.scribble.contract.model/LICENSE.txt
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.contract.model/LICENSE.txt	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.contract.model/LICENSE.txt	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,201 @@
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.

Added: tools/eclipse/trunk/plugins/org.scribble.contract.model/META-INF/MANIFEST.MF
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.contract.model/META-INF/MANIFEST.MF	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.contract.model/META-INF/MANIFEST.MF	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,11 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Scribble Contract Model
+Bundle-SymbolicName: org.scribble.contract.model
+Bundle-Version: 0.1.0.qualifier
+Bundle-Activator: org.scribble.contract.model.osgi.Activator
+Bundle-Vendor: www.scribble.org
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Import-Package: org.osgi.framework;version="1.3.0"
+Require-Bundle: org.scribble.core;bundle-version="0.1.0"
+Export-Package: org.scribble.contract.model

Added: tools/eclipse/trunk/plugins/org.scribble.contract.model/build.properties
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.contract.model/build.properties	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.contract.model/build.properties	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,4 @@
+source.. = src/java/
+output.. = classes/
+bin.includes = META-INF/,\
+               .

Added: tools/eclipse/trunk/plugins/org.scribble.contract.model/classes/org/scribble/contract/model/Contract.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.contract.model/classes/org/scribble/contract/model/Contract.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.contract.model/classes/org/scribble/contract/model/FaultDetails.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.contract.model/classes/org/scribble/contract/model/FaultDetails.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.contract.model/classes/org/scribble/contract/model/Interface.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.contract.model/classes/org/scribble/contract/model/Interface.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.contract.model/classes/org/scribble/contract/model/MessageExchangePattern.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.contract.model/classes/org/scribble/contract/model/MessageExchangePattern.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.contract.model/classes/org/scribble/contract/model/Namespace.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.contract.model/classes/org/scribble/contract/model/Namespace.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.contract.model/classes/org/scribble/contract/model/OneWayRequestMEP.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.contract.model/classes/org/scribble/contract/model/OneWayRequestMEP.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.contract.model/classes/org/scribble/contract/model/RequestResponseMEP.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.contract.model/classes/org/scribble/contract/model/RequestResponseMEP.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.contract.model/classes/org/scribble/contract/model/osgi/Activator.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.contract.model/classes/org/scribble/contract/model/osgi/Activator.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.contract.model/src/java/org/scribble/contract/model/Contract.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.contract.model/src/java/org/scribble/contract/model/Contract.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.contract.model/src/java/org/scribble/contract/model/Contract.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,106 @@
+/*
+ * Copyright 2007-9 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 25 Sept 2009 : Initial version created by gary
+ */
+package org.scribble.contract.model;
+
+import org.scribble.model.ContainmentList;
+import org.scribble.model.ModelObject;
+import org.scribble.model.Reference;
+
+/**
+ * This class represents the contract.
+ */
+public class Contract extends ModelObject {
+	
+	private static final long serialVersionUID = 1826808390992159186L;
+
+	/**
+	 * The default constructor.
+	 */
+	public Contract() {
+	}
+	
+	/**
+	 * This method returns the name associated with the
+	 * contract.
+	 * 
+	 * @return The name
+	 */
+	public String getName() {
+		return(m_name);
+	}
+	
+	/**
+	 * This method sets the name of the contract.
+	 * 
+	 * @param name The name
+	 */
+	public void setName(String name) {
+		m_name = name;
+	}
+	
+	/**
+	 * This method returns the namespace associated with the
+	 * contract.
+	 * 
+	 * @return The namespace
+	 */
+	public String getNamespace() {
+		return(m_namespace);
+	}
+	
+	/**
+	 * This method sets the namespace of the contract.
+	 * 
+	 * @param namespace The namespace
+	 */
+	public void setNamespace(String namespace) {
+		m_namespace = namespace;
+	}
+	
+	/**
+	 * This method returns the list of interfaces.
+	 * 
+	 * @return The list of interfaces
+	 */
+	@Reference(containment=true)
+	public java.util.List<Interface> getInterfaces() {
+		return(m_interfaces);
+	}
+	
+	/**
+	 * This method returns the list of namespaces.
+	 * If a namespace is used in the contract that does
+	 * not exist in this list, then a dynamic prefix should
+	 * be created for the namespace.
+	 * 
+	 * @return The list of namespaces
+	 */
+	@Reference(containment=true)
+	public java.util.List<Namespace> getNamespaces() {
+		return(m_namespaces);
+	}
+	
+	private String m_name=null;
+	private String m_namespace=null;
+	private java.util.List<Interface> m_interfaces=
+			new ContainmentList<Interface>(this, Interface.class);
+	private java.util.List<Namespace> m_namespaces=
+			new java.util.Vector<Namespace>();
+}

Added: tools/eclipse/trunk/plugins/org.scribble.contract.model/src/java/org/scribble/contract/model/FaultDetails.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.contract.model/src/java/org/scribble/contract/model/FaultDetails.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.contract.model/src/java/org/scribble/contract/model/FaultDetails.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,92 @@
+/*
+ * Copyright 2007-9 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 25 Sept 2009 : Initial version created by gary
+ */
+package org.scribble.contract.model;
+
+import org.scribble.model.ContainmentList;
+import org.scribble.model.ModelObject;
+import org.scribble.model.Reference;
+import org.scribble.model.TypeReference;
+
+/**
+ * This class represents the fault details.
+ */
+public class FaultDetails extends ModelObject {
+	
+	private static final long serialVersionUID = 3197411493758826511L;
+
+	/**
+	 * The default constructor.
+	 */
+	public FaultDetails() {
+	}
+	
+	/**
+	 * This method returns the name associated with the
+	 * fault.
+	 * 
+	 * @return The name
+	 */
+	public String getName() {
+		return(m_name);
+	}
+	
+	/**
+	 * This method sets the name of the fault.
+	 * 
+	 * @param name The name
+	 */
+	public void setName(String name) {
+		m_name = name;
+	}
+	
+	/**
+	 * This method returns the namespace associated with the
+	 * fault.
+	 * 
+	 * @return The namespace
+	 */
+	public String getNamespace() {
+		return(m_namespace);
+	}
+	
+	/**
+	 * This method sets the namespace of the fault.
+	 * 
+	 * @param namespace The namespace
+	 */
+	public void setNamespace(String namespace) {
+		m_namespace = namespace;
+	}
+	
+	/**
+	 * This method returns the list of type references.
+	 * 
+	 * @return The list of type references
+	 */
+	@Reference(containment=true)
+	public java.util.List<TypeReference> getTypes() {
+		return(m_types);
+	}
+	
+	private String m_name=null;
+	private String m_namespace=null;
+	private java.util.List<TypeReference> m_types=
+			new ContainmentList<TypeReference>(this, TypeReference.class);	
+}

Added: tools/eclipse/trunk/plugins/org.scribble.contract.model/src/java/org/scribble/contract/model/Interface.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.contract.model/src/java/org/scribble/contract/model/Interface.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.contract.model/src/java/org/scribble/contract/model/Interface.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,92 @@
+/*
+ * Copyright 2007-9 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 26 Sept 2009 : Initial version created by gary
+ */
+package org.scribble.contract.model;
+
+import org.scribble.model.ContainmentList;
+import org.scribble.model.ModelObject;
+import org.scribble.model.Reference;
+
+/**
+ * This class represents an interface, as part of a contract.
+ *
+ */
+public class Interface extends ModelObject {
+
+	private static final long serialVersionUID = -5867002445215817481L;
+
+	/**
+	 * The default constructor.
+	 */
+	public Interface() {
+	}
+
+	/**
+	 * This method returns the name associated with the
+	 * interface.
+	 * 
+	 * @return The name
+	 */
+	public String getName() {
+		return(m_name);
+	}
+	
+	/**
+	 * This method sets the name of the interface.
+	 * 
+	 * @param name The name
+	 */
+	public void setName(String name) {
+		m_name = name;
+	}
+	
+	/**
+	 * This method returns the namespace associated with the
+	 * interface.
+	 * 
+	 * @return The namespace
+	 */
+	public String getNamespace() {
+		return(m_namespace);
+	}
+	
+	/**
+	 * This method sets the namespace of the interface.
+	 * 
+	 * @param namespace The namespace
+	 */
+	public void setNamespace(String namespace) {
+		m_namespace = namespace;
+	}
+	
+	/**
+	 * This method returns the list of message exchange patterns.
+	 * 
+	 * @return The list of message exchange patterns
+	 */
+	@Reference(containment=true)
+	public java.util.List<MessageExchangePattern> getMessageExchangePatterns() {
+		return(m_messageExchangePatterns);
+	}
+	
+	private String m_name=null;
+	private String m_namespace=null;
+	private java.util.List<MessageExchangePattern> m_messageExchangePatterns=
+			new ContainmentList<MessageExchangePattern>(this, MessageExchangePattern.class);
+}

Added: tools/eclipse/trunk/plugins/org.scribble.contract.model/src/java/org/scribble/contract/model/MessageExchangePattern.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.contract.model/src/java/org/scribble/contract/model/MessageExchangePattern.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.contract.model/src/java/org/scribble/contract/model/MessageExchangePattern.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,73 @@
+/*
+ * Copyright 2007-9 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 25 Sept 2009 : Initial version created by gary
+ */
+package org.scribble.contract.model;
+
+import org.scribble.model.ContainmentList;
+import org.scribble.model.ModelObject;
+import org.scribble.model.Reference;
+import org.scribble.model.TypeReference;
+
+/**
+ * This class represents the message exchange pattern.
+ */
+public abstract class MessageExchangePattern extends ModelObject {
+	
+	private static final long serialVersionUID = 6024134205644784735L;
+
+	/**
+	 * The default constructor.
+	 */
+	public MessageExchangePattern() {
+	}
+	
+	/**
+	 * This method returns the optional operation.
+	 * 
+	 * @return The optional operation
+	 */
+	public String getOperation() {
+		return(m_operation);
+	}
+	
+	/**
+	 * This method sets the operation.
+	 * 
+	 * @param operation The operation
+	 */
+	public void setOperation(String operation) {
+		m_operation = operation;
+	}
+	
+	/**
+	 * This method returns the list of type references. If
+	 * no operation is defined, then only one type reference
+	 * should be defined.
+	 * 
+	 * @return The list of type references
+	 */
+	@Reference(containment=true)
+	public java.util.List<TypeReference> getTypes() {
+		return(m_types);
+	}
+	
+	private String m_operation=null;
+	private java.util.List<TypeReference> m_types=
+			new ContainmentList<TypeReference>(this, TypeReference.class);	
+}

Added: tools/eclipse/trunk/plugins/org.scribble.contract.model/src/java/org/scribble/contract/model/Namespace.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.contract.model/src/java/org/scribble/contract/model/Namespace.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.contract.model/src/java/org/scribble/contract/model/Namespace.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,97 @@
+/*
+ * Copyright 2007-9 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 10 October 2009 : Initial version created by gary
+ */
+package org.scribble.contract.model;
+
+import org.scribble.model.ModelObject;
+
+/**
+ * This class represents the namespace.
+ */
+public class Namespace extends ModelObject {
+	
+	private static final long serialVersionUID = -2756456243428682166L;
+
+	/**
+	 * The default constructor.
+	 */
+	public Namespace() {
+	}
+	
+	/**
+	 * This method returns the prefix associated with the
+	 * prefix.
+	 * 
+	 * @return The name
+	 */
+	public String getPrefix() {
+		return(m_prefix);
+	}
+	
+	/**
+	 * This method sets the prefix of the namespace.
+	 * 
+	 * @param prefix The prefix
+	 */
+	public void setPrefix(String prefix) {
+		m_prefix = prefix;
+	}
+	
+	/**
+	 * This method returns the URI associated with the
+	 * namespace.
+	 * 
+	 * @return The URI
+	 */
+	public String getURI() {
+		return(m_uri);
+	}
+	
+	/**
+	 * This method sets the URI of the namespace.
+	 * 
+	 * @param uri The URI
+	 */
+	public void setURI(String uri) {
+		m_uri = uri;
+	}
+	
+	/**
+	 * This method returns the schema location associated with the
+	 * namespace.
+	 * 
+	 * @return The URI
+	 */
+	public String getSchemaLocation() {
+		return(m_schemaLocation);
+	}
+	
+	/**
+	 * This method sets the schema location of the namespace.
+	 * 
+	 * @param schemaLocation The optional schema location
+	 */
+	public void setSchemaLocation(String schemaLocation) {
+		m_schemaLocation = schemaLocation;
+	}
+	
+	private String m_prefix=null;
+	private String m_uri=null;
+	private String m_schemaLocation=null;
+}

Added: tools/eclipse/trunk/plugins/org.scribble.contract.model/src/java/org/scribble/contract/model/OneWayRequestMEP.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.contract.model/src/java/org/scribble/contract/model/OneWayRequestMEP.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.contract.model/src/java/org/scribble/contract/model/OneWayRequestMEP.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,35 @@
+/*
+ * Copyright 2007-9 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 25 Sept 2009 : Initial version created by gary
+ */
+package org.scribble.contract.model;
+
+/**
+ * This class represents the one-way message exchange pattern.
+ */
+public class OneWayRequestMEP extends MessageExchangePattern {
+	
+	private static final long serialVersionUID = 1798545946621135972L;
+
+	/**
+	 * The default constructor.
+	 */
+	public OneWayRequestMEP() {
+	}
+	
+}

Added: tools/eclipse/trunk/plugins/org.scribble.contract.model/src/java/org/scribble/contract/model/RequestResponseMEP.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.contract.model/src/java/org/scribble/contract/model/RequestResponseMEP.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.contract.model/src/java/org/scribble/contract/model/RequestResponseMEP.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,63 @@
+/*
+ * Copyright 2007-9 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 25 Sept 2009 : Initial version created by gary
+ */
+package org.scribble.contract.model;
+
+import org.scribble.model.ContainmentList;
+import org.scribble.model.Reference;
+import org.scribble.model.TypeReference;
+
+/**
+ * This class represents the request response message exchange pattern.
+ */
+public class RequestResponseMEP extends MessageExchangePattern {
+	
+	private static final long serialVersionUID = -2468151434616043577L;
+
+	/**
+	 * The default constructor.
+	 */
+	public RequestResponseMEP() {
+	}
+	
+	/**
+	 * This method returns the list of response type references.
+	 * 
+	 * @return The list of response type references
+	 */
+	@Reference(containment=true)
+	public java.util.List<TypeReference> getResponseTypes() {
+		return(m_responseTypes);
+	}
+	
+	/**
+	 * This method returns the list of fault details.
+	 * 
+	 * @return The list of fault details
+	 */
+	@Reference(containment=true)
+	public java.util.List<FaultDetails> getFaultDetails() {
+		return(m_faultDetails);
+	}
+	
+	private java.util.List<TypeReference> m_responseTypes=
+			new ContainmentList<TypeReference>(this, TypeReference.class);	
+	private java.util.List<FaultDetails> m_faultDetails=
+			new ContainmentList<FaultDetails>(this, FaultDetails.class);	
+}

Added: tools/eclipse/trunk/plugins/org.scribble.contract.model/src/java/org/scribble/contract/model/osgi/Activator.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.contract.model/src/java/org/scribble/contract/model/osgi/Activator.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.contract.model/src/java/org/scribble/contract/model/osgi/Activator.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,22 @@
+package org.scribble.contract.model.osgi;
+
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+
+public class Activator implements BundleActivator {
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext)
+	 */
+	public void start(BundleContext context) throws Exception {
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext)
+	 */
+	public void stop(BundleContext context) throws Exception {
+	}
+
+}

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/.classpath
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/.classpath	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/.classpath	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="src" path="src/java"/>
+	<classpathentry kind="src" path="src/test"/>
+	<classpathentry kind="src" path="src/plugintest"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/3"/>
+	<classpathentry kind="output" path="classes"/>
+</classpath>

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/.project
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/.project	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/.project	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>org.scribble.conversation.comparator</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.ManifestBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.SchemaBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.pde.PluginNature</nature>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+	</natures>
+</projectDescription>

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/LICENSE.txt
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/LICENSE.txt	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/LICENSE.txt	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,201 @@
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/META-INF/MANIFEST.MF
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/META-INF/MANIFEST.MF	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/META-INF/MANIFEST.MF	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,42 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Scribble Conversation Comparator Plug-in
+Bundle-SymbolicName: org.scribble.conversation.comparator;singleton:=true
+Bundle-Version: 0.1.0.qualifier
+Bundle-Activator: org.scribble.conversation.comparator.osgi.Activator
+Bundle-Vendor: www.scribble.org
+Import-Package: org.osgi.framework;version="1.3.0"
+Require-Bundle: org.scribble.core,
+ org.scribble.conversation.model,
+ org.scribble.conformance,
+ org.scribble.protocol.model,
+ org.eclipse.core.runtime;resolution:=optional,
+ org.junit;resolution:=optional
+Bundle-ActivationPolicy: lazy
+Scribble-Extensions: org.scribble.conversation.comparator.ConversationComparatorRule,
+  org.scribble.conversation.comparator.ConversationModelProtocolModelComparatorRule,
+  org.scribble.conversation.comparator.IfChoiceComparatorRule,
+  org.scribble.conversation.comparator.IfComparatorRule,
+  org.scribble.conversation.comparator.ConditionalBlockComparatorRule,
+  org.scribble.conversation.comparator.ParallelComparatorRule,
+  org.scribble.conversation.comparator.ParallelProtocolParallelComparatorRule,
+  org.scribble.conversation.comparator.SpawnComparatorRule,
+  org.scribble.conversation.comparator.SpawnProtocolSpawnComparatorRule,
+  org.scribble.conversation.comparator.TryEscapeComparatorRule,
+  org.scribble.conversation.comparator.InterruptBlockComparatorRule,
+  org.scribble.conversation.comparator.CatchBlockComparatorRule,
+  org.scribble.conversation.comparator.TryEscapeProtocolComparatorRule,
+  org.scribble.conversation.comparator.InterruptBlockProtocolComparatorRule,
+  org.scribble.conversation.comparator.CatchBlockProtocolComparatorRule,
+  org.scribble.conversation.comparator.RaiseComparatorRule,
+  org.scribble.conversation.comparator.RaiseProtocolComparatorRule,
+  org.scribble.conversation.comparator.WhenChoiceComparatorRule,
+  org.scribble.conversation.comparator.WhenComparatorRule,
+  org.scribble.conversation.comparator.WhileComparatorRule,
+  org.scribble.conversation.comparator.model.transform.ConversationStatelessTransformationRule,
+  org.scribble.conversation.comparator.model.transform.ConversationInteractionStatelessTransformationRule,
+  org.scribble.conversation.comparator.model.transform.WhileStatelessTransformationRule,
+  org.scribble.conversation.comparator.model.transform.ParallelStatelessTransformationRule,
+  org.scribble.conversation.comparator.model.transform.RunStatelessTransformationRule,
+  org.scribble.conversation.comparator.model.transform.SpawnStatelessTransformationRule,
+  org.scribble.conversation.comparator.model.transform.IfStatelessTransformationRule

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/build.properties
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/build.properties	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/build.properties	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,5 @@
+source.. = src/java/
+output.. = classes/
+bin.includes = META-INF/,\
+               .,\
+               plugin.xml

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/classes/org/scribble/conversation/comparator/CatchBlockComparatorRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/classes/org/scribble/conversation/comparator/CatchBlockComparatorRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/classes/org/scribble/conversation/comparator/CatchBlockComparatorRuleTest.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/classes/org/scribble/conversation/comparator/CatchBlockComparatorRuleTest.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/classes/org/scribble/conversation/comparator/CatchBlockProtocolComparatorRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/classes/org/scribble/conversation/comparator/CatchBlockProtocolComparatorRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/classes/org/scribble/conversation/comparator/CatchBlockProtocolComparatorRuleTest.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/classes/org/scribble/conversation/comparator/CatchBlockProtocolComparatorRuleTest.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/classes/org/scribble/conversation/comparator/ConditionalBlockComparatorRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/classes/org/scribble/conversation/comparator/ConditionalBlockComparatorRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/classes/org/scribble/conversation/comparator/ConditionalBlockComparatorRuleTest.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/classes/org/scribble/conversation/comparator/ConditionalBlockComparatorRuleTest.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/classes/org/scribble/conversation/comparator/ConversationComparatorRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/classes/org/scribble/conversation/comparator/ConversationComparatorRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/classes/org/scribble/conversation/comparator/ConversationComparatorRuleTest.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/classes/org/scribble/conversation/comparator/ConversationComparatorRuleTest.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/classes/org/scribble/conversation/comparator/ConversationModelProtocolModelComparatorRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/classes/org/scribble/conversation/comparator/ConversationModelProtocolModelComparatorRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/classes/org/scribble/conversation/comparator/ConversationModelProtocolModelComparatorRuleTest.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/classes/org/scribble/conversation/comparator/ConversationModelProtocolModelComparatorRuleTest.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/classes/org/scribble/conversation/comparator/IfChoiceComparatorRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/classes/org/scribble/conversation/comparator/IfChoiceComparatorRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/classes/org/scribble/conversation/comparator/IfChoiceComparatorRuleTest.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/classes/org/scribble/conversation/comparator/IfChoiceComparatorRuleTest.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/classes/org/scribble/conversation/comparator/IfComparatorRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/classes/org/scribble/conversation/comparator/IfComparatorRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/classes/org/scribble/conversation/comparator/IfComparatorRuleTest.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/classes/org/scribble/conversation/comparator/IfComparatorRuleTest.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/classes/org/scribble/conversation/comparator/InterruptBlockComparatorRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/classes/org/scribble/conversation/comparator/InterruptBlockComparatorRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/classes/org/scribble/conversation/comparator/InterruptBlockComparatorRuleTest.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/classes/org/scribble/conversation/comparator/InterruptBlockComparatorRuleTest.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/classes/org/scribble/conversation/comparator/InterruptBlockProtocolComparatorRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/classes/org/scribble/conversation/comparator/InterruptBlockProtocolComparatorRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/classes/org/scribble/conversation/comparator/InterruptBlockProtocolComparatorRuleTest.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/classes/org/scribble/conversation/comparator/InterruptBlockProtocolComparatorRuleTest.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/classes/org/scribble/conversation/comparator/ParallelComparatorRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/classes/org/scribble/conversation/comparator/ParallelComparatorRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/classes/org/scribble/conversation/comparator/ParallelComparatorRuleTest.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/classes/org/scribble/conversation/comparator/ParallelComparatorRuleTest.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/classes/org/scribble/conversation/comparator/ParallelProtocolParallelComparatorRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/classes/org/scribble/conversation/comparator/ParallelProtocolParallelComparatorRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/classes/org/scribble/conversation/comparator/ParallelProtocolParallelComparatorRuleTest.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/classes/org/scribble/conversation/comparator/ParallelProtocolParallelComparatorRuleTest.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/classes/org/scribble/conversation/comparator/RaiseComparatorRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/classes/org/scribble/conversation/comparator/RaiseComparatorRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/classes/org/scribble/conversation/comparator/RaiseComparatorRuleTest.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/classes/org/scribble/conversation/comparator/RaiseComparatorRuleTest.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/classes/org/scribble/conversation/comparator/RaiseProtocolComparatorRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/classes/org/scribble/conversation/comparator/RaiseProtocolComparatorRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/classes/org/scribble/conversation/comparator/RaiseProtocolComparatorRuleTest.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/classes/org/scribble/conversation/comparator/RaiseProtocolComparatorRuleTest.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/classes/org/scribble/conversation/comparator/SpawnComparatorRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/classes/org/scribble/conversation/comparator/SpawnComparatorRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/classes/org/scribble/conversation/comparator/SpawnProtocolSpawnComparatorRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/classes/org/scribble/conversation/comparator/SpawnProtocolSpawnComparatorRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/classes/org/scribble/conversation/comparator/TryEscapeComparatorRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/classes/org/scribble/conversation/comparator/TryEscapeComparatorRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/classes/org/scribble/conversation/comparator/TryEscapeProtocolComparatorRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/classes/org/scribble/conversation/comparator/TryEscapeProtocolComparatorRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/classes/org/scribble/conversation/comparator/WhenChoiceComparatorRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/classes/org/scribble/conversation/comparator/WhenChoiceComparatorRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/classes/org/scribble/conversation/comparator/WhenComparatorRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/classes/org/scribble/conversation/comparator/WhenComparatorRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/classes/org/scribble/conversation/comparator/WhileComparatorRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/classes/org/scribble/conversation/comparator/WhileComparatorRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/classes/org/scribble/conversation/comparator/model/transform/ConversationInteractionStatelessTransformationRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/classes/org/scribble/conversation/comparator/model/transform/ConversationInteractionStatelessTransformationRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/classes/org/scribble/conversation/comparator/model/transform/ConversationStatelessTransformationRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/classes/org/scribble/conversation/comparator/model/transform/ConversationStatelessTransformationRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/classes/org/scribble/conversation/comparator/model/transform/IfStatelessTransformationRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/classes/org/scribble/conversation/comparator/model/transform/IfStatelessTransformationRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/classes/org/scribble/conversation/comparator/model/transform/ParallelStatelessTransformationRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/classes/org/scribble/conversation/comparator/model/transform/ParallelStatelessTransformationRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/classes/org/scribble/conversation/comparator/model/transform/RunStatelessTransformationRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/classes/org/scribble/conversation/comparator/model/transform/RunStatelessTransformationRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/classes/org/scribble/conversation/comparator/model/transform/SpawnStatelessTransformationRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/classes/org/scribble/conversation/comparator/model/transform/SpawnStatelessTransformationRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/classes/org/scribble/conversation/comparator/model/transform/TransformTest$StatefulToStatelessTest.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/classes/org/scribble/conversation/comparator/model/transform/TransformTest$StatefulToStatelessTest.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/classes/org/scribble/conversation/comparator/model/transform/TransformTest.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/classes/org/scribble/conversation/comparator/model/transform/TransformTest.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/classes/org/scribble/conversation/comparator/model/transform/WhileStatelessTransformationRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/classes/org/scribble/conversation/comparator/model/transform/WhileStatelessTransformationRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/classes/org/scribble/conversation/comparator/model/transform/results/ESBBroker at Broker.scv
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/classes/org/scribble/conversation/comparator/model/transform/results/ESBBroker at Broker.scv	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/classes/org/scribble/conversation/comparator/model/transform/results/ESBBroker at Broker.scv	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,32 @@
+stateless conversation ESBBroker at Broker conforms to savara.samples.LoanBroker at Broker {
+	role	Buyer, SupplierQuoteEngine, Broker, CreditAgency, SupplierTxnProcessor;
+	if {
+		makeEnquiry(enquiry) from Buyer request "makeEnquiry";
+		if @ Broker {
+			getQuote(requestForQuote) to SupplierQuoteEngine request "getQuote";
+		} else {
+		}
+	} else if {
+		getQuote(quote) from SupplierQuoteEngine replyTo "getQuote";
+		if @ Broker {
+			getQuote(requestForQuote) to SupplierQuoteEngine request "getQuote";
+		} else {
+		}
+	} else if {
+		makeEnquiry(quoteList) to Buyer replyTo "makeEnquiry";
+	} else if {
+		buy(buy) from Buyer request "buy";
+		checkCredit(CreditCheckRequest) to CreditAgency request "checkCredit";
+	} else if {
+		checkCredit(CreditCheckOk) from CreditAgency replyTo "checkCredit";
+		confirm(orderConfirmed) to SupplierTxnProcessor request "confirm";
+	} else if {
+		confirm(bookingReference) from SupplierTxnProcessor replyTo "confirm";
+		buy(bookingReference) to Buyer replyTo "buy";
+	} else if {
+		checkCredit(CreditCheckInvalid) from CreditAgency replyTo "checkCredit";
+		buy(orderRejected) to Buyer replyTo "buy";
+	} else if {
+		cancel(cancel) from Buyer;
+	}
+}
\ No newline at end of file

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/classes/org/scribble/conversation/comparator/model/transform/results/InteractionRun1 at R2.scv
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/classes/org/scribble/conversation/comparator/model/transform/results/InteractionRun1 at R2.scv	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/classes/org/scribble/conversation/comparator/model/transform/results/InteractionRun1 at R2.scv	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,10 @@
+stateless conversation Interaction1 at R2 {
+	role	R1;
+	if {
+		M1 from R1;
+		M2 to R1;
+	} else if {
+		M3 from R1;
+		M4 to R1;
+	}
+}
\ No newline at end of file

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/classes/org/scribble/conversation/comparator/model/transform/testmodels/ESBBroker at Broker.scv
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/classes/org/scribble/conversation/comparator/model/transform/testmodels/ESBBroker at Broker.scv	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/classes/org/scribble/conversation/comparator/model/transform/testmodels/ESBBroker at Broker.scv	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,38 @@
+namespace test;
+
+conversation ESBBroker at Broker conforms to savara.samples.LoanBroker at Broker {
+	role	Buyer, CreditAgency, Supplier;
+	makeEnquiry(enquiry) from Buyer request "makeEnquiry";
+	while @ Broker {
+		run RequestForQuote at Broker;
+	}
+	when @ Broker {
+		makeEnquiry(quoteList) to Buyer replyTo "makeEnquiry";
+	}
+	if @ Buyer {
+		run CompleteTransaction at Broker (Buyer for Buyer,CreditAgency for CreditAgency);
+	} else if {
+		cancel(cancel) from Buyer;
+	}
+	conversation CompleteTransaction at Broker {
+		role	SupplierTxnProcessor;
+		role	Buyer, CreditAgency;
+		buy(buy) from Buyer request "buy";
+		checkCredit(CreditCheckRequest) to CreditAgency request "checkCredit";
+		if @ CreditAgency {
+			checkCredit(CreditCheckOk) from CreditAgency replyTo "checkCredit";
+			confirm(orderConfirmed) to SupplierTxnProcessor request "confirm";
+			confirm(bookingReference) from SupplierTxnProcessor replyTo "confirm";
+			buy(bookingReference) to Buyer replyTo "buy";
+		} else if {
+			checkCredit(CreditCheckInvalid) from CreditAgency replyTo "checkCredit";
+			buy(orderRejected) to Buyer replyTo "buy";
+		}
+	}
+	conversation RequestForQuote at Broker {
+		role	SupplierQuoteEngine;
+		role	;
+		getQuote(requestForQuote) to SupplierQuoteEngine request "getQuote";
+		getQuote(quote) from SupplierQuoteEngine replyTo "getQuote";
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/classes/org/scribble/conversation/comparator/model/transform/testmodels/InteractionRun1 at R2.scv
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/classes/org/scribble/conversation/comparator/model/transform/testmodels/InteractionRun1 at R2.scv	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/classes/org/scribble/conversation/comparator/model/transform/testmodels/InteractionRun1 at R2.scv	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,17 @@
+namespace test;
+
+conversation Interaction1 at R2 {
+	role	R1;
+	
+	M1 from R1;
+	M2 to R1;
+	
+	run Sub at R2(R1 for R1);
+	
+	conversation Sub at R2 {
+		role	R1;
+		
+		M3 from R1;
+		M4 to R1;
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/classes/org/scribble/conversation/comparator/osgi/Activator.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/classes/org/scribble/conversation/comparator/osgi/Activator.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/java/org/scribble/conversation/comparator/CatchBlockComparatorRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/java/org/scribble/conversation/comparator/CatchBlockComparatorRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/java/org/scribble/conversation/comparator/CatchBlockComparatorRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,98 @@
+/*
+ * Copyright 2007-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 10 Nov 2008 : Initial version created by gary
+ */
+package org.scribble.conversation.comparator;
+
+import org.scribble.comparator.*;
+import org.scribble.model.*;
+import org.scribble.conversation.model.*;
+import org.scribble.model.admin.ModelListener;
+import org.scribble.extensions.RegistryInfo;
+
+/**
+ * This class provides the CatchBlock comparator rule.
+ */
+ at RegistryInfo(extension=ComparatorRule.class)
+public class CatchBlockComparatorRule implements ComparatorRule {
+
+	/**
+	 * This method determines whether the comparison rule is
+	 * associated with the supplied type.
+	 * 
+	 * @param obj The object to check
+	 * @return Whether the object is of a type supported by the
+	 * 					comparison rule
+	 */
+	public boolean isTypeSupported(ModelObject obj) {
+		return(obj instanceof CatchBlock);
+	}
+	
+	/**
+	 * This method determines whether the comparison rule is
+	 * appropriate for the supplied model objects.
+	 * 
+	 * @param main The main model object to be compared
+	 * @param ref The reference model object to be compared against
+	 * @return Whether the rule is relevant for the
+	 * 				model objects
+	 */
+	public boolean isComparisonSupported(ModelObject main, ModelObject ref) {
+		return(main instanceof CatchBlock &&
+				ref instanceof CatchBlock);
+	}
+	
+	/**
+	 * This method compares a model object against a reference
+	 * component to determine if they are equal.
+	 * 
+	 * @param context The context
+	 * @param main The main model object
+	 * @param reference The reference model object
+	 * @param l The model listener
+	 * @param deep Perform a deep compare
+	 * @return Whether the model objects are comparable
+	 */
+	public boolean compare(ComparatorContext context, ModelObject main,
+					ModelObject reference, ModelListener l, boolean deep) {
+		boolean ret=false;
+		CatchBlock maincb=(CatchBlock)main;
+		CatchBlock refcb=(CatchBlock)reference;
+
+		if (deep == false) {
+			
+			if (maincb.getType() != null &&
+					refcb.getType() != null) {
+				ret = context.compare(maincb.getType(),
+						refcb.getType(), l, deep);
+				
+				// TODO: Check role is appropriate
+				// May depend whether global or local models
+				// If local models, then only matters whether
+				// projected role is either present or absent
+				// in both lists - if global, then may need
+				// to be matched lists
+			} else {
+				ret = true;
+			}
+		}
+		
+		return(ret);
+	}
+	
+}

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/java/org/scribble/conversation/comparator/CatchBlockProtocolComparatorRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/java/org/scribble/conversation/comparator/CatchBlockProtocolComparatorRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/java/org/scribble/conversation/comparator/CatchBlockProtocolComparatorRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,109 @@
+/*
+ * Copyright 2007-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 10 Nov 2008 : Initial version created by gary
+ */
+package org.scribble.conversation.comparator;
+
+import org.scribble.comparator.*;
+import org.scribble.model.*;
+import org.scribble.model.admin.ModelListener;
+import org.scribble.extensions.RegistryInfo;
+
+/**
+ * This class provides the CatchBlock comparator rule.
+ */
+ at RegistryInfo(extension=ComparatorRule.class)
+public class CatchBlockProtocolComparatorRule implements ComparatorRule {
+
+	/**
+	 * This method determines whether the comparison rule is
+	 * associated with the supplied type.
+	 * 
+	 * @param obj The object to check
+	 * @return Whether the object is of a type supported by the
+	 * 					comparison rule
+	 */
+	public boolean isTypeSupported(ModelObject obj) {
+		boolean ret=false;
+
+		try {
+			ret = (obj instanceof org.scribble.conversation.model.CatchBlock ||
+					obj instanceof org.scribble.protocol.model.CatchBlock);
+		} catch(java.lang.Throwable t) {
+			// Ignore
+		}
+		
+		return(ret);
+	}
+	
+	/**
+	 * This method determines whether the comparison rule is
+	 * appropriate for the supplied model objects.
+	 * 
+	 * @param main The main model object to be compared
+	 * @param ref The reference model object to be compared against
+	 * @return Whether the rule is relevant for the
+	 * 				model objects
+	 */
+	public boolean isComparisonSupported(ModelObject main, ModelObject ref) {
+		boolean ret=false;
+
+		try {
+			ret = (main instanceof org.scribble.conversation.model.CatchBlock &&
+					ref instanceof org.scribble.protocol.model.CatchBlock);
+		} catch(java.lang.Throwable t) {
+			// Ignore
+		}
+		
+		return(ret);
+	}
+	
+	/**
+	 * This method compares a model object against a reference
+	 * component to determine if they are equal.
+	 * 
+	 * @param context The context
+	 * @param main The main model object
+	 * @param reference The reference model object
+	 * @param l The model listener
+	 * @param deep Perform a deep compare
+	 * @return Whether the model objects are comparable
+	 */
+	public boolean compare(ComparatorContext context, ModelObject main,
+					ModelObject reference, ModelListener l, boolean deep) {
+		boolean ret=false;
+		org.scribble.conversation.model.CatchBlock maincb=
+			(org.scribble.conversation.model.CatchBlock)main;
+		org.scribble.protocol.model.CatchBlock refcb=
+			(org.scribble.protocol.model.CatchBlock)reference;
+
+		if (deep == false) {
+			
+			if (maincb.getType() != null &&
+					refcb.getType() != null) {
+				ret = context.compare(maincb.getType(),
+						refcb.getType(), l, deep);
+			} else {
+				ret = true;
+			}
+		}
+		
+		return(ret);
+	}
+	
+}

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/java/org/scribble/conversation/comparator/ConditionalBlockComparatorRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/java/org/scribble/conversation/comparator/ConditionalBlockComparatorRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/java/org/scribble/conversation/comparator/ConditionalBlockComparatorRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,86 @@
+/*
+ * Copyright 2007-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 11 Nov 2008 : Initial version created by gary
+ */
+package org.scribble.conversation.comparator;
+
+import org.scribble.comparator.*;
+import org.scribble.model.*;
+import org.scribble.conversation.model.*;
+import org.scribble.model.admin.ModelListener;
+import org.scribble.extensions.RegistryInfo;
+
+/**
+ * This class provides the ConditionalBlock comparator rule.
+ */
+ at RegistryInfo(extension=ComparatorRule.class)
+public class ConditionalBlockComparatorRule implements ComparatorRule {
+
+	/**
+	 * This method determines whether the comparison rule is
+	 * associated with the supplied type.
+	 * 
+	 * @param obj The object to check
+	 * @return Whether the object is of a type supported by the
+	 * 					comparison rule
+	 */
+	public boolean isTypeSupported(ModelObject obj) {
+		return(obj.getClass().isAssignableFrom(ConditionalBlock.class) ||
+				ConditionalBlock.class.isAssignableFrom(obj.getClass()));
+	}
+	
+	/**
+	 * This method determines whether the comparison rule is
+	 * appropriate for the supplied model objects.
+	 * 
+	 * @param main The main model object to be compared
+	 * @param ref The reference model object to be compared against
+	 * @return Whether the rule is relevant for the
+	 * 				model objects
+	 */
+	public boolean isComparisonSupported(ModelObject main, ModelObject ref) {
+		// Atleast one must be a conditional block
+		return(main instanceof ConditionalBlock ||
+				ref instanceof ConditionalBlock);
+	}
+	
+	/**
+	 * This method compares a model object against a reference
+	 * component to determine if they are equal.
+	 * 
+	 * @param context The context
+	 * @param main The main model object
+	 * @param reference The reference model object
+	 * @param l The model listener
+	 * @param deep Perform a deep compare
+	 * @return Whether the model objects are comparable
+	 */
+	public boolean compare(ComparatorContext context, ModelObject main,
+					ModelObject reference, ModelListener l, boolean deep) {
+		boolean ret=false;
+		//ConditionalBlock maincb=(ConditionalBlock)main;
+		//ConditionalBlock refcb=(ConditionalBlock)reference;
+
+		if (deep == false) {
+			ret = true;
+		}
+		
+		return(ret);
+	}
+	
+}

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/java/org/scribble/conversation/comparator/ConversationComparatorRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/java/org/scribble/conversation/comparator/ConversationComparatorRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/java/org/scribble/conversation/comparator/ConversationComparatorRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,161 @@
+/*
+ * Copyright 2007-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 10 Jan 2008 : Initial version created by gary
+ */
+package org.scribble.conversation.comparator;
+
+import java.util.Collections;
+
+import org.scribble.model.*;
+import org.scribble.model.admin.ModelListener;
+import org.scribble.comparator.*;
+import org.scribble.extensions.RegistryInfo;
+import org.scribble.conformance.model.BehaviourList;
+import org.scribble.conversation.model.*;
+
+/**
+ * This class provides the Conversation comparator rule,
+ * for comparing a local Conversation for conformance.
+ */
+ at RegistryInfo(extension=ComparatorRule.class,notation=ConversationNotation.NOTATION_CODE)
+public class ConversationComparatorRule implements ComparatorRule {
+
+	/**
+	 * This method determines whether the comparison rule is
+	 * associated with the supplied type.
+	 * 
+	 * @param obj The object to check
+	 * @return Whether the object is of a type supported by the
+	 * 					comparison rule
+	 */
+	public boolean isTypeSupported(ModelObject obj) {
+		return(obj instanceof Conversation);
+	}
+	
+	/**
+	 * This method determines whether the comparison rule is
+	 * appropriate for the supplied model objects.
+	 * 
+	 * @param main The main model object to be compared
+	 * @param ref The reference model object to be compared against
+	 * @return Whether the rule is relevant for the
+	 * 				model objects
+	 */
+	public boolean isComparisonSupported(ModelObject main, ModelObject ref) {
+		// Check both Conversation's and located
+		return(main instanceof Conversation &&
+				ref instanceof Conversation &&
+				((Conversation)main).isStateless() ==
+					((Conversation)ref).isStateless() &&
+				((Conversation)main).getLocatedName() != null &&
+				((Conversation)main).getLocatedName().getName() != null &&
+				((Conversation)main).getLocatedName().getRole() != null &&
+				((Conversation)ref).getLocatedName() != null &&
+				((Conversation)ref).getLocatedName().getName() != null &&
+				((Conversation)ref).getLocatedName().getRole() != null);
+	}
+	
+	/**
+	 * This method compares a model object against a reference
+	 * component to determine if they are equal.
+	 * 
+	 * @param context The context
+	 * @param main The main model object
+	 * @param reference The reference model object
+	 * @param l The model listener
+	 * @param deep Perform a deep compare
+	 * @return Whether the model objects are comparable
+	 */
+	public boolean compare(ComparatorContext context, ModelObject main,
+					ModelObject reference, ModelListener l, boolean deep) {
+		boolean ret=false;
+		Conversation mainp=(Conversation)main;
+		Conversation refp=(Conversation)reference;
+		
+		// Check if model names are comparable, taking into account
+		// mapping information provided by the context
+		// TODO: Use context information for mapping conversation name and
+		// roles
+		
+		if (deep && (context.getMainSource().isPlaceholder() ||
+					shouldCompare(context, mainp, refp))) {
+			ret = true;
+			
+			// TODO:
+			// Analysing comparison between conversations will need to collect
+			// information on the roles and channels to determine mapping
+			// for use with remaining activities
+			
+			// TODO:
+			// Possibly change conversation to use Block instead of list of Act
+			// and then visit the block - so next time the protocol is
+			// visited it can be ignored - but then this may be problem
+			
+			
+			// Check activities
+			
+			// Build list of behaviours
+			BehaviourList mainBehaviourList=BehaviourList.createBehaviourList(mainp.getBlock());
+			BehaviourList refBehaviourList=BehaviourList.createBehaviourList(refp.getBlock());
+			
+			context.compare(mainBehaviourList, refBehaviourList, l, true);
+		}
+		
+		return(ret);
+	}	
+	
+	protected boolean shouldCompare(ComparatorContext context,
+					Conversation mainp, Conversation refp) {
+		boolean ret=mainp.getLocatedName().getName().equals(refp.getLocatedName().getName()) &&
+				mainp.getLocatedName().getRole().getName().equals(
+						refp.getLocatedName().getRole().getName());
+		
+		if (ret == false) {
+			ret = mainp.getImplements().contains(context.getReferenceSource());
+			
+			if (ret == false) {
+				ret = mainp.getConformsTo().contains(context.getReferenceSource());
+			}
+			
+			// TODO: Need to also check main reference against refp - but not
+			// available in context at present
+			
+			if (ret == false) {
+				ret = !Collections.disjoint(refp.getConformsTo(),
+						mainp.getImplements());
+			}
+			
+			if (ret == false) {
+				ret = !Collections.disjoint(refp.getImplements(),
+						mainp.getConformsTo());
+			}
+			
+			if (ret == false) {
+				ret = !Collections.disjoint(refp.getImplements(),
+						mainp.getImplements());
+			}
+			
+			if (ret == false) {
+				ret = !Collections.disjoint(refp.getConformsTo(),
+						mainp.getConformsTo());
+			}
+		}
+		
+		return(ret);
+	}	
+}

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/java/org/scribble/conversation/comparator/ConversationModelProtocolModelComparatorRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/java/org/scribble/conversation/comparator/ConversationModelProtocolModelComparatorRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/java/org/scribble/conversation/comparator/ConversationModelProtocolModelComparatorRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,116 @@
+/*
+ * Copyright 2007-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 31 Jan 2008 : Initial version created by gary
+ */
+package org.scribble.conversation.comparator;
+
+import org.scribble.model.*;
+import org.scribble.model.admin.ModelListener;
+import org.scribble.comparator.*;
+import org.scribble.extensions.RegistryInfo;
+import org.scribble.conformance.model.BehaviourList;
+import org.scribble.conversation.model.*;
+import org.scribble.protocol.model.*;
+
+/**
+ * This class provides the Conversation model to protocol
+ * model comparator rule, for comparing models for
+ * implementation conformance.
+ */
+ at RegistryInfo(extension=ComparatorRule.class,notation=ConversationNotation.NOTATION_CODE)
+public class ConversationModelProtocolModelComparatorRule implements ComparatorRule {
+
+	/**
+	 * This method determines whether the comparison rule is
+	 * associated with the supplied type.
+	 * 
+	 * @param obj The object to check
+	 * @return Whether the object is of a type supported by the
+	 * 					comparison rule
+	 */
+	public boolean isTypeSupported(ModelObject obj) {
+		boolean ret=false;
+
+		try {
+			ret = (obj instanceof ConversationModel ||
+					obj instanceof ProtocolModel);
+		} catch(java.lang.Throwable t) {
+			// Ignore
+		}
+		
+		return(ret);
+	}
+	
+	/**
+	 * This method determines whether the comparison rule is
+	 * appropriate for the supplied model objects.
+	 * 
+	 * @param main The main model object to be compared
+	 * @param ref The reference model object to be compared against
+	 * @return Whether the rule is relevant for the
+	 * 				model objects
+	 */
+	public boolean isComparisonSupported(ModelObject main, ModelObject ref) {
+		boolean ret=false;
+
+		try {
+			ret = (main instanceof ConversationModel &&
+					ref instanceof ProtocolModel);
+		} catch(java.lang.Throwable t) {
+			// Ignore
+		}
+		
+		return(ret);
+	}
+	
+	/**
+	 * This method compares a model object against a reference
+	 * component to determine if they are equal.
+	 * 
+	 * @param context The context
+	 * @param main The main model object
+	 * @param reference The reference model object
+	 * @param l The model listener
+	 * @param deep Perform a deep compare
+	 * @return Whether the model objects are comparable
+	 */
+	public boolean compare(ComparatorContext context, ModelObject main,
+					ModelObject reference, ModelListener l, boolean deep) {
+		boolean ret=false;
+		ConversationModel mainModel=(ConversationModel)main;
+		ProtocolModel refModel=(ProtocolModel)reference;
+		
+		// Check if model names are comparable, taking into account
+		// mapping information provided by the context
+		// TODO: Use context information for mapping conversation name and
+		// roles
+		
+		if (deep && mainModel.getConversation() != null &&
+				refModel.getProtocol() != null) {
+			ret = true;
+			
+			// Build list of behaviours
+			BehaviourList mainBehaviourList=BehaviourList.createBehaviourList(mainModel.getConversation().getBlock());
+			BehaviourList refBehaviourList=BehaviourList.createBehaviourList(refModel.getProtocol().getBlock());
+			
+			context.compare(mainBehaviourList, refBehaviourList, l, true);
+		}
+		
+		return(ret);
+	}	
+}

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/java/org/scribble/conversation/comparator/IfChoiceComparatorRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/java/org/scribble/conversation/comparator/IfChoiceComparatorRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/java/org/scribble/conversation/comparator/IfChoiceComparatorRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,108 @@
+/*
+ * Copyright 2007-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 1 Feb 2008 : Initial version created by gary
+ */
+package org.scribble.conversation.comparator;
+
+import org.scribble.model.*;
+import org.scribble.model.admin.ModelListener;
+import org.scribble.comparator.*;
+import org.scribble.extensions.RegistryInfo;
+import org.scribble.conversation.model.*;
+import org.scribble.protocol.model.*;
+
+/**
+ * This class provides the Conversation If to Protocol
+ * Choice comparator rule.
+ */
+ at RegistryInfo(extension=ComparatorRule.class,notation=ConversationNotation.NOTATION_CODE)
+public class IfChoiceComparatorRule implements ComparatorRule {
+
+	/**
+	 * This method determines whether the comparison rule is
+	 * associated with the supplied type.
+	 * 
+	 * @param obj The object to check
+	 * @return Whether the object is of a type supported by the
+	 * 					comparison rule
+	 */
+	public boolean isTypeSupported(ModelObject obj) {
+		boolean ret=false;
+
+		try {
+			ret = (obj instanceof If || obj instanceof Choice);
+		} catch(java.lang.Throwable t) {
+			// Ignore
+		}
+		
+		return(ret);
+	}
+	
+	/**
+	 * This method determines whether the comparison rule is
+	 * appropriate for the supplied model objects.
+	 * 
+	 * @param main The main model object to be compared
+	 * @param ref The reference model object to be compared against
+	 * @return Whether the rule is relevant for the
+	 * 				model objects
+	 */
+	public boolean isComparisonSupported(ModelObject main, ModelObject ref) {
+		boolean ret=false;
+
+		try {
+			ret = (main instanceof If &&
+					ref instanceof Choice);
+		} catch(java.lang.Throwable t) {
+			// Ignore
+		}
+		
+		return(ret);
+	}
+	
+	/**
+	 * This method compares a model object against a reference
+	 * component to determine if they are equal.
+	 * 
+	 * @param context The context
+	 * @param main The main model object
+	 * @param reference The reference model object
+	 * @param l The model listener
+	 * @param deep Perform a deep compare
+	 * @return Whether the model objects are comparable
+	 */
+	public boolean compare(ComparatorContext context, ModelObject main,
+					ModelObject reference, ModelListener l, boolean deep) {
+		boolean ret=false;
+		//If mainc=(If)main;
+		//Choice refc=(Choice)reference;
+
+		if (deep == false) {
+			// Shallow, so return true as both choice
+			ret = true;
+		} else {
+			
+			// TODO: Decide how children should be dealt with
+			
+			// Check children - however not defined how the comparison
+			// should be done between multi-path
+		}
+		
+		return(ret);
+	}	
+}

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/java/org/scribble/conversation/comparator/IfComparatorRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/java/org/scribble/conversation/comparator/IfComparatorRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/java/org/scribble/conversation/comparator/IfComparatorRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,89 @@
+/*
+ * Copyright 2007-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 20 Jun 2008 : Initial version created by gary
+ */
+package org.scribble.conversation.comparator;
+
+import org.scribble.model.*;
+import org.scribble.model.admin.ModelListener;
+import org.scribble.comparator.*;
+import org.scribble.extensions.RegistryInfo;
+import org.scribble.conversation.model.*;
+
+/**
+ * This class provides the Conversation If to another
+ * If comparator rule.
+ */
+ at RegistryInfo(extension=ComparatorRule.class,notation=ConversationNotation.NOTATION_CODE)
+public class IfComparatorRule implements ComparatorRule {
+
+	/**
+	 * This method determines whether the comparison rule is
+	 * associated with the supplied type.
+	 * 
+	 * @param obj The object to check
+	 * @return Whether the object is of a type supported by the
+	 * 					comparison rule
+	 */
+	public boolean isTypeSupported(ModelObject obj) {
+		return(obj instanceof If);
+	}
+	
+	/**
+	 * This method determines whether the comparison rule is
+	 * appropriate for the supplied model objects.
+	 * 
+	 * @param main The main model object to be compared
+	 * @param ref The reference model object to be compared against
+	 * @return Whether the rule is relevant for the
+	 * 				model objects
+	 */
+	public boolean isComparisonSupported(ModelObject main, ModelObject ref) {
+		return(main instanceof If &&
+				ref instanceof If);
+	}
+	
+	/**
+	 * This method compares a model object against a reference
+	 * component to determine if they are equal.
+	 * 
+	 * @param context The context
+	 * @param main The main model object
+	 * @param reference The reference model object
+	 * @param l The model listener
+	 * @param deep Perform a deep compare
+	 * @return Whether the model objects are comparable
+	 */
+	public boolean compare(ComparatorContext context, ModelObject main,
+					ModelObject reference, ModelListener l, boolean deep) {
+		boolean ret=false;
+
+		if (deep == false) {
+			// Shallow, so return true as both choice
+			ret = true;
+		} else {
+			
+			// TODO: Decide how children should be dealt with
+			
+			// Check children - however not defined how the comparison
+			// should be done between multi-path
+		}
+		
+		return(ret);
+	}	
+}

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/java/org/scribble/conversation/comparator/InterruptBlockComparatorRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/java/org/scribble/conversation/comparator/InterruptBlockComparatorRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/java/org/scribble/conversation/comparator/InterruptBlockComparatorRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,82 @@
+/*
+ * Copyright 2007-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 10 Nov 2008 : Initial version created by gary
+ */
+package org.scribble.conversation.comparator;
+
+import org.scribble.comparator.*;
+import org.scribble.model.*;
+import org.scribble.conversation.model.*;
+import org.scribble.model.admin.ModelListener;
+import org.scribble.extensions.RegistryInfo;
+
+/**
+ * This class provides the InterruptBlock comparator rule.
+ */
+ at RegistryInfo(extension=ComparatorRule.class)
+public class InterruptBlockComparatorRule implements ComparatorRule {
+
+	/**
+	 * This method determines whether the comparison rule is
+	 * associated with the supplied type.
+	 * 
+	 * @param obj The object to check
+	 * @return Whether the object is of a type supported by the
+	 * 					comparison rule
+	 */
+	public boolean isTypeSupported(ModelObject obj) {
+		return(obj instanceof InterruptBlock);
+	}
+	
+	/**
+	 * This method determines whether the comparison rule is
+	 * appropriate for the supplied model objects.
+	 * 
+	 * @param main The main model object to be compared
+	 * @param ref The reference model object to be compared against
+	 * @return Whether the rule is relevant for the
+	 * 				model objects
+	 */
+	public boolean isComparisonSupported(ModelObject main, ModelObject ref) {
+		return(main instanceof InterruptBlock &&
+				ref instanceof InterruptBlock);
+	}
+	
+	/**
+	 * This method compares a model object against a reference
+	 * component to determine if they are equal.
+	 * 
+	 * @param context The context
+	 * @param main The main model object
+	 * @param reference The reference model object
+	 * @param l The model listener
+	 * @param deep Perform a deep compare
+	 * @return Whether the model objects are comparable
+	 */
+	public boolean compare(ComparatorContext context, ModelObject main,
+					ModelObject reference, ModelListener l, boolean deep) {
+		boolean ret=false;
+
+		if (deep == false) {
+			ret = true;
+		}
+		
+		return(ret);
+	}
+	
+}

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/java/org/scribble/conversation/comparator/InterruptBlockProtocolComparatorRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/java/org/scribble/conversation/comparator/InterruptBlockProtocolComparatorRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/java/org/scribble/conversation/comparator/InterruptBlockProtocolComparatorRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,98 @@
+/*
+ * Copyright 2007-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 10 Nov 2008 : Initial version created by gary
+ */
+package org.scribble.conversation.comparator;
+
+import org.scribble.comparator.*;
+import org.scribble.model.*;
+import org.scribble.model.admin.ModelListener;
+import org.scribble.extensions.RegistryInfo;
+
+/**
+ * This class provides the InterruptBlock comparator rule.
+ */
+ at RegistryInfo(extension=ComparatorRule.class)
+public class InterruptBlockProtocolComparatorRule implements ComparatorRule {
+
+	/**
+	 * This method determines whether the comparison rule is
+	 * associated with the supplied type.
+	 * 
+	 * @param obj The object to check
+	 * @return Whether the object is of a type supported by the
+	 * 					comparison rule
+	 */
+	public boolean isTypeSupported(ModelObject obj) {
+		boolean ret=false;
+
+		try {
+			ret = (obj instanceof org.scribble.conversation.model.InterruptBlock ||
+					obj instanceof org.scribble.protocol.model.InterruptBlock);
+		} catch(java.lang.Throwable t) {
+			// Ignore
+		}
+		
+		return(ret);
+	}
+	
+	/**
+	 * This method determines whether the comparison rule is
+	 * appropriate for the supplied model objects.
+	 * 
+	 * @param main The main model object to be compared
+	 * @param ref The reference model object to be compared against
+	 * @return Whether the rule is relevant for the
+	 * 				model objects
+	 */
+	public boolean isComparisonSupported(ModelObject main, ModelObject ref) {
+		boolean ret=false;
+
+		try {
+			ret = (main instanceof org.scribble.conversation.model.InterruptBlock &&
+					ref instanceof org.scribble.protocol.model.InterruptBlock);
+		} catch(java.lang.Throwable t) {
+			// Ignore
+		}
+		
+		return(ret);
+	}
+	
+	/**
+	 * This method compares a model object against a reference
+	 * component to determine if they are equal.
+	 * 
+	 * @param context The context
+	 * @param main The main model object
+	 * @param reference The reference model object
+	 * @param l The model listener
+	 * @param deep Perform a deep compare
+	 * @return Whether the model objects are comparable
+	 */
+	public boolean compare(ComparatorContext context, ModelObject main,
+					ModelObject reference, ModelListener l, boolean deep) {
+		boolean ret=false;
+
+		if (deep == false) {
+			ret = true;
+		}
+		
+		return(ret);
+	}
+	
+}

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/java/org/scribble/conversation/comparator/ParallelComparatorRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/java/org/scribble/conversation/comparator/ParallelComparatorRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/java/org/scribble/conversation/comparator/ParallelComparatorRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,89 @@
+/*
+ * Copyright 2007-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 17 Jul 2008 : Initial version created by gary
+ */
+package org.scribble.conversation.comparator;
+
+import org.scribble.model.*;
+import org.scribble.model.admin.ModelListener;
+import org.scribble.comparator.*;
+import org.scribble.extensions.RegistryInfo;
+import org.scribble.conversation.model.*;
+
+/**
+ * This class provides the Conversation Parallel to another
+ * Parallel comparator rule.
+ */
+ at RegistryInfo(extension=ComparatorRule.class,notation=ConversationNotation.NOTATION_CODE)
+public class ParallelComparatorRule implements ComparatorRule {
+
+	/**
+	 * This method determines whether the comparison rule is
+	 * associated with the supplied type.
+	 * 
+	 * @param obj The object to check
+	 * @return Whether the object is of a type supported by the
+	 * 					comparison rule
+	 */
+	public boolean isTypeSupported(ModelObject obj) {
+		return(obj instanceof Parallel);
+	}
+	
+	/**
+	 * This method determines whether the comparison rule is
+	 * appropriate for the supplied model objects.
+	 * 
+	 * @param main The main model object to be compared
+	 * @param ref The reference model object to be compared against
+	 * @return Whether the rule is relevant for the
+	 * 				model objects
+	 */
+	public boolean isComparisonSupported(ModelObject main, ModelObject ref) {
+		return(main instanceof Parallel &&
+				ref instanceof Parallel);
+	}
+	
+	/**
+	 * This method compares a model object against a reference
+	 * component to determine if they are equal.
+	 * 
+	 * @param context The context
+	 * @param main The main model object
+	 * @param reference The reference model object
+	 * @param l The model listener
+	 * @param deep Perform a deep compare
+	 * @return Whether the model objects are comparable
+	 */
+	public boolean compare(ComparatorContext context, ModelObject main,
+					ModelObject reference, ModelListener l, boolean deep) {
+		boolean ret=false;
+
+		if (deep == false) {
+			// Shallow, so return true as both same type
+			ret = true;
+		} else {
+			
+			// TODO: Decide how children should be dealt with
+			
+			// Check children - however not defined how the comparison
+			// should be done between multi-path
+		}
+		
+		return(ret);
+	}	
+}

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/java/org/scribble/conversation/comparator/ParallelProtocolParallelComparatorRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/java/org/scribble/conversation/comparator/ParallelProtocolParallelComparatorRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/java/org/scribble/conversation/comparator/ParallelProtocolParallelComparatorRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,107 @@
+/*
+ * Copyright 2007-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 17 Jul 2008 : Initial version created by gary
+ */
+package org.scribble.conversation.comparator;
+
+import org.scribble.model.*;
+import org.scribble.model.admin.ModelListener;
+import org.scribble.comparator.*;
+import org.scribble.conversation.model.ConversationNotation;
+import org.scribble.extensions.RegistryInfo;
+
+/**
+ * This class provides the Conversation Parallel to a Protocol
+ * Parallel comparator rule.
+ */
+ at RegistryInfo(extension=ComparatorRule.class,
+			notation=ConversationNotation.NOTATION_CODE)
+public class ParallelProtocolParallelComparatorRule implements ComparatorRule {
+
+	/**
+	 * This method determines whether the comparison rule is
+	 * associated with the supplied type.
+	 * 
+	 * @param obj The object to check
+	 * @return Whether the object is of a type supported by the
+	 * 					comparison rule
+	 */
+	public boolean isTypeSupported(ModelObject obj) {
+		boolean ret=false;
+
+		try {
+			ret = (obj instanceof org.scribble.conversation.model.Parallel ||
+					obj instanceof org.scribble.protocol.model.Parallel);
+		} catch(java.lang.Throwable t) {
+			// Ignore
+		}
+		
+		return(ret);
+	}
+	
+	/**
+	 * This method determines whether the comparison rule is
+	 * appropriate for the supplied model objects.
+	 * 
+	 * @param main The main model object to be compared
+	 * @param ref The reference model object to be compared against
+	 * @return Whether the rule is relevant for the
+	 * 				model objects
+	 */
+	public boolean isComparisonSupported(ModelObject main, ModelObject ref) {
+		boolean ret=false;
+
+		try {
+			ret = (main instanceof org.scribble.conversation.model.Parallel &&
+					ref instanceof org.scribble.protocol.model.Parallel);
+		} catch(java.lang.Throwable t) {
+			// Ignore
+		}
+		
+		return(ret);
+	}
+	
+	/**
+	 * This method compares a model object against a reference
+	 * component to determine if they are equal.
+	 * 
+	 * @param context The context
+	 * @param main The main model object
+	 * @param reference The reference model object
+	 * @param l The model listener
+	 * @param deep Perform a deep compare
+	 * @return Whether the model objects are comparable
+	 */
+	public boolean compare(ComparatorContext context, ModelObject main,
+					ModelObject reference, ModelListener l, boolean deep) {
+		boolean ret=false;
+
+		if (deep == false) {
+			// Shallow, so return true as compatible parallel types
+			ret = true;
+		} else {
+			
+			// TODO: Decide how children should be dealt with
+			
+			// Check children - however not defined how the comparison
+			// should be done between multi-path
+		}
+		
+		return(ret);
+	}	
+}

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/java/org/scribble/conversation/comparator/RaiseComparatorRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/java/org/scribble/conversation/comparator/RaiseComparatorRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/java/org/scribble/conversation/comparator/RaiseComparatorRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,96 @@
+/*
+ * Copyright 2007-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 10 Nov 2008 : Initial version created by gary
+ */
+package org.scribble.conversation.comparator;
+
+import org.scribble.model.*;
+import org.scribble.model.admin.ModelListener;
+import org.scribble.comparator.*;
+import org.scribble.extensions.RegistryInfo;
+import org.scribble.conversation.model.*;
+
+/**
+ * This class provides the Conversation Raise to another
+ * Raise comparator rule.
+ */
+ at RegistryInfo(extension=ComparatorRule.class,notation=ConversationNotation.NOTATION_CODE)
+public class RaiseComparatorRule implements ComparatorRule {
+
+	/**
+	 * This method determines whether the comparison rule is
+	 * associated with the supplied type.
+	 * 
+	 * @param obj The object to check
+	 * @return Whether the object is of a type supported by the
+	 * 					comparison rule
+	 */
+	public boolean isTypeSupported(ModelObject obj) {
+		return(obj instanceof Raise);
+	}
+	
+	/**
+	 * This method determines whether the comparison rule is
+	 * appropriate for the supplied model objects.
+	 * 
+	 * @param main The main model object to be compared
+	 * @param ref The reference model object to be compared against
+	 * @return Whether the rule is relevant for the
+	 * 				model objects
+	 */
+	public boolean isComparisonSupported(ModelObject main, ModelObject ref) {
+		return(main instanceof Raise &&
+				ref instanceof Raise);
+	}
+	
+	/**
+	 * This method compares a model object against a reference
+	 * component to determine if they are equal.
+	 * 
+	 * @param context The context
+	 * @param main The main model object
+	 * @param reference The reference model object
+	 * @param l The model listener
+	 * @param deep Perform a deep compare
+	 * @return Whether the model objects are comparable
+	 */
+	public boolean compare(ComparatorContext context, ModelObject main,
+					ModelObject reference, ModelListener l, boolean deep) {
+		boolean ret=false;
+		Raise raisem=(Raise)main;
+		Raise raiseref=(Raise)reference;
+		
+		if (deep == false) {
+			
+			if (raisem.getType() != null &&
+					raiseref.getType() != null) {
+				ret = context.compare(raisem.getType(),
+						raiseref.getType(), l, deep);
+				
+				// TODO: Check role is appropriate
+				// May depend whether global or local models
+				// If local models, then only matters whether
+				// projected role is either present or absent
+				// in both lists - if global, then may need
+				// to be matched lists
+			}
+		}
+
+		return(ret);
+	}	
+}

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/java/org/scribble/conversation/comparator/RaiseProtocolComparatorRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/java/org/scribble/conversation/comparator/RaiseProtocolComparatorRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/java/org/scribble/conversation/comparator/RaiseProtocolComparatorRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,115 @@
+/*
+ * Copyright 2007-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 10 Nov 2008 : Initial version created by gary
+ */
+package org.scribble.conversation.comparator;
+
+import org.scribble.model.*;
+import org.scribble.model.admin.ModelListener;
+import org.scribble.comparator.*;
+import org.scribble.conversation.model.*;
+import org.scribble.extensions.RegistryInfo;
+
+/**
+ * This class provides the Conversation Raise to a Protocol
+ * Raise comparator rule.
+ */
+ at RegistryInfo(extension=ComparatorRule.class,notation=ConversationNotation.NOTATION_CODE)
+public class RaiseProtocolComparatorRule implements ComparatorRule {
+
+	/**
+	 * This method determines whether the comparison rule is
+	 * associated with the supplied type.
+	 * 
+	 * @param obj The object to check
+	 * @return Whether the object is of a type supported by the
+	 * 					comparison rule
+	 */
+	public boolean isTypeSupported(ModelObject obj) {
+		boolean ret=false;
+
+		try {
+			ret = (obj instanceof org.scribble.conversation.model.Raise ||
+					obj instanceof org.scribble.protocol.model.Raise);
+		} catch(java.lang.Throwable t) {
+			// Ignore
+		}
+		
+		return(ret);
+	}
+	
+	/**
+	 * This method determines whether the comparison rule is
+	 * appropriate for the supplied model objects.
+	 * 
+	 * @param main The main model object to be compared
+	 * @param ref The reference model object to be compared against
+	 * @return Whether the rule is relevant for the
+	 * 				model objects
+	 */
+	public boolean isComparisonSupported(ModelObject main, ModelObject ref) {
+		boolean ret=false;
+
+		try {
+			ret = (main instanceof org.scribble.conversation.model.Raise &&
+					ref instanceof org.scribble.protocol.model.Raise);
+		} catch(java.lang.Throwable t) {
+			// Ignore
+		}
+		
+		return(ret);
+	}
+	
+	/**
+	 * This method compares a model object against a reference
+	 * component to determine if they are equal.
+	 * 
+	 * @param context The context
+	 * @param main The main model object
+	 * @param reference The reference model object
+	 * @param l The model listener
+	 * @param deep Perform a deep compare
+	 * @return Whether the model objects are comparable
+	 */
+	public boolean compare(ComparatorContext context, ModelObject main,
+					ModelObject reference, ModelListener l, boolean deep) {
+		boolean ret=false;
+		org.scribble.conversation.model.Raise raisem=
+			(org.scribble.conversation.model.Raise)main;
+		org.scribble.protocol.model.Raise raiseref=
+			(org.scribble.protocol.model.Raise)reference;
+		
+		if (deep == false) {
+			
+			if (raisem.getType() != null &&
+					raiseref.getType() != null) {
+				ret = context.compare(raisem.getType(),
+						raiseref.getType(), l, deep);
+				
+				// TODO: Check role is appropriate
+				// May depend whether global or local models
+				// If local models, then only matters whether
+				// projected role is either present or absent
+				// in both lists - if global, then may need
+				// to be matched lists
+			}
+		}
+
+		return(ret);
+	}	
+}

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/java/org/scribble/conversation/comparator/SpawnComparatorRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/java/org/scribble/conversation/comparator/SpawnComparatorRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/java/org/scribble/conversation/comparator/SpawnComparatorRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,78 @@
+/*
+ * Copyright 2007-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 20 Aug 2008 : Initial version created by gary
+ */
+package org.scribble.conversation.comparator;
+
+import org.scribble.model.*;
+import org.scribble.model.admin.ModelListener;
+import org.scribble.comparator.*;
+import org.scribble.extensions.RegistryInfo;
+import org.scribble.conversation.model.*;
+
+/**
+ * This class provides the Conversation Spawn to another
+ * Spawn comparator rule.
+ */
+ at RegistryInfo(extension=ComparatorRule.class,notation=ConversationNotation.NOTATION_CODE)
+public class SpawnComparatorRule implements ComparatorRule {
+
+	/**
+	 * This method determines whether the comparison rule is
+	 * associated with the supplied type.
+	 * 
+	 * @param obj The object to check
+	 * @return Whether the object is of a type supported by the
+	 * 					comparison rule
+	 */
+	public boolean isTypeSupported(ModelObject obj) {
+		return(obj instanceof Spawn);
+	}
+	
+	/**
+	 * This method determines whether the comparison rule is
+	 * appropriate for the supplied model objects.
+	 * 
+	 * @param main The main model object to be compared
+	 * @param ref The reference model object to be compared against
+	 * @return Whether the rule is relevant for the
+	 * 				model objects
+	 */
+	public boolean isComparisonSupported(ModelObject main, ModelObject ref) {
+		return(main instanceof Spawn &&
+				ref instanceof Spawn);
+	}
+	
+	/**
+	 * This method compares a model object against a reference
+	 * component to determine if they are equal.
+	 * 
+	 * @param context The context
+	 * @param main The main model object
+	 * @param reference The reference model object
+	 * @param l The model listener
+	 * @param deep Perform a deep compare
+	 * @return Whether the model objects are comparable
+	 */
+	public boolean compare(ComparatorContext context, ModelObject main,
+					ModelObject reference, ModelListener l, boolean deep) {
+		boolean ret=true;
+		
+		return(ret);
+	}	
+}

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/java/org/scribble/conversation/comparator/SpawnProtocolSpawnComparatorRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/java/org/scribble/conversation/comparator/SpawnProtocolSpawnComparatorRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/java/org/scribble/conversation/comparator/SpawnProtocolSpawnComparatorRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,96 @@
+/*
+ * Copyright 2007-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 20 Aug 2008 : Initial version created by gary
+ */
+package org.scribble.conversation.comparator;
+
+import org.scribble.model.*;
+import org.scribble.model.admin.ModelListener;
+import org.scribble.comparator.*;
+import org.scribble.conversation.model.ConversationNotation;
+import org.scribble.extensions.RegistryInfo;
+
+/**
+ * This class provides the Conversation Spawn to a Protocol
+ * Spawn comparator rule.
+ */
+ at RegistryInfo(extension=ComparatorRule.class,
+			notation=ConversationNotation.NOTATION_CODE)
+public class SpawnProtocolSpawnComparatorRule implements ComparatorRule {
+
+	/**
+	 * This method determines whether the comparison rule is
+	 * associated with the supplied type.
+	 * 
+	 * @param obj The object to check
+	 * @return Whether the object is of a type supported by the
+	 * 					comparison rule
+	 */
+	public boolean isTypeSupported(ModelObject obj) {
+		boolean ret=false;
+
+		try {
+			ret = (obj instanceof org.scribble.conversation.model.Spawn ||
+					obj instanceof org.scribble.protocol.model.Spawn);
+		} catch(java.lang.Throwable t) {
+			// Ignore
+		}
+		
+		return(ret);
+	}
+	
+	/**
+	 * This method determines whether the comparison rule is
+	 * appropriate for the supplied model objects.
+	 * 
+	 * @param main The main model object to be compared
+	 * @param ref The reference model object to be compared against
+	 * @return Whether the rule is relevant for the
+	 * 				model objects
+	 */
+	public boolean isComparisonSupported(ModelObject main, ModelObject ref) {
+		boolean ret=false;
+
+		try {
+			ret = (main instanceof org.scribble.conversation.model.Spawn &&
+					ref instanceof org.scribble.protocol.model.Spawn);
+		} catch(java.lang.Throwable t) {
+			// Ignore
+		}
+		
+		return(ret);
+	}
+	
+	/**
+	 * This method compares a model object against a reference
+	 * component to determine if they are equal.
+	 * 
+	 * @param context The context
+	 * @param main The main model object
+	 * @param reference The reference model object
+	 * @param l The model listener
+	 * @param deep Perform a deep compare
+	 * @return Whether the model objects are comparable
+	 */
+	public boolean compare(ComparatorContext context, ModelObject main,
+					ModelObject reference, ModelListener l, boolean deep) {
+		boolean ret=true;
+
+		return(ret);
+	}	
+}

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/java/org/scribble/conversation/comparator/TryEscapeComparatorRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/java/org/scribble/conversation/comparator/TryEscapeComparatorRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/java/org/scribble/conversation/comparator/TryEscapeComparatorRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,89 @@
+/*
+ * Copyright 2007-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 10 Nov 2008 : Initial version created by gary
+ */
+package org.scribble.conversation.comparator;
+
+import org.scribble.model.*;
+import org.scribble.model.admin.ModelListener;
+import org.scribble.comparator.*;
+import org.scribble.extensions.RegistryInfo;
+import org.scribble.conversation.model.*;
+
+/**
+ * This class provides the Conversation TryEscape to another
+ * TryEscape comparator rule.
+ */
+ at RegistryInfo(extension=ComparatorRule.class,notation=ConversationNotation.NOTATION_CODE)
+public class TryEscapeComparatorRule implements ComparatorRule {
+
+	/**
+	 * This method determines whether the comparison rule is
+	 * associated with the supplied type.
+	 * 
+	 * @param obj The object to check
+	 * @return Whether the object is of a type supported by the
+	 * 					comparison rule
+	 */
+	public boolean isTypeSupported(ModelObject obj) {
+		return(obj instanceof TryEscape);
+	}
+	
+	/**
+	 * This method determines whether the comparison rule is
+	 * appropriate for the supplied model objects.
+	 * 
+	 * @param main The main model object to be compared
+	 * @param ref The reference model object to be compared against
+	 * @return Whether the rule is relevant for the
+	 * 				model objects
+	 */
+	public boolean isComparisonSupported(ModelObject main, ModelObject ref) {
+		return(main instanceof TryEscape &&
+				ref instanceof TryEscape);
+	}
+	
+	/**
+	 * This method compares a model object against a reference
+	 * component to determine if they are equal.
+	 * 
+	 * @param context The context
+	 * @param main The main model object
+	 * @param reference The reference model object
+	 * @param l The model listener
+	 * @param deep Perform a deep compare
+	 * @return Whether the model objects are comparable
+	 */
+	public boolean compare(ComparatorContext context, ModelObject main,
+					ModelObject reference, ModelListener l, boolean deep) {
+		boolean ret=false;
+
+		if (deep == false) {
+			// Shallow, so return true as both choice
+			ret = true;
+		} else {
+			
+			// TODO: Decide how children should be dealt with
+			
+			// Check children - however not defined how the comparison
+			// should be done between multi-path
+		}
+		
+		return(ret);
+	}	
+}

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/java/org/scribble/conversation/comparator/TryEscapeProtocolComparatorRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/java/org/scribble/conversation/comparator/TryEscapeProtocolComparatorRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/java/org/scribble/conversation/comparator/TryEscapeProtocolComparatorRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,106 @@
+/*
+ * Copyright 2007-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 10 Nov 2008 : Initial version created by gary
+ */
+package org.scribble.conversation.comparator;
+
+import org.scribble.model.*;
+import org.scribble.model.admin.ModelListener;
+import org.scribble.comparator.*;
+import org.scribble.extensions.RegistryInfo;
+import org.scribble.conversation.model.*;
+
+/**
+ * This class provides the Conversation TryEscape to Protocol
+ * TryEscape comparator rule.
+ */
+ at RegistryInfo(extension=ComparatorRule.class,notation=ConversationNotation.NOTATION_CODE)
+public class TryEscapeProtocolComparatorRule implements ComparatorRule {
+
+	/**
+	 * This method determines whether the comparison rule is
+	 * associated with the supplied type.
+	 * 
+	 * @param obj The object to check
+	 * @return Whether the object is of a type supported by the
+	 * 					comparison rule
+	 */
+	public boolean isTypeSupported(ModelObject obj) {
+		boolean ret=false;
+
+		try {
+			ret = (obj instanceof org.scribble.conversation.model.TryEscape ||
+					obj instanceof org.scribble.protocol.model.TryEscape);
+		} catch(java.lang.Throwable t) {
+			// Ignore
+		}
+		
+		return(ret);
+	}
+	
+	/**
+	 * This method determines whether the comparison rule is
+	 * appropriate for the supplied model objects.
+	 * 
+	 * @param main The main model object to be compared
+	 * @param ref The reference model object to be compared against
+	 * @return Whether the rule is relevant for the
+	 * 				model objects
+	 */
+	public boolean isComparisonSupported(ModelObject main, ModelObject ref) {
+		boolean ret=false;
+
+		try {
+			ret = (main instanceof org.scribble.conversation.model.TryEscape &&
+					ref instanceof org.scribble.protocol.model.TryEscape);
+		} catch(java.lang.Throwable t) {
+			// Ignore
+		}
+		
+		return(ret);
+	}
+	
+	/**
+	 * This method compares a model object against a reference
+	 * component to determine if they are equal.
+	 * 
+	 * @param context The context
+	 * @param main The main model object
+	 * @param reference The reference model object
+	 * @param l The model listener
+	 * @param deep Perform a deep compare
+	 * @return Whether the model objects are comparable
+	 */
+	public boolean compare(ComparatorContext context, ModelObject main,
+					ModelObject reference, ModelListener l, boolean deep) {
+		boolean ret=false;
+
+		if (deep == false) {
+			// Shallow, so return true as both choice
+			ret = true;
+		} else {
+			
+			// TODO: Decide how children should be dealt with
+			
+			// Check children - however not defined how the comparison
+			// should be done between multi-path
+		}
+		
+		return(ret);
+	}	
+}

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/java/org/scribble/conversation/comparator/WhenChoiceComparatorRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/java/org/scribble/conversation/comparator/WhenChoiceComparatorRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/java/org/scribble/conversation/comparator/WhenChoiceComparatorRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,106 @@
+/*
+ * Copyright 2007-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 17 Jul 2008 : Initial version created by gary
+ */
+package org.scribble.conversation.comparator;
+
+import org.scribble.model.*;
+import org.scribble.model.admin.ModelListener;
+import org.scribble.comparator.*;
+import org.scribble.extensions.RegistryInfo;
+import org.scribble.conversation.model.*;
+import org.scribble.protocol.model.*;
+
+/**
+ * This class provides the Conversation When to Protocol
+ * Choice comparator rule.
+ */
+ at RegistryInfo(extension=ComparatorRule.class,notation=ConversationNotation.NOTATION_CODE)
+public class WhenChoiceComparatorRule implements ComparatorRule {
+
+	/**
+	 * This method determines whether the comparison rule is
+	 * associated with the supplied type.
+	 * 
+	 * @param obj The object to check
+	 * @return Whether the object is of a type supported by the
+	 * 					comparison rule
+	 */
+	public boolean isTypeSupported(ModelObject obj) {
+		boolean ret=false;
+
+		try {
+			ret = (obj instanceof When || obj instanceof Choice);
+		} catch(java.lang.Throwable t) {
+			// Ignore
+		}
+		
+		return(ret);
+	}
+	
+	/**
+	 * This method determines whether the comparison rule is
+	 * appropriate for the supplied model objects.
+	 * 
+	 * @param main The main model object to be compared
+	 * @param ref The reference model object to be compared against
+	 * @return Whether the rule is relevant for the
+	 * 				model objects
+	 */
+	public boolean isComparisonSupported(ModelObject main, ModelObject ref) {
+		boolean ret=false;
+
+		try {
+			ret = (main instanceof When &&
+					ref instanceof Choice);
+		} catch(java.lang.Throwable t) {
+			// Ignore
+		}
+		
+		return(ret);
+	}
+	
+	/**
+	 * This method compares a model object against a reference
+	 * component to determine if they are equal.
+	 * 
+	 * @param context The context
+	 * @param main The main model object
+	 * @param reference The reference model object
+	 * @param l The model listener
+	 * @param deep Perform a deep compare
+	 * @return Whether the model objects are comparable
+	 */
+	public boolean compare(ComparatorContext context, ModelObject main,
+					ModelObject reference, ModelListener l, boolean deep) {
+		boolean ret=false;
+
+		if (deep == false) {
+			// Shallow, so return true as types compatible
+			ret = true;
+		} else {
+			
+			// TODO: Decide how children should be dealt with
+			
+			// Check children - however not defined how the comparison
+			// should be done between multi-path
+		}
+		
+		return(ret);
+	}	
+}

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/java/org/scribble/conversation/comparator/WhenComparatorRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/java/org/scribble/conversation/comparator/WhenComparatorRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/java/org/scribble/conversation/comparator/WhenComparatorRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,89 @@
+/*
+ * Copyright 2007-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 17 Jul 2008 : Initial version created by gary
+ */
+package org.scribble.conversation.comparator;
+
+import org.scribble.model.*;
+import org.scribble.model.admin.ModelListener;
+import org.scribble.comparator.*;
+import org.scribble.extensions.RegistryInfo;
+import org.scribble.conversation.model.*;
+
+/**
+ * This class provides the Conversation When to another
+ * When comparator rule.
+ */
+ at RegistryInfo(extension=ComparatorRule.class,notation=ConversationNotation.NOTATION_CODE)
+public class WhenComparatorRule implements ComparatorRule {
+
+	/**
+	 * This method determines whether the comparison rule is
+	 * associated with the supplied type.
+	 * 
+	 * @param obj The object to check
+	 * @return Whether the object is of a type supported by the
+	 * 					comparison rule
+	 */
+	public boolean isTypeSupported(ModelObject obj) {
+		return(obj instanceof When);
+	}
+	
+	/**
+	 * This method determines whether the comparison rule is
+	 * appropriate for the supplied model objects.
+	 * 
+	 * @param main The main model object to be compared
+	 * @param ref The reference model object to be compared against
+	 * @return Whether the rule is relevant for the
+	 * 				model objects
+	 */
+	public boolean isComparisonSupported(ModelObject main, ModelObject ref) {
+		return(main instanceof When &&
+				ref instanceof When);
+	}
+	
+	/**
+	 * This method compares a model object against a reference
+	 * component to determine if they are equal.
+	 * 
+	 * @param context The context
+	 * @param main The main model object
+	 * @param reference The reference model object
+	 * @param l The model listener
+	 * @param deep Perform a deep compare
+	 * @return Whether the model objects are comparable
+	 */
+	public boolean compare(ComparatorContext context, ModelObject main,
+					ModelObject reference, ModelListener l, boolean deep) {
+		boolean ret=false;
+
+		if (deep == false) {
+			// Shallow, so return true as both When
+			ret = true;
+		} else {
+			
+			// TODO: Decide how children should be dealt with
+			
+			// Check children - however not defined how the comparison
+			// should be done between multi-path
+		}
+		
+		return(ret);
+	}	
+}

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/java/org/scribble/conversation/comparator/WhileComparatorRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/java/org/scribble/conversation/comparator/WhileComparatorRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/java/org/scribble/conversation/comparator/WhileComparatorRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,89 @@
+/*
+ * Copyright 2007-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 17 Jul 2008 : Initial version created by gary
+ */
+package org.scribble.conversation.comparator;
+
+import org.scribble.model.*;
+import org.scribble.model.admin.ModelListener;
+import org.scribble.comparator.*;
+import org.scribble.extensions.RegistryInfo;
+import org.scribble.conversation.model.*;
+
+/**
+ * This class provides the Conversation While to another
+ * While comparator rule.
+ */
+ at RegistryInfo(extension=ComparatorRule.class,notation=ConversationNotation.NOTATION_CODE)
+public class WhileComparatorRule implements ComparatorRule {
+
+	/**
+	 * This method determines whether the comparison rule is
+	 * associated with the supplied type.
+	 * 
+	 * @param obj The object to check
+	 * @return Whether the object is of a type supported by the
+	 * 					comparison rule
+	 */
+	public boolean isTypeSupported(ModelObject obj) {
+		return(obj instanceof While);
+	}
+	
+	/**
+	 * This method determines whether the comparison rule is
+	 * appropriate for the supplied model objects.
+	 * 
+	 * @param main The main model object to be compared
+	 * @param ref The reference model object to be compared against
+	 * @return Whether the rule is relevant for the
+	 * 				model objects
+	 */
+	public boolean isComparisonSupported(ModelObject main, ModelObject ref) {
+		return(main instanceof While &&
+				ref instanceof While);
+	}
+	
+	/**
+	 * This method compares a model object against a reference
+	 * component to determine if they are equal.
+	 * 
+	 * @param context The context
+	 * @param main The main model object
+	 * @param reference The reference model object
+	 * @param l The model listener
+	 * @param deep Perform a deep compare
+	 * @return Whether the model objects are comparable
+	 */
+	public boolean compare(ComparatorContext context, ModelObject main,
+					ModelObject reference, ModelListener l, boolean deep) {
+		boolean ret=false;
+
+		if (deep == false) {
+			// Shallow, so return true as both while
+			ret = true;
+		} else {
+			
+			// TODO: Decide how children should be dealt with
+			
+			// Check children - however not defined how the comparison
+			// should be done between multi-path
+		}
+		
+		return(ret);
+	}	
+}

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/java/org/scribble/conversation/comparator/model/transform/ConversationInteractionStatelessTransformationRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/java/org/scribble/conversation/comparator/model/transform/ConversationInteractionStatelessTransformationRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/java/org/scribble/conversation/comparator/model/transform/ConversationInteractionStatelessTransformationRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,78 @@
+/*
+ * Copyright 2005-9 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 13 Jan 2009 : Initial version created by gary
+ */
+package org.scribble.conversation.comparator.model.transform;
+
+import org.scribble.conformance.model.transform.*;
+import org.scribble.model.*;
+import org.scribble.conversation.model.*;
+import org.scribble.extensions.RegistryInfo;
+
+/**
+ * This class provides the conversation specific
+ * stateless transformation rule for the Run construct.
+ */
+ at RegistryInfo(extension=StatelessTransformationRule.class,
+				notation=ConversationNotation.NOTATION_CODE)
+			//category=Interaction.class,preference=10)
+public class ConversationInteractionStatelessTransformationRule 
+					extends InteractionStatelessTransformationRule {
+
+	/**
+	 * This method determines whether the stateless
+	 * transformation rule is applicable to the
+	 * supplied model object.
+	 * 
+	 * @param modelObject The model object
+	 * @return Whether the model object can be transformed
+	 */
+	public boolean isSupported(ModelObject modelObject) {
+		return(modelObject instanceof ConversationInteraction);
+	}
+	
+	/**
+	 * This method returns the new interaction.
+	 * 
+	 * @return The new interaction
+	 */
+	@Override
+	protected Interaction createInteraction() {
+		return(new ConversationInteraction());
+	}
+	
+	/**
+	 * This method transforms the supplied model object into
+	 * a stateless equivalent.
+	 * 
+	 * @param context The context
+	 * @param modelObject The model object to transform
+	 * @return The transformed object
+	 */
+	public ModelObject transform(StatelessTransformationContext context,
+						ModelObject modelObject) {
+		ConversationInteraction ret=(ConversationInteraction)
+						super.transform(context, modelObject);
+		ConversationInteraction src=(ConversationInteraction)modelObject;
+
+		// TODO: Convert other aspects of interaction associated with
+		// derived conversation interaction class
+		
+		return(ret);
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/java/org/scribble/conversation/comparator/model/transform/ConversationStatelessTransformationRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/java/org/scribble/conversation/comparator/model/transform/ConversationStatelessTransformationRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/java/org/scribble/conversation/comparator/model/transform/ConversationStatelessTransformationRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,74 @@
+/*
+ * Copyright 2005-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 7 Dec 2008 : Initial version created by gary
+ */
+package org.scribble.conversation.comparator.model.transform;
+
+import org.scribble.conformance.model.transform.*;
+import org.scribble.model.Definition;
+import org.scribble.model.ModelObject;
+import org.scribble.model.MultiPathBehaviour;
+import org.scribble.conversation.model.*;
+import org.scribble.extensions.RegistryInfo;
+
+/**
+ * This class provides the conversation specific
+ * stateless transformation rule.
+ */
+ at RegistryInfo(extension=StatelessTransformationRule.class)
+public class ConversationStatelessTransformationRule
+					extends AbstractDefinitionStatelessTransformationRule {
+
+	/**
+	 * This method returns a new definition of the appropriate
+	 * type.
+	 * 
+	 * @param context The context
+	 * @return The definition
+	 */
+	@Override
+	protected Definition createDefinition(StatelessTransformationContext context) {
+		return(new Conversation());
+	}
+	
+	/**
+	 * This method returns a new multi-path behaviour, of the
+	 * appropriate type, to represent the mutually exclusive
+	 * choice construct at the top level of the stateless definition.
+	 * 
+	 * @param context The context
+	 * @return The multi-path behaviour
+	 */
+	@Override
+	protected MultiPathBehaviour createMultiPathBehaviour(StatelessTransformationContext context) {
+		return(new If());
+	}
+	
+	/**
+	 * This method determines whether the stateless
+	 * transformation rule is applicable to the
+	 * supplied model object.
+	 * 
+	 * @param modelObject The model object
+	 * @return Whether the model object can be transformed
+	 */
+	public boolean isSupported(ModelObject modelObject) {
+		return(modelObject instanceof Conversation);
+	}
+	
+}

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/java/org/scribble/conversation/comparator/model/transform/IfStatelessTransformationRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/java/org/scribble/conversation/comparator/model/transform/IfStatelessTransformationRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/java/org/scribble/conversation/comparator/model/transform/IfStatelessTransformationRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,89 @@
+/*
+ * Copyright 2005-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 17 Dec 2008 : Initial version created by gary
+ */
+package org.scribble.conversation.comparator.model.transform;
+
+import org.scribble.conformance.model.transform.*;
+import org.scribble.model.Block;
+import org.scribble.model.ModelObject;
+import org.scribble.model.Role;
+import org.scribble.conversation.model.*;
+import org.scribble.extensions.RegistryInfo;
+
+/**
+ * This class provides the conversation specific
+ * stateless transformation rule for the If construct.
+ */
+ at RegistryInfo(extension=StatelessTransformationRule.class)
+public class IfStatelessTransformationRule
+				extends AbstractStatelessTransformationRule {
+
+	/**
+	 * This method determines whether the stateless
+	 * transformation rule is applicable to the
+	 * supplied model object.
+	 * 
+	 * @param modelObject The model object
+	 * @return Whether the model object can be transformed
+	 */
+	public boolean isSupported(ModelObject modelObject) {
+		return(modelObject instanceof If &&
+				((If)modelObject).isWaitState() == false);
+	}
+	
+	/**
+	 * This method transforms the supplied model object into
+	 * a stateless equivalent.
+	 * 
+	 * @param context The context
+	 * @param modelObject The model object to transform
+	 * @return The transformed object
+	 */
+	public ModelObject transform(StatelessTransformationContext context,
+							ModelObject modelObject) {
+		If ret=new If();
+		If src=(If)modelObject;
+		
+		for (int i=0; i < src.getRoles().size(); i++) {
+			Role r=(Role)context.transform(src.getRoles().get(i));
+			
+			if (r != null) {
+				((If)ret).getRoles().add(r);
+			}
+		}
+	
+		ret.derivedFrom(src);
+		
+		for (int i=0; i < src.getConditionalBlocks().size(); i++) {
+			Block path=ret.createNewPath();
+			
+			context.transform(src.getConditionalBlocks().get(i), path);
+		}
+		
+		if (src.getElseBlock() != null) {
+			Block path=new Block();
+			ret.setElseBlock(path);
+			
+			context.transform(src.getElseBlock(), path);
+		}
+		
+		return(ret);
+	}
+	
+}

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/java/org/scribble/conversation/comparator/model/transform/ParallelStatelessTransformationRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/java/org/scribble/conversation/comparator/model/transform/ParallelStatelessTransformationRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/java/org/scribble/conversation/comparator/model/transform/ParallelStatelessTransformationRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,72 @@
+/*
+ * Copyright 2005-9 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 6 Jan 2009 : Initial version created by gary
+ */
+package org.scribble.conversation.comparator.model.transform;
+
+import org.scribble.conformance.model.transform.*;
+import org.scribble.model.Block;
+import org.scribble.model.ModelObject;
+import org.scribble.conversation.model.*;
+import org.scribble.extensions.RegistryInfo;
+
+/**
+ * This class provides the conversation specific
+ * stateless transformation rule for the Parallel construct.
+ */
+ at RegistryInfo(extension=StatelessTransformationRule.class)
+public class ParallelStatelessTransformationRule
+				extends AbstractStatelessTransformationRule {
+
+	/**
+	 * This method determines whether the stateless
+	 * transformation rule is applicable to the
+	 * supplied model object.
+	 * 
+	 * @param modelObject The model object
+	 * @return Whether the model object can be transformed
+	 */
+	public boolean isSupported(ModelObject modelObject) {
+		return(modelObject instanceof Parallel);
+	}
+	
+	/**
+	 * This method transforms the supplied model object into
+	 * a stateless equivalent.
+	 * 
+	 * @param context The context
+	 * @param modelObject The model object to transform
+	 * @return The transformed object
+	 */
+	public ModelObject transform(StatelessTransformationContext context,
+							ModelObject modelObject) {
+		Parallel ret=new Parallel();
+		Parallel src=(Parallel)modelObject;
+		
+		ret.derivedFrom(src);
+		
+		for (int i=0; i < src.getBlocks().size(); i++) {
+			Block path=ret.createNewPath();
+			
+			context.transform(src.getBlocks().get(i), path);
+		}
+		
+		return(ret);
+	}
+	
+}

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/java/org/scribble/conversation/comparator/model/transform/RunStatelessTransformationRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/java/org/scribble/conversation/comparator/model/transform/RunStatelessTransformationRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/java/org/scribble/conversation/comparator/model/transform/RunStatelessTransformationRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,73 @@
+/*
+ * Copyright 2005-9 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 13 Jan 2009 : Initial version created by gary
+ */
+package org.scribble.conversation.comparator.model.transform;
+
+import org.scribble.conformance.model.transform.*;
+import org.scribble.model.*;
+import org.scribble.conversation.model.*;
+import org.scribble.extensions.RegistryInfo;
+
+/**
+ * This class provides the conversation specific
+ * stateless transformation rule for the Run construct.
+ */
+ at RegistryInfo(extension=StatelessTransformationRule.class)
+public class RunStatelessTransformationRule 
+					extends AbstractStatelessTransformationRule {
+
+	/**
+	 * This method determines whether the stateless
+	 * transformation rule is applicable to the
+	 * supplied model object.
+	 * 
+	 * @param modelObject The model object
+	 * @return Whether the model object can be transformed
+	 */
+	public boolean isSupported(ModelObject modelObject) {
+		return(modelObject instanceof Run);
+	}
+	
+	/**
+	 * This method transforms the supplied model object into
+	 * a stateless equivalent.
+	 * 
+	 * @param context The context
+	 * @param modelObject The model object to transform
+	 * @return The transformed object
+	 */
+	public ModelObject transform(StatelessTransformationContext context,
+						ModelObject modelObject) {
+		Block ret=new Block();
+		Run src=(Run)modelObject;
+		
+		Definition defn=src.getDefinition();
+		
+		if (defn != null) {
+			context.transform(defn.getBlock(), ret);
+			
+			// TODO: Deal with full and partial processing
+			// of run block.
+		}
+	
+		ret.derivedFrom(src);
+		
+		return(ret);
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/java/org/scribble/conversation/comparator/model/transform/SpawnStatelessTransformationRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/java/org/scribble/conversation/comparator/model/transform/SpawnStatelessTransformationRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/java/org/scribble/conversation/comparator/model/transform/SpawnStatelessTransformationRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,76 @@
+/*
+ * Copyright 2005-9 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 13 Jan 2009 : Initial version created by gary
+ */
+package org.scribble.conversation.comparator.model.transform;
+
+import org.scribble.conformance.model.transform.*;
+import org.scribble.model.*;
+import org.scribble.conversation.model.*;
+import org.scribble.extensions.RegistryInfo;
+
+/**
+ * This class provides the conversation specific
+ * stateless transformation rule for the Spawn construct.
+ */
+ at RegistryInfo(extension=StatelessTransformationRule.class)
+public class SpawnStatelessTransformationRule 
+					extends AbstractStatelessTransformationRule {
+
+	/**
+	 * This method determines whether the stateless
+	 * transformation rule is applicable to the
+	 * supplied model object.
+	 * 
+	 * @param modelObject The model object
+	 * @return Whether the model object can be transformed
+	 */
+	public boolean isSupported(ModelObject modelObject) {
+		return(modelObject instanceof Spawn);
+	}
+	
+	/**
+	 * This method transforms the supplied model object into
+	 * a stateless equivalent.
+	 * 
+	 * @param context The context
+	 * @param modelObject The model object to transform
+	 * @return The transformed object
+	 */
+	public ModelObject transform(StatelessTransformationContext context,
+						ModelObject modelObject) {
+		Block ret=new Block();
+		Spawn src=(Spawn)modelObject;
+		
+		Definition defn=src.getDefinition();
+		
+		// TODO: May need to create parallel construct,
+		// with one path for the spawned definition
+		// and another for the post-spawn activities. But
+		// this will require the sequence vs parallel
+		// conformance to be handled
+		
+		//if (defn != null) {
+		//	context.transform(defn.getBlock(), ret);
+		//}
+	
+		ret.derivedFrom(src);
+		
+		return(ret);
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/java/org/scribble/conversation/comparator/model/transform/WhileStatelessTransformationRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/java/org/scribble/conversation/comparator/model/transform/WhileStatelessTransformationRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/java/org/scribble/conversation/comparator/model/transform/WhileStatelessTransformationRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,155 @@
+/*
+ * Copyright 2005-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 18 Dec 2008 : Initial version created by gary
+ */
+package org.scribble.conversation.comparator.model.transform;
+
+import org.scribble.conformance.model.transform.*;
+import org.scribble.model.*;
+import org.scribble.conversation.model.*;
+import org.scribble.extensions.RegistryInfo;
+
+/**
+ * This class provides the conversation specific
+ * stateless transformation rule for the While construct.
+ */
+ at RegistryInfo(extension=StatelessTransformationRule.class)
+public class WhileStatelessTransformationRule 
+					extends AbstractStatelessTransformationRule {
+
+	/**
+	 * This method determines whether the stateless
+	 * transformation rule is applicable to the
+	 * supplied model object.
+	 * 
+	 * @param modelObject The model object
+	 * @return Whether the model object can be transformed
+	 */
+	public boolean isSupported(ModelObject modelObject) {
+		return(modelObject instanceof While &&
+				((While)modelObject).isWaitState() == false);
+	}
+	
+	/**
+	 * This method transforms the supplied model object into
+	 * a stateless equivalent.
+	 * 
+	 * @param context The context
+	 * @param modelObject The model object to transform
+	 * @return The transformed object
+	 */
+	public ModelObject transform(StatelessTransformationContext context,
+						ModelObject modelObject) {
+		Behaviour ret=null;
+		While src=(While)modelObject;
+		
+		// NOTE: Need to determine if should be 'while', if all
+		// contents are not wait states, and an 'if' if
+		// only translating part of the while loop contents.
+		// If using the 'if', then need to also place activities
+		// following the while into an 'else' path.
+		
+		ConditionalBlock cb=new ConditionalBlock();
+		
+		if (context.transform(src.getBlock(), cb)) {
+			ret = new While();
+			
+			for (int i=0; i < src.getRoles().size(); i++) {
+				Role r=(Role)context.transform(src.getRoles().get(i));
+				
+				if (r != null) {
+					((While)ret).getRoles().add(r);
+				}
+			}
+		
+			((While)ret).setBlock(cb);
+			
+			// TODO: Need to be able to cater for situation
+			// where while contents are fully processed
+			// and therefore the subsequent activities
+			// need to be further processed. Currently
+			// the assumption is that the subsequent
+			// activities will be processed as part of
+			// the block contents. Might need to return
+			// a block, and have a means of transferring
+			// into the block that would normally add
+			// the While.
+		} else {
+			ret = new If();
+			
+			for (int i=0; i < src.getRoles().size(); i++) {
+				Role r=(Role)context.transform(src.getRoles().get(i));
+				
+				if (r != null) {
+					((If)ret).getRoles().add(r);
+				}
+			}
+		
+			((If)ret).getConditionalBlocks().add(cb);
+			
+			Block elseBlock=new Block();
+			
+			// Came to end of block, so check if state from
+			// parent construct has been stored to enable
+			// further processing
+			//java.util.List<TransformState> stack=
+			//				context.getStack();
+			boolean f_continue=true;
+			
+			java.util.List<TransformState> tmpstack=
+					new java.util.Vector<TransformState>();
+			TransformState bp=null;
+		
+			//for (int i=0; f_continue && i < stack.size(); i++) {
+			//	TransformState bp=stack.get(i);
+				
+			while (f_continue && (bp=context.pop()) != null) {
+				
+				tmpstack.add(bp);
+
+				// TODO: Possibly check for 'parent' object
+				// that is repetition and also whether it
+				// is completely defined within the same
+				// block - can this be done based on checking
+				// the stack?
+				
+				if (bp.getParent() != src &&
+						bp.getParent() instanceof SinglePathBehaviour &&
+						bp.getParent().isWaitState() == false &&
+						((SinglePathBehaviour)bp.getParent()).isRepetition()) {
+					f_continue = false;
+
+				} else {
+					f_continue = BlockStatelessTransformationRule.processBlock(context, bp.getBlock(),
+								elseBlock, bp.getPosition()+1, false);
+				}
+			}
+			
+			for (int i=tmpstack.size()-1; i >= 0; i--) {
+				context.push(tmpstack.get(i));
+			}
+			
+			((If)ret).setElseBlock(elseBlock);
+
+		}
+	
+		ret.derivedFrom(src);
+		
+		return(ret);
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/java/org/scribble/conversation/comparator/osgi/Activator.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/java/org/scribble/conversation/comparator/osgi/Activator.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/java/org/scribble/conversation/comparator/osgi/Activator.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,48 @@
+package org.scribble.conversation.comparator.osgi;
+
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class Activator implements BundleActivator {
+
+	// The plug-in ID
+	public static final String PLUGIN_ID = "org.scribble.experimental.conversation.comparator";
+
+	// The shared instance
+	private static Activator plugin;
+	
+	/**
+	 * The constructor
+	 */
+	public Activator() {
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.eclipse.core.runtime.Plugins#start(org.osgi.framework.BundleContext)
+	 */
+	public void start(BundleContext context) throws Exception {
+		plugin = this;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.eclipse.core.runtime.Plugin#stop(org.osgi.framework.BundleContext)
+	 */
+	public void stop(BundleContext context) throws Exception {
+		plugin = null;
+	}
+
+	/**
+	 * Returns the shared instance
+	 *
+	 * @return the shared instance
+	 */
+	public static Activator getDefault() {
+		return plugin;
+	}
+
+}

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/plugintest/org/scribble/conversation/comparator/model/transform/TransformTest.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/plugintest/org/scribble/conversation/comparator/model/transform/TransformTest.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/plugintest/org/scribble/conversation/comparator/model/transform/TransformTest.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,278 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA  02110-1301, USA.
+ */
+package org.scribble.conversation.comparator.model.transform;
+
+import junit.framework.TestCase;
+import junit.framework.TestResult;
+import junit.framework.TestSuite;
+
+import org.scribble.conformance.model.transform.StatelessTransformer;
+import org.scribble.extensions.RegistryFactory;
+import org.scribble.model.Definition;
+
+public class TransformTest extends TestCase {
+
+    public static TestSuite suite() {
+        TestSuite suite = new TestSuite("Stateful -> Stateless Transform Tests");
+        
+        suite.addTest(new StatefulToStatelessTest("ESBBroker", "Broker", "scv"));
+        
+        suite.addTest(new StatefulToStatelessTest("InteractionRun1", "R2", "scv"));
+        
+        return suite;
+    }
+    
+    /**
+     * The test case for running the stateful to stateless test.
+     */
+	protected static class StatefulToStatelessTest extends TestCase {
+
+		/**
+		 * This constructor is initialized with the test
+		 * name.
+		 * 
+		 * @param name The test name
+		 * @param role The role
+		 * @param notation The notation
+		 */
+		public StatefulToStatelessTest(String name,
+							String role, String notation) {
+			super(name+"@"+role+"."+notation);
+			
+			m_name = name+"@"+role+"."+notation;
+			m_role = role;
+			m_notation = notation;
+		}
+		
+		/**
+		 * This method runs the test.
+		 * 
+		 * @param result The test result
+		 */
+		public void run(TestResult result) {
+			result.startTest(this);
+			
+			String filename="testmodels/"+m_name;
+			
+			java.io.InputStream is=
+				TransformTest.class.getResourceAsStream(filename);
+			
+			if (is == null) {
+				result.addError(this,
+						new Throwable("Unable to locate resource: "+filename));
+			} else {			
+				org.scribble.parser.Parser p=new org.scribble.parser.DefaultParser();
+				org.scribble.model.ModelReference ref=
+						new org.scribble.model.ModelReference(m_notation);
+				org.scribble.model.admin.ModelListener l=
+						new org.scribble.model.admin.DefaultModelListener();
+				
+				org.scribble.model.Model model=p.parse(ref, is, l);
+				
+				if (model == null) {
+					result.addError(this, new Throwable("Model is null"));
+				} else {
+					
+					/*
+					org.scribble.projector.Projector projector=
+						new org.scribble.projector.DefaultProjector();
+					*/
+					
+					//org.scribble.model.Role role=null;
+					
+					// Obtain role from definition
+					java.util.List<Definition> defns=model.getDefinitions();
+					Definition defn=null;
+					
+					if (defns.size() == 1) {
+						defn = defns.get(0);
+					}
+					
+					/*
+					java.util.List<org.scribble.model.Role> roles=defn.getRoles();
+					
+					for (int i=0; role == null && i < roles.size(); i++) {
+						if (roles.get(i).getName().equals(m_role)) {
+							role = roles.get(i);
+						}
+					}
+					
+					if (role == null) {
+						result.addError(this,
+								new Throwable("Role '"+m_role+"' not found"));						
+					} else {
+					*/
+						//org.scribble.model.Model projected=
+						//		projector.project(ref, model,role, l);
+						
+						StatelessTransformer transformer=(StatelessTransformer)
+								RegistryFactory.getRegistry().getExtension(
+										StatelessTransformer.class, null);
+					
+						defns = model.getDefinitions();
+						defn = null;
+						
+						if (defns.size() == 1) {
+							defn = defns.get(0);
+						}
+						
+						if (transformer != null && defn != null) {
+							
+							org.scribble.model.Definition transformed=
+										transformer.transform(defn, ref);
+							
+							org.scribble.export.Exporter exporter=
+								(org.scribble.export.Exporter)
+								RegistryFactory.getRegistry().getExtension(
+										org.scribble.export.Exporter.class, null);
+
+							org.scribble.export.text.TextFormatter formatter=
+								new org.scribble.export.text.TextFormatter();
+							
+							java.io.ByteArrayOutputStream os=
+								new java.io.ByteArrayOutputStream();
+							
+							formatter.setOutputStream(os);
+								
+							try {
+								exporter.export(ref, transformed, formatter);
+								
+								String text=new String(os.toByteArray());
+
+								checkResults(result, text);
+							} catch(Exception e) {
+								result.addError(this, e);
+							}
+							
+						} else {
+							result.addError(this,
+									new Throwable("Unable to find Model Generator"));						
+						}
+					//}
+				}
+			}
+			
+			result.endTest(this);
+		}
+		
+		/**
+		 * This method checks the generated stateless against a
+		 * previously stored correct version.
+		 * 
+		 * @param result The test result
+		 * @param text The stateless definition
+		 */
+		protected void checkResults(TestResult result, String text) {
+			boolean f_valid=false;
+
+			String filename="results/"+m_name;
+			
+			java.io.InputStream is=
+				TransformTest.class.getResourceAsStream(filename);
+			
+			if (is != null) {
+				
+				try {
+					byte[] b=new byte[is.available()];
+				
+					is.read(b);
+					
+					is.close();
+					
+					String orig=new String(b);
+					
+					if (orig.equals(text) == false) {
+						result.addError(this,
+								new Throwable("Transformed stateless definition does not match stored version"));
+					} else {
+						f_valid = true;
+					}
+				} catch(Exception e) {
+					result.addError(this, e);
+				}
+			} else {
+				result.addError(this,
+						new Throwable("Resulting stateless definition '"+filename+
+								"' not found for comparison"));
+			}
+			
+			if (f_valid == false) {
+				String modelfile="testmodels/"+m_name;
+				
+				java.net.URL url=TransformTest.class.getResource(modelfile);
+				
+				try {
+					url = org.eclipse.core.runtime.FileLocator.toFileURL(url);
+				} catch(Exception e) {
+					e.printStackTrace();
+				}
+				
+				if (url != null) {
+					// URL will point to copy of test models in the classes folder, so need
+					// to obtain reference back to source version
+					java.io.File f=null;
+					
+					if (url.getFile().indexOf("classes") != -1) {
+						f = new java.io.File(url.getFile().replaceFirst("classes","src/plugintest"));
+					} else if (url.getFile().indexOf("bin") != -1) {						
+						f = new java.io.File(url.getFile().replaceFirst("bin","src/plugintest"));
+					} else {
+						result.addError(this, new Exception("Could not locate results folder to record expected result"));
+					}
+					
+					if (f != null && f.exists()) {
+						f = f.getParentFile().getParentFile();
+						
+						java.io.File resultsDir=new java.io.File(f, "results");
+						
+						if (resultsDir.exists() == false) {
+							resultsDir.mkdirs();
+						}
+						
+						java.io.File resultFile=new java.io.File(resultsDir,
+											m_name+".expected");
+						
+						if (resultFile.exists() == false) {
+							try {
+								java.io.FileOutputStream fos=new java.io.FileOutputStream(resultFile);
+								
+								fos.write(text.getBytes());
+								
+								fos.flush();
+								fos.close();
+								
+							} catch(Exception e){
+								result.addError(this, e);
+							}
+						} else {
+							System.err.println("NOTE: Expected output '"+resultFile+
+										"' already exists - not being overwritten");
+						}
+					} else {
+						result.addError(this, new Throwable("Unable to obtain URL for stateful model source '"+
+								m_name+"': "+url));
+					}
+				}
+			}
+		}
+
+		private String m_name=null;
+		private String m_role=null;
+		private String m_notation=null;
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/plugintest/org/scribble/conversation/comparator/model/transform/results/ESBBroker at Broker.scv
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/plugintest/org/scribble/conversation/comparator/model/transform/results/ESBBroker at Broker.scv	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/plugintest/org/scribble/conversation/comparator/model/transform/results/ESBBroker at Broker.scv	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,32 @@
+stateless conversation ESBBroker at Broker conforms to savara.samples.LoanBroker at Broker {
+	role	Buyer, SupplierQuoteEngine, Broker, CreditAgency, SupplierTxnProcessor;
+	if {
+		makeEnquiry(enquiry) from Buyer request "makeEnquiry";
+		if @ Broker {
+			getQuote(requestForQuote) to SupplierQuoteEngine request "getQuote";
+		} else {
+		}
+	} else if {
+		getQuote(quote) from SupplierQuoteEngine replyTo "getQuote";
+		if @ Broker {
+			getQuote(requestForQuote) to SupplierQuoteEngine request "getQuote";
+		} else {
+		}
+	} else if {
+		makeEnquiry(quoteList) to Buyer replyTo "makeEnquiry";
+	} else if {
+		buy(buy) from Buyer request "buy";
+		checkCredit(CreditCheckRequest) to CreditAgency request "checkCredit";
+	} else if {
+		checkCredit(CreditCheckOk) from CreditAgency replyTo "checkCredit";
+		confirm(orderConfirmed) to SupplierTxnProcessor request "confirm";
+	} else if {
+		confirm(bookingReference) from SupplierTxnProcessor replyTo "confirm";
+		buy(bookingReference) to Buyer replyTo "buy";
+	} else if {
+		checkCredit(CreditCheckInvalid) from CreditAgency replyTo "checkCredit";
+		buy(orderRejected) to Buyer replyTo "buy";
+	} else if {
+		cancel(cancel) from Buyer;
+	}
+}
\ No newline at end of file

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/plugintest/org/scribble/conversation/comparator/model/transform/results/InteractionRun1 at R2.scv
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/plugintest/org/scribble/conversation/comparator/model/transform/results/InteractionRun1 at R2.scv	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/plugintest/org/scribble/conversation/comparator/model/transform/results/InteractionRun1 at R2.scv	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,10 @@
+stateless conversation Interaction1 at R2 {
+	role	R1;
+	if {
+		M1 from R1;
+		M2 to R1;
+	} else if {
+		M3 from R1;
+		M4 to R1;
+	}
+}
\ No newline at end of file

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/plugintest/org/scribble/conversation/comparator/model/transform/testmodels/ESBBroker at Broker.scv
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/plugintest/org/scribble/conversation/comparator/model/transform/testmodels/ESBBroker at Broker.scv	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/plugintest/org/scribble/conversation/comparator/model/transform/testmodels/ESBBroker at Broker.scv	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,38 @@
+namespace test;
+
+conversation ESBBroker at Broker conforms to savara.samples.LoanBroker at Broker {
+	role	Buyer, CreditAgency, Supplier;
+	makeEnquiry(enquiry) from Buyer request "makeEnquiry";
+	while @ Broker {
+		run RequestForQuote at Broker;
+	}
+	when @ Broker {
+		makeEnquiry(quoteList) to Buyer replyTo "makeEnquiry";
+	}
+	if @ Buyer {
+		run CompleteTransaction at Broker (Buyer for Buyer,CreditAgency for CreditAgency);
+	} else if {
+		cancel(cancel) from Buyer;
+	}
+	conversation CompleteTransaction at Broker {
+		role	SupplierTxnProcessor;
+		role	Buyer, CreditAgency;
+		buy(buy) from Buyer request "buy";
+		checkCredit(CreditCheckRequest) to CreditAgency request "checkCredit";
+		if @ CreditAgency {
+			checkCredit(CreditCheckOk) from CreditAgency replyTo "checkCredit";
+			confirm(orderConfirmed) to SupplierTxnProcessor request "confirm";
+			confirm(bookingReference) from SupplierTxnProcessor replyTo "confirm";
+			buy(bookingReference) to Buyer replyTo "buy";
+		} else if {
+			checkCredit(CreditCheckInvalid) from CreditAgency replyTo "checkCredit";
+			buy(orderRejected) to Buyer replyTo "buy";
+		}
+	}
+	conversation RequestForQuote at Broker {
+		role	SupplierQuoteEngine;
+		role	;
+		getQuote(requestForQuote) to SupplierQuoteEngine request "getQuote";
+		getQuote(quote) from SupplierQuoteEngine replyTo "getQuote";
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/plugintest/org/scribble/conversation/comparator/model/transform/testmodels/InteractionRun1 at R2.scv
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/plugintest/org/scribble/conversation/comparator/model/transform/testmodels/InteractionRun1 at R2.scv	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/plugintest/org/scribble/conversation/comparator/model/transform/testmodels/InteractionRun1 at R2.scv	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,17 @@
+namespace test;
+
+conversation Interaction1 at R2 {
+	role	R1;
+	
+	M1 from R1;
+	M2 to R1;
+	
+	run Sub at R2(R1 for R1);
+	
+	conversation Sub at R2 {
+		role	R1;
+		
+		M3 from R1;
+		M4 to R1;
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/test/org/scribble/conversation/comparator/CatchBlockComparatorRuleTest.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/test/org/scribble/conversation/comparator/CatchBlockComparatorRuleTest.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/test/org/scribble/conversation/comparator/CatchBlockComparatorRuleTest.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,179 @@
+/*
+ * Copyright 2005-9 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 1 Mar 2009 : Initial version created by gary
+ */
+package org.scribble.conversation.comparator;
+
+import org.scribble.extensions.RegistryFactory;
+import org.scribble.model.*;
+import org.scribble.conversation.model.*;
+import org.scribble.model.admin.DefaultModelListener;
+import org.scribble.comparator.*;
+
+import junit.framework.TestCase;
+
+public class CatchBlockComparatorRuleTest extends TestCase {
+
+	private static final String TEST_NOTATION = "test";
+
+	public void testCompareSameCatchType() {
+		CatchBlockComparatorRule rule=
+				new CatchBlockComparatorRule();
+		
+		RegistryFactory.setRegistry(null);
+		
+		DefaultModelListener l=new DefaultModelListener();
+		
+		java.util.List<ComparatorRule> rules=
+					new java.util.Vector<ComparatorRule>();
+		
+		rules.add(new TypeReferenceComparatorRule());
+		
+		DefaultComparatorContext context=
+			new DefaultComparatorContext(new ModelReference(TEST_NOTATION),
+						new ModelReference(TEST_NOTATION), rules);
+
+		CatchBlock main=new CatchBlock();
+		TypeReference mainType=new TypeReference();
+		mainType.setLocalpart("catchType");
+		main.setType(mainType);
+		
+		CatchBlock reference=new CatchBlock();
+		TypeReference refType=new TypeReference();
+		refType.setLocalpart("catchType");
+		reference.setType(refType);
+			
+		boolean result=rule.compare(context, main, reference, l, false);
+		
+		if (l.getErrors().size() > 0) {
+			fail("No errors expected");
+		}
+		
+		if (result == false) {
+			fail("Comparator should NOT have failed");
+		}
+	}
+
+	public void testCompareDiffTypes() {
+		CatchBlockComparatorRule rule=
+				new CatchBlockComparatorRule();
+		
+		RegistryFactory.setRegistry(null);
+		
+		DefaultModelListener l=new DefaultModelListener();
+		
+		java.util.List<ComparatorRule> rules=
+					new java.util.Vector<ComparatorRule>();
+		
+		rules.add(new TypeReferenceComparatorRule());
+		
+		DefaultComparatorContext context=
+			new DefaultComparatorContext(new ModelReference(TEST_NOTATION),
+						new ModelReference(TEST_NOTATION), rules);
+
+		CatchBlock main=new CatchBlock();
+		TypeReference mainType=new TypeReference();
+		mainType.setLocalpart("catchType1");
+		main.setType(mainType);
+		
+		CatchBlock reference=new CatchBlock();
+		TypeReference refType=new TypeReference();
+		refType.setLocalpart("catchType2");
+		reference.setType(refType);
+			
+		boolean result=rule.compare(context, main, reference, l, false);
+		
+		if (l.getErrors().size() != 1) {
+			fail("One error expected");
+		}
+		
+		if (result == true) {
+			fail("Comparator should have failed");
+		}
+	}
+
+	public void testCompareMissingMainCatchType() {
+		CatchBlockComparatorRule rule=
+				new CatchBlockComparatorRule();
+		
+		RegistryFactory.setRegistry(null);
+		
+		DefaultModelListener l=new DefaultModelListener();
+		
+		java.util.List<ComparatorRule> rules=
+					new java.util.Vector<ComparatorRule>();
+		
+		rules.add(new TypeReferenceComparatorRule());
+		
+		DefaultComparatorContext context=
+			new DefaultComparatorContext(new ModelReference(TEST_NOTATION),
+						new ModelReference(TEST_NOTATION), rules);
+
+		CatchBlock main=new CatchBlock();
+		
+		CatchBlock reference=new CatchBlock();
+		TypeReference refType=new TypeReference();
+		refType.setLocalpart("catchType");
+		reference.setType(refType);
+			
+		boolean result=rule.compare(context, main, reference, l, false);
+		
+		if (l.getErrors().size() > 0) {
+			fail("No errors expected");
+		}
+		
+		if (result == false) {
+			fail("Comparator should NOT have failed");
+		}
+	}
+
+	public void testCompareMissingRefCatchType() {
+		CatchBlockComparatorRule rule=
+				new CatchBlockComparatorRule();
+		
+		RegistryFactory.setRegistry(null);
+		
+		DefaultModelListener l=new DefaultModelListener();
+		
+		java.util.List<ComparatorRule> rules=
+					new java.util.Vector<ComparatorRule>();
+		
+		rules.add(new TypeReferenceComparatorRule());
+		
+		DefaultComparatorContext context=
+			new DefaultComparatorContext(new ModelReference(TEST_NOTATION),
+						new ModelReference(TEST_NOTATION), rules);
+
+		CatchBlock main=new CatchBlock();
+		TypeReference mainType=new TypeReference();
+		mainType.setLocalpart("catchType");
+		main.setType(mainType);
+		
+		CatchBlock reference=new CatchBlock();
+			
+		boolean result=rule.compare(context, main, reference, l, false);
+		
+		if (l.getErrors().size() > 0) {
+			fail("No errors expected");
+		}
+		
+		if (result == false) {
+			fail("Comparator should NOT have failed");
+		}
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/test/org/scribble/conversation/comparator/CatchBlockProtocolComparatorRuleTest.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/test/org/scribble/conversation/comparator/CatchBlockProtocolComparatorRuleTest.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/test/org/scribble/conversation/comparator/CatchBlockProtocolComparatorRuleTest.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,213 @@
+/*
+ * Copyright 2005-9 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 1 Mar 2009 : Initial version created by gary
+ */
+package org.scribble.conversation.comparator;
+
+import org.scribble.extensions.RegistryFactory;
+import org.scribble.model.*;
+import org.scribble.model.admin.DefaultModelListener;
+import org.scribble.comparator.*;
+import org.scribble.conversation.model.CatchBlock;
+
+import junit.framework.TestCase;
+
+public class CatchBlockProtocolComparatorRuleTest extends TestCase {
+
+	private static final String TEST_NOTATION = "test";
+
+	public void testCompareSameCatchType() {
+		CatchBlockProtocolComparatorRule rule=
+				new CatchBlockProtocolComparatorRule();
+		
+		RegistryFactory.setRegistry(null);
+		
+		DefaultModelListener l=new DefaultModelListener();
+		
+		java.util.List<ComparatorRule> rules=
+					new java.util.Vector<ComparatorRule>();
+		
+		rules.add(new TypeReferenceComparatorRule());
+		
+		DefaultComparatorContext context=
+			new DefaultComparatorContext(new ModelReference(TEST_NOTATION),
+						new ModelReference(TEST_NOTATION), rules);
+
+		org.scribble.conversation.model.CatchBlock main=
+				new org.scribble.conversation.model.CatchBlock();
+		TypeReference mainType=new TypeReference();
+		mainType.setLocalpart("catchType");
+		main.setType(mainType);
+		
+		org.scribble.protocol.model.CatchBlock reference=
+			new org.scribble.protocol.model.CatchBlock();
+		TypeReference refType=new TypeReference();
+		refType.setLocalpart("catchType");
+		reference.setType(refType);
+			
+		boolean result=rule.compare(context, main, reference, l, false);
+		
+		if (l.getErrors().size() > 0) {
+			fail("No errors expected");
+		}
+		
+		if (result == false) {
+			fail("Comparator should NOT have failed");
+		}
+	}
+
+	public void testCompareDiffTypes() {
+		CatchBlockProtocolComparatorRule rule=
+				new CatchBlockProtocolComparatorRule();
+		
+		RegistryFactory.setRegistry(null);
+		
+		DefaultModelListener l=new DefaultModelListener();
+		
+		java.util.List<ComparatorRule> rules=
+					new java.util.Vector<ComparatorRule>();
+		
+		rules.add(new TypeReferenceComparatorRule());
+		
+		DefaultComparatorContext context=
+			new DefaultComparatorContext(new ModelReference(TEST_NOTATION),
+						new ModelReference(TEST_NOTATION), rules);
+
+		org.scribble.conversation.model.CatchBlock main=
+			new org.scribble.conversation.model.CatchBlock();
+		TypeReference mainType=new TypeReference();
+		mainType.setLocalpart("catchType1");
+		main.setType(mainType);
+		
+		org.scribble.protocol.model.CatchBlock reference=
+			new org.scribble.protocol.model.CatchBlock();
+		TypeReference refType=new TypeReference();
+		refType.setLocalpart("catchType2");
+		reference.setType(refType);
+			
+		boolean result=rule.compare(context, main, reference, l, false);
+		
+		if (l.getErrors().size() != 1) {
+			fail("One error expected");
+		}
+		
+		if (result == true) {
+			fail("Comparator should have failed");
+		}
+	}
+
+	public void testCompareMissingMainCatchType() {
+		CatchBlockProtocolComparatorRule rule=
+				new CatchBlockProtocolComparatorRule();
+		
+		RegistryFactory.setRegistry(null);
+		
+		DefaultModelListener l=new DefaultModelListener();
+		
+		java.util.List<ComparatorRule> rules=
+					new java.util.Vector<ComparatorRule>();
+		
+		rules.add(new TypeReferenceComparatorRule());
+		
+		DefaultComparatorContext context=
+			new DefaultComparatorContext(new ModelReference(TEST_NOTATION),
+						new ModelReference(TEST_NOTATION), rules);
+
+		org.scribble.conversation.model.CatchBlock main=
+			new org.scribble.conversation.model.CatchBlock();
+		
+		org.scribble.protocol.model.CatchBlock reference=
+			new org.scribble.protocol.model.CatchBlock();
+		TypeReference refType=new TypeReference();
+		refType.setLocalpart("catchType");
+		reference.setType(refType);
+			
+		boolean result=rule.compare(context, main, reference, l, false);
+		
+		if (l.getErrors().size() > 0) {
+			fail("No errors expected");
+		}
+		
+		if (result == false) {
+			fail("Comparator should NOT have failed");
+		}
+	}
+
+	public void testCompareMissingRefCatchType() {
+		CatchBlockProtocolComparatorRule rule=
+				new CatchBlockProtocolComparatorRule();
+		
+		RegistryFactory.setRegistry(null);
+		
+		DefaultModelListener l=new DefaultModelListener();
+		
+		java.util.List<ComparatorRule> rules=
+					new java.util.Vector<ComparatorRule>();
+		
+		rules.add(new TypeReferenceComparatorRule());
+		
+		DefaultComparatorContext context=
+			new DefaultComparatorContext(new ModelReference(TEST_NOTATION),
+						new ModelReference(TEST_NOTATION), rules);
+
+		org.scribble.conversation.model.CatchBlock main=
+			new org.scribble.conversation.model.CatchBlock();
+		TypeReference mainType=new TypeReference();
+		mainType.setLocalpart("catchType");
+		main.setType(mainType);
+		
+		org.scribble.protocol.model.CatchBlock reference=
+			new org.scribble.protocol.model.CatchBlock();
+			
+		boolean result=rule.compare(context, main, reference, l, false);
+		
+		if (l.getErrors().size() > 0) {
+			fail("No errors expected");
+		}
+		
+		if (result == false) {
+			fail("Comparator should NOT have failed");
+		}
+	}
+	
+	public void testIsSupportedProtocolRefConvMain() {
+		CatchBlockProtocolComparatorRule rule=
+			new CatchBlockProtocolComparatorRule();
+
+		boolean result=rule.isComparisonSupported(
+				new org.scribble.conversation.model.CatchBlock(),
+				new org.scribble.protocol.model.CatchBlock());
+		
+		if (result == false) {
+			fail("Should be supported");
+		}
+	}
+	
+	public void testIsSupportedProtocolMainConvRef() {
+		CatchBlockProtocolComparatorRule rule=
+			new CatchBlockProtocolComparatorRule();
+
+		boolean result=rule.isComparisonSupported(
+				new org.scribble.protocol.model.CatchBlock(),
+				new org.scribble.conversation.model.CatchBlock());
+		
+		if (result == true) {
+			fail("Should NOT be supported");
+		}
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/test/org/scribble/conversation/comparator/ConditionalBlockComparatorRuleTest.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/test/org/scribble/conversation/comparator/ConditionalBlockComparatorRuleTest.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/test/org/scribble/conversation/comparator/ConditionalBlockComparatorRuleTest.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,65 @@
+/*
+ * Copyright 2005-9 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 2 Mar 2009 : Initial version created by gary
+ */
+package org.scribble.conversation.comparator;
+
+import org.scribble.extensions.RegistryFactory;
+import org.scribble.model.*;
+import org.scribble.conversation.model.*;
+import org.scribble.model.admin.DefaultModelListener;
+import org.scribble.comparator.*;
+
+import junit.framework.TestCase;
+
+public class ConditionalBlockComparatorRuleTest extends TestCase {
+
+	private static final String TEST_NOTATION = "test";
+
+	public void testCompareNoExpression() {
+		ConditionalBlockComparatorRule rule=
+				new ConditionalBlockComparatorRule();
+		
+		RegistryFactory.setRegistry(null);
+		
+		DefaultModelListener l=new DefaultModelListener();
+		
+		java.util.List<ComparatorRule> rules=
+					new java.util.Vector<ComparatorRule>();
+		
+		DefaultComparatorContext context=
+			new DefaultComparatorContext(new ModelReference(TEST_NOTATION),
+						new ModelReference(TEST_NOTATION), rules);
+
+		ConditionalBlock main=new ConditionalBlock();
+		ConditionalBlock reference=new ConditionalBlock();
+		
+		boolean result=rule.compare(context, main, reference, l, false);
+		
+		if (l.getErrors().size() > 0) {
+			fail("No errors expected");
+		}
+		
+		if (result == false) {
+			fail("Comparator should NOT have failed");
+		}
+	}
+	
+	// TODO: Decide whether compare should check for
+	// equivalent expressions?
+}

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/test/org/scribble/conversation/comparator/ConversationComparatorRuleTest.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/test/org/scribble/conversation/comparator/ConversationComparatorRuleTest.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/test/org/scribble/conversation/comparator/ConversationComparatorRuleTest.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,490 @@
+/*
+ * Copyright 2005-9 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 2 Mar 2009 : Initial version created by gary
+ */
+package org.scribble.conversation.comparator;
+
+import org.scribble.extensions.RegistryFactory;
+import org.scribble.model.*;
+import org.scribble.conversation.model.*;
+import org.scribble.model.admin.DefaultModelListener;
+import org.scribble.comparator.*;
+import org.scribble.conformance.comparator.*;
+
+import junit.framework.TestCase;
+
+public class ConversationComparatorRuleTest extends TestCase {
+
+	private static final String TEST_NOTATION = "test";
+
+	public void testCompare() {
+		ConversationComparatorRule rule=
+				new ConversationComparatorRule();
+		
+		RegistryFactory.setRegistry(null);
+		
+		DefaultModelListener l=new DefaultModelListener();
+		
+		java.util.List<ComparatorRule> rules=
+					new java.util.Vector<ComparatorRule>();
+		
+		rules.add(new BehaviourListComparatorRule());
+		rules.add(new BlockComparatorRule());
+		
+		DefaultComparatorContext context=
+			new DefaultComparatorContext(new ModelReference(TEST_NOTATION),
+						new ModelReference(TEST_NOTATION), rules);
+
+		Conversation main=new Conversation();
+		LocatedName mainName=new LocatedName();
+		mainName.setName("modelName");
+		Role mainRole=new Role();
+		mainRole.setName("roleName");
+		mainName.setRole(mainRole);
+		main.setLocatedName(mainName);
+		
+		Conversation reference=new Conversation();
+		LocatedName refName=new LocatedName();
+		refName.setName("modelName");
+		Role refRole=new Role();
+		refRole.setName("roleName");
+		refName.setRole(refRole);
+		reference.setLocatedName(refName);
+			
+		boolean result=rule.compare(context, main, reference, l, true);
+		
+		if (l.getErrors().size() > 0) {
+			fail("No errors expected");
+		}
+		
+		if (result == false) {
+			fail("Comparator should NOT have failed");
+		}
+	}
+
+	public void testShouldCompareSameNameAndRole() {
+		ConversationComparatorRule rule=new ConversationComparatorRule();
+		
+		java.util.List<ComparatorRule> rules=
+			new java.util.Vector<ComparatorRule>();
+
+		ModelReference mainRef=new ModelReference(TEST_NOTATION);
+		ModelReference refRef=new ModelReference(TEST_NOTATION);
+		
+		DefaultComparatorContext context=
+			new DefaultComparatorContext(mainRef, refRef, rules);
+		
+		Conversation main=new Conversation();
+		LocatedName mainName=new LocatedName();
+		mainName.setName("modelName");
+		Role mainRole=new Role();
+		mainRole.setName("roleName");
+		mainName.setRole(mainRole);
+		main.setLocatedName(mainName);
+		
+		Conversation reference=new Conversation();
+		LocatedName refName=new LocatedName();
+		refName.setName("modelName");
+		Role refRole=new Role();
+		refRole.setName("roleName");
+		refName.setRole(refRole);
+		reference.setLocatedName(refName);
+
+		boolean result=rule.shouldCompare(context, main, reference);
+	
+		if (result == false) {
+			fail("Should be comparable");
+		}
+	}
+
+	public void testShouldCompareDiffNameSameRole() {
+		ConversationComparatorRule rule=new ConversationComparatorRule();
+		
+		java.util.List<ComparatorRule> rules=
+			new java.util.Vector<ComparatorRule>();
+
+		ModelReference mainRef=new ModelReference(TEST_NOTATION);
+		ModelReference refRef=new ModelReference(TEST_NOTATION);
+		
+		DefaultComparatorContext context=
+			new DefaultComparatorContext(mainRef, refRef, rules);
+		
+		Conversation main=new Conversation();
+		LocatedName mainName=new LocatedName();
+		mainName.setName("modelName1");
+		Role mainRole=new Role();
+		mainRole.setName("roleName");
+		mainName.setRole(mainRole);
+		main.setLocatedName(mainName);
+		
+		Conversation reference=new Conversation();
+		LocatedName refName=new LocatedName();
+		refName.setName("modelName2");
+		Role refRole=new Role();
+		refRole.setName("roleName");
+		refName.setRole(refRole);
+		reference.setLocatedName(refName);
+
+		boolean result=rule.shouldCompare(context, main, reference);
+	
+		if (result == true) {
+			fail("Should NOT be comparable");
+		}
+	}
+
+	public void testShouldCompareSameNameDiffRole() {
+		ConversationComparatorRule rule=new ConversationComparatorRule();
+		
+		java.util.List<ComparatorRule> rules=
+			new java.util.Vector<ComparatorRule>();
+
+		ModelReference mainRef=new ModelReference(TEST_NOTATION);
+		ModelReference refRef=new ModelReference(TEST_NOTATION);
+		
+		DefaultComparatorContext context=
+			new DefaultComparatorContext(mainRef, refRef, rules);
+		
+		Conversation main=new Conversation();
+		LocatedName mainName=new LocatedName();
+		mainName.setName("modelName");
+		Role mainRole=new Role();
+		mainRole.setName("roleName1");
+		mainName.setRole(mainRole);
+		main.setLocatedName(mainName);
+		
+		Conversation reference=new Conversation();
+		LocatedName refName=new LocatedName();
+		refName.setName("modelName");
+		Role refRole=new Role();
+		refRole.setName("roleName2");
+		refName.setRole(refRole);
+		reference.setLocatedName(refName);
+
+		boolean result=rule.shouldCompare(context, main, reference);
+	
+		if (result == true) {
+			fail("Should NOT be comparable");
+		}
+	}
+
+	public void testShouldCompareMainImplementsRef() {
+		ConversationComparatorRule rule=new ConversationComparatorRule();
+		
+		java.util.List<ComparatorRule> rules=
+			new java.util.Vector<ComparatorRule>();
+
+		ModelReference mainRef=new ModelReference("main.ns",
+				"main.lp", "main.role", "main.notation");
+		
+		ModelReference refRef=new ModelReference("ref.ns",
+				"ref.lp", "ref.role", "ref.notation");
+		
+		DefaultComparatorContext context=
+			new DefaultComparatorContext(mainRef, refRef, rules);
+		
+		Conversation main=new Conversation();
+		LocatedName mainName=new LocatedName();
+		mainName.setName("modelName");
+		Role mainRole=new Role();
+		mainRole.setName("roleName1");
+		mainName.setRole(mainRole);
+		main.setLocatedName(mainName);
+		
+		Conversation reference=new Conversation();
+		LocatedName refName=new LocatedName();
+		refName.setName("modelName");
+		Role refRole=new Role();
+		refRole.setName("roleName2");
+		refName.setRole(refRole);
+		reference.setLocatedName(refName);
+		
+		ImplementsReference implRef=
+				new ImplementsReference(refRef.getNotation());
+		implRef.setNamespace(refRef.getNamespace());
+		implRef.setLocalpart(refRef.getLocalpart());
+		implRef.setLocatedRole(refRef.getLocatedRole());
+		
+		main.getImplements().add(implRef);
+
+		boolean result=rule.shouldCompare(context, main, reference);
+	
+		if (result == false) {
+			fail("Should be comparable");
+		}
+	}
+
+	public void testShouldCompareMainConformsToRef() {
+		ConversationComparatorRule rule=new ConversationComparatorRule();
+		
+		java.util.List<ComparatorRule> rules=
+			new java.util.Vector<ComparatorRule>();
+
+		ModelReference mainRef=new ModelReference("main.ns",
+				"main.lp", "main.role", "main.notation");
+		
+		ModelReference refRef=new ModelReference("ref.ns",
+				"ref.lp", "ref.role", "ref.notation");
+		
+		DefaultComparatorContext context=
+			new DefaultComparatorContext(mainRef, refRef, rules);
+		
+		Conversation main=new Conversation();
+		LocatedName mainName=new LocatedName();
+		mainName.setName("modelName");
+		Role mainRole=new Role();
+		mainRole.setName("roleName1");
+		mainName.setRole(mainRole);
+		main.setLocatedName(mainName);
+		
+		Conversation reference=new Conversation();
+		LocatedName refName=new LocatedName();
+		refName.setName("modelName");
+		Role refRole=new Role();
+		refRole.setName("roleName2");
+		refName.setRole(refRole);
+		reference.setLocatedName(refName);
+		
+		ConformanceReference conformsRef=
+				new ConformanceReference(refRef.getNotation());
+		conformsRef.setNamespace(refRef.getNamespace());
+		conformsRef.setLocalpart(refRef.getLocalpart());
+		conformsRef.setLocatedRole(refRef.getLocatedRole());
+		
+		main.getConformsTo().add(conformsRef);
+
+		boolean result=rule.shouldCompare(context, main, reference);
+	
+		if (result == false) {
+			fail("Should be comparable");
+		}
+	}
+
+	public void testShouldCompareMainImplsRefConformsTo() {
+		ConversationComparatorRule rule=new ConversationComparatorRule();
+		
+		java.util.List<ComparatorRule> rules=
+			new java.util.Vector<ComparatorRule>();
+
+		ModelReference mainRef=new ModelReference("main.ns",
+				"main.lp", "main.role", "main.notation");
+		
+		ModelReference refRef=new ModelReference("ref.ns",
+				"ref.lp", "ref.role", "ref.notation");
+		
+		DefaultComparatorContext context=
+			new DefaultComparatorContext(mainRef, refRef, rules);
+		
+		Conversation main=new Conversation();
+		LocatedName mainName=new LocatedName();
+		mainName.setName("modelName");
+		Role mainRole=new Role();
+		mainRole.setName("roleName1");
+		mainName.setRole(mainRole);
+		main.setLocatedName(mainName);
+		
+		Conversation reference=new Conversation();
+		LocatedName refName=new LocatedName();
+		refName.setName("modelName");
+		Role refRole=new Role();
+		refRole.setName("roleName2");
+		refName.setRole(refRole);
+		reference.setLocatedName(refName);
+		
+		String notation="notation";
+		String namespace="namespace";
+		String localpart="localpart";
+		String role="role";
+
+		ConformanceReference conformsRef=
+				new ConformanceReference(notation);
+		conformsRef.setNamespace(namespace);
+		conformsRef.setLocalpart(localpart);
+		conformsRef.setLocatedRole(role);
+		
+		reference.getConformsTo().add(conformsRef);
+
+		ImplementsReference implRef=
+				new ImplementsReference(notation);
+		implRef.setNamespace(namespace);
+		implRef.setLocalpart(localpart);
+		implRef.setLocatedRole(role);
+		
+		main.getImplements().add(implRef);
+		
+		boolean result=rule.shouldCompare(context, main, reference);
+	
+		if (result == false) {
+			fail("Should be comparable");
+		}
+	}
+
+	public void testShouldCompareRefImplsMainConformsTo() {
+		ConversationComparatorRule rule=new ConversationComparatorRule();
+		
+		java.util.List<ComparatorRule> rules=
+			new java.util.Vector<ComparatorRule>();
+
+		ModelReference mainRef=new ModelReference("main.ns",
+				"main.lp", "main.role", "main.notation");
+		
+		ModelReference refRef=new ModelReference("ref.ns",
+				"ref.lp", "ref.role", "ref.notation");
+		
+		DefaultComparatorContext context=
+			new DefaultComparatorContext(mainRef, refRef, rules);
+		
+		Conversation main=new Conversation();
+		LocatedName mainName=new LocatedName();
+		mainName.setName("modelName");
+		Role mainRole=new Role();
+		mainRole.setName("roleName1");
+		mainName.setRole(mainRole);
+		main.setLocatedName(mainName);
+		
+		Conversation reference=new Conversation();
+		LocatedName refName=new LocatedName();
+		refName.setName("modelName");
+		Role refRole=new Role();
+		refRole.setName("roleName2");
+		refName.setRole(refRole);
+		reference.setLocatedName(refName);
+		
+		String notation="notation";
+		String namespace="namespace";
+		String localpart="localpart";
+		String role="role";
+		
+		ConformanceReference conformsRef=
+				new ConformanceReference(notation);
+		conformsRef.setNamespace(namespace);
+		conformsRef.setLocalpart(localpart);
+		conformsRef.setLocatedRole(role);
+		
+		main.getConformsTo().add(conformsRef);
+
+		ImplementsReference implRef=
+				new ImplementsReference(notation);
+		implRef.setNamespace(namespace);
+		implRef.setLocalpart(localpart);
+		implRef.setLocatedRole(role);
+		
+		reference.getImplements().add(implRef);
+		
+		boolean result=rule.shouldCompare(context, main, reference);
+	
+		if (result == false) {
+			fail("Should be comparable");
+		}
+	}
+	
+	public void testShouldCompareRefImplsMainImpls() {
+		ConversationComparatorRule rule=new ConversationComparatorRule();
+		
+		java.util.List<ComparatorRule> rules=
+			new java.util.Vector<ComparatorRule>();
+
+		ModelReference mainRef=new ModelReference("main.ns",
+				"main.lp", "main.role", "main.notation");
+		
+		ModelReference refRef=new ModelReference("ref.ns",
+				"ref.lp", "ref.role", "ref.notation");
+		
+		DefaultComparatorContext context=
+			new DefaultComparatorContext(mainRef, refRef, rules);
+		
+		Conversation main=new Conversation();
+		LocatedName mainName=new LocatedName();
+		mainName.setName("modelName");
+		Role mainRole=new Role();
+		mainRole.setName("roleName1");
+		mainName.setRole(mainRole);
+		main.setLocatedName(mainName);
+		
+		Conversation reference=new Conversation();
+		LocatedName refName=new LocatedName();
+		refName.setName("modelName");
+		Role refRole=new Role();
+		refRole.setName("roleName2");
+		refName.setRole(refRole);
+		reference.setLocatedName(refName);
+		
+		ImplementsReference ir1=
+				new ImplementsReference("notation");
+		ir1.setNamespace("namespace");
+		ir1.setLocalpart("localpart");
+		ir1.setLocatedRole("role");
+		
+		main.getImplements().add(ir1);
+
+		reference.getImplements().add(ir1);
+		
+		boolean result=rule.shouldCompare(context, main, reference);
+	
+		if (result == false) {
+			fail("Should be comparable");
+		}
+	}
+	
+	public void testShouldCompareRefConformsToMainConformsTo() {
+		ConversationComparatorRule rule=new ConversationComparatorRule();
+		
+		java.util.List<ComparatorRule> rules=
+			new java.util.Vector<ComparatorRule>();
+
+		ModelReference mainRef=new ModelReference("main.ns",
+				"main.lp", "main.role", "main.notation");
+		
+		ModelReference refRef=new ModelReference("ref.ns",
+				"ref.lp", "ref.role", "ref.notation");
+		
+		DefaultComparatorContext context=
+			new DefaultComparatorContext(mainRef, refRef, rules);
+		
+		Conversation main=new Conversation();
+		LocatedName mainName=new LocatedName();
+		mainName.setName("modelName");
+		Role mainRole=new Role();
+		mainRole.setName("roleName1");
+		mainName.setRole(mainRole);
+		main.setLocatedName(mainName);
+		
+		Conversation reference=new Conversation();
+		LocatedName refName=new LocatedName();
+		refName.setName("modelName");
+		Role refRole=new Role();
+		refRole.setName("roleName2");
+		refName.setRole(refRole);
+		reference.setLocatedName(refName);
+		
+		ConformanceReference cr1=
+				new ConformanceReference("notation");
+		cr1.setNamespace("namespace");
+		cr1.setLocalpart("localpart");
+		cr1.setLocatedRole("role");
+		
+		main.getConformsTo().add(cr1);
+
+		reference.getConformsTo().add(cr1);
+		
+		boolean result=rule.shouldCompare(context, main, reference);
+	
+		if (result == false) {
+			fail("Should be comparable");
+		}
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/test/org/scribble/conversation/comparator/ConversationModelProtocolModelComparatorRuleTest.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/test/org/scribble/conversation/comparator/ConversationModelProtocolModelComparatorRuleTest.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/test/org/scribble/conversation/comparator/ConversationModelProtocolModelComparatorRuleTest.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,86 @@
+/*
+ * Copyright 2005-9 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 3 Mar 2009 : Initial version created by gary
+ */
+package org.scribble.conversation.comparator;
+
+import org.scribble.extensions.RegistryFactory;
+import org.scribble.model.*;
+import org.scribble.conversation.model.*;
+import org.scribble.protocol.model.*;
+import org.scribble.model.admin.DefaultModelListener;
+import org.scribble.comparator.*;
+import org.scribble.conformance.comparator.*;
+
+import junit.framework.TestCase;
+
+public class ConversationModelProtocolModelComparatorRuleTest extends TestCase {
+
+	private static final String TEST_NOTATION = "test";
+
+	public void testCompare() {
+		ConversationModelProtocolModelComparatorRule rule=
+				new ConversationModelProtocolModelComparatorRule();
+		
+		RegistryFactory.setRegistry(null);
+		
+		DefaultModelListener l=new DefaultModelListener();
+		
+		java.util.List<ComparatorRule> rules=
+					new java.util.Vector<ComparatorRule>();
+		
+		rules.add(new BehaviourListComparatorRule());
+		rules.add(new BlockComparatorRule());
+		
+		DefaultComparatorContext context=
+			new DefaultComparatorContext(new ModelReference(TEST_NOTATION),
+						new ModelReference(TEST_NOTATION), rules);
+
+		ConversationModel main=new ConversationModel();
+		Conversation mainConversation=new Conversation();
+		main.setConversation(mainConversation);
+		
+		LocatedName mainName=new LocatedName();
+		mainName.setName("modelName");
+		Role mainRole=new Role();
+		mainRole.setName("roleName");
+		mainName.setRole(mainRole);
+		mainConversation.setLocatedName(mainName);
+		
+		ProtocolModel reference=new ProtocolModel();
+		Protocol refProtocol=new Protocol();
+		reference.setProtocol(refProtocol);
+		
+		LocatedName refName=new LocatedName();
+		refName.setName("modelName");
+		Role refRole=new Role();
+		refRole.setName("roleName");
+		refName.setRole(refRole);
+		refProtocol.setLocatedName(refName);
+			
+		boolean result=rule.compare(context, main, reference, l, true);
+		
+		if (l.getErrors().size() > 0) {
+			fail("No errors expected");
+		}
+		
+		if (result == false) {
+			fail("Comparator should NOT have failed");
+		}
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/test/org/scribble/conversation/comparator/IfChoiceComparatorRuleTest.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/test/org/scribble/conversation/comparator/IfChoiceComparatorRuleTest.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/test/org/scribble/conversation/comparator/IfChoiceComparatorRuleTest.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,64 @@
+/*
+ * Copyright 2005-9 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 3 Mar 2009 : Initial version created by gary
+ */
+package org.scribble.conversation.comparator;
+
+import org.scribble.extensions.RegistryFactory;
+import org.scribble.model.*;
+import org.scribble.conversation.model.*;
+import org.scribble.protocol.model.*;
+import org.scribble.model.admin.DefaultModelListener;
+import org.scribble.comparator.*;
+
+import junit.framework.TestCase;
+
+public class IfChoiceComparatorRuleTest extends TestCase {
+
+	private static final String TEST_NOTATION = "test";
+
+	public void testCompareShallow() {
+		IfChoiceComparatorRule rule=
+				new IfChoiceComparatorRule();
+		
+		RegistryFactory.setRegistry(null);
+		
+		DefaultModelListener l=new DefaultModelListener();
+		
+		java.util.List<ComparatorRule> rules=
+					new java.util.Vector<ComparatorRule>();
+		
+		DefaultComparatorContext context=
+			new DefaultComparatorContext(new ModelReference(TEST_NOTATION),
+						new ModelReference(TEST_NOTATION), rules);
+
+		If main=new If();
+		
+		Choice reference=new Choice();
+			
+		boolean result=rule.compare(context, main, reference, l, false);
+		
+		if (l.getErrors().size() > 0) {
+			fail("No errors expected");
+		}
+		
+		if (result == false) {
+			fail("Comparator should NOT have failed");
+		}
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/test/org/scribble/conversation/comparator/IfComparatorRuleTest.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/test/org/scribble/conversation/comparator/IfComparatorRuleTest.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/test/org/scribble/conversation/comparator/IfComparatorRuleTest.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,63 @@
+/*
+ * Copyright 2005-9 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 3 Mar 2009 : Initial version created by gary
+ */
+package org.scribble.conversation.comparator;
+
+import org.scribble.extensions.RegistryFactory;
+import org.scribble.model.*;
+import org.scribble.conversation.model.*;
+import org.scribble.model.admin.DefaultModelListener;
+import org.scribble.comparator.*;
+
+import junit.framework.TestCase;
+
+public class IfComparatorRuleTest extends TestCase {
+
+	private static final String TEST_NOTATION = "test";
+
+	public void testCompareShallow() {
+		IfComparatorRule rule=
+				new IfComparatorRule();
+		
+		RegistryFactory.setRegistry(null);
+		
+		DefaultModelListener l=new DefaultModelListener();
+		
+		java.util.List<ComparatorRule> rules=
+					new java.util.Vector<ComparatorRule>();
+		
+		DefaultComparatorContext context=
+			new DefaultComparatorContext(new ModelReference(TEST_NOTATION),
+						new ModelReference(TEST_NOTATION), rules);
+
+		If main=new If();
+		
+		If reference=new If();
+			
+		boolean result=rule.compare(context, main, reference, l, false);
+		
+		if (l.getErrors().size() > 0) {
+			fail("No errors expected");
+		}
+		
+		if (result == false) {
+			fail("Comparator should NOT have failed");
+		}
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/test/org/scribble/conversation/comparator/InterruptBlockComparatorRuleTest.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/test/org/scribble/conversation/comparator/InterruptBlockComparatorRuleTest.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/test/org/scribble/conversation/comparator/InterruptBlockComparatorRuleTest.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,66 @@
+/*
+ * Copyright 2005-9 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 3 Mar 2009 : Initial version created by gary
+ */
+package org.scribble.conversation.comparator;
+
+import org.scribble.extensions.RegistryFactory;
+import org.scribble.model.*;
+import org.scribble.conversation.model.*;
+import org.scribble.model.admin.DefaultModelListener;
+import org.scribble.comparator.*;
+
+import junit.framework.TestCase;
+
+public class InterruptBlockComparatorRuleTest extends TestCase {
+
+	private static final String TEST_NOTATION = "test";
+
+	public void testCompareShallow() {
+		InterruptBlockComparatorRule rule=
+				new InterruptBlockComparatorRule();
+		
+		RegistryFactory.setRegistry(null);
+		
+		DefaultModelListener l=new DefaultModelListener();
+		
+		java.util.List<ComparatorRule> rules=
+					new java.util.Vector<ComparatorRule>();
+		
+		DefaultComparatorContext context=
+			new DefaultComparatorContext(new ModelReference(TEST_NOTATION),
+						new ModelReference(TEST_NOTATION), rules);
+
+		InterruptBlock main=new InterruptBlock();
+		
+		InterruptBlock reference=new InterruptBlock();
+			
+		boolean result=rule.compare(context, main, reference, l, false);
+		
+		if (l.getErrors().size() > 0) {
+			fail("No errors expected");
+		}
+		
+		if (result == false) {
+			fail("Comparator should NOT have failed");
+		}
+	}
+	
+	// TODO: If defined in both, may need to check expressions
+	// are compatible
+}

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/test/org/scribble/conversation/comparator/InterruptBlockProtocolComparatorRuleTest.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/test/org/scribble/conversation/comparator/InterruptBlockProtocolComparatorRuleTest.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/test/org/scribble/conversation/comparator/InterruptBlockProtocolComparatorRuleTest.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,67 @@
+/*
+ * Copyright 2005-9 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 3 Mar 2009 : Initial version created by gary
+ */
+package org.scribble.conversation.comparator;
+
+import org.scribble.extensions.RegistryFactory;
+import org.scribble.model.*;
+import org.scribble.model.admin.DefaultModelListener;
+import org.scribble.comparator.*;
+
+import junit.framework.TestCase;
+
+public class InterruptBlockProtocolComparatorRuleTest extends TestCase {
+
+	private static final String TEST_NOTATION = "test";
+
+	public void testCompareShallow() {
+		InterruptBlockComparatorRule rule=
+				new InterruptBlockComparatorRule();
+		
+		RegistryFactory.setRegistry(null);
+		
+		DefaultModelListener l=new DefaultModelListener();
+		
+		java.util.List<ComparatorRule> rules=
+					new java.util.Vector<ComparatorRule>();
+		
+		DefaultComparatorContext context=
+			new DefaultComparatorContext(new ModelReference(TEST_NOTATION),
+						new ModelReference(TEST_NOTATION), rules);
+
+		org.scribble.conversation.model.InterruptBlock main=
+				new org.scribble.conversation.model.InterruptBlock();
+		
+		org.scribble.protocol.model.InterruptBlock reference=
+			new org.scribble.protocol.model.InterruptBlock();
+			
+		boolean result=rule.compare(context, main, reference, l, false);
+		
+		if (l.getErrors().size() > 0) {
+			fail("No errors expected");
+		}
+		
+		if (result == false) {
+			fail("Comparator should NOT have failed");
+		}
+	}
+	
+	// TODO: If defined in both, may need to check expressions
+	// are compatible
+}

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/test/org/scribble/conversation/comparator/ParallelComparatorRuleTest.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/test/org/scribble/conversation/comparator/ParallelComparatorRuleTest.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/test/org/scribble/conversation/comparator/ParallelComparatorRuleTest.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,63 @@
+/*
+ * Copyright 2005-9 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 3 Mar 2009 : Initial version created by gary
+ */
+package org.scribble.conversation.comparator;
+
+import org.scribble.extensions.RegistryFactory;
+import org.scribble.model.*;
+import org.scribble.conversation.model.*;
+import org.scribble.model.admin.DefaultModelListener;
+import org.scribble.comparator.*;
+
+import junit.framework.TestCase;
+
+public class ParallelComparatorRuleTest extends TestCase {
+
+	private static final String TEST_NOTATION = "test";
+
+	public void testCompareShallow() {
+		ParallelComparatorRule rule=
+				new ParallelComparatorRule();
+		
+		RegistryFactory.setRegistry(null);
+		
+		DefaultModelListener l=new DefaultModelListener();
+		
+		java.util.List<ComparatorRule> rules=
+					new java.util.Vector<ComparatorRule>();
+		
+		DefaultComparatorContext context=
+			new DefaultComparatorContext(new ModelReference(TEST_NOTATION),
+						new ModelReference(TEST_NOTATION), rules);
+
+		Parallel main=new Parallel();
+		
+		Parallel reference=new Parallel();
+			
+		boolean result=rule.compare(context, main, reference, l, false);
+		
+		if (l.getErrors().size() > 0) {
+			fail("No errors expected");
+		}
+		
+		if (result == false) {
+			fail("Comparator should NOT have failed");
+		}
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/test/org/scribble/conversation/comparator/ParallelProtocolParallelComparatorRuleTest.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/test/org/scribble/conversation/comparator/ParallelProtocolParallelComparatorRuleTest.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/test/org/scribble/conversation/comparator/ParallelProtocolParallelComparatorRuleTest.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,64 @@
+/*
+ * Copyright 2005-9 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 3 Mar 2009 : Initial version created by gary
+ */
+package org.scribble.conversation.comparator;
+
+import org.scribble.extensions.RegistryFactory;
+import org.scribble.model.*;
+import org.scribble.model.admin.DefaultModelListener;
+import org.scribble.comparator.*;
+
+import junit.framework.TestCase;
+
+public class ParallelProtocolParallelComparatorRuleTest extends TestCase {
+
+	private static final String TEST_NOTATION = "test";
+
+	public void testCompareShallow() {
+		ParallelProtocolParallelComparatorRule rule=
+				new ParallelProtocolParallelComparatorRule();
+		
+		RegistryFactory.setRegistry(null);
+		
+		DefaultModelListener l=new DefaultModelListener();
+		
+		java.util.List<ComparatorRule> rules=
+					new java.util.Vector<ComparatorRule>();
+		
+		DefaultComparatorContext context=
+			new DefaultComparatorContext(new ModelReference(TEST_NOTATION),
+						new ModelReference(TEST_NOTATION), rules);
+
+		org.scribble.conversation.model.Parallel main=
+				new org.scribble.conversation.model.Parallel();
+		
+		org.scribble.protocol.model.Parallel reference=
+			new org.scribble.protocol.model.Parallel();
+			
+		boolean result=rule.compare(context, main, reference, l, false);
+		
+		if (l.getErrors().size() > 0) {
+			fail("No errors expected");
+		}
+		
+		if (result == false) {
+			fail("Comparator should NOT have failed");
+		}
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/test/org/scribble/conversation/comparator/RaiseComparatorRuleTest.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/test/org/scribble/conversation/comparator/RaiseComparatorRuleTest.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/test/org/scribble/conversation/comparator/RaiseComparatorRuleTest.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,179 @@
+/*
+ * Copyright 2005-9 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 3 Mar 2009 : Initial version created by gary
+ */
+package org.scribble.conversation.comparator;
+
+import org.scribble.extensions.RegistryFactory;
+import org.scribble.model.*;
+import org.scribble.conversation.model.*;
+import org.scribble.model.admin.DefaultModelListener;
+import org.scribble.comparator.*;
+
+import junit.framework.TestCase;
+
+public class RaiseComparatorRuleTest extends TestCase {
+
+	private static final String TEST_NOTATION = "test";
+
+	public void testCompareSameRaiseType() {
+		RaiseComparatorRule rule=
+				new RaiseComparatorRule();
+		
+		RegistryFactory.setRegistry(null);
+		
+		DefaultModelListener l=new DefaultModelListener();
+		
+		java.util.List<ComparatorRule> rules=
+					new java.util.Vector<ComparatorRule>();
+		
+		rules.add(new TypeReferenceComparatorRule());
+		
+		DefaultComparatorContext context=
+			new DefaultComparatorContext(new ModelReference(TEST_NOTATION),
+						new ModelReference(TEST_NOTATION), rules);
+
+		Raise main=new Raise();
+		TypeReference mainType=new TypeReference();
+		mainType.setLocalpart("RaiseType");
+		main.setType(mainType);
+		
+		Raise reference=new Raise();
+		TypeReference refType=new TypeReference();
+		refType.setLocalpart("RaiseType");
+		reference.setType(refType);
+			
+		boolean result=rule.compare(context, main, reference, l, false);
+		
+		if (l.getErrors().size() > 0) {
+			fail("No errors expected");
+		}
+		
+		if (result == false) {
+			fail("Comparator should NOT have failed");
+		}
+	}
+
+	public void testCompareDiffRaiseTypes() {
+		RaiseComparatorRule rule=
+				new RaiseComparatorRule();
+		
+		RegistryFactory.setRegistry(null);
+		
+		DefaultModelListener l=new DefaultModelListener();
+		
+		java.util.List<ComparatorRule> rules=
+					new java.util.Vector<ComparatorRule>();
+		
+		rules.add(new TypeReferenceComparatorRule());
+		
+		DefaultComparatorContext context=
+			new DefaultComparatorContext(new ModelReference(TEST_NOTATION),
+						new ModelReference(TEST_NOTATION), rules);
+
+		Raise main=new Raise();
+		TypeReference mainType=new TypeReference();
+		mainType.setLocalpart("RaiseType1");
+		main.setType(mainType);
+		
+		Raise reference=new Raise();
+		TypeReference refType=new TypeReference();
+		refType.setLocalpart("RaiseType2");
+		reference.setType(refType);
+			
+		boolean result=rule.compare(context, main, reference, l, false);
+		
+		if (l.getErrors().size() != 1) {
+			fail("One error expected");
+		}
+		
+		if (result == true) {
+			fail("Comparator should have failed");
+		}
+	}
+
+	public void testCompareMissingMainRaiseType() {
+		RaiseComparatorRule rule=
+				new RaiseComparatorRule();
+		
+		RegistryFactory.setRegistry(null);
+		
+		DefaultModelListener l=new DefaultModelListener();
+		
+		java.util.List<ComparatorRule> rules=
+					new java.util.Vector<ComparatorRule>();
+		
+		rules.add(new TypeReferenceComparatorRule());
+		
+		DefaultComparatorContext context=
+			new DefaultComparatorContext(new ModelReference(TEST_NOTATION),
+						new ModelReference(TEST_NOTATION), rules);
+
+		Raise main=new Raise();
+		
+		Raise reference=new Raise();
+		TypeReference refType=new TypeReference();
+		refType.setLocalpart("RaiseType");
+		reference.setType(refType);
+			
+		boolean result=rule.compare(context, main, reference, l, false);
+		
+		if (l.getErrors().size() > 0) {
+			fail("No errors expected");
+		}
+		
+		if (result == true) {
+			fail("Comparator should have failed");
+		}
+	}
+
+	public void testCompareMissingRefRaiseType() {
+		RaiseComparatorRule rule=
+				new RaiseComparatorRule();
+		
+		RegistryFactory.setRegistry(null);
+		
+		DefaultModelListener l=new DefaultModelListener();
+		
+		java.util.List<ComparatorRule> rules=
+					new java.util.Vector<ComparatorRule>();
+		
+		rules.add(new TypeReferenceComparatorRule());
+		
+		DefaultComparatorContext context=
+			new DefaultComparatorContext(new ModelReference(TEST_NOTATION),
+						new ModelReference(TEST_NOTATION), rules);
+
+		Raise main=new Raise();
+		TypeReference mainType=new TypeReference();
+		mainType.setLocalpart("RaiseType");
+		main.setType(mainType);
+		
+		Raise reference=new Raise();
+			
+		boolean result=rule.compare(context, main, reference, l, false);
+		
+		if (l.getErrors().size() > 0) {
+			fail("No errors expected");
+		}
+		
+		if (result == true) {
+			fail("Comparator should have failed");
+		}
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/test/org/scribble/conversation/comparator/RaiseProtocolComparatorRuleTest.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/test/org/scribble/conversation/comparator/RaiseProtocolComparatorRuleTest.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/test/org/scribble/conversation/comparator/RaiseProtocolComparatorRuleTest.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,212 @@
+/*
+ * Copyright 2005-9 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 3 Mar 2009 : Initial version created by gary
+ */
+package org.scribble.conversation.comparator;
+
+import org.scribble.extensions.RegistryFactory;
+import org.scribble.model.*;
+import org.scribble.model.admin.DefaultModelListener;
+import org.scribble.comparator.*;
+
+import junit.framework.TestCase;
+
+public class RaiseProtocolComparatorRuleTest extends TestCase {
+
+	private static final String TEST_NOTATION = "test";
+
+	public void testCompareSameRaiseType() {
+		RaiseProtocolComparatorRule rule=
+				new RaiseProtocolComparatorRule();
+		
+		RegistryFactory.setRegistry(null);
+		
+		DefaultModelListener l=new DefaultModelListener();
+		
+		java.util.List<ComparatorRule> rules=
+					new java.util.Vector<ComparatorRule>();
+		
+		rules.add(new TypeReferenceComparatorRule());
+		
+		DefaultComparatorContext context=
+			new DefaultComparatorContext(new ModelReference(TEST_NOTATION),
+						new ModelReference(TEST_NOTATION), rules);
+
+		org.scribble.conversation.model.Raise main=
+				new org.scribble.conversation.model.Raise();
+		TypeReference mainType=new TypeReference();
+		mainType.setLocalpart("RaiseType");
+		main.setType(mainType);
+		
+		org.scribble.protocol.model.Raise reference=
+			new org.scribble.protocol.model.Raise();
+		TypeReference refType=new TypeReference();
+		refType.setLocalpart("RaiseType");
+		reference.setType(refType);
+			
+		boolean result=rule.compare(context, main, reference, l, false);
+		
+		if (l.getErrors().size() > 0) {
+			fail("No errors expected");
+		}
+		
+		if (result == false) {
+			fail("Comparator should NOT have failed");
+		}
+	}
+
+	public void testCompareDiffRaiseTypes() {
+		RaiseProtocolComparatorRule rule=
+				new RaiseProtocolComparatorRule();
+		
+		RegistryFactory.setRegistry(null);
+		
+		DefaultModelListener l=new DefaultModelListener();
+		
+		java.util.List<ComparatorRule> rules=
+					new java.util.Vector<ComparatorRule>();
+		
+		rules.add(new TypeReferenceComparatorRule());
+		
+		DefaultComparatorContext context=
+			new DefaultComparatorContext(new ModelReference(TEST_NOTATION),
+						new ModelReference(TEST_NOTATION), rules);
+
+		org.scribble.conversation.model.Raise main=
+			new org.scribble.conversation.model.Raise();
+		TypeReference mainType=new TypeReference();
+		mainType.setLocalpart("RaiseType1");
+		main.setType(mainType);
+		
+		org.scribble.protocol.model.Raise reference=
+			new org.scribble.protocol.model.Raise();
+		TypeReference refType=new TypeReference();
+		refType.setLocalpart("RaiseType2");
+		reference.setType(refType);
+			
+		boolean result=rule.compare(context, main, reference, l, false);
+		
+		if (l.getErrors().size() != 1) {
+			fail("One error expected");
+		}
+		
+		if (result == true) {
+			fail("Comparator should have failed");
+		}
+	}
+
+	public void testCompareMissingMainRaiseType() {
+		RaiseProtocolComparatorRule rule=
+				new RaiseProtocolComparatorRule();
+		
+		RegistryFactory.setRegistry(null);
+		
+		DefaultModelListener l=new DefaultModelListener();
+		
+		java.util.List<ComparatorRule> rules=
+					new java.util.Vector<ComparatorRule>();
+		
+		rules.add(new TypeReferenceComparatorRule());
+		
+		DefaultComparatorContext context=
+			new DefaultComparatorContext(new ModelReference(TEST_NOTATION),
+						new ModelReference(TEST_NOTATION), rules);
+
+		org.scribble.conversation.model.Raise main=
+			new org.scribble.conversation.model.Raise();
+		
+		org.scribble.protocol.model.Raise reference=
+			new org.scribble.protocol.model.Raise();
+		TypeReference refType=new TypeReference();
+		refType.setLocalpart("RaiseType");
+		reference.setType(refType);
+			
+		boolean result=rule.compare(context, main, reference, l, false);
+		
+		if (l.getErrors().size() > 0) {
+			fail("No errors expected");
+		}
+		
+		if (result == true) {
+			fail("Comparator should have failed");
+		}
+	}
+
+	public void testCompareMissingRefRaiseType() {
+		RaiseProtocolComparatorRule rule=
+				new RaiseProtocolComparatorRule();
+		
+		RegistryFactory.setRegistry(null);
+		
+		DefaultModelListener l=new DefaultModelListener();
+		
+		java.util.List<ComparatorRule> rules=
+					new java.util.Vector<ComparatorRule>();
+		
+		rules.add(new TypeReferenceComparatorRule());
+		
+		DefaultComparatorContext context=
+			new DefaultComparatorContext(new ModelReference(TEST_NOTATION),
+						new ModelReference(TEST_NOTATION), rules);
+
+		org.scribble.conversation.model.Raise main=
+			new org.scribble.conversation.model.Raise();
+		TypeReference mainType=new TypeReference();
+		mainType.setLocalpart("RaiseType");
+		main.setType(mainType);
+		
+		org.scribble.protocol.model.Raise reference=
+			new org.scribble.protocol.model.Raise();
+			
+		boolean result=rule.compare(context, main, reference, l, false);
+		
+		if (l.getErrors().size() > 0) {
+			fail("No errors expected");
+		}
+		
+		if (result == true) {
+			fail("Comparator should have failed");
+		}
+	}
+	
+	public void testIsSupportedProtocolRefConvMain() {
+		RaiseProtocolComparatorRule rule=
+			new RaiseProtocolComparatorRule();
+
+		boolean result=rule.isComparisonSupported(
+				new org.scribble.conversation.model.Raise(),
+				new org.scribble.protocol.model.Raise());
+		
+		if (result == false) {
+			fail("Should be supported");
+		}
+	}
+	
+	public void testIsSupportedProtocolMainConvRef() {
+		RaiseProtocolComparatorRule rule=
+			new RaiseProtocolComparatorRule();
+
+		boolean result=rule.isComparisonSupported(
+				new org.scribble.protocol.model.Raise(),
+				new org.scribble.conversation.model.Raise());
+		
+		if (result == true) {
+			fail("Should NOT be supported");
+		}
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.eclipse/.classpath
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.eclipse/.classpath	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.eclipse/.classpath	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+	<classpathentry kind="src" path="src/java"/>
+	<classpathentry kind="output" path="classes"/>
+</classpath>

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.eclipse/.project
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.eclipse/.project	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.eclipse/.project	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>org.scribble.conversation.eclipse</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.ManifestBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.SchemaBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.pde.PluginNature</nature>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+	</natures>
+</projectDescription>

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.eclipse/META-INF/MANIFEST.MF
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.eclipse/META-INF/MANIFEST.MF	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.eclipse/META-INF/MANIFEST.MF	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,15 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Conversation Eclipse Plug-in
+Bundle-SymbolicName: org.scribble.conversation.eclipse
+Bundle-Version: 0.1.0.qualifier
+Bundle-Activator: org.scribble.conversation.eclipse.Activator
+Bundle-Vendor: www.scribble.org
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Import-Package: org.osgi.framework;version="1.3.0"
+Require-Bundle: org.scribble.core,
+ org.scribble.conversation.model,
+ org.eclipse.swt,
+ org.eclipse.jface,
+ org.scribble.eclipse
+Scribble-Extensions: org.scribble.conversation.eclipse.model.outliner.ConversationModelOutlinerRule

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.eclipse/build.properties
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.eclipse/build.properties	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.eclipse/build.properties	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,4 @@
+source.. = src/java/
+output.. = classes/
+bin.includes = META-INF/,\
+               .

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.eclipse/classes/org/scribble/conversation/eclipse/Activator.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conversation.eclipse/classes/org/scribble/conversation/eclipse/Activator.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.eclipse/classes/org/scribble/conversation/eclipse/model/images/ScribbleImages.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conversation.eclipse/classes/org/scribble/conversation/eclipse/model/images/ScribbleImages.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.eclipse/classes/org/scribble/conversation/eclipse/model/images/conversation.png
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conversation.eclipse/classes/org/scribble/conversation/eclipse/model/images/conversation.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.eclipse/classes/org/scribble/conversation/eclipse/model/images/variable.png
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conversation.eclipse/classes/org/scribble/conversation/eclipse/model/images/variable.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.eclipse/classes/org/scribble/conversation/eclipse/model/outliner/ConversationModelOutlinerRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conversation.eclipse/classes/org/scribble/conversation/eclipse/model/outliner/ConversationModelOutlinerRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.eclipse/src/java/org/scribble/conversation/eclipse/Activator.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.eclipse/src/java/org/scribble/conversation/eclipse/Activator.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.eclipse/src/java/org/scribble/conversation/eclipse/Activator.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,22 @@
+package org.scribble.conversation.eclipse;
+
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+
+public class Activator implements BundleActivator {
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext)
+	 */
+	public void start(BundleContext context) throws Exception {
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext)
+	 */
+	public void stop(BundleContext context) throws Exception {
+	}
+
+}

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.eclipse/src/java/org/scribble/conversation/eclipse/model/images/ScribbleImages.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.eclipse/src/java/org/scribble/conversation/eclipse/model/images/ScribbleImages.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.eclipse/src/java/org/scribble/conversation/eclipse/model/images/ScribbleImages.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,71 @@
+/*
+ * Copyright 2007-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 22 Feb 2008 : Initial version created by gary
+ */
+package org.scribble.conversation.eclipse.model.images;
+
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.jface.resource.ImageDescriptor;
+
+/**
+ * This class provides access to images configured within the
+ * environment.
+ */
+public class ScribbleImages {
+
+	/**
+     * This method returns the image associated with the
+     * supplied name.
+     * 
+     * @param name The name
+     * @return The image
+     */
+    public static Image getImage(String name) {
+    	Image ret=null;
+    	
+    	// Make sure the image descriptor is registered
+    	getImageDescriptor(name);
+    	
+    	ret = m_registry.get(name);
+    	
+    	return(ret);
+    }
+    
+    /**
+     * This method returns the image descriptor associated with the
+     * supplied name.
+     * 
+     * @param name The name
+     * @return The descriptor
+     */
+    public static ImageDescriptor getImageDescriptor(String name) {
+    	ImageDescriptor ret=null;
+    	
+    	if ((ret = m_registry.getDescriptor(name)) == null) {
+    	    ret = ImageDescriptor.createFromFile(ScribbleImages.class,
+    	    				name);
+    	    
+    	    m_registry.put(name, ret);
+    	}
+    	
+    	return(ret);
+    }
+
+    private static org.eclipse.jface.resource.ImageRegistry m_registry=
+    		new org.eclipse.jface.resource.ImageRegistry();
+}

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.eclipse/src/java/org/scribble/conversation/eclipse/model/images/conversation.png
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conversation.eclipse/src/java/org/scribble/conversation/eclipse/model/images/conversation.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.eclipse/src/java/org/scribble/conversation/eclipse/model/images/variable.png
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conversation.eclipse/src/java/org/scribble/conversation/eclipse/model/images/variable.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.eclipse/src/java/org/scribble/conversation/eclipse/model/outliner/ConversationModelOutlinerRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.eclipse/src/java/org/scribble/conversation/eclipse/model/outliner/ConversationModelOutlinerRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.eclipse/src/java/org/scribble/conversation/eclipse/model/outliner/ConversationModelOutlinerRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,222 @@
+/*
+ * Copyright 2007-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 22 Feb 2008 : Initial version created by gary
+ */
+package org.scribble.conversation.eclipse.model.outliner;
+
+import org.eclipse.swt.graphics.Image;
+import org.scribble.eclipse.model.outliner.*;
+import org.scribble.extensions.RegistryInfo;
+import org.scribble.model.Block;
+import org.scribble.conversation.model.*;
+
+/**
+ * This class provides the model outliner details for the
+ * conversation notation.
+ */
+ at RegistryInfo(extension=OutlinerRule.class,notation=ConversationNotation.NOTATION_CODE)
+public class ConversationModelOutlinerRule extends AbstractModelOutlinerRule {
+
+	/**
+	 * This method determines whether the outliner rules is
+	 * appropriate to process the supplied element.
+	 * 
+	 * @param element The element
+	 * @return Whether the outliner rule can process the
+	 * 						supplied element
+	 */
+	public boolean isSupported(Object element) {
+		boolean ret=false;
+		
+		if (element instanceof ConversationModel ||
+				element instanceof Conversation ||
+				element instanceof VariableList ||
+				element instanceof ConditionalBlock ||
+				element instanceof CatchBlock ||
+				element instanceof InterruptBlock ||
+				element instanceof TryEscape ||
+				element instanceof If ||
+				element instanceof Parallel ||
+				element instanceof Raise ||
+				element instanceof Run ||
+				element instanceof Spawn ||
+				element instanceof When ||
+				element instanceof While) {
+			ret = true;
+		} else {
+			ret = super.isSupported(element);
+		}
+		
+		return(ret);
+	}
+	
+	/**
+	 * This method returns the label to be displayed
+	 * for the supplied object.
+	 * 
+	 * @param obj The object
+	 * @return The label
+	 */
+	public String getLabel(Object obj) {
+		String ret=null;
+		
+		if (obj instanceof Conversation) {
+			ret = ((Conversation)obj).getLocatedName().getName();
+			
+			if (((Conversation)obj).getLocatedName().getRole() != null) {
+				ret += "@"+((Conversation)obj).getLocatedName().getRole().getName();
+			}
+		} else if (obj instanceof VariableList) {
+			
+			ret = "Variables";
+			
+		} else if (obj instanceof Variable) {
+			Variable var=(Variable)obj;
+			
+			ret = var.getName()+" : ";
+			
+			if (var.getType() != null) {
+				ret += var.getType().getAlias();
+			}
+			
+		} else if (obj instanceof CatchBlock) {
+			
+			ret = "catch";
+			
+		} else if (obj instanceof InterruptBlock) {
+			
+			ret = "interrupt";
+			
+		} else if (obj instanceof ConditionalBlock) {
+			
+			if (((ConditionalBlock)obj).getParent() instanceof If) {
+				If elem=(If)((ConditionalBlock)obj).getParent();
+				
+				if (elem.getConditionalBlocks().indexOf(obj) == 0) {
+					ret = "then";
+				} else {
+					ret = "else if";
+				}
+			} else if (((ConditionalBlock)obj).getParent() instanceof When) {
+				ret = "situation";
+			}
+		} else if (obj instanceof Block) {
+			
+			if (((Block)obj).getParent() instanceof Parallel) {
+				ret = "and";
+			} else if (((Block)obj).getParent() instanceof If) {
+				ret = "else";
+			} else if (((Block)obj).getParent() instanceof TryEscape) {
+				ret = "";
+			}
+		} else if (obj instanceof If) {			
+			ret = "If";
+		} else if (obj instanceof Parallel) {			
+			ret = "Parallel";
+		} else if (obj instanceof While) {			
+			ret = "While";
+		} else if (obj instanceof When) {			
+			ret = "When";
+		} else if (obj instanceof TryEscape) {			
+			ret = "Try";
+		} else if (obj instanceof Run) {			
+			ret = "Run "+getReferenceDescription(((Run)obj).getReference());
+		} else if (obj instanceof Spawn) {			
+			ret = "Spawn "+getReferenceDescription(((Spawn)obj).getReference());
+		} else {
+			ret = super.getLabel(obj);
+		}
+		
+		return(ret);
+	}
+	
+	/**
+	 * This method returns an optional image associated with
+	 * the supplied object.
+	 * 
+	 * @param obj The object
+	 * @return The image, or null if no image to display
+	 */
+	public org.eclipse.swt.graphics.Image getImage(Object obj) {
+		Image ret=null;
+
+		if (obj instanceof Conversation) {
+			ret = org.scribble.conversation.eclipse.model.images.ScribbleImages.getImage("conversation.png");
+		} else if (obj instanceof org.scribble.conversation.model.Variable ||
+				obj instanceof org.scribble.conversation.model.VariableList) {
+			ret = org.scribble.conversation.eclipse.model.images.ScribbleImages.getImage("variable.png");
+		} else {
+			ret = super.getImage(obj);
+		}
+		
+		return(ret);		
+	}
+	
+	/**
+	 * This method returns the list of children associated
+	 * with the supplied object.
+	 * 
+	 * @param obj The object
+	 * @return The list of child objects
+	 */
+	public java.util.List<Object> getChildren(Object obj) {
+		java.util.List<Object> ret=null;
+		
+		if (obj instanceof ConversationModel) {
+			ConversationModel cm=(ConversationModel)obj;
+			
+			ret = super.getModelChildren(cm);
+			
+			if (cm.getConversation() != null) {
+				ret.add(cm.getConversation());
+			}
+		} else if (obj instanceof While) {
+			ret = new java.util.Vector<Object>(((While)obj).getBlock().getContents());
+			
+		} else if (obj instanceof VariableList) {
+			
+			ret = new java.util.Vector<Object>(((VariableList)obj).getVariables());
+		} else {
+			ret = super.getChildren(obj);
+		}
+		
+		return(ret);
+	}
+	
+	/**
+	 * This method determines whether the supplied object has
+	 * children.
+	 * 
+	 * @param obj The object
+	 * @return Whether the object has children
+	 */
+	public boolean hasChildren(Object obj) {
+		boolean ret=false;
+		
+		if (obj instanceof VariableList) {
+			ret = true;
+		} else if (obj instanceof While) {
+			ret = ((While)obj).getBlock().getContents().size() > 0;
+		} else {
+			ret = super.hasChildren(obj);
+		}
+		
+		return(ret);
+	}
+	
+}

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.export.monitor/.classpath
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.export.monitor/.classpath	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.export.monitor/.classpath	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+	<classpathentry kind="src" path="src/java"/>
+	<classpathentry kind="src" path="src/plugintest"/>
+	<classpathentry kind="output" path="classes"/>
+</classpath>

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.export.monitor/.project
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.export.monitor/.project	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.export.monitor/.project	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>org.scribble.conversation.export.monitor</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.ManifestBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.SchemaBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.pde.PluginNature</nature>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+	</natures>
+</projectDescription>

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.export.monitor/META-INF/MANIFEST.MF
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.export.monitor/META-INF/MANIFEST.MF	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.export.monitor/META-INF/MANIFEST.MF	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,17 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Scribble Conversation Export Monitor Plug-in
+Bundle-SymbolicName: org.scribble.conversation.export.monitor
+Bundle-Version: 0.1.0.qualifier
+Bundle-Activator: org.scribble.conversation.export.monitor.osgi.Activator
+Bundle-Vendor: www.scribble.org
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Import-Package: org.osgi.framework;version="1.3.0"
+Require-Bundle: org.scribble.core,
+ org.scribble.conversation.model,
+ org.scribble.monitor,
+ org.junit;resolution:=optional
+Scribble-Extensions: org.scribble.conversation.export.monitor.ConversationModelMonitorExportRule,
+  org.scribble.conversation.export.monitor.ConversationMonitorExportRule
+Bundle-ClassPath: src/lib/xstream-1.3.1.jar,
+ .

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.export.monitor/build.properties
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.export.monitor/build.properties	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.export.monitor/build.properties	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,5 @@
+source.. = src/java/
+output.. = classes/
+bin.includes = META-INF/,\
+               .,\
+               src/lib/xstream-1.3.1.jar

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.export.monitor/classes/org/scribble/conversation/export/monitor/ConversationModelMonitorExportRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conversation.export.monitor/classes/org/scribble/conversation/export/monitor/ConversationModelMonitorExportRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.export.monitor/classes/org/scribble/conversation/export/monitor/ConversationMonitorExportRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conversation.export.monitor/classes/org/scribble/conversation/export/monitor/ConversationMonitorExportRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.export.monitor/classes/org/scribble/conversation/export/monitor/MonitorExportTest$ConversationToBPELTest.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conversation.export.monitor/classes/org/scribble/conversation/export/monitor/MonitorExportTest$ConversationToBPELTest.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.export.monitor/classes/org/scribble/conversation/export/monitor/MonitorExportTest.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conversation.export.monitor/classes/org/scribble/conversation/export/monitor/MonitorExportTest.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.export.monitor/classes/org/scribble/conversation/export/monitor/osgi/Activator.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conversation.export.monitor/classes/org/scribble/conversation/export/monitor/osgi/Activator.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.export.monitor/classes/org/scribble/conversation/export/monitor/testmodels/EventHandler at Store.scv
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.export.monitor/classes/org/scribble/conversation/export/monitor/testmodels/EventHandler at Store.scv	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.export.monitor/classes/org/scribble/conversation/export/monitor/testmodels/EventHandler at Store.scv	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,19 @@
+namespace org.examples;
+
+conversation EventHandler at Store {
+	role	Buyer, CreditAgency;
+
+	buy(BuyInfo) from Buyer to Store request "buy";
+	
+	creditCheck(CreditInformation) from Store to CreditAgency;
+	
+	// No request/replyTo, so will be treated as invocations on a callback interface
+	
+	if @ CreditAgency {
+		checkCreditOk(CreditCheckOk) from CreditAgency to Store;
+		buy(Confirmed) from Store to Buyer replyTo "buy";
+	} else if {
+		checkCreditInvalid(CreditCheckInvalid) from CreditAgency to Store;
+		buy(Rejected) from Store to Buyer replyTo "buy";
+	}
+}
\ No newline at end of file

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.export.monitor/src/java/org/scribble/conversation/export/monitor/ConversationModelMonitorExportRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.export.monitor/src/java/org/scribble/conversation/export/monitor/ConversationModelMonitorExportRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.export.monitor/src/java/org/scribble/conversation/export/monitor/ConversationModelMonitorExportRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,75 @@
+/*
+ * Copyright 2007-9 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 10 May 2009 : Initial version created by gary
+ */
+package org.scribble.conversation.export.monitor;
+
+import org.scribble.export.*;
+import org.scribble.extensions.RegistryInfo;
+import org.scribble.model.*;
+import org.scribble.monitor.model.ConversationType;
+import org.scribble.conversation.model.*;
+import org.scribble.export.monitor.*;
+
+/**
+ * This class implements the monitor based export rule for the
+ * ConversationModel entity.
+ */
+ at RegistryInfo(extension=ExportRule.class,notation=ConversationNotation.NOTATION_CODE)
+public class ConversationModelMonitorExportRule extends AbstractModelMonitorExportRule {
+
+	/**
+	 * This method determines whether the exporter rule is appropriate
+	 * for the supplied model object and format.
+	 * 
+	 * @param modelObject The model object
+	 * @param format The format
+	 * @return Whether the rule is appropriate for the model object and
+	 * 						format
+	 */
+	public boolean isSupported(ModelObject modelObject, Formatter format) {
+		return(super.isSupported(modelObject, format) &&
+				ConversationModel.class.isAssignableFrom(modelObject.getClass()));
+	}
+
+	/**
+	 * This method exports the model object.
+	 * 
+	 * @param modelObject The model object
+	 * @param context The context
+	 * @throws IOException Failed to record export information
+	 */
+	public void export(ModelObject modelObject, ExporterContext context)
+							throws java.io.IOException {
+		ConversationModel model=(ConversationModel)modelObject;
+		MonitorFormatter formatter=(MonitorFormatter)context.getFormatter();
+		
+		super.export(model, context);
+		
+		if (model.getConversation() != null) {
+			context.export(model.getConversation());
+		}
+		
+		// Set the description node
+		Object obj=context.pop();
+		
+		if (obj instanceof ConversationType) {
+			formatter.setDescription((ConversationType)obj);
+		}
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.export.monitor/src/java/org/scribble/conversation/export/monitor/ConversationMonitorExportRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.export.monitor/src/java/org/scribble/conversation/export/monitor/ConversationMonitorExportRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.export.monitor/src/java/org/scribble/conversation/export/monitor/ConversationMonitorExportRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,73 @@
+/*
+ * Copyright 2007-9 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 11 May 2009 : Initial version created by gary
+ */
+package org.scribble.conversation.export.monitor;
+
+import org.scribble.export.*;
+import org.scribble.extensions.RegistryInfo;
+import org.scribble.model.*;
+import org.scribble.monitor.ConversationTypeName;
+import org.scribble.monitor.model.ConversationType;
+import org.scribble.conversation.model.*;
+import org.scribble.export.monitor.*;
+
+/**
+ * This class implements the monitor based export rule for the
+ * Conversation entity.
+ */
+ at RegistryInfo(extension=ExportRule.class,notation=ConversationNotation.NOTATION_CODE)
+public class ConversationMonitorExportRule implements ExportRule {
+
+	/**
+	 * This method determines whether the exporter rule is appropriate
+	 * for the supplied model object and format.
+	 * 
+	 * @param modelObject The model object
+	 * @param format The format
+	 * @return Whether the rule is appropriate for the model object and
+	 * 						format
+	 */
+	public boolean isSupported(ModelObject modelObject, Formatter format) {
+		return(Conversation.class.isAssignableFrom(modelObject.getClass()) &&
+				format instanceof MonitorFormatter);
+	}
+
+	/**
+	 * This method exports the model object.
+	 * 
+	 * @param modelObject The model object
+	 * @param context The context
+	 * @throws IOException Failed to record export information
+	 */
+	public void export(ModelObject modelObject, ExporterContext context)
+							throws java.io.IOException {
+		Conversation model=(Conversation)modelObject;
+		//MonitorFormatter formatter=(MonitorFormatter)context.getFormatter();
+		
+		ConversationType node=new ConversationType();
+		
+		ConversationTypeName name=new ConversationTypeName();
+		name.setName(model.getLocatedName().getName()+"@"+
+					model.getLocatedName().getRole().getName());
+		
+		node.setName(name);
+		
+		context.push(node);
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.export.monitor/src/java/org/scribble/conversation/export/monitor/osgi/Activator.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.export.monitor/src/java/org/scribble/conversation/export/monitor/osgi/Activator.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.export.monitor/src/java/org/scribble/conversation/export/monitor/osgi/Activator.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,41 @@
+/*
+ * Copyright 2007-9 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 10 May 2009 : Initial version created by gary
+ */
+package org.scribble.conversation.export.monitor.osgi;
+
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+
+public class Activator implements BundleActivator {
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext)
+	 */
+	public void start(BundleContext context) throws Exception {
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext)
+	 */
+	public void stop(BundleContext context) throws Exception {
+	}
+
+}

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.export.monitor/src/plugintest/org/scribble/conversation/export/monitor/MonitorExportTest.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.export.monitor/src/plugintest/org/scribble/conversation/export/monitor/MonitorExportTest.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.export.monitor/src/plugintest/org/scribble/conversation/export/monitor/MonitorExportTest.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,166 @@
+/*
+ * Copyright 2007-9 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 10 May 2009 : Initial version created by gary
+ */
+package org.scribble.conversation.export.monitor;
+
+import junit.framework.TestCase;
+import junit.framework.TestResult;
+import junit.framework.TestSuite;
+
+import org.scribble.conversation.model.ConversationNotation;
+import org.scribble.extensions.RegistryFactory;
+import org.scribble.model.ModelReference;
+import org.scribble.model.SubDefinitionPath;
+import org.scribble.model.change.ModelGenerator;
+import org.scribble.monitor.model.ConversationType;
+
+public class MonitorExportTest extends TestCase {
+
+    public static TestSuite suite() {
+        TestSuite suite = new TestSuite("Conversation->Exported Monitor Description Tests");
+        
+        suite.addTest(new ConversationToBPELTest("EventHandler at Store"));
+       
+        return suite;
+    }
+    
+    /**
+     * The test case for running the conversation to monitor description test.
+     */
+	protected static class ConversationToBPELTest extends TestCase {
+
+		/**
+		 * This constructor is initialized with the test
+		 * name.
+		 * 
+		 * @param name The test name
+		 */
+		public ConversationToBPELTest(String name) {
+			super(name);
+			m_name = name;
+		}
+		
+		/**
+		 * This method runs the test.
+		 * 
+		 * @param result The test result
+		 */
+		public void run(TestResult result) {
+			result.startTest(this);
+			
+			String filename="testmodels/"+m_name+".scv";
+			
+			java.io.InputStream is=
+				MonitorExportTest.class.getResourceAsStream(filename);
+			
+			if (is == null) {
+				result.addError(this,
+						new Throwable("Unable to locate resource: "+filename));
+			} else {			
+				org.scribble.parser.Parser p=new org.scribble.parser.DefaultParser();
+				org.scribble.model.ModelReference ref=
+						new org.scribble.model.ModelReference(ConversationNotation.NOTATION_CODE);
+				org.scribble.model.admin.ModelListener l=
+						new org.scribble.model.admin.DefaultModelListener();
+				
+				org.scribble.model.Model model=p.parse(ref, is, l);
+				
+				if (model == null) {
+					result.addError(this, new Throwable("Model is null"));
+				} else {
+					org.scribble.export.Exporter exporter=
+						(org.scribble.export.Exporter)
+						org.scribble.extensions.RegistryFactory.getRegistry().
+						getExtension(org.scribble.export.Exporter.class,
+								ConversationNotation.NOTATION_CODE);
+					
+					org.scribble.export.monitor.MonitorFormatter formatter=
+						new org.scribble.export.monitor.MonitorFormatter();
+					
+					try {
+						exporter.export(ref, model, formatter);
+						
+						// Convert description to XML
+						ConversationType node=formatter.getDescription();
+						
+						if (node != null) {
+							String monitor=null;
+							
+							checkResults(result, monitor);
+						}
+						
+					} catch(Exception e) {
+						result.addError(this, e);
+					}
+				}
+			}
+			
+			result.endTest(this);
+		}
+		
+		/**
+		 * This method checks the generated Monitor description against a
+		 * previously stored correct version.
+		 * 
+		 * @param result The test result
+		 * @param monitor The monitor description
+		 */
+		protected void checkResults(TestResult result, String monitor) {
+
+			String filename="results/"+m_name+".monitor";
+			
+			java.io.InputStream is=
+				MonitorExportTest.class.getResourceAsStream(filename);
+			
+			if (is != null) {
+				
+				try {
+					byte[] b=new byte[is.available()];
+				
+					is.read(b);
+					
+					is.close();
+					
+					String orig=new String(b);
+					
+					if (orig.equals(monitor) == false) {
+						result.addError(this,
+							new Throwable("Generated monitor description does not match stored version"));
+						
+						System.out.println("COMPARED GENERATED:");
+						System.out.println("["+monitor+"]");
+						System.out.println("WITH ORIGINAL:");
+						System.out.println("["+orig+"]");
+					}
+				} catch(Exception e) {
+					result.addError(this, e);
+				}
+			} else {
+				result.addError(this,
+						new Throwable("Resulting monitor description '"+filename+
+								"' not found for comparison"));
+
+				System.out.println("NEW GENERATED:");
+				System.out.println("["+monitor+"]");
+			}
+		}
+
+		private String m_name=null;
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.export.monitor/src/plugintest/org/scribble/conversation/export/monitor/testmodels/EventHandler at Store.scv
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.export.monitor/src/plugintest/org/scribble/conversation/export/monitor/testmodels/EventHandler at Store.scv	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.export.monitor/src/plugintest/org/scribble/conversation/export/monitor/testmodels/EventHandler at Store.scv	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,19 @@
+namespace org.examples;
+
+conversation EventHandler at Store {
+	role	Buyer, CreditAgency;
+
+	buy(BuyInfo) from Buyer to Store request "buy";
+	
+	creditCheck(CreditInformation) from Store to CreditAgency;
+	
+	// No request/replyTo, so will be treated as invocations on a callback interface
+	
+	if @ CreditAgency {
+		checkCreditOk(CreditCheckOk) from CreditAgency to Store;
+		buy(Confirmed) from Store to Buyer replyTo "buy";
+	} else if {
+		checkCreditInvalid(CreditCheckInvalid) from CreditAgency to Store;
+		buy(Rejected) from Store to Buyer replyTo "buy";
+	}
+}
\ No newline at end of file

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.export.text/.classpath
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.export.text/.classpath	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.export.text/.classpath	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="src" path="src/java"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+	<classpathentry kind="output" path="classes"/>
+</classpath>

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.export.text/.project
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.export.text/.project	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.export.text/.project	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>org.scribble.conversation.export.text</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.ManifestBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.SchemaBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.pde.PluginNature</nature>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+	</natures>
+</projectDescription>

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.export.text/LICENSE.txt
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.export.text/LICENSE.txt	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.export.text/LICENSE.txt	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,201 @@
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.export.text/META-INF/MANIFEST.MF
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.export.text/META-INF/MANIFEST.MF	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.export.text/META-INF/MANIFEST.MF	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,29 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Scribble Conversation Export Text Plug-in
+Bundle-SymbolicName: org.scribble.conversation.export.text;singleton:=true
+Bundle-Version: 0.1.0.qualifier
+Bundle-Activator: org.scribble.conversation.export.text.osgi.Activator
+Bundle-Vendor: www.scribble.org
+Import-Package: org.osgi.framework;version="1.3.0"
+Require-Bundle: org.scribble.core,
+ org.scribble.conversation.model
+Bundle-ActivationPolicy: lazy
+Scribble-Extensions: org.scribble.conversation.export.text.ConversationModelTextExportRule,
+   org.scribble.conversation.export.text.ConversationTextExportRule,
+   org.scribble.conversation.export.text.ConversationReferenceTextExportRule,
+   org.scribble.conversation.export.text.ConversationInteractionTextExportRule,
+   org.scribble.conversation.export.text.VariableListTextExportRule,
+   org.scribble.conversation.export.text.VariableTextExportRule,
+   org.scribble.conversation.export.text.WhileTextExportRule,
+   org.scribble.conversation.export.text.WhenTextExportRule,
+   org.scribble.conversation.export.text.RaiseTextExportRule,
+   org.scribble.conversation.export.text.AssignmentTextExportRule,
+   org.scribble.conversation.export.text.ParallelTextExportRule,
+   org.scribble.conversation.export.text.RunTextExportRule,
+   org.scribble.conversation.export.text.SpawnTextExportRule,
+   org.scribble.conversation.export.text.IfTextExportRule,
+   org.scribble.conversation.export.text.ConditionalBlockTextExportRule,
+   org.scribble.conversation.export.text.TryEscapeTextExportRule,
+   org.scribble.conversation.export.text.CatchBlockTextExportRule,
+   org.scribble.conversation.export.text.InterruptBlockTextExportRule

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.export.text/build.properties
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.export.text/build.properties	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.export.text/build.properties	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,5 @@
+source.. = src/java/
+output.. = classes/
+bin.includes = META-INF/,\
+               .,\
+               plugin.xml

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.export.text/classes/org/scribble/conversation/export/stream/ConversationModelStreamExportRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conversation.export.text/classes/org/scribble/conversation/export/stream/ConversationModelStreamExportRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.export.text/classes/org/scribble/conversation/export/text/AssignmentTextExportRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conversation.export.text/classes/org/scribble/conversation/export/text/AssignmentTextExportRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.export.text/classes/org/scribble/conversation/export/text/CatchBlockTextExportRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conversation.export.text/classes/org/scribble/conversation/export/text/CatchBlockTextExportRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.export.text/classes/org/scribble/conversation/export/text/ConditionalBlockTextExportRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conversation.export.text/classes/org/scribble/conversation/export/text/ConditionalBlockTextExportRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.export.text/classes/org/scribble/conversation/export/text/ConversationInteractionTextExportRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conversation.export.text/classes/org/scribble/conversation/export/text/ConversationInteractionTextExportRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.export.text/classes/org/scribble/conversation/export/text/ConversationModelTextExportRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conversation.export.text/classes/org/scribble/conversation/export/text/ConversationModelTextExportRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.export.text/classes/org/scribble/conversation/export/text/ConversationReferenceTextExportRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conversation.export.text/classes/org/scribble/conversation/export/text/ConversationReferenceTextExportRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.export.text/classes/org/scribble/conversation/export/text/ConversationTextExportRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conversation.export.text/classes/org/scribble/conversation/export/text/ConversationTextExportRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.export.text/classes/org/scribble/conversation/export/text/IfTextExportRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conversation.export.text/classes/org/scribble/conversation/export/text/IfTextExportRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.export.text/classes/org/scribble/conversation/export/text/InterruptBlockTextExportRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conversation.export.text/classes/org/scribble/conversation/export/text/InterruptBlockTextExportRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.export.text/classes/org/scribble/conversation/export/text/ParallelTextExportRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conversation.export.text/classes/org/scribble/conversation/export/text/ParallelTextExportRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.export.text/classes/org/scribble/conversation/export/text/RaiseTextExportRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conversation.export.text/classes/org/scribble/conversation/export/text/RaiseTextExportRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.export.text/classes/org/scribble/conversation/export/text/RunTextExportRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conversation.export.text/classes/org/scribble/conversation/export/text/RunTextExportRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.export.text/classes/org/scribble/conversation/export/text/SpawnTextExportRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conversation.export.text/classes/org/scribble/conversation/export/text/SpawnTextExportRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.export.text/classes/org/scribble/conversation/export/text/TryEscapeTextExportRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conversation.export.text/classes/org/scribble/conversation/export/text/TryEscapeTextExportRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.export.text/classes/org/scribble/conversation/export/text/VariableListTextExportRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conversation.export.text/classes/org/scribble/conversation/export/text/VariableListTextExportRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.export.text/classes/org/scribble/conversation/export/text/VariableTextExportRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conversation.export.text/classes/org/scribble/conversation/export/text/VariableTextExportRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.export.text/classes/org/scribble/conversation/export/text/WhenTextExportRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conversation.export.text/classes/org/scribble/conversation/export/text/WhenTextExportRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.export.text/classes/org/scribble/conversation/export/text/WhileTextExportRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conversation.export.text/classes/org/scribble/conversation/export/text/WhileTextExportRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.export.text/classes/org/scribble/conversation/export/text/osgi/Activator.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conversation.export.text/classes/org/scribble/conversation/export/text/osgi/Activator.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.export.text/src/java/org/scribble/conversation/export/stream/ConversationModelStreamExportRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.export.text/src/java/org/scribble/conversation/export/stream/ConversationModelStreamExportRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.export.text/src/java/org/scribble/conversation/export/stream/ConversationModelStreamExportRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,48 @@
+/*
+ * Copyright 2007-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 13 Sept, 2008 : Initial version created by gary
+ */
+package org.scribble.conversation.export.stream;
+
+import org.scribble.export.*;
+import org.scribble.export.stream.*;
+import org.scribble.extensions.RegistryInfo;
+import org.scribble.model.*;
+import org.scribble.conversation.model.*;
+
+/**
+ * This class implements the stream based export rule for the
+ * ConversationModel entity.
+ */
+ at RegistryInfo(extension=ExportRule.class,notation=ConversationNotation.NOTATION_CODE)
+public class ConversationModelStreamExportRule extends AbstractModelStreamExportRule {
+
+	/**
+	 * This method determines whether the exporter rule is appropriate
+	 * for the supplied model object and format.
+	 * 
+	 * @param modelObject The model object
+	 * @param format The format
+	 * @return Whether the rule is appropriate for the model object and
+	 * 						format
+	 */
+	public boolean isSupported(ModelObject modelObject, Formatter format) {
+		return(super.isSupported(modelObject, format) &&
+				ConversationModel.class.isAssignableFrom(modelObject.getClass()));
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.export.text/src/java/org/scribble/conversation/export/text/AssignmentTextExportRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.export.text/src/java/org/scribble/conversation/export/text/AssignmentTextExportRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.export.text/src/java/org/scribble/conversation/export/text/AssignmentTextExportRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,78 @@
+/*
+ * Copyright 2007-9 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 3 June 2009 : Initial version created by gary
+ */
+package org.scribble.conversation.export.text;
+
+import org.scribble.export.*;
+import org.scribble.export.text.*;
+import org.scribble.extensions.RegistryInfo;
+import org.scribble.model.*;
+import org.scribble.conversation.model.*;
+
+/**
+ * This class implements the text based export rule for the
+ * Assignment entity.
+ */
+ at RegistryInfo(extension=ExportRule.class,notation=ConversationNotation.NOTATION_CODE)
+public class AssignmentTextExportRule implements ExportRule {
+
+	/**
+	 * This method determines whether the exporter rule is appropriate
+	 * for the supplied model object and format.
+	 * 
+	 * @param modelObject The model object
+	 * @param format The format
+	 * @return Whether the rule is appropriate for the model object and
+	 * 						format
+	 */
+	public boolean isSupported(ModelObject modelObject, Formatter format) {
+		return(Assignment.class.isAssignableFrom(modelObject.getClass()) &&
+				format instanceof TextFormatter);
+	}
+
+	/**
+	 * This method exports the model object.
+	 * 
+	 * @param modelObject The model object
+	 * @param context The context
+	 * @throws IOException Failed to record export information
+	 */
+	public void export(ModelObject modelObject, ExporterContext context)
+							throws java.io.IOException {
+		Assignment assign=(Assignment)modelObject;
+		TextFormatter formatter=(TextFormatter)context.getFormatter();
+		
+		context.export(assign.getVariable());
+		
+		if (assign.getRoles().size() > 0) {
+			formatter.record(" @ ");
+
+			for (int i=0; i < assign.getRoles().size(); i++) {
+				if (i > 0) {
+					formatter.record(",");
+				}				
+				formatter.record(assign.getRoles().get(i).getName());
+			}
+		}
+
+		formatter.record(" = ");
+		
+		context.export(assign.getExpression());
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.export.text/src/java/org/scribble/conversation/export/text/CatchBlockTextExportRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.export.text/src/java/org/scribble/conversation/export/text/CatchBlockTextExportRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.export.text/src/java/org/scribble/conversation/export/text/CatchBlockTextExportRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,81 @@
+/*
+ * Copyright 2005-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 19 Oct 2008 : Initial version created by gary
+ */
+package org.scribble.conversation.export.text;
+
+import org.scribble.export.*;
+import org.scribble.export.text.*;
+import org.scribble.extensions.RegistryInfo;
+import org.scribble.model.*;
+import org.scribble.conversation.model.*;
+
+/**
+ * This class implements the text based export rule for the
+ * CatchBlock entity.
+ */
+ at RegistryInfo(extension=ExportRule.class,notation=ConversationNotation.NOTATION_CODE)
+public class CatchBlockTextExportRule extends AbstractBlockTextExportRule {
+
+	/**
+	 * This method determines whether the exporter rule is appropriate
+	 * for the supplied model object and format.
+	 * 
+	 * @param modelObject The model object
+	 * @param format The format
+	 * @return Whether the rule is appropriate for the model object and
+	 * 						format
+	 */
+	public boolean isSupported(ModelObject modelObject, Formatter format) {
+		return(modelObject.getClass() == CatchBlock.class &&
+				format instanceof TextFormatter);
+	}
+
+	/**
+	 * This method exports the model object.
+	 * 
+	 * @param modelObject The model object
+	 * @param context The context
+	 * @throws IOException Failed to record export information
+	 */
+	public void export(ModelObject modelObject, ExporterContext context)
+							throws java.io.IOException {
+		CatchBlock elem=(CatchBlock)modelObject;
+		TextFormatter formatter=(TextFormatter)context.getFormatter();
+		
+		formatter.record("catch");
+		
+		if (elem.getRoles().size() > 0) {
+			formatter.record(" @ ");
+
+			for (int i=0; i < elem.getRoles().size(); i++) {
+				if (i > 0) {
+					formatter.record(",");
+				}				
+				formatter.record(elem.getRoles().get(i).getName());
+			}
+		}
+		
+		if (elem.getType() != null) {
+			formatter.record(" ");
+			context.export(elem.getType());
+		}
+
+		super.export(elem, context);
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.export.text/src/java/org/scribble/conversation/export/text/ConditionalBlockTextExportRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.export.text/src/java/org/scribble/conversation/export/text/ConditionalBlockTextExportRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.export.text/src/java/org/scribble/conversation/export/text/ConditionalBlockTextExportRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,71 @@
+/*
+ * Copyright 2005-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 20 Oct 2008 : Initial version created by gary
+ */
+package org.scribble.conversation.export.text;
+
+import org.scribble.export.*;
+import org.scribble.export.text.*;
+import org.scribble.extensions.RegistryInfo;
+import org.scribble.model.*;
+import org.scribble.conversation.model.*;
+
+/**
+ * This class implements the text based export rule for the
+ * ConditionalBlock entity.
+ */
+ at RegistryInfo(extension=ExportRule.class,notation=ConversationNotation.NOTATION_CODE)
+public class ConditionalBlockTextExportRule extends AbstractBlockTextExportRule {
+
+	/**
+	 * This method determines whether the exporter rule is appropriate
+	 * for the supplied model object and format.
+	 * 
+	 * @param modelObject The model object
+	 * @param format The format
+	 * @return Whether the rule is appropriate for the model object and
+	 * 						format
+	 */
+	public boolean isSupported(ModelObject modelObject, Formatter format) {
+		return(modelObject.getClass() == ConditionalBlock.class &&
+				format instanceof TextFormatter);
+	}
+
+	/**
+	 * This method exports the model object.
+	 * 
+	 * @param modelObject The model object
+	 * @param context The context
+	 * @throws IOException Failed to record export information
+	 */
+	public void export(ModelObject modelObject, ExporterContext context)
+							throws java.io.IOException {
+		ConditionalBlock elem=(ConditionalBlock)modelObject;
+		TextFormatter formatter=(TextFormatter)context.getFormatter();
+		
+		if (elem.getExpression() != null) {
+			formatter.record(" (");
+			
+			context.export(elem.getExpression());
+			
+			formatter.record(") ");
+		}
+
+		super.export(elem, context);
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.export.text/src/java/org/scribble/conversation/export/text/ConversationInteractionTextExportRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.export.text/src/java/org/scribble/conversation/export/text/ConversationInteractionTextExportRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.export.text/src/java/org/scribble/conversation/export/text/ConversationInteractionTextExportRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,96 @@
+/*
+ * Copyright 2007-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 24 Jan, 2008 : Initial version created by gary
+ */
+package org.scribble.conversation.export.text;
+
+import org.scribble.export.*;
+import org.scribble.export.text.*;
+import org.scribble.extensions.RegistryInfo;
+import org.scribble.model.*;
+import org.scribble.conversation.model.*;
+
+/**
+ * This class implements the text based export rule for the
+ * ConversationInteraction entity.
+ */
+ at RegistryInfo(extension=ExportRule.class,notation=ConversationNotation.NOTATION_CODE) //,preference=10,category=Interaction.class)
+public class ConversationInteractionTextExportRule extends InteractionTextExportRule {
+
+	/**
+	 * This method determines whether the exporter rule is appropriate
+	 * for the supplied model object and format.
+	 * 
+	 * @param modelObject The model object
+	 * @param format The format
+	 * @return Whether the rule is appropriate for the model object and
+	 * 						format
+	 */
+	public boolean isSupported(ModelObject modelObject, Formatter format) {
+		return(ConversationInteraction.class.isAssignableFrom(modelObject.getClass()) &&
+				format instanceof TextFormatter);
+	}
+
+	/**
+	 * This method exports the text related to an interactions
+	 * 'from' role.
+	 * 
+	 * @param interaction The interaction
+	 * @param context The export context
+	 * @throws java.io.IOException Failed to export information
+	 */
+	protected void exportFrom(Interaction interaction,
+			ExporterContext context) throws java.io.IOException {
+		ConversationInteraction ci=(ConversationInteraction)interaction;
+		TextFormatter formatter=(TextFormatter)context.getFormatter();
+		
+		if (ci.getFromVariable() != null) {
+			formatter.record(" from "+ci.getFromVariable().getName());
+			
+			if (ci.getFromRole() != null) {
+				formatter.record("@"+ci.getFromRole().getName());
+			}
+		} else if (ci.getFromRole() != null) {
+			formatter.record(" from "+ci.getFromRole().getName());
+		}
+	}
+	
+	/**
+	 * This method exports the text related to an interactions
+	 * 'to' role.
+	 * 
+	 * @param interaction The interaction
+	 * @param context The export context
+	 * @throws java.io.IOException Failed to export information
+	 */
+	protected void exportTo(Interaction interaction,
+			ExporterContext context) throws java.io.IOException {		
+		ConversationInteraction ci=(ConversationInteraction)interaction;
+		TextFormatter formatter=(TextFormatter)context.getFormatter();
+		
+		if (ci.getToVariable() != null) {
+			formatter.record(" to "+ci.getToVariable().getName());
+			
+			if (ci.getToRole() != null) {
+				formatter.record("@"+ci.getToRole().getName());
+			}
+		} else if (ci.getToRole() != null) {
+			formatter.record(" to "+ci.getToRole().getName());
+		}
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.export.text/src/java/org/scribble/conversation/export/text/ConversationModelTextExportRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.export.text/src/java/org/scribble/conversation/export/text/ConversationModelTextExportRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.export.text/src/java/org/scribble/conversation/export/text/ConversationModelTextExportRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,66 @@
+/*
+ * Copyright 2007-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 24 Jan, 2008 : Initial version created by gary
+ */
+package org.scribble.conversation.export.text;
+
+import org.scribble.export.*;
+import org.scribble.export.text.*;
+import org.scribble.extensions.RegistryInfo;
+import org.scribble.model.*;
+import org.scribble.conversation.model.*;
+
+/**
+ * This class implements the text based export rule for the
+ * ConversationModel entity.
+ */
+ at RegistryInfo(extension=ExportRule.class,notation=ConversationNotation.NOTATION_CODE)
+public class ConversationModelTextExportRule extends AbstractModelTextExportRule {
+
+	/**
+	 * This method determines whether the exporter rule is appropriate
+	 * for the supplied model object and format.
+	 * 
+	 * @param modelObject The model object
+	 * @param format The format
+	 * @return Whether the rule is appropriate for the model object and
+	 * 						format
+	 */
+	public boolean isSupported(ModelObject modelObject, Formatter format) {
+		return(super.isSupported(modelObject, format) &&
+				ConversationModel.class.isAssignableFrom(modelObject.getClass()));
+	}
+
+	/**
+	 * This method exports the model object.
+	 * 
+	 * @param modelObject The model object
+	 * @param context The context
+	 * @throws IOException Failed to record export information
+	 */
+	public void export(ModelObject modelObject, ExporterContext context)
+							throws java.io.IOException {
+		ConversationModel model=(ConversationModel)modelObject;
+		
+		super.export(model, context);
+		
+		if (model.getConversation() != null) {
+			context.export(model.getConversation());
+		}
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.export.text/src/java/org/scribble/conversation/export/text/ConversationReferenceTextExportRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.export.text/src/java/org/scribble/conversation/export/text/ConversationReferenceTextExportRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.export.text/src/java/org/scribble/conversation/export/text/ConversationReferenceTextExportRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,63 @@
+/*
+ * Copyright 2007-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 9 Mar 2008 : Initial version created by gary
+ */
+package org.scribble.conversation.export.text;
+
+import org.scribble.export.*;
+import org.scribble.export.text.*;
+import org.scribble.extensions.RegistryInfo;
+import org.scribble.model.*;
+import org.scribble.conversation.model.*;
+
+/**
+ * This class implements the text based export rule for the
+ * ConversationReference entity.
+ */
+ at RegistryInfo(extension=ExportRule.class,notation=ConversationNotation.NOTATION_CODE)
+public class ConversationReferenceTextExportRule
+					extends AbstractModelReferenceTextExportRule {
+
+	/**
+	 * This method determines whether the exporter rule is appropriate
+	 * for the supplied model object and format.
+	 * 
+	 * @param modelObject The model object
+	 * @param format The format
+	 * @return Whether the rule is appropriate for the model object and
+	 * 						format
+	 */
+	public boolean isSupported(ModelObject modelObject, Formatter format) {
+		return(super.isSupported(modelObject, format) &&
+				ConversationReference.class.isAssignableFrom(modelObject.getClass()));
+	}
+
+	/**
+	 * This method exports the model object.
+	 * 
+	 * @param modelObject The model object
+	 * @param context The context
+	 * @throws IOException Failed to record export information
+	 */
+	public void export(ModelObject modelObject, ExporterContext context)
+							throws java.io.IOException {
+		ConversationReference ref=(ConversationReference)modelObject;
+		
+		super.export(ref, context);
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.export.text/src/java/org/scribble/conversation/export/text/ConversationTextExportRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.export.text/src/java/org/scribble/conversation/export/text/ConversationTextExportRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.export.text/src/java/org/scribble/conversation/export/text/ConversationTextExportRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,95 @@
+/*
+ * Copyright 2007-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 24 Jan, 2008 : Initial version created by gary
+ */
+package org.scribble.conversation.export.text;
+
+import org.scribble.export.*;
+import org.scribble.export.text.*;
+import org.scribble.extensions.RegistryInfo;
+import org.scribble.model.*;
+import org.scribble.conversation.model.*;
+
+/**
+ * This class implements the text based export rule for the
+ * Conversation entity.
+ */
+ at RegistryInfo(extension=ExportRule.class,notation=ConversationNotation.NOTATION_CODE)
+public class ConversationTextExportRule implements ExportRule {
+
+	/**
+	 * This method determines whether the exporter rule is appropriate
+	 * for the supplied model object and format.
+	 * 
+	 * @param modelObject The model object
+	 * @param format The format
+	 * @return Whether the rule is appropriate for the model object and
+	 * 						format
+	 */
+	public boolean isSupported(ModelObject modelObject, Formatter format) {
+		return(Conversation.class.isAssignableFrom(modelObject.getClass()) &&
+				format instanceof TextFormatter);
+	}
+
+	/**
+	 * This method exports the model object.
+	 * 
+	 * @param modelObject The model object
+	 * @param context The context
+	 * @throws IOException Failed to record export information
+	 */
+	public void export(ModelObject modelObject, ExporterContext context)
+							throws java.io.IOException {
+		Conversation conversation=(Conversation)modelObject;
+		TextFormatter formatter=(TextFormatter)context.getFormatter();
+		
+		if (conversation.isStateless()) {
+			formatter.record("stateless ");
+		}
+		
+		formatter.record("conversation ");
+		
+		context.export(conversation.getLocatedName());
+		
+		if (conversation.getConformsTo().size() > 0) {
+			formatter.record(" conforms to ");
+			
+			for (int i=0; i < conversation.getConformsTo().size(); i++) {
+				
+				if (i > 0) {
+					formatter.record(", ");
+				}
+				context.export(conversation.getConformsTo().get(i));
+			}
+		}
+
+		if (conversation.getImplements().size() > 0) {
+			formatter.record(" implements ");
+			
+			for (int i=0; i < conversation.getImplements().size(); i++) {
+				
+				if (i > 0) {
+					formatter.record(", ");
+				}
+				context.export(conversation.getImplements().get(i));
+			}
+		}
+
+		context.export(conversation.getBlock());
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.export.text/src/java/org/scribble/conversation/export/text/IfTextExportRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.export.text/src/java/org/scribble/conversation/export/text/IfTextExportRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.export.text/src/java/org/scribble/conversation/export/text/IfTextExportRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,93 @@
+/*
+ * Copyright 2007-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 2 Feb 2008 : Initial version created by gary
+ */
+package org.scribble.conversation.export.text;
+
+import org.scribble.export.*;
+import org.scribble.export.text.*;
+import org.scribble.extensions.RegistryInfo;
+import org.scribble.model.*;
+import org.scribble.conversation.model.*;
+
+/**
+ * This class implements the text based export rule for the
+ * If entity.
+ */
+ at RegistryInfo(extension=ExportRule.class,notation=ConversationNotation.NOTATION_CODE)
+public class IfTextExportRule implements ExportRule {
+
+	/**
+	 * This method determines whether the exporter rule is appropriate
+	 * for the supplied model object and format.
+	 * 
+	 * @param modelObject The model object
+	 * @param format The format
+	 * @return Whether the rule is appropriate for the model object and
+	 * 						format
+	 */
+	public boolean isSupported(ModelObject modelObject, Formatter format) {
+		return(If.class.isAssignableFrom(modelObject.getClass()) &&
+				format instanceof TextFormatter);
+	}
+
+	/**
+	 * This method exports the model object.
+	 * 
+	 * @param modelObject The model object
+	 * @param context The context
+	 * @throws IOException Failed to record export information
+	 */
+	public void export(ModelObject modelObject, ExporterContext context)
+							throws java.io.IOException {
+		If ifElem=(If)modelObject;
+		TextFormatter formatter=(TextFormatter)context.getFormatter();
+		
+		formatter.record("if");
+		
+		if (ifElem.getRoles().size() > 0) {
+			formatter.record(" @ ");
+
+			for (int i=0; i < ifElem.getRoles().size(); i++) {
+				if (i > 0) {
+					formatter.record(",");
+				}				
+				formatter.record(ifElem.getRoles().get(i).getName());
+			}
+		}
+		
+		for (int i=0; i < ifElem.getConditionalBlocks().size(); i++) {
+			
+			if (i > 0) {
+				formatter.record(" else if");
+			} else {
+				((TextFormatter)context.getFormatter()).cancelEndOfBlock();
+			}
+
+			context.export(ifElem.getConditionalBlocks().get(i));
+		}
+		
+		if (ifElem.getElseBlock() != null) {
+			
+			((TextFormatter)context.getFormatter()).cancelEndOfBlock();
+			formatter.record(" else");
+
+			context.export(ifElem.getElseBlock());
+		}
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.export.text/src/java/org/scribble/conversation/export/text/InterruptBlockTextExportRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.export.text/src/java/org/scribble/conversation/export/text/InterruptBlockTextExportRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.export.text/src/java/org/scribble/conversation/export/text/InterruptBlockTextExportRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,84 @@
+/*
+ * Copyright 2005-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 19 Oct 2008 : Initial version created by gary
+ */
+package org.scribble.conversation.export.text;
+
+import org.scribble.export.*;
+import org.scribble.export.text.*;
+import org.scribble.extensions.RegistryInfo;
+import org.scribble.model.*;
+import org.scribble.conversation.model.*;
+
+/**
+ * This class implements the text based export rule for the
+ * InterruptBlock entity.
+ */
+ at RegistryInfo(extension=ExportRule.class,notation=ConversationNotation.NOTATION_CODE)
+public class InterruptBlockTextExportRule extends AbstractBlockTextExportRule {
+
+	/**
+	 * This method determines whether the exporter rule is appropriate
+	 * for the supplied model object and format.
+	 * 
+	 * @param modelObject The model object
+	 * @param format The format
+	 * @return Whether the rule is appropriate for the model object and
+	 * 						format
+	 */
+	public boolean isSupported(ModelObject modelObject, Formatter format) {
+		return(modelObject.getClass() == InterruptBlock.class &&
+				format instanceof TextFormatter);
+	}
+
+	/**
+	 * This method exports the model object.
+	 * 
+	 * @param modelObject The model object
+	 * @param context The context
+	 * @throws IOException Failed to record export information
+	 */
+	public void export(ModelObject modelObject, ExporterContext context)
+							throws java.io.IOException {
+		InterruptBlock elem=(InterruptBlock)modelObject;
+		TextFormatter formatter=(TextFormatter)context.getFormatter();
+		
+		formatter.record("interrupt");
+		
+		if (elem.getRoles().size() > 0) {
+			formatter.record(" @ ");
+
+			for (int i=0; i < elem.getRoles().size(); i++) {
+				if (i > 0) {
+					formatter.record(",");
+				}				
+				formatter.record(elem.getRoles().get(i).getName());
+			}
+		}
+		
+		if (elem.getExpression() != null) {
+			formatter.record(" (");
+			
+			context.export(elem.getExpression());
+			
+			formatter.record(") ");
+		}
+
+		super.export(elem, context);
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.export.text/src/java/org/scribble/conversation/export/text/ParallelTextExportRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.export.text/src/java/org/scribble/conversation/export/text/ParallelTextExportRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.export.text/src/java/org/scribble/conversation/export/text/ParallelTextExportRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,72 @@
+/*
+ * Copyright 2007-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 9 Mar 2008 : Initial version created by gary
+ */
+package org.scribble.conversation.export.text;
+
+import org.scribble.export.*;
+import org.scribble.export.text.*;
+import org.scribble.extensions.RegistryInfo;
+import org.scribble.model.*;
+import org.scribble.conversation.model.*;
+
+/**
+ * This class implements the text based export rule for the
+ * Parallel entity.
+ */
+ at RegistryInfo(extension=ExportRule.class,notation=ConversationNotation.NOTATION_CODE)
+public class ParallelTextExportRule implements ExportRule {
+
+	/**
+	 * This method determines whether the exporter rule is appropriate
+	 * for the supplied model object and format.
+	 * 
+	 * @param modelObject The model object
+	 * @param format The format
+	 * @return Whether the rule is appropriate for the model object and
+	 * 						format
+	 */
+	public boolean isSupported(ModelObject modelObject, Formatter format) {
+		return(Parallel.class.isAssignableFrom(modelObject.getClass()) &&
+				format instanceof TextFormatter);
+	}
+
+	/**
+	 * This method exports the model object.
+	 * 
+	 * @param modelObject The model object
+	 * @param context The context
+	 * @throws IOException Failed to record export information
+	 */
+	public void export(ModelObject modelObject, ExporterContext context)
+							throws java.io.IOException {
+		Parallel parallel=(Parallel)modelObject;
+		TextFormatter formatter=(TextFormatter)context.getFormatter();
+		
+		formatter.record("parallel");
+		
+		for (int i=0; i < parallel.getBlocks().size(); i++) {
+			
+			if (i > 0) {
+				formatter.record(" and");
+			}
+
+			context.export(parallel.getBlocks().get(i));
+		}
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.export.text/src/java/org/scribble/conversation/export/text/RaiseTextExportRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.export.text/src/java/org/scribble/conversation/export/text/RaiseTextExportRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.export.text/src/java/org/scribble/conversation/export/text/RaiseTextExportRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,79 @@
+/*
+ * Copyright 2007-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 10 Nov, 2008 : Initial version created by gary
+ */
+package org.scribble.conversation.export.text;
+
+import org.scribble.export.*;
+import org.scribble.export.text.*;
+import org.scribble.extensions.RegistryInfo;
+import org.scribble.model.*;
+import org.scribble.conversation.model.*;
+
+/**
+ * This class implements the text based export rule for the
+ * Raise entity.
+ */
+ at RegistryInfo(extension=ExportRule.class,notation=ConversationNotation.NOTATION_CODE) //,preference=10,category=Raise.class)
+public class RaiseTextExportRule implements ExportRule {
+
+	/**
+	 * This method determines whether the exporter rule is appropriate
+	 * for the supplied model object and format.
+	 * 
+	 * @param modelObject The model object
+	 * @param format The format
+	 * @return Whether the rule is appropriate for the model object and
+	 * 						format
+	 */
+	public boolean isSupported(ModelObject modelObject, Formatter format) {
+		return(Raise.class.isAssignableFrom(modelObject.getClass()) &&
+				format instanceof TextFormatter);
+	}
+
+	/**
+	 * This method exports the model object.
+	 * 
+	 * @param modelObject The model object
+	 * @param context The context
+	 * @throws IOException Failed to record export information
+	 */
+	public void export(ModelObject modelObject, ExporterContext context)
+							throws java.io.IOException {
+		Raise raise=(Raise)modelObject;
+		TextFormatter formatter=(TextFormatter)context.getFormatter();
+		
+		formatter.record("raise");
+		
+		if (raise.getRoles().size() > 0) {
+			formatter.record(" @ ");
+
+			for (int i=0; i < raise.getRoles().size(); i++) {
+				if (i > 0) {
+					formatter.record(",");
+				}				
+				formatter.record(raise.getRoles().get(i).getName());
+			}
+		}
+
+		if (raise.getType() != null) {
+			formatter.record(" ");			
+			context.export(raise.getType());
+		}
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.export.text/src/java/org/scribble/conversation/export/text/RunTextExportRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.export.text/src/java/org/scribble/conversation/export/text/RunTextExportRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.export.text/src/java/org/scribble/conversation/export/text/RunTextExportRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,97 @@
+/*
+ * Copyright 2007-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 9 Mar 2008 : Initial version created by gary
+ */
+package org.scribble.conversation.export.text;
+
+import org.scribble.export.*;
+import org.scribble.export.text.*;
+import org.scribble.extensions.RegistryInfo;
+import org.scribble.model.*;
+import org.scribble.conversation.model.*;
+
+/**
+ * This class implements the text based export rule for the
+ * Run entity.
+ */
+ at RegistryInfo(extension=ExportRule.class,notation=ConversationNotation.NOTATION_CODE)
+public class RunTextExportRule implements ExportRule {
+
+	/**
+	 * This method determines whether the exporter rule is appropriate
+	 * for the supplied model object and format.
+	 * 
+	 * @param modelObject The model object
+	 * @param format The format
+	 * @return Whether the rule is appropriate for the model object and
+	 * 						format
+	 */
+	public boolean isSupported(ModelObject modelObject, Formatter format) {
+		return(Run.class.isAssignableFrom(modelObject.getClass()) &&
+				format instanceof TextFormatter);
+	}
+
+	/**
+	 * This method exports the model object.
+	 * 
+	 * @param modelObject The model object
+	 * @param context The context
+	 * @throws IOException Failed to record export information
+	 */
+	public void export(ModelObject modelObject, ExporterContext context)
+							throws java.io.IOException {
+		Run run=(Run)modelObject;
+		TextFormatter formatter=(TextFormatter)context.getFormatter();
+		
+		formatter.record("run ");
+		
+		if (run.getReference() != null) {
+			context.export(run.getReference());
+		} else if (run.getInlineDefinition() != null) {
+			formatter.record("conversation");
+		}
+		
+		if (run.getBindings().size() > 0) {
+			formatter.record(" (");
+			
+			java.util.Iterator<DeclarationBinding> iter=
+					run.getBindings().iterator();
+			
+			boolean first=true;
+			
+			while (iter.hasNext()) {
+				DeclarationBinding db=iter.next();
+				
+				if (first == false) {
+					formatter.record(",");
+				}
+				
+				formatter.record(db.getDeclaration().getName()+
+						" for "+db.getBoundName());
+				
+				first = false;
+			}
+			
+			formatter.record(")");
+		}
+		
+		if (run.getInlineDefinition() != null) { 
+			context.export(run.getInlineDefinition().getBlock());
+		}
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.export.text/src/java/org/scribble/conversation/export/text/SpawnTextExportRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.export.text/src/java/org/scribble/conversation/export/text/SpawnTextExportRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.export.text/src/java/org/scribble/conversation/export/text/SpawnTextExportRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,97 @@
+/*
+ * Copyright 2007-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 7 Aug 2008 : Initial version created by gary
+ */
+package org.scribble.conversation.export.text;
+
+import org.scribble.export.*;
+import org.scribble.export.text.*;
+import org.scribble.extensions.RegistryInfo;
+import org.scribble.model.*;
+import org.scribble.conversation.model.*;
+
+/**
+ * This class implements the text based export rule for the
+ * Spawn entity.
+ */
+ at RegistryInfo(extension=ExportRule.class,notation=ConversationNotation.NOTATION_CODE)
+public class SpawnTextExportRule implements ExportRule {
+
+	/**
+	 * This method determines whether the exporter rule is appropriate
+	 * for the supplied model object and format.
+	 * 
+	 * @param modelObject The model object
+	 * @param format The format
+	 * @return Whether the rule is appropriate for the model object and
+	 * 						format
+	 */
+	public boolean isSupported(ModelObject modelObject, Formatter format) {
+		return(Spawn.class.isAssignableFrom(modelObject.getClass()) &&
+				format instanceof TextFormatter);
+	}
+
+	/**
+	 * This method exports the model object.
+	 * 
+	 * @param modelObject The model object
+	 * @param context The context
+	 * @throws IOException Failed to record export information
+	 */
+	public void export(ModelObject modelObject, ExporterContext context)
+							throws java.io.IOException {
+		Spawn spawn=(Spawn)modelObject;
+		TextFormatter formatter=(TextFormatter)context.getFormatter();
+		
+		formatter.record("spawn ");
+		
+		if (spawn.getReference() != null) {
+			context.export(spawn.getReference());
+		} else if (spawn.getInlineDefinition() != null) {
+			formatter.record("conversation");
+		}
+		
+		if (spawn.getBindings().size() > 0) {
+			formatter.record(" (");
+			
+			java.util.Iterator<DeclarationBinding> iter=
+					spawn.getBindings().iterator();
+			
+			boolean first=true;
+			
+			while (iter.hasNext()) {
+				DeclarationBinding db=iter.next();
+				
+				if (first == false) {
+					formatter.record(",");
+				}
+				
+				formatter.record(db.getDeclaration().getName()+
+						" for "+db.getBoundName());
+				
+				first = false;
+			}
+			
+			formatter.record(")");
+		}
+		
+		if (spawn.getInlineDefinition() != null) { 
+			context.export(spawn.getInlineDefinition().getBlock());
+		}
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.export.text/src/java/org/scribble/conversation/export/text/TryEscapeTextExportRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.export.text/src/java/org/scribble/conversation/export/text/TryEscapeTextExportRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.export.text/src/java/org/scribble/conversation/export/text/TryEscapeTextExportRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,73 @@
+/*
+ * Copyright 2005-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 19 Oct 2008 : Initial version created by gary
+ */
+package org.scribble.conversation.export.text;
+
+import org.scribble.export.*;
+import org.scribble.export.text.*;
+import org.scribble.extensions.RegistryInfo;
+import org.scribble.model.*;
+import org.scribble.conversation.model.*;
+
+/**
+ * This class implements the text based export rule for the
+ * TryEscape entity.
+ */
+ at RegistryInfo(extension=ExportRule.class,notation=ConversationNotation.NOTATION_CODE)
+public class TryEscapeTextExportRule implements ExportRule {
+
+	/**
+	 * This method determines whether the exporter rule is appropriate
+	 * for the supplied model object and format.
+	 * 
+	 * @param modelObject The model object
+	 * @param format The format
+	 * @return Whether the rule is appropriate for the model object and
+	 * 						format
+	 */
+	public boolean isSupported(ModelObject modelObject, Formatter format) {
+		return(TryEscape.class.isAssignableFrom(modelObject.getClass()) &&
+				format instanceof TextFormatter);
+	}
+
+	/**
+	 * This method exports the model object.
+	 * 
+	 * @param modelObject The model object
+	 * @param context The context
+	 * @throws IOException Failed to record export information
+	 */
+	public void export(ModelObject modelObject, ExporterContext context)
+							throws java.io.IOException {
+		TryEscape elem=(TryEscape)modelObject;
+		TextFormatter formatter=(TextFormatter)context.getFormatter();
+		
+		formatter.record("try");
+		
+		context.export(elem.getBlock());
+		
+		for (int i=0; i < elem.getEscapeBlocks().size(); i++) {
+			
+			((TextFormatter)context.getFormatter()).cancelEndOfBlock();
+			
+			formatter.record(" ");
+			context.export(elem.getEscapeBlocks().get(i));
+		}
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.export.text/src/java/org/scribble/conversation/export/text/VariableListTextExportRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.export.text/src/java/org/scribble/conversation/export/text/VariableListTextExportRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.export.text/src/java/org/scribble/conversation/export/text/VariableListTextExportRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,77 @@
+/*
+ * Copyright 2007-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 25 Jan, 2008 : Initial version created by gary
+ */
+package org.scribble.conversation.export.text;
+
+import org.scribble.export.*;
+import org.scribble.export.text.*;
+import org.scribble.extensions.RegistryInfo;
+import org.scribble.model.*;
+import org.scribble.conversation.model.*;
+
+/**
+ * This class implements the text based export rule for the
+ * VariableList entity.
+ */
+ at RegistryInfo(extension=ExportRule.class,notation=ConversationNotation.NOTATION_CODE)
+public class VariableListTextExportRule implements ExportRule {
+
+	/**
+	 * This method determines whether the exporter rule is appropriate
+	 * for the supplied model object and format.
+	 * 
+	 * @param modelObject The model object
+	 * @param format The format
+	 * @return Whether the rule is appropriate for the model object and
+	 * 						format
+	 */
+	public boolean isSupported(ModelObject modelObject, Formatter format) {
+		return(VariableList.class.isAssignableFrom(modelObject.getClass()) &&
+				format instanceof TextFormatter);
+	}
+
+	/**
+	 * This method exports the model object.
+	 * 
+	 * @param modelObject The model object
+	 * @param context The context
+	 * @throws IOException Failed to record export information
+	 */
+	public void export(ModelObject modelObject, ExporterContext context)
+							throws java.io.IOException {
+		VariableList variableList=(VariableList)modelObject;
+		TextFormatter formatter=(TextFormatter)context.getFormatter();
+		
+		for (int i=0; i < variableList.getVariables().size(); i++) {
+			Variable var=variableList.getVariables().get(i);
+			
+			if (i == 0) {
+				// TODO: Need ability to check whether full
+				// or local only type needs to be displayed,
+				// but this will rely on being able to
+				// navigate up the description object model.
+				formatter.record(var.getType().getLocalpart()+"\t");
+			} else {
+				formatter.record(", ");
+			}
+			
+			context.export(var);
+		}
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.export.text/src/java/org/scribble/conversation/export/text/VariableTextExportRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.export.text/src/java/org/scribble/conversation/export/text/VariableTextExportRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.export.text/src/java/org/scribble/conversation/export/text/VariableTextExportRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,63 @@
+/*
+ * Copyright 2007-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 25 Jan, 2008 : Initial version created by gary
+ */
+package org.scribble.conversation.export.text;
+
+import org.scribble.export.*;
+import org.scribble.export.text.*;
+import org.scribble.extensions.RegistryInfo;
+import org.scribble.model.*;
+import org.scribble.conversation.model.*;
+
+/**
+ * This class implements the text based export rule for the
+ * Variable entity.
+ */
+ at RegistryInfo(extension=ExportRule.class,notation=ConversationNotation.NOTATION_CODE)
+public class VariableTextExportRule implements ExportRule {
+
+	/**
+	 * This method determines whether the exporter rule is appropriate
+	 * for the supplied model object and format.
+	 * 
+	 * @param modelObject The model object
+	 * @param format The format
+	 * @return Whether the rule is appropriate for the model object and
+	 * 						format
+	 */
+	public boolean isSupported(ModelObject modelObject, Formatter format) {
+		return(Variable.class.isAssignableFrom(modelObject.getClass()) &&
+				format instanceof TextFormatter);
+	}
+
+	/**
+	 * This method exports the model object.
+	 * 
+	 * @param modelObject The model object
+	 * @param context The context
+	 * @throws IOException Failed to record export information
+	 */
+	public void export(ModelObject modelObject, ExporterContext context)
+							throws java.io.IOException {
+		Variable variable=(Variable)modelObject;
+		TextFormatter formatter=(TextFormatter)context.getFormatter();
+		
+		formatter.record(variable.getName());
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.export.text/src/java/org/scribble/conversation/export/text/WhenTextExportRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.export.text/src/java/org/scribble/conversation/export/text/WhenTextExportRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.export.text/src/java/org/scribble/conversation/export/text/WhenTextExportRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,82 @@
+/*
+ * Copyright 2007-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 9 Mar 2008 : Initial version created by gary
+ */
+package org.scribble.conversation.export.text;
+
+import org.scribble.export.*;
+import org.scribble.export.text.*;
+import org.scribble.extensions.RegistryInfo;
+import org.scribble.model.*;
+import org.scribble.conversation.model.*;
+
+/**
+ * This class implements the text based export rule for the
+ * When entity.
+ */
+ at RegistryInfo(extension=ExportRule.class,notation=ConversationNotation.NOTATION_CODE)
+public class WhenTextExportRule implements ExportRule {
+
+	/**
+	 * This method determines whether the exporter rule is appropriate
+	 * for the supplied model object and format.
+	 * 
+	 * @param modelObject The model object
+	 * @param format The format
+	 * @return Whether the rule is appropriate for the model object and
+	 * 						format
+	 */
+	public boolean isSupported(ModelObject modelObject, Formatter format) {
+		return(When.class.isAssignableFrom(modelObject.getClass()) &&
+				format instanceof TextFormatter);
+	}
+
+	/**
+	 * This method exports the model object.
+	 * 
+	 * @param modelObject The model object
+	 * @param context The context
+	 * @throws IOException Failed to record export information
+	 */
+	public void export(ModelObject modelObject, ExporterContext context)
+							throws java.io.IOException {
+		When when=(When)modelObject;
+		TextFormatter formatter=(TextFormatter)context.getFormatter();
+		
+		formatter.record("when");
+		
+		if (when.getRoles().size() > 0) {
+			formatter.record(" @ ");
+			for (int i=0; i < when.getRoles().size(); i++) {		
+				if (i > 0) {
+					formatter.record(",");
+				}				
+				formatter.record(when.getRoles().get(i).getName());
+			}
+		}
+		
+		for (int i=0; i < when.getConditionalBlocks().size(); i++) {
+			
+			if (i > 0) {
+				formatter.record(" else when");
+			}
+
+			context.export(when.getConditionalBlocks().get(i));
+		}
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.export.text/src/java/org/scribble/conversation/export/text/WhileTextExportRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.export.text/src/java/org/scribble/conversation/export/text/WhileTextExportRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.export.text/src/java/org/scribble/conversation/export/text/WhileTextExportRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,75 @@
+/*
+ * Copyright 2007-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 9 Mar 2008 : Initial version created by gary
+ */
+package org.scribble.conversation.export.text;
+
+import org.scribble.export.*;
+import org.scribble.export.text.*;
+import org.scribble.extensions.RegistryInfo;
+import org.scribble.model.*;
+import org.scribble.conversation.model.*;
+
+/**
+ * This class implements the text based export rule for the
+ * While entity.
+ */
+ at RegistryInfo(extension=ExportRule.class,notation=ConversationNotation.NOTATION_CODE)
+public class WhileTextExportRule implements ExportRule {
+
+	/**
+	 * This method determines whether the exporter rule is appropriate
+	 * for the supplied model object and format.
+	 * 
+	 * @param modelObject The model object
+	 * @param format The format
+	 * @return Whether the rule is appropriate for the model object and
+	 * 						format
+	 */
+	public boolean isSupported(ModelObject modelObject, Formatter format) {
+		return(While.class.isAssignableFrom(modelObject.getClass()) &&
+				format instanceof TextFormatter);
+	}
+
+	/**
+	 * This method exports the model object.
+	 * 
+	 * @param modelObject The model object
+	 * @param context The context
+	 * @throws IOException Failed to record export information
+	 */
+	public void export(ModelObject modelObject, ExporterContext context)
+							throws java.io.IOException {
+		While whileElem=(While)modelObject;
+		TextFormatter formatter=(TextFormatter)context.getFormatter();
+		
+		formatter.record("while");
+		
+		if (whileElem.getRoles().size() > 0) {
+			formatter.record(" @ ");
+			for (int i=0; i < whileElem.getRoles().size(); i++) {
+				if (i > 0) {
+					formatter.record(",");
+				}
+				context.export(whileElem.getRoles().get(i));				
+			}
+		}
+		
+		context.export(whileElem.getBlock());
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.export.text/src/java/org/scribble/conversation/export/text/osgi/Activator.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.export.text/src/java/org/scribble/conversation/export/text/osgi/Activator.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.export.text/src/java/org/scribble/conversation/export/text/osgi/Activator.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,67 @@
+/*
+ * Copyright 2007-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 24 Jan, 2008 : Initial version created by gary
+ */
+package org.scribble.conversation.export.text.osgi;
+
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class Activator implements BundleActivator {
+
+	// The plug-in ID
+	public static final String PLUGIN_ID = "org.scribble.conversation.export.text";
+
+	// The shared instance
+	private static Activator plugin;
+	
+	/**
+	 * The constructor
+	 */
+	public Activator() {
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.eclipse.core.runtime.Plugins#start(org.osgi.framework.BundleContext)
+	 */
+	public void start(BundleContext context) throws Exception {
+		plugin = this;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.eclipse.core.runtime.Plugin#stop(org.osgi.framework.BundleContext)
+	 */
+	public void stop(BundleContext context) throws Exception {
+		plugin = null;
+	}
+
+	/**
+	 * Returns the shared instance
+	 *
+	 * @return the shared instance
+	 */
+	public static Activator getDefault() {
+		return plugin;
+	}
+
+}

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.feature/.project
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.feature/.project	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.feature/.project	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>org.scribble.conversation.feature</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.pde.FeatureBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.pde.FeatureNature</nature>
+	</natures>
+</projectDescription>

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.feature/LICENSE.txt
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.feature/LICENSE.txt	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.feature/LICENSE.txt	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,201 @@
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.feature/build.properties
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.feature/build.properties	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.feature/build.properties	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1 @@
+bin.includes = feature.xml

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.feature/feature.xml
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.feature/feature.xml	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.feature/feature.xml	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,79 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<feature
+      id="org.scribble.conversation.feature"
+      label="Scribble Conversation Feature"
+      version="0.1.0.qualifier"
+      provider-name="www.scribble.org">
+
+   <description>
+      This feature provides the Scribble conversation notation and capabilities.
+   </description>
+
+   <copyright>
+      Copyright 2005-8 Pi4 Technologies Ltd Licensed under the Apache
+License, Version 2.0 (the &quot;License&quot;); you may not use this file
+except in compliance with the License. You may obtain a copy
+of the License at http://www.apache.org/licenses/LICENSE-2.0
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an &quot;AS IS&quot; BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+or implied. See the License for the specific language governing
+permissions and limitations under the License.
+   </copyright>
+
+   <license url="http://www.apache.org/licenses/LICENSE-2.0.html">
+      The pi4scribble tools suite is licensed under the open source Apache License, version 2.0. http://www.apache.org/licenses/LICENSE-2.0.html
+   </license>
+
+   <requires>
+      <import plugin="org.eclipse.core.runtime"/>
+      <import plugin="org.scribble.core"/>
+      <import plugin="org.scribble.protocol.model"/>
+      <import plugin="org.eclipse.swt"/>
+      <import plugin="org.eclipse.jface"/>
+      <import plugin="org.eclipse.ui"/>
+   </requires>
+
+   <plugin
+         id="org.scribble.conversation.export.text"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.scribble.conversation.model"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.scribble.conversation.parser"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.scribble.conversation.projector"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.scribble.conversation.validation"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.scribble.expression.xpath"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+</feature>

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.model/.classpath
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.model/.classpath	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.model/.classpath	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="src" path="src/java"/>
+	<classpathentry kind="src" path="src/test"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/3"/>
+	<classpathentry kind="output" path="classes"/>
+</classpath>

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.model/.project
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.model/.project	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.model/.project	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>org.scribble.conversation.model</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.ManifestBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.SchemaBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.pde.PluginNature</nature>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+	</natures>
+</projectDescription>

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.model/LICENSE.txt
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.model/LICENSE.txt	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.model/LICENSE.txt	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,201 @@
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.model/META-INF/MANIFEST.MF
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.model/META-INF/MANIFEST.MF	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.model/META-INF/MANIFEST.MF	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,13 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Scribble Conversation Model Plug-in
+Bundle-SymbolicName: org.scribble.conversation.model;singleton:=true
+Bundle-Version: 0.1.0.qualifier
+Bundle-Activator: org.scribble.conversation.model.osgi.Activator
+Bundle-Vendor: www.scribble.org
+Import-Package: org.osgi.framework;version="1.3.0"
+Require-Bundle: org.scribble.core,
+ org.scribble.protocol.model
+Eclipse-LazyStart: true
+Export-Package: org.scribble.conversation.model
+Scribble-Extensions: org.scribble.conversation.model.ConversationNotation

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.model/build.properties
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.model/build.properties	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.model/build.properties	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,5 @@
+source.. = src/java/
+output.. = classes/
+bin.includes = META-INF/,\
+               .,\
+               plugin.xml

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.model/classes/org/scribble/conversation/model/Assignment.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conversation.model/classes/org/scribble/conversation/model/Assignment.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.model/classes/org/scribble/conversation/model/CatchBlock.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conversation.model/classes/org/scribble/conversation/model/CatchBlock.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.model/classes/org/scribble/conversation/model/Compose.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conversation.model/classes/org/scribble/conversation/model/Compose.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.model/classes/org/scribble/conversation/model/ConditionalBlock.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conversation.model/classes/org/scribble/conversation/model/ConditionalBlock.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.model/classes/org/scribble/conversation/model/Conversation.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conversation.model/classes/org/scribble/conversation/model/Conversation.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.model/classes/org/scribble/conversation/model/ConversationInteraction.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conversation.model/classes/org/scribble/conversation/model/ConversationInteraction.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.model/classes/org/scribble/conversation/model/ConversationModel.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conversation.model/classes/org/scribble/conversation/model/ConversationModel.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.model/classes/org/scribble/conversation/model/ConversationNotation.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conversation.model/classes/org/scribble/conversation/model/ConversationNotation.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.model/classes/org/scribble/conversation/model/ConversationReference.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conversation.model/classes/org/scribble/conversation/model/ConversationReference.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.model/classes/org/scribble/conversation/model/EscapeBlock.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conversation.model/classes/org/scribble/conversation/model/EscapeBlock.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.model/classes/org/scribble/conversation/model/Expression.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conversation.model/classes/org/scribble/conversation/model/Expression.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.model/classes/org/scribble/conversation/model/Identity.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conversation.model/classes/org/scribble/conversation/model/Identity.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.model/classes/org/scribble/conversation/model/IdentityLocator.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conversation.model/classes/org/scribble/conversation/model/IdentityLocator.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.model/classes/org/scribble/conversation/model/IdentityType.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conversation.model/classes/org/scribble/conversation/model/IdentityType.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.model/classes/org/scribble/conversation/model/If.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conversation.model/classes/org/scribble/conversation/model/If.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.model/classes/org/scribble/conversation/model/IfTest$1.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conversation.model/classes/org/scribble/conversation/model/IfTest$1.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.model/classes/org/scribble/conversation/model/IfTest$2.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conversation.model/classes/org/scribble/conversation/model/IfTest$2.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.model/classes/org/scribble/conversation/model/IfTest.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conversation.model/classes/org/scribble/conversation/model/IfTest.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.model/classes/org/scribble/conversation/model/InterruptBlock.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conversation.model/classes/org/scribble/conversation/model/InterruptBlock.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.model/classes/org/scribble/conversation/model/Parallel.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conversation.model/classes/org/scribble/conversation/model/Parallel.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.model/classes/org/scribble/conversation/model/Raise.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conversation.model/classes/org/scribble/conversation/model/Raise.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.model/classes/org/scribble/conversation/model/Run.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conversation.model/classes/org/scribble/conversation/model/Run.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.model/classes/org/scribble/conversation/model/Spawn.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conversation.model/classes/org/scribble/conversation/model/Spawn.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.model/classes/org/scribble/conversation/model/TryEscape.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conversation.model/classes/org/scribble/conversation/model/TryEscape.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.model/classes/org/scribble/conversation/model/Variable.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conversation.model/classes/org/scribble/conversation/model/Variable.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.model/classes/org/scribble/conversation/model/VariableList.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conversation.model/classes/org/scribble/conversation/model/VariableList.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.model/classes/org/scribble/conversation/model/When.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conversation.model/classes/org/scribble/conversation/model/When.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.model/classes/org/scribble/conversation/model/While.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conversation.model/classes/org/scribble/conversation/model/While.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.model/classes/org/scribble/conversation/model/WhileTest$1.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conversation.model/classes/org/scribble/conversation/model/WhileTest$1.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.model/classes/org/scribble/conversation/model/WhileTest$2.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conversation.model/classes/org/scribble/conversation/model/WhileTest$2.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.model/classes/org/scribble/conversation/model/WhileTest.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conversation.model/classes/org/scribble/conversation/model/WhileTest.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.model/classes/org/scribble/conversation/model/osgi/Activator.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conversation.model/classes/org/scribble/conversation/model/osgi/Activator.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.model/src/java/org/scribble/conversation/model/Assignment.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.model/src/java/org/scribble/conversation/model/Assignment.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.model/src/java/org/scribble/conversation/model/Assignment.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,101 @@
+/*
+ * Copyright 2007-9 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 3 June 2009 : Initial version created by gary
+ */
+package org.scribble.conversation.model;
+
+import org.scribble.model.*;
+
+/**
+ * This class represents the Assignment construct.
+ * 
+ */
+public class Assignment extends Behaviour {
+
+	private static final long serialVersionUID = 4692091825946345905L;
+
+	/**
+	 * This is the default constructor.
+	 * 
+	 */
+	public Assignment() {
+	}
+	
+	/**
+	 * This method returns the list of roles at which
+	 * the decision is located.
+	 * 
+	 * @return The list of roles
+	 */
+	public java.util.List<Role> getRoles() {
+		return(m_roles);
+	}
+	
+	/**
+	 * This method returns the variable that is the target
+	 * of the assignment.
+	 * 
+	 * @return The target variable
+	 */
+	@Reference(containment=true)
+	public Variable getVariable() {
+		return(m_variable);
+	}
+	
+	/**
+	 * This method sets the variable that is the target
+	 * of the assignment.
+	 * 
+	 * @param var The target variable
+	 */
+	public void setVariable(Variable var) {
+		m_variable = var;
+	}
+		
+	/**
+	 * This method returns the expression being assigned.
+	 * 
+	 * @return The expression
+	 */
+	@Reference(containment=true)
+	public Expression getExpression() {
+		return(m_expression);
+	}
+	
+	/**
+	 * This method sets the expression being assigned.
+	 * 
+	 * @param expr The expression
+	 */
+	public void setExpression(Expression expr) {
+		
+		if (m_expression != null) {
+			m_expression.setParent(null);
+		}
+		
+		m_expression = expr;
+		
+		if (m_expression != null) {
+			m_expression.setParent(this);
+		}
+	}
+	
+	private java.util.List<Role> m_roles=new java.util.Vector<Role>();
+	private Expression m_expression=null;
+	private Variable m_variable=null;
+}

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.model/src/java/org/scribble/conversation/model/CatchBlock.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.model/src/java/org/scribble/conversation/model/CatchBlock.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.model/src/java/org/scribble/conversation/model/CatchBlock.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,66 @@
+/*
+ * Copyright 2005-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 18 Oct 2008 : Initial version created by gary
+ */
+package org.scribble.conversation.model;
+
+import org.scribble.model.Reference;
+import org.scribble.model.TypeReference;
+
+/**
+ * This class represents a group of activities within
+ * a catch specific 'escape' block of a
+ * try/escape construct.
+ * 
+ */
+public class CatchBlock extends EscapeBlock {
+
+	private static final long serialVersionUID = -144273641545824962L;
+
+	/**
+	 * This method returns the reference of the type associated
+	 * with the catch block.
+	 * 
+	 * @return The type
+	 */
+	@Reference(containment=true)
+	public TypeReference getType() {
+		return(m_type);
+	}
+	
+	/**
+	 * This method sets the reference of the type associated
+	 * with the catch block.
+	 * 
+	 * @param type The type
+	 */
+	public void setType(TypeReference type) {
+		
+		if (m_type != null) {
+			m_type.setParent(null);
+		}
+		
+		m_type = type;
+		
+		if (m_type != null) {
+			m_type.setParent(this);
+		}
+	}
+	
+	private TypeReference m_type=null;
+}

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.model/src/java/org/scribble/conversation/model/Compose.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.model/src/java/org/scribble/conversation/model/Compose.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.model/src/java/org/scribble/conversation/model/Compose.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,187 @@
+/*
+ * Copyright 2007-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 9 Mar 2008 : Initial version created by gary
+ */
+package org.scribble.conversation.model;
+
+import org.scribble.extensions.RegistryFactory;
+import org.scribble.model.*;
+import org.scribble.model.admin.DefaultModelListener;
+import org.scribble.model.admin.ModelInfo;
+import org.scribble.model.admin.ModelRepository;
+
+/**
+ * This class represents the composition semantics associated
+ * with the Run and Spawn constructs.
+ * 
+ */
+public abstract class Compose extends ModelInclude {
+
+	private static final long serialVersionUID = -197685339387762151L;
+
+	/**
+	 * This is the default constructor.
+	 * 
+	 */
+	public Compose() {
+	}
+	
+	/**
+	 * This method returns the associated conversation.
+	 * 
+	 * @return The conversation
+	 */
+	public Conversation getDefinition() {
+		Conversation ret=m_inlineDefinition;
+		
+		if (ret == null && m_reference != null) {
+			
+			// Check if local reference
+			if (m_reference.isInner()) {
+				
+				// Search in containing conversation
+				ModelObject cur=getParent();
+				
+				while (ret == null && cur != null) {
+					if (cur instanceof Conversation) {
+						Conversation conv=(Conversation)cur;
+						
+						// Check if conversation contains
+						// sub-conversation of interest
+						for (int i=0; ret == null && i < 
+								conv.getBlock().getContents().size(); i++) {
+							if (conv.getBlock().getContents().get(i) instanceof Conversation) {
+								Conversation subconv=(Conversation)
+									conv.getBlock().getContents().get(i);
+		
+								if (subconv.getLocatedName() != null &&
+										subconv.getLocatedName().getName() != null &&
+										m_reference.getAlias().equals(
+											subconv.getLocatedName().getName()) &&
+									((m_reference.getLocatedRole() == null &&
+											subconv.getLocatedName().getRole() == null) ||
+									((m_reference.getLocatedRole() != null &&
+											subconv.getLocatedName().getRole() != null &&
+											m_reference.getLocatedRole().equals(
+												subconv.getLocatedName().getRole().getName()))))) {
+									
+									ret = subconv;
+								}
+							}
+						}
+					}
+					
+					cur = cur.getParent();
+				}
+				
+			} else {
+				ModelRepository mrep=(ModelRepository)
+							RegistryFactory.getRegistry().getExtension(
+										ModelRepository.class, null);
+				
+				if (mrep != null) {
+					java.util.List<ModelInfo> models=mrep.getModels(m_reference,
+									new DefaultModelListener());
+					
+					for (int i=0; ret == null &&
+								i < models.size(); i++) {
+						if (models.get(i).getModel() instanceof
+										ConversationModel) {
+							ret = ((ConversationModel)models.get(i).getModel()).getConversation();
+						}
+					}
+				}
+			}
+		}
+		
+		return(ret);
+	}
+	
+	/**
+	 * This method returns the conversation reference associated
+	 * with the run construct.
+	 * 
+	 * @return The conversation reference, or null if not defined
+	 */
+	@Reference(containment=true)
+	public ConversationReference getReference() {
+		return(m_reference);
+	}
+	
+	/**
+	 * This method sets the conversation reference associated
+	 * with the run construct.
+	 * 
+	 * @param ref The conversation reference
+	 */
+	public void setReference(ConversationReference ref) {
+		
+		if (m_reference != null) {
+			m_reference.setParent(null);
+		}
+		
+		m_reference = ref;
+		
+		if (m_reference != null) {
+			m_reference.setParent(this);
+		}
+	}
+
+	/**
+	 * This method indicates whether the model include is
+	 * an inline definition.
+	 * 
+	 * @return Whether an inline definition
+	 */
+	public boolean isInline() {
+		return(getInlineDefinition() != null);
+	}
+
+	/**
+	 * This method returns the inline definition associated
+	 * with the model include construct.
+	 * 
+	 * @return The inline definition, or null if not defined
+	 */
+	@Reference(containment=true)
+	public Conversation getInlineDefinition() {
+		return(m_inlineDefinition);
+	}
+	
+	/**
+	 * This method sets the inline definition associated
+	 * with the run construct.
+	 * 
+	 * @param definition The inner definition
+	 */
+	public void setInlineDefinition(Conversation definition) {
+		
+		if (m_inlineDefinition != null) {
+			m_inlineDefinition.setParent(null);
+		}
+		
+		m_inlineDefinition = definition;
+		
+		if (m_inlineDefinition != null) {
+			m_inlineDefinition.setParent(this);
+		}
+	}
+
+	private ConversationReference m_reference=null;
+	private Conversation m_inlineDefinition=null;
+}

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.model/src/java/org/scribble/conversation/model/ConditionalBlock.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.model/src/java/org/scribble/conversation/model/ConditionalBlock.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.model/src/java/org/scribble/conversation/model/ConditionalBlock.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,62 @@
+/*
+ * Copyright 2007-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 13 Jan 2008 : Initial version created by gary
+ */
+package org.scribble.conversation.model;
+
+import org.scribble.model.Reference;
+
+/**
+ * This class provides a conditional implementation of the
+ * Block component.
+ */
+public class ConditionalBlock extends org.scribble.model.Block {
+
+	private static final long serialVersionUID = 5438311908743472800L;
+
+	/**
+	 * This method returns the optional expression.
+	 * 
+	 * @return The expression, or null if not defined
+	 */
+	@Reference(containment=true)
+	public Expression getExpression() {
+		return(m_expression);
+	}
+	
+	/**
+	 * This method sets the optional expression.
+	 * 
+	 * @param expr The expression
+	 */
+	public void setExpression(Expression expr) {
+		// Clear the parent
+		if (m_expression != null) {
+			m_expression.setParent(null);
+		}
+		
+		m_expression = expr;
+		
+		// Set the parent
+		if (m_expression != null) {
+			m_expression.setParent(this);
+		}
+	}
+	
+	private Expression m_expression=null;
+}

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.model/src/java/org/scribble/conversation/model/Conversation.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.model/src/java/org/scribble/conversation/model/Conversation.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.model/src/java/org/scribble/conversation/model/Conversation.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,86 @@
+/*
+ * Copyright 2007-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 9 Jan 2008 : Initial version created by gary
+ */
+package org.scribble.conversation.model;
+
+import org.scribble.model.Activity;
+import org.scribble.model.ContainmentList;
+import org.scribble.model.Declaration;
+import org.scribble.model.Reference;
+
+/**
+ * This class represents the conversation notation.
+ */
+public class Conversation extends org.scribble.model.Definition {
+	
+	private static final long serialVersionUID = -664687154813751756L;
+
+	/**
+	 * The default constructor.
+	 */
+	public Conversation() {
+	}
+	
+	/**
+	 * This method returns whether the activity represents
+	 * a scope.
+	 * 
+	 * @return Whether activity represents a scope
+	 */
+	@Override
+	public boolean isScope() {
+		return(true);
+	}
+
+	/**
+	 * This method returns the list of identity definitions
+	 * that are used to identity a conversation.
+	 * 
+	 * @return The list of identities
+	 */
+	@Reference(containment=true)
+	public java.util.List<Identity> getIdentities() {
+		return(m_identities);
+	}
+	
+	/**
+	 * This method return the top level declarations associated
+	 * with the definition.
+	 * 
+	 * @return The declarations
+	 */
+	public java.util.Set<Declaration> getDeclarations() {
+		java.util.Set<Declaration> ret=super.getDeclarations();
+		
+		java.util.Iterator<Activity> iter=getBlock().getContents().iterator();
+		
+		while (iter.hasNext()) {
+			Activity act=iter.next();
+			
+			if (act instanceof VariableList) {
+				ret.addAll(((VariableList)act).getVariables());
+			}
+		}
+		
+		return(ret);
+	}
+		
+	private java.util.List<Identity> m_identities=
+			new ContainmentList<Identity>(this, Identity.class);
+}

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.model/src/java/org/scribble/conversation/model/ConversationInteraction.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.model/src/java/org/scribble/conversation/model/ConversationInteraction.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.model/src/java/org/scribble/conversation/model/ConversationInteraction.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,68 @@
+/*
+ * Copyright 2007-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 10 Jan 2008 : Initial version created by gary
+ */
+package org.scribble.conversation.model;
+
+/**
+ * This class represents a specific type of interaction associated
+ * with the conversation notation.
+ */
+public class ConversationInteraction extends org.scribble.model.Interaction {
+
+	private static final long serialVersionUID = 6037971710485056449L;
+
+	/**
+	 * This method returns the optional 'from' variable.
+	 * 
+	 * @return The optional 'from' variable
+	 */
+	public Variable getFromVariable() {
+		return(m_fromVariable);
+	}
+	
+	/**
+	 * This method sets the optional 'from' variable.
+	 * 
+	 * @param part The optional 'from' variable
+	 */
+	public void setFromVariable(Variable part) {
+		m_fromVariable = part;
+	}
+	
+	/**
+	 * This method returns the optional 'to' variable.
+	 * 
+	 * @return The optional 'to' variable
+	 */
+	public Variable getToVariable() {
+		return(m_toVariable);
+	}
+	
+	/**
+	 * This method sets the optional 'to' variable.
+	 * 
+	 * @param part The optional 'to' variable
+	 */
+	public void setToVariable(Variable part) {
+		m_toVariable = part;
+	}
+	
+	private Variable m_fromVariable=null;
+	private Variable m_toVariable=null;
+}

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.model/src/java/org/scribble/conversation/model/ConversationModel.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.model/src/java/org/scribble/conversation/model/ConversationModel.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.model/src/java/org/scribble/conversation/model/ConversationModel.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,105 @@
+/*
+ * Copyright 2007-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 9 Jan 2008 : Initial version created by gary
+ */
+package org.scribble.conversation.model;
+
+import org.scribble.model.*;
+import org.scribble.extensions.*;
+
+/**
+ * This class represents the conversation model.
+ * 
+ */
+ at RegistryInfo(extension=Model.class,notation=ConversationNotation.NOTATION_CODE)
+public class ConversationModel extends Model {
+
+	private static final long serialVersionUID = -1229586889208810341L;
+
+	/**
+	 * This method returns the model name associated with
+	 * the model.
+	 * 
+	 * @return The model name
+	 */
+	public LocatedName getModelName() {
+		LocatedName ret=null;
+		
+		if (m_conversation != null) {
+			ret = m_conversation.getLocatedName();
+		}
+		
+		return(ret);
+	}
+	
+	/**
+	 * This method returns the list of identity locators.
+	 * 
+	 * @return The identity locators
+	 */
+	@Reference(containment=true)
+	public java.util.List<IdentityLocator> getIdentityLocators() {
+		return(m_identityLocators);
+	}
+	
+	/**
+	 * This method sets the conversation.
+	 * 
+	 * @param conversation The conversation
+	 */
+	public void setConversation(Conversation conversation) {
+		
+		if (m_conversation != null) {
+			m_conversation.setParent(null);
+		}
+		
+		m_conversation = conversation;
+		
+		if (m_conversation != null) {
+			m_conversation.setParent(this);
+		}
+	}
+	
+	/**
+	 * This method returns the conversation.
+	 * 
+	 * @return The conversation
+	 */
+	@Reference(containment=true)
+	public Conversation getConversation() {
+		return(m_conversation);
+	}
+	
+	/**
+	 * This method returns the list of definitions supported by
+	 * this model.
+	 * 
+	 * @return The list of definitions
+	 */
+	public java.util.List<Definition> getDefinitions() {
+		java.util.List<Definition> ret=new java.util.Vector<Definition>();
+		
+		ret.add(getConversation());
+		
+		return(ret);
+	}
+	
+	private Conversation m_conversation=null;
+	private java.util.List<IdentityLocator> m_identityLocators=
+		new ContainmentList<IdentityLocator>(this, IdentityLocator.class);
+}

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.model/src/java/org/scribble/conversation/model/ConversationNotation.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.model/src/java/org/scribble/conversation/model/ConversationNotation.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.model/src/java/org/scribble/conversation/model/ConversationNotation.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,67 @@
+/*
+ * Copyright 2007-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 9 Jan 2008 : Initial version created by gary
+ */
+package org.scribble.conversation.model;
+
+import org.scribble.extensions.*;
+import org.scribble.model.ModelReference;
+
+/**
+ * This class represents the Conversation notation.
+ */
+ at RegistryInfo(extension=org.scribble.model.Notation.class)
+public class ConversationNotation extends org.scribble.model.AbstractNotation {
+
+	public static final String NOTATION_CODE="scv";
+	
+	/**
+	 * The default constructor for the conversation notation.
+	 */
+	public ConversationNotation() {
+		super(NOTATION_CODE, "Conversation", true);
+	}
+		
+	/**
+	 * This method returns the initial description associated
+	 * with the supplied reference.
+	 * 
+	 * @param ref The reference
+	 * @return The initial description, or null if no description
+	 */
+	public String getInitialDescription(ModelReference ref) {
+		StringBuffer buf=new StringBuffer();
+		
+		buf.append("namespace ");
+		buf.append(ref.getNamespace());
+		buf.append(";\r\n\r\n");
+		
+		buf.append("conversation ");
+		buf.append(ref.getLocalpart());
+		
+		if (ref.getLocatedRole() != null) {
+			buf.append(ModelReference.LOCATED_REFERENCE_SEPARATOR);
+			buf.append(ref.getLocatedRole());
+			buf.append(" {\r\n\trole\tP;\r\n\r\n}\r\n");
+		} else {		
+			buf.append(" {\r\n\trole\tP1, P2;\r\n\r\n}\r\n");
+		}
+		
+		return(buf.toString());
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.model/src/java/org/scribble/conversation/model/ConversationReference.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.model/src/java/org/scribble/conversation/model/ConversationReference.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.model/src/java/org/scribble/conversation/model/ConversationReference.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,38 @@
+/*
+ * Copyright 2007-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 9 Jan 2008 : Initial version created by gary
+ */
+package org.scribble.conversation.model;
+
+import org.scribble.model.*;
+
+/**
+ * This class represents a conversation reference.
+ */
+public class ConversationReference extends ModelReference {
+
+	private static final long serialVersionUID = -5130644330077284094L;
+
+	/**
+	 * This is the default constructor for the conversation reference.
+	 */
+	public ConversationReference() {
+		super(ConversationNotation.NOTATION_CODE);
+	}
+	
+}

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.model/src/java/org/scribble/conversation/model/EscapeBlock.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.model/src/java/org/scribble/conversation/model/EscapeBlock.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.model/src/java/org/scribble/conversation/model/EscapeBlock.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,45 @@
+/*
+ * Copyright 2005-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 18 Oct 2008 : Initial version created by gary
+ */
+package org.scribble.conversation.model;
+
+import org.scribble.model.Block;
+import org.scribble.model.Role;
+
+/**
+ * This class represents a group of activities within
+ * an 'escape' block of a try/escape construct.
+ * 
+ */
+public abstract class EscapeBlock extends Block {
+
+	private static final long serialVersionUID = -3847008405100548354L;
+
+	/**
+	 * This method returns the list of roles at which
+	 * the escape decision is located.
+	 * 
+	 * @return The list of roles
+	 */
+	public java.util.List<Role> getRoles() {
+		return(m_roles);
+	}
+		
+	private java.util.List<Role> m_roles=new java.util.Vector<Role>();
+}

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.model/src/java/org/scribble/conversation/model/Expression.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.model/src/java/org/scribble/conversation/model/Expression.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.model/src/java/org/scribble/conversation/model/Expression.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,29 @@
+/*
+ * Copyright 2007-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 1 Feb 2008 : Initial version created by gary
+ */
+package org.scribble.conversation.model;
+
+/**
+ * This class describes a conditional expression.
+ */
+public abstract class Expression extends org.scribble.model.ModelObject {
+
+	private static final long serialVersionUID = -3588494040013982118L;
+	
+}

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.model/src/java/org/scribble/conversation/model/Identity.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.model/src/java/org/scribble/conversation/model/Identity.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.model/src/java/org/scribble/conversation/model/Identity.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,83 @@
+/*
+ * Copyright 2005-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 27 Jul 2008 : Initial version created by gary
+ */
+package org.scribble.conversation.model;
+
+import org.scribble.model.ModelObject;
+
+/**
+ * This interface represents a list of tokens used to determine the
+ * identity of the conversation.
+ */
+public class Identity extends ModelObject {
+
+	private static final long serialVersionUID = 4448340635894911022L;
+
+	/**
+	 * This method returns the list of identity token
+	 * names that represent this identity.
+	 * 
+	 * @return The list of identity token name
+	 */
+	public java.util.List<String> getNames() {
+		return(m_names);
+	}
+	
+	/**
+	 * This method returns the identity type.
+	 * 
+	 * @return The identity type
+	 */
+	public IdentityType getIdentityType() {
+		return(m_identityType);
+	}
+	
+	/**
+	 * This method sets the type associated with the
+	 * identity.
+	 * 
+	 * @param idtype The identity type
+	 */
+	public void setIdentityType(IdentityType idtype) {
+		m_identityType = idtype;
+	}
+	
+	public boolean equals(Object obj) {
+		boolean ret=false;
+
+		if (obj instanceof Identity) {
+			Identity other=(Identity)obj;
+			
+			if (other.m_identityType == m_identityType &&
+					other.m_names.size() == m_names.size()) {
+		
+				ret = true;
+				
+				for (int i=0; ret && i < m_names.size(); i++) {
+					ret = m_names.get(i).equals(other.m_names.get(i));
+				}
+			}
+		}
+		
+		return(ret);
+	}
+	
+	private java.util.List<String> m_names=new java.util.Vector<String>();
+	private IdentityType m_identityType=null;
+}

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.model/src/java/org/scribble/conversation/model/IdentityLocator.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.model/src/java/org/scribble/conversation/model/IdentityLocator.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.model/src/java/org/scribble/conversation/model/IdentityLocator.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,142 @@
+/*
+ * Copyright 2005-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 27 Jul 2008 : Initial version created by gary
+ */
+package org.scribble.conversation.model;
+
+import org.scribble.model.*;
+
+/**
+ * This interface represents the identity locators associated
+ * with a particular type.
+ */
+public class IdentityLocator extends ModelObject {
+
+	private static final long serialVersionUID = 5279517129760939317L;
+
+	/**
+	 * The default constructor for the identity locator.
+	 */
+	public IdentityLocator() {
+	}
+	
+	/**
+	 * This method returns the type associated with the
+	 * identity locator.
+	 * 
+	 * @return The type
+	 */
+	public TypeReference getType() {
+		return(m_type);
+	}
+	
+	/**
+	 * This method sets the type associated with the
+	 * identity locator.
+	 * 
+	 * @param type The type
+	 */
+	public void setType(TypeReference type) {
+		m_type = type;
+	}
+	
+	/** 
+	 * This method sets the locator associated with the identity
+	 * token.
+	 * 
+	 * @param identity The identity
+	 * @param locator The locator
+	 */
+	public void setLocator(String identity, String locator) {
+		
+		// TODO: The locator should really be modelled as an
+		// expresion.
+		
+		m_identities.add(identity);
+		m_locators.add(locator);
+	}
+	
+	/**
+	 * This method returns the number of identity locators.
+	 * 
+	 * @return The number of identity locators
+	 */
+	public int getNumberOfLocators() {
+		return(m_identities.size());
+	}
+	
+	/**
+	 * This method returns the identity at the supplied
+	 * index.
+	 * 
+	 * @param index The index
+	 * @return The identity at the index, or null if out of
+	 * 						range
+	 */
+	public String getIdentity(int index) {
+		String ret=null;
+		
+		if (index < m_identities.size()) {
+			ret = m_identities.get(index);
+		}
+		
+		return(ret);
+	}
+	
+	/**
+	 * This method returns the locator at the supplied
+	 * index.
+	 * 
+	 * @param index The index
+	 * @return The locator at the index, or null if out of
+	 * 						range
+	 */
+	public String getLocator(int index) {
+		String ret=null;
+		
+		if (index < m_locators.size()) {
+			ret = m_locators.get(index);
+		}
+		
+		return(ret);
+	}
+	
+	/**
+	 * This method returns the locator associated with
+	 * the supplied identity name.
+	 * 
+	 * @param identity The identiy name
+	 * @return The locator for the identity, or null if not
+	 * 						found
+	 */
+	public String getLocator(String identity) {
+		String ret=null;
+		
+		int index=m_identities.indexOf(identity);
+		
+		if (index != -1) {
+			ret = m_locators.get(index);
+		}
+		
+		return(ret);
+	}
+	
+	private TypeReference m_type=null;
+	private java.util.List<String> m_identities=new java.util.Vector<String>();
+	private java.util.List<String> m_locators=new java.util.Vector<String>();
+}

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.model/src/java/org/scribble/conversation/model/IdentityType.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.model/src/java/org/scribble/conversation/model/IdentityType.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.model/src/java/org/scribble/conversation/model/IdentityType.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,30 @@
+/*
+ * Copyright 2005-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 27 Jul 2008 : Initial version created by gary
+ */
+package org.scribble.conversation.model;
+
+/**
+ * This enumeration represents the values for the
+ * identity type.
+ */
+public enum IdentityType {
+	Primary,
+	Association,
+	Derived
+}

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.model/src/java/org/scribble/conversation/model/If.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.model/src/java/org/scribble/conversation/model/If.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.model/src/java/org/scribble/conversation/model/If.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,297 @@
+/*
+ * Copyright 2007-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 13 Jan 2008 : Initial version created by gary
+ */
+package org.scribble.conversation.model;
+
+import org.scribble.model.*;
+
+/**
+ * This class represents the If construct.
+ * 
+ */
+public class If extends MultiPathBehaviour {
+
+	private static final long serialVersionUID = -6399962290109914156L;
+
+	/**
+	 * This is the default constructor.
+	 * 
+	 */
+	public If() {
+	}
+	
+	/**
+	 * This method indicates whether the activity
+	 * is a conditional construct.
+	 * 
+	 * @return Whether the activity is conditional
+	 */
+	@Override
+	public boolean isConditional() {
+		// Will be conditional if there is no default path
+		return(getElseBlock() == null);
+	}
+	
+	/**
+	 * This method determines whether the paths are mutually
+	 * exclusive.
+	 * 
+	 * @return Whether the paths are mutually exclusive
+	 */
+	public boolean isMutuallyExclusivePaths() {
+		return(true);
+	}
+
+	/**
+	 * This method returns whether the behaviour is a wait
+	 * state.
+	 * 
+	 * @return Whether the behaviour is a wait state
+	 */
+	@Override
+	public boolean isWaitState() {
+		boolean ret=false;
+		
+		Role role=getLocatedRole();
+		
+		// Check if not a decision making role
+		if (role != null && m_roles.contains(role) == false) {
+			ret = true;
+		}
+		
+		return(ret);
+	}
+	
+	/**
+	 * This method returns the list of roles at which
+	 * the if decision is located.
+	 * 
+	 * @return The list of roles
+	 */
+	public java.util.List<Role> getRoles() {
+		return(m_roles);
+	}
+	
+	/**
+	 * This method returns the list of mutually exclusive
+	 * activity blocks that comprise the multi-path construct.
+	 * 
+	 * @return The list of blocks
+	 */
+	@Reference(containment=true)
+	public java.util.List<ConditionalBlock> getConditionalBlocks() {
+		return(m_blocks);
+	}
+	
+	/**
+	 * This method returns the optional 'else' block for the
+	 * 'if' statement.
+	 * 
+	 * @return The 'else' block
+	 */
+	@Reference(containment=true)
+	public Block getElseBlock() {
+		return(m_elseBlock);
+	}
+	
+	/**
+	 * This method sets the optional 'else' block for the
+	 * 'if' statement.
+	 * 
+	 * @param block The 'else' block
+	 */
+	public void setElseBlock(Block block) {
+		
+		if (m_elseBlock != null) {
+			m_elseBlock.setParent(null);
+		}
+		
+		m_elseBlock = block;
+		
+		if (m_elseBlock != null) {
+			m_elseBlock.setParent(this);
+		}
+	}
+	
+	/**
+	 * This method returns the list of mutually exclusive
+	 * activity blocks that comprise the multi-path construct.
+	 * 
+	 * @return The list of blocks
+	 */
+	public java.util.List<Block> getPaths() {
+		java.util.List<Block> ret=new java.util.Vector<Block>();
+		
+		ret.addAll(getConditionalBlocks());
+
+		if (m_elseBlock != null &&
+				getElseBlock().getContents().size() > 0) {
+			ret.add(getElseBlock());
+	
+		/* Shouldn't add path that is not there?
+		} else {
+			// Add place holder for this default path
+			ret.add(new Block());
+		*/
+		}
+		
+		return(ret);
+	}
+	
+	/**
+	 * This method creates a new path within the multi-path
+	 * behaviour. If the implementation cannot create
+	 * the new path, then it will return null.
+	 * 
+	 * @return The new block, or null if cannot be created
+	 */
+	public Block createNewPath() {
+		ConditionalBlock ret=null;
+		
+		if (m_elseBlock == null) {
+			ret = new ConditionalBlock();
+			
+			m_blocks.add(ret);
+		}
+		
+		return(ret);
+	}
+
+	/**
+	 * This method removes a path from the multi-path
+	 * behaviour.
+	 * 
+	 * @param path The path
+	 * @return Whether the path was removed
+	 */
+	public boolean removePath(Block path) {
+		boolean ret=false;
+		
+		if (path == m_elseBlock) {
+			m_elseBlock = null;
+			
+			ret = true;
+		} else {
+			ret = m_blocks.remove(path);
+		}
+		
+		return(ret);
+	}
+
+	/**
+	 * This method indicates whether the construct requires a
+	 * strict scope to be maintained. If the scope does not
+	 * need to be strictly maintained, then it is possible that
+	 * either activities relevant to each path could either
+	 * be duplicated within each path, or shared following
+	 * the construct.
+	 * 
+	 * @return Whether a strict scope should be maintained
+	 */
+	public boolean isStrictScope() {
+		
+		// NOTE (20/11/08): When the If is conditional,
+		// i.e. where an else clause is not specified, then
+		// it seems like it is strict scope. Need to
+		// consider whether this mechanism is necessary or
+		// can be done another way - it is used in support
+		// of working out whether subsequent activities
+		// could potentially be duplicated in all paths.
+		
+		//return(false);
+		return(isConditional());
+	}
+	
+	/**
+	 * This method returns the ordering constraint for
+	 * the multipath behaviour.
+	 * 
+	 * @return The ordering constraint
+	 */
+	public OrderingConstraint getOrdering() {
+		// Return value must determine whether the
+		// 'if' construct is being used in a
+		// stateful or stateless conversation.
+		// If stateful, then order must be preserved.
+		// If stateless, then the ordering of all
+		// the paths in the top level construct
+		// can be unordered - but if constructs contained
+		// within any of those unordered paths would
+		// equally be ordered.
+		// NOTE: May be better to use a different
+		// specific construct for top level stateless
+		// conversation?? But then that complicates
+		// the language.
+		OrderingConstraint ret=OrderingConstraint.Ordered;
+		
+		Definition def=getEnclosingDefinition();
+		
+		if (def != null) {
+			def = def.getTopLevelDefinition();
+		}
+		
+		if (def != null && def.isStateless() && getParent()
+				instanceof Block && getParent().getParent()
+							== def) {
+			ret = OrderingConstraint.Unordered;
+		}
+		
+		return(ret);
+	}
+	
+	/**
+	 * This method returns the list of roles that are
+	 * responsible for initiating the activity. This can
+	 * be used to determine whether the model is
+	 * consistent in terms of decision makers subsequently
+	 * initiating actions.
+	 * 
+	 * @return The list of initiator roles
+	 */
+	@Override
+	public java.util.List<Role> getInitiatorRoles() {
+		java.util.List<Role> ret=super.getInitiatorRoles();
+
+		for (int i=0; i < getRoles().size(); i++) {
+			if (ret.contains(getRoles().get(i)) == false) {
+				ret.add(getRoles().get(i));
+			}
+		}
+		
+		return(ret);
+	}
+
+	/**
+	 * This method returns the list of roles that are
+	 * associated with the outcome of the activity.
+	 * 
+	 * @return The list of final roles
+	 */
+	@Override
+	public java.util.List<Role> getFinalRoles() {
+		java.util.List<Role> ret=super.getFinalRoles();
+				
+		return(ret);
+	}
+
+	private java.util.List<Role> m_roles=new java.util.Vector<Role>();
+	private java.util.List<ConditionalBlock> m_blocks=
+			new ContainmentList<ConditionalBlock>(this, ConditionalBlock.class);
+	private Block m_elseBlock=null;
+}

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.model/src/java/org/scribble/conversation/model/InterruptBlock.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.model/src/java/org/scribble/conversation/model/InterruptBlock.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.model/src/java/org/scribble/conversation/model/InterruptBlock.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,64 @@
+/*
+ * Copyright 2005-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 18 Oct 2008 : Initial version created by gary
+ */
+package org.scribble.conversation.model;
+
+import org.scribble.model.Reference;
+
+/**
+ * This class represents a group of activities within
+ * an interrupt specific 'escape' block of a
+ * try/escape construct.
+ * 
+ */
+public class InterruptBlock extends EscapeBlock {
+
+	private static final long serialVersionUID = 3296525328792975708L;
+
+	/**
+	 * This method returns the optional expression.
+	 * 
+	 * @return The expression, or null if not defined
+	 */
+	@Reference(containment=true)
+	public Expression getExpression() {
+		return(m_expression);
+	}
+	
+	/**
+	 * This method sets the optional expression.
+	 * 
+	 * @param expr The expression
+	 */
+	public void setExpression(Expression expr) {
+		// Clear the parent
+		if (m_expression != null) {
+			m_expression.setParent(null);
+		}
+		
+		m_expression = expr;
+		
+		// Set the parent
+		if (m_expression != null) {
+			m_expression.setParent(this);
+		}
+	}
+	
+	private Expression m_expression=null;
+}

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.model/src/java/org/scribble/conversation/model/Parallel.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.model/src/java/org/scribble/conversation/model/Parallel.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.model/src/java/org/scribble/conversation/model/Parallel.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,116 @@
+/*
+ * Copyright 2007-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 8 Mar 2008 : Initial version created by gary
+ */
+package org.scribble.conversation.model;
+
+import org.scribble.model.*;
+
+/**
+ * This class represents the Parallel construct with
+ * two or more concurrent paths.
+ * 
+ */
+public class Parallel extends MultiPathBehaviour {
+
+	private static final long serialVersionUID = -7183099368840527442L;
+
+	/**
+	 * This is the default constructor.
+	 * 
+	 */
+	public Parallel() {
+	}
+	
+	/**
+	 * This method returns the list of mutually exclusive
+	 * activity blocks that comprise the multi-path construct.
+	 * 
+	 * @return The list of blocks
+	 */
+	@Reference(containment=true)
+	public java.util.List<Block> getBlocks() {
+		return(m_blocks);
+	}
+	
+	/**
+	 * This method returns the list of mutually exclusive
+	 * activity blocks that comprise the multi-path construct.
+	 * 
+	 * @return The list of blocks
+	 */
+	public java.util.List<Block> getPaths() {
+		return(getBlocks());
+	}
+
+	/**
+	 * This method creates a new path within the multi-path
+	 * behaviour. If the implementation cannot create
+	 * the new path, then it will return null.
+	 * 
+	 * @return The new block, or null if cannot be created
+	 */
+	public Block createNewPath() {
+		Block ret=new Block();
+		
+		m_blocks.add(ret);
+		
+		return(ret);
+	}
+	
+	/**
+	 * This method removes a path from the multi-path
+	 * behaviour.
+	 * 
+	 * @param path The path
+	 * @return Whether the path was removed
+	 */
+	public boolean removePath(Block path) {
+		boolean ret=false;
+		
+		ret = m_blocks.remove(path);
+		
+		return(ret);
+	}
+
+	/**
+	 * This method indicates whether the construct requires a
+	 * strict scope to be maintained. If the scope does not
+	 * need to be strictly maintained, then it is possible that
+	 * either activities relevant to each path could either
+	 * be duplicated within each path, or shared following
+	 * the construct.
+	 * 
+	 * @return Whether a strict scope should be maintained
+	 */
+	public boolean isStrictScope() {
+		return(true);
+	}
+	
+	/**
+	 * This method returns the ordering constraint for
+	 * the multipath behaviour.
+	 * 
+	 * @return The ordering constraint
+	 */
+	public OrderingConstraint getOrdering() {
+		return(OrderingConstraint.Unordered);
+	}
+	
+	private java.util.List<Block> m_blocks=new ContainmentList<Block>(this, Block.class);
+}

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.model/src/java/org/scribble/conversation/model/Raise.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.model/src/java/org/scribble/conversation/model/Raise.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.model/src/java/org/scribble/conversation/model/Raise.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,81 @@
+/*
+ * Copyright 2007-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 10 Nov 2008 : Initial version created by gary
+ */
+package org.scribble.conversation.model;
+
+import org.scribble.model.*;
+
+/**
+ * This class represents the Raise construct.
+ * 
+ */
+public class Raise extends Behaviour {
+
+	private static final long serialVersionUID = -3870323388560306665L;
+
+	/**
+	 * This is the default constructor.
+	 * 
+	 */
+	public Raise() {
+	}
+	
+	/**
+	 * This method returns the list of roles at which
+	 * the decision is located.
+	 * 
+	 * @return The list of roles
+	 */
+	public java.util.List<Role> getRoles() {
+		return(m_roles);
+	}
+		
+	/**
+	 * This method returns the reference of the type associated
+	 * with the catch block.
+	 * 
+	 * @return The type
+	 */
+	@Reference(containment=true)
+	public TypeReference getType() {
+		return(m_type);
+	}
+	
+	/**
+	 * This method sets the reference of the type associated
+	 * with the catch block.
+	 * 
+	 * @param type The type
+	 */
+	public void setType(TypeReference type) {
+		
+		if (m_type != null) {
+			m_type.setParent(null);
+		}
+		
+		m_type = type;
+		
+		if (m_type != null) {
+			m_type.setParent(this);
+		}
+	}
+	
+	private java.util.List<Role> m_roles=new java.util.Vector<Role>();
+	private TypeReference m_type=null;
+}

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.model/src/java/org/scribble/conversation/model/Run.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.model/src/java/org/scribble/conversation/model/Run.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.model/src/java/org/scribble/conversation/model/Run.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,46 @@
+/*
+ * Copyright 2007-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 9 Mar 2008 : Initial version created by gary
+ */
+package org.scribble.conversation.model;
+
+/**
+ * This class represents the Run construct.
+ * 
+ */
+public class Run extends Compose {
+
+	private static final long serialVersionUID = 6265665009720442123L;
+
+	/**
+	 * This is the default constructor.
+	 * 
+	 */
+	public Run() {
+	}
+	
+	/**
+	 * This method determines whether the compose construct
+	 * is asynchronous.
+	 * 
+	 * @return Whether the compose is asynchronous
+	 */
+	public boolean isAsynchronous() {
+		return(false);
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.model/src/java/org/scribble/conversation/model/Spawn.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.model/src/java/org/scribble/conversation/model/Spawn.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.model/src/java/org/scribble/conversation/model/Spawn.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,46 @@
+/*
+ * Copyright 2007-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 7 Aug 2008 : Initial version created by gary
+ */
+package org.scribble.conversation.model;
+
+/**
+ * This class represents the Spawn construct.
+ * 
+ */
+public class Spawn extends Compose {
+
+	private static final long serialVersionUID = -7928304100765235995L;
+
+	/**
+	 * This is the default constructor.
+	 * 
+	 */
+	public Spawn() {
+	}
+	
+	/**
+	 * This method determines whether the compose construct
+	 * is asynchronous.
+	 * 
+	 * @return Whether the compose is asynchronous
+	 */
+	public boolean isAsynchronous() {
+		return(true);
+	}	
+}

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.model/src/java/org/scribble/conversation/model/TryEscape.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.model/src/java/org/scribble/conversation/model/TryEscape.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.model/src/java/org/scribble/conversation/model/TryEscape.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,151 @@
+/*
+ * Copyright 2005-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 18 Oct 2008 : Initial version created by gary
+ */
+package org.scribble.conversation.model;
+
+import org.scribble.model.*;
+
+/**
+ * This class represents the Try/Escape construct.
+ * 
+ */
+public class TryEscape extends MultiPathBehaviour {
+
+	private static final long serialVersionUID = -7186370891826420328L;
+
+	/**
+	 * This is the default constructor.
+	 * 
+	 */
+	public TryEscape() {
+		m_block.setParent(this);
+	}
+		
+	/**
+	 * This method returns the activities.
+	 * 
+	 * @return The block of activities
+	 */
+	@Reference(containment=true)
+	public Block getBlock() {
+		return(m_block);
+	}
+	
+	/**
+	 * This method sets the block.
+	 * 
+	 * @param block The block
+	 */
+	public void setBlock(Block block) {
+		if (m_block != null) {
+			m_block.setParent(null);
+		}
+		
+		m_block = block;
+		
+		if (m_block != null) {
+			m_block.setParent(this);
+		}
+	}
+
+	/**
+	 * This method returns the list of mutually exclusive
+	 * escape blocks.
+	 * 
+	 * @return The list of escape blocks
+	 */
+	@Reference(containment=true)
+	public java.util.List<EscapeBlock> getEscapeBlocks() {
+		return(m_escapeBlocks);
+	}
+	
+	/**
+	 * This method returns the list of mutually exclusive
+	 * activity blocks that comprise the multi-path construct.
+	 * 
+	 * @return The list of blocks
+	 */
+	public java.util.List<Block> getPaths() {
+		java.util.List<Block> ret=new java.util.Vector<Block>();
+		
+		ret.add(getBlock());
+		
+		ret.addAll(getEscapeBlocks());
+
+		return(ret);
+	}
+	
+	/**
+	 * This method creates a new path within the multi-path
+	 * behaviour. If the implementation cannot create
+	 * the new path, then it will return null.
+	 * 
+	 * @return The new block, or null if cannot be created
+	 */
+	public Block createNewPath() {
+		Block ret=null;
+		
+		return(ret);
+	}
+	
+	/**
+	 * This method removes a path from the multi-path
+	 * behaviour.
+	 * 
+	 * @param path The path
+	 * @return Whether the path was removed
+	 */
+	public boolean removePath(Block path) {
+		boolean ret=false;
+		
+		return(ret);
+	}
+
+	/**
+	 * This method indicates whether the construct requires a
+	 * strict scope to be maintained. If the scope does not
+	 * need to be strictly maintained, then it is possible that
+	 * either activities relevant to each path could either
+	 * be duplicated within each path, or shared following
+	 * the construct.
+	 * 
+	 * @return Whether a strict scope should be maintained
+	 */
+	public boolean isStrictScope() {
+		return(true);
+	}
+	
+	/**
+	 * This method returns the ordering constraint for
+	 * the multipath behaviour.
+	 * 
+	 * @return The ordering constraint
+	 */
+	public OrderingConstraint getOrdering() {
+		// Return as unordered, although the first path
+		// (i.e. the try block) must appear first - but
+		// this will be guaranteed in a comparison
+		// against another try/escape construct,
+		// as this is determined by the language construct.
+		return(OrderingConstraint.Unordered);
+	}
+	
+	private Block m_block=new Block();
+	private java.util.List<EscapeBlock> m_escapeBlocks=new ContainmentList<EscapeBlock>(this, EscapeBlock.class);
+}

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.model/src/java/org/scribble/conversation/model/Variable.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.model/src/java/org/scribble/conversation/model/Variable.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.model/src/java/org/scribble/conversation/model/Variable.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,72 @@
+/*
+ * Copyright 2007-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 10 Jan 2008 : Initial version created by gary
+ */
+package org.scribble.conversation.model;
+
+import org.scribble.model.*;
+
+/**
+ * This class represents the variable declaration.
+ */
+public class Variable extends ModelObject implements Declaration {
+
+	private static final long serialVersionUID = 9101786233697037485L;
+
+	/**
+	 * This is the default constructor.
+	 */
+	public Variable() {
+	}
+	
+	/**
+	 * This method returns the name of the variable.
+	 * 
+	 * @return The name
+	 */
+	public String getName() {
+		return(m_name);
+	}
+	
+	/**
+	 * This method sets the name of the variable.
+	 * 
+	 * @param name The name
+	 */
+	public void setName(String name) {
+		m_name = name;
+	}
+	
+	/**
+	 * This method returns the reference of the type associated
+	 * with the variable.
+	 * 
+	 * @return The type
+	 */
+	public TypeReference getType() {
+		TypeReference ret=null;
+		
+		if (getParent() instanceof VariableList) {
+			ret = ((VariableList)getParent()).getType();
+		}
+		
+		return(ret);
+	}
+	
+	private String m_name=null;
+}

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.model/src/java/org/scribble/conversation/model/VariableList.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.model/src/java/org/scribble/conversation/model/VariableList.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.model/src/java/org/scribble/conversation/model/VariableList.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,75 @@
+/*
+ * Copyright 2007-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 10 Jan 2008 : Initial version created by gary
+ */
+package org.scribble.conversation.model;
+
+import org.scribble.model.*;
+
+/**
+ * This class represents the list of variables declared within
+ * a Scribble definition.
+ */
+public class VariableList extends Activity {
+
+	private static final long serialVersionUID = 2189313571333015979L;
+
+	/**
+	 * This method returns the reference of the type associated
+	 * with the variable list.
+	 * 
+	 * @return The type
+	 */
+	@Reference(containment=true)
+	public TypeReference getType() {
+		return(m_type);
+	}
+	
+	/**
+	 * This method sets the reference of the type associated
+	 * with the variable.
+	 * 
+	 * @param type The variable's type
+	 */
+	public void setType(TypeReference type) {
+		
+		if (m_type != null) {
+			m_type.setParent(null);
+		}
+		
+		m_type = type;
+		
+		if (m_type != null) {
+			m_type.setParent(this);
+		}
+	}
+	
+	/**
+	 * This method returns the list of variables.
+	 * 
+	 * @return The list of variables
+	 */
+	@Reference(containment=true)
+	public java.util.List<Variable> getVariables() {
+		return(m_variables);
+	}
+	
+	private TypeReference m_type=null;
+	private java.util.List<Variable> m_variables=
+				new ContainmentList<Variable>(this, Variable.class);
+}

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.model/src/java/org/scribble/conversation/model/When.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.model/src/java/org/scribble/conversation/model/When.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.model/src/java/org/scribble/conversation/model/When.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,187 @@
+/*
+ * Copyright 2007-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 8 Mar 2008 : Initial version created by gary
+ */
+package org.scribble.conversation.model;
+
+import org.scribble.model.*;
+
+/**
+ * This class represents the When construct.
+ * 
+ */
+public class When extends MultiPathBehaviour {
+
+	private static final long serialVersionUID = 482982129600626545L;
+
+	/**
+	 * This is the default constructor.
+	 * 
+	 */
+	public When() {
+	}
+	
+	/**
+	 * This method determines whether the paths are mutually
+	 * exclusive.
+	 * 
+	 * @return Whether the paths are mutually exclusive
+	 */
+	public boolean isMutuallyExclusivePaths() {
+		return(true);
+	}
+	
+	/**
+	 * This method returns whether the behaviour is a wait
+	 * state.
+	 * 
+	 * @return Whether the behaviour is a wait state
+	 */
+	@Override
+	public boolean isWaitState() {
+		return(true);
+	}
+	
+	/**
+	 * This method returns the list of roles at which
+	 * the 'when' decision is located.
+	 * 
+	 * @return The list of roles
+	 */
+	public java.util.List<Role> getRoles() {
+		return(m_roles);
+	}
+	
+	/**
+	 * This method returns the list of mutually exclusive
+	 * activity blocks that comprise the multi-path construct.
+	 * 
+	 * @return The list of blocks
+	 */
+	@Reference(containment=true)
+	public java.util.List<ConditionalBlock> getConditionalBlocks() {
+		return(m_blocks);
+	}
+	
+	/**
+	 * This method returns the list of mutually exclusive
+	 * activity blocks that comprise the multi-path construct.
+	 * 
+	 * @return The list of blocks
+	 */
+	public java.util.List<Block> getPaths() {
+		java.util.List<Block> ret=new java.util.Vector<Block>();
+		
+		ret.addAll(getConditionalBlocks());
+		
+		return(ret);
+	}
+	
+	/**
+	 * This method creates a new path within the multi-path
+	 * behaviour. If the implementation cannot create
+	 * the new path, then it will return null.
+	 * 
+	 * @return The new block, or null if cannot be created
+	 */
+	public Block createNewPath() {
+		ConditionalBlock ret=new ConditionalBlock();
+		
+		m_blocks.add(ret);
+		
+		return(ret);
+	}
+	
+	/**
+	 * This method removes a path from the multi-path
+	 * behaviour.
+	 * 
+	 * @param path The path
+	 * @return Whether the path was removed
+	 */
+	public boolean removePath(Block path) {
+		boolean ret=false;
+		
+		ret = m_blocks.remove(path);
+		
+		return(ret);
+	}
+
+	/**
+	 * This method indicates whether the construct requires a
+	 * strict scope to be maintained. If the scope does not
+	 * need to be strictly maintained, then it is possible that
+	 * either activities relevant to each path could either
+	 * be duplicated within each path, or shared following
+	 * the construct.
+	 * 
+	 * @return Whether a strict scope should be maintained
+	 */
+	public boolean isStrictScope() {
+		return(false);
+	}
+	
+	/**
+	 * This method returns the ordering constraint for
+	 * the multipath behaviour.
+	 * 
+	 * @return The ordering constraint
+	 */
+	public OrderingConstraint getOrdering() {
+		return(OrderingConstraint.Ordered);
+	}
+	
+	/**
+	 * This method returns the list of roles that are
+	 * responsible for initiating the activity. This can
+	 * be used to determine whether the model is
+	 * consistent in terms of decision makers subsequently
+	 * initiating actions.
+	 * 
+	 * @return The list of initiator roles
+	 */
+	@Override
+	public java.util.List<Role> getInitiatorRoles() {
+		java.util.List<Role> ret=super.getInitiatorRoles();
+
+		for (int i=0; i < getRoles().size(); i++) {
+			if (ret.contains(getRoles().get(i)) == false) {
+				ret.add(getRoles().get(i));
+			}
+		}
+		
+		return(ret);
+	}
+
+	/**
+	 * This method returns the list of roles that are
+	 * associated with the outcome of the activity.
+	 * 
+	 * @return The list of final roles
+	 */
+	@Override
+	public java.util.List<Role> getFinalRoles() {
+		java.util.List<Role> ret=super.getFinalRoles();
+				
+		return(ret);
+	}
+
+	private java.util.List<Role> m_roles=new java.util.Vector<Role>();
+	private java.util.List<ConditionalBlock> m_blocks=
+			new ContainmentList<ConditionalBlock>(this, ConditionalBlock.class);
+}

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.model/src/java/org/scribble/conversation/model/While.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.model/src/java/org/scribble/conversation/model/While.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.model/src/java/org/scribble/conversation/model/While.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,167 @@
+/*
+ * Copyright 2007-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 8 Mar 2008 : Initial version created by gary
+ */
+package org.scribble.conversation.model;
+
+import org.scribble.model.*;
+
+/**
+ * This class represents the While construct.
+ * 
+ */
+public class While extends SinglePathBehaviour {
+
+	private static final long serialVersionUID = 1095711964302049544L;
+
+	/**
+	 * This is the default constructor.
+	 * 
+	 */
+	public While() {
+		m_block.setParent(this);
+	}
+	
+	/**
+	 * This method returns whether the behaviour is a wait
+	 * state.
+	 * 
+	 * @return Whether the behaviour is a wait state
+	 */
+	@Override
+	public boolean isWaitState() {
+		boolean ret=false;
+		
+		Role role=getLocatedRole();
+		
+		// Check if not a decision making role
+		if (role != null && m_roles.contains(role) == false) {
+			ret = true;
+		}
+		
+		return(ret);
+	}
+	
+	/**
+	 * This method returns the list of roles at which
+	 * the repeat decision is located.
+	 * 
+	 * @return The list of roles
+	 */
+	public java.util.List<Role> getRoles() {
+		return(m_roles);
+	}
+	
+	/**
+	 * This method returns the activities.
+	 * 
+	 * @return The block of activities
+	 */
+	@Reference(containment=true)
+	public ConditionalBlock getBlock() {
+		return(m_block);
+	}
+	
+	/**
+	 * This method sets the conditional block.
+	 * 
+	 * @param block The conditional block
+	 */
+	public void setBlock(ConditionalBlock block) {
+		if (m_block != null) {
+			m_block.setParent(null);
+		}
+		
+		m_block = block;
+		
+		if (m_block != null) {
+			m_block.setParent(this);
+		}
+	}
+
+	/**
+	 * This method indicates whether the construct requires a
+	 * strict scope to be maintained. If the scope does not
+	 * need to be strictly maintained, then it is possible that
+	 * activities could be contained by the construct or
+	 * following the construct.
+	 * 
+	 * @return Whether a strict scope should be maintained
+	 */
+	public boolean isStrictScope() {
+		return(true);
+	}
+	
+	/**
+	 * This method indicates whether the activity
+	 * is a conditional construct.
+	 * 
+	 * @return Whether the activity is conditional
+	 */
+	public boolean isConditional() {
+		return(true);
+	}
+	
+	/**
+	 * This method indicates whether the construct is
+	 * repetitive.
+	 * 
+	 * @return Whether the construct supports repetition
+	 */
+	public boolean isRepetition() {
+		return(true);
+	}
+	
+	/**
+	 * This method returns the list of roles that are
+	 * responsible for initiating the activity. This can
+	 * be used to determine whether the model is
+	 * consistent in terms of decision makers subsequently
+	 * initiating actions.
+	 * 
+	 * @return The list of initiator roles
+	 */
+	@Override
+	public java.util.List<Role> getInitiatorRoles() {
+		java.util.List<Role> ret=super.getInitiatorRoles();
+
+		for (int i=0; i < getRoles().size(); i++) {
+			if (ret.contains(getRoles().get(i)) == false) {
+				ret.add(getRoles().get(i));
+			}
+		}
+		
+		return(ret);
+	}
+
+	/**
+	 * This method returns the list of roles that are
+	 * associated with the outcome of the activity.
+	 * 
+	 * @return The list of final roles
+	 */
+	@Override
+	public java.util.List<Role> getFinalRoles() {
+		java.util.List<Role> ret=super.getFinalRoles();
+				
+		return(ret);
+	}
+
+	private ConditionalBlock m_block=new ConditionalBlock();
+	private java.util.List<Role> m_roles=new java.util.Vector<Role>();
+}

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.model/src/java/org/scribble/conversation/model/osgi/Activator.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.model/src/java/org/scribble/conversation/model/osgi/Activator.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.model/src/java/org/scribble/conversation/model/osgi/Activator.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,67 @@
+/*
+ * Copyright 2007-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 9 Jan 2008 : Initial version created by gary
+ */
+package org.scribble.conversation.model.osgi;
+
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.BundleActivator;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class Activator implements BundleActivator {
+
+	// The plug-in ID
+	public static final String PLUGIN_ID = "org.scribble.conversation.model";
+
+	// The shared instance
+	private static Activator plugin;
+	
+	/**
+	 * The constructor
+	 */
+	public Activator() {
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.eclipse.core.runtime.Plugins#start(org.osgi.framework.BundleContext)
+	 */
+	public void start(BundleContext context) throws Exception {
+		plugin = this;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.eclipse.core.runtime.Plugin#stop(org.osgi.framework.BundleContext)
+	 */
+	public void stop(BundleContext context) throws Exception {
+		plugin = null;
+	}
+
+	/**
+	 * Returns the shared instance
+	 *
+	 * @return the shared instance
+	 */
+	public static Activator getDefault() {
+		return plugin;
+	}
+
+}

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.model/src/test/org/scribble/conversation/model/IfTest.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.model/src/test/org/scribble/conversation/model/IfTest.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.model/src/test/org/scribble/conversation/model/IfTest.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,128 @@
+/*
+ * Copyright 2007-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 10 Nov 2008 : Initial version created by gary
+ */
+package org.scribble.conversation.model;
+
+import org.scribble.model.*;
+
+import junit.framework.TestCase;
+
+public class IfTest extends TestCase {
+
+	public void testIsWaitStateFalse() {
+		
+		Definition d=new Definition() {
+		};
+		
+		LocatedName mn=new LocatedName();
+		d.setLocatedName(mn);
+		
+		Role r1=new Role();
+		r1.setName("r1");
+		
+		Role r2=new Role();
+		r2.setName("r2");
+		
+		mn.setRole(r1);
+		
+		If ifelem=new If();
+		d.getBlock().getContents().add(ifelem);
+		
+		ifelem.getRoles().add(r1);
+		ifelem.getRoles().add(r2);
+		
+		if (ifelem.isWaitState()) {
+			fail("NOT a wait state");
+		}
+	}
+
+	public void testIsWaitStateTrue() {
+		
+		Definition d=new Definition() {
+		};
+		
+		LocatedName mn=new LocatedName();
+		d.setLocatedName(mn);
+		
+		Role r1=new Role();
+		r1.setName("r1");
+		
+		Role r2=new Role();
+		r2.setName("r2");
+		
+		mn.setRole(r1);
+		
+		If ifelem=new If();
+		d.getBlock().getContents().add(ifelem);
+		
+		ifelem.getRoles().add(r2);
+		
+		if (ifelem.isWaitState() == false) {
+			fail("Is a wait state");
+		}
+	}
+	
+	public void testGetOrdering() {
+		
+		Conversation conv=new Conversation();
+		
+		If ifelem=new If();
+		
+		conv.getBlock().getContents().add(ifelem);
+		
+		if (ifelem.getOrdering() != OrderingConstraint.Ordered) {
+			fail("If should be ordered");
+		}
+	}
+	
+	public void testGetOrderingStateless() {
+		
+		Conversation conv=new Conversation();
+		conv.setStateless(true);
+		
+		If ifelem=new If();
+		
+		conv.getBlock().getContents().add(ifelem);
+		
+		if (ifelem.getOrdering() != OrderingConstraint.Unordered) {
+			fail("If should be unordered");
+		}
+	}
+	
+	public void testGetOrderingStatelessContainedIf() {
+		
+		Conversation conv=new Conversation();
+		conv.setStateless(true);
+		
+		If topif=new If();
+		
+		conv.getBlock().getContents().add(topif);
+		
+		ConditionalBlock cb=new ConditionalBlock();
+		topif.getConditionalBlocks().add(cb);
+		
+		If ifelem=new If();
+		
+		cb.getContents().add(ifelem);
+		
+		if (ifelem.getOrdering() != OrderingConstraint.Ordered) {
+			fail("If should be ordered");
+		}
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.model/src/test/org/scribble/conversation/model/WhileTest.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.model/src/test/org/scribble/conversation/model/WhileTest.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.model/src/test/org/scribble/conversation/model/WhileTest.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,80 @@
+/*
+ * Copyright 2007-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 10 Nov 2008 : Initial version created by gary
+ */
+package org.scribble.conversation.model;
+
+import org.scribble.model.*;
+
+import junit.framework.TestCase;
+
+public class WhileTest extends TestCase {
+
+	public void testIsWaitStateFalse() {
+		
+		Definition d=new Definition() {
+		};
+		
+		LocatedName mn=new LocatedName();
+		d.setLocatedName(mn);
+		
+		Role r1=new Role();
+		r1.setName("r1");
+		
+		Role r2=new Role();
+		r2.setName("r2");
+		
+		mn.setRole(r1);
+		
+		While whileElem=new While();
+		d.getBlock().getContents().add(whileElem);
+		
+		whileElem.getRoles().add(r1);
+		whileElem.getRoles().add(r2);
+		
+		if (whileElem.isWaitState()) {
+			fail("NOT a wait state");
+		}
+	}
+
+	public void testIsWaitStateTrue() {
+		
+		Definition d=new Definition() {
+		};
+		
+		LocatedName mn=new LocatedName();
+		d.setLocatedName(mn);
+		
+		Role r1=new Role();
+		r1.setName("r1");
+		
+		Role r2=new Role();
+		r2.setName("r2");
+		
+		mn.setRole(r1);
+		
+		While whileElem=new While();
+		d.getBlock().getContents().add(whileElem);
+		
+		whileElem.getRoles().add(r2);
+		
+		if (whileElem.isWaitState() == false) {
+			fail("Is a wait state");
+		}
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.parser/.classpath
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.parser/.classpath	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.parser/.classpath	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="src" path="src/java"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+	<classpathentry kind="output" path="classes"/>
+</classpath>

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.parser/.project
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.parser/.project	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.parser/.project	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>org.scribble.conversation.parser</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.ManifestBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.SchemaBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.pde.PluginNature</nature>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+	</natures>
+</projectDescription>

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.parser/LICENSE.txt
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.parser/LICENSE.txt	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.parser/LICENSE.txt	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,201 @@
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.parser/META-INF/MANIFEST.MF
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.parser/META-INF/MANIFEST.MF	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.parser/META-INF/MANIFEST.MF	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,32 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Scribble Conversation Parser Plug-in
+Bundle-SymbolicName: org.scribble.conversation.parser;singleton:=true
+Bundle-Version: 0.1.0.qualifier
+Bundle-Activator: org.scribble.conversation.parser.osgi.Activator
+Bundle-Vendor: www.scribble.org
+Import-Package: org.osgi.framework;version="1.3.0"
+Require-Bundle: org.scribble.core,
+ org.scribble.conversation.model,
+ org.scribble.protocol.model
+Bundle-ActivationPolicy: lazy
+Scribble-Extensions: org.scribble.conversation.parser.ConversationKeyWordProvider,
+   org.scribble.conversation.parser.ConversationParserRule,
+   org.scribble.conversation.parser.ConversationReferenceParserRule,
+   org.scribble.conversation.parser.ProtocolImplementsReferenceParserRule,
+   org.scribble.conversation.parser.ConversationInteractionParserRule,
+   org.scribble.conversation.parser.IfParserRule,
+   org.scribble.conversation.parser.WhenParserRule,
+   org.scribble.conversation.parser.WhileParserRule,
+   org.scribble.conversation.parser.ParallelParserRule,
+   org.scribble.conversation.parser.RunParserRule,
+   org.scribble.conversation.parser.RunConversationParserRule,
+   org.scribble.conversation.parser.SpawnParserRule,
+   org.scribble.conversation.parser.SpawnConversationParserRule,
+   org.scribble.conversation.parser.VariableListParserRule,
+   org.scribble.conversation.parser.ConversationModelParserRule,
+   org.scribble.conversation.parser.RaiseParserRule,
+   org.scribble.conversation.parser.TryEscapeParserRule,
+   org.scribble.conversation.parser.CatchBlockParserRule,
+   org.scribble.conversation.parser.InterruptBlockParserRule
+Export-Package: org.scribble.conversation.parser

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.parser/build.properties
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.parser/build.properties	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.parser/build.properties	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,5 @@
+source.. = src/java/
+output.. = classes/
+bin.includes = META-INF/,\
+               .,\
+               plugin.xml

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.parser/classes/org/scribble/conversation/parser/CatchBlockParserRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conversation.parser/classes/org/scribble/conversation/parser/CatchBlockParserRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.parser/classes/org/scribble/conversation/parser/ConversationInteractionParserRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conversation.parser/classes/org/scribble/conversation/parser/ConversationInteractionParserRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.parser/classes/org/scribble/conversation/parser/ConversationKeyWordProvider.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conversation.parser/classes/org/scribble/conversation/parser/ConversationKeyWordProvider.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.parser/classes/org/scribble/conversation/parser/ConversationModelParserRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conversation.parser/classes/org/scribble/conversation/parser/ConversationModelParserRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.parser/classes/org/scribble/conversation/parser/ConversationParserRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conversation.parser/classes/org/scribble/conversation/parser/ConversationParserRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.parser/classes/org/scribble/conversation/parser/ConversationReferenceParserRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conversation.parser/classes/org/scribble/conversation/parser/ConversationReferenceParserRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.parser/classes/org/scribble/conversation/parser/IdentityLocatorParserRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conversation.parser/classes/org/scribble/conversation/parser/IdentityLocatorParserRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.parser/classes/org/scribble/conversation/parser/IfParserRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conversation.parser/classes/org/scribble/conversation/parser/IfParserRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.parser/classes/org/scribble/conversation/parser/InterruptBlockParserRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conversation.parser/classes/org/scribble/conversation/parser/InterruptBlockParserRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.parser/classes/org/scribble/conversation/parser/Messages.properties
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.parser/classes/org/scribble/conversation/parser/Messages.properties	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.parser/classes/org/scribble/conversation/parser/Messages.properties	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,26 @@
+# /*
+# * Copyright 2007-8 Pi4 Technologies Ltd
+# *
+# * Licensed under the Apache License, Version 2.0 (the "License");
+# * you may not use this file except in compliance with the License.
+# * You may obtain a copy of the License at
+# *
+# *     http://www.apache.org/licenses/LICENSE-2.0
+# *
+# * Unless required by applicable law or agreed to in writing, software
+# * distributed under the License is distributed on an "AS IS" BASIS,
+# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# * See the License for the specific language governing permissions and
+# * limitations under the License.
+# *
+# *
+# * Change History:
+# * 10 Jan 2008 : Initial version created by gary
+# */
+
+_EXPECTING_VARIABLE_NAME=Expecting variable name
+_INVALID_ELSE=Not expecting an additional 'else' statement
+_REQUIRED_VARIABLE=Must specify a variable '{0}'
+_REQUIRED_VARIABLE_OR_ROLE=Must specify a variable or role '{0}'
+_UNKNOWN_VARIABLE=Unknown variable '{0}'
+_UNKNOWN_VARIABLE_OR_ROLE=Unknown variable or role '{0}'

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.parser/classes/org/scribble/conversation/parser/ParallelParserRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conversation.parser/classes/org/scribble/conversation/parser/ParallelParserRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.parser/classes/org/scribble/conversation/parser/ProtocolImplementsReferenceParserRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conversation.parser/classes/org/scribble/conversation/parser/ProtocolImplementsReferenceParserRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.parser/classes/org/scribble/conversation/parser/RaiseParserRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conversation.parser/classes/org/scribble/conversation/parser/RaiseParserRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.parser/classes/org/scribble/conversation/parser/RunConversationParserRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conversation.parser/classes/org/scribble/conversation/parser/RunConversationParserRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.parser/classes/org/scribble/conversation/parser/RunParserRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conversation.parser/classes/org/scribble/conversation/parser/RunParserRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.parser/classes/org/scribble/conversation/parser/SpawnConversationParserRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conversation.parser/classes/org/scribble/conversation/parser/SpawnConversationParserRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.parser/classes/org/scribble/conversation/parser/SpawnParserRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conversation.parser/classes/org/scribble/conversation/parser/SpawnParserRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.parser/classes/org/scribble/conversation/parser/TryEscapeParserRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conversation.parser/classes/org/scribble/conversation/parser/TryEscapeParserRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.parser/classes/org/scribble/conversation/parser/VariableListParserRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conversation.parser/classes/org/scribble/conversation/parser/VariableListParserRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.parser/classes/org/scribble/conversation/parser/WhenParserRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conversation.parser/classes/org/scribble/conversation/parser/WhenParserRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.parser/classes/org/scribble/conversation/parser/WhileParserRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conversation.parser/classes/org/scribble/conversation/parser/WhileParserRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.parser/classes/org/scribble/conversation/parser/osgi/Activator.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conversation.parser/classes/org/scribble/conversation/parser/osgi/Activator.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.parser/src/java/org/scribble/conversation/parser/CatchBlockParserRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.parser/src/java/org/scribble/conversation/parser/CatchBlockParserRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.parser/src/java/org/scribble/conversation/parser/CatchBlockParserRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,155 @@
+/*
+ * Copyright 2005-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 18 Oct 2008 : Initial version created by gary
+ */
+package org.scribble.conversation.parser;
+
+import org.scribble.extensions.RegistryInfo;
+import org.scribble.model.*;
+import org.scribble.model.admin.DependencyType;
+import org.scribble.model.admin.ModelIssue;
+import org.scribble.model.admin.ModelListener;
+import org.scribble.parser.*;
+import org.scribble.conversation.model.*;
+
+/**
+ * This class provides the parser rule for the CatchBlock construct.
+ * 
+ */
+ at RegistryInfo(extension=ParserRule.class,notation=ConversationNotation.NOTATION_CODE)
+public class CatchBlockParserRule extends org.scribble.parser.AbstractParserRule {
+
+	/**
+	 * The default constructor.
+	 */
+	public CatchBlockParserRule() {
+		super(ParserRuleType.Group);
+	}
+	
+	/**
+	 * This method determines whether the parser rules is
+	 * appropriate to return a model object of the required
+	 * type.
+	 * 
+	 * @param type The required type
+	 * @return Whether the parser rule returns a
+	 * 				model object of the required type
+	 */
+	public boolean isSupported(Class<?> type) {
+		return(type.isAssignableFrom(CatchBlock.class));
+	}
+
+	/**
+	 * This method parses the description to obtain
+	 * a model object of the appropriate type.
+	 * 
+	 * @param context The context
+	 * @param l The listener
+	 * @return The model object
+	 */
+	public Object parse(ParserContext context, ModelListener l) {
+		CatchBlock ret=null;
+		
+		Token t=context.lookahead(0);
+		
+		if (t.isToken("catch", TokenType.Keyword)) {
+			int startpos=t.getSource().getStartPosition();
+			
+			// Consume token
+			context.nextToken();
+			
+			ret = new CatchBlock();
+			
+			ret.getSource().setStartPosition(startpos);
+			
+			// Check for located roles
+			t = context.lookahead(0);
+			
+			if (t.isToken(ModelReference.LOCATED_REFERENCE_SEPARATOR,
+								TokenType.Symbol)) {
+				boolean f_error=false;
+				
+				// Work through list of roles
+				do {
+					// Consume token
+					context.nextToken();
+					
+					// Read next token, which should be an identifier
+					t = context.lookahead(0);
+				
+					if (t.getType() == TokenType.Identifier) {
+						
+						// Consume token
+						context.nextToken();
+					
+						// Locate the role definition
+						Object part=context.getState(t.getText());
+						
+						if (part == null) {
+							l.error(new ModelIssue(t,
+								org.scribble.util.MessageUtil.format(
+										java.util.PropertyResourceBundle.getBundle(
+												"org.scribble.parser.Messages"),
+										"_UNKNOWN_ROLE",
+										new String[]{t.getText()})));
+						} else if (part instanceof Role) {
+							ret.getRoles().add((Role)part);
+						} else {
+							l.error(new ModelIssue(t,
+								org.scribble.util.MessageUtil.format(
+										java.util.PropertyResourceBundle.getBundle(
+												"org.scribble.parser.Messages"),
+										"_REQUIRED_ROLE",
+										new String[]{t.getText()})));
+						}
+						
+						t = context.lookahead(0);
+					} else {
+						l.error(new ModelIssue(t, java.util.PropertyResourceBundle.getBundle(
+							"org.scribble.parser.Messages").
+							getString("_EXPECTING_ROLE_NAME")));
+						f_error = true;
+					}
+				} while (f_error == false &&
+						t.isToken(ParserConstants.LIST_SEPARATOR,
+								TokenType.Symbol));				
+			}
+
+			// Get the type reference
+			TypeReference typeRef=(TypeReference)
+						context.parse(TypeReference.class, l);
+			
+			
+			resolveReference(context, l, typeRef, DependencyType.Uses);
+
+			ret.setType(typeRef);
+
+			// Parse group
+			parseGroup(context, l, ret, true);
+			
+			// Parsing the group does not consume the final curly
+			// bracket, to ensure that other rules know that the
+			// block has completed, so need to look past this token
+			t = context.lookahead(0);
+			
+			ret.getSource().setEndPosition(t.getSource().getStartPosition());
+		}
+		
+		return(ret);
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.parser/src/java/org/scribble/conversation/parser/ConversationInteractionParserRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.parser/src/java/org/scribble/conversation/parser/ConversationInteractionParserRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.parser/src/java/org/scribble/conversation/parser/ConversationInteractionParserRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,285 @@
+/*
+ * Copyright 2007-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 10 Jan 2008 : Initial version created by gary
+ */
+package org.scribble.conversation.parser;
+
+import org.scribble.extensions.*;
+import org.scribble.model.*;
+import org.scribble.model.admin.ModelIssue;
+import org.scribble.model.admin.ModelListener;
+import org.scribble.conversation.model.*;
+import org.scribble.parser.*;
+
+/**
+ * This class provides the parser rule for the ConversationInteraction.
+ * 
+ */
+ at RegistryInfo(extension=ParserRule.class,notation=ConversationNotation.NOTATION_CODE) //,preference=10,category=Interaction.class
+public class ConversationInteractionParserRule extends org.scribble.parser.InteractionParserRule {
+
+	/**
+	 * The default constructor.
+	 */
+	public ConversationInteractionParserRule() {
+	}
+	
+	/**
+	 * This method determines whether the parser rules is
+	 * appropriate to return a model object of the required
+	 * type.
+	 * 
+	 * @param type The required type
+	 * @return Whether the parser rule returns a
+	 * 				model object of the required type
+	 */
+	public boolean isSupported(Class<?> type) {
+		return(type.isAssignableFrom(ConversationInteraction.class));
+	}
+
+	/**
+	 * This method creates a new interaction instance.
+	 * 
+	 * @return The interaction instance
+	 */
+	protected Interaction createInteraction() {
+		return(new ConversationInteraction());
+	}
+
+	/**
+	 * This method parses the set of tokens associated with an interaction
+	 * based on the supplied keyword.
+	 * 
+	 * @param keyword The keyword
+	 * @param interaction The interaction being constructed
+	 * @param context The context
+	 * @param l The model listener
+	 * @return Whether the supplied keyword was processed
+	 */
+	protected boolean parseKeyword(String keyword, Interaction interaction,
+					ParserContext context, ModelListener l) {
+		boolean f_processed=false;
+		
+		if (keyword.equals("from")) {
+						
+			// Consume
+			context.nextToken();
+			
+			Token roleOrVar=context.nextToken();
+			Token atVar=null;
+			
+			if (roleOrVar.getType() == TokenType.Identifier) {
+				
+				// Check if variable has been specified
+				Token t=context.lookahead(0);
+				
+				if (t.isToken("@", TokenType.Symbol)) {
+					context.nextToken();
+					
+					atVar = context.lookahead(0);
+					
+					if (atVar.getType() != TokenType.Identifier) {
+						atVar = null;
+					} else {
+						context.nextToken();
+					}
+				}
+				
+				Object state=context.getState(roleOrVar.getText());
+	
+				if (state == null) {
+					l.error(new ModelIssue(roleOrVar,
+							org.scribble.util.MessageUtil.format(
+									java.util.PropertyResourceBundle.getBundle(
+											"org.scribble.conversation.parser.Messages"),
+									"_UNKNOWN_VARIABLE_OR_ROLE",
+									new String[]{roleOrVar.getText()})));
+				} else if (state instanceof Variable) {
+					((ConversationInteraction)interaction).
+								setFromVariable((Variable)state);
+					
+					if (atVar != null) {
+						state=context.getState(atVar.getText());
+						
+						if (state == null) {
+							l.error(new ModelIssue(atVar,
+									org.scribble.util.MessageUtil.format(
+											java.util.PropertyResourceBundle.getBundle(
+													"org.scribble.parser.Messages"),
+											"_UNKNOWN_ROLE",
+											new String[]{atVar.getText()})));
+						} else if (state instanceof Role) {
+							Role r=new Role();
+							r.setName(atVar.getText());
+							
+							r.derivedFrom(atVar);
+							
+							((ConversationInteraction)interaction).
+										setFromRole(r);
+							
+						} else {
+							l.error(new ModelIssue(atVar,
+									org.scribble.util.MessageUtil.format(
+											java.util.PropertyResourceBundle.getBundle(
+													"org.scribble.parser.Messages"),
+											"_REQUIRED_ROLE",
+											new String[]{atVar.getText()})));
+						}
+					}
+				} else if (atVar != null) {
+					l.error(new ModelIssue(roleOrVar,
+							org.scribble.util.MessageUtil.format(
+									java.util.PropertyResourceBundle.getBundle(
+											"org.scribble.conversation.parser.Messages"),
+									"_REQUIRED_VARIABLE",
+									new String[]{roleOrVar.getText()})));
+				} else if (state instanceof Role) {
+					Role r=new Role();
+					r.setName(roleOrVar.getText());
+					
+					r.derivedFrom(roleOrVar);
+					
+					interaction.setFromRole(r);
+					
+					if (atVar != null) {
+						l.error(new ModelIssue(atVar,
+								org.scribble.util.MessageUtil.format(
+										java.util.PropertyResourceBundle.getBundle(
+												"org.scribble.conversation.parser.Messages"),
+										"_REQUIRED_VARIABLE",
+										new String[]{atVar.getText()})));
+					}
+				} else {
+					l.error(new ModelIssue(roleOrVar,
+							org.scribble.util.MessageUtil.format(
+									java.util.PropertyResourceBundle.getBundle(
+											"org.scribble.conversation.parser.Messages"),
+									"_REQUIRED_VARIABLE_OR_ROLE",
+									new String[]{roleOrVar.getText()})));
+				}
+				
+				f_processed = true;
+			}
+
+		} else if (keyword.equals("to")) {
+						
+			// Consume
+			context.nextToken();
+			
+			Token roleOrVar=context.nextToken();
+			Token atVar=null;
+			
+			if (roleOrVar.getType() == TokenType.Identifier) {
+				
+				// Check if variable has been specified
+				Token t=context.lookahead(0);
+				
+				if (t.isToken("@", TokenType.Symbol)) {
+					context.nextToken();
+					
+					atVar = context.lookahead(0);
+					
+					if (atVar.getType() != TokenType.Identifier) {
+						atVar = null;
+					} else {
+						context.nextToken();
+					}
+				}
+				
+				Object state=context.getState(roleOrVar.getText());
+	
+				if (state == null) {
+					l.error(new ModelIssue(roleOrVar,
+							org.scribble.util.MessageUtil.format(
+									java.util.PropertyResourceBundle.getBundle(
+											"org.scribble.conversation.parser.Messages"),
+									"_UNKNOWN_VARIABLE_OR_ROLE",
+									new String[]{roleOrVar.getText()})));
+				} else if (state instanceof Variable) {
+					((ConversationInteraction)interaction).
+								setToVariable((Variable)state);
+					
+					if (atVar != null) {
+						state=context.getState(atVar.getText());
+						
+						if (state == null) {
+							l.error(new ModelIssue(atVar,
+									org.scribble.util.MessageUtil.format(
+											java.util.PropertyResourceBundle.getBundle(
+													"org.scribble.parser.Messages"),
+											"_UNKNOWN_ROLE",
+											new String[]{atVar.getText()})));
+						} else if (state instanceof Role) {
+							Role r=new Role();
+							r.setName(atVar.getText());
+							
+							r.derivedFrom(atVar);
+							
+							((ConversationInteraction)interaction).
+										setToRole(r);
+							
+						} else {
+							l.error(new ModelIssue(atVar,
+									org.scribble.util.MessageUtil.format(
+											java.util.PropertyResourceBundle.getBundle(
+													"org.scribble.parser.Messages"),
+											"_REQUIRED_ROLE",
+											new String[]{atVar.getText()})));
+						}
+					}
+				} else if (atVar != null) {
+					l.error(new ModelIssue(roleOrVar,
+							org.scribble.util.MessageUtil.format(
+									java.util.PropertyResourceBundle.getBundle(
+											"org.scribble.conversation.parser.Messages"),
+									"_REQUIRED_VARIABLE",
+									new String[]{roleOrVar.getText()})));
+				} else if (state instanceof Role) {
+					Role r=new Role();
+					r.setName(roleOrVar.getText());
+					
+					r.derivedFrom(roleOrVar);
+					
+					interaction.setToRole(r);
+					
+					if (atVar != null) {
+						l.error(new ModelIssue(atVar,
+								org.scribble.util.MessageUtil.format(
+										java.util.PropertyResourceBundle.getBundle(
+												"org.scribble.conversation.parser.Messages"),
+										"_REQUIRED_VARIABLE",
+										new String[]{atVar.getText()})));
+					}
+				} else {
+					l.error(new ModelIssue(roleOrVar,
+							org.scribble.util.MessageUtil.format(
+									java.util.PropertyResourceBundle.getBundle(
+											"org.scribble.conversation.parser.Messages"),
+									"_REQUIRED_VARIABLE_OR_ROLE",
+									new String[]{roleOrVar.getText()})));
+				}
+				
+				f_processed = true;
+			}
+		} else {
+			f_processed = super.parseKeyword(keyword, interaction, context, l);
+		}
+		
+		return(f_processed);
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.parser/src/java/org/scribble/conversation/parser/ConversationKeyWordProvider.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.parser/src/java/org/scribble/conversation/parser/ConversationKeyWordProvider.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.parser/src/java/org/scribble/conversation/parser/ConversationKeyWordProvider.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,72 @@
+/*
+ * Copyright 2007-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 9 Jan 2008 : Initial version created by gary
+ */
+package org.scribble.conversation.parser;
+
+import org.scribble.extensions.RegistryInfo;
+import org.scribble.parser.DefaultKeyWordProvider;
+import org.scribble.parser.KeyWordProvider;
+import org.scribble.conversation.model.*;
+
+/**
+ * The conversation notation keyword provider.
+ */
+ at RegistryInfo(extension=KeyWordProvider.class,notation=ConversationNotation.NOTATION_CODE)
+public class ConversationKeyWordProvider extends DefaultKeyWordProvider {
+	
+	public ConversationKeyWordProvider() {
+		super(CONVERSATION_KEYWORDS);
+	}
+	
+	private static final String[] CONVERSATION_KEYWORDS={
+		"namespace",
+		"import",
+		"as",
+		"identify",
+		"with",
+		"using",
+		"stateless",
+		"conversation",
+		"conforms",
+		"implements",
+		"identified",
+		"by",
+		"role",
+		"channel",
+		"via",
+		"from",
+		"to",
+		"request",
+		"replyTo",
+		"parallel",
+		"and",
+		"when",
+		"if",
+		"else",
+		"while",
+		"recur",
+		"run",
+		"spawn",
+		"for",
+		"try",
+		"catch",
+		"interrupt",
+		"raise"
+	};
+}

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.parser/src/java/org/scribble/conversation/parser/ConversationModelParserRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.parser/src/java/org/scribble/conversation/parser/ConversationModelParserRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.parser/src/java/org/scribble/conversation/parser/ConversationModelParserRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,106 @@
+/*
+ * Copyright 2007-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 9 Jan 2008 : Initial version created by gary
+ */
+package org.scribble.conversation.parser;
+
+import org.scribble.extensions.RegistryInfo;
+import org.scribble.model.Import;
+import org.scribble.model.Model;
+import org.scribble.model.admin.ModelListener;
+import org.scribble.parser.ParserContext;
+import org.scribble.parser.ParserRule;
+import org.scribble.parser.Token;
+import org.scribble.parser.TokenType;
+
+import org.scribble.conversation.model.*;
+
+/**
+ * This class provides the model parser for the Conversation notation.
+ * 
+ */
+ at RegistryInfo(extension=ParserRule.class,notation=ConversationNotation.NOTATION_CODE)
+public class ConversationModelParserRule extends org.scribble.parser.AbstractModelParserRule {
+
+	/**
+	 * This method creates the initial empty model.
+	 * 
+	 * @return The model
+	 */
+	protected Model createModel() {
+		return(new ConversationModel());
+	}
+
+	/**
+	 * This method determines whether the keyword is associated
+	 * with the model.
+	 * 
+	 * @param keyword The model keyword
+	 * @return Whether the keyword is associated with the definition
+	 */
+	protected boolean isDefinitionKeyword(String keyword) {
+		return(ConversationParserRule.CONVERSATION_KEYWORD.equals(keyword) ||
+				ConversationParserRule.STATELESS_KEYWORD.equals(keyword));
+	}
+	
+	/**
+	 * This method parsers the model header items.
+	 * 
+	 * @param context The context
+	 * @param l The model listener
+	 * @param model The model
+	 * @return The item has been parsed
+	 */
+	@Override
+	protected boolean parseModelHeaderItem(ParserContext context,
+					ModelListener l, Model model) {
+		boolean ret=super.parseModelHeaderItem(context, l, model);
+		
+		if (ret == false) {
+			Token t = context.lookahead(0);
+			
+			if (t.isToken("identify", TokenType.Keyword)) {
+				ret = true;					
+
+				IdentityLocator locator=(IdentityLocator)context.parse(IdentityLocator.class, l);
+			
+				if (locator != null) {
+					((ConversationModel)model).getIdentityLocators().add(locator);
+				}
+			}
+		}
+		
+		return(ret);
+	}
+	
+	/**
+	 * This method parsers the model body.
+	 * 
+	 * @param context The context
+	 * @param l The model listener
+	 * @param model The model
+	 */
+	@Override
+	protected void parseModelBody(ParserContext context,
+			ModelListener l, Model model) {
+		Conversation conversation=(Conversation)context.parse(Conversation.class, l);
+		
+		((ConversationModel)model).setConversation(conversation);
+	}
+
+}

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.parser/src/java/org/scribble/conversation/parser/ConversationParserRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.parser/src/java/org/scribble/conversation/parser/ConversationParserRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.parser/src/java/org/scribble/conversation/parser/ConversationParserRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,389 @@
+/*
+ * Copyright 2007-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 9 Jan 2008 : Initial version created by gary
+ */
+package org.scribble.conversation.parser;
+
+import org.scribble.extensions.*;
+import org.scribble.conversation.model.*;
+import org.scribble.model.*;
+import org.scribble.model.admin.DependencyType;
+import org.scribble.model.admin.ModelIssue;
+import org.scribble.model.admin.ModelListener;
+import org.scribble.parser.*;
+
+/**
+ * This class provides the parser rule for the Conversation
+ * definition.
+ */
+ at RegistryInfo(extension=ParserRule.class,notation=ConversationNotation.NOTATION_CODE)
+public class ConversationParserRule extends org.scribble.parser.AbstractParserRule {
+
+	public static final String IDENTIFIED_KEYWORD = "identified";
+	public static final String BY_KEYWORD = "by";
+	public static final String TO_KEYWORD = "to";
+	public static final String CONFORMS_KEYWORD = "conforms";
+	public static final String IMPLEMENTS_KEYWORD = "implements";
+	public static final String CONVERSATION_KEYWORD = "conversation";
+	public static final String STATELESS_KEYWORD = "stateless";
+
+	/**
+	 * The default constructor.
+	 */
+	public ConversationParserRule() {
+		super(ParserRuleType.Group);
+	}
+	
+	/**
+	 * This method determines whether the parser rules is
+	 * appropriate to return a model object of the required
+	 * type.
+	 * 
+	 * @param type The required type
+	 * @return Whether the parser rule returns a
+	 * 				model object of the required type
+	 */
+	public boolean isSupported(Class<?> type) {
+		return(type.isAssignableFrom(Conversation.class));
+	}
+
+	/**
+	 * This method parses the description to obtain
+	 * a model object of the appropriate type.
+	 * 
+	 * @param context The context
+	 * @param l The listener
+	 * @return The model object
+	 */
+	public Object parse(ParserContext context, ModelListener l) {
+		Conversation ret=null;
+		boolean stateless=false;
+		int startPos=-1;
+		
+		Token t=context.nextToken();
+		
+		if (t.isToken(STATELESS_KEYWORD, TokenType.Keyword)) {
+			stateless = true;
+			
+			startPos = t.getSource().getStartPosition();
+			
+			t = context.nextToken();
+		}
+		
+		if (t.isToken(CONVERSATION_KEYWORD, TokenType.Keyword)) {
+			
+			ret = new Conversation();
+			
+			if (startPos == -1) {
+				startPos = t.getSource().getStartPosition();
+			}
+			
+			ret.getSource().setStartPosition(startPos);
+			ret.setStateless(stateless);
+			
+			LocatedName name=(LocatedName)context.parse(LocatedName.class, l);
+			
+			if (name != null) {
+				ret.setLocatedName(name);
+				
+				// Check if name has already been defined in state
+				if (context.getState(t.getText()) != null) {
+					l.error(new ModelIssue(t,
+							org.scribble.util.MessageUtil.format(
+									java.util.PropertyResourceBundle.getBundle(
+											"org.scribble.parser.Messages"),
+									"_DUPLICATE_DECLARATION",
+									new String[]{t.getText()})));
+				} else {
+					context.setState(t.getText(), ret);
+				}
+				
+				// Check if conforms specified
+				boolean f_processed=false;
+				
+				do {
+					f_processed = parseDefinitionConstruct(context, l,
+									ret);
+					
+					/*
+					t = context.lookahead(0);
+					
+					if (t.isToken(CONFORMS_KEYWORD, TokenType.Keyword)) {
+						f_processed = true;
+
+						t = context.lookahead(1);
+						
+						if (t.isToken(TO_KEYWORD, TokenType.Keyword)) {
+							context.nextToken();							
+						}
+						
+						do {
+							// Consume keyword
+							context.nextToken();
+							
+							ConformanceReference ref=(ConformanceReference)
+									context.parse(ConformanceReference.class, l);
+							
+							if (ref != null) {
+								resolveReference(context, l, ref, DependencyType.ConformsTo);
+								
+								ret.getConformsTo().add(ref);
+							}
+							
+							t = context.lookahead(0);
+						} while (t.isToken(",", TokenType.Symbol));
+						
+					} else if (t.isToken(IMPLEMENTS_KEYWORD, TokenType.Keyword)) {
+						f_processed = true;
+
+						do {
+							// Consume keyword
+							context.nextToken();
+							
+							ImplementsReference ref=(ImplementsReference)
+									context.parse(ImplementsReference.class, l);
+							
+							if (ref != null) {
+								resolveReference(context, l, ref, DependencyType.Implements);
+
+								ret.getImplements().add(ref);
+							}
+							
+							t = context.lookahead(0);
+						} while (t.isToken(",", TokenType.Symbol));
+
+					}
+					*/
+				} while (f_processed);
+				
+				// Need to create new scope for protocol
+				context.pushScope();
+					
+				if (name.getRole() != null) {
+					context.setState(name.getRole().getName(),
+									name.getRole());
+					
+					context.setLocatedRole(t.getText());
+					
+					/* 27/11/07
+					 * 'Conformance' dependency should be from global
+					 * model to local, not the other way around. If 
+					 * local model is changed, global will be revalidated
+					 * but if global changed, then local should not be.
+					 * 
+					if (context.isOuterScope()) {
+						// Establish dependency on the global model
+						org.scribble.model.DependencyManager dm=
+							(org.scribble.model.DependencyManager)
+							org.scribble.extensions.RegistryFactory.getRegistry().getExtension(
+									org.scribble.model.DependencyManager.class, null);
+						
+						org.scribble.model.ModelRepository mrep=
+							(org.scribble.model.ModelRepository)
+							RegistryFactory.getRegistry().getExtension(
+									org.scribble.model.ModelRepository.class, null);
+
+						if (dm != null && mrep != null) {
+							ModelReference ref=
+								new ModelReference(context.getSource().getNamespace(),
+									context.getSource().getLocalpart(), null,
+									context.getSource().getNotation());
+							
+							mrep.locate(ref, context.getSource());
+							
+							dm.recordDependency(context.getSource(), ref,
+										DependencyType.ConformsTo);
+						}
+					}
+					*/
+				}
+								
+				// Check that the conversation name/located role matches
+				// the source model reference, but only if the source
+				// model has a localpart - otherwise it may not have an
+				// associated file
+				if (context.isOuterScope() && context.getSource().getLocalpart() != null &&
+					(context.getSource().getLocalpart().equals(ret.getLocatedName().getName()) == false ||
+					(context.getSource().getLocatedRole() == null &&
+						ret.getLocatedName().getRole() != null) ||
+					(context.getSource().getLocatedRole() != null &&
+						ret.getLocatedName().getRole() == null) ||
+					(ret.getLocatedName().getRole() != null &&
+						context.getSource().getLocatedRole() != null &&
+						ret.getLocatedName().getRole().getName().equals(
+								context.getSource().getLocatedRole()) == false))) {
+					
+					l.error(new ModelIssue(ret.getLocatedName(), java.util.PropertyResourceBundle.getBundle(
+							"org.scribble.parser.Messages").
+								getString("_INCOMPATIBLE_NAME")));
+				}
+	
+				// Process group
+				parseGroup(context, l, ret.getBlock(), false);
+				
+				// Check unresolved references
+				
+				// TODO: In the ConversationModel, might want to
+				// check if any unresolved references still exist
+				// and report them - not sure if this is being done
+				// somewhere
+				
+				for (int i=0; i < context.getUnresolvedReferences().size(); i++) {
+					
+					if (context.getUnresolvedReferences().get(i) instanceof
+									ConversationReference) {
+						ConversationReference ref=
+							(ConversationReference)
+							context.getUnresolvedReferences().get(i);
+					
+						// Check contained protocol activities
+						for (int j=0; ref.getAlias() != null &&
+									ref.isResolved() == false &&
+									j < ret.getBlock().getContents().size(); j++) {
+							
+							if (ret.getBlock().getContents().get(j) instanceof Conversation) {
+								Conversation conversation=(Conversation)ret.getBlock().getContents().get(j);
+								
+								if (conversation.getLocatedName() != null &&
+									conversation.getLocatedName().getName() != null &&
+									ref.getAlias().equals(
+											conversation.getLocatedName().getName()) &&
+									((ref.getLocatedRole() == null &&
+										conversation.getLocatedName().getRole() == null) ||
+									((ref.getLocatedRole() != null &&
+										conversation.getLocatedName().getRole() != null &&
+										ref.getLocatedRole().equals(
+										conversation.getLocatedName().getRole().getName()))))) {
+										
+									ref.setLocalpart(ref.getAlias());
+									
+									ref.setInner(true);
+									
+									// Remove from unresolved list
+									context.getUnresolvedReferences().remove(i);
+									
+									i--;
+								}
+							}
+						}
+					}
+				}
+				
+				context.popScope();
+				
+				ret.getSource().setEndPosition(name.getSource().getEndPosition());
+			}
+		}
+		
+		return(ret);
+	}
+	
+	/**
+	 * This method parses a definition construct.
+	 * 
+	 * @param context The context
+	 * @param l The model listener
+	 * @param conversation The conversation
+	 * @return Whether the construct was parsed
+	 */
+	protected boolean parseDefinitionConstruct(ParserContext context,
+				ModelListener l, Conversation conversation) {
+		boolean ret=false;
+		
+		Token t = context.lookahead(0);
+		
+		if (t.isToken(CONFORMS_KEYWORD, TokenType.Keyword)) {
+			ret = true;
+
+			t = context.lookahead(1);
+			
+			if (t.isToken(TO_KEYWORD, TokenType.Keyword)) {
+				context.nextToken();							
+			}
+			
+			do {
+				// Consume keyword
+				context.nextToken();
+				
+				ConformanceReference ref=(ConformanceReference)
+						context.parse(ConformanceReference.class, l);
+				
+				if (ref != null) {
+					resolveReference(context, l, ref, DependencyType.ConformsTo);
+					
+					conversation.getConformsTo().add(ref);
+				}
+				
+				t = context.lookahead(0);
+			} while (t.isToken(",", TokenType.Symbol));
+			
+		} else if (t.isToken(IMPLEMENTS_KEYWORD, TokenType.Keyword)) {
+			ret = true;
+
+			do {
+				// Consume keyword
+				context.nextToken();
+				
+				ImplementsReference ref=(ImplementsReference)
+						context.parse(ImplementsReference.class, l);
+				
+				if (ref != null) {
+					resolveReference(context, l, ref, DependencyType.Implements);
+
+					conversation.getImplements().add(ref);
+				}
+				
+				t = context.lookahead(0);
+			} while (t.isToken(",", TokenType.Symbol));
+
+		} else if (t.isToken(IDENTIFIED_KEYWORD, TokenType.Keyword)) {
+			ret = true;
+
+			t = context.lookahead(1);
+			
+			if (t.isToken(BY_KEYWORD, TokenType.Keyword)) {
+				context.nextToken();							
+			}
+			
+			do {
+				// Consume keyword
+				context.nextToken();
+				
+				t = context.lookahead(0);
+				
+				if (t.getType() == TokenType.Identifier) {
+					context.nextToken();
+					
+					Identity id=new Identity();
+					id.getNames().add(t.getText());
+					
+					conversation.getIdentities().add(id);
+				} else {
+					l.error(new ModelIssue(t, java.util.PropertyResourceBundle.getBundle(
+							"org.scribble.parser.Messages").
+						getString("_EXPECTING_IDENTIFIER")));
+				}
+				
+				t = context.lookahead(0);
+				
+			} while (t.isToken(",", TokenType.Symbol));
+		}
+		
+		return(ret);
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.parser/src/java/org/scribble/conversation/parser/ConversationReferenceParserRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.parser/src/java/org/scribble/conversation/parser/ConversationReferenceParserRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.parser/src/java/org/scribble/conversation/parser/ConversationReferenceParserRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,85 @@
+/*
+ * Copyright 2007-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 9 Jan 2008 : Initial version created by gary
+ */
+package org.scribble.conversation.parser;
+
+import org.scribble.extensions.*;
+import org.scribble.model.*;
+import org.scribble.model.admin.ModelListener;
+import org.scribble.conversation.model.*;
+import org.scribble.parser.*;
+
+/**
+ * This class provides the parser rule for the Conversation Reference.
+ */
+ at RegistryInfo(extension=ParserRule.class)
+public class ConversationReferenceParserRule extends AbstractModelReferenceParserRule {
+
+	/**
+	 * The default constructor.
+	 */
+	public ConversationReferenceParserRule() {
+		super(true);
+	}
+	
+	/**
+	 * This method returns the class associated with the
+	 * concrete model reference.
+	 * 
+	 * @return The model reference class
+	 */
+	protected Class<?> getReferenceClass() {
+		return(ConversationReference.class);
+	}
+
+	/**
+	 * This method instantiates an instance of the model
+	 * reference.
+	 * 
+	 * @param context The parser context
+	 * @param l The model listener
+	 * @return The instantiated model reference
+	 */
+	protected ModelReference createReference(ParserContext context, ModelListener l) {
+		return(new ConversationReference());
+	}
+
+	/**
+	 * This method parses the description to obtain
+	 * a model object of the appropriate type.
+	 * 
+	 * @param context The context
+	 * @param l The listener
+	 * @return The model object
+	 */
+	public Object parse(ParserContext context, ModelListener l) {
+		Object ret=super.parse(context, l);
+		
+		// Check if reference has been resolved
+		if (ret instanceof ConversationReference &&
+				((ConversationReference)ret).isResolved() == false) {
+			
+			// Add to unresolved reference list for current scope
+			context.getUnresolvedReferences().add(
+						(ConversationReference)ret);
+		}
+		
+		return(ret);
+	}	
+}

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.parser/src/java/org/scribble/conversation/parser/IdentityLocatorParserRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.parser/src/java/org/scribble/conversation/parser/IdentityLocatorParserRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.parser/src/java/org/scribble/conversation/parser/IdentityLocatorParserRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,194 @@
+/*
+ * Copyright 2007-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 27 July 2008 : Initial version created by gary
+ */
+package org.scribble.conversation.parser;
+
+import org.scribble.extensions.*;
+import org.scribble.model.*;
+import org.scribble.model.admin.ModelIssue;
+import org.scribble.model.admin.ModelListener;
+import org.scribble.conversation.model.*;
+import org.scribble.parser.*;
+
+/**
+ * This class provides the parser rule for the Identify statement.
+ */
+ at RegistryInfo(extension=ParserRule.class)
+public class IdentityLocatorParserRule extends AbstractParserRule {
+
+	/**
+	 * This is the default constructor.
+	 */
+	public IdentityLocatorParserRule() {
+		super(ParserRuleType.Line);
+	}
+	
+	/**
+	 * This method determines whether the parser rules is
+	 * appropriate to return a model object of the required
+	 * type.
+	 * 
+	 * @param type The required type
+	 * @return Whether the parser rule returns a
+	 * 				model object of the required type
+	 */
+	public boolean isSupported(Class<?> type) {
+		return(type.isAssignableFrom(IdentityLocator.class));
+	}
+
+	/**
+	 * This method parses the description to obtain
+	 * a model object of the appropriate type.
+	 * 
+	 * @param context The context
+	 * @param l The listener
+	 * @return The model object
+	 */
+	public Object parse(ParserContext context, ModelListener l) {
+		IdentityLocator ret=null;
+		
+		Token t=context.lookahead(0);
+		
+		if (t.isToken("identify", TokenType.Keyword)) {
+			ret = new IdentityLocator();
+			
+			ret.getSource().setStartPosition(t.getSource().getStartPosition());
+			
+			// Consume token
+			context.nextToken();
+			
+			ret.setType((TypeReference)
+						context.parse(TypeReference.class, l));
+			
+			t = context.lookahead(0);
+			
+			if (t.isToken("with", TokenType.Keyword)) {
+				
+				context.nextToken();
+				
+				do {
+					t = context.lookahead(0);
+					
+					if (ret.getNumberOfLocators() > 0 &&
+							t.isToken(",", TokenType.Symbol)) {
+						context.nextToken();
+						
+						t = context.lookahead(0);
+					}
+					
+					if (t.getType() == TokenType.Identifier) {
+						String identity=t.getText();
+						
+						context.nextToken();
+						
+						t = context.lookahead(0);
+						
+						if (t.isToken("using", TokenType.Keyword)) {
+							
+							context.nextToken();
+							
+							t = context.lookahead(0);
+							
+							// Get string literal
+							if (t.getType() == TokenType.StringLiteral) {
+								ret.setLocator(identity, t.getText());
+							}
+						} else {
+							// TODO: Expecting keyword
+						}
+					} else {
+						l.error(new ModelIssue(t, java.util.PropertyResourceBundle.getBundle(
+								"org.scribble.parser.Messages").
+							getString("_EXPECTING_IDENTIFIER")));
+					}
+					
+				} while (t.isToken(",", TokenType.Symbol));
+			} else {
+				// TODO: Expecting keyword
+			}
+			
+			/*
+			t = context.lookahead(0);
+			
+			String fqname="";
+			boolean f_end=false;
+			
+			do {
+				if (t.getType() == TokenType.Identifier) {
+					Token id=context.nextToken();
+					fqname += id.getText();
+				
+					t = context.lookahead(0);
+				
+					if (t.isToken(".", TokenType.Symbol)) {
+					
+						context.nextToken();
+						
+						fqname += ".";
+					
+						t = context.lookahead(0);
+					} else {
+						f_end = true;
+					}
+				} else if (t.isToken("*", TokenType.Symbol)) {
+					
+					context.nextToken();
+					
+					fqname += "*";
+					
+					f_end = true;
+				} else {
+					
+					l.error(t, java.util.PropertyResourceBundle.getBundle(
+							"org.scribble.parser.Messages").
+								getString("_EXPECTING_IDENTIFIER"), null);
+					
+					f_end = true;
+				}
+			} while (f_end == false);
+			
+			if (fqname.length() > 0) {
+				ret.setName(fqname);
+			}
+			
+			if (t.isToken("as", TokenType.Keyword)) {
+				context.nextToken();
+				
+				t = context.lookahead(0);
+				
+				if (t.getType() == TokenType.Identifier) {
+					
+					context.nextToken();
+					
+					ret.setAlias(t.getText());
+				} else {
+					l.error(t, java.util.PropertyResourceBundle.getBundle(
+							"org.scribble.parser.Messages").
+							getString("_EXPECTING_IDENTIFIER"), null);
+				}
+			}
+			*/
+			
+			ret.getSource().setEndPosition(t.getSource().getEndPosition());
+		}
+		
+		return(ret);
+	}
+	
+}

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.parser/src/java/org/scribble/conversation/parser/IfParserRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.parser/src/java/org/scribble/conversation/parser/IfParserRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.parser/src/java/org/scribble/conversation/parser/IfParserRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,223 @@
+/*
+ * Copyright 2007-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 1 Feb 2008 : Initial version created by gary
+ */
+package org.scribble.conversation.parser;
+
+import org.scribble.extensions.RegistryInfo;
+import org.scribble.model.*;
+import org.scribble.model.admin.ModelIssue;
+import org.scribble.model.admin.ModelListener;
+import org.scribble.parser.*;
+import org.scribble.conversation.model.*;
+
+/**
+ * This class provides the parser rule for the If construct.
+ * 
+ */
+ at RegistryInfo(extension=ParserRule.class,notation=ConversationNotation.NOTATION_CODE)
+public class IfParserRule extends org.scribble.parser.AbstractParserRule {
+
+	/**
+	 * The default constructor.
+	 */
+	public IfParserRule() {
+		super(ParserRuleType.Group);
+	}
+	
+	/**
+	 * This method determines whether the parser rules is
+	 * appropriate to return a model object of the required
+	 * type.
+	 * 
+	 * @param type The required type
+	 * @return Whether the parser rule returns a
+	 * 				model object of the required type
+	 */
+	public boolean isSupported(Class<?> type) {
+		return(type.isAssignableFrom(If.class));
+	}
+
+	/**
+	 * This method parses the description to obtain
+	 * a model object of the appropriate type.
+	 * 
+	 * @param context The context
+	 * @param l The listener
+	 * @return The model object
+	 */
+	public Object parse(ParserContext context, ModelListener l) {
+		If ret=null;
+		
+		Token t=context.lookahead(0);
+		
+		if (t.isToken("if", TokenType.Keyword)) {
+			int startpos=t.getSource().getStartPosition();
+
+			// Consume token
+			context.nextToken();
+			
+			ret = new If();
+				
+			ret.getSource().setStartPosition(startpos);
+			
+			// Check for located roles
+			t = context.lookahead(0);
+			
+			if (t.isToken(ModelReference.LOCATED_REFERENCE_SEPARATOR,
+								TokenType.Symbol)) {
+				boolean f_error=false;
+				
+				// Work through list of roles
+				do {
+					// Consume token
+					context.nextToken();
+					
+					// Read next token, which should be an identifier
+					t = context.lookahead(0);
+				
+					if (t.getType() == TokenType.Identifier) {
+						
+						// Consume token
+						context.nextToken();
+					
+						// Locate the role definition
+						Object part=context.getState(t.getText());
+						
+						if (part == null) {
+							l.error(new ModelIssue(t,
+								org.scribble.util.MessageUtil.format(
+										java.util.PropertyResourceBundle.getBundle(
+												"org.scribble.parser.Messages"),
+										"_UNKNOWN_ROLE",
+										new String[]{t.getText()})));
+						} else if (part instanceof Role) {
+							ret.getRoles().add((Role)part);
+						} else {
+							l.error(new ModelIssue(t,
+								org.scribble.util.MessageUtil.format(
+										java.util.PropertyResourceBundle.getBundle(
+												"org.scribble.parser.Messages"),
+										"_REQUIRED_ROLE",
+										new String[]{t.getText()})));
+						}
+						
+						t = context.lookahead(0);
+					} else {
+						l.error(new ModelIssue(t, java.util.PropertyResourceBundle.getBundle(
+							"org.scribble.parser.Messages").
+							getString("_EXPECTING_ROLE_NAME")));
+						f_error = true;
+					}
+				} while (f_error == false &&
+						t.isToken(ParserConstants.LIST_SEPARATOR,
+								TokenType.Symbol));				
+			}
+			
+			boolean f_end=false;
+			boolean f_conditional=true;
+			
+			do {
+				f_end = true;
+				
+				Block block=null;
+				
+				if (f_conditional) {
+					ConditionalBlock cblock = new ConditionalBlock();
+					ret.getConditionalBlocks().add(cblock);
+					
+					block = cblock;
+					
+					block.getSource().setStartPosition(t.getSource().getStartPosition());
+
+					t = context.lookahead(0);
+
+					if (t.isToken("(", TokenType.Symbol)) {
+						// Consume symbol
+						context.nextToken();
+						
+						cblock.setExpression((Expression)
+								context.parse(Expression.class, l));
+						
+						// Check if end of expression symbol specified
+						t = context.lookahead(0);
+						
+						if (t.isToken(")", TokenType.Symbol)) {
+							context.nextToken();
+						} else {
+							
+							// Report 'expecting )' message
+							l.error(new ModelIssue(t, org.scribble.util.MessageUtil.format(
+									java.util.PropertyResourceBundle.getBundle(
+											"org.scribble.parser.Messages"),
+											"_EXPECTING_SYMBOL",
+											new String[]{")"})));
+						}
+					}
+				} else {
+					block = new Block();
+					ret.setElseBlock(block);
+					
+					//block.getSource().setStartPosition(t.getSource().getStartPosition());
+				}
+
+				// Parse group
+				parseGroup(context, l, block, true);
+				
+				// Parsing the group does not consume the final curly
+				// bracket, to ensure that other rules know that the
+				// block has completed, so need to look past this token
+				t = context.lookahead(0);
+				
+				//block.getSource().setEndPosition(t.getSource().getStartPosition());
+
+				ret.getSource().setEndPosition(t.getSource().getStartPosition());
+
+				if (t.isToken("else", TokenType.Keyword)) {
+					
+					if (f_conditional == false) {
+						l.error(new ModelIssue(t, java.util.PropertyResourceBundle.getBundle(
+								"org.scribble.conversation.parser.Messages").
+								getString("_INVALID_ELSE")));
+					} else {
+						f_end = false;
+
+						// Consume 'else'
+						context.nextToken();
+						
+						t = context.lookahead(0);
+						
+						if (t.isToken("if", TokenType.Keyword)) {
+							
+							context.nextToken();
+							
+						} else {							
+							f_conditional = false;
+						}
+					}
+				}
+				
+			} while (f_end == false);
+			
+			t = context.lookahead(-1);
+			ret.getSource().setEndPosition(t.getSource().getEndPosition());
+		}
+		
+		return(ret);
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.parser/src/java/org/scribble/conversation/parser/InterruptBlockParserRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.parser/src/java/org/scribble/conversation/parser/InterruptBlockParserRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.parser/src/java/org/scribble/conversation/parser/InterruptBlockParserRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,170 @@
+/*
+ * Copyright 2005-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 18 Oct 2008 : Initial version created by gary
+ */
+package org.scribble.conversation.parser;
+
+import org.scribble.extensions.RegistryInfo;
+import org.scribble.model.*;
+import org.scribble.model.admin.ModelIssue;
+import org.scribble.model.admin.ModelListener;
+import org.scribble.parser.*;
+import org.scribble.conversation.model.*;
+
+/**
+ * This class provides the parser rule for the CatchBlock construct.
+ * 
+ */
+ at RegistryInfo(extension=ParserRule.class,notation=ConversationNotation.NOTATION_CODE)
+public class InterruptBlockParserRule extends org.scribble.parser.AbstractParserRule {
+
+	/**
+	 * The default constructor.
+	 */
+	public InterruptBlockParserRule() {
+		super(ParserRuleType.Group);
+	}
+	
+	/**
+	 * This method determines whether the parser rules is
+	 * appropriate to return a model object of the required
+	 * type.
+	 * 
+	 * @param type The required type
+	 * @return Whether the parser rule returns a
+	 * 				model object of the required type
+	 */
+	public boolean isSupported(Class<?> type) {
+		return(type.isAssignableFrom(InterruptBlock.class));
+	}
+
+	/**
+	 * This method parses the description to obtain
+	 * a model object of the appropriate type.
+	 * 
+	 * @param context The context
+	 * @param l The listener
+	 * @return The model object
+	 */
+	public Object parse(ParserContext context, ModelListener l) {
+		InterruptBlock ret=null;
+		
+		Token t=context.lookahead(0);
+		
+		if (t.isToken("interrupt", TokenType.Keyword)) {
+			int startpos=t.getSource().getStartPosition();
+			
+			// Consume token
+			context.nextToken();
+			
+			ret = new InterruptBlock();
+			
+			ret.getSource().setStartPosition(startpos);
+			
+			// Check for located roles
+			t = context.lookahead(0);
+			
+			if (t.isToken(ModelReference.LOCATED_REFERENCE_SEPARATOR,
+								TokenType.Symbol)) {
+				boolean f_error=false;
+				
+				// Work through list of roles
+				do {
+					// Consume token
+					context.nextToken();
+					
+					// Read next token, which should be an identifier
+					t = context.lookahead(0);
+				
+					if (t.getType() == TokenType.Identifier) {
+						
+						// Consume token
+						context.nextToken();
+					
+						// Locate the role definition
+						Object part=context.getState(t.getText());
+						
+						if (part == null) {
+							l.error(new ModelIssue(t,
+								org.scribble.util.MessageUtil.format(
+										java.util.PropertyResourceBundle.getBundle(
+												"org.scribble.parser.Messages"),
+										"_UNKNOWN_ROLE",
+										new String[]{t.getText()})));
+						} else if (part instanceof Role) {
+							ret.getRoles().add((Role)part);
+						} else {
+							l.error(new ModelIssue(t,
+								org.scribble.util.MessageUtil.format(
+										java.util.PropertyResourceBundle.getBundle(
+												"org.scribble.parser.Messages"),
+										"_REQUIRED_ROLE",
+										new String[]{t.getText()})));
+						}
+						
+						t = context.lookahead(0);
+					} else {
+						l.error(new ModelIssue(t, java.util.PropertyResourceBundle.getBundle(
+							"org.scribble.parser.Messages").
+							getString("_EXPECTING_ROLE_NAME")));
+						f_error = true;
+					}
+				} while (f_error == false &&
+						t.isToken(ParserConstants.LIST_SEPARATOR,
+								TokenType.Symbol));				
+			}
+
+			t = context.lookahead(0);
+
+			if (t.isToken("(", TokenType.Symbol)) {
+				// Consume symbol
+				context.nextToken();
+				
+				ret.setExpression((Expression)
+						context.parse(Expression.class, l));
+				
+				// Check if end of expression symbol specified
+				t = context.lookahead(0);
+				
+				if (t.isToken(")", TokenType.Symbol)) {
+					context.nextToken();
+				} else {
+					
+					// Report 'expecting )' message
+					l.error(new ModelIssue(t, org.scribble.util.MessageUtil.format(
+							java.util.PropertyResourceBundle.getBundle(
+									"org.scribble.parser.Messages"),
+									"_EXPECTING_SYMBOL",
+									new String[]{")"})));
+				}
+			}
+
+			// Parse group
+			parseGroup(context, l, ret, true);
+			
+			// Parsing the group does not consume the final curly
+			// bracket, to ensure that other rules know that the
+			// block has completed, so need to look past this token
+			t = context.lookahead(0);
+			
+			ret.getSource().setEndPosition(t.getSource().getStartPosition());
+		}
+		
+		return(ret);
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.parser/src/java/org/scribble/conversation/parser/Messages.properties
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.parser/src/java/org/scribble/conversation/parser/Messages.properties	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.parser/src/java/org/scribble/conversation/parser/Messages.properties	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,26 @@
+# /*
+# * Copyright 2007-8 Pi4 Technologies Ltd
+# *
+# * Licensed under the Apache License, Version 2.0 (the "License");
+# * you may not use this file except in compliance with the License.
+# * You may obtain a copy of the License at
+# *
+# *     http://www.apache.org/licenses/LICENSE-2.0
+# *
+# * Unless required by applicable law or agreed to in writing, software
+# * distributed under the License is distributed on an "AS IS" BASIS,
+# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# * See the License for the specific language governing permissions and
+# * limitations under the License.
+# *
+# *
+# * Change History:
+# * 10 Jan 2008 : Initial version created by gary
+# */
+
+_EXPECTING_VARIABLE_NAME=Expecting variable name
+_INVALID_ELSE=Not expecting an additional 'else' statement
+_REQUIRED_VARIABLE=Must specify a variable '{0}'
+_REQUIRED_VARIABLE_OR_ROLE=Must specify a variable or role '{0}'
+_UNKNOWN_VARIABLE=Unknown variable '{0}'
+_UNKNOWN_VARIABLE_OR_ROLE=Unknown variable or role '{0}'

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.parser/src/java/org/scribble/conversation/parser/ParallelParserRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.parser/src/java/org/scribble/conversation/parser/ParallelParserRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.parser/src/java/org/scribble/conversation/parser/ParallelParserRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,114 @@
+/*
+ * Copyright 2007-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 8 Mar 2008 : Initial version created by gary
+ */
+package org.scribble.conversation.parser;
+
+import org.scribble.extensions.RegistryInfo;
+import org.scribble.model.*;
+import org.scribble.model.admin.ModelListener;
+import org.scribble.parser.*;
+import org.scribble.conversation.model.*;
+
+/**
+ * This class provides the parser rule for the Parallel construct.
+ * 
+ */
+ at RegistryInfo(extension=ParserRule.class,notation=ConversationNotation.NOTATION_CODE)
+public class ParallelParserRule extends org.scribble.parser.AbstractParserRule {
+
+	/**
+	 * The default constructor.
+	 */
+	public ParallelParserRule() {
+		super(ParserRuleType.Group);
+	}
+	
+	/**
+	 * This method determines whether the parser rules is
+	 * appropriate to return a model object of the required
+	 * type.
+	 * 
+	 * @param type The required type
+	 * @return Whether the parser rule returns a
+	 * 				model object of the required type
+	 */
+	public boolean isSupported(Class<?> type) {
+		return(type.isAssignableFrom(Parallel.class));
+	}
+
+	/**
+	 * This method parses the description to obtain
+	 * a model object of the appropriate type.
+	 * 
+	 * @param context The context
+	 * @param l The listener
+	 * @return The model object
+	 */
+	public Object parse(ParserContext context, ModelListener l) {
+		Parallel ret=null;
+		
+		Token t=context.lookahead(0);
+		
+		if (t.isToken("parallel", TokenType.Keyword)) {
+			int startpos=t.getSource().getStartPosition();
+
+			// Consume token
+			context.nextToken();
+			
+			ret = new Parallel();
+				
+			ret.getSource().setStartPosition(startpos);
+			
+			// Check for located roles
+			t = context.lookahead(0);
+			
+			boolean f_end=false;
+			
+			do {
+				f_end = true;
+				
+				Block block=new Block();
+				
+				ret.getBlocks().add(block);
+
+				block.getSource().setStartPosition(t.getSource().getStartPosition());
+
+				// Parse group
+				parseGroup(context, l, block, true);
+				
+				t = context.lookahead(0);
+				
+				block.getSource().setEndPosition(t.getSource().getStartPosition());
+
+				if (t.isToken("and", TokenType.Keyword)) {
+					f_end = false;
+					
+					// Consume 'and'
+					context.nextToken();
+				}
+				
+			} while (f_end == false);
+			
+			t = context.lookahead(-1);
+			ret.getSource().setEndPosition(t.getSource().getEndPosition());
+		}
+		
+		return(ret);
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.parser/src/java/org/scribble/conversation/parser/ProtocolImplementsReferenceParserRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.parser/src/java/org/scribble/conversation/parser/ProtocolImplementsReferenceParserRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.parser/src/java/org/scribble/conversation/parser/ProtocolImplementsReferenceParserRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,54 @@
+/*
+ * Copyright 2007-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 1 Feb 2008 : Initial version created by gary
+ */
+package org.scribble.conversation.parser;
+
+import org.scribble.extensions.*;
+import org.scribble.model.*;
+import org.scribble.model.admin.ModelListener;
+import org.scribble.conversation.model.*;
+import org.scribble.protocol.model.*;
+import org.scribble.parser.*;
+
+/**
+ * This class provides the parser rule for the Protocol Implements Reference.
+ */
+ at RegistryInfo(extension=ParserRule.class,notation=ConversationNotation.NOTATION_CODE)
+public class ProtocolImplementsReferenceParserRule extends AbstractImplementsReferenceParserRule {
+
+	public static final String UNRESOLVED_CONVERSATION_REFS = "UNRESOLVED_CONVERSATION_REFS";
+
+	/**
+	 * The default constructor.
+	 */
+	public ProtocolImplementsReferenceParserRule() {
+	}
+	
+	/**
+	 * This method returns the notation that should be used for the
+	 * 'implements' reference.
+	 * 
+	 * @param context The parser context
+	 * @param l The model listener
+	 * @return The notation code
+	 */
+	protected String getNotation(ParserContext context, ModelListener l) {
+		return(ProtocolNotation.NOTATION_CODE);
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.parser/src/java/org/scribble/conversation/parser/RaiseParserRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.parser/src/java/org/scribble/conversation/parser/RaiseParserRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.parser/src/java/org/scribble/conversation/parser/RaiseParserRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,148 @@
+/*
+ * Copyright 2007-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 10 Nov 2008 : Initial version created by gary
+ */
+package org.scribble.conversation.parser;
+
+import org.scribble.extensions.RegistryInfo;
+import org.scribble.model.*;
+import org.scribble.model.admin.DependencyType;
+import org.scribble.model.admin.ModelIssue;
+import org.scribble.model.admin.ModelListener;
+import org.scribble.parser.*;
+import org.scribble.conversation.model.*;
+
+/**
+ * This class provides the parser rule for the Raise construct.
+ * 
+ */
+ at RegistryInfo(extension=ParserRule.class,notation=ConversationNotation.NOTATION_CODE)
+public class RaiseParserRule extends org.scribble.parser.AbstractParserRule {
+
+	/**
+	 * The default constructor.
+	 */
+	public RaiseParserRule() {
+		super(ParserRuleType.Line);
+	}
+	
+	/**
+	 * This method determines whether the parser rules is
+	 * appropriate to return a model object of the required
+	 * type.
+	 * 
+	 * @param type The required type
+	 * @return Whether the parser rule returns a
+	 * 				model object of the required type
+	 */
+	public boolean isSupported(Class<?> type) {
+		return(type.isAssignableFrom(Raise.class));
+	}
+
+	/**
+	 * This method parses the description to obtain
+	 * a model object of the appropriate type.
+	 * 
+	 * @param context The context
+	 * @param l The listener
+	 * @return The model object
+	 */
+	public Object parse(ParserContext context, ModelListener l) {
+		Raise ret=null;
+		
+		Token t=context.lookahead(0);
+		
+		if (t.isToken("raise", TokenType.Keyword)) {
+			int startpos=t.getSource().getStartPosition();
+			
+			// Consume token
+			context.nextToken();
+			
+			ret = new Raise();
+			
+			ret.getSource().setStartPosition(startpos);
+			
+			// Check for located roles
+			t = context.lookahead(0);
+			
+			if (t.isToken(ModelReference.LOCATED_REFERENCE_SEPARATOR,
+								TokenType.Symbol)) {
+				boolean f_error=false;
+				
+				// Work through list of roles
+				do {
+					// Consume token
+					context.nextToken();
+					
+					// Read next token, which should be an identifier
+					t = context.lookahead(0);
+				
+					if (t.getType() == TokenType.Identifier) {
+						
+						// Consume token
+						context.nextToken();
+					
+						// Locate the role definition
+						Object part=context.getState(t.getText());
+						
+						if (part == null) {
+							l.error(new ModelIssue(t,
+								org.scribble.util.MessageUtil.format(
+										java.util.PropertyResourceBundle.getBundle(
+												"org.scribble.parser.Messages"),
+										"_UNKNOWN_ROLE",
+										new String[]{t.getText()})));
+						} else if (part instanceof Role) {
+							ret.getRoles().add((Role)part);
+						} else {
+							l.error(new ModelIssue(t,
+								org.scribble.util.MessageUtil.format(
+										java.util.PropertyResourceBundle.getBundle(
+												"org.scribble.parser.Messages"),
+										"_REQUIRED_ROLE",
+										new String[]{t.getText()})));
+						}
+						
+						t = context.lookahead(0);
+					} else {
+						l.error(new ModelIssue(t, java.util.PropertyResourceBundle.getBundle(
+							"org.scribble.parser.Messages").
+							getString("_EXPECTING_ROLE_NAME")));
+						f_error = true;
+					}
+				} while (f_error == false &&
+						t.isToken(ParserConstants.LIST_SEPARATOR,
+								TokenType.Symbol));				
+			}
+
+			// Get the type reference
+			TypeReference typeRef=(TypeReference)
+						context.parse(TypeReference.class, l);
+			
+			resolveReference(context, l, typeRef, DependencyType.Uses);
+			
+			ret.setType(typeRef);
+			
+			t = context.lookahead(0);
+			
+			ret.getSource().setEndPosition(t.getSource().getEndPosition());
+		}
+		
+		return(ret);
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.parser/src/java/org/scribble/conversation/parser/RunConversationParserRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.parser/src/java/org/scribble/conversation/parser/RunConversationParserRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.parser/src/java/org/scribble/conversation/parser/RunConversationParserRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,232 @@
+/*
+ * Copyright 2007-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 9 Mar 2008 : Initial version created by gary
+ */
+package org.scribble.conversation.parser;
+
+import org.scribble.extensions.RegistryInfo;
+import org.scribble.model.*;
+import org.scribble.model.admin.ModelIssue;
+import org.scribble.model.admin.ModelListener;
+import org.scribble.parser.*;
+import org.scribble.conversation.model.*;
+
+/**
+ * This class provides the parser rule for the Run construct.
+ * 
+ */
+ at RegistryInfo(extension=ParserRule.class,notation=ConversationNotation.NOTATION_CODE)
+public class RunConversationParserRule extends org.scribble.parser.AbstractParserRule {
+
+	/**
+	 * The default constructor.
+	 */
+	public RunConversationParserRule() {
+		super(ParserRuleType.Group);
+	}
+	
+	/**
+	 * This method determines whether the parser rules is
+	 * appropriate to return a model object of the required
+	 * type.
+	 * 
+	 * @param type The required type
+	 * @return Whether the parser rule returns a
+	 * 				model object of the required type
+	 */
+	public boolean isSupported(Class<?> type) {
+		return(type.isAssignableFrom(Run.class));
+	}
+
+	/**
+	 * This method parses the description to obtain
+	 * a model object of the appropriate type.
+	 * 
+	 * @param context The context
+	 * @param l The listener
+	 * @return The model object
+	 */
+	public Object parse(ParserContext context, ModelListener l) {
+		Run ret=null;
+		
+		Token t=context.lookahead(0);
+		
+		if (t.isToken("run", TokenType.Keyword)) {
+			int startpos=t.getSource().getStartPosition();
+			
+			t = context.lookahead(1);
+			
+			// Need to locate a 'conversation' keyword
+			if (t.isToken("conversation", TokenType.Keyword)) {
+				String located=null;
+				
+				// Consume tokens
+				context.nextToken();
+				context.nextToken();
+				
+				ret = new Run();
+				
+				ret.getSource().setStartPosition(startpos);
+				ret.getSource().setEndPosition(t.getSource().getEndPosition());
+			
+				// Check for role bindings
+				t = context.lookahead(0);
+				
+				if (t.isToken(ModelReference.LOCATED_REFERENCE_SEPARATOR,
+									TokenType.Symbol)) {
+					context.nextToken();
+					
+					t = context.lookahead(0);
+					
+					if (t.getType() == TokenType.Identifier) {
+						context.nextToken();
+
+						located = t.getText();
+						
+						t = context.lookahead(0);
+						
+					} else {
+						l.error(new ModelIssue(t, java.util.PropertyResourceBundle.getBundle(
+							"org.scribble.parser.Messages").
+							getString("_EXPECTING_ROLE_NAME")));
+					}
+				}
+			
+				if (t.isToken("(", TokenType.Symbol)) {
+					boolean f_error=false;
+					
+					do {
+						// Consume token
+						context.nextToken();
+						
+						// Read next token, which should be an identifier
+						t = context.lookahead(0);
+					
+						if (t.getType() == TokenType.Identifier) {
+							Role role=null;
+							String binding=null;
+							int dbstartpos=t.getSource().getStartPosition();
+							
+							// Consume token
+							context.nextToken();
+						
+							// Locate the role definition
+							Object part=context.getState(t.getText());
+							
+							if (part == null) {
+								l.error(new ModelIssue(t,
+									org.scribble.util.MessageUtil.format(
+											java.util.PropertyResourceBundle.getBundle(
+													"org.scribble.parser.Messages"),
+											"_UNKNOWN_ROLE",
+											new String[]{t.getText()})));
+							} else if (part instanceof Role) {
+								role = (Role)part;
+							} else {
+								l.error(new ModelIssue(t,
+									org.scribble.util.MessageUtil.format(
+											java.util.PropertyResourceBundle.getBundle(
+													"org.scribble.parser.Messages"),
+											"_REQUIRED_ROLE",
+											new String[]{t.getText()})));
+							}
+							
+							t = context.lookahead(0);
+							
+							if (t.isToken("for", TokenType.Keyword)) {
+								
+								context.nextToken();
+								
+								t = context.lookahead(0);
+								
+								if (t.getType() == TokenType.Identifier) {
+									
+									context.nextToken();
+									
+									binding = t.getText();
+								} else {
+									l.error(new ModelIssue(t, java.util.PropertyResourceBundle.getBundle(
+											"org.scribble.parser.Messages").
+												getString("_EXPECTING_IDENTIFIER")));
+									f_error = true;
+								}
+							} else {
+								l.error(new ModelIssue(t,
+										org.scribble.util.MessageUtil.format(
+												java.util.PropertyResourceBundle.getBundle(
+														"org.scribble.parser.Messages"),
+												"_EXPECTING_KEYWORD",
+												new String[]{"for"})));
+								f_error = true;
+							}
+							
+							if (role != null && binding != null) {
+								DeclarationBinding db=new DeclarationBinding(role, binding);
+							
+								db.getSource().setStartPosition(dbstartpos);
+								db.getSource().setEndPosition(t.getSource().getEndPosition());
+								
+								ret.getBindings().add(db);
+							}
+						} else {
+							l.error(new ModelIssue(t, java.util.PropertyResourceBundle.getBundle(
+								"org.scribble.parser.Messages").
+								getString("_EXPECTING_ROLE_NAME")));
+							f_error = true;
+						}
+						
+						t = context.lookahead(0);
+						
+					} while (f_error == false &&
+							t.isToken(ParserConstants.LIST_SEPARATOR,
+									TokenType.Symbol));			
+					
+					if (t.isToken(")", TokenType.Symbol)) {
+						context.nextToken();
+					} else {
+						l.error(new ModelIssue(t, java.util.PropertyResourceBundle.getBundle(
+								"org.scribble.parser.Messages").
+								getString("_EXPECTING_PARAMETER_LIST_DELIMITER")));
+					}
+				}
+				
+				Conversation conversation=new Conversation();
+				
+				if (located != null) {
+					LocatedName modelName=new LocatedName();
+					Role role=new Role();
+					role.setName(located);
+					modelName.setRole(role);
+					conversation.setLocatedName(modelName);
+				}
+				
+				ret.setInlineDefinition(conversation);
+				
+				// Create new scope for the inline activities
+				context.pushScope();
+				
+				// Parse the inline activities
+				parseGroup(context, l, conversation.getBlock(), false);
+				
+				context.popScope();
+			}
+		}
+		
+		return(ret);
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.parser/src/java/org/scribble/conversation/parser/RunParserRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.parser/src/java/org/scribble/conversation/parser/RunParserRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.parser/src/java/org/scribble/conversation/parser/RunParserRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,198 @@
+/*
+ * Copyright 2007-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 9 Mar 2008 : Initial version created by gary
+ */
+package org.scribble.conversation.parser;
+
+import org.scribble.extensions.RegistryInfo;
+import org.scribble.model.*;
+import org.scribble.model.admin.DependencyType;
+import org.scribble.model.admin.ModelIssue;
+import org.scribble.model.admin.ModelListener;
+import org.scribble.parser.*;
+import org.scribble.conversation.model.*;
+
+/**
+ * This class provides the parser rule for the Run construct.
+ * 
+ */
+ at RegistryInfo(extension=ParserRule.class,notation=ConversationNotation.NOTATION_CODE)
+public class RunParserRule extends org.scribble.parser.AbstractParserRule {
+
+	/**
+	 * The default constructor.
+	 */
+	public RunParserRule() {
+		super(ParserRuleType.Line);
+	}
+	
+	/**
+	 * This method determines whether the parser rules is
+	 * appropriate to return a model object of the required
+	 * type.
+	 * 
+	 * @param type The required type
+	 * @return Whether the parser rule returns a
+	 * 				model object of the required type
+	 */
+	public boolean isSupported(Class<?> type) {
+		return(type.isAssignableFrom(Run.class));
+	}
+
+	/**
+	 * This method parses the description to obtain
+	 * a model object of the appropriate type.
+	 * 
+	 * @param context The context
+	 * @param l The listener
+	 * @return The model object
+	 */
+	public Object parse(ParserContext context, ModelListener l) {
+		Run ret=null;
+		
+		Token t=context.lookahead(0);
+		
+		if (t.isToken("run", TokenType.Keyword)) {
+			int startpos=t.getSource().getStartPosition();
+			
+			t = context.lookahead(1);
+			
+			// Need to locate an identifier
+			if (t.getType() == TokenType.Identifier) {
+				
+				// Consume tokens
+				context.nextToken();
+				
+				ConversationReference ref=(ConversationReference)
+						context.parse(ConversationReference.class, l);
+				
+				resolveReference(context, l, ref, DependencyType.Uses);
+
+				ret = new Run();
+				
+				ret.setReference(ref);
+					
+				ret.getSource().setStartPosition(startpos);
+				ret.getSource().setEndPosition(t.getSource().getEndPosition());
+			
+				// Check for role bindings
+				t = context.lookahead(0);
+			
+				if (t.isToken("(", TokenType.Symbol)) {
+					boolean f_error=false;
+					
+					do {
+						// Consume token
+						context.nextToken();
+						
+						// Read next token, which should be an identifier
+						t = context.lookahead(0);
+					
+						if (t.getType() == TokenType.Identifier) {
+							Declaration declaration=null;
+							String binding=null;
+							int dbstartpos=t.getSource().getStartPosition();
+							
+							// Consume token
+							context.nextToken();
+						
+							// Locate the declaration
+							Object decl=context.getState(t.getText());
+							
+							if (decl == null) {
+								l.error(new ModelIssue(t,
+									org.scribble.util.MessageUtil.format(
+											java.util.PropertyResourceBundle.getBundle(
+													"org.scribble.parser.Messages"),
+											"_UNKNOWN_DECLARATION",
+											new String[]{t.getText()})));
+							} else if (decl instanceof Declaration) {
+								declaration = (Declaration)decl;
+							} else {
+								l.error(new ModelIssue(t,
+									org.scribble.util.MessageUtil.format(
+											java.util.PropertyResourceBundle.getBundle(
+													"org.scribble.parser.Messages"),
+											"_REQUIRED_DECLARATION",
+											new String[]{t.getText()})));
+							}
+							
+							t = context.lookahead(0);
+							
+							if (t.isToken("for", TokenType.Keyword)) {
+								
+								context.nextToken();
+								
+								t = context.lookahead(0);
+								
+								if (t.getType() == TokenType.Identifier) {
+									
+									context.nextToken();
+									
+									binding = t.getText();
+								} else {
+									l.error(new ModelIssue(t, java.util.PropertyResourceBundle.getBundle(
+											"org.scribble.parser.Messages").
+												getString("_EXPECTING_IDENTIFIER")));
+									f_error = true;
+								}
+							} else {
+								l.error(new ModelIssue(t,
+										org.scribble.util.MessageUtil.format(
+												java.util.PropertyResourceBundle.getBundle(
+														"org.scribble.parser.Messages"),
+												"_EXPECTING_KEYWORD",
+												new String[]{"for"})));
+								f_error = true;
+							}
+							
+							if (declaration != null && binding != null) {
+								DeclarationBinding db=new DeclarationBinding(declaration, binding);
+								
+								db.getSource().setStartPosition(dbstartpos);
+								db.getSource().setEndPosition(t.getSource().getEndPosition());
+								
+								ret.getBindings().add(db);
+							}
+						} else {
+							l.error(new ModelIssue(t, java.util.PropertyResourceBundle.getBundle(
+								"org.scribble.parser.Messages").
+								getString("_EXPECTING_ROLE_NAME")));
+							f_error = true;
+						}
+						
+						t = context.lookahead(0);
+						
+					} while (f_error == false &&
+							t.isToken(ParserConstants.LIST_SEPARATOR,
+									TokenType.Symbol));			
+					
+					if (t.isToken(")", TokenType.Symbol)) {
+						context.nextToken();
+					} else {
+						l.error(new ModelIssue(t, java.util.PropertyResourceBundle.getBundle(
+								"org.scribble.parser.Messages").
+								getString("_EXPECTING_PARAMETER_LIST_DELIMITER")));
+					}
+				}
+			}
+		}
+		
+		return(ret);
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.parser/src/java/org/scribble/conversation/parser/SpawnConversationParserRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.parser/src/java/org/scribble/conversation/parser/SpawnConversationParserRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.parser/src/java/org/scribble/conversation/parser/SpawnConversationParserRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,232 @@
+/*
+ * Copyright 2007-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 7 Aug 2008 : Initial version created by gary
+ */
+package org.scribble.conversation.parser;
+
+import org.scribble.extensions.RegistryInfo;
+import org.scribble.model.*;
+import org.scribble.model.admin.ModelIssue;
+import org.scribble.model.admin.ModelListener;
+import org.scribble.parser.*;
+import org.scribble.conversation.model.*;
+
+/**
+ * This class provides the parser rule for the Spawn construct.
+ * 
+ */
+ at RegistryInfo(extension=ParserRule.class,notation=ConversationNotation.NOTATION_CODE)
+public class SpawnConversationParserRule extends org.scribble.parser.AbstractParserRule {
+
+	/**
+	 * The default constructor.
+	 */
+	public SpawnConversationParserRule() {
+		super(ParserRuleType.Group);
+	}
+	
+	/**
+	 * This method determines whether the parser rules is
+	 * appropriate to return a model object of the required
+	 * type.
+	 * 
+	 * @param type The required type
+	 * @return Whether the parser rule returns a
+	 * 				model object of the required type
+	 */
+	public boolean isSupported(Class<?> type) {
+		return(type.isAssignableFrom(Spawn.class));
+	}
+
+	/**
+	 * This method parses the description to obtain
+	 * a model object of the appropriate type.
+	 * 
+	 * @param context The context
+	 * @param l The listener
+	 * @return The model object
+	 */
+	public Object parse(ParserContext context, ModelListener l) {
+		Spawn ret=null;
+		
+		Token t=context.lookahead(0);
+		
+		if (t.isToken("spawn", TokenType.Keyword)) {
+			int startpos=t.getSource().getStartPosition();
+			
+			t = context.lookahead(1);
+			
+			// Need to locate a 'conversation' keyword
+			if (t.isToken("conversation", TokenType.Keyword)) {
+				String located=null;
+				
+				// Consume tokens
+				context.nextToken();
+				context.nextToken();
+				
+				ret = new Spawn();
+				
+				ret.getSource().setStartPosition(startpos);
+				ret.getSource().setEndPosition(t.getSource().getEndPosition());
+			
+				// Check for role bindings
+				t = context.lookahead(0);
+				
+				if (t.isToken(ModelReference.LOCATED_REFERENCE_SEPARATOR,
+									TokenType.Symbol)) {
+					context.nextToken();
+					
+					t = context.lookahead(0);
+					
+					if (t.getType() == TokenType.Identifier) {
+						context.nextToken();
+
+						located = t.getText();
+						
+						t = context.lookahead(0);
+						
+					} else {
+						l.error(new ModelIssue(t, java.util.PropertyResourceBundle.getBundle(
+							"org.scribble.parser.Messages").
+							getString("_EXPECTING_ROLE_NAME")));
+					}
+				}
+			
+				if (t.isToken("(", TokenType.Symbol)) {
+					boolean f_error=false;
+					
+					do {
+						// Consume token
+						context.nextToken();
+						
+						// Read next token, which should be an identifier
+						t = context.lookahead(0);
+					
+						if (t.getType() == TokenType.Identifier) {
+							Role role=null;
+							String binding=null;
+							int dbstartpos=t.getSource().getStartPosition();
+							
+							// Consume token
+							context.nextToken();
+						
+							// Locate the role definition
+							Object part=context.getState(t.getText());
+							
+							if (part == null) {
+								l.error(new ModelIssue(t,
+									org.scribble.util.MessageUtil.format(
+											java.util.PropertyResourceBundle.getBundle(
+													"org.scribble.parser.Messages"),
+											"_UNKNOWN_ROLE",
+											new String[]{t.getText()})));
+							} else if (part instanceof Role) {
+								role = (Role)part;
+							} else {
+								l.error(new ModelIssue(t,
+									org.scribble.util.MessageUtil.format(
+											java.util.PropertyResourceBundle.getBundle(
+													"org.scribble.parser.Messages"),
+											"_REQUIRED_ROLE",
+											new String[]{t.getText()})));
+							}
+							
+							t = context.lookahead(0);
+							
+							if (t.isToken("for", TokenType.Keyword)) {
+								
+								context.nextToken();
+								
+								t = context.lookahead(0);
+								
+								if (t.getType() == TokenType.Identifier) {
+									
+									context.nextToken();
+									
+									binding = t.getText();
+								} else {
+									l.error(new ModelIssue(t, java.util.PropertyResourceBundle.getBundle(
+											"org.scribble.parser.Messages").
+												getString("_EXPECTING_IDENTIFIER")));
+									f_error = true;
+								}
+							} else {
+								l.error(new ModelIssue(t,
+										org.scribble.util.MessageUtil.format(
+												java.util.PropertyResourceBundle.getBundle(
+														"org.scribble.parser.Messages"),
+												"_EXPECTING_KEYWORD",
+												new String[]{"for"})));
+								f_error = true;
+							}
+							
+							if (role != null && binding != null) {
+								DeclarationBinding db=new DeclarationBinding(role, binding);
+								
+								db.getSource().setStartPosition(dbstartpos);
+								db.getSource().setEndPosition(t.getSource().getEndPosition());
+								
+								ret.getBindings().add(db);
+							}
+						} else {
+							l.error(new ModelIssue(t, java.util.PropertyResourceBundle.getBundle(
+								"org.scribble.parser.Messages").
+								getString("_EXPECTING_ROLE_NAME")));
+							f_error = true;
+						}
+						
+						t = context.lookahead(0);
+						
+					} while (f_error == false &&
+							t.isToken(ParserConstants.LIST_SEPARATOR,
+									TokenType.Symbol));			
+					
+					if (t.isToken(")", TokenType.Symbol)) {
+						context.nextToken();
+					} else {
+						l.error(new ModelIssue(t, java.util.PropertyResourceBundle.getBundle(
+								"org.scribble.parser.Messages").
+								getString("_EXPECTING_PARAMETER_LIST_DELIMITER")));
+					}
+				}
+				
+				Conversation conversation=new Conversation();
+				
+				if (located != null) {
+					LocatedName modelName=new LocatedName();
+					Role role=new Role();
+					role.setName(located);
+					modelName.setRole(role);
+					conversation.setLocatedName(modelName);
+				}
+				
+				ret.setInlineDefinition(conversation);
+				
+				// Create new scope for the inline activities
+				context.pushScope();
+				
+				// Parse the inline activities
+				parseGroup(context, l, conversation.getBlock(),	false);
+				
+				context.popScope();
+			}
+		}
+		
+		return(ret);
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.parser/src/java/org/scribble/conversation/parser/SpawnParserRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.parser/src/java/org/scribble/conversation/parser/SpawnParserRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.parser/src/java/org/scribble/conversation/parser/SpawnParserRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,198 @@
+/*
+ * Copyright 2007-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 7 Aug 2008 : Initial version created by gary
+ */
+package org.scribble.conversation.parser;
+
+import org.scribble.extensions.RegistryInfo;
+import org.scribble.model.*;
+import org.scribble.model.admin.DependencyType;
+import org.scribble.model.admin.ModelIssue;
+import org.scribble.model.admin.ModelListener;
+import org.scribble.parser.*;
+import org.scribble.conversation.model.*;
+
+/**
+ * This class provides the parser rule for the Spawn construct.
+ * 
+ */
+ at RegistryInfo(extension=ParserRule.class,notation=ConversationNotation.NOTATION_CODE)
+public class SpawnParserRule extends org.scribble.parser.AbstractParserRule {
+
+	/**
+	 * The default constructor.
+	 */
+	public SpawnParserRule() {
+		super(ParserRuleType.Line);
+	}
+	
+	/**
+	 * This method determines whether the parser rules is
+	 * appropriate to return a model object of the required
+	 * type.
+	 * 
+	 * @param type The required type
+	 * @return Whether the parser rule returns a
+	 * 				model object of the required type
+	 */
+	public boolean isSupported(Class<?> type) {
+		return(type.isAssignableFrom(Spawn.class));
+	}
+
+	/**
+	 * This method parses the description to obtain
+	 * a model object of the appropriate type.
+	 * 
+	 * @param context The context
+	 * @param l The listener
+	 * @return The model object
+	 */
+	public Object parse(ParserContext context, ModelListener l) {
+		Spawn ret=null;
+		
+		Token t=context.lookahead(0);
+		
+		if (t.isToken("spawn", TokenType.Keyword)) {
+			int startpos=t.getSource().getStartPosition();
+			
+			t = context.lookahead(1);
+			
+			// Need to locate an identifier
+			if (t.getType() == TokenType.Identifier) {
+				
+				// Consume tokens
+				context.nextToken();
+				
+				ConversationReference ref=(ConversationReference)
+						context.parse(ConversationReference.class, l);
+				
+				resolveReference(context, l, ref, DependencyType.Uses);
+
+				ret = new Spawn();
+				
+				ret.setReference(ref);
+					
+				ret.getSource().setStartPosition(startpos);
+				ret.getSource().setEndPosition(t.getSource().getEndPosition());
+			
+				// Check for role bindings
+				t = context.lookahead(0);
+			
+				if (t.isToken("(", TokenType.Symbol)) {
+					boolean f_error=false;
+					
+					do {
+						// Consume token
+						context.nextToken();
+						
+						// Read next token, which should be an identifier
+						t = context.lookahead(0);
+					
+						if (t.getType() == TokenType.Identifier) {
+							Declaration declaration=null;
+							String binding=null;
+							int dbstartpos=t.getSource().getStartPosition();
+							
+							// Consume token
+							context.nextToken();
+						
+							// Locate the declaration
+							Object decl=context.getState(t.getText());
+							
+							if (decl == null) {
+								l.error(new ModelIssue(t,
+									org.scribble.util.MessageUtil.format(
+											java.util.PropertyResourceBundle.getBundle(
+													"org.scribble.parser.Messages"),
+											"_UNKNOWN_DECLARATION",
+											new String[]{t.getText()})));
+							} else if (decl instanceof Declaration) {
+								declaration = (Declaration)decl;
+							} else {
+								l.error(new ModelIssue(t,
+									org.scribble.util.MessageUtil.format(
+											java.util.PropertyResourceBundle.getBundle(
+													"org.scribble.parser.Messages"),
+											"_REQUIRED_DECLARATION",
+											new String[]{t.getText()})));
+							}
+							
+							t = context.lookahead(0);
+							
+							if (t.isToken("for", TokenType.Keyword)) {
+								
+								context.nextToken();
+								
+								t = context.lookahead(0);
+								
+								if (t.getType() == TokenType.Identifier) {
+									
+									context.nextToken();
+									
+									binding = t.getText();
+								} else {
+									l.error(new ModelIssue(t, java.util.PropertyResourceBundle.getBundle(
+											"org.scribble.parser.Messages").
+												getString("_EXPECTING_IDENTIFIER")));
+									f_error = true;
+								}
+							} else {
+								l.error(new ModelIssue(t,
+										org.scribble.util.MessageUtil.format(
+												java.util.PropertyResourceBundle.getBundle(
+														"org.scribble.parser.Messages"),
+												"_EXPECTING_KEYWORD",
+												new String[]{"for"})));
+								f_error = true;
+							}
+							
+							if (declaration != null && binding != null) {
+								DeclarationBinding db=new DeclarationBinding(declaration, binding);
+								
+								db.getSource().setStartPosition(dbstartpos);
+								db.getSource().setEndPosition(t.getSource().getEndPosition());
+								
+								ret.getBindings().add(db);
+							}
+						} else {
+							l.error(new ModelIssue(t, java.util.PropertyResourceBundle.getBundle(
+								"org.scribble.parser.Messages").
+								getString("_EXPECTING_ROLE_NAME")));
+							f_error = true;
+						}
+						
+						t = context.lookahead(0);
+						
+					} while (f_error == false &&
+							t.isToken(ParserConstants.LIST_SEPARATOR,
+									TokenType.Symbol));			
+					
+					if (t.isToken(")", TokenType.Symbol)) {
+						context.nextToken();
+					} else {
+						l.error(new ModelIssue(t, java.util.PropertyResourceBundle.getBundle(
+								"org.scribble.parser.Messages").
+								getString("_EXPECTING_PARAMETER_LIST_DELIMITER")));
+					}
+				}
+			}
+		}
+		
+		return(ret);
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.parser/src/java/org/scribble/conversation/parser/TryEscapeParserRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.parser/src/java/org/scribble/conversation/parser/TryEscapeParserRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.parser/src/java/org/scribble/conversation/parser/TryEscapeParserRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,105 @@
+/*
+ * Copyright 2005-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 18 Oct 2008 : Initial version created by gary
+ */
+package org.scribble.conversation.parser;
+
+import org.scribble.extensions.RegistryInfo;
+import org.scribble.model.*;
+import org.scribble.model.admin.ModelListener;
+import org.scribble.parser.*;
+import org.scribble.conversation.model.*;
+
+/**
+ * This class provides the parser rule for the TryEscape construct.
+ * 
+ */
+ at RegistryInfo(extension=ParserRule.class,notation=ConversationNotation.NOTATION_CODE)
+public class TryEscapeParserRule extends org.scribble.parser.AbstractParserRule {
+
+	/**
+	 * The default constructor.
+	 */
+	public TryEscapeParserRule() {
+		super(ParserRuleType.Group);
+	}
+	
+	/**
+	 * This method determines whether the parser rules is
+	 * appropriate to return a model object of the required
+	 * type.
+	 * 
+	 * @param type The required type
+	 * @return Whether the parser rule returns a
+	 * 				model object of the required type
+	 */
+	public boolean isSupported(Class<?> type) {
+		return(type.isAssignableFrom(TryEscape.class));
+	}
+
+	/**
+	 * This method parses the description to obtain
+	 * a model object of the appropriate type.
+	 * 
+	 * @param context The context
+	 * @param l The listener
+	 * @return The model object
+	 */
+	public Object parse(ParserContext context, ModelListener l) {
+		TryEscape ret=null;
+		
+		Token t=context.lookahead(0);
+		
+		if (t.isToken("try", TokenType.Keyword)) {
+			int startpos=t.getSource().getStartPosition();
+
+			// Consume token
+			context.nextToken();
+			
+			ret = new TryEscape();
+				
+			ret.getSource().setStartPosition(startpos);
+			
+			ret.getBlock().getSource().setStartPosition(t.getSource().getStartPosition());
+				
+			// Parse group
+			parseGroup(context, l, ret.getBlock(), true);
+				
+			// Parsing the group does not consume the final curly
+			// bracket, to ensure that other rules know that the
+			// block has completed, so need to look past this token
+			t = context.lookahead(0);
+			
+			ret.getBlock().getSource().setEndPosition(t.getSource().getStartPosition());
+
+			// Configure zero or more escape blocks
+			EscapeBlock eb=null;
+			
+			while ((eb=(EscapeBlock)context.parse(EscapeBlock.class, l)) != null) {
+				ret.getEscapeBlocks().add(eb);
+			}
+			
+			// Find position of last block to set as end for try/escape
+			t = context.lookahead(0);
+
+			ret.getSource().setEndPosition(t.getSource().getStartPosition());
+		}
+		
+		return(ret);
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.parser/src/java/org/scribble/conversation/parser/VariableListParserRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.parser/src/java/org/scribble/conversation/parser/VariableListParserRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.parser/src/java/org/scribble/conversation/parser/VariableListParserRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,147 @@
+/*
+ * Copyright 2007-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 10 Jan 2008 : Initial version created by gary
+ */
+package org.scribble.conversation.parser;
+
+import org.scribble.extensions.*;
+import org.scribble.model.*;
+import org.scribble.model.admin.DependencyType;
+import org.scribble.model.admin.ModelIssue;
+import org.scribble.model.admin.ModelListener;
+import org.scribble.parser.*;
+import org.scribble.conversation.model.*;
+
+/**
+ * This class provides the parser rule for the Variable List
+ * declaration.
+ */
+ at RegistryInfo(extension=ParserRule.class,notation=ConversationNotation.NOTATION_CODE)
+public class VariableListParserRule extends org.scribble.parser.AbstractParserRule {
+
+	/**
+	 * The default constructor.
+	 */
+	public VariableListParserRule() {
+		super(ParserRuleType.Line);
+	}
+	
+	/**
+	 * This method determines whether the parser rules is
+	 * appropriate to return a model object of the required
+	 * type.
+	 * 
+	 * @param type The required type
+	 * @return Whether the parser rule returns a
+	 * 				model object of the required type
+	 */
+	public boolean isSupported(Class<?> type) {
+		return(type.isAssignableFrom(VariableList.class));
+	}
+
+	/**
+	 * This method parses the description to obtain
+	 * a model object of the appropriate type.
+	 * 
+	 * @param context The context
+	 * @param l The listener
+	 * @return The model object
+	 */
+	public Object parse(ParserContext context, ModelListener l) {
+		VariableList ret=null;
+		
+		Token t=context.lookahead(0);
+		
+		if (t.getType() == TokenType.Identifier) {
+			boolean f_error=false;
+			
+			Token t2=context.lookahead(1);
+			
+			if (t2.getType() == TokenType.Identifier) {
+				boolean f_first=true;
+				
+				// Parse type reference related to initial identifier
+				TypeReference ref=(TypeReference)
+						context.parse(TypeReference.class, l);
+				
+				resolveReference(context, l, ref, DependencyType.Uses);
+				
+				ret = new VariableList();
+				
+				ret.setType(ref);
+				
+				ret.getSource().setStartPosition(t.getSource().getStartPosition());
+				
+				do {
+					if (f_first == false) {
+						context.nextToken();
+					}
+					
+					// Read next token, which should be an identifier
+					t = context.lookahead(0);
+				
+					if (t.getType() == TokenType.Identifier) {
+						
+						// Consume token
+						context.nextToken();
+					
+						Variable var=new Variable();
+						var.getSource().setStartPosition(t.getSource().getStartPosition());
+					
+						var.setName(t.getText());
+						
+						var.getSource().setEndPosition(t.getSource().getEndPosition());
+						
+						ret.getSource().setEndPosition(t.getSource().getEndPosition());
+						
+						ret.getVariables().add(var);
+						
+						// Check if name has already been defined in state
+						if (context.getState(t.getText()) != null) {
+							l.error(new ModelIssue(t,
+									org.scribble.util.MessageUtil.format(
+											java.util.PropertyResourceBundle.getBundle(
+													"org.scribble.parser.Messages"),
+											"_DUPLICATE_DECLARATION",
+											new String[]{t.getText()})));
+						} else {
+						
+							// Add to state
+							context.setState(var.getName(), var);
+						}
+						
+					} else {
+						l.error(new ModelIssue(t, java.util.PropertyResourceBundle.getBundle(
+									"org.scribble.conversation.parser.Messages").
+									getString("_EXPECTING_VARIABLE_NAME")));
+						f_error = true;
+					}
+					
+					t = context.lookahead(0);
+					
+					f_first = false;
+					
+				} while (f_error == false &&
+						t.isToken(ParserConstants.LIST_SEPARATOR,
+								TokenType.Symbol));				
+			}			
+		}
+		
+		return(ret);
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.parser/src/java/org/scribble/conversation/parser/WhenParserRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.parser/src/java/org/scribble/conversation/parser/WhenParserRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.parser/src/java/org/scribble/conversation/parser/WhenParserRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,215 @@
+/*
+ * Copyright 2007-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 8 Mar 2008 : Initial version created by gary
+ */
+package org.scribble.conversation.parser;
+
+import org.scribble.extensions.RegistryInfo;
+import org.scribble.model.*;
+import org.scribble.model.admin.ModelIssue;
+import org.scribble.model.admin.ModelListener;
+import org.scribble.parser.*;
+import org.scribble.conversation.model.*;
+
+/**
+ * This class provides the parser rule for the When construct.
+ * 
+ */
+ at RegistryInfo(extension=ParserRule.class,notation=ConversationNotation.NOTATION_CODE)
+public class WhenParserRule extends org.scribble.parser.AbstractParserRule {
+
+	/**
+	 * The default constructor.
+	 */
+	public WhenParserRule() {
+		super(ParserRuleType.Group);
+	}
+	
+	/**
+	 * This method determines whether the parser rules is
+	 * appropriate to return a model object of the required
+	 * type.
+	 * 
+	 * @param type The required type
+	 * @return Whether the parser rule returns a
+	 * 				model object of the required type
+	 */
+	public boolean isSupported(Class<?> type) {
+		return(type.isAssignableFrom(When.class));
+	}
+
+	/**
+	 * This method parses the description to obtain
+	 * a model object of the appropriate type.
+	 * 
+	 * @param context The context
+	 * @param l The listener
+	 * @return The model object
+	 */
+	public Object parse(ParserContext context, ModelListener l) {
+		When ret=null;
+		
+		Token t=context.lookahead(0);
+		
+		if (t.isToken("when", TokenType.Keyword)) {
+			int startpos=t.getSource().getStartPosition();
+
+			// Consume token
+			context.nextToken();
+			
+			ret = new When();
+				
+			ret.getSource().setStartPosition(startpos);
+			
+			// Check for located roles
+			t = context.lookahead(0);
+			
+			if (t.isToken(ModelReference.LOCATED_REFERENCE_SEPARATOR,
+								TokenType.Symbol)) {
+				boolean f_error=false;
+				
+				// Work through list of roles
+				do {
+					// Consume token
+					context.nextToken();
+					
+					// Read next token, which should be an identifier
+					t = context.lookahead(0);
+				
+					if (t.getType() == TokenType.Identifier) {
+						
+						// Consume token
+						context.nextToken();
+					
+						// Locate the role definition
+						Object part=context.getState(t.getText());
+						
+						if (part == null) {
+							l.error(new ModelIssue(t,
+								org.scribble.util.MessageUtil.format(
+										java.util.PropertyResourceBundle.getBundle(
+												"org.scribble.parser.Messages"),
+										"_UNKNOWN_ROLE",
+										new String[]{t.getText()})));
+						} else if (part instanceof Role) {
+							ret.getRoles().add((Role)part);
+						} else {
+							l.error(new ModelIssue(t,
+								org.scribble.util.MessageUtil.format(
+										java.util.PropertyResourceBundle.getBundle(
+												"org.scribble.parser.Messages"),
+										"_REQUIRED_ROLE",
+										new String[]{t.getText()})));
+						}
+						
+						t = context.lookahead(0);
+					} else {
+						l.error(new ModelIssue(t, java.util.PropertyResourceBundle.getBundle(
+							"org.scribble.parser.Messages").
+							getString("_EXPECTING_ROLE_NAME")));
+						f_error = true;
+					}
+				} while (f_error == false &&
+						t.isToken(ParserConstants.LIST_SEPARATOR,
+								TokenType.Symbol));				
+			}
+			
+			boolean f_end=false;
+			
+			do {
+				f_end = true;
+				
+				Block block=null;
+				
+				ConditionalBlock cblock = new ConditionalBlock();
+				ret.getConditionalBlocks().add(cblock);
+				
+				block = cblock;
+				
+				block.getSource().setStartPosition(t.getSource().getStartPosition());
+
+				t = context.lookahead(0);
+
+				if (t.isToken("(", TokenType.Symbol)) {
+					// Consume symbol
+					context.nextToken();
+					
+					cblock.setExpression((Expression)
+							context.parse(Expression.class, l));
+					
+					// Check if end of expression symbol specified
+					t = context.lookahead(0);
+					
+					if (t.isToken(")", TokenType.Symbol)) {
+						context.nextToken();
+					} else {
+						
+						// Report 'expecting )' message
+						l.error(new ModelIssue(t, org.scribble.util.MessageUtil.format(
+								java.util.PropertyResourceBundle.getBundle(
+										"org.scribble.parser.Messages"),
+										"_EXPECTING_SYMBOL",
+										new String[]{")"})));
+					}
+				}
+
+				// Parse group
+				parseGroup(context, l, block, true);
+				
+				// Parsing the group does not consume the final curly
+				// bracket, to ensure that other rules know that the
+				// block has completed, so need to look past this token
+				t = context.lookahead(0);
+				
+				block.getSource().setEndPosition(t.getSource().getStartPosition());
+
+				ret.getSource().setEndPosition(t.getSource().getStartPosition());
+
+				if (t.isToken("else", TokenType.Keyword)) {
+					
+					f_end = false;
+
+					// Consume 'else'
+					context.nextToken();
+					
+					t = context.lookahead(0);
+					
+					if (t.isToken("when", TokenType.Keyword)) {
+						
+						context.nextToken();
+						
+					} else {
+						
+						// Error
+						l.error(new ModelIssue(t, org.scribble.util.MessageUtil.format(
+								java.util.PropertyResourceBundle.getBundle(
+										"org.scribble.parser.Messages"),
+										"_EXPECTING_KEYWORD",
+										new String[]{"when"})));
+					}
+				}
+				
+			} while (f_end == false);
+			
+			t = context.lookahead(-1);
+			ret.getSource().setEndPosition(t.getSource().getEndPosition());
+		}
+		
+		return(ret);
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.parser/src/java/org/scribble/conversation/parser/WhileParserRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.parser/src/java/org/scribble/conversation/parser/WhileParserRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.parser/src/java/org/scribble/conversation/parser/WhileParserRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,166 @@
+/*
+ * Copyright 2007-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 8 Mar 2008 : Initial version created by gary
+ */
+package org.scribble.conversation.parser;
+
+import org.scribble.extensions.RegistryInfo;
+import org.scribble.model.*;
+import org.scribble.model.admin.ModelIssue;
+import org.scribble.model.admin.ModelListener;
+import org.scribble.parser.*;
+import org.scribble.conversation.model.*;
+
+/**
+ * This class provides the parser rule for the While construct.
+ * 
+ */
+ at RegistryInfo(extension=ParserRule.class,notation=ConversationNotation.NOTATION_CODE)
+public class WhileParserRule extends org.scribble.parser.AbstractParserRule {
+
+	/**
+	 * The default constructor.
+	 */
+	public WhileParserRule() {
+		super(ParserRuleType.Group);
+	}
+	
+	/**
+	 * This method determines whether the parser rules is
+	 * appropriate to return a model object of the required
+	 * type.
+	 * 
+	 * @param type The required type
+	 * @return Whether the parser rule returns a
+	 * 				model object of the required type
+	 */
+	public boolean isSupported(Class<?> type) {
+		return(type.isAssignableFrom(While.class));
+	}
+
+	/**
+	 * This method parses the description to obtain
+	 * a model object of the appropriate type.
+	 * 
+	 * @param context The context
+	 * @param l The listener
+	 * @return The model object
+	 */
+	public Object parse(ParserContext context, ModelListener l) {
+		While ret=null;
+		
+		Token t=context.lookahead(0);
+		
+		if (t.isToken("while", TokenType.Keyword)) {
+			int startpos=t.getSource().getStartPosition();
+
+			// Consume token
+			context.nextToken();
+			
+			ret = new While();
+				
+			ret.getSource().setStartPosition(startpos);
+			
+			// Check for located roles
+			t = context.lookahead(0);
+			
+			if (t.isToken(ModelReference.LOCATED_REFERENCE_SEPARATOR,
+								TokenType.Symbol)) {
+				boolean f_error=false;
+				
+				// Work through list of roles
+				do {
+					// Consume token
+					context.nextToken();
+					
+					// Read next token, which should be an identifier
+					t = context.lookahead(0);
+				
+					if (t.getType() == TokenType.Identifier) {
+						
+						// Consume token
+						context.nextToken();
+					
+						// Locate the role definition
+						Object part=context.getState(t.getText());
+						
+						if (part == null) {
+							l.error(new ModelIssue(t,
+								org.scribble.util.MessageUtil.format(
+										java.util.PropertyResourceBundle.getBundle(
+												"org.scribble.parser.Messages"),
+										"_UNKNOWN_ROLE",
+										new String[]{t.getText()})));
+						} else if (part instanceof Role) {
+							ret.getRoles().add((Role)part);
+						} else {
+							l.error(new ModelIssue(t,
+								org.scribble.util.MessageUtil.format(
+										java.util.PropertyResourceBundle.getBundle(
+												"org.scribble.parser.Messages"),
+										"_REQUIRED_ROLE",
+										new String[]{t.getText()})));
+						}
+						
+						t = context.lookahead(0);
+					} else {
+						l.error(new ModelIssue(t, java.util.PropertyResourceBundle.getBundle(
+							"org.scribble.parser.Messages").
+							getString("_EXPECTING_ROLE_NAME")));
+						f_error = true;
+					}
+				} while (f_error == false &&
+						t.isToken(ParserConstants.LIST_SEPARATOR,
+								TokenType.Symbol));				
+			}
+			
+			t = context.lookahead(0);
+
+			if (t.isToken("(", TokenType.Symbol)) {
+				// Consume symbol
+				context.nextToken();
+				
+				ret.getBlock().setExpression((Expression)
+						context.parse(Expression.class, l));
+				
+				// Check if end of expression symbol specified
+				t = context.lookahead(0);
+				
+				if (t.isToken(")", TokenType.Symbol)) {
+					context.nextToken();
+				} else {
+					
+					// Report 'expecting )' message
+					l.error(new ModelIssue(t, org.scribble.util.MessageUtil.format(
+							java.util.PropertyResourceBundle.getBundle(
+									"org.scribble.parser.Messages"),
+									"_EXPECTING_SYMBOL",
+									new String[]{")"})));
+				}
+			}
+
+			// Parse group
+			parseGroup(context, l, ret.getBlock(), true);
+			
+			t = context.lookahead(-1);
+			ret.getSource().setEndPosition(t.getSource().getEndPosition());
+		}
+		
+		return(ret);
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.parser/src/java/org/scribble/conversation/parser/osgi/Activator.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.parser/src/java/org/scribble/conversation/parser/osgi/Activator.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.parser/src/java/org/scribble/conversation/parser/osgi/Activator.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,67 @@
+/*
+ * Copyright 2007-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 9 Jan 2008 : Initial version created by gary
+ */
+package org.scribble.conversation.parser.osgi;
+
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class Activator implements BundleActivator {
+
+	// The plug-in ID
+	public static final String PLUGIN_ID = "org.scribble.conversation.parser";
+
+	// The shared instance
+	private static Activator plugin;
+	
+	/**
+	 * The constructor
+	 */
+	public Activator() {
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.eclipse.core.runtime.Plugins#start(org.osgi.framework.BundleContext)
+	 */
+	public void start(BundleContext context) throws Exception {
+		plugin = this;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.eclipse.core.runtime.Plugin#stop(org.osgi.framework.BundleContext)
+	 */
+	public void stop(BundleContext context) throws Exception {
+		plugin = null;
+	}
+
+	/**
+	 * Returns the shared instance
+	 *
+	 * @return the shared instance
+	 */
+	public static Activator getDefault() {
+		return plugin;
+	}
+
+}

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.projector/.classpath
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.projector/.classpath	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.projector/.classpath	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="src" path="src/java"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+	<classpathentry kind="output" path="classes"/>
+</classpath>

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.projector/.project
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.projector/.project	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.projector/.project	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>org.scribble.conversation.projector</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.ManifestBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.SchemaBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.pde.PluginNature</nature>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+	</natures>
+</projectDescription>

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.projector/LICENSE.txt
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.projector/LICENSE.txt	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.projector/LICENSE.txt	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,201 @@
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.projector/META-INF/MANIFEST.MF
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.projector/META-INF/MANIFEST.MF	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.projector/META-INF/MANIFEST.MF	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,29 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Scribble Conversation Projector Plug-in
+Bundle-SymbolicName: org.scribble.conversation.projector;singleton:=true
+Bundle-Version: 0.1.0.qualifier
+Bundle-Activator: org.scribble.conversation.projector.osgi.Activator
+Bundle-Vendor: www.scribble.org
+Import-Package: org.osgi.framework;version="1.3.0"
+Require-Bundle: org.scribble.core,
+ org.scribble.conversation.model
+Bundle-ActivationPolicy: lazy
+Scribble-Extensions: org.scribble.conversation.projector.ConversationModelProjectorRule,
+  org.scribble.conversation.projector.IdentityLocatorProjectorRule,
+  org.scribble.conversation.projector.IdentityProjectorRule,
+  org.scribble.conversation.projector.ConversationProjectorRule,
+  org.scribble.conversation.projector.ConversationInteractionProjectorRule,
+  org.scribble.conversation.projector.ConversationReferenceProjectorRule,
+  org.scribble.conversation.projector.IfProjectorRule,
+  org.scribble.conversation.projector.ConditionalBlockProjectorRule,
+  org.scribble.conversation.projector.ParallelProjectorRule,
+  org.scribble.conversation.projector.WhenProjectorRule,
+  org.scribble.conversation.projector.WhileProjectorRule,
+  org.scribble.conversation.projector.RunProjectorRule,
+  org.scribble.conversation.projector.SpawnProjectorRule,
+  org.scribble.conversation.projector.TryEscapeProjectorRule,
+  org.scribble.conversation.projector.CatchBlockProjectorRule,
+  org.scribble.conversation.projector.InterruptBlockProjectorRule,
+  org.scribble.conversation.projector.RaiseProjectorRule,
+  org.scribble.conversation.projector.VariableListProjectorRule

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.projector/build.properties
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.projector/build.properties	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.projector/build.properties	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,5 @@
+source.. = src/java/
+output.. = classes/
+bin.includes = META-INF/,\
+               .,\
+               plugin.xml

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.projector/classes/org/scribble/conversation/projector/CatchBlockProjectorRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conversation.projector/classes/org/scribble/conversation/projector/CatchBlockProjectorRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.projector/classes/org/scribble/conversation/projector/ComposeProjectorRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conversation.projector/classes/org/scribble/conversation/projector/ComposeProjectorRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.projector/classes/org/scribble/conversation/projector/ConditionalBlockProjectorRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conversation.projector/classes/org/scribble/conversation/projector/ConditionalBlockProjectorRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.projector/classes/org/scribble/conversation/projector/ConversationInteractionProjectorRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conversation.projector/classes/org/scribble/conversation/projector/ConversationInteractionProjectorRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.projector/classes/org/scribble/conversation/projector/ConversationModelProjectorRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conversation.projector/classes/org/scribble/conversation/projector/ConversationModelProjectorRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.projector/classes/org/scribble/conversation/projector/ConversationProjectorRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conversation.projector/classes/org/scribble/conversation/projector/ConversationProjectorRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.projector/classes/org/scribble/conversation/projector/ConversationReferenceProjectorRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conversation.projector/classes/org/scribble/conversation/projector/ConversationReferenceProjectorRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.projector/classes/org/scribble/conversation/projector/IdentityLocatorProjectorRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conversation.projector/classes/org/scribble/conversation/projector/IdentityLocatorProjectorRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.projector/classes/org/scribble/conversation/projector/IdentityProjectorRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conversation.projector/classes/org/scribble/conversation/projector/IdentityProjectorRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.projector/classes/org/scribble/conversation/projector/IfProjectorRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conversation.projector/classes/org/scribble/conversation/projector/IfProjectorRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.projector/classes/org/scribble/conversation/projector/InterruptBlockProjectorRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conversation.projector/classes/org/scribble/conversation/projector/InterruptBlockProjectorRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.projector/classes/org/scribble/conversation/projector/ParallelProjectorRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conversation.projector/classes/org/scribble/conversation/projector/ParallelProjectorRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.projector/classes/org/scribble/conversation/projector/RaiseProjectorRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conversation.projector/classes/org/scribble/conversation/projector/RaiseProjectorRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.projector/classes/org/scribble/conversation/projector/RunProjectorRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conversation.projector/classes/org/scribble/conversation/projector/RunProjectorRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.projector/classes/org/scribble/conversation/projector/SpawnProjectorRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conversation.projector/classes/org/scribble/conversation/projector/SpawnProjectorRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.projector/classes/org/scribble/conversation/projector/TryEscapeProjectorRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conversation.projector/classes/org/scribble/conversation/projector/TryEscapeProjectorRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.projector/classes/org/scribble/conversation/projector/VariableListProjectorRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conversation.projector/classes/org/scribble/conversation/projector/VariableListProjectorRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.projector/classes/org/scribble/conversation/projector/WhenProjectorRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conversation.projector/classes/org/scribble/conversation/projector/WhenProjectorRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.projector/classes/org/scribble/conversation/projector/WhileProjectorRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conversation.projector/classes/org/scribble/conversation/projector/WhileProjectorRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.projector/classes/org/scribble/conversation/projector/osgi/Activator.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conversation.projector/classes/org/scribble/conversation/projector/osgi/Activator.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.projector/src/java/org/scribble/conversation/projector/CatchBlockProjectorRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.projector/src/java/org/scribble/conversation/projector/CatchBlockProjectorRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.projector/src/java/org/scribble/conversation/projector/CatchBlockProjectorRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,98 @@
+/*
+ * Copyright 2005-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 19 Oct 2008 : Initial version created by gary
+ */
+package org.scribble.conversation.projector;
+
+import org.scribble.extensions.RegistryInfo;
+import org.scribble.model.*;
+import org.scribble.model.admin.ModelListener;
+import org.scribble.projector.*;
+import org.scribble.conversation.model.*;
+
+/**
+ * This class provides the CatchBlock implementation of the
+ * projector rule.
+ */
+ at RegistryInfo(extension=ProjectorRule.class,notation=ConversationNotation.NOTATION_CODE)
+public class CatchBlockProjectorRule extends AbstractBlockProjectorRule {
+
+	/**
+	 * This method determines whether the projection rule is
+	 * appropriate for the supplied model object.
+	 * 
+	 * @param obj The model object to be projected
+	 * @return Whether the rule is relevant for the
+	 * 				model object
+	 */
+	public boolean isSupported(ModelObject obj) {
+		return(obj.getClass() == CatchBlock.class);
+	}
+	
+	/**
+	 * This method creates a new block of the appropriate
+	 * type.
+	 * 
+	 * @return The block
+	 */
+	protected Block createBlock() {
+		return(new CatchBlock());
+	}
+	
+	/**
+	 * This method projects the supplied model object based on the
+	 * specified role.
+	 * 
+	 * @param model The model object
+	 * @param role The role
+	 * @param l The model listener
+	 * @return The projected model object
+	 */
+	public ModelObject project(ProjectorContext context, ModelObject model,
+					Role role, ModelListener l) {
+		CatchBlock ret=(CatchBlock)super.project(context,
+				model, role, l);
+		CatchBlock source=(CatchBlock)model;
+
+		// If block not projected, then if projected role is in
+		// the list, the re-instate
+		if (ret == null && source.getRoles().contains(role)) {
+			ret = new CatchBlock();
+			
+			ret.derivedFrom(source);
+		}
+		
+		if (ret != null) {
+			
+			// Project the list of roles
+			for (int i=0; i < source.getRoles().size(); i++) {
+				ret.getRoles().add(new Role(source.getRoles().get(i)));
+			}
+			
+			if (source.getType() != null) {
+		
+				// Project the type reference
+				ret.setType((TypeReference)
+						context.project(source.getType(),
+								role, l));
+			}
+		}
+		
+		return(ret);
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.projector/src/java/org/scribble/conversation/projector/ComposeProjectorRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.projector/src/java/org/scribble/conversation/projector/ComposeProjectorRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.projector/src/java/org/scribble/conversation/projector/ComposeProjectorRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,90 @@
+/*
+ * Copyright 2007-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 19 Augs 2008 : Initial version created by gary
+ */
+package org.scribble.conversation.projector;
+
+import org.scribble.model.*;
+import org.scribble.model.admin.ModelListener;
+import org.scribble.projector.*;
+import org.scribble.conversation.model.*;
+
+/**
+ * This class provides the abstract Compose implementation of the
+ * projector rule.
+ */
+public abstract class ComposeProjectorRule extends ModelIncludeProjectorRule {
+
+	/**
+	 * This method projects the supplied model object based on the
+	 * specified role.
+	 * 
+	 * @param model The model object
+	 * @param role The role
+	 * @param l The model listener
+	 * @return The projected model object
+	 */
+	public ModelObject project(ProjectorContext context, ModelObject model,
+					Role role, ModelListener l) {
+		Compose ret=(Compose)super.project(context, model, role,
+							l);
+		Compose source=(Compose)model;
+
+		Role mappedRole=role;
+		
+		// Determine whether role name has been mapped
+		DeclarationBinding db=null;
+		if ((db=source.getDeclarationBinding(role)) != null) {
+			String rename=db.getBoundName();
+			
+			if (rename != null) {
+				mappedRole = new Role();
+				mappedRole.setName(rename);
+			}
+		}
+				
+		if (source.getInlineDefinition() != null) {
+			ret.setInlineDefinition((Conversation)context.project(source.getInlineDefinition(),
+							mappedRole, l));
+		}
+		
+		if (source.getReference() != null) {
+						
+			// Store conversation against mapped role
+			Definition defn=source.getDefinition();
+			
+			if (defn != null &&
+					defn.getRoles().contains(mappedRole)) {
+				
+				// If inner reference, then record interest
+				// in project of definition against this mapped
+				// role
+				if (source.getReference().isInner()) {
+					context.registerInterest(defn, mappedRole);
+				}
+				
+				ret.setReference((ConversationReference)context.project(
+							source.getReference(), mappedRole, l));
+			} else {
+				ret = null;
+			}
+		}
+
+		return(ret);
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.projector/src/java/org/scribble/conversation/projector/ConditionalBlockProjectorRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.projector/src/java/org/scribble/conversation/projector/ConditionalBlockProjectorRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.projector/src/java/org/scribble/conversation/projector/ConditionalBlockProjectorRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,82 @@
+/*
+ * Copyright 2007 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 19 Nov 2007 : Initial version created by gary
+ */
+package org.scribble.conversation.projector;
+
+import org.scribble.extensions.RegistryInfo;
+import org.scribble.model.*;
+import org.scribble.model.admin.ModelListener;
+import org.scribble.conversation.model.*;
+import org.scribble.projector.*;
+
+/**
+ * This class provides the Block implementation of the
+ * projector rule.
+ */
+ at RegistryInfo(extension=ProjectorRule.class,notation=ConversationNotation.NOTATION_CODE)
+public class ConditionalBlockProjectorRule extends AbstractBlockProjectorRule {
+
+	/**
+	 * This method determines whether the projection rule is
+	 * appropriate for the supplied model object.
+	 * 
+	 * @param obj The model object to be projected
+	 * @return Whether the rule is relevant for the
+	 * 				model object
+	 */
+	public boolean isSupported(ModelObject obj) {
+		return(obj.getClass() == ConditionalBlock.class);
+	}
+	
+	/**
+	 * This method creates a new block of the appropriate
+	 * type.
+	 * 
+	 * @return The block
+	 */
+	protected Block createBlock() {
+		return(new ConditionalBlock());
+	}
+	
+	/**
+	 * This method projects the supplied model object based on the
+	 * specified role.
+	 * 
+	 * @param model The model object
+	 * @param role The role
+	 * @param l The model listener
+	 * @return The projected model object
+	 */
+	public ModelObject project(ProjectorContext context, ModelObject model,
+					Role role, ModelListener l) {
+		ConditionalBlock ret=(ConditionalBlock)super.project(context,
+									model, role, l);
+		ConditionalBlock source=(ConditionalBlock)model;
+
+		if (ret != null && source.getExpression() != null) {
+			
+			// Project the expression
+			ret.setExpression((Expression)
+					context.project(source.getExpression(),
+								role, l));
+		}
+		
+		return(ret);
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.projector/src/java/org/scribble/conversation/projector/ConversationInteractionProjectorRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.projector/src/java/org/scribble/conversation/projector/ConversationInteractionProjectorRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.projector/src/java/org/scribble/conversation/projector/ConversationInteractionProjectorRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,98 @@
+/*
+ * Copyright 2007-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 25 Jan, 2008 : Initial version created by gary
+ */
+package org.scribble.conversation.projector;
+
+import org.scribble.extensions.RegistryInfo;
+import org.scribble.model.*;
+import org.scribble.model.admin.ModelListener;
+import org.scribble.conversation.model.*;
+import org.scribble.projector.*;
+
+/**
+ * This class provides the ConversationInteraction implementation of the
+ * projector rule.
+ */
+ at RegistryInfo(extension=ProjectorRule.class,notation=ConversationNotation.NOTATION_CODE)
+public class ConversationInteractionProjectorRule extends InteractionProjectorRule {
+
+	/**
+	 * This method determines whether the projection rule is
+	 * appropriate for the supplied model object.
+	 * 
+	 * @param obj The model object to be projected
+	 * @return Whether the rule is relevant for the
+	 * 				model object
+	 */
+	public boolean isSupported(ModelObject obj) {
+		return(obj.getClass() == ConversationInteraction.class);
+	}
+	
+	/**
+	 * This method returns a new instance of the interaction model
+	 * object.
+	 * 
+	 * @return The new interaction
+	 */
+	protected Interaction createInteraction() {
+		return(new ConversationInteraction());
+	}
+	
+	/**
+	 * This method projects the supplied model object based on the
+	 * specified role.
+	 * 
+	 * @param model The model object
+	 * @param role The role
+	 * @param l The model listener
+	 * @return The projected model object
+	 */
+	public ModelObject project(ProjectorContext context, ModelObject model,
+					Role role, ModelListener l) {
+		ConversationInteraction ret=(ConversationInteraction)
+					super.project(context, model, role, l);
+		
+		if (ret != null) {
+			ConversationInteraction source=(ConversationInteraction)model;
+			
+			// Only project variable if associated with local role
+			if (source.getFromVariable() != null) {
+				
+				// Find variable in state
+				Object state=context.getState(source.getFromVariable().getName());
+				
+				if (state instanceof Variable) {
+					ret.setFromVariable((Variable)state);
+				}
+			}
+			
+			if (source.getToVariable() != null) {
+				
+				// Find variable in state
+				Object state=context.getState(source.getToVariable().getName());
+				
+				if (state instanceof Variable) {
+					ret.setToVariable((Variable)state);
+				}
+			}
+		}
+		
+		return(ret);
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.projector/src/java/org/scribble/conversation/projector/ConversationModelProjectorRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.projector/src/java/org/scribble/conversation/projector/ConversationModelProjectorRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.projector/src/java/org/scribble/conversation/projector/ConversationModelProjectorRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,124 @@
+/*
+ * Copyright 2007-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 11 Jan 2008 : Initial version created by gary
+ */
+package org.scribble.conversation.projector;
+
+import org.scribble.extensions.RegistryInfo;
+import org.scribble.model.*;
+import org.scribble.model.admin.ModelListener;
+import org.scribble.projector.*;
+import org.scribble.conversation.model.*;
+
+/**
+ * This class provides the ConversationModel implementation of the
+ * projector rule.
+ */
+ at RegistryInfo(extension=ProjectorRule.class,notation=ConversationNotation.NOTATION_CODE)
+public class ConversationModelProjectorRule extends ModelProjectorRule {
+
+	/**
+	 * This method creates the model instance being projected.
+	 * 
+	 * @return The new model
+	 */
+	protected Model createModel() {
+		return(new ConversationModel());
+	}
+		
+	/**
+	 * This method determines whether the projection rule is
+	 * appropriate for the supplied model object.
+	 * 
+	 * @param obj The model object to be projected
+	 * @return Whether the rule is relevant for the
+	 * 				model object
+	 */
+	public boolean isSupported(ModelObject obj) {
+		return(obj.getClass() == ConversationModel.class);
+	}
+	
+	/**
+	 * This method projects the supplied model object based on the
+	 * specified role.
+	 * 
+	 * @param model The model object
+	 * @param role The role
+	 * @param l The model listener
+	 * @return The projected model object
+	 */
+	public ModelObject project(ProjectorContext context, ModelObject model,
+					Role role, ModelListener l) {
+		ConversationModel ret=(ConversationModel)super.project(context,
+						model, role, l);
+		ConversationModel source=(ConversationModel)model;
+		
+		ret.derivedFrom(source);
+		
+		// Project the identity locators
+		for (int i=0; i < source.getIdentityLocators().size(); i++) {
+			IdentityLocator locator=(IdentityLocator)
+					context.project(source.getIdentityLocators().get(i),
+							role, l);
+			
+			if (locator != null) {
+				ret.getIdentityLocators().add(locator);
+			}
+		}
+		
+		Conversation conversation=null;
+		
+		if (source.getConversation() != null) {
+			Conversation conv=source.getConversation();
+			
+			// Check if sub-definition should be projected
+			if (context.getSubDefinitionPath() != null) {
+				conv = (Conversation)conv.getSubDefinition(context.getSubDefinitionPath());
+			}
+			
+			/*
+			for (int i=0; conv != null && 
+					i < context.getSubDefinitionPath().getPathElementCount(); i++) {
+				Definition defn=conv.getSubDefinition(context.getSubDefinitionPath().getPathElement(i));
+				
+				if (defn instanceof Conversation) {
+					conv = (Conversation)defn;
+				}
+			}
+			*/
+			
+			if (conv != null) {
+				conversation = (Conversation)context.project(conv,
+					role, l);
+			}
+			
+			if (conversation != null && context.getSubDefinitionPath().getPathElementCount() > 0) {
+				// Add sub-definition path to projected conversation name
+				String name=conversation.getLocatedName().getName();
+				
+				for (int i=0; i < context.getSubDefinitionPath().getPathElementCount(); i++) {
+					name += "$"+context.getSubDefinitionPath().getPathElement(i);
+				}
+			}
+		}
+		
+		ret.setConversation(conversation);
+		
+		return(ret);
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.projector/src/java/org/scribble/conversation/projector/ConversationProjectorRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.projector/src/java/org/scribble/conversation/projector/ConversationProjectorRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.projector/src/java/org/scribble/conversation/projector/ConversationProjectorRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,152 @@
+/*
+ * Copyright 2007-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 11 Jan 2008 : Initial version created by gary
+ */
+package org.scribble.conversation.projector;
+
+//import java.util.logging.Logger;
+
+import org.scribble.extensions.RegistryInfo;
+import org.scribble.model.*;
+import org.scribble.model.admin.ModelListener;
+import org.scribble.projector.*;
+import org.scribble.conversation.model.*;
+
+/**
+ * This class provides the Conversation implementation of the
+ * projector rule.
+ */
+ at RegistryInfo(extension=ProjectorRule.class,notation=ConversationNotation.NOTATION_CODE)
+public class ConversationProjectorRule implements ProjectorRule {
+
+	/**
+	 * This method determines whether the projection rule is
+	 * appropriate for the supplied model object.
+	 * 
+	 * @param obj The model object to be projected
+	 * @return Whether the rule is relevant for the
+	 * 				model object
+	 */
+	public boolean isSupported(ModelObject obj) {
+		return(obj.getClass() == Conversation.class);
+	}
+	
+	/**
+	 * This method projects the supplied model object based on the
+	 * specified role.
+	 * 
+	 * @param model The model object
+	 * @param role The role
+	 * @param l The model listener
+	 * @return The projected model object
+	 */
+	public ModelObject project(ProjectorContext context, ModelObject model,
+					Role role, ModelListener l) {
+		Activity ret=null;
+		Conversation source=(Conversation)model;
+		java.util.List<Role> roles=null;
+		
+		if (context.isOuterScope() ||
+				(roles=context.getRolesOfInterestForDefinition(source)) != null) {
+			
+			if (roles == null) {
+				roles = new java.util.Vector<Role>();
+				roles.add(role);
+			}
+			
+			for (int j=0; j < roles.size(); j++) {
+				Conversation conv = new Conversation();
+				
+				// Set current role
+				role = roles.get(j);
+				
+				conv.derivedFrom(source);
+				conv.setStateless(source.isStateless());
+				
+				// Project model name
+				LocatedName modelName=(LocatedName)
+						context.project(source.getLocatedName(),
+								role, l);
+				conv.setLocatedName(modelName);
+				
+				// Project 'implements' references
+				for (int i=0; i < source.getImplements().size(); i++) {
+					ImplementsReference ref=source.getImplements().get(i);
+					
+					ImplementsReference projectedRef=
+						(ImplementsReference)context.project(ref,
+								role, l);
+					
+					if (projectedRef != null) {
+						conv.getImplements().add(projectedRef);
+					}
+				}
+				
+				// Project 'conforms to' references
+				for (int i=0; i < source.getConformsTo().size(); i++) {
+					ConformanceReference ref=source.getConformsTo().get(i);
+					
+					ConformanceReference projectedRef=
+						(ConformanceReference)context.project(ref,
+								role, l);
+					
+					if (projectedRef != null) {
+						conv.getConformsTo().add(projectedRef);
+					}
+				}
+				
+				// Project 'identities' references
+				for (int i=0; i < source.getIdentities().size(); i++) {
+					Identity id=source.getIdentities().get(i);
+					
+					Identity projectedId=
+						(Identity)context.project(id, role,
+								l);
+					
+					if (projectedId != null) {
+						conv.getIdentities().add(projectedId);
+					}
+				}
+				
+				// Project activities
+				context.pushScope();
+				
+				conv.setBlock((Block)context.project(source.getBlock(),
+							role, l));
+				conv.getBlock().setParent(conv);
+						
+				context.popScope();
+				
+				if (ret == null) {
+					ret = conv;
+				} else if (ret instanceof Block) {
+					((Block)ret).getContents().add(conv);
+				} else {
+					Block b=new Block();
+					b.getContents().add(ret);
+					b.getContents().add(conv);
+					ret = b;
+				}
+			}
+		}
+
+		return(ret);
+	}
+	
+	//private static Logger logger = Logger.getLogger("org.scribble.conversation.projector");
+}

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.projector/src/java/org/scribble/conversation/projector/ConversationReferenceProjectorRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.projector/src/java/org/scribble/conversation/projector/ConversationReferenceProjectorRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.projector/src/java/org/scribble/conversation/projector/ConversationReferenceProjectorRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,84 @@
+/*
+ * Copyright 2007-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 19 Nov 2007 : Initial version created by gary
+ */
+package org.scribble.conversation.projector;
+
+import org.scribble.extensions.RegistryInfo;
+import org.scribble.model.*;
+import org.scribble.model.admin.ModelListener;
+import org.scribble.projector.*;
+import org.scribble.conversation.model.*;
+
+/**
+ * This class provides the ConversationReference implementation of the
+ * projector rule.
+ */
+ at RegistryInfo(extension=ProjectorRule.class,notation=ConversationNotation.NOTATION_CODE)
+public class ConversationReferenceProjectorRule extends ModelReferenceProjectorRule {
+
+	/**
+	 * This is the default constructor.
+	 */
+	public ConversationReferenceProjectorRule() {
+		super(true);
+	}
+	
+	/**
+	 * This method determines whether the projection rule is
+	 * appropriate for the supplied model object.
+	 * 
+	 * @param obj The model object to be projected
+	 * @return Whether the rule is relevant for the
+	 * 				model object
+	 */
+	public boolean isSupported(ModelObject obj) {
+		return(obj.getClass() == ConversationReference.class);
+	}
+	
+	/**
+	 * This method returns the new reference instance.
+	 * 
+	 * @param source The source reference
+	 * @return The model reference
+	 */
+	protected ModelReference createReference(ModelReference source) {
+		return(new ConversationReference());
+	}
+	
+	/**
+	 * This method projects the supplied model object based on the
+	 * specified role.
+	 * 
+	 * @param model The model object
+	 * @param role The role
+	 * @param l The model listener
+	 * @return The projected model object
+	 */
+	public ModelObject project(ProjectorContext context, ModelObject model,
+					Role role, ModelListener l) {
+		ConversationReference ret=(ConversationReference)super.project(context,
+									model, role, l);
+		
+		if (ret != null) {
+			ret.setInner(((ConversationReference)model).isInner());
+		}
+		
+		return(ret);
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.projector/src/java/org/scribble/conversation/projector/IdentityLocatorProjectorRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.projector/src/java/org/scribble/conversation/projector/IdentityLocatorProjectorRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.projector/src/java/org/scribble/conversation/projector/IdentityLocatorProjectorRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,73 @@
+/*
+ * Copyright 2007-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 31 Jul 2008 : Initial version created by gary
+ */
+package org.scribble.conversation.projector;
+
+import org.scribble.extensions.RegistryInfo;
+import org.scribble.model.*;
+import org.scribble.model.admin.ModelListener;
+import org.scribble.projector.*;
+import org.scribble.conversation.model.*;
+
+/**
+ * This class provides the IdentityLocator implementation of the
+ * projector rule.
+ */
+ at RegistryInfo(extension=ProjectorRule.class,notation=ConversationNotation.NOTATION_CODE)
+public class IdentityLocatorProjectorRule implements ProjectorRule {
+
+	/**
+	 * This method determines whether the projection rule is
+	 * appropriate for the supplied model object.
+	 * 
+	 * @param obj The model object to be projected
+	 * @return Whether the rule is relevant for the
+	 * 				model object
+	 */
+	public boolean isSupported(ModelObject obj) {
+		return(obj.getClass() == IdentityLocator.class);
+	}
+	
+	/**
+	 * This method projects the supplied model object based on the
+	 * specified role.
+	 * 
+	 * @param model The model object
+	 * @param role The role
+	 * @param l The model listener
+	 * @return The projected model object
+	 */
+	public ModelObject project(ProjectorContext context, ModelObject model,
+					Role role, ModelListener l) {
+		IdentityLocator ret=new IdentityLocator();
+		IdentityLocator source=(IdentityLocator)model;
+		
+		ret.derivedFrom(source);
+
+		ret.setType((TypeReference)context.project(
+				source.getType(), role, l));
+		
+		for (int i=0; i < source.getNumberOfLocators(); i++) {
+			ret.setLocator(source.getIdentity(i),
+					source.getLocator(i));
+		}
+		
+		return(ret);
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.projector/src/java/org/scribble/conversation/projector/IdentityProjectorRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.projector/src/java/org/scribble/conversation/projector/IdentityProjectorRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.projector/src/java/org/scribble/conversation/projector/IdentityProjectorRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,68 @@
+/*
+ * Copyright 2007-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 31 Jul 2008 : Initial version created by gary
+ */
+package org.scribble.conversation.projector;
+
+import org.scribble.extensions.RegistryInfo;
+import org.scribble.model.*;
+import org.scribble.model.admin.ModelListener;
+import org.scribble.projector.*;
+import org.scribble.conversation.model.*;
+
+/**
+ * This class provides the Identity implementation of the
+ * projector rule.
+ */
+ at RegistryInfo(extension=ProjectorRule.class,notation=ConversationNotation.NOTATION_CODE)
+public class IdentityProjectorRule implements ProjectorRule {
+
+	/**
+	 * This method determines whether the projection rule is
+	 * appropriate for the supplied model object.
+	 * 
+	 * @param obj The model object to be projected
+	 * @return Whether the rule is relevant for the
+	 * 				model object
+	 */
+	public boolean isSupported(ModelObject obj) {
+		return(obj.getClass() == Identity.class);
+	}
+	
+	/**
+	 * This method projects the supplied model object based on the
+	 * specified role.
+	 * 
+	 * @param model The model object
+	 * @param role The role
+	 * @param l The model listener
+	 * @return The projected model object
+	 */
+	public ModelObject project(ProjectorContext context, ModelObject model,
+					Role role, ModelListener l) {
+		Identity ret=new Identity();
+		Identity source=(Identity)model;
+		
+		ret.derivedFrom(source);
+
+		ret.setIdentityType(source.getIdentityType());
+		ret.getNames().addAll(source.getNames());
+		
+		return(ret);
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.projector/src/java/org/scribble/conversation/projector/IfProjectorRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.projector/src/java/org/scribble/conversation/projector/IfProjectorRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.projector/src/java/org/scribble/conversation/projector/IfProjectorRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,94 @@
+/*
+ * Copyright 2007-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 1 Feb 2008 : Initial version created by gary
+ */
+package org.scribble.conversation.projector;
+
+import org.scribble.extensions.RegistryInfo;
+import org.scribble.model.*;
+import org.scribble.model.admin.ModelListener;
+import org.scribble.projector.*;
+import org.scribble.conversation.model.*;
+
+/**
+ * This class provides the If implementation of the
+ * projector rule.
+ */
+ at RegistryInfo(extension=ProjectorRule.class,notation=ConversationNotation.NOTATION_CODE)
+public class IfProjectorRule implements ProjectorRule {
+
+	/**
+	 * This method determines whether the projection rule is
+	 * appropriate for the supplied model object.
+	 * 
+	 * @param obj The model object to be projected
+	 * @return Whether the rule is relevant for the
+	 * 				model object
+	 */
+	public boolean isSupported(ModelObject obj) {
+		return(obj.getClass() == If.class);
+	}
+	
+	/**
+	 * This method projects the supplied model object based on the
+	 * specified role.
+	 * 
+	 * @param model The model object
+	 * @param role The role
+	 * @param l The model listener
+	 * @return The projected model object
+	 */
+	public ModelObject project(ProjectorContext context, ModelObject model,
+					Role role, ModelListener l) {
+		If ret=new If();
+		If source=(If)model;
+
+		ret.derivedFrom(source);
+		
+		// Project the list of roles
+		for (int i=0; i < source.getRoles().size(); i++) {
+			ret.getRoles().add(new Role(source.getRoles().get(i)));
+		}
+		
+		for (int i=0; i < source.getConditionalBlocks().size(); i++) {
+			ConditionalBlock block=(ConditionalBlock)
+					context.project(source.getConditionalBlocks().get(i),
+							role, l);
+			
+			if (block != null) {
+				ret.getConditionalBlocks().add(block);
+			}
+		}
+		
+		if (source.getElseBlock() != null) {
+			ret.setElseBlock((Block)
+					context.project(source.getElseBlock(),
+							role, l));
+		}
+		
+		// Check if choice has atleast one path
+		if (ret.getConditionalBlocks().size() == 0 &&
+				ret.getElseBlock() == null) {
+			ret = null;
+		}
+		
+		// TODO: Need to cater for optional paths
+
+		return(ret);
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.projector/src/java/org/scribble/conversation/projector/InterruptBlockProjectorRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.projector/src/java/org/scribble/conversation/projector/InterruptBlockProjectorRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.projector/src/java/org/scribble/conversation/projector/InterruptBlockProjectorRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,96 @@
+/*
+ * Copyright 2005-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 19 Oct 2008 : Initial version created by gary
+ */
+package org.scribble.conversation.projector;
+
+import org.scribble.extensions.RegistryInfo;
+import org.scribble.model.*;
+import org.scribble.model.admin.ModelListener;
+import org.scribble.projector.*;
+import org.scribble.conversation.model.*;
+
+/**
+ * This class provides the InterruptBlock implementation of the
+ * projector rule.
+ */
+ at RegistryInfo(extension=ProjectorRule.class,notation=ConversationNotation.NOTATION_CODE)
+public class InterruptBlockProjectorRule extends AbstractBlockProjectorRule {
+
+	/**
+	 * This method determines whether the projection rule is
+	 * appropriate for the supplied model object.
+	 * 
+	 * @param obj The model object to be projected
+	 * @return Whether the rule is relevant for the
+	 * 				model object
+	 */
+	public boolean isSupported(ModelObject obj) {
+		return(obj.getClass() == InterruptBlock.class);
+	}
+	
+	/**
+	 * This method creates a new block of the appropriate
+	 * type.
+	 * 
+	 * @return The block
+	 */
+	protected Block createBlock() {
+		return(new InterruptBlock());
+	}
+	
+	/**
+	 * This method projects the supplied model object based on the
+	 * specified role.
+	 * 
+	 * @param model The model object
+	 * @param role The role
+	 * @param l The model listener
+	 * @return The projected model object
+	 */
+	public ModelObject project(ProjectorContext context, ModelObject model,
+					Role role, ModelListener l) {
+		InterruptBlock ret=(InterruptBlock)super.project(context,
+				model, role, l);
+		InterruptBlock source=(InterruptBlock)model;
+
+		// If block not projected, then if projected role is in
+		// the list, the re-instate
+		if (ret == null && source.getRoles().contains(role)) {
+			ret = new InterruptBlock();
+			
+			ret.derivedFrom(source);
+		}
+		
+		if (ret != null) {
+			
+			// Project the list of roles
+			for (int i=0; i < source.getRoles().size(); i++) {
+				ret.getRoles().add(new Role(source.getRoles().get(i)));
+			}
+			
+			if (source.getExpression() != null) {
+				ret.setExpression((Expression)
+						context.project(source.getExpression(),
+								role, l));
+			}
+		}
+		
+		return(ret);
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.projector/src/java/org/scribble/conversation/projector/ParallelProjectorRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.projector/src/java/org/scribble/conversation/projector/ParallelProjectorRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.projector/src/java/org/scribble/conversation/projector/ParallelProjectorRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,87 @@
+/*
+ * Copyright 2007-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 9 Mar 2008 : Initial version created by gary
+ */
+package org.scribble.conversation.projector;
+
+import org.scribble.extensions.RegistryInfo;
+import org.scribble.model.*;
+import org.scribble.model.admin.ModelListener;
+import org.scribble.projector.*;
+import org.scribble.conversation.model.*;
+
+/**
+ * This class provides the Parallel implementation of the
+ * projector rule.
+ */
+ at RegistryInfo(extension=ProjectorRule.class,notation=ConversationNotation.NOTATION_CODE)
+public class ParallelProjectorRule implements ProjectorRule {
+
+	/**
+	 * This method determines whether the projection rule is
+	 * appropriate for the supplied model object.
+	 * 
+	 * @param obj The model object to be projected
+	 * @return Whether the rule is relevant for the
+	 * 				model object
+	 */
+	public boolean isSupported(ModelObject obj) {
+		return(obj.getClass() == Parallel.class);
+	}
+	
+	/**
+	 * This method projects the supplied model object based on the
+	 * specified role.
+	 * 
+	 * @param model The model object
+	 * @param role The role
+	 * @param l The model listener
+	 * @return The projected model object
+	 */
+	public ModelObject project(ProjectorContext context, ModelObject model,
+					Role role, ModelListener l) {
+		ModelObject ret=null;
+		Parallel parallel=new Parallel();
+		Parallel source=(Parallel)model;
+		
+		parallel.derivedFrom(source);
+
+		for (int i=0; i < source.getBlocks().size(); i++) {
+			Block block=(Block)
+					context.project(source.getBlocks().get(i),
+							role, l);
+			
+			if (block != null) {
+				parallel.getBlocks().add(block);
+			}
+		}
+		
+		// Check if parallel has atleast one path
+		if (parallel.getBlocks().size() > 0) {
+			ret = parallel;
+			
+			// If parallel only has one path, then
+			// return block
+			if (parallel.getBlocks().size() == 1) {
+				ret = parallel.getBlocks().get(0);
+			}
+		}
+		
+		return(ret);
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.projector/src/java/org/scribble/conversation/projector/RaiseProjectorRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.projector/src/java/org/scribble/conversation/projector/RaiseProjectorRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.projector/src/java/org/scribble/conversation/projector/RaiseProjectorRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,74 @@
+/*
+ * Copyright 2007-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 10 Nov 2008 : Initial version created by gary
+ */
+package org.scribble.conversation.projector;
+
+import org.scribble.extensions.RegistryInfo;
+import org.scribble.model.*;
+import org.scribble.model.admin.ModelListener;
+import org.scribble.projector.*;
+import org.scribble.conversation.model.*;
+
+/**
+ * This class provides the Raise implementation of the
+ * projector rule.
+ */
+ at RegistryInfo(extension=ProjectorRule.class,notation=ConversationNotation.NOTATION_CODE)
+public class RaiseProjectorRule implements ProjectorRule {
+
+	/**
+	 * This method determines whether the projection rule is
+	 * appropriate for the supplied model object.
+	 * 
+	 * @param obj The model object to be projected
+	 * @return Whether the rule is relevant for the
+	 * 				model object
+	 */
+	public boolean isSupported(ModelObject obj) {
+		return(obj.getClass() == Raise.class);
+	}
+
+	/**
+	 * This method projects the supplied model object based on the
+	 * specified role.
+	 * 
+	 * @param model The model object
+	 * @param role The role
+	 * @param l The model listener
+	 * @return The projected model object
+	 */
+	public ModelObject project(ProjectorContext context, ModelObject model,
+					Role role, ModelListener l) {
+		Raise ret=null;
+		Raise raise=(Raise)model;
+		
+		if (raise.getRoles().contains(role)) {
+			ret = new Raise();
+			
+			ret.derivedFrom(raise);
+			
+			ret.getRoles().add(new Role(role));
+			
+			ret.setType((TypeReference)context.project(raise.getType(),
+					role, l));
+		}
+		
+		return(ret);
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.projector/src/java/org/scribble/conversation/projector/RunProjectorRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.projector/src/java/org/scribble/conversation/projector/RunProjectorRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.projector/src/java/org/scribble/conversation/projector/RunProjectorRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,54 @@
+/*
+ * Copyright 2007-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 9 Mar 2008 : Initial version created by gary
+ */
+package org.scribble.conversation.projector;
+
+import org.scribble.extensions.RegistryInfo;
+import org.scribble.model.*;
+import org.scribble.projector.*;
+import org.scribble.conversation.model.*;
+
+/**
+ * This class provides the Run implementation of the
+ * projector rule.
+ */
+ at RegistryInfo(extension=ProjectorRule.class,notation=ConversationNotation.NOTATION_CODE)
+public class RunProjectorRule extends ComposeProjectorRule {
+
+	/**
+	 * This method determines whether the projection rule is
+	 * appropriate for the supplied model object.
+	 * 
+	 * @param obj The model object to be projected
+	 * @return Whether the rule is relevant for the
+	 * 				model object
+	 */
+	public boolean isSupported(ModelObject obj) {
+		return(obj.getClass() == Run.class);
+	}
+	
+	/**
+	 * This method creates the model include object being projected.
+	 * 
+	 * @return The model include
+	 */
+	protected ModelInclude createModelInclude() {
+		return(new Run());
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.projector/src/java/org/scribble/conversation/projector/SpawnProjectorRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.projector/src/java/org/scribble/conversation/projector/SpawnProjectorRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.projector/src/java/org/scribble/conversation/projector/SpawnProjectorRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,54 @@
+/*
+ * Copyright 2007-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 7 Aug 2008 : Initial version created by gary
+ */
+package org.scribble.conversation.projector;
+
+import org.scribble.extensions.RegistryInfo;
+import org.scribble.model.*;
+import org.scribble.projector.*;
+import org.scribble.conversation.model.*;
+
+/**
+ * This class provides the Spawn implementation of the
+ * projector rule.
+ */
+ at RegistryInfo(extension=ProjectorRule.class,notation=ConversationNotation.NOTATION_CODE)
+public class SpawnProjectorRule extends ComposeProjectorRule {
+
+	/**
+	 * This method determines whether the projection rule is
+	 * appropriate for the supplied model object.
+	 * 
+	 * @param obj The model object to be projected
+	 * @return Whether the rule is relevant for the
+	 * 				model object
+	 */
+	public boolean isSupported(ModelObject obj) {
+		return(obj.getClass() == Spawn.class);
+	}
+	
+	/**
+	 * This method creates the model include object being projected.
+	 * 
+	 * @return The model include
+	 */
+	protected ModelInclude createModelInclude() {
+		return(new Spawn());
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.projector/src/java/org/scribble/conversation/projector/TryEscapeProjectorRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.projector/src/java/org/scribble/conversation/projector/TryEscapeProjectorRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.projector/src/java/org/scribble/conversation/projector/TryEscapeProjectorRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,89 @@
+/*
+ * Copyright 2005-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 19 Oct 2008 : Initial version created by gary
+ */
+package org.scribble.conversation.projector;
+
+import org.scribble.extensions.RegistryInfo;
+import org.scribble.model.*;
+import org.scribble.model.admin.ModelListener;
+import org.scribble.projector.*;
+import org.scribble.conversation.model.*;
+
+/**
+ * This class provides the TryEscape implementation of the
+ * projector rule.
+ */
+ at RegistryInfo(extension=ProjectorRule.class,notation=ConversationNotation.NOTATION_CODE)
+public class TryEscapeProjectorRule implements ProjectorRule {
+
+	/**
+	 * This method determines whether the projection rule is
+	 * appropriate for the supplied model object.
+	 * 
+	 * @param obj The model object to be projected
+	 * @return Whether the rule is relevant for the
+	 * 				model object
+	 */
+	public boolean isSupported(ModelObject obj) {
+		return(obj.getClass() == TryEscape.class);
+	}
+	
+	/**
+	 * This method projects the supplied model object based on the
+	 * specified role.
+	 * 
+	 * @param model The model object
+	 * @param role The role
+	 * @param l The model listener
+	 * @return The projected model object
+	 */
+	public ModelObject project(ProjectorContext context, ModelObject model,
+					Role role, ModelListener l) {
+		TryEscape ret=new TryEscape();
+		TryEscape source=(TryEscape)model;
+
+		ret.derivedFrom(source);
+
+		// Project the try block
+		Block tryBlock=(Block)
+				context.project(source.getBlock(), role, l);
+		
+		if (tryBlock != null && tryBlock.getContents().size() > 0) {
+			ret.setBlock(tryBlock);
+		}
+		
+		for (int i=0; i < source.getEscapeBlocks().size(); i++) {
+			EscapeBlock block=(EscapeBlock)
+					context.project(source.getEscapeBlocks().get(i),
+							role, l);
+			
+			if (block != null) {
+				ret.getEscapeBlocks().add(block);
+			}
+		}
+		
+		// Check if choice has atleast one path
+		if (ret.getBlock().getContents().size() == 0 &&
+				ret.getEscapeBlocks().size() == 0) {
+			ret = null;
+		}
+		
+		return(ret);
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.projector/src/java/org/scribble/conversation/projector/VariableListProjectorRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.projector/src/java/org/scribble/conversation/projector/VariableListProjectorRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.projector/src/java/org/scribble/conversation/projector/VariableListProjectorRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,82 @@
+/*
+ * Copyright 2007-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 25 Jan, 2008 : Initial version created by gary
+ */
+package org.scribble.conversation.projector;
+
+import org.scribble.extensions.RegistryInfo;
+import org.scribble.model.*;
+import org.scribble.model.admin.ModelListener;
+import org.scribble.conversation.model.*;
+import org.scribble.projector.*;
+
+/**
+ * This class provides the VariableList implementation of the
+ * projector rule.
+ */
+ at RegistryInfo(extension=ProjectorRule.class,notation=ConversationNotation.NOTATION_CODE)
+public class VariableListProjectorRule extends InteractionProjectorRule {
+
+	/**
+	 * This method determines whether the projection rule is
+	 * appropriate for the supplied model object.
+	 * 
+	 * @param obj The model object to be projected
+	 * @return Whether the rule is relevant for the
+	 * 				model object
+	 */
+	public boolean isSupported(ModelObject obj) {
+		return(obj.getClass() == VariableList.class);
+	}
+	
+	/**
+	 * This method projects the supplied model object based on the
+	 * specified role.
+	 * 
+	 * @param model The model object
+	 * @param role The role
+	 * @param l The model listener
+	 * @return The projected model object
+	 */
+	public ModelObject project(ProjectorContext context, ModelObject model,
+					Role role, ModelListener l) {
+		VariableList ret=new VariableList();
+		VariableList source=(VariableList)model;
+
+		ret.setType(source.getType());
+
+		for (int i=0; i < source.getVariables().size(); i++) {
+			Variable var=source.getVariables().get(i);
+			
+			Variable newVar=new Variable();
+			newVar.setName(var.getName());
+			
+			if (var.getType() != null) {
+				TypeReference ref=new TypeReference();
+				ref.setLocalpart(var.getType().getLocalpart());
+				ref.setNamespace(var.getType().getNamespace());
+			}
+			
+			ret.getVariables().add(newVar);
+			
+			context.setState(newVar.getName(), newVar);
+		}
+		
+		return(ret);
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.projector/src/java/org/scribble/conversation/projector/WhenProjectorRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.projector/src/java/org/scribble/conversation/projector/WhenProjectorRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.projector/src/java/org/scribble/conversation/projector/WhenProjectorRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,87 @@
+/*
+ * Copyright 2007-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 9 Mar 2008 : Initial version created by gary
+ */
+package org.scribble.conversation.projector;
+
+import org.scribble.extensions.RegistryInfo;
+import org.scribble.model.*;
+import org.scribble.model.admin.ModelListener;
+import org.scribble.projector.*;
+import org.scribble.conversation.model.*;
+
+/**
+ * This class provides the When implementation of the
+ * projector rule.
+ */
+ at RegistryInfo(extension=ProjectorRule.class,notation=ConversationNotation.NOTATION_CODE)
+public class WhenProjectorRule implements ProjectorRule {
+
+	/**
+	 * This method determines whether the projection rule is
+	 * appropriate for the supplied model object.
+	 * 
+	 * @param obj The model object to be projected
+	 * @return Whether the rule is relevant for the
+	 * 				model object
+	 */
+	public boolean isSupported(ModelObject obj) {
+		return(obj.getClass() == When.class);
+	}
+	
+	/**
+	 * This method projects the supplied model object based on the
+	 * specified role.
+	 * 
+	 * @param model The model object
+	 * @param role The role
+	 * @param l The model listener
+	 * @return The projected model object
+	 */
+	public ModelObject project(ProjectorContext context, ModelObject model,
+					Role role, ModelListener l) {
+		When ret=new When();
+		When source=(When)model;
+
+		ret.derivedFrom(source);
+		
+		// Project the list of roles
+		for (int i=0; i < source.getRoles().size(); i++) {
+			ret.getRoles().add(new Role(source.getRoles().get(i)));
+		}
+		
+		for (int i=0; i < source.getConditionalBlocks().size(); i++) {
+			ConditionalBlock block=(ConditionalBlock)
+					context.project(source.getConditionalBlocks().get(i),
+							role, l);
+			
+			if (block != null) {
+				ret.getConditionalBlocks().add(block);
+			}
+		}
+		
+		// Check if choice has atleast one path
+		if (ret.getConditionalBlocks().size() == 0) {
+			ret = null;
+		}
+		
+		// TODO: Need to cater for optional paths
+
+		return(ret);
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.projector/src/java/org/scribble/conversation/projector/WhileProjectorRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.projector/src/java/org/scribble/conversation/projector/WhileProjectorRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.projector/src/java/org/scribble/conversation/projector/WhileProjectorRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,86 @@
+/*
+ * Copyright 2007-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 9 Mar 2008 : Initial version created by gary
+ */
+package org.scribble.conversation.projector;
+
+import org.scribble.extensions.RegistryInfo;
+import org.scribble.model.*;
+import org.scribble.model.admin.ModelListener;
+import org.scribble.conversation.model.*;
+import org.scribble.projector.*;
+
+/**
+ * This class provides the While implementation of the
+ * projector rule.
+ */
+ at RegistryInfo(extension=ProjectorRule.class,notation=ConversationNotation.NOTATION_CODE)
+public class WhileProjectorRule implements ProjectorRule {
+
+	/**
+	 * This method determines whether the projection rule is
+	 * appropriate for the supplied model object.
+	 * 
+	 * @param obj The model object to be projected
+	 * @return Whether the rule is relevant for the
+	 * 				model object
+	 */
+	public boolean isSupported(ModelObject obj) {
+		return(obj.getClass() == While.class);
+	}
+	
+	/**
+	 * This method projects the supplied model object based on the
+	 * specified role.
+	 * 
+	 * @param model The model object
+	 * @param role The role
+	 * @param l The model listener
+	 * @return The projected model object
+	 */
+	public ModelObject project(ProjectorContext context, ModelObject model,
+					Role role, ModelListener l) {
+		While ret=new While();
+		While source=(While)model;
+
+		ret.derivedFrom(source);
+		
+		// Project the list of roles
+		for (int i=0; i < source.getRoles().size(); i++) {
+			ret.getRoles().add(new Role(source.getRoles().get(i)));
+		}
+		
+		if (ret != null && source.getBlock() != null) {
+			
+			// Project the conditional block
+			ret.setBlock((ConditionalBlock)
+					context.project(source.getBlock(),
+								role, l));
+			
+			// If block is null, then no activities, so don't
+			// project the while
+			if (ret.getBlock() == null) {
+				ret = null;
+			} else {
+				ret.getBlock().setParent(ret);
+			}
+		}
+		
+		return(ret);
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.projector/src/java/org/scribble/conversation/projector/osgi/Activator.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.projector/src/java/org/scribble/conversation/projector/osgi/Activator.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.projector/src/java/org/scribble/conversation/projector/osgi/Activator.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,48 @@
+package org.scribble.conversation.projector.osgi;
+
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class Activator implements BundleActivator {
+
+	// The plug-in ID
+	public static final String PLUGIN_ID = "org.scribble.conversation.projector";
+
+	// The shared instance
+	private static Activator plugin;
+	
+	/**
+	 * The constructor
+	 */
+	public Activator() {
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.eclipse.core.runtime.Plugins#start(org.osgi.framework.BundleContext)
+	 */
+	public void start(BundleContext context) throws Exception {
+		plugin = this;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.eclipse.core.runtime.Plugin#stop(org.osgi.framework.BundleContext)
+	 */
+	public void stop(BundleContext context) throws Exception {
+		plugin = null;
+	}
+
+	/**
+	 * Returns the shared instance
+	 *
+	 * @return the shared instance
+	 */
+	public static Activator getDefault() {
+		return plugin;
+	}
+
+}

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.validation/.classpath
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.validation/.classpath	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.validation/.classpath	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="src" path="src/java"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+	<classpathentry kind="output" path="classes"/>
+</classpath>

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.validation/.project
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.validation/.project	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.validation/.project	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>org.scribble.conversation.validation</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.ManifestBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.SchemaBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.pde.PluginNature</nature>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+	</natures>
+</projectDescription>

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.validation/LICENSE.txt
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.validation/LICENSE.txt	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.validation/LICENSE.txt	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,201 @@
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.validation/META-INF/MANIFEST.MF
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.validation/META-INF/MANIFEST.MF	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.validation/META-INF/MANIFEST.MF	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,25 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Scribble Conversation Validation Plug-in
+Bundle-SymbolicName: org.scribble.conversation.validation;singleton:=true
+Bundle-Version: 0.1.0.qualifier
+Bundle-Activator: org.scribble.conversation.validation.osgi.Activator
+Bundle-Vendor: www.scribble.org
+Import-Package: org.osgi.framework;version="1.3.0"
+Require-Bundle: org.scribble.core,
+ org.scribble.conversation.model
+Bundle-ActivationPolicy: lazy
+Scribble-Extensions: org.scribble.conversation.validation.ConversationModelValidationRule,
+  org.scribble.conversation.validation.BehaviourValidationRule,
+  org.scribble.conversation.validation.ConversationValidationRule,
+  org.scribble.conversation.validation.ConversationInteractionValidationRule,
+  org.scribble.conversation.validation.ConditionalBlockValidationRule,
+  org.scribble.conversation.validation.IfValidationRule,
+  org.scribble.conversation.validation.ParallelValidationRule,
+  org.scribble.conversation.validation.WhenValidationRule,
+  org.scribble.conversation.validation.WhileValidationRule,
+  org.scribble.conversation.validation.VariableListValidationRule,
+  org.scribble.conversation.validation.VariableValidationRule,
+  org.scribble.conversation.validation.TryEscapeValidationRule,
+  org.scribble.conversation.validation.RaiseValidationRule,
+  org.scribble.conversation.validation.ComposeValidationRule

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.validation/build.properties
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.validation/build.properties	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.validation/build.properties	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,5 @@
+source.. = src/java/
+output.. = classes/
+bin.includes = META-INF/,\
+               .,\
+               plugin.xml

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.validation/classes/org/scribble/conversation/validation/BehaviourValidationRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conversation.validation/classes/org/scribble/conversation/validation/BehaviourValidationRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.validation/classes/org/scribble/conversation/validation/ComposeValidationRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conversation.validation/classes/org/scribble/conversation/validation/ComposeValidationRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.validation/classes/org/scribble/conversation/validation/ConditionalBlockValidationRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conversation.validation/classes/org/scribble/conversation/validation/ConditionalBlockValidationRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.validation/classes/org/scribble/conversation/validation/ConversationInteractionValidationRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conversation.validation/classes/org/scribble/conversation/validation/ConversationInteractionValidationRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.validation/classes/org/scribble/conversation/validation/ConversationModelValidationRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conversation.validation/classes/org/scribble/conversation/validation/ConversationModelValidationRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.validation/classes/org/scribble/conversation/validation/ConversationValidationRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conversation.validation/classes/org/scribble/conversation/validation/ConversationValidationRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.validation/classes/org/scribble/conversation/validation/IfValidationRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conversation.validation/classes/org/scribble/conversation/validation/IfValidationRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.validation/classes/org/scribble/conversation/validation/Messages.properties
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.validation/classes/org/scribble/conversation/validation/Messages.properties	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.validation/classes/org/scribble/conversation/validation/Messages.properties	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,28 @@
+# /*
+# * Copyright 2007-8 Pi4 Technologies Ltd
+# *
+# * Licensed under the Apache License, Version 2.0 (the "License");
+# * you may not use this file except in compliance with the License.
+# * You may obtain a copy of the License at
+# *
+# *     http://www.apache.org/licenses/LICENSE-2.0
+# *
+# * Unless required by applicable law or agreed to in writing, software
+# * distributed under the License is distributed on an "AS IS" BASIS,
+# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# * See the License for the specific language governing permissions and
+# * limitations under the License.
+# *
+# *
+# * Change History:
+# * 19 Mar 2008 : Initial version created by gary
+# */
+
+_EXPRESSION_BOOLEAN=Expression must be of type 'boolean'
+_EXPRESSION_TYPE_NOT_BOOLEAN=Expression type, for type system '{0}', is not of type 'boolean'
+_NOT_FOUND_PROTOCOL_REFERENCE=Unable to find description with protocol reference '{0}'
+_RAISED_TYPE_NOT_CAUGHT=Raised type '{0}' is not caught within the enclosing definition
+_STATELESS_CONV_SINGLE_IF=Stateless conversations can only have a single top level If construct defining the alternate paths
+_STATELESS_LOCAL_MODEL=Stateless conversations must be located at a role
+_STATELESS_ONLY_TOP_LEVEL=Only top level conversations can be stateless
+_STATELESS_WAIT_STATE_NOT_FIRST_BEHAVIOUR=Waiting behaviour can only be defined as first in stateless path

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.validation/classes/org/scribble/conversation/validation/ParallelValidationRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conversation.validation/classes/org/scribble/conversation/validation/ParallelValidationRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.validation/classes/org/scribble/conversation/validation/RaiseValidationRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conversation.validation/classes/org/scribble/conversation/validation/RaiseValidationRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.validation/classes/org/scribble/conversation/validation/TryEscapeValidationRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conversation.validation/classes/org/scribble/conversation/validation/TryEscapeValidationRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.validation/classes/org/scribble/conversation/validation/VariableListValidationRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conversation.validation/classes/org/scribble/conversation/validation/VariableListValidationRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.validation/classes/org/scribble/conversation/validation/VariableValidationRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conversation.validation/classes/org/scribble/conversation/validation/VariableValidationRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.validation/classes/org/scribble/conversation/validation/WhenValidationRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conversation.validation/classes/org/scribble/conversation/validation/WhenValidationRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.validation/classes/org/scribble/conversation/validation/WhileValidationRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conversation.validation/classes/org/scribble/conversation/validation/WhileValidationRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.validation/classes/org/scribble/conversation/validation/osgi/Activator.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.conversation.validation/classes/org/scribble/conversation/validation/osgi/Activator.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.validation/src/java/org/scribble/conversation/validation/BehaviourValidationRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.validation/src/java/org/scribble/conversation/validation/BehaviourValidationRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.validation/src/java/org/scribble/conversation/validation/BehaviourValidationRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,117 @@
+/*
+ * Copyright 2007-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 14 Nov 2008 : Initial version created by gary
+ */
+package org.scribble.conversation.validation;
+
+import org.scribble.validation.*;
+import org.scribble.extensions.*;
+import org.scribble.model.*;
+import org.scribble.model.admin.ModelIssue;
+import org.scribble.model.admin.ModelListener;
+import org.scribble.conversation.model.*;
+
+/**
+ * This class implements the validation rule for the
+ * Behaviour abstract entity.
+ */
+ at RegistryInfo(extension=ValidationRule.class,notation=ConversationNotation.NOTATION_CODE)
+public class BehaviourValidationRule extends AbstractValidationRule {
+
+	/**
+	 * This is the default constructor.
+	 */
+	public BehaviourValidationRule() {
+	}
+
+	/**
+	 * This method determines whether the rule is appropriate for
+	 * the supplied model object.
+	 * 
+	 * @param obj The model object
+	 * @return Whether the rule is appropriate
+	 */
+	public boolean isSupported(ModelObject obj) {
+		return(obj instanceof Behaviour);
+	}
+
+	/**
+	 * This method validates the supplied model object.
+	 * 
+	 * @param obj The model object
+	 * @param context The context
+	 * @param l The listener
+	 */
+	public void validate(ModelObject obj, ValidationContext context,
+			ModelListener l) {
+		Behaviour behaviour=(Behaviour)obj;
+
+		Definition enclosing=behaviour.getEnclosingDefinition();
+		
+		if (enclosing != null) {
+			Definition toplevel=enclosing.getTopLevelDefinition();
+			
+			// Check if the behaviour is a wait state in
+			// a stateless conversation
+			if (toplevel != null &&
+					toplevel.isStateless() &&
+					behaviour.isWaitState()) {
+				boolean f_error=false;
+				
+				// Make sure the behaviour is the first behaviour
+				// in one of the stateless conversation paths
+				if (behaviour.getParent() instanceof Block &&
+						behaviour.getParent().getParent()
+								instanceof If &&
+						behaviour.getParent().getParent().getParent()
+								instanceof Block &&
+						behaviour.getParent().getParent().getParent().getParent()
+								== toplevel) {
+					
+					// Find position
+					Block block=(Block)behaviour.getParent();
+					
+					int pos=block.getContents().indexOf(behaviour);
+					
+					for (int i=0; f_error == false && i < pos; i++) {
+						if (block.getContents().get(i) instanceof Behaviour) {
+							f_error = true;
+						}
+					}
+					
+				// Make sure behaviour being referred to is not the
+				// 'if' construct contained directly within the
+				// stateless conversation
+				} else if ((behaviour.getParent() instanceof Block)
+									== false ||
+						behaviour.getParent().getParent()
+									!= toplevel) {
+					f_error = true;
+				}
+				
+				if (f_error) {
+					l.error(new ModelIssue(behaviour, org.scribble.util.MessageUtil.format(
+							java.util.PropertyResourceBundle.getBundle(
+							"org.scribble.conversation.validation.Messages"),
+								"_STATELESS_WAIT_STATE_NOT_FIRST_BEHAVIOUR",
+								new String[]{})));					
+				}
+			}
+		}
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.validation/src/java/org/scribble/conversation/validation/ComposeValidationRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.validation/src/java/org/scribble/conversation/validation/ComposeValidationRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.validation/src/java/org/scribble/conversation/validation/ComposeValidationRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,96 @@
+/*
+ * Copyright 2007-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 9 Mar 2008 : Initial version created by gary
+ */
+package org.scribble.conversation.validation;
+
+import org.scribble.validation.*;
+import org.scribble.extensions.*;
+import org.scribble.model.*;
+import org.scribble.model.admin.ModelIssue;
+import org.scribble.model.admin.ModelListener;
+import org.scribble.conversation.model.*;
+
+/**
+ * This class implements the validation rule for the
+ * compose construct.
+ */
+ at RegistryInfo(extension=ValidationRule.class,notation=ConversationNotation.NOTATION_CODE)
+public class ComposeValidationRule extends AbstractValidationRule {
+
+	/**
+	 * This is the default constructor.
+	 */
+	public ComposeValidationRule() {
+	}
+
+	/**
+	 * This method determines whether the rule is appropriate for
+	 * the supplied model object.
+	 * 
+	 * @param obj The model object
+	 * @return Whether the rule is appropriate
+	 */
+	public boolean isSupported(ModelObject obj) {
+		return(obj instanceof Compose);
+	}
+
+	/**
+	 * This method validates the supplied model object.
+	 * 
+	 * @param obj The model object
+	 * @param context The context
+	 * @param l The listener
+	 */
+	public void validate(ModelObject obj, ValidationContext context,
+			ModelListener l) {
+		Compose compose=(Compose)obj;
+		
+		Conversation conv=compose.getDefinition();
+		
+		// Validate bound parameters
+		java.util.Iterator<DeclarationBinding> iter=
+					compose.getBindings().iterator();
+		
+		while (iter.hasNext()) {
+			DeclarationBinding db=iter.next();
+			
+			// Check if bound declaration exists
+			Declaration other=conv.getDeclaration(db.getBoundName());
+			
+			if (other == null) {
+				String name=compose.getReference().getAlias();
+				
+				if (compose.getReference().getLocatedRole() != null) {
+					name += ModelReference.LOCATED_REFERENCE_SEPARATOR+
+								compose.getReference().getLocatedRole();
+				}
+								
+				l.error(new ModelIssue(db, org.scribble.util.MessageUtil.format(
+						java.util.PropertyResourceBundle.getBundle(
+						"org.scribble.validation.Messages"),
+							"_NOT_FOUND_BOUND_DECLARATION",
+							new String[]{db.getBoundName(), name})));
+			} else {
+				// TODO:
+				// Check if the two declarations are compatible
+				// types
+			}
+		}
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.validation/src/java/org/scribble/conversation/validation/ConditionalBlockValidationRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.validation/src/java/org/scribble/conversation/validation/ConditionalBlockValidationRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.validation/src/java/org/scribble/conversation/validation/ConditionalBlockValidationRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,111 @@
+/*
+ * Copyright 2007-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 13 Mar 2008 : Initial version created by gary
+ */
+package org.scribble.conversation.validation;
+
+import org.scribble.validation.*;
+import org.scribble.extensions.*;
+import org.scribble.model.*;
+import org.scribble.model.types.*;
+import org.scribble.model.admin.ModelIssue;
+import org.scribble.model.admin.ModelListener;
+import org.scribble.conversation.model.*;
+
+/**
+ * This class implements the validation rule for the
+ * ConditionalBlock construct.
+ */
+ at RegistryInfo(extension=ValidationRule.class,notation=ConversationNotation.NOTATION_CODE)
+public class ConditionalBlockValidationRule extends AbstractValidationRule {
+
+	/**
+	 * This is the default constructor.
+	 */
+	public ConditionalBlockValidationRule() {
+	}
+
+	/**
+	 * This method determines whether the rule is appropriate for
+	 * the supplied model object.
+	 * 
+	 * @param obj The model object
+	 * @return Whether the rule is appropriate
+	 */
+	public boolean isSupported(ModelObject obj) {
+		return(obj instanceof ConditionalBlock);
+	}
+
+	/**
+	 * This method validates the supplied model object.
+	 * 
+	 * @param obj The model object
+	 * @param context The context
+	 * @param l The listener
+	 */
+	public void validate(ModelObject obj, ValidationContext context,
+			ModelListener l) {
+		ConditionalBlock elem=(ConditionalBlock)obj;
+
+		// Only need to validate the expression, as the
+		// validation of the contained activities will be
+		// handled by the Block validation rule
+		
+		/* TODO: UNCOMMENT WHEN SUITABLE TYPE RESOLVERS
+		 * ARE AVAILABLE FOR CDM (CDL Expressions)
+		 *
+		if (elem.getExpression() != null) {
+			java.util.Set<TypeInformation> typeInfos=null;
+		
+			// Validate expression
+			context.validate(elem.getExpression(), l);
+			
+			TypeResolver typeResolver=(TypeResolver)
+				org.scribble.extensions.RegistryFactory.getRegistry().getExtension(
+							TypeResolver.class, null);
+
+			if (typeResolver != null) {
+				typeInfos = typeResolver.getTypeInformation(elem.getExpression());
+			}
+
+			// Validate that expression's type is a boolean
+			if (typeInfos == null || typeInfos.size() == 0) {
+				l.error(new ModelIssue(elem, org.scribble.util.MessageUtil.format(
+						java.util.PropertyResourceBundle.getBundle(
+							"org.scribble.conversation.validation.Messages"),
+								"_EXPRESSION_BOOLEAN", new String[]{})));
+			} else {
+				
+				java.util.Iterator<TypeInformation> iter=typeInfos.iterator();
+				
+				while (iter.hasNext()) {
+					TypeInformation ti=iter.next();
+					
+					if (ti.isBoolean() == false) {
+						l.error(new ModelIssue(elem, org.scribble.util.MessageUtil.format(
+							java.util.PropertyResourceBundle.getBundle(
+									"org.scribble.conversation.validation.Messages"),
+										"_EXPRESSION_TYPE_NOT_BOOLEAN",
+										new String[]{ti.getTypeSystem().getName()})));
+					}
+				}
+			}
+		}
+		*/
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.validation/src/java/org/scribble/conversation/validation/ConversationInteractionValidationRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.validation/src/java/org/scribble/conversation/validation/ConversationInteractionValidationRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.validation/src/java/org/scribble/conversation/validation/ConversationInteractionValidationRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,69 @@
+/*
+ * Copyright 2007-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 13 Mar 2008 : Initial version created by gary
+ */
+package org.scribble.conversation.validation;
+
+import org.scribble.validation.*;
+import org.scribble.extensions.*;
+import org.scribble.model.*;
+import org.scribble.model.admin.ModelListener;
+import org.scribble.conversation.model.*;
+
+/**
+ * This class implements the validation rule for the
+ * ConversationInteraction construct.
+ */
+ at RegistryInfo(extension=ValidationRule.class,notation=ConversationNotation.NOTATION_CODE)
+public class ConversationInteractionValidationRule extends AbstractValidationRule {
+
+	/**
+	 * This is the default constructor.
+	 */
+	public ConversationInteractionValidationRule() {
+	}
+
+	/**
+	 * This method determines whether the rule is appropriate for
+	 * the supplied model object.
+	 * 
+	 * @param obj The model object
+	 * @return Whether the rule is appropriate
+	 */
+	public boolean isSupported(ModelObject obj) {
+		return(obj instanceof ConversationInteraction);
+	}
+
+	/**
+	 * This method validates the supplied model object.
+	 * 
+	 * @param obj The model object
+	 * @param context The context
+	 * @param l The listener
+	 */
+	public void validate(ModelObject obj, ValidationContext context,
+			ModelListener l) {
+		ConversationInteraction interaction=(ConversationInteraction)obj;
+		
+		// NOTE: Roles will be validated by the generic interaction
+		// rule
+		
+		// Validate variables:
+		// Check they are the appropriate type
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.validation/src/java/org/scribble/conversation/validation/ConversationModelValidationRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.validation/src/java/org/scribble/conversation/validation/ConversationModelValidationRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.validation/src/java/org/scribble/conversation/validation/ConversationModelValidationRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,65 @@
+/*
+ * Copyright 2007 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 11 Nov 2007 : Initial version created by gary
+ */
+package org.scribble.conversation.validation;
+
+import org.scribble.validation.*;
+import org.scribble.extensions.*;
+import org.scribble.model.*;
+import org.scribble.model.admin.ModelListener;
+import org.scribble.conversation.model.*;
+
+/**
+ * This class implements the validation rule for the
+ * conversation.
+ */
+ at RegistryInfo(extension=ValidationRule.class,notation=ConversationNotation.NOTATION_CODE)
+public class ConversationModelValidationRule extends AbstractValidationRule {
+
+	/**
+	 * This is the default constructor.
+	 */
+	public ConversationModelValidationRule() {
+	}
+
+	/**
+	 * This method determines whether the rule is appropriate for
+	 * the supplied model object.
+	 * 
+	 * @param obj The model object
+	 * @return Whether the rule is appropriate
+	 */
+	public boolean isSupported(ModelObject obj) {
+		return(obj instanceof ConversationModel);
+	}
+
+	/**
+	 * This method validates the supplied model object.
+	 * 
+	 * @param obj The model object
+	 * @param context The context
+	 * @param l The listener
+	 */
+	public void validate(ModelObject obj, ValidationContext context,
+			ModelListener l) {
+		ConversationModel model=(ConversationModel)obj;
+		
+		context.validate(model.getConversation(), l);
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.validation/src/java/org/scribble/conversation/validation/ConversationValidationRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.validation/src/java/org/scribble/conversation/validation/ConversationValidationRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.validation/src/java/org/scribble/conversation/validation/ConversationValidationRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,163 @@
+/*
+ * Copyright 2007 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 11 Nov 2007 : Initial version created by gary
+ */
+package org.scribble.conversation.validation;
+
+import org.scribble.validation.*;
+import org.scribble.extensions.*;
+import org.scribble.model.*;
+import org.scribble.model.admin.ModelIssue;
+import org.scribble.model.admin.ModelListener;
+import org.scribble.conversation.model.*;
+
+/**
+ * This class implements the validation rule for the
+ * conversation.
+ */
+ at RegistryInfo(extension=ValidationRule.class,notation=ConversationNotation.NOTATION_CODE)
+public class ConversationValidationRule extends AbstractValidationRule {
+
+	/**
+	 * This is the default constructor.
+	 */
+	public ConversationValidationRule() {
+	}
+
+	/**
+	 * This method determines whether the rule is appropriate for
+	 * the supplied model object.
+	 * 
+	 * @param obj The model object
+	 * @return Whether the rule is appropriate
+	 */
+	public boolean isSupported(ModelObject obj) {
+		return(obj instanceof Conversation);
+	}
+
+	/**
+	 * This method validates the supplied model object.
+	 * 
+	 * @param obj The model object
+	 * @param context The context
+	 * @param l The listener
+	 */
+	public void validate(ModelObject obj, ValidationContext context,
+			ModelListener l) {
+		Conversation conversation=(Conversation)obj;
+		
+		// Initialize the located role for the scope
+		if (conversation.getLocatedName() != null &&
+				conversation.getLocatedName().getRole() != null) {
+			context.setLocatedRole(
+					conversation.getLocatedName().getRole().getName());
+		}
+		
+		org.scribble.model.admin.ModelRepository mrep=
+			(org.scribble.model.admin.ModelRepository)
+			RegistryFactory.getRegistry().getExtension(
+					org.scribble.model.admin.ModelRepository.class, null);
+	
+		// Validate that implemented protocols can be located
+		for (int i=0; i < conversation.getImplements().size(); i++) {
+			ImplementsReference ref=conversation.getImplements().get(i);
+			
+			if (mrep.exists(ref, context.getSource()) == false) {
+				boolean f_error=true;
+				
+				// Check if reference is located, and if so, check whether
+				// global model exists
+				if (ref.getLocatedRole() != null) {
+					ModelReference globalRef=new ModelReference(ref.getNamespace(),
+							ref.getLocalpart(), null, ref.getNotation());
+				
+					mrep.locate(globalRef, ref);
+					
+					// If global model exists, then clear the error
+					if (mrep.exists(globalRef, context.getSource())) {
+						f_error = false;
+					}
+				}
+					
+				if (f_error) {
+					l.error(new ModelIssue(ref, org.scribble.util.MessageUtil.format(
+						java.util.PropertyResourceBundle.getBundle(
+						"org.scribble.conversation.validation.Messages"),
+							"_NOT_FOUND_PROTOCOL_REFERENCE",
+							new String[]{ref.toString()})));
+				}
+			}
+		}
+		
+		// Check if conversation is stateless
+		if (conversation.isStateless()) {
+			
+			// Check if top level conversation
+			if (conversation.getParent() instanceof Model) {
+				
+				// Check that conversation is located
+				if (conversation.getLocatedName() == null ||
+						conversation.getLocatedName().getRole() == null) {
+					l.error(new ModelIssue(conversation, org.scribble.util.MessageUtil.format(
+							java.util.PropertyResourceBundle.getBundle(
+							"org.scribble.conversation.validation.Messages"),
+								"_STATELESS_LOCAL_MODEL",
+								new String[]{})));
+				}
+				
+				// Ensure only contains a choice behaviour
+				boolean f_choiceFound=false;
+				
+				java.util.List<Activity> children=
+					conversation.getBlock().getContents();
+				
+				for (int i=0; i < children.size(); i++) {
+					if (children.get(i) instanceof Behaviour) {
+						
+						if (children.get(i) instanceof If) {
+							
+							if (f_choiceFound) {						
+								l.error(new ModelIssue(children.get(i), org.scribble.util.MessageUtil.format(
+										java.util.PropertyResourceBundle.getBundle(
+										"org.scribble.conversation.validation.Messages"),
+											"_STATELESS_CONV_SINGLE_IF",
+											new String[]{})));
+							}
+							
+							f_choiceFound = true;
+						} else {
+							l.error(new ModelIssue(children.get(i), org.scribble.util.MessageUtil.format(
+									java.util.PropertyResourceBundle.getBundle(
+									"org.scribble.conversation.validation.Messages"),
+										"_STATELESS_CONV_SINGLE_IF",
+										new String[]{})));
+						}
+					}
+				}
+			} else {
+				l.error(new ModelIssue(conversation, org.scribble.util.MessageUtil.format(
+						java.util.PropertyResourceBundle.getBundle(
+						"org.scribble.conversation.validation.Messages"),
+							"_STATELESS_ONLY_TOP_LEVEL",
+							new String[]{})));
+			}
+		}
+		
+		context.validate(conversation.getBlock(), l);
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.validation/src/java/org/scribble/conversation/validation/IfValidationRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.validation/src/java/org/scribble/conversation/validation/IfValidationRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.validation/src/java/org/scribble/conversation/validation/IfValidationRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,71 @@
+/*
+ * Copyright 2007-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 13 Mar 2008 : Initial version created by gary
+ */
+package org.scribble.conversation.validation;
+
+import org.scribble.validation.*;
+import org.scribble.extensions.*;
+import org.scribble.model.*;
+import org.scribble.model.admin.ModelListener;
+import org.scribble.conversation.model.*;
+
+/**
+ * This class implements the validation rule for the
+ * If construct.
+ */
+ at RegistryInfo(extension=ValidationRule.class,notation=ConversationNotation.NOTATION_CODE)
+public class IfValidationRule extends AbstractValidationRule {
+
+	/**
+	 * This is the default constructor.
+	 */
+	public IfValidationRule() {
+	}
+
+	/**
+	 * This method determines whether the rule is appropriate for
+	 * the supplied model object.
+	 * 
+	 * @param obj The model object
+	 * @return Whether the rule is appropriate
+	 */
+	public boolean isSupported(ModelObject obj) {
+		return(obj instanceof If);
+	}
+
+	/**
+	 * This method validates the supplied model object.
+	 * 
+	 * @param obj The model object
+	 * @param context The context
+	 * @param l The listener
+	 */
+	public void validate(ModelObject obj, ValidationContext context,
+			ModelListener l) {
+		If elem=(If)obj;
+
+		for (int i=0; i < elem.getConditionalBlocks().size(); i++) {
+			context.validate(elem.getConditionalBlocks().get(i), l);
+		}
+		
+		if (elem.getElseBlock() != null) {
+			context.validate(elem.getElseBlock(), l);
+		}
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.validation/src/java/org/scribble/conversation/validation/Messages.properties
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.validation/src/java/org/scribble/conversation/validation/Messages.properties	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.validation/src/java/org/scribble/conversation/validation/Messages.properties	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,28 @@
+# /*
+# * Copyright 2007-8 Pi4 Technologies Ltd
+# *
+# * Licensed under the Apache License, Version 2.0 (the "License");
+# * you may not use this file except in compliance with the License.
+# * You may obtain a copy of the License at
+# *
+# *     http://www.apache.org/licenses/LICENSE-2.0
+# *
+# * Unless required by applicable law or agreed to in writing, software
+# * distributed under the License is distributed on an "AS IS" BASIS,
+# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# * See the License for the specific language governing permissions and
+# * limitations under the License.
+# *
+# *
+# * Change History:
+# * 19 Mar 2008 : Initial version created by gary
+# */
+
+_EXPRESSION_BOOLEAN=Expression must be of type 'boolean'
+_EXPRESSION_TYPE_NOT_BOOLEAN=Expression type, for type system '{0}', is not of type 'boolean'
+_NOT_FOUND_PROTOCOL_REFERENCE=Unable to find description with protocol reference '{0}'
+_RAISED_TYPE_NOT_CAUGHT=Raised type '{0}' is not caught within the enclosing definition
+_STATELESS_CONV_SINGLE_IF=Stateless conversations can only have a single top level If construct defining the alternate paths
+_STATELESS_LOCAL_MODEL=Stateless conversations must be located at a role
+_STATELESS_ONLY_TOP_LEVEL=Only top level conversations can be stateless
+_STATELESS_WAIT_STATE_NOT_FIRST_BEHAVIOUR=Waiting behaviour can only be defined as first in stateless path

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.validation/src/java/org/scribble/conversation/validation/ParallelValidationRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.validation/src/java/org/scribble/conversation/validation/ParallelValidationRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.validation/src/java/org/scribble/conversation/validation/ParallelValidationRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,67 @@
+/*
+ * Copyright 2007-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 13 Mar 2008 : Initial version created by gary
+ */
+package org.scribble.conversation.validation;
+
+import org.scribble.validation.*;
+import org.scribble.extensions.*;
+import org.scribble.model.*;
+import org.scribble.model.admin.ModelListener;
+import org.scribble.conversation.model.*;
+
+/**
+ * This class implements the validation rule for the
+ * Parallel construct.
+ */
+ at RegistryInfo(extension=ValidationRule.class,notation=ConversationNotation.NOTATION_CODE)
+public class ParallelValidationRule extends AbstractValidationRule {
+
+	/**
+	 * This is the default constructor.
+	 */
+	public ParallelValidationRule() {
+	}
+
+	/**
+	 * This method determines whether the rule is appropriate for
+	 * the supplied model object.
+	 * 
+	 * @param obj The model object
+	 * @return Whether the rule is appropriate
+	 */
+	public boolean isSupported(ModelObject obj) {
+		return(obj instanceof Parallel);
+	}
+
+	/**
+	 * This method validates the supplied model object.
+	 * 
+	 * @param obj The model object
+	 * @param context The context
+	 * @param l The listener
+	 */
+	public void validate(ModelObject obj, ValidationContext context,
+			ModelListener l) {
+		Parallel elem=(Parallel)obj;
+
+		for (int i=0; i < elem.getBlocks().size(); i++) {
+			context.validate(elem.getBlocks().get(i), l);
+		}
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.validation/src/java/org/scribble/conversation/validation/RaiseValidationRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.validation/src/java/org/scribble/conversation/validation/RaiseValidationRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.validation/src/java/org/scribble/conversation/validation/RaiseValidationRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,105 @@
+/*
+ * Copyright 2007-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 11 Nov 2008 : Initial version created by gary
+ */
+package org.scribble.conversation.validation;
+
+import org.scribble.validation.*;
+import org.scribble.extensions.*;
+import org.scribble.model.*;
+import org.scribble.model.admin.ModelIssue;
+import org.scribble.model.admin.ModelListener;
+import org.scribble.conversation.model.*;
+
+/**
+ * This class implements the validation rule for the
+ * Raise construct.
+ */
+ at RegistryInfo(extension=ValidationRule.class,notation=ConversationNotation.NOTATION_CODE)
+public class RaiseValidationRule extends AbstractValidationRule {
+
+	/**
+	 * This is the default constructor.
+	 */
+	public RaiseValidationRule() {
+	}
+
+	/**
+	 * This method determines whether the rule is appropriate for
+	 * the supplied model object.
+	 * 
+	 * @param obj The model object
+	 * @return Whether the rule is appropriate
+	 */
+	public boolean isSupported(ModelObject obj) {
+		return(obj instanceof Raise);
+	}
+
+	/**
+	 * This method validates the supplied model object.
+	 * 
+	 * @param obj The model object
+	 * @param context The context
+	 * @param l The listener
+	 */
+	public void validate(ModelObject obj, ValidationContext context,
+			ModelListener l) {
+		Raise elem=(Raise)obj;
+
+		if (elem.getType() != null) {
+			boolean f_found=false;
+			
+			// Check that a 'catch' for this type
+			ModelObject act=elem.getParent();
+			
+			while (f_found == false && act != null &&
+					(act instanceof Definition) == false) {
+			
+				if (act instanceof TryEscape) {
+					TryEscape te=(TryEscape)act;
+					
+					for (int i=0; f_found == false &&
+							i < te.getEscapeBlocks().size(); i++) {
+						
+						if (te.getEscapeBlocks().get(i) instanceof CatchBlock &&
+								elem.getType().equals(((CatchBlock)
+									te.getEscapeBlocks().get(i)).getType())) {
+							f_found = true;
+						}
+					}
+				}
+				
+				act = act.getParent();
+			}
+			
+			if (f_found == false) {
+				String text=elem.getType().getAlias();
+				
+				if (elem.getType().getNamespace() != null) {
+					text = "{"+elem.getType().getNamespace()+"}"+text;
+				}
+
+				l.error(new ModelIssue(elem, org.scribble.util.MessageUtil.format(
+						java.util.PropertyResourceBundle.getBundle(
+						"org.scribble.conversation.validation.Messages"),
+							"_RAISED_TYPE_NOT_CAUGHT",
+							new String[]{text})));
+			}
+		}
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.validation/src/java/org/scribble/conversation/validation/TryEscapeValidationRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.validation/src/java/org/scribble/conversation/validation/TryEscapeValidationRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.validation/src/java/org/scribble/conversation/validation/TryEscapeValidationRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,71 @@
+/*
+ * Copyright 2007-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 11 Nov 2008 : Initial version created by gary
+ */
+package org.scribble.conversation.validation;
+
+import org.scribble.validation.*;
+import org.scribble.extensions.*;
+import org.scribble.model.*;
+import org.scribble.model.admin.ModelListener;
+import org.scribble.conversation.model.*;
+
+/**
+ * This class implements the validation rule for the
+ * TryEscape construct.
+ */
+ at RegistryInfo(extension=ValidationRule.class,notation=ConversationNotation.NOTATION_CODE)
+public class TryEscapeValidationRule extends AbstractValidationRule {
+
+	/**
+	 * This is the default constructor.
+	 */
+	public TryEscapeValidationRule() {
+	}
+
+	/**
+	 * This method determines whether the rule is appropriate for
+	 * the supplied model object.
+	 * 
+	 * @param obj The model object
+	 * @return Whether the rule is appropriate
+	 */
+	public boolean isSupported(ModelObject obj) {
+		return(obj instanceof TryEscape);
+	}
+
+	/**
+	 * This method validates the supplied model object.
+	 * 
+	 * @param obj The model object
+	 * @param context The context
+	 * @param l The listener
+	 */
+	public void validate(ModelObject obj, ValidationContext context,
+			ModelListener l) {
+		TryEscape elem=(TryEscape)obj;
+		
+		if (elem.getBlock() != null) {
+			context.validate(elem.getBlock(), l);
+		}
+
+		for (int i=0; i < elem.getEscapeBlocks().size(); i++) {
+			context.validate(elem.getEscapeBlocks().get(i), l);
+		}
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.validation/src/java/org/scribble/conversation/validation/VariableListValidationRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.validation/src/java/org/scribble/conversation/validation/VariableListValidationRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.validation/src/java/org/scribble/conversation/validation/VariableListValidationRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,71 @@
+/*
+ * Copyright 2007-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 9 Mar 2008 : Initial version created by gary
+ */
+package org.scribble.conversation.validation;
+
+import org.scribble.validation.*;
+import org.scribble.extensions.*;
+import org.scribble.model.*;
+import org.scribble.model.admin.ModelListener;
+import org.scribble.conversation.model.*;
+
+/**
+ * This class implements the validation rule for the
+ * VariableList construct.
+ */
+ at RegistryInfo(extension=ValidationRule.class,notation=ConversationNotation.NOTATION_CODE)
+public class VariableListValidationRule extends AbstractValidationRule {
+
+	/**
+	 * This is the default constructor.
+	 */
+	public VariableListValidationRule() {
+	}
+
+	/**
+	 * This method determines whether the rule is appropriate for
+	 * the supplied model object.
+	 * 
+	 * @param obj The model object
+	 * @return Whether the rule is appropriate
+	 */
+	public boolean isSupported(ModelObject obj) {
+		return(obj instanceof VariableList);
+	}
+
+	/**
+	 * This method validates the supplied model object.
+	 * 
+	 * @param obj The model object
+	 * @param context The context
+	 * @param l The listener
+	 */
+	public void validate(ModelObject obj, ValidationContext context,
+			ModelListener l) {
+		VariableList elem=(VariableList)obj;
+
+		if (elem.getType() != null) {
+			context.validate(elem.getType(), l);
+		}
+		
+		for (int i=0; i < elem.getVariables().size(); i++) {
+			context.validate(elem.getVariables().get(i), l);
+		}
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.validation/src/java/org/scribble/conversation/validation/VariableValidationRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.validation/src/java/org/scribble/conversation/validation/VariableValidationRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.validation/src/java/org/scribble/conversation/validation/VariableValidationRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,65 @@
+/*
+ * Copyright 2007-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 9 Mar 2008 : Initial version created by gary
+ */
+package org.scribble.conversation.validation;
+
+import org.scribble.validation.*;
+import org.scribble.extensions.*;
+import org.scribble.model.*;
+import org.scribble.model.admin.ModelListener;
+import org.scribble.conversation.model.*;
+
+/**
+ * This class implements the validation rule for the
+ * Variable construct.
+ */
+ at RegistryInfo(extension=ValidationRule.class,notation=ConversationNotation.NOTATION_CODE)
+public class VariableValidationRule extends AbstractValidationRule {
+
+	/**
+	 * This is the default constructor.
+	 */
+	public VariableValidationRule() {
+	}
+
+	/**
+	 * This method determines whether the rule is appropriate for
+	 * the supplied model object.
+	 * 
+	 * @param obj The model object
+	 * @return Whether the rule is appropriate
+	 */
+	public boolean isSupported(ModelObject obj) {
+		return(obj instanceof Variable);
+	}
+
+	/**
+	 * This method validates the supplied model object.
+	 * 
+	 * @param obj The model object
+	 * @param context The context
+	 * @param l The listener
+	 */
+	public void validate(ModelObject obj, ValidationContext context,
+			ModelListener l) {
+		Variable elem=(Variable)obj;
+
+		// Validate variable
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.validation/src/java/org/scribble/conversation/validation/WhenValidationRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.validation/src/java/org/scribble/conversation/validation/WhenValidationRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.validation/src/java/org/scribble/conversation/validation/WhenValidationRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,67 @@
+/*
+ * Copyright 2007-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 13 Mar 2008 : Initial version created by gary
+ */
+package org.scribble.conversation.validation;
+
+import org.scribble.validation.*;
+import org.scribble.extensions.*;
+import org.scribble.model.*;
+import org.scribble.model.admin.ModelListener;
+import org.scribble.conversation.model.*;
+
+/**
+ * This class implements the validation rule for the
+ * When construct.
+ */
+ at RegistryInfo(extension=ValidationRule.class,notation=ConversationNotation.NOTATION_CODE)
+public class WhenValidationRule extends AbstractValidationRule {
+
+	/**
+	 * This is the default constructor.
+	 */
+	public WhenValidationRule() {
+	}
+
+	/**
+	 * This method determines whether the rule is appropriate for
+	 * the supplied model object.
+	 * 
+	 * @param obj The model object
+	 * @return Whether the rule is appropriate
+	 */
+	public boolean isSupported(ModelObject obj) {
+		return(obj instanceof When);
+	}
+
+	/**
+	 * This method validates the supplied model object.
+	 * 
+	 * @param obj The model object
+	 * @param context The context
+	 * @param l The listener
+	 */
+	public void validate(ModelObject obj, ValidationContext context,
+			ModelListener l) {
+		When elem=(When)obj;
+
+		for (int i=0; i < elem.getConditionalBlocks().size(); i++) {
+			context.validate(elem.getConditionalBlocks().get(i), l);
+		}
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.validation/src/java/org/scribble/conversation/validation/WhileValidationRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.validation/src/java/org/scribble/conversation/validation/WhileValidationRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.validation/src/java/org/scribble/conversation/validation/WhileValidationRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,65 @@
+/*
+ * Copyright 2007-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 13 Mar 2008 : Initial version created by gary
+ */
+package org.scribble.conversation.validation;
+
+import org.scribble.validation.*;
+import org.scribble.extensions.*;
+import org.scribble.model.*;
+import org.scribble.model.admin.ModelListener;
+import org.scribble.conversation.model.*;
+
+/**
+ * This class implements the validation rule for the
+ * While construct.
+ */
+ at RegistryInfo(extension=ValidationRule.class,notation=ConversationNotation.NOTATION_CODE)
+public class WhileValidationRule extends AbstractValidationRule {
+
+	/**
+	 * This is the default constructor.
+	 */
+	public WhileValidationRule() {
+	}
+
+	/**
+	 * This method determines whether the rule is appropriate for
+	 * the supplied model object.
+	 * 
+	 * @param obj The model object
+	 * @return Whether the rule is appropriate
+	 */
+	public boolean isSupported(ModelObject obj) {
+		return(obj instanceof While);
+	}
+
+	/**
+	 * This method validates the supplied model object.
+	 * 
+	 * @param obj The model object
+	 * @param context The context
+	 * @param l The listener
+	 */
+	public void validate(ModelObject obj, ValidationContext context,
+			ModelListener l) {
+		While elem=(While)obj;
+
+		context.validate(elem.getBlock(), l);
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.conversation.validation/src/java/org/scribble/conversation/validation/osgi/Activator.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.validation/src/java/org/scribble/conversation/validation/osgi/Activator.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.validation/src/java/org/scribble/conversation/validation/osgi/Activator.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,48 @@
+package org.scribble.conversation.validation.osgi;
+
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class Activator implements BundleActivator {
+
+	// The plug-in ID
+	public static final String PLUGIN_ID = "org.scribble.conversation.validation";
+
+	// The shared instance
+	private static Activator plugin;
+	
+	/**
+	 * The constructor
+	 */
+	public Activator() {
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+	 */
+	public void start(BundleContext context) throws Exception {
+		plugin = this;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+	 */
+	public void stop(BundleContext context) throws Exception {
+		plugin = null;
+	}
+
+	/**
+	 * Returns the shared instance
+	 *
+	 * @return the shared instance
+	 */
+	public static Activator getDefault() {
+		return plugin;
+	}
+
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/.classpath
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/.classpath	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/.classpath	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="src" path="src/java"/>
+	<classpathentry kind="src" path="src/test"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/3"/>
+	<classpathentry kind="output" path="classes"/>
+</classpath>

Added: tools/eclipse/trunk/plugins/org.scribble.core/.project
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/.project	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/.project	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>org.scribble.core</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.ManifestBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.SchemaBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.pde.PluginNature</nature>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+	</natures>
+</projectDescription>

Added: tools/eclipse/trunk/plugins/org.scribble.core/Issues.txt
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/Issues.txt	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/Issues.txt	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,595 @@
+TODO:
+
+JUnit tests?
+
+Documentation?
+
+Finished protocol notation
+
+Conversation model language - constructs mapped from protocol.
+
+Conformance checking - need to deal with order change on different same role but different channels. Order may only be irrelevant when two interactions to same channel are in sequence?
+
+Type analysis from paper as research or experimental
+
+Java receive on channel - use it in conformance with name mapping
+- channel name mapping should be done in the definition - so language mapping may
+need an annotation. Conversation to protocol could use bind parameters. This was
+is predicatable - just adding name maps adhoc is risky.
+- need to remove the pushNameMap from conformance context interface - issue is how
+this can be kept protected, unless have a secondary (internal) interface derived
+from the context that can be cast?
+
+Handle inline conversation paths defined in spawn and other methods
+Handle receives on declaration lines
+
+
+Mapping of role names -- when 'implements' used between two local notations,
+should be able to use the name mapping between the located roles. e.g.
+conv X at Buyer3 implements Y at Buyer2 should be able to map Buyer3 to Buyer2 without
+having a 'for' clause.
+
+Receives on different channels being in parallel:
+-from conformance point of view, think they should still be handled in sequence
+-just means that the underlying transports can receive and buffer the messages
+ in any order, but would be too complex for user to understand implications if
+ the statements also occurred in parallel?
+
+Conformance checking of channel - need to deal with name mapping.
+
+Local projection of receive - should be based only on local role: e.g.
+BuyerSeller at Buyer should have
+Invoice to Buyer;
+rather than: Invoice from Seller
+as local receiver should not need to know which role it is receiving from?
+So receive is determined by the fact that the 'to' role is the same as
+the local projected role.
+
+
+Need to decide how to manage references for Java files - should really use
+the Java classpath. Then the dependency between the BuyerApp classes and
+the ConversationState based classes can be 'uses' dependency, with the
+reference based on the namespace of the Java class.
+
+
+Need to see if scope/state can be managed by the context in
+projector, as it is in validation, rather than rules having to
+do it.
+
+Need to replace validation control by rule driven guidance, so
+different rules can be invoked in different states, as appropriate.
+For example, when the conversations contained within a JavaLangModel
+are validated, need to set the validation context to be located
+at whatever role is associated with the conversation, before
+validating the conversation.
+
+
+Language idea:
+Perhaps the conversation name (+location) could be associated with a data container
+class that provides the access to the state. The instance of this class could then
+be passed between paths that is executing the activities. Then issues to do
+with synchronization can be controlled by the developer. Means that local variables
+do not need to be used, which could not be persisted, and would be a problem passing
+between concurrently executed paths, unless made final, which is not ideal.
+- also the contents of the data container could be verified against the endpoint
+projection to ensure that all 'observable' and 'silent' variables are available.
+Silent variables are those that do not have a set method. However annotations
+could also be used to enable validation to ensure that methods are not changing
+state unnecessarily.
+- these containers may need references to session instances (which is what they
+effectively represent) related to bound information. Need to determine whether
+changes to a bound variable are visible in the calling session, and whether there
+are any synchronisation issues to deal with
+- allow Conversation to be typed to the container class, as well as the container
+class identifying the conversation name (and role) through an annotation
+- state can also provide the roles
+- issue - if the same state or role name are used in different scopes within a
+conversation definition, then they will need to be distinguished as separate values
+so may need to add a numerical suffix - but then also need to check from a consistency
+perspective that they represent the same thing. Name binding? possibly another
+annotation? Just need to ensure the modified name is consistently used within the
+separate scopes.
+
+
+Need to look at different ways to extend the notations to see if supported
+- may lead to guidelines for others to follow
+
+'when' is like a sequence with a synchronization point - so from a conformance
+perspective it should not be treated as conditional, like an 'if'.
+
+If Java class does not have an annotation to record its scribble type, then
+could make assumption that its scribble type has the same namespace as the
+package and same name as the class/interface.
+
+
+When project opened, appears to validate based on added order - so was not finding
+types, but this should be resolved when the type files are added? May be due to
+detachment with no actual interface file (i.e. stp file).
+
+
+
+Issue - if model rep requested with particular notation, then looks in details
+for that notation - however if the implementation is not associated with a
+notation, then it should share the one associated with the NotationDetails
+for the 'null' notation
+
+
+Conformance checking:
+1) when dealing with a reference description, need to be able to check for
+sub-contract conformance (i.e. where decision is taken on main description,
+but fewer options are decided - however if default option is available then
+this makes the other options relevant).
+
+Checking between different structures:
+interaction A->B;
+interaction B->C;
+// other interactions
+
+against
+parallel {
+   interaction A->B;
+} and {
+   interaction B->C;
+}
+// other interactions
+
+or
+interaction A->B;
+choice {
+	interaction B->C;
+} or {
+	interaction B->C;
+}
+// other interactions
+
+
+
+==================================================================
+
+
+Need to provide quickfix processor for link between global and local models
+
+
+** move refactor problem - but test other refactoring aswell
+
+- need to start example project
+- see about doing comparison between protocol and conversation?
+
+DefaultComparator - when a local model is requested from MRep.getModel,
+but does not exist, so it returns a projection of a persisted global model,
+what reference should be passed to the comparator context - what is
+it used for? Gets stored, but not sure where used.
+
+
+dependency notification - if a global model is updated, then need to notify any
+model ref that is dependent upon one of its conformsTo references. Similarly, if
+a 'useImplementation' type reference is updated, then need to notify any
+model refs that are dependent upon the generic type that is implemented by the
+changed ref.
+- done for global->local models, but still need to do for 'implements'
+where useImplementations is involved
+- issue is that references appear to be cleared and built up one
+by one, so need to see how can deal with this - plus when Type
+annotation removed, it does not realise link has gone
+
+
+
+if comformance to local model, and only global model is persisted,
+then do projection to get local model - but need to see how this
+would be reported.
+
+
+Need to associate condition with ConditionBlock - should
+probably be separate parser rule to enable reuse.
+
+
+
+
+Need to change isSupported methods to put class first- e.g. Model.class.isAssignableFrom(type)
+
+Project based references
+conformsTo link between global and local models where not same name or roles
+text projection possibly make generic with rules checking if output types supported?
+inner model projection may result in multiple projections for different roles
+
+ConformsTo mechanism - global model links to local model, the local model name
+identifies the located role in that model, but the issue is that the construct
+does not indicate which role in the global model maps onto that local model role.
+Could be done by including the mapping in the bind list - but this would mean
+duplication in the role in the 'conformsTo' construct. If it is not specified,
+then it may indicate that the roles were the same in both models, but just the
+model names are different. Other approach is to make the conforms statement
+on the global model role,
+role Buyer2 conformsTo example2b at Buyer(Seller2 for Seller);
+- doesn't look right??
+
+
+
+ISSUE:
+Need to sort out how Run and ProtocolReference relate to inner and inline protocols.
+At the moment ProtocolReference has an inner protocol, but so has Run. Really the
+reference should just be that, and the Run should have an inline protocol and
+some way to indicate whether a reference is to an inner protocol.
+
+
+Modelling project - could use the classes in the generic scribble.model
+package to define language independent 'super structure' for conversations.
+
+TODO:
+1) mapping of roles between run protocols - use in comparator
+2) explicit relationship between local and global models, based on 'implements' or
+'conforms' statement - use mapping information in comparator
+3) Refactoring move - need to update dependent references as namespace would have
+changed
+
+Need to deal with files, in the same namespace, across different projects.
+Potentially need to partition dependency manager by project? or possibly the
+model reference needs to be qualified by project?
+
+Refactoring problem - appears to be where description is renamed and then
+renamed back.
+
+
+
+
+
+Name mapping between compared definitions and also as moving through sub-behaviour lists
+
+Text generation from model
+
+
+
+
+
+
+Split protocol areas into separate plugins, so model, parsing, validation,
+comparison, projection etc are all separately installed (and can be replaced).
+
+
+
+-> refactoring - if name change, then could change the names of normal
+references. However if the name is related to a global or local model, and
+the alternate global/local model is also present, then need to handle in
+a different way? Should all of the global and local names change consistently?
+Should the link between global and local be made explicit, rather than implicit
+based on name?
+
+
+
+
+Define some example plugin projects that show extending the notations and adding
+new notations as examples. And also projects for analysis tools.
+- if role list and role move to the core plugin, have an example
+derived participant parsing rule that overrides the standard rule, to include
+additional information.
+
+
+
+
+ParserContext:
+
+Currently has a 'located role' property that returns the role
+name. Should it return the role object?
+
+
+
+
+ProtocolModel/Protocol - currently Protocol validates that same name as
+file - but if inner protocols, then would not work - but would be better if
+generic approach that works for all notations.
+
+
+
+DOCUMENTATION:
+
+Need to make copy of scope for background validation tasks, so is not affected
+by foreground validation - but also means any changes will only be
+relevant in scope of current background task
+
+
+
+
+
+CONVERSATION/LANGUAGE:
+
+if @ Buyer () {
+
+} else {
+
+} else {
+
+}
+
+(at buyer)
+if (c1.decision(val < 100)) {
+
+} else if (c1.decision(val < 200)) {
+
+} else {
+
+}
+
+(at seller)
+if (c1.decisionAt(buyer)) {
+
+} else if (c1.decisionAt(buyer)) {
+
+} else {
+
+}
+
+or 
+
+switch(c1.decisionAt(buyer)) {
+case 0:
+case 1:
+default:
+}
+
+
+
+JAVA: 
+		// If decision is communicated, then each endpoint will be in sync,
+		// otherwise decision needs to be inferred based on knowledge of
+		// which message is received at each path - means also that the
+		// conversation state must be maintained within the conversation -
+		// which also means that the conversation state may need to have
+		// a persistence engine behind it?
+		
+		/*
+		c1.concurrent(new ConcurrentPath[]{
+				new ConcurrentPath() {
+					public void run() {
+					}
+				},
+				new ConcurrentPath() {
+					public void run() {
+					}
+				}
+		}, null);
+		*/
+
+
+
+============================================================================
+GLOBAL ESCAPE:
+
+In protocol,
+
+try {
+	....
+} catch(Confirmed from Seller to Buyer) {
+	...
+} catch(...) {
+	...
+}
+
+The signature indicates that if the interaction occurs while inside the
+try block, then it should interrupt any activities in that block and perform
+the activities in the catch block instead.
+
+Initially thought of this as similar to throwing exceptions, so thought the
+conversation and implementations would have the actual interaction in the
+try block, and when it occurred it would be similar to an exception being
+thrown.
+
+However in a cris-cross situation, this would require the activities in the
+try block to have a choice located at different roles for each path, as this
+is the only way that the cross over could occur - i.e. each role making an
+independent decision to enact their path before being informed that the other
+role has enacted a different path.
+
+Therefore we don't have a construct to support this type of choice, as
+all decisions must be located at one or more roles, but those roles are
+consistent across all paths of the choice.
+
+The other way to view the conversation/implementation of this construct is
+in a similar way to the protocol. The 'try' block is the initial path
+being executed, but each catch block is a separate thread that is waiting
+for a communication to occur, and if it does, then the initial path is
+interrupted.
+
+In one respect, the use of the try/catch syntax is appropriate, as it implies
+that something will cause the execution of the 'try' activities to terminate
+abruptly, executing a suitable handler (catch) block to deal with the issue.
+However a try block may deal with exceptions with any of the activities it
+contains, whereas this construct can only be interrupted if the first interaction
+does not fully complete. However after the first interaction is sent and
+received by the target role, then the interrupt handlers are no longer relevant.
+So it has different semantics to a try/catch block.
+
+May be better to model as:
+
+do {
+	Cancel from Buyer to Seller;
+	CancelDelivery from Seller to Shipper;
+	CancelConfirmed from Seller to Buyer; // must ack back to potential
+										// interrupted role, so that knows
+										// can complete block
+} interrupt {
+	channel ch1 at Buyer, ch2 at Shipper;
+	Confirmed from Seller to Buyer via ch1; // can't use same channel
+	DeliveryInstructions from Seller to Shipper via ch2; // can't use same channel
+}
+
+benefit of this approach, defined in the conversation, is that it could be
+conformance checked against:
+
+choice {
+	...
+} or {
+	Confirmed from Seller to Buyer;
+	DeliveryInstructions from Seller to Shipper;
+}
+
+although there is the issue of location of the choice - possibly located at both
+roles? and then the conversation refines this locatedness?
+
+Rather than making the interrupting interaction part of the definition of the
+interrupt, it can be inferred as the first interaction in the block. The benefit
+is that its possible then to locally define the channels that may be required.
+Downside is that it is not so explicit. However if explicit is required, then
+possibly the relevant interaction in the 'try/do' block should also be made
+explicit?
+
+Could also have a 'timeout' instead of interrupt - possibly both the interrupt
+and timeout should be located.
+
+Is there a better word the 'do' which may be linked to 'do/while'?
+
+Issue - when does the scope of the 'do' finish, and therefore cause the interrupts
+to be de-installed? Need to understand any constraints that need to be satisfied
+for the mechanism to work.
+
+NOTE 1: Cris-cross is only on the first interaction in each block, and can only
+be between two roles. Once this interaction has occurred at both roles, then the
+interrupts should be disabled.
+
+NOTE 2: The role sending the first message in the 'do' must also receive a message
+from the other role, to act as an acknowledgement so that it knows the interrupt
+handlers can be de-installed and won't occur. The message can actually come from
+any role, as long as their is a direct or indirect causal link to the message
+that was first sent out.
+
+NOTE 3: Timeout applies between the first and last interaction associated with the
+role at which the timeout is located - so the 'do' block must have atleast two
+interactions for that role, although potential an interaction to start the 'do'
+block followed by a 'when' may be enough - but something needs to modify the state
+on which the 'when' is blocking, which would tend to be an interaction.
+
+NOTE 4: First sending role in try/do block should not be able to send another
+message until it has received a message from another role that was directly or
+indirectly caused by the message it sent. This is to prevent other interactions
+occurring that would need to be "unwound" if the interrupt (cris-cross) occurred. 
+
+
+Issue with this mechanism - the 'catch/interrupt' blocks need to use separate
+channels. The problem is that if there are activities following the whole
+activity, then which channel does it use. If it uses the default channels, then
+there is no causality with the interactions in the interrupt block (I believe) -
+i.e. it lacks synchronisation with the completion of the interrupt block.
+
+
+Maybe the 'interrupt' section should be similar to timeout - being able to
+interrupt the main section at any point - as this is more general. But still
+have problem (as with interrupt) of knowing when the main block should be
+considered finished and therefore the interrupt/timeout should be disabled.
+Also means that all participants in the main block have to be aware of the
+interaction to them, that would cause the interrupt/timeout to become relevant.
+
+However, the cancel pattern situation (or cris-cross) is more specific, it is
+based on two alternative sets of actions that could occur depending on which
+interaction occurs. Possibly have another aspect to the do-interrupt-timeout
+block, which enables these alternate outcomes to be listed:
+
+do {
+	Cancel from Buyer to Seller;
+	Cancelled from Seller to Buyer
+} or {
+	Confirm from Seller to Buyer;
+} interrupt {
+	....
+} timeout(...) {
+	...
+}
+
+Maybe its just the case that each interrupt or timeout block will have a
+decision maker. This role will know that the interrupt or timeout has
+occurred - however the other roles may not. To address this, the interactions
+within the interrupt/timeout must inform each other role, and also the
+interactions following the 'do' must also inform those roles that the interrupt/
+timeout blocks have not occurred.
+
+This seems to suggest that if the 'do' block has multiple interrupt or
+timeout blocks, that they are all located at the same role.
+
+Then the issue is, what is the contents of the do? Does it matter? Don't
+think so, as the end of the 'do' block at each role will wait pending the
+occurrence of an interaction to the role, whether from one of the blocks,
+or from the following interactions.
+
+The other approach is that, if the final interaction in the 'do' block is
+back to the interrupting/timeout role, then this could be used to stop
+the interrupts/timeout. However the cris-cross situation could occur, where
+the sending role sends the final interaction in the do block, but the
+interrupt/timeout could occur after this send, before it has been received
+by the interrupting role. Still does not guarantee other roles know whether
+the blocks have completed anyway - so best approach is the subsequent
+interactions. Issue is that it may not be approach to define these following
+interactions for a protocol - but they may be the only way to know that
+the conversation has finished in a normal way.
+
+Or possibly the use the 'finally' approach to indicate where the interrupt/timeout
+are no longer relevant, although this is the same as having the interactions
+after the do construct. The only different situation would be if the 'finally'
+block did not have exactly the same semantics as in the Java try/catch construct -
+so the contents of the 'finally' block are only performed if the do block contents
+are not interrupted/timedout. So if the interrupt/timeout occurs, they will
+not invoke the 'finally' block contents.
+- would have same constaint - that all roles in the do block must be notified
+by the decision maker (directly or indirectly) that in the 'finally' block
+
+
+============================================================================
+
+
+From BuyerApp2:
+
+	// Issue - they can't be message handlers, as more than
+	// one message may occur during a selection? Unless the
+	// select has a path per message? Problem is that other
+	// activities may be defined before the message(s), which
+	// may be common to multiple messages in the same
+	// path.
+	
+	// What about where there are no activities for a role in
+	// one of the paths, so the choice may be optional - how
+	// do we know when to do the join path? Possibly the
+	// optional path becomes associated with the messages that
+	// are actually in the join path, and the optional path
+	// does nothing.
+	
+	// Need to consider what can be achieved with these
+	// descriptions.
+	// - can extract endpoint behaviour from the source code
+	// - what about runtime?
+	// - if runtime is monitoring state, along with the
+	//   execution, and has access to the behaviour description
+	//   of the role, then it would know which path is appropriate
+	//   for a message type being received. Same as Ray's
+	//   idea of defining the protocol and using it to configure
+	//   the socket?
+	// - with Ray's approach, the path selection is explicit.
+	//   However it requires communication of that decision
+	//   token, and requires that those tokens be common
+	//   across the implementations.
+	// - Documented approach does not require the additional
+	//   control message, although at implementation time it
+	//   could be generated, but using the message type as the
+	//   selector - does not require additional values with
+	//   the potential mapping problems.
+	// - Concept of the tokens is not present in the protocol
+	//   or (so far) in the conversation notation
+	
+	
+From SellerApp1.java:
+
+
+
+// External choice represents complete set of options, with
+// positional information, or an understanding of the messages
+// that may occur to select a path.
+
+// The other possibility is that if path selected, then maybe
+// it enables each path to observe the same channel and still
+// be linear. However, if the message type is used as the
+// selector, then it would still work?
+
+// Sending control signals could deal with situations where
+// there are no messages going to the role in that path. However
+// this would not deal with situations where the control signal
+// could not be sent
+
+
+
+

Added: tools/eclipse/trunk/plugins/org.scribble.core/LICENSE.txt
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/LICENSE.txt	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/LICENSE.txt	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,201 @@
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.

Added: tools/eclipse/trunk/plugins/org.scribble.core/META-INF/MANIFEST.MF
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/META-INF/MANIFEST.MF	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/META-INF/MANIFEST.MF	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,98 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Scribble Plug-in
+Bundle-SymbolicName: org.scribble.core;singleton:=true
+Bundle-Version: 0.1.0.qualifier
+Bundle-Activator: org.scribble.osgi.Activator
+Bundle-Vendor: www.scribble.org
+Bundle-ActivationPolicy: lazy
+Import-Package: org.osgi.framework;version="1.3.0"
+Export-Package: org.scribble.comparator,
+ org.scribble.editor,
+ org.scribble.export,
+ org.scribble.export.monitor,
+ org.scribble.export.stream,
+ org.scribble.export.text,
+ org.scribble.extensions,
+ org.scribble.model,
+ org.scribble.model.admin,
+ org.scribble.model.analysis,
+ org.scribble.model.change,
+ org.scribble.model.resolutions,
+ org.scribble.model.types,
+ org.scribble.model.util,
+ org.scribble.parser,
+ org.scribble.projector,
+ org.scribble.util,
+ org.scribble.validation
+Scribble-Extensions: org.scribble.model.TypeNotation,
+  org.scribble.parser.DefaultTokenizer,
+  org.scribble.parser.DefaultParser,
+  org.scribble.parser.NamespaceParserRule,
+  org.scribble.parser.ImportParserRule,
+  org.scribble.parser.ModelNameParserRule,
+  org.scribble.parser.RoleListParserRule,
+  org.scribble.parser.ConformanceReferenceParserRule,
+  org.scribble.parser.TypeReferenceParserRule,
+  org.scribble.parser.ChannelListParserRule,
+  org.scribble.parser.MessageSignatureParserRule,
+  org.scribble.parser.InteractionParserRule,
+  org.scribble.model.change.DefaultModelGenerator,
+  org.scribble.model.analysis.DefaultLookaheadAnalyser,
+  org.scribble.model.analysis.BlockLookaheadRule,
+  org.scribble.model.analysis.InteractionLookaheadRule,
+  org.scribble.model.analysis.SinglePathBehaviourLookaheadRule,
+  org.scribble.model.analysis.MultiPathBehaviourLookaheadRule,
+  org.scribble.model.analysis.ModelIncludeLookaheadRule,
+  org.scribble.model.filter.DefaultModelFilter,
+  org.scribble.model.types.DefaultTypeResolver,
+  org.scribble.validation.DefaultValidator,
+  org.scribble.validation.InteractionValidationRule,
+  org.scribble.validation.MessageSignatureValidationRule,
+  org.scribble.validation.ModelValidationRule,
+  org.scribble.validation.BlockValidationRule,
+  org.scribble.validation.ModelReferenceValidationRule,
+  org.scribble.validation.ChannelListValidationRule,
+  org.scribble.validation.ChannelValidationRule,
+  org.scribble.validation.RoleListValidationRule,
+  org.scribble.validation.RoleValidationRule,
+  org.scribble.validation.TypeReferenceValidationRule,
+  org.scribble.comparator.BlockComparatorRule,
+  org.scribble.comparator.DefaultComparator,
+  org.scribble.comparator.GlobalToLocalModelComparatorRule,
+  org.scribble.comparator.LocalToLocalModelComparatorRule,
+  org.scribble.comparator.RoleComparatorRule,
+  org.scribble.comparator.ChannelComparatorRule,
+  org.scribble.comparator.NamespaceComparatorRule,
+  org.scribble.comparator.InteractionComparatorRule,
+  org.scribble.comparator.MessageSignatureComparatorRule,
+  org.scribble.comparator.TypeReferenceComparatorRule,
+  org.scribble.projector.DefaultProjector,
+  org.scribble.projector.NamespaceProjectorRule,
+  org.scribble.projector.ImportProjectorRule,
+  org.scribble.projector.ConformanceReferenceProjectorRule,
+  org.scribble.projector.ImplementsReferenceProjectorRule,
+  org.scribble.projector.TypeReferenceProjectorRule,
+  org.scribble.projector.LocatedNameProjectorRule,
+  org.scribble.projector.BlockProjectorRule,
+  org.scribble.projector.RoleListProjectorRule,
+  org.scribble.projector.RoleProjectorRule,
+  org.scribble.projector.ChannelListProjectorRule,
+  org.scribble.projector.InteractionProjectorRule,
+  org.scribble.projector.MessageSignatureProjectorRule,
+  org.scribble.export.DefaultExporter,
+  org.scribble.export.text.NamespaceTextExportRule,
+  org.scribble.export.text.ImportTextExportRule,
+  org.scribble.export.text.ChannelListTextExportRule,
+  org.scribble.export.text.ChannelTextExportRule,
+  org.scribble.export.text.RoleListTextExportRule,
+  org.scribble.export.text.RoleTextExportRule,
+  org.scribble.export.text.ConformanceReferenceTextExportRule,
+  org.scribble.export.text.ImplementsReferenceTextExportRule,
+  org.scribble.export.text.TypeReferenceTextExportRule,
+  org.scribble.export.text.BlockTextExportRule,
+  org.scribble.export.text.MessageSignatureTextExportRule,
+  org.scribble.export.text.InteractionTextExportRule,
+  org.scribble.export.text.ModelNameTextExportRule
+Require-Bundle: org.scribble.monitor;resolution:=optional
+

Added: tools/eclipse/trunk/plugins/org.scribble.core/build.properties
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/build.properties	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/build.properties	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,5 @@
+source.. = src/java/
+output.. = classes/
+bin.includes = META-INF/,\
+               .,\
+               plugin.xml

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/comparator/BlockComparatorRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/comparator/BlockComparatorRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/comparator/BlockComparatorRuleTest.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/comparator/BlockComparatorRuleTest.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/comparator/ChannelComparatorRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/comparator/ChannelComparatorRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/comparator/ChannelComparatorRuleTest.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/comparator/ChannelComparatorRuleTest.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/comparator/Comparator.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/comparator/Comparator.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/comparator/ComparatorContext.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/comparator/ComparatorContext.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/comparator/ComparatorRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/comparator/ComparatorRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/comparator/DefaultComparator.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/comparator/DefaultComparator.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/comparator/DefaultComparatorContext.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/comparator/DefaultComparatorContext.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/comparator/DefaultNameMap.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/comparator/DefaultNameMap.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/comparator/DefaultNameMapTest.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/comparator/DefaultNameMapTest.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/comparator/GlobalToLocalModelComparatorRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/comparator/GlobalToLocalModelComparatorRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/comparator/GlobalToLocalModelComparatorRuleTest$1.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/comparator/GlobalToLocalModelComparatorRuleTest$1.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/comparator/GlobalToLocalModelComparatorRuleTest$10.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/comparator/GlobalToLocalModelComparatorRuleTest$10.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/comparator/GlobalToLocalModelComparatorRuleTest$11.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/comparator/GlobalToLocalModelComparatorRuleTest$11.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/comparator/GlobalToLocalModelComparatorRuleTest$12.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/comparator/GlobalToLocalModelComparatorRuleTest$12.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/comparator/GlobalToLocalModelComparatorRuleTest$2.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/comparator/GlobalToLocalModelComparatorRuleTest$2.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/comparator/GlobalToLocalModelComparatorRuleTest$3.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/comparator/GlobalToLocalModelComparatorRuleTest$3.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/comparator/GlobalToLocalModelComparatorRuleTest$4.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/comparator/GlobalToLocalModelComparatorRuleTest$4.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/comparator/GlobalToLocalModelComparatorRuleTest$5.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/comparator/GlobalToLocalModelComparatorRuleTest$5.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/comparator/GlobalToLocalModelComparatorRuleTest$6.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/comparator/GlobalToLocalModelComparatorRuleTest$6.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/comparator/GlobalToLocalModelComparatorRuleTest$7.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/comparator/GlobalToLocalModelComparatorRuleTest$7.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/comparator/GlobalToLocalModelComparatorRuleTest$8.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/comparator/GlobalToLocalModelComparatorRuleTest$8.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/comparator/GlobalToLocalModelComparatorRuleTest$9.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/comparator/GlobalToLocalModelComparatorRuleTest$9.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/comparator/GlobalToLocalModelComparatorRuleTest.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/comparator/GlobalToLocalModelComparatorRuleTest.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/comparator/InteractionComparatorRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/comparator/InteractionComparatorRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/comparator/InteractionComparatorRuleTest.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/comparator/InteractionComparatorRuleTest.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/comparator/LocalToLocalModelComparatorRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/comparator/LocalToLocalModelComparatorRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/comparator/MessageSignatureComparatorRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/comparator/MessageSignatureComparatorRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/comparator/MessageSignatureComparatorRuleTest.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/comparator/MessageSignatureComparatorRuleTest.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/comparator/Messages.properties
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/comparator/Messages.properties	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/comparator/Messages.properties	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,26 @@
+# /*
+# * Copyright 2007 Pi4 Technologies Ltd
+# *
+# * Licensed under the Apache License, Version 2.0 (the "License");
+# * you may not use this file except in compliance with the License.
+# * You may obtain a copy of the License at
+# *
+# *     http://www.apache.org/licenses/LICENSE-2.0
+# *
+# * Unless required by applicable law or agreed to in writing, software
+# * distributed under the License is distributed on an "AS IS" BASIS,
+# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# * See the License for the specific language governing permissions and
+# * limitations under the License.
+# *
+# *
+# * Change History:
+# * 27 Nov 2007 : Initial version created by gary
+# */
+
+_CHANNEL_MISMATCH=Channel mismatch, found '{0}' but expecting '{1}'
+_INTERACTION_DIRECTION_MISMATCH=Interactions have incompatible directions
+_MSIG_MISMATCH=Message signature mismatch with referenced description, was expecting '{0}'
+_ROLE_MISMATCH=Role mismatch, found '{0}' but expecting '{1}'
+_TYPE_MISMATCH=Type mismatch with referenced description, was expecting '{0}'
+_UNEXPECTED_BEHAVIOUR=Behaviour not present in referenced description

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/comparator/NameMap.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/comparator/NameMap.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/comparator/NamespaceComparatorRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/comparator/NamespaceComparatorRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/comparator/NamespaceComparatorRuleTest.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/comparator/NamespaceComparatorRuleTest.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/comparator/RoleComparatorRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/comparator/RoleComparatorRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/comparator/RoleComparatorRuleTest.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/comparator/RoleComparatorRuleTest.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/comparator/TestComparatorRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/comparator/TestComparatorRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/comparator/TypeReferenceComparatorRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/comparator/TypeReferenceComparatorRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/comparator/TypeReferenceComparatorRuleTest.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/comparator/TypeReferenceComparatorRuleTest.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/editor/AbstractEditorManager.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/editor/AbstractEditorManager.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/editor/EditorManager.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/editor/EditorManager.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/export/AbstractFormatter.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/export/AbstractFormatter.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/export/DefaultExporter.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/export/DefaultExporter.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/export/DefaultExporterContext.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/export/DefaultExporterContext.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/export/ExportRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/export/ExportRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/export/Exporter.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/export/Exporter.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/export/ExporterContext.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/export/ExporterContext.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/export/Formatter.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/export/Formatter.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/export/monitor/AbstractModelMonitorExportRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/export/monitor/AbstractModelMonitorExportRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/export/monitor/MonitorFormatter.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/export/monitor/MonitorFormatter.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/export/stream/AbstractModelStreamExportRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/export/stream/AbstractModelStreamExportRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/export/stream/StreamFormatter.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/export/stream/StreamFormatter.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/export/text/AbstractBlockTextExportRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/export/text/AbstractBlockTextExportRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/export/text/AbstractModelReferenceTextExportRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/export/text/AbstractModelReferenceTextExportRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/export/text/AbstractModelTextExportRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/export/text/AbstractModelTextExportRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/export/text/BlockTextExportRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/export/text/BlockTextExportRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/export/text/ChannelListTextExportRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/export/text/ChannelListTextExportRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/export/text/ChannelTextExportRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/export/text/ChannelTextExportRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/export/text/ConformanceReferenceTextExportRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/export/text/ConformanceReferenceTextExportRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/export/text/ImplementsReferenceTextExportRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/export/text/ImplementsReferenceTextExportRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/export/text/ImportTextExportRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/export/text/ImportTextExportRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/export/text/InteractionTextExportRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/export/text/InteractionTextExportRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/export/text/MessageSignatureTextExportRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/export/text/MessageSignatureTextExportRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/export/text/ModelNameTextExportRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/export/text/ModelNameTextExportRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/export/text/NamespaceTextExportRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/export/text/NamespaceTextExportRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/export/text/RoleListTextExportRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/export/text/RoleListTextExportRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/export/text/RoleTextExportRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/export/text/RoleTextExportRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/export/text/TextFormatter.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/export/text/TextFormatter.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/export/text/TypeReferenceTextExportRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/export/text/TypeReferenceTextExportRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/extensions/AbstractRegistry$NotationDetails.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/extensions/AbstractRegistry$NotationDetails.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/extensions/AbstractRegistry.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/extensions/AbstractRegistry.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/extensions/AbstractRegistryTest$NotationA.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/extensions/AbstractRegistryTest$NotationA.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/extensions/AbstractRegistryTest$NotationB.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/extensions/AbstractRegistryTest$NotationB.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/extensions/AbstractRegistryTest$NotationC.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/extensions/AbstractRegistryTest$NotationC.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/extensions/AbstractRegistryTest$TestExtension.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/extensions/AbstractRegistryTest$TestExtension.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/extensions/AbstractRegistryTest$TestExtensionAImpl.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/extensions/AbstractRegistryTest$TestExtensionAImpl.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/extensions/AbstractRegistryTest$TestExtensionBImpl.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/extensions/AbstractRegistryTest$TestExtensionBImpl.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/extensions/AbstractRegistryTest.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/extensions/AbstractRegistryTest.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/extensions/ClasspathRegistry.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/extensions/ClasspathRegistry.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/extensions/OSGiRegistry.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/extensions/OSGiRegistry.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/extensions/Registry.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/extensions/Registry.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/extensions/RegistryException.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/extensions/RegistryException.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/extensions/RegistryFactory.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/extensions/RegistryFactory.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/extensions/RegistryInfo.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/extensions/RegistryInfo.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/extensions/TestRegistry.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/extensions/TestRegistry.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/extensions/TestSingleExtensionRegistry.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/extensions/TestSingleExtensionRegistry.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/extensions/TestTypeMapRegistry.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/extensions/TestTypeMapRegistry.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/extensions/test/Extension1.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/extensions/test/Extension1.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/extensions/test/Extension1Rule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/extensions/test/Extension1Rule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/extensions/test/Extension1Rule_Derived_SN1A.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/extensions/test/Extension1Rule_Derived_SN1A.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/extensions/test/Extension1Rule_MN1.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/extensions/test/Extension1Rule_MN1.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/extensions/test/Extension1Rule_MN2.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/extensions/test/Extension1Rule_MN2.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/extensions/test/Extension1Rule_SN1A.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/extensions/test/Extension1Rule_SN1A.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/extensions/test/MainNotation1.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/extensions/test/MainNotation1.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/extensions/test/MainNotation2.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/extensions/test/MainNotation2.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/extensions/test/SubNotation1A.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/extensions/test/SubNotation1A.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/AbstractNotation.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/AbstractNotation.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/Activity.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/Activity.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/Annotations.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/Annotations.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/Behaviour.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/Behaviour.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/Block.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/Block.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/Channel.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/Channel.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/ChannelList.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/ChannelList.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/ConformanceReference.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/ConformanceReference.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/ContainmentList.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/ContainmentList.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/Declaration.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/Declaration.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/DeclarationBinding.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/DeclarationBinding.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/Definition.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/Definition.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/ImplementsReference.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/ImplementsReference.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/Import.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/Import.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/Interaction.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/Interaction.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/InteractionTest$1.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/InteractionTest$1.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/InteractionTest$2.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/InteractionTest$2.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/InteractionTest$3.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/InteractionTest$3.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/InteractionTest$4.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/InteractionTest$4.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/InteractionTest.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/InteractionTest.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/LocatedName.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/LocatedName.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/MessageSignature.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/MessageSignature.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/Model$1.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/Model$1.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/Model.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/Model.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/ModelInclude.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/ModelInclude.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/ModelObject.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/ModelObject.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/ModelObjectTest$Bottom.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/ModelObjectTest$Bottom.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/ModelObjectTest$Middle.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/ModelObjectTest$Middle.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/ModelObjectTest$Top.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/ModelObjectTest$Top.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/ModelObjectTest.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/ModelObjectTest.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/ModelReference.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/ModelReference.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/ModelReferenceTest.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/ModelReferenceTest.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/ModelTest$Bottom.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/ModelTest$Bottom.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/ModelTest$Middle.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/ModelTest$Middle.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/ModelTest$TopModel.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/ModelTest$TopModel.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/ModelTest.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/ModelTest.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/MultiPathBehaviour.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/MultiPathBehaviour.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/NameMappingReference.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/NameMappingReference.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/Namespace.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/Namespace.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/Notation.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/Notation.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/OrderingConstraint.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/OrderingConstraint.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/Reference.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/Reference.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/Role.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/Role.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/RoleList.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/RoleList.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/SinglePathBehaviour.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/SinglePathBehaviour.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/SourceRef.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/SourceRef.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/Statement.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/Statement.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/SubDefinitionPath.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/SubDefinitionPath.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/TestDefinition.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/TestDefinition.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/TestModel.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/TestModel.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/TestMultiPathBehaviour.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/TestMultiPathBehaviour.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/TestSinglePathBehaviour.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/TestSinglePathBehaviour.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/TypeModel.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/TypeModel.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/TypeNotation.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/TypeNotation.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/TypeReference.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/TypeReference.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/Visitor.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/Visitor.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/admin/AbstractDependencyManager$1.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/admin/AbstractDependencyManager$1.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/admin/AbstractDependencyManager$DependencyInfo.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/admin/AbstractDependencyManager$DependencyInfo.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/admin/AbstractDependencyManager.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/admin/AbstractDependencyManager.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/admin/AbstractDependencyManagerTest$1.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/admin/AbstractDependencyManagerTest$1.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/admin/AbstractDependencyManagerTest$2.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/admin/AbstractDependencyManagerTest$2.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/admin/AbstractDependencyManagerTest$3.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/admin/AbstractDependencyManagerTest$3.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/admin/AbstractDependencyManagerTest$4.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/admin/AbstractDependencyManagerTest$4.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/admin/AbstractDependencyManagerTest.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/admin/AbstractDependencyManagerTest.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/admin/AbstractModelRepository.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/admin/AbstractModelRepository.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/admin/DefaultModelChangeListener.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/admin/DefaultModelChangeListener.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/admin/DefaultModelListener.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/admin/DefaultModelListener.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/admin/DefaultModelListenerTest.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/admin/DefaultModelListenerTest.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/admin/DefaultResolution.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/admin/DefaultResolution.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/admin/DependencyHandler.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/admin/DependencyHandler.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/admin/DependencyManager.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/admin/DependencyManager.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/admin/DependencyType.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/admin/DependencyType.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/admin/ErrorRecorder.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/admin/ErrorRecorder.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/admin/Messages.properties
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/admin/Messages.properties	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/admin/Messages.properties	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,21 @@
+# /*
+# * Copyright 2005-8 Pi4 Technologies Ltd
+# *
+# * Licensed under the Apache License, Version 2.0 (the "License");
+# * you may not use this file except in compliance with the License.
+# * You may obtain a copy of the License at
+# *
+# *     http://www.apache.org/licenses/LICENSE-2.0
+# *
+# * Unless required by applicable law or agreed to in writing, software
+# * distributed under the License is distributed on an "AS IS" BASIS,
+# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# * See the License for the specific language governing permissions and
+# * limitations under the License.
+# *
+# *
+# * Change History:
+# * 21 Oct 2008 : Initial version created by gary
+# */
+
+_COMPOSED_ISSUE_PREFIX=Composition issue:

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/admin/ModelChangeListener.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/admin/ModelChangeListener.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/admin/ModelInfo.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/admin/ModelInfo.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/admin/ModelIssue.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/admin/ModelIssue.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/admin/ModelListener.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/admin/ModelListener.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/admin/ModelRepository.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/admin/ModelRepository.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/admin/ModelResource.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/admin/ModelResource.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/admin/TestModelResource.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/admin/TestModelResource.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/analysis/BlockLookaheadRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/analysis/BlockLookaheadRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/analysis/DefaultLookaheadAnalyser.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/analysis/DefaultLookaheadAnalyser.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/analysis/DefaultLookaheadContext.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/analysis/DefaultLookaheadContext.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/analysis/InteractionLookaheadRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/analysis/InteractionLookaheadRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/analysis/LookaheadAnalyser.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/analysis/LookaheadAnalyser.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/analysis/LookaheadContext.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/analysis/LookaheadContext.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/analysis/LookaheadRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/analysis/LookaheadRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/analysis/ModelIncludeLookaheadRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/analysis/ModelIncludeLookaheadRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/analysis/MultiPathBehaviourLookaheadRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/analysis/MultiPathBehaviourLookaheadRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/analysis/SinglePathBehaviourLookaheadRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/analysis/SinglePathBehaviourLookaheadRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/analysis/TestLookaheadAnalyser.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/analysis/TestLookaheadAnalyser.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/change/AbstractModelChangeRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/change/AbstractModelChangeRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/change/DefaultModelChangeContext.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/change/DefaultModelChangeContext.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/change/DefaultModelGenerator.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/change/DefaultModelGenerator.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/change/ModelChangeContext.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/change/ModelChangeContext.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/change/ModelChangeRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/change/ModelChangeRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/change/ModelGenerator.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/change/ModelGenerator.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/change/TestChangeInformation.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/change/TestChangeInformation.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/change/TestModelChangeContext.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/change/TestModelChangeContext.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/filter/DefaultModelFilter.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/filter/DefaultModelFilter.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/filter/DefaultModelFilterTest$TestDefinition.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/filter/DefaultModelFilterTest$TestDefinition.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/filter/DefaultModelFilterTest$TestModel.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/filter/DefaultModelFilterTest$TestModel.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/filter/DefaultModelFilterTest.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/filter/DefaultModelFilterTest.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/filter/ModelFilter.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/filter/ModelFilter.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/resolutions/DeleteFromModel.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/resolutions/DeleteFromModel.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/resolutions/InsertFromReferencedDescription.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/resolutions/InsertFromReferencedDescription.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/resolutions/Messages.properties
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/resolutions/Messages.properties	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/resolutions/Messages.properties	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,34 @@
+# /*
+# * Copyright 2007-8 Pi4 Technologies Ltd
+# *
+# * Licensed under the Apache License, Version 2.0 (the "License");
+# * you may not use this file except in compliance with the License.
+# * You may obtain a copy of the License at
+# *
+# *     http://www.apache.org/licenses/LICENSE-2.0
+# *
+# * Unless required by applicable law or agreed to in writing, software
+# * distributed under the License is distributed on an "AS IS" BASIS,
+# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# * See the License for the specific language governing permissions and
+# * limitations under the License.
+# *
+# *
+# * Change History:
+# * 11 Sept 2008 : Initial version created by gary
+# */
+
+_COULD_NOT_DELETE=Could not delete activities from the model
+_COULD_NOT_INSERT=Could not insert activities found in referenced description
+_COULD_NOT_SAVE=Could not save the model
+_COULD_NOT_UPDATE=Could not update activity with information from referenced description
+_DELETE_FROM_MODEL_NAME=Delete unnecessary activities from model
+_DELETE_FROM_MODEL_DESC=Unnecessary activities, not present in the referenced description, will be deleted from model
+_INSERT_FROM_REFERENCED_DESCRIPTION_NAME=Insert missing behaviour from referenced description
+_INSERT_FROM_REFERENCED_DESCRIPTION_DESC=Insert the missing behaviour from the referenced description
+_SHOW_COMPOSED_ISSUE_NAME=Show composed issue
+_SHOW_COMPOSED_ISSUE_DESC=Display the erronous activity in the composed description
+_SHOW_REFERENCED_DESCRIPTION_NAME=Show referenced description
+_SHOW_REFERENCED_DESCRIPTION_DESC=Display the area in the referenced description being used for conformance analysis
+_UPDATE_FROM_REFERENCED_DESCRIPTION_NAME=Update from referenced description
+_UPDATE_FROM_REFERENCED_DESCRIPTION_DESC=Update the affected behaviour from the referenced description

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/resolutions/Resolution.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/resolutions/Resolution.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/resolutions/ResolutionException.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/resolutions/ResolutionException.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/resolutions/ShowComposedIssue.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/resolutions/ShowComposedIssue.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/resolutions/ShowReferencedDescription.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/resolutions/ShowReferencedDescription.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/resolutions/UpdateFromReferencedDescription.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/resolutions/UpdateFromReferencedDescription.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/types/DefaultTypeResolver.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/types/DefaultTypeResolver.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/types/TypeInformation.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/types/TypeInformation.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/types/TypeResolver.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/types/TypeResolver.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/types/TypeResolverRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/types/TypeResolverRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/types/TypeSystem.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/types/TypeSystem.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/util/InteractionUtil.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/util/InteractionUtil.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/util/InteractionUtilTest.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/model/util/InteractionUtilTest.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/osgi/Activator.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/osgi/Activator.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/parser/AbstractImplementsReferenceParserRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/parser/AbstractImplementsReferenceParserRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/parser/AbstractModelParserRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/parser/AbstractModelParserRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/parser/AbstractModelReferenceParserRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/parser/AbstractModelReferenceParserRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/parser/AbstractParserRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/parser/AbstractParserRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/parser/ChannelListParserRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/parser/ChannelListParserRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/parser/ChannelListParserRuleTest.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/parser/ChannelListParserRuleTest.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/parser/ConformanceReferenceParserRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/parser/ConformanceReferenceParserRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/parser/ConformanceReferenceParserRuleTest.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/parser/ConformanceReferenceParserRuleTest.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/parser/DefaultKeyWordProvider.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/parser/DefaultKeyWordProvider.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/parser/DefaultParser.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/parser/DefaultParser.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/parser/DefaultParserContext.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/parser/DefaultParserContext.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/parser/DefaultParserContextTest.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/parser/DefaultParserContextTest.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/parser/DefaultTokenizer.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/parser/DefaultTokenizer.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/parser/GenericKeyWordProvider.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/parser/GenericKeyWordProvider.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/parser/GenericParser.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/parser/GenericParser.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/parser/ImportParserRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/parser/ImportParserRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/parser/ImportParserRuleTest.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/parser/ImportParserRuleTest.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/parser/InteractionParserRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/parser/InteractionParserRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/parser/InteractionParserRuleTest.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/parser/InteractionParserRuleTest.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/parser/KeyWordProvider.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/parser/KeyWordProvider.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/parser/MessageSignatureParserRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/parser/MessageSignatureParserRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/parser/MessageSignatureParserRuleTest.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/parser/MessageSignatureParserRuleTest.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/parser/Messages.properties
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/parser/Messages.properties	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/parser/Messages.properties	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,38 @@
+# /*
+# * Copyright 2007 Pi4 Technologies Ltd
+# *
+# * Licensed under the Apache License, Version 2.0 (the "License");
+# * you may not use this file except in compliance with the License.
+# * You may obtain a copy of the License at
+# *
+# *     http://www.apache.org/licenses/LICENSE-2.0
+# *
+# * Unless required by applicable law or agreed to in writing, software
+# * distributed under the License is distributed on an "AS IS" BASIS,
+# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# * See the License for the specific language governing permissions and
+# * limitations under the License.
+# *
+# *
+# * Change History:
+# * 28 Oct 2007 : Initial version created by gary
+# */
+
+_DUPLICATE_DECLARATION=Name '{0}' has already been declared
+_EXISTING_DECLARATION=Duplicate declaration name '{0}'
+_EXPECTING_ACTIVITY=Expecting an activity, but found '{0}'
+_EXPECTING_CHANNEL_NAME=Expecting channel name
+_EXPECTING_IDENTIFIER=Expecting an identifier
+_EXPECTING_KEYWORD=Expecting keyword '{0}'
+_EXPECTING_LOCATED_REFERENCE=Expecting a located reference
+_EXPECTING_PARAMETER_LIST_DELIMITER=Expecting either ',' or ')'
+_EXPECTING_ROLE_NAME=Expecting role name
+_EXPECTING_SYMBOL=Expecting symbol '{0}'
+_EXPECTING_TYPE=Expecting type
+_INCOMPATIBLE_NAME=Name is incompatible with file name
+_REQUIRED_CHANNEL=Must specify a channel '{0}'
+_REQUIRED_DECLARATION=Must specify a declaration '{0}'
+_REQUIRED_ROLE=Must specify a role '{0}'
+_UNKNOWN_CHANNEL=Unknown channel '{0}'
+_UNKNOWN_DECLARATION=Unknown declaration '{0}'
+_UNKNOWN_ROLE=Unknown role '{0}'

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/parser/ModelNameParserRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/parser/ModelNameParserRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/parser/ModelNameParserRuleTest.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/parser/ModelNameParserRuleTest.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/parser/NamespaceParserRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/parser/NamespaceParserRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/parser/NamespaceParserRuleTest.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/parser/NamespaceParserRuleTest.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/parser/Parser.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/parser/Parser.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/parser/ParserConstants.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/parser/ParserConstants.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/parser/ParserContext.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/parser/ParserContext.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/parser/ParserRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/parser/ParserRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/parser/ParserRuleType.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/parser/ParserRuleType.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/parser/RoleListParserRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/parser/RoleListParserRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/parser/RoleListParserRuleTest.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/parser/RoleListParserRuleTest.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/parser/TestModelRepository.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/parser/TestModelRepository.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/parser/TestParserContext.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/parser/TestParserContext.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/parser/TestTypeReferenceParserRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/parser/TestTypeReferenceParserRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/parser/Token.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/parser/Token.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/parser/TokenType.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/parser/TokenType.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/parser/Tokenizer.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/parser/Tokenizer.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/parser/TypeReferenceParserRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/parser/TypeReferenceParserRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/parser/TypeReferenceParserRuleTest.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/parser/TypeReferenceParserRuleTest.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/projector/AbstractBlockProjectorRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/projector/AbstractBlockProjectorRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/projector/BlockProjectorRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/projector/BlockProjectorRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/projector/ChannelListProjectorRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/projector/ChannelListProjectorRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/projector/ConformanceReferenceProjectorRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/projector/ConformanceReferenceProjectorRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/projector/DefaultProjector.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/projector/DefaultProjector.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/projector/DefaultProjectorContext.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/projector/DefaultProjectorContext.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/projector/ImplementsReferenceProjectorRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/projector/ImplementsReferenceProjectorRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/projector/ImportProjectorRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/projector/ImportProjectorRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/projector/InteractionProjectorRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/projector/InteractionProjectorRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/projector/LocatedNameProjectorRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/projector/LocatedNameProjectorRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/projector/MessageSignatureProjectorRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/projector/MessageSignatureProjectorRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/projector/Messages.properties
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/projector/Messages.properties	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/projector/Messages.properties	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,21 @@
+# /*
+# * Copyright 2007 Pi4 Technologies Ltd
+# *
+# * Licensed under the Apache License, Version 2.0 (the "License");
+# * you may not use this file except in compliance with the License.
+# * You may obtain a copy of the License at
+# *
+# *     http://www.apache.org/licenses/LICENSE-2.0
+# *
+# * Unless required by applicable law or agreed to in writing, software
+# * distributed under the License is distributed on an "AS IS" BASIS,
+# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# * See the License for the specific language governing permissions and
+# * limitations under the License.
+# *
+# *
+# * Change History:
+# * 18 Nov 2007 : Initial version created by gary
+# */
+
+_NOT_PROJECTED_MODEL=Model '{0}' was not projected to another model
\ No newline at end of file

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/projector/ModelIncludeProjectorRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/projector/ModelIncludeProjectorRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/projector/ModelProjectorRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/projector/ModelProjectorRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/projector/ModelReferenceProjectorRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/projector/ModelReferenceProjectorRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/projector/NamespaceProjectorRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/projector/NamespaceProjectorRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/projector/Projector.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/projector/Projector.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/projector/ProjectorContext.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/projector/ProjectorContext.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/projector/ProjectorRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/projector/ProjectorRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/projector/RoleListProjectorRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/projector/RoleListProjectorRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/projector/RoleProjectorRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/projector/RoleProjectorRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/projector/TestProjector.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/projector/TestProjector.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/projector/TypeReferenceProjectorRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/projector/TypeReferenceProjectorRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/util/MessageUtil.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/util/MessageUtil.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/util/ModelIssueUtil.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/util/ModelIssueUtil.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/util/ModelIssueUtilTest$Resolution1.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/util/ModelIssueUtilTest$Resolution1.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/util/ModelIssueUtilTest$Resolution2.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/util/ModelIssueUtilTest$Resolution2.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/util/ModelIssueUtilTest.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/util/ModelIssueUtilTest.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/util/ResourceUtil.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/util/ResourceUtil.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/util/Scope.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/util/Scope.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/util/ScopeTest.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/util/ScopeTest.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/validation/AbstractValidationRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/validation/AbstractValidationRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/validation/BlockValidationRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/validation/BlockValidationRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/validation/ChannelListValidationRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/validation/ChannelListValidationRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/validation/ChannelValidationRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/validation/ChannelValidationRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/validation/DefaultValidationContext$1.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/validation/DefaultValidationContext$1.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/validation/DefaultValidationContext.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/validation/DefaultValidationContext.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/validation/DefaultValidator.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/validation/DefaultValidator.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/validation/InteractionValidationRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/validation/InteractionValidationRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/validation/MessageSignatureValidationRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/validation/MessageSignatureValidationRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/validation/Messages.properties
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/validation/Messages.properties	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/validation/Messages.properties	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,24 @@
+# /*
+# * Copyright 2007 Pi4 Technologies Ltd
+# *
+# * Licensed under the Apache License, Version 2.0 (the "License");
+# * you may not use this file except in compliance with the License.
+# * You may obtain a copy of the License at
+# *
+# *     http://www.apache.org/licenses/LICENSE-2.0
+# *
+# * Unless required by applicable law or agreed to in writing, software
+# * distributed under the License is distributed on an "AS IS" BASIS,
+# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# * See the License for the specific language governing permissions and
+# * limitations under the License.
+# *
+# *
+# * Change History:
+# * 2 Nov 2007 : Initial version created by gary
+# */
+
+_EXISTING_DECLARATION=Declaration already exists for name '{0}'
+_NOT_FOUND_BOUND_DECLARATION=Bound declaration '{0}' not found in definition '{1}' 
+_NOT_FOUND_REFERENCE=Definition '{0}' of type '{1}' could not be found
+_INTERACTION_ROLE=Interaction needs to define a '{0}' role

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/validation/ModelReferenceValidationRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/validation/ModelReferenceValidationRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/validation/ModelValidationRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/validation/ModelValidationRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/validation/RoleListValidationRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/validation/RoleListValidationRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/validation/RoleValidationRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/validation/RoleValidationRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/validation/TypeReferenceValidationRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/validation/TypeReferenceValidationRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/validation/ValidationContext.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/validation/ValidationContext.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/validation/ValidationRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/validation/ValidationRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/validation/Validator.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.core/classes/org/scribble/validation/Validator.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/comparator/BlockComparatorRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/comparator/BlockComparatorRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/comparator/BlockComparatorRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,80 @@
+/*
+ * Copyright 2007-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 10 Nov 2008 : Initial version created by gary
+ */
+package org.scribble.comparator;
+
+import org.scribble.model.*;
+import org.scribble.model.admin.ModelListener;
+import org.scribble.extensions.RegistryInfo;
+
+/**
+ * This class provides the Block comparator rule.
+ */
+ at RegistryInfo(extension=ComparatorRule.class)
+public class BlockComparatorRule implements ComparatorRule {
+
+	/**
+	 * This method determines whether the comparison rule is
+	 * associated with the supplied type.
+	 * 
+	 * @param obj The object to check
+	 * @return Whether the object is of a type supported by the
+	 * 					comparison rule
+	 */
+	public boolean isTypeSupported(ModelObject obj) {
+		return(obj instanceof Block);
+	}
+	
+	/**
+	 * This method determines whether the comparison rule is
+	 * appropriate for the supplied model objects.
+	 * 
+	 * @param main The main model object to be compared
+	 * @param ref The reference model object to be compared against
+	 * @return Whether the rule is relevant for the
+	 * 				model objects
+	 */
+	public boolean isComparisonSupported(ModelObject main, ModelObject ref) {
+		return(main.getClass() == Block.class &&
+				ref.getClass() == Block.class);
+	}
+	
+	/**
+	 * This method compares a model object against a reference
+	 * component to determine if they are equal.
+	 * 
+	 * @param context The context
+	 * @param main The main model object
+	 * @param reference The reference model object
+	 * @param l The model listener
+	 * @param deep Perform a deep compare
+	 * @return Whether the model objects are comparable
+	 */
+	public boolean compare(ComparatorContext context, ModelObject main,
+					ModelObject reference, ModelListener l, boolean deep) {
+		boolean ret=false;
+
+		if (deep == false) {
+			ret = true;
+		}
+		
+		return(ret);
+	}
+	
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/comparator/ChannelComparatorRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/comparator/ChannelComparatorRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/comparator/ChannelComparatorRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,94 @@
+/*
+ * Copyright 2007-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 1 April 2008 : Initial version created by gary
+ */
+package org.scribble.comparator;
+
+import org.scribble.model.*;
+import org.scribble.model.admin.ModelIssue;
+import org.scribble.model.admin.ModelListener;
+import org.scribble.extensions.RegistryInfo;
+
+/**
+ * This class provides the Channel comparator rule.
+ */
+ at RegistryInfo(extension=ComparatorRule.class)
+public class ChannelComparatorRule implements ComparatorRule {
+
+	/**
+	 * This method determines whether the comparison rule is
+	 * associated with the supplied type.
+	 * 
+	 * @param obj The object to check
+	 * @return Whether the object is of a type supported by the
+	 * 					comparison rule
+	 */
+	public boolean isTypeSupported(ModelObject obj) {
+		return(obj instanceof Channel);
+	}
+	
+	/**
+	 * This method determines whether the comparison rule is
+	 * appropriate for the supplied model objects.
+	 * 
+	 * @param main The main model object to be compared
+	 * @param ref The reference model object to be compared against
+	 * @return Whether the rule is relevant for the
+	 * 				model objects
+	 */
+	public boolean isComparisonSupported(ModelObject main, ModelObject ref) {
+		return(main instanceof Channel &&
+				ref instanceof Channel);
+	}
+	
+	/**
+	 * This method compares a model object against a reference
+	 * component to determine if they are equal.
+	 * 
+	 * @param context The context
+	 * @param main The main model object
+	 * @param reference The reference model object
+	 * @param l The model listener
+	 * @param deep Perform a deep compare
+	 * @return Whether the model objects are comparable
+	 */
+	public boolean compare(ComparatorContext context, ModelObject main,
+					ModelObject reference, ModelListener l, boolean deep) {
+		boolean ret=false;
+		Channel mainch=(Channel)main;
+		Channel refch=(Channel)reference;
+
+		String mainName=context.getMainName(mainch.getName());
+		String refName=context.getReferenceName(refch.getName());
+		
+		ret = mainName.equals(refName);
+		
+		if (ret == false) {
+			String mesg=org.scribble.util.MessageUtil.format(
+					java.util.PropertyResourceBundle.getBundle(
+					"org.scribble.comparator.Messages").
+					getString("_CHANNEL_MISMATCH"),
+							new String[]{mainName, refName});
+			
+			l.error(new ModelIssue(main, mesg));
+		}
+
+		return(ret);
+	}
+	
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/comparator/Comparator.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/comparator/Comparator.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/comparator/Comparator.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,47 @@
+/*
+ * Copyright 2007 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 18 Nov 2007 : Initial version created by gary
+ */
+package org.scribble.comparator;
+
+import org.scribble.model.*;
+import org.scribble.model.admin.ModelListener;
+
+/**
+ * This interface represents the component responsible for
+ * comparing two model components for equality
+ */
+public interface Comparator {
+
+	/**
+	 * This method compares a main model against a reference
+	 * model, to determine if the main model is equivalent.
+	 * If not, then it reports differences to the model
+	 * listener.
+	 * 
+	 * @param mainModelObject The main model component being checked
+	 * @param mainSource The main model source
+	 * @param refModelObject The reference model component
+	 * @param refSource The reference model source
+	 * @param l The model listener
+	 * @return Whether the model objects are comparable
+	 */
+	public boolean compare(ModelObject mainModelObject, ModelReference mainSource,
+			ModelObject refModelObject,	ModelReference refSource, ModelListener l);
+	
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/comparator/ComparatorContext.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/comparator/ComparatorContext.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/comparator/ComparatorContext.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,137 @@
+/*
+ * Copyright 2007 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 18 Nov 2007 : Initial version created by gary
+ */
+package org.scribble.comparator;
+
+import org.scribble.model.*;
+import org.scribble.model.admin.ModelListener;
+
+/**
+ * This interface represents the comparator context.
+ */
+public interface ComparatorContext {
+	
+	// TODO: Need to make role mappings available, where the
+	// reference local model is using different role names
+	// to the projection from the global model - may need to make
+	// mapping information generic, as comparator will be used in
+	// other situations than comparing global and local models
+
+	/**
+	 * This method returns the model reference associated with
+	 * the source for the main description being compared
+	 * against.
+	 * 
+	 * @return The main source
+	 */
+	public ModelReference getMainSource();
+	
+	/**
+	 * This method returns the model reference associated with
+	 * the source for the reference description being compared
+	 * against.
+	 * 
+	 * @return The reference source
+	 */
+	public ModelReference getReferenceSource();
+	
+	/**
+	 * This method determines if the supplied model object has
+	 * any comparison rules associated with it.
+	 * 
+	 * @param obj The model object
+	 * @return Whether the type is supported by any comparator rules
+	 */
+	public boolean isTypeSupported(ModelObject obj);
+	
+	/**
+	 * This method determines whether a comparison rule exists that is
+	 * appropriate for the supplied model objects.
+	 * 
+	 * @param main The main model object to be compared
+	 * @param ref The reference model object to be compared against
+	 * @return Whether a rule is relevant for the
+	 * 				model objects
+	 */
+	public boolean isComparisonSupported(ModelObject main, ModelObject ref);
+
+	/**
+	 * This method compares a main model object against a reference
+	 * model object, to determine if the main model object is equivalent.
+	 * If not, then it reports differences to the model
+	 * listener.
+	 * 
+	 * @param main The model object being checked
+	 * @param reference The reference model object
+	 * @param l The model listener
+	 * @param deep Perform a deep compare
+	 * @return Whether the model objects are comparable
+	 */
+	public boolean compare(ModelObject main, ModelObject reference,
+						ModelListener l, boolean deep);
+	
+	/**
+	 * This method pushes the main name map on to the stack.
+	 * 
+	 * @param map The main name map
+	 */
+	public void pushMainNameMap(NameMap map);
+	
+	/**
+	 * This method pushes the reference name map on to the stack.
+	 * 
+	 * @param map The reference name map
+	 */
+	public void pushReferenceNameMap(NameMap map);
+
+	/**
+	 * This method returns the main name that has been mapped
+	 * to the supplied name. If the supplied name has
+	 * no mapping, then the same main name will be returned.
+	 * 
+	 * @param name The current main name
+	 * @return The original main name
+	 */
+	public String getMainName(String name);
+	
+	/**
+	 * This method returns the reference name that has been mapped
+	 * to the supplied name. If the supplied name has
+	 * no mapping, then the same reference name will be returned.
+	 * 
+	 * @param name The current reference name
+	 * @return The original reference name
+	 */
+	public String getReferenceName(String name);
+	
+	/**
+	 * This method pops the main name map from the stack.
+	 * 
+	 * @return The main name map
+	 */
+	public NameMap popMainNameMap();
+	
+	/**
+	 * This method pops the reference name map from the stack.
+	 * 
+	 * @return The reference name map
+	 */
+	public NameMap popReferenceNameMap();
+
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/comparator/ComparatorRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/comparator/ComparatorRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/comparator/ComparatorRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,67 @@
+/*
+ * Copyright 2007 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 18 Nov 2007 : Initial version created by gary
+ */
+package org.scribble.comparator;
+
+import org.scribble.model.*;
+import org.scribble.model.admin.ModelListener;
+
+/**
+ * This interface represents the comparison rule used by the
+ * comparator to check whether a main model conforms to a
+ * reference model.
+ */
+public interface ComparatorRule {
+
+	/**
+	 * This method determines whether the comparison rule is
+	 * associated with the supplied type.
+	 * 
+	 * @param obj The object to check
+	 * @return Whether the object is of a type supported by the
+	 * 					comparison rule
+	 */
+	public boolean isTypeSupported(ModelObject obj);
+	
+	/**
+	 * This method determines whether the comparison rule is
+	 * appropriate for the supplied model objects.
+	 * 
+	 * @param main The main model object to be compared
+	 * @param ref The reference model object to be compared against
+	 * @return Whether the rule is relevant for the
+	 * 				model objects
+	 */
+	public boolean isComparisonSupported(ModelObject main, ModelObject ref);
+	
+	/**
+	 * This method compares a model object against a reference
+	 * component to determine if they are equal.
+	 * 
+	 * @param context The context
+	 * @param main The main model object
+	 * @param reference The reference model object
+	 * @param l The model listener
+	 * @param deep Perform a deep compare
+	 * @return Whether the model objects are comparable
+	 */
+	public boolean compare(ComparatorContext context, ModelObject main,
+					ModelObject reference, ModelListener l, boolean deep);
+	
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/comparator/DefaultComparator.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/comparator/DefaultComparator.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/comparator/DefaultComparator.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,74 @@
+/*
+ * Copyright 2007 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 18 Nov 2007 : Initial version created by gary
+ */
+package org.scribble.comparator;
+
+import org.scribble.extensions.RegistryInfo;
+import org.scribble.model.*;
+import org.scribble.model.admin.ModelListener;
+
+/**
+ * This class provides the default implementation
+ * of the Comparator interface.
+ */
+ at RegistryInfo(extension=Comparator.class,isService=true)
+public class DefaultComparator implements Comparator {
+
+	/**
+	 * This is the default constructor for the comparator.
+	 */
+	public DefaultComparator() {
+	}
+	
+	/**
+	 * This method compares a main model against a reference
+	 * model, to determine if the main model is equivalent.
+	 * If not, then it reports differences to the model
+	 * listener.
+	 * 
+	 * @param mainModelObject The main model component being checked
+	 * @param mainSource The main model source
+	 * @param refModelObject The reference model component
+	 * @param refSource The reference model source
+	 * @param l The model listener
+	 * @return Whether the model objects are comparable
+	 */
+	public boolean compare(ModelObject mainModelObject, ModelReference mainSource,
+			ModelObject refModelObject,	ModelReference refSource, ModelListener l) {
+		boolean ret=false;
+	
+		// Only perform conformance checking if reference model
+		// is supplied. Otherwise, it is the validation rules 
+		// responsibility to report the error.
+		if (refModelObject != null) {
+			
+			DefaultComparatorContext context=
+				new DefaultComparatorContext(mainSource, refSource);
+			
+			if (refSource instanceof NameMappingReference) {
+				context.pushReferenceNameMap(new DefaultNameMap(
+						((NameMappingReference)refSource).getNameMapping()));
+			}
+			
+			ret = context.compare(mainModelObject, refModelObject, l, true);
+		}
+		
+		return(ret);
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/comparator/DefaultComparatorContext.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/comparator/DefaultComparatorContext.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/comparator/DefaultComparatorContext.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,311 @@
+/*
+ * Copyright 2007 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 18 Nov 2007 : Initial version created by gary
+ */
+package org.scribble.comparator;
+
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+import org.scribble.model.*;
+import org.scribble.model.admin.ModelIssue;
+import org.scribble.model.admin.ModelListener;
+import org.scribble.model.resolutions.DeleteFromModel;
+
+/**
+ * This class represents the default comparator context.
+ */
+public class DefaultComparatorContext implements ComparatorContext {
+
+	/**
+	 * This is the constructor for use in testing using a set
+	 * of comparator rules.
+	 * 
+	 * @param mainSource The main model source reference
+	 * @param refSource The reference model source reference
+	 * @param rules The rules
+	 */
+	public DefaultComparatorContext(ModelReference mainSource,
+			ModelReference refSource, java.util.List<ComparatorRule> rules) {
+		m_mainSource = mainSource;
+		m_refSource = refSource;
+		m_rules = rules;
+	}
+	
+	/**
+	 * This is the default constructor for the comparator context.
+	 * 
+	 * @param mainSource The main model source reference
+	 * @param refSource The reference model source reference
+	 */
+	public DefaultComparatorContext(ModelReference mainSource,
+						ModelReference refSource) {
+		m_mainSource = mainSource;
+		m_refSource = refSource;
+		
+		java.util.List<Object> rules=
+			org.scribble.extensions.RegistryFactory.getRegistry().
+						getExtensions(ComparatorRule.class, null);
+		
+		// Transfer to typed list
+		for (int i=0; i < rules.size(); i++) {
+			if (rules.get(i) instanceof ComparatorRule) {
+				m_rules.add((ComparatorRule)rules.get(i));
+			}
+		}
+	}
+	
+	/**
+	 * This method returns the model reference associated with
+	 * the source for the main description being compared
+	 * against.
+	 * 
+	 * @return The main source
+	 */
+	public ModelReference getMainSource() {
+		return(m_mainSource);
+	}
+	
+	/**
+	 * This method returns the model reference associated with
+	 * the source for the reference description being compared
+	 * against.
+	 * 
+	 * @return The reference source
+	 */
+	public ModelReference getReferenceSource() {
+		return(m_refSource);
+	}
+	
+	/**
+	 * This method determines if the supplied model object has
+	 * any comparison rules associated with it.
+	 * 
+	 * @param obj The model object
+	 * @return Whether the type is supported by any comparator rules
+	 */
+	public boolean isTypeSupported(ModelObject obj) {
+		boolean ret=false;
+		
+		for (int i=0; ret == false && i < getRules().size(); i++) {
+			ret = getRules().get(i).isTypeSupported(obj);
+		}
+
+		return(ret);
+	}
+	
+	/**
+	 * This method determines whether a comparison rule exists that is
+	 * appropriate for the supplied model objects.
+	 * 
+	 * @param main The main model object to be compared
+	 * @param ref The reference model object to be compared against
+	 * @return Whether a rule is relevant for the
+	 * 				model objects
+	 */
+	public boolean isComparisonSupported(ModelObject main, ModelObject ref) {
+		boolean ret=false;
+		
+		for (int i=0; ret == false && i < getRules().size(); i++) {
+			ret = getRules().get(i).isComparisonSupported(main, ref);
+		}
+
+		return(ret);
+	}
+
+	/**
+	 * This method compares a main model object against a reference
+	 * model object, to determine if the main model object is equivalent.
+	 * If not, then it reports differences to the model
+	 * listener.
+	 * 
+	 * @param main The model object being checked
+	 * @param reference The reference model object
+	 * @param l The model listener
+	 * @param deep Perform a deep compare
+	 * @return Whether the model objects are comparable
+	 */
+	public boolean compare(ModelObject main, ModelObject reference,
+						ModelListener l, boolean deep) {
+		boolean ret=true;
+		boolean f_ruleApplied=false;
+		
+		if (logger.isLoggable(Level.FINEST)) {
+			logger.finest("Compare: main="+main+" reference="+reference);
+		}
+		
+		// Add rules appropriate for the comparison must return true,
+		// for the compare to return true
+		for (int i=0; ret == true && i < getRules().size(); i++) {
+			if (getRules().get(i).isComparisonSupported(main, reference)) {
+				f_ruleApplied = true;
+				
+				if (logger.isLoggable(Level.FINEST)) {
+					logger.finest("Invoking rule: "+getRules().get(i));
+				}
+				
+				ret = getRules().get(i).compare(this, main,
+							reference, l, deep);
+				
+				if (logger.isLoggable(Level.FINEST)) {
+					logger.finest("Result from rule: "+getRules().get(i)+" = "+ret);
+				}
+			}
+		}
+
+		// GPB (10/11/08) have removed check for main being behaviour
+		// as compare should only be called on behaviours now - but
+		// was not checking 'block'
+		if (f_ruleApplied == false /*&& main instanceof Behaviour*/) {
+			
+			// TODO:
+			// Record reference object location and
+			// start/end position with error, so they
+			// can be navigated
+			String mesg=org.scribble.util.MessageUtil.format(
+					java.util.PropertyResourceBundle.getBundle(
+					"org.scribble.comparator.Messages").
+					getString("_UNEXPECTED_BEHAVIOUR"), null);
+			
+			ModelIssue issue=new ModelIssue(main, mesg);
+			
+			issue.getResolutions().add(new DeleteFromModel());
+			
+			l.error(issue);
+			
+			ret = false;
+		}
+		
+		/*
+		 * For now, if no comparison rule is found, then should be
+		 * considered ok - so only if rule is broken should a
+		 * problem be reported.
+		 *
+		if (ret == false && f_ruleApplied == false) {
+			
+			// Need to report fact that no comparison rule could be found
+			l.error(main, "Unable to find equivalent model object", null);
+		}
+		*/
+		
+		return(ret);
+	}
+		
+	/**
+	 * This method returns a list of comparison rules.
+	 * 
+	 * @return The list of comparison rules
+	 */
+	public java.util.List<ComparatorRule> getRules() {
+		return(m_rules);
+	}
+	
+	/**
+	 * This method pushes the main name map on to the stack.
+	 * 
+	 * @param map The main name map
+	 */
+	public void pushMainNameMap(NameMap map) {
+		m_mainNameMapStack.add(0, map);
+	}
+	
+	/**
+	 * This method pushes the reference name map on to the stack.
+	 * 
+	 * @param map The reference name map
+	 */
+	public void pushReferenceNameMap(NameMap map) {
+		m_referenceNameMapStack.add(0, map);
+	}
+
+	/**
+	 * This method returns the main name that has been mapped
+	 * to the supplied name. If the supplied name has
+	 * no mapping, then the same main name will be returned.
+	 * 
+	 * @param name The current main name
+	 * @return The original main name
+	 */
+	public String getMainName(String name) {
+		String ret=name;
+		
+		for (int i=0; i < m_mainNameMapStack.size(); i++) {
+			NameMap map=m_mainNameMapStack.get(i);
+			ret = map.getName(name);
+		}
+		
+		return(ret);
+	}
+	
+	/**
+	 * This method returns the reference name that has been mapped
+	 * to the supplied name. If the supplied name has
+	 * no mapping, then the same reference name will be returned.
+	 * 
+	 * @param name The current reference name
+	 * @return The original reference name
+	 */
+	public String getReferenceName(String name) {
+		String ret=name;
+		
+		for (int i=0; i < m_referenceNameMapStack.size(); i++) {
+			NameMap map=m_referenceNameMapStack.get(i);
+			ret = map.getName(name);
+		}
+		
+		return(ret);
+	}
+	
+	/**
+	 * This method pops the main name map from the stack.
+	 * 
+	 * @return The main name map
+	 */
+	public NameMap popMainNameMap() {
+		NameMap ret=null;
+		
+		if (m_mainNameMapStack.size() > 0) {
+			ret = m_mainNameMapStack.remove(0);
+		}
+		
+		return(ret);
+	}
+	
+	/**
+	 * This method pops the reference name map from the stack.
+	 * 
+	 * @return The reference name map
+	 */
+	public NameMap popReferenceNameMap() {
+		NameMap ret=null;
+		
+		if (m_referenceNameMapStack.size() > 0) {
+			ret = m_referenceNameMapStack.remove(0);
+		}
+		
+		return(ret);
+	}
+	
+	private static Logger logger = Logger.getLogger("org.scribble.comparator");
+
+	private ModelReference m_mainSource=null;
+	private ModelReference m_refSource=null;
+	private java.util.List<ComparatorRule> m_rules=new java.util.Vector<ComparatorRule>();
+	private java.util.List<NameMap> m_mainNameMapStack=new java.util.Vector<NameMap>();
+	private java.util.List<NameMap> m_referenceNameMapStack=new java.util.Vector<NameMap>();
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/comparator/DefaultNameMap.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/comparator/DefaultNameMap.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/comparator/DefaultNameMap.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,46 @@
+/*
+ * Copyright 2007-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 18 Feb 2008 : Initial version created by gary
+ */
+package org.scribble.comparator;
+
+public class DefaultNameMap implements NameMap {
+
+	/**
+	 * This constructor is initialized with the name map.
+	 * 
+	 * @param map The map
+	 */
+	public DefaultNameMap(java.util.Map<String,String> map) {
+		m_map = map;
+	}
+	
+	/**
+	 * This method returns the name that has been mapped
+	 * to the supplied name. If the supplied name has
+	 * no mapping, then the same name will be returned.
+	 * 
+	 * @param name The current name
+	 * @return The original name
+	 */
+	public String getName(String name) {
+		return(m_map.containsKey(name) ? m_map.get(name) : name);
+	}
+
+	private java.util.Map<String,String> m_map=null;
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/comparator/GlobalToLocalModelComparatorRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/comparator/GlobalToLocalModelComparatorRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/comparator/GlobalToLocalModelComparatorRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,123 @@
+/*
+ * Copyright 2007 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 25 Nov 2007 : Initial version created by gary
+ */
+package org.scribble.comparator;
+
+import org.scribble.model.*;
+import org.scribble.model.admin.ModelListener;
+import org.scribble.extensions.RegistryFactory;
+import org.scribble.extensions.RegistryInfo;
+
+/**
+ * This class provides the comparator rule for checking
+ * the conformance of an endpoint projection associated
+ * with a global model against an available local model.
+ */
+ at RegistryInfo(extension=ComparatorRule.class)
+public class GlobalToLocalModelComparatorRule implements ComparatorRule {
+
+	/**
+	 * This method determines whether the comparison rule is
+	 * associated with the supplied type.
+	 * 
+	 * @param obj The object to check
+	 * @return Whether the object is of a type supported by the
+	 * 					comparison rule
+	 */
+	public boolean isTypeSupported(ModelObject obj) {
+		return(obj instanceof Model);
+	}
+	
+	/**
+	 * This method determines whether the comparison rule is
+	 * appropriate for the supplied model objects.
+	 * 
+	 * @param main The main model object to be compared
+	 * @param ref The reference model object to be compared against
+	 * @return Whether the rule is relevant for the
+	 * 				model objects
+	 */
+	public boolean isComparisonSupported(ModelObject main, ModelObject ref) {
+		// Check if main is global model and ref is a local
+		// model
+		
+		// TODO:
+		// NOTE: It is assumed that the comparator rule has been called
+		// because there is a relationship between the two models, and
+		// the comparator context will have any mapping (renaming)
+		// information relevant to the comparison
+		return(main instanceof Model &&
+				ref instanceof Model &&
+				((Model)main).isLocated() == false &&
+				((Model)ref).isLocated());
+	}
+	
+	/**
+	 * This method compares a model object against a reference
+	 * component to determine if they are equal.
+	 * 
+	 * @param context The context
+	 * @param main The main model object
+	 * @param reference The reference model object
+	 * @param l The model listener
+	 * @param deep Perform a deep compare
+	 * @return Whether the model objects are comparable
+	 */
+	public boolean compare(ComparatorContext context, ModelObject main,
+					ModelObject reference, ModelListener l, boolean deep) {
+		boolean ret=true;
+		Model mainpm=(Model)main;
+		Model refpm=(Model)reference;
+		
+		org.scribble.projector.Projector projector=
+			(org.scribble.projector.Projector)
+			RegistryFactory.getRegistry().getExtension(
+					org.scribble.projector.Projector.class, null);
+
+		if (projector != null) {
+			
+			java.util.List<Definition> refdefns=refpm.getDefinitions();
+			java.util.List<String> rolesProjected=new java.util.Vector<String>();
+			
+			for (int i=0; i < refdefns.size(); i++) {
+				// Obtain projection for this role
+				// TODO: Take into account mapping between ref located role
+				// and name used in global model
+				String roleName=context.getReferenceName(
+						refdefns.get(i).getLocatedName().getRole().getName());
+				
+				if (rolesProjected.contains(roleName) == false) {
+					Model localModel=
+						projector.project(context.getMainSource(), mainpm,
+							new Role(roleName), l);
+								//refpm.getModelName().getLocatedRole(), l);
+					
+					if (localModel != null) {
+						ret = context.compare(localModel, refpm, l, deep);
+					}
+					
+					rolesProjected.add(roleName);
+				}
+			}
+		}
+		
+		return(ret);
+	}
+	
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/comparator/InteractionComparatorRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/comparator/InteractionComparatorRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/comparator/InteractionComparatorRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,242 @@
+/*
+ * Copyright 2007 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 24 Nov 2007 : Initial version created by gary
+ */
+package org.scribble.comparator;
+
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+import org.scribble.model.*;
+import org.scribble.model.admin.ModelListener;
+import org.scribble.extensions.RegistryInfo;
+
+/**
+ * This class provides the Interaction comparator rule.
+ */
+ at RegistryInfo(extension=ComparatorRule.class)
+public class InteractionComparatorRule implements ComparatorRule {
+
+	/**
+	 * This method determines whether the comparison rule is
+	 * associated with the supplied type.
+	 * 
+	 * @param obj The object to check
+	 * @return Whether the object is of a type supported by the
+	 * 					comparison rule
+	 */
+	public boolean isTypeSupported(ModelObject obj) {
+		return(obj instanceof Interaction);
+	}
+	
+	/**
+	 * This method determines whether the comparison rule is
+	 * appropriate for the supplied model objects.
+	 * 
+	 * @param main The main model object to be compared
+	 * @param ref The reference model object to be compared against
+	 * @return Whether the rule is relevant for the
+	 * 				model objects
+	 */
+	public boolean isComparisonSupported(ModelObject main, ModelObject ref) {
+		return(main instanceof Interaction &&
+				ref instanceof Interaction);
+	}
+	
+	/**
+	 * This method compares a model object against a reference
+	 * component to determine if they are equal.
+	 * 
+	 * @param context The context
+	 * @param main The main model object
+	 * @param reference The reference model object
+	 * @param l The model listener
+	 * @param deep Perform a deep compare
+	 * @return Whether the model objects are comparable
+	 */
+	public boolean compare(ComparatorContext context, ModelObject main,
+					ModelObject reference, ModelListener l, boolean deep) {
+		boolean ret=false;
+		Interaction maini=(Interaction)main;
+		Interaction refi=(Interaction)reference;
+		//boolean f_roleCompared=false;
+		
+		// Check for compatible message signatures
+		ret = context.compare(maini.getMessageSignature(),
+						refi.getMessageSignature(), l, deep);
+		
+		if (ret) {
+
+			Role fromRoleMain=findRole(maini, true);
+			Role fromRoleRef=findRole(refi, true);
+			Role toRoleMain=findRole(maini, false);
+			Role toRoleRef=findRole(refi, false);
+			
+			// Check if 'to' and 'from' roles are compatible			
+			if (ret && fromRoleMain != null &&
+					fromRoleRef != null) {
+				
+				ret = context.compare(fromRoleMain,
+						fromRoleRef, l, deep);
+				
+				if (logger.isLoggable(Level.FINE)) {
+					logger.fine("Interaction "+this+": compare 'from' roles: "+
+						fromRoleMain+" against "+fromRoleRef+" = "+ret);
+				}
+
+				//f_roleCompared = true;
+			}
+			
+			if (ret && toRoleMain != null &&
+							toRoleRef != null) {
+				ret = context.compare(toRoleMain,
+						toRoleRef, l, deep);
+				
+				if (logger.isLoggable(Level.FINE)) {
+					logger.fine("Interaction "+this+": compare 'to' roles: "+
+						toRoleMain+" against "+toRoleRef+" = "+ret);
+				}
+				
+				//f_roleCompared = true;
+			}
+			
+			/* TODO: Determine if mismatch direction is still
+			 * required
+			 * 
+			// Check if 'to' and 'from' roles are compatible			
+			if (ret && maini.getFromRole() != null &&
+					refi.getFromRole() != null) {
+				ret = context.compare(maini.getFromRole(),
+						refi.getFromRole(), l, deep);
+				
+				f_roleCompared = true;
+			}
+			
+			if (ret && maini.getToRole() != null &&
+							refi.getToRole() != null) {
+				ret = context.compare(maini.getToRole(),
+						refi.getToRole(), l, deep);
+				
+				f_roleCompared = true;
+			}
+			
+			if (f_roleCompared == false) {
+				boolean f_directionMismatch=false;
+				
+				if (maini.getFromRole() != null &&
+						refi.getToRole() != null) {
+					f_directionMismatch = context.compare(maini.getFromRole(),
+							refi.getToRole(), l, deep);
+				}
+				
+				if (!f_directionMismatch && maini.getToRole() != null &&
+						refi.getFromRole() != null) {
+					f_directionMismatch = context.compare(maini.getToRole(),
+							refi.getFromRole(), l, deep);
+				}
+				
+				if (f_directionMismatch) {
+					String mesg=org.scribble.util.MessageUtil.format(
+							java.util.PropertyResourceBundle.getBundle(
+							"org.scribble.comparator.Messages").
+							getString("_INTERACTION_DIRECTION_MISMATCH"),
+									new String[]{});
+					
+					l.error(new ModelIssue(main, mesg));
+		
+					ret = false;
+				}
+			}
+			*/
+		}
+
+		return(ret);
+	}
+	
+	protected Role findRole(Interaction interaction, boolean from) {
+		Role ret=null;
+
+		if (from) {
+			ret = interaction.getFromRole();
+			
+			if (ret == null && interaction.getChannel() != null) {
+				ret = interaction.getChannel().getFromRole();
+			}
+			
+			// If no 'from' role found, and if a 'to' role has
+			// been explicitly defined, then check if 'from' role
+			// can be inferred from the definition's located role
+			if (ret == null) {
+				Role other=interaction.getToRole();
+
+				if (other == null && interaction.getChannel() != null) {
+					other = interaction.getChannel().getToRole();
+				}
+				
+				if (other != null) {
+					Definition defn=interaction.getEnclosingDefinition();
+					
+					if (defn != null && defn.getLocatedName() != null) {
+						ret = defn.getLocatedName().getRole();
+						
+						// Check that role is not the same as the 'to'
+						// role
+						if (ret != null && ret.equals(other)) {
+							ret = null;
+						}
+					}
+				}
+			}
+		} else {
+			ret = interaction.getToRole();
+			
+			if (ret == null && interaction.getChannel() != null) {
+				ret = interaction.getChannel().getToRole();
+			}
+			
+			// If no 'to' role found, and if a 'from' role has
+			// been explicitly defined, then check if 'to' role
+			// can be inferred from the definition's located role
+			if (ret == null) {
+				Role other=interaction.getFromRole();
+
+				if (other == null && interaction.getChannel() != null) {
+					other = interaction.getChannel().getFromRole();
+				}
+				
+				if (other != null) {
+					Definition defn=interaction.getEnclosingDefinition();
+					
+					if (defn != null && defn.getLocatedName() != null) {
+						ret = defn.getLocatedName().getRole();
+						
+						// Check that role is not the same as the 'from'
+						// role
+						if (ret != null && ret.equals(other)) {
+							ret = null;
+						}
+					}
+				}
+			}
+		}
+
+		return(ret);
+	}
+
+	private static Logger logger = Logger.getLogger("org.scribble.comparator");
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/comparator/LocalToLocalModelComparatorRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/comparator/LocalToLocalModelComparatorRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/comparator/LocalToLocalModelComparatorRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,100 @@
+/*
+ * Copyright 2007 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 24 Nov 2007 : Initial version created by gary
+ */
+package org.scribble.comparator;
+
+import java.util.logging.Logger;
+
+import org.scribble.model.*;
+import org.scribble.model.admin.ModelListener;
+import org.scribble.extensions.RegistryInfo;
+
+/**
+ * This class provides the protocol model comparator rule,
+ * for comparing a local protocol model for conformance
+ * against another reference local protocol model.
+ */
+ at RegistryInfo(extension=ComparatorRule.class)
+public class LocalToLocalModelComparatorRule implements ComparatorRule {
+
+	/**
+	 * This method determines whether the comparison rule is
+	 * associated with the supplied type.
+	 * 
+	 * @param obj The object to check
+	 * @return Whether the object is of a type supported by the
+	 * 					comparison rule
+	 */
+	public boolean isTypeSupported(ModelObject obj) {
+		return(obj instanceof Model);
+	}
+	
+	/**
+	 * This method determines whether the comparison rule is
+	 * appropriate for the supplied model objects.
+	 * 
+	 * @param main The main model object to be compared
+	 * @param ref The reference model object to be compared against
+	 * @return Whether the rule is relevant for the
+	 * 				model objects
+	 */
+	public boolean isComparisonSupported(ModelObject main, ModelObject ref) {
+		return(main instanceof Model &&
+				ref instanceof Model &&
+				((Model)main).isLocated() &&
+				((Model)ref).isLocated());
+	}
+	
+	/**
+	 * This method compares a model object against a reference
+	 * component to determine if they are equal.
+	 * 
+	 * @param context The context
+	 * @param main The main model object
+	 * @param reference The reference model object
+	 * @param l The model listener
+	 * @param deep Perform a deep compare
+	 * @return Whether the model objects are comparable
+	 */
+	public boolean compare(ComparatorContext context, ModelObject main,
+					ModelObject reference, ModelListener l, boolean deep) {
+		boolean ret=true;
+		Model mainpm=(Model)main;
+		Model refpm=(Model)reference;
+		
+		java.util.List<Definition> mdefns=mainpm.getDefinitions();
+		java.util.List<Definition> rdefns=refpm.getDefinitions();
+		
+		// TODO:
+		// If multiple models on either the main or reference side,
+		// then need to work through each pair to determine if they share
+		// common model references (implements/conformsTo).
+		
+		if (mdefns.size() == 1 && rdefns.size() == 1) {	
+			ret = context.compare(mdefns.get(0),
+					rdefns.get(0), l, deep);
+		} else {
+			logger.severe("CURRENTLY NOT MATCHING MULTIPLE DEFINITIONS PER MODEL");
+		}
+		
+		return(ret);
+	}
+		
+	private static Logger logger = Logger.getLogger("org.scribble.comparator");
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/comparator/MessageSignatureComparatorRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/comparator/MessageSignatureComparatorRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/comparator/MessageSignatureComparatorRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,117 @@
+/*
+ * Copyright 2007 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 24 Nov 2007 : Initial version created by gary
+ */
+package org.scribble.comparator;
+
+import org.scribble.model.*;
+import org.scribble.model.admin.ModelIssue;
+import org.scribble.model.admin.ModelListener;
+import org.scribble.model.resolutions.UpdateFromReferencedDescription;
+import org.scribble.extensions.RegistryInfo;
+
+/**
+ * This class provides the MessageSignature comparator rule.
+ */
+ at RegistryInfo(extension=ComparatorRule.class)
+public class MessageSignatureComparatorRule implements ComparatorRule {
+
+	/**
+	 * This method determines whether the comparison rule is
+	 * associated with the supplied type.
+	 * 
+	 * @param obj The object to check
+	 * @return Whether the object is of a type supported by the
+	 * 					comparison rule
+	 */
+	public boolean isTypeSupported(ModelObject obj) {
+		return(obj instanceof MessageSignature);
+	}
+	
+	/**
+	 * This method determines whether the comparison rule is
+	 * appropriate for the supplied model objects.
+	 * 
+	 * @param main The main model object to be compared
+	 * @param ref The reference model object to be compared against
+	 * @return Whether the rule is relevant for the
+	 * 				model objects
+	 */
+	public boolean isComparisonSupported(ModelObject main, ModelObject ref) {
+		return(main instanceof MessageSignature &&
+				ref instanceof MessageSignature);
+	}
+	
+	/**
+	 * This method compares a model object against a reference
+	 * component to determine if they are equal.
+	 * 
+	 * @param context The context
+	 * @param main The main model object
+	 * @param reference The reference model object
+	 * @param l The model listener
+	 * @param deep Perform a deep compare
+	 * @return Whether the model objects are comparable
+	 */
+	public boolean compare(ComparatorContext context, ModelObject main,
+					ModelObject reference, ModelListener l, boolean deep) {
+		boolean ret=false;
+		MessageSignature m=(MessageSignature)main;
+		MessageSignature r=(MessageSignature)reference;
+		
+		if (m.getOperation() == null &&
+				r.getOperation() == null) {
+			ret = true;
+		} else if (m.getOperation() != null &&
+				r.getOperation() != null &&
+				m.getOperation().equals(r.getOperation())) {
+			ret = true;
+		} else if (m.getOperation() == null) {
+			ret = true;
+		}
+		
+		if (ret && m.getTypes().size() == r.getTypes().size()) {
+			
+			for (int i=0; ret && i < m.getTypes().size(); i++) {
+				
+				ret = context.compare(m.getTypes().get(i),
+							r.getTypes().get(i), l, deep);
+			}
+		} else {
+			String mesg=org.scribble.util.MessageUtil.format(
+					java.util.PropertyResourceBundle.getBundle(
+					"org.scribble.comparator.Messages").
+					getString("_MSIG_MISMATCH"),
+					new String[]{r.toString()});
+			
+			ModelIssue issue=new ModelIssue(m, mesg);
+			
+			UpdateFromReferencedDescription res=
+					new UpdateFromReferencedDescription();
+			res.setModel(context.getReferenceSource());
+			res.setSourceReference(r.getSource());
+			
+			issue.getResolutions().add(res);
+			
+			l.error(issue);
+		}
+		
+		return(ret);
+	}
+	
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/comparator/Messages.properties
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/comparator/Messages.properties	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/comparator/Messages.properties	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,26 @@
+# /*
+# * Copyright 2007 Pi4 Technologies Ltd
+# *
+# * Licensed under the Apache License, Version 2.0 (the "License");
+# * you may not use this file except in compliance with the License.
+# * You may obtain a copy of the License at
+# *
+# *     http://www.apache.org/licenses/LICENSE-2.0
+# *
+# * Unless required by applicable law or agreed to in writing, software
+# * distributed under the License is distributed on an "AS IS" BASIS,
+# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# * See the License for the specific language governing permissions and
+# * limitations under the License.
+# *
+# *
+# * Change History:
+# * 27 Nov 2007 : Initial version created by gary
+# */
+
+_CHANNEL_MISMATCH=Channel mismatch, found '{0}' but expecting '{1}'
+_INTERACTION_DIRECTION_MISMATCH=Interactions have incompatible directions
+_MSIG_MISMATCH=Message signature mismatch with referenced description, was expecting '{0}'
+_ROLE_MISMATCH=Role mismatch, found '{0}' but expecting '{1}'
+_TYPE_MISMATCH=Type mismatch with referenced description, was expecting '{0}'
+_UNEXPECTED_BEHAVIOUR=Behaviour not present in referenced description

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/comparator/NameMap.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/comparator/NameMap.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/comparator/NameMap.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,38 @@
+/*
+ * Copyright 2007 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 7 Dec 2007 : Initial version created by gary
+ */
+package org.scribble.comparator;
+
+/**
+ * This interface represents a component that maps names
+ * to other previously used names.
+ */
+public interface NameMap {
+
+	/**
+	 * This method returns the name that has been mapped
+	 * to the supplied name. If the supplied name has
+	 * no mapping, then the same name will be returned.
+	 * 
+	 * @param name The current name
+	 * @return The original name
+	 */
+	public String getName(String name);
+	
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/comparator/NamespaceComparatorRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/comparator/NamespaceComparatorRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/comparator/NamespaceComparatorRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,84 @@
+/*
+ * Copyright 2007 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 27 Nov 2007 : Initial version created by gary
+ */
+package org.scribble.comparator;
+
+import org.scribble.model.*;
+import org.scribble.model.admin.ModelListener;
+import org.scribble.extensions.RegistryInfo;
+
+/**
+ * This class provides the Namespace comparator rule.
+ */
+ at RegistryInfo(extension=ComparatorRule.class)
+public class NamespaceComparatorRule implements ComparatorRule {
+
+	/**
+	 * This method determines whether the comparison rule is
+	 * associated with the supplied type.
+	 * 
+	 * @param obj The object to check
+	 * @return Whether the object is of a type supported by the
+	 * 					comparison rule
+	 */
+	public boolean isTypeSupported(ModelObject obj) {
+		return(obj instanceof Namespace);
+	}
+	
+	/**
+	 * This method determines whether the comparison rule is
+	 * appropriate for the supplied model objects.
+	 * 
+	 * @param main The main model object to be compared
+	 * @param ref The reference model object to be compared against
+	 * @return Whether the rule is relevant for the
+	 * 				model objects
+	 */
+	public boolean isComparisonSupported(ModelObject main, ModelObject ref) {
+		return(main instanceof Namespace &&
+				ref instanceof Namespace);
+	}
+	
+	/**
+	 * This method compares a model object against a reference
+	 * component to determine if they are equal.
+	 * 
+	 * @param context The context
+	 * @param main The main model object
+	 * @param reference The reference model object
+	 * @param l The model listener
+	 * @param deep Perform a deep compare
+	 * @return Whether the model objects are comparable
+	 */
+	public boolean compare(ComparatorContext context, ModelObject main,
+					ModelObject reference, ModelListener l, boolean deep) {
+		boolean ret=false;
+		Namespace mainns=(Namespace)main;
+		Namespace refns=(Namespace)reference;
+		
+		// Check, with relevant mapping from context, that the
+		// namespaces are equivalent
+		if (mainns.getName().equals(refns.getName())) {
+			ret = true;
+		}
+		
+		return(ret);
+	}
+	
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/comparator/RoleComparatorRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/comparator/RoleComparatorRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/comparator/RoleComparatorRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,94 @@
+/*
+ * Copyright 2007 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 6 Dec 2007 : Initial version created by gary
+ */
+package org.scribble.comparator;
+
+import org.scribble.model.*;
+import org.scribble.model.admin.ModelIssue;
+import org.scribble.model.admin.ModelListener;
+import org.scribble.extensions.RegistryInfo;
+
+/**
+ * This class provides the Role comparator rule.
+ */
+ at RegistryInfo(extension=ComparatorRule.class)
+public class RoleComparatorRule implements ComparatorRule {
+
+	/**
+	 * This method determines whether the comparison rule is
+	 * associated with the supplied type.
+	 * 
+	 * @param obj The object to check
+	 * @return Whether the object is of a type supported by the
+	 * 					comparison rule
+	 */
+	public boolean isTypeSupported(ModelObject obj) {
+		return(obj instanceof Role);
+	}
+	
+	/**
+	 * This method determines whether the comparison rule is
+	 * appropriate for the supplied model objects.
+	 * 
+	 * @param main The main model object to be compared
+	 * @param ref The reference model object to be compared against
+	 * @return Whether the rule is relevant for the
+	 * 				model objects
+	 */
+	public boolean isComparisonSupported(ModelObject main, ModelObject ref) {
+		return(main instanceof Role &&
+				ref instanceof Role);
+	}
+	
+	/**
+	 * This method compares a model object against a reference
+	 * component to determine if they are equal.
+	 * 
+	 * @param context The context
+	 * @param main The main model object
+	 * @param reference The reference model object
+	 * @param l The model listener
+	 * @param deep Perform a deep compare
+	 * @return Whether the model objects are comparable
+	 */
+	public boolean compare(ComparatorContext context, ModelObject main,
+					ModelObject reference, ModelListener l, boolean deep) {
+		boolean ret=false;
+		Role mainr=(Role)main;
+		Role refr=(Role)reference;
+
+		String mainName=context.getMainName(mainr.getName());
+		String refName=context.getReferenceName(refr.getName());
+		
+		ret = mainName.equals(refName);
+		
+		if (ret == false) {
+			String mesg=org.scribble.util.MessageUtil.format(
+					java.util.PropertyResourceBundle.getBundle(
+					"org.scribble.comparator.Messages").
+					getString("_ROLE_MISMATCH"),
+							new String[]{mainName, refName});
+			
+			l.error(new ModelIssue(main, mesg));
+		}
+
+		return(ret);
+	}
+	
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/comparator/TypeReferenceComparatorRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/comparator/TypeReferenceComparatorRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/comparator/TypeReferenceComparatorRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,105 @@
+/*
+ * Copyright 2005-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 21 Oct 2008 : Initial version created by gary
+ */
+package org.scribble.comparator;
+
+import org.scribble.model.*;
+import org.scribble.model.admin.ModelIssue;
+import org.scribble.model.admin.ModelListener;
+import org.scribble.model.resolutions.UpdateFromReferencedDescription;
+import org.scribble.extensions.RegistryInfo;
+
+/**
+ * This class provides the TypeReference comparator rule.
+ */
+ at RegistryInfo(extension=ComparatorRule.class)
+public class TypeReferenceComparatorRule implements ComparatorRule {
+
+	/**
+	 * This method determines whether the comparison rule is
+	 * associated with the supplied type.
+	 * 
+	 * @param obj The object to check
+	 * @return Whether the object is of a type supported by the
+	 * 					comparison rule
+	 */
+	public boolean isTypeSupported(ModelObject obj) {
+		return(obj instanceof TypeReference);
+	}
+	
+	/**
+	 * This method determines whether the comparison rule is
+	 * appropriate for the supplied model objects.
+	 * 
+	 * @param main The main model object to be compared
+	 * @param ref The reference model object to be compared against
+	 * @return Whether the rule is relevant for the
+	 * 				model objects
+	 */
+	public boolean isComparisonSupported(ModelObject main, ModelObject ref) {
+		return(main instanceof TypeReference &&
+				ref instanceof TypeReference);
+	}
+	
+	/**
+	 * This method compares a model object against a reference
+	 * component to determine if they are equal.
+	 * 
+	 * @param context The context
+	 * @param main The main model object
+	 * @param reference The reference model object
+	 * @param l The model listener
+	 * @param deep Perform a deep compare
+	 * @return Whether the model objects are comparable
+	 */
+	public boolean compare(ComparatorContext context, ModelObject main,
+					ModelObject reference, ModelListener l, boolean deep) {
+		boolean ret=false;
+		TypeReference mtr=(TypeReference)main;
+		TypeReference rtr=(TypeReference)reference;
+		
+		if ((ret = mtr.equals(rtr)) == false) {
+			String text=rtr.getAlias();
+			
+			if (rtr.getNamespace() != null) {
+				text = "{"+rtr.getNamespace()+"}"+text;
+			}
+			
+			String mesg=org.scribble.util.MessageUtil.format(
+					java.util.PropertyResourceBundle.getBundle(
+					"org.scribble.comparator.Messages").
+					getString("_TYPE_MISMATCH"),
+					new String[]{text});
+			
+			ModelIssue issue=new ModelIssue(mtr, mesg);
+			
+			UpdateFromReferencedDescription res=
+					new UpdateFromReferencedDescription();
+			res.setModel(context.getReferenceSource());
+			res.setSourceReference(rtr.getSource());
+			
+			issue.getResolutions().add(res);
+			
+			l.error(issue);
+		}
+	
+		return(ret);
+	}
+	
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/editor/AbstractEditorManager.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/editor/AbstractEditorManager.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/editor/AbstractEditorManager.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,39 @@
+/*
+ * Copyright 2005-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 19 Jun 2008 : Initial version created by gary
+ */
+package org.scribble.editor;
+
+import org.scribble.model.admin.ModelIssue;
+
+/**
+ * This abstract represents a base editor manager.
+ */
+public abstract class AbstractEditorManager implements EditorManager {
+
+	/**
+	 * This method enriches the set of properties required
+	 * by the editor, using the properties associated with
+	 * the model issue.
+	 * 
+	 * @param issue The model issue
+	 */
+	public void enrich(ModelIssue issue) {
+	}
+	
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/editor/EditorManager.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/editor/EditorManager.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/editor/EditorManager.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,50 @@
+/*
+ * Copyright 2005-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 19 Jun 2008 : Initial version created by gary
+ */
+package org.scribble.editor;
+
+import org.scribble.model.*;
+import org.scribble.model.admin.ModelIssue;
+
+/**
+ * This interface represents an editor.
+ */
+public interface EditorManager {
+
+	/**
+	 * This method focuses the editor on the specified source,
+	 * identified by the model reference and source reference.
+	 * 
+	 * @param mref The model reference
+	 * @param sref The component source reference
+	 * @param prop Additional properties
+	 */
+	public void focus(ModelReference mref, SourceRef sref,
+					java.util.Map<String,Object> props);
+	
+	/**
+	 * This method enriches the set of properties required
+	 * by the editor, using the properties associated with
+	 * the model issue.
+	 * 
+	 * @param issue The model issue
+	 */
+	public void enrich(ModelIssue issue);
+	
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/export/AbstractFormatter.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/export/AbstractFormatter.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/export/AbstractFormatter.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,126 @@
+/*
+ * Copyright 2007 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 13 Dec 2007 : Initial version created by gary
+ */
+package org.scribble.export;
+
+/**
+ * This class provides the abstract implementation for
+ * the formatter.
+ */
+public abstract class AbstractFormatter implements Formatter {
+	
+	/**
+	 * This is the constructor for the abstract formatter.
+	 * 
+	 * @param format The format
+	 */
+	public AbstractFormatter(String format) {
+		m_format = format;
+	}
+
+	/**
+	 * This method returns the format associated with the formatter.
+	 * 
+	 * @return The format
+	 */
+	public String getFormat() {
+		return(m_format);
+	}
+	
+	/**
+	 * This method instructs the formatter to start the block.
+	 */
+	public void startBlock() throws java.io.IOException {
+		m_level++;
+	}
+
+	/**
+	 * This method instructs the formatter to end the block.
+	 *
+	 * @throws IOException Failed to end block
+	 */
+	public void endBlock() throws java.io.IOException {
+		m_level--;
+	}
+		
+	/**
+	 * This method instructs the formatter to start the statement.
+	 */
+	protected void startStatement() throws java.io.IOException {
+	}
+
+	/**
+	 * This method instructs the formatter to end the statement.
+	 */
+	protected void endStatement() throws java.io.IOException {
+	}
+	
+	/**
+	 * This method returns the current level, with zero being the
+	 * outer level.
+	 * 
+	 * @return The current level
+	 */
+	public int getLevel() {
+		return(m_level);
+	}
+
+	/**
+	 * This method sets the value associated with the supplied
+	 * name in the current state.
+	 * 
+	 * @param name The state name
+	 * @param value The state value
+	 */
+	public void setState(String name, Object value) {
+		
+	}
+		
+	/**
+	 * This method pushes the current set of declarations onto the
+	 * stack.
+	 */
+	protected void pushState() {
+		
+	}
+	
+	/**
+	 * This method pops the current set of declarations off the stack.
+	 */
+	protected void popState() {
+		
+	}
+	
+	/**
+	 * This method pushes the current scope onto a stack.
+	 */
+	protected void pushScope() {
+		
+	}
+	
+	/**
+	 * This method pops the current scope from the stack.
+	 */
+	protected void popScope() {
+		
+	}
+	
+	private String m_format=null;
+	private int m_level=0;
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/export/DefaultExporter.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/export/DefaultExporter.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/export/DefaultExporter.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,58 @@
+/*
+ * Copyright 2007 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 13 Dec 2007 : Initial version created by gary
+ */
+package org.scribble.export;
+
+import org.scribble.extensions.RegistryInfo;
+import org.scribble.model.*;
+
+/**
+ * This class provides the default implementation for the
+ * exporter interface.
+ */
+ at RegistryInfo(extension=Exporter.class,isService=true)
+public class DefaultExporter implements Exporter {
+	
+	/**
+	 * This is the default constructor.
+	 */
+	public DefaultExporter() {
+	}
+
+	/**
+	 * This method exports the supplied model object to the supplied
+	 * formatter.
+	 * 
+	 * @param ref The model reference associated with the model object
+	 * @param modelObject The model object
+	 * @param formatter The formatter
+	 * @throws IOException Failed to export model
+	 */
+	public void export(ModelReference ref, ModelObject modelObject,
+					Formatter formatter) throws java.io.IOException {
+		java.util.List<Object> rules=
+			org.scribble.extensions.RegistryFactory.getRegistry().
+						getExtensions(ExportRule.class, ref.getNotation());
+		
+		ExporterContext context=
+			new DefaultExporterContext(ref, formatter, rules);
+		
+		context.export(modelObject);
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/export/DefaultExporterContext.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/export/DefaultExporterContext.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/export/DefaultExporterContext.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,195 @@
+/*
+ * Copyright 2005-9 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 10 May 2009 : Initial version created by gary
+ */
+package org.scribble.export;
+
+import java.util.logging.Logger;
+
+import org.scribble.model.Behaviour;
+import org.scribble.model.Block;
+import org.scribble.model.Declaration;
+import org.scribble.model.ModelInclude;
+import org.scribble.model.ModelObject;
+import org.scribble.model.ModelReference;
+import org.scribble.model.Statement;
+
+public class DefaultExporterContext implements ExporterContext {
+
+	public DefaultExporterContext(ModelReference ref, Formatter formatter,
+			java.util.List<Object> rules) {
+		m_source = ref;
+		m_formatter = formatter;
+		m_rules = rules;
+	}
+	
+	/**
+	 * This method returns the source model reference for the
+	 * model being exported.
+	 * 
+	 * @return The model reference of the source being exported
+	 */
+	public ModelReference getSource() {
+		return(m_source);
+	}
+	
+	/**
+	 * This method returns the formatter being used by
+	 * the exporter.
+	 * 
+	 * @return The formatter
+	 */
+	public Formatter getFormatter() {
+		return(m_formatter);
+	}
+	
+	/**
+	 * This method pushes the supplied object onto a stack,
+	 * for later use by a higher level rule.
+	 * 
+	 * @param obj The object to push on the stack
+	 */
+	public void push(Object obj) {
+		m_stack.add(obj);
+	}
+	
+	/**
+	 * This method pops the object from the top of the stack.
+	 * 
+	 * @return The object on the top of the stack, or
+	 * 				null if no objects remain on the stack
+	 */
+	public Object pop() {
+		Object ret=null;
+	
+		if (m_stack.size() > 0) {
+			ret = m_stack.remove(m_stack.size()-1);
+		}
+		
+		return(ret);
+	}
+	
+	public void export(ModelObject obj) throws java.io.IOException {
+		boolean f_groupingStructure=false;
+		
+		logger.fine("Export "+obj);
+		
+		if (obj != null) {
+			if (obj instanceof Behaviour &&
+						((Behaviour)obj).isScope()) {
+				
+				if (m_formatter instanceof AbstractFormatter) {
+					((AbstractFormatter)m_formatter).pushScope();
+				}
+			}
+			
+			// Check if object has a block property
+			java.beans.BeanInfo bi=null;
+			
+			try {
+				bi = java.beans.Introspector.getBeanInfo(obj.getClass());
+			} catch(Exception e) {
+				logger.log(java.util.logging.Level.SEVERE,
+						"Failed to get bean info for class '"+
+						obj.getClass()+"'", e);
+			}
+			
+			if (bi != null) {
+				java.beans.PropertyDescriptor[] pds=bi.getPropertyDescriptors();
+			
+				for (int i=0; f_groupingStructure == false &&
+								i < pds.length; i++) {
+					Class<?> cls=pds[i].getReadMethod().getReturnType();
+					java.lang.reflect.Type type=pds[i].getReadMethod().getGenericReturnType();
+					
+					if (cls == Block.class ||
+							(cls == java.util.List.class &&
+							type instanceof java.lang.reflect.ParameterizedType &&
+							((java.lang.reflect.ParameterizedType)type).getActualTypeArguments()[0] == Block.class)) {
+						f_groupingStructure = true;
+					}
+				}
+			}
+			
+			if (obj instanceof Block) {
+				f_groupingStructure = true;
+				
+				if (m_formatter instanceof AbstractFormatter) {
+					((AbstractFormatter)m_formatter).pushState();
+				
+					//((AbstractFormatter)m_formatter).startBlock();
+				}
+				
+			} else if (obj instanceof ModelInclude &&
+					((ModelInclude)obj).isInline()) {
+				f_groupingStructure = true;
+				
+			} else if (f_groupingStructure == false &&
+						obj instanceof Statement) {
+	
+				if (m_formatter instanceof AbstractFormatter) {
+					((AbstractFormatter)m_formatter).startStatement();
+				}
+			}
+			
+			for (int i=0; i < m_rules.size(); i++) {
+				ExportRule rule=(ExportRule)m_rules.get(i);
+				
+				if (rule.isSupported(obj, m_formatter)) {
+					rule.export(obj, this);
+				}
+			}
+			
+			if (obj instanceof Declaration) {
+				if (m_formatter instanceof AbstractFormatter) {
+					((AbstractFormatter)m_formatter).setState(
+							((Declaration)obj).getName(), obj);
+				}
+			}
+			
+			if (obj instanceof Block) {
+				
+				if (m_formatter instanceof AbstractFormatter) {
+					//((AbstractFormatter)m_formatter).endBlock();
+				
+					((AbstractFormatter)m_formatter).popState();
+				}
+				
+			} else if (f_groupingStructure == false &&
+						obj instanceof Statement) {
+				if (m_formatter instanceof AbstractFormatter) {
+					((AbstractFormatter)m_formatter).endStatement();		
+				}
+			}
+	
+			if (obj instanceof Behaviour &&
+							((Behaviour)obj).isScope()) {
+				if (m_formatter instanceof AbstractFormatter) {
+					((AbstractFormatter)m_formatter).popScope();
+				}
+			}
+		}
+	}
+	
+	private static Logger logger = Logger.getLogger("org.scribble.export");
+
+	private ModelReference m_source=null;
+	private Formatter m_formatter=null;
+	private java.util.List<Object> m_rules=null;
+	private java.util.List<Object> m_stack=new java.util.Vector<Object>();
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/export/ExportRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/export/ExportRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/export/ExportRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,51 @@
+/*
+ * Copyright 2007 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 13 Dec 2007 : Initial version created by gary
+ */
+package org.scribble.export;
+
+import org.scribble.model.*;
+
+/**
+ * This interface represents a rule used to export the model,
+ * based on a specified rule.
+ */
+public interface ExportRule {
+
+	/**
+	 * This method determines whether the exporter rule is appropriate
+	 * for the supplied model object and format.
+	 * 
+	 * @param modelObject The model object
+	 * @param format The format
+	 * @return Whether the rule is appropriate for the model object and
+	 * 						format
+	 */
+	public boolean isSupported(ModelObject modelObject, Formatter format);
+	
+	/**
+	 * This method exports the model object.
+	 * 
+	 * @param modelObject The model object
+	 * @param context The context
+	 * @throws IOException Failed to record export information
+	 */
+	public void export(ModelObject modelObject, ExporterContext context)
+							throws java.io.IOException;
+	
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/export/Exporter.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/export/Exporter.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/export/Exporter.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,41 @@
+/*
+ * Copyright 2007 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 13 Dec 2007 : Initial version created by gary
+ */
+package org.scribble.export;
+
+import org.scribble.model.*;
+
+/**
+ * This interface represents the Exporter for Scribble models.
+ */
+public interface Exporter {
+
+	/**
+	 * This method exports the supplied model object to the supplied
+	 * formatter.
+	 * 
+	 * @param ref The model reference associated with the model object
+	 * @param modelObject The model object
+	 * @param formatter The formatter
+	 * @throws IOException Failed to export model
+	 */
+	public void export(ModelReference ref, ModelObject modelObject,
+					Formatter formatter) throws java.io.IOException;
+
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/export/ExporterContext.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/export/ExporterContext.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/export/ExporterContext.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,69 @@
+/*
+ * Copyright 2007 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 13 Dec 2007 : Initial version created by gary
+ */
+package org.scribble.export;
+
+import org.scribble.model.*;
+
+/**
+ * This interface represents the context provided to exporter rules.
+ */
+public interface ExporterContext {
+
+	/**
+	 * This method returns the source model reference for the
+	 * model being exported.
+	 * 
+	 * @return The model reference of the source being exported
+	 */
+	public ModelReference getSource();
+	
+	/**
+	 * This method returns the formatter being used by
+	 * the exporter.
+	 * 
+	 * @return The formatter
+	 */
+	public Formatter getFormatter();
+
+	/**
+	 * This method pushes the supplied object onto a stack,
+	 * for later use by a higher level rule.
+	 * 
+	 * @param obj The object to push on the stack
+	 */
+	public void push(Object obj);
+	
+	/**
+	 * This method pops the object from the top of the stack.
+	 * 
+	 * @return The object on the top of the stack, or
+	 * 				null if no objects remain on the stack
+	 */
+	public Object pop();
+	
+	/**
+	 * This method exports the supplied model object.
+	 * 
+	 * @param modelObject The model object
+	 * @throws IOException Failed to export model object
+	 */
+	public void export(ModelObject modelObject) throws java.io.IOException;
+	
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/export/Formatter.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/export/Formatter.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/export/Formatter.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,35 @@
+/*
+ * Copyright 2007 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 13 Dec 2007 : Initial version created by gary
+ */
+package org.scribble.export;
+
+/**
+ * This interface represents the formatter used to represent information
+ * based on a specific format.
+ */
+public interface Formatter {
+
+	/**
+	 * This method returns the format associated with the formatter.
+	 * 
+	 * @return The format
+	 */
+	public String getFormat();
+	
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/export/monitor/AbstractModelMonitorExportRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/export/monitor/AbstractModelMonitorExportRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/export/monitor/AbstractModelMonitorExportRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,62 @@
+/*
+ * Copyright 2007-9 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 10 May 2009 : Initial version created by gary
+ */
+package org.scribble.export.monitor;
+
+import org.scribble.export.*;
+import org.scribble.model.*;
+
+/**
+ * This class implements the monitor based export rule for the
+ * Model entity.
+ */
+public abstract class AbstractModelMonitorExportRule implements ExportRule {
+
+	/**
+	 * This method determines whether the exporter rule is appropriate
+	 * for the supplied model object and format.
+	 * 
+	 * @param modelObject The model object
+	 * @param format The format
+	 * @return Whether the rule is appropriate for the model object and
+	 * 						format
+	 */
+	public boolean isSupported(ModelObject modelObject, Formatter format) {
+		return(Model.class.isAssignableFrom(modelObject.getClass()) &&
+				format instanceof MonitorFormatter);
+	}
+
+	/**
+	 * This method exports the model object.
+	 * 
+	 * @param modelObject The model object
+	 * @param context The context
+	 * @throws IOException Failed to record export information
+	 */
+	public void export(ModelObject modelObject, ExporterContext context)
+							throws java.io.IOException {
+		Model model=(Model)modelObject;
+		
+		context.export(model.getNamespace());
+				
+		for (int i=0; i < model.getImports().size(); i++) {
+			context.export(model.getImports().get(i));
+		}
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/export/monitor/MonitorFormatter.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/export/monitor/MonitorFormatter.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/export/monitor/MonitorFormatter.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,60 @@
+/*
+ * Copyright 2007-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 12 Sept 2008 : Initial version created by gary
+ */
+package org.scribble.export.monitor;
+
+import org.scribble.export.*;
+import  org.scribble.monitor.model.ConversationType;
+
+/**
+ * This class provides the monitor based implementation of the
+ * Formatter interface, used to export the monitor model from
+ * a Scribble local model.
+ */
+public class MonitorFormatter extends AbstractFormatter {
+
+	/**
+	 * The default constructor.
+	 */
+	public MonitorFormatter() {
+		super(MONITOR_FORMAT);
+	}
+	
+	/**
+	 * This method returns the monitor description.
+	 * 
+	 * @return The monitor description
+	 */
+	public ConversationType getDescription() {
+		return(m_description);
+	}
+	
+	/**
+	 * This method sets the monitoring description node.
+	 * 
+	 * @param desc The monitor description
+	 */
+	public void setDescription(ConversationType desc) {
+		m_description = desc;
+	}
+	
+	public static final String MONITOR_FORMAT="Monitor";
+	
+	private ConversationType m_description=null;
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/export/stream/AbstractModelStreamExportRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/export/stream/AbstractModelStreamExportRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/export/stream/AbstractModelStreamExportRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,76 @@
+/*
+ * Copyright 2007-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 12 Sept 2008 : Initial version created by gary
+ */
+package org.scribble.export.stream;
+
+import org.scribble.export.*;
+import org.scribble.model.*;
+
+/**
+ * This class implements the stream based export rule for the
+ * Model entity.
+ */
+public abstract class AbstractModelStreamExportRule implements ExportRule {
+
+	/**
+	 * This method determines whether the exporter rule is appropriate
+	 * for the supplied model object and format.
+	 * 
+	 * @param modelObject The model object
+	 * @param format The format
+	 * @return Whether the rule is appropriate for the model object and
+	 * 						format
+	 */
+	public boolean isSupported(ModelObject modelObject, Formatter format) {
+		return(Model.class.isAssignableFrom(modelObject.getClass()) &&
+				format instanceof StreamFormatter);
+	}
+
+	/**
+	 * This method exports the model object.
+	 * 
+	 * @param modelObject The model object
+	 * @param context The context
+	 * @throws IOException Failed to record export information
+	 */
+	public void export(ModelObject modelObject, ExporterContext context)
+							throws java.io.IOException {
+		Model model=(Model)modelObject;
+		StreamFormatter formatter    =(StreamFormatter)context.getFormatter();
+		
+		org.scribble.export.Exporter exp=(org.scribble.export.Exporter)
+			org.scribble.extensions.RegistryFactory.getRegistry().getExtension(
+				org.scribble.export.Exporter.class, null);
+		
+		if (exp != null) {
+			org.scribble.export.text.TextFormatter textformatter=
+				new org.scribble.export.text.TextFormatter();
+			
+			java.io.ByteArrayOutputStream os=
+					new java.io.ByteArrayOutputStream();
+			
+			textformatter.setOutputStream(os);
+			
+			exp.export(context.getSource(), model, textformatter);
+			
+			formatter.record(os.toByteArray());
+		}
+	}
+	
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/export/stream/StreamFormatter.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/export/stream/StreamFormatter.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/export/stream/StreamFormatter.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,83 @@
+/*
+ * Copyright 2007-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 12 Sept 2008 : Initial version created by gary
+ */
+package org.scribble.export.stream;
+
+import org.scribble.export.*;
+
+/**
+ * This class provides the stream based implementation of the
+ * Formatter interface.
+ */
+public class StreamFormatter extends AbstractFormatter {
+
+	/**
+	 * The default constructor.
+	 */
+	public StreamFormatter() {
+		super(STREAM_FORMAT);
+	}
+	
+	/**
+	 * This method sets the output stream to use with the formatter.
+	 * 
+	 * @param os The output stream
+	 */
+	public void setOutputStream(java.io.OutputStream os) {
+		m_outputStream = os;
+	}
+	
+	/**
+	 * This method returns the output stream.
+	 * 
+	 * @return The output stream
+	 */
+	public java.io.OutputStream getOutputStream() {
+		return(m_outputStream);
+	}
+	
+	/**
+	 * This method records the supplied text.
+	 * 
+	 * @param value The information to record
+	 * @throws IOException Failed to record text
+	 */
+	public void record(Object value) throws java.io.IOException {
+		if (value instanceof byte[]) {
+			m_outputStream.write((byte[])value);
+		} else if (value instanceof String) {
+			m_outputStream.write(((String)value).getBytes());
+		}
+	}
+	
+	/**
+	 * This method closes the formatter.
+	 * 
+	 * @throws IOException Failed to close formatter
+	 */
+	public void close() throws java.io.IOException {
+		if (m_outputStream != null) {
+			m_outputStream.close();
+		}
+	}
+
+	public static final String STREAM_FORMAT="Stream";
+	
+	private java.io.OutputStream m_outputStream=null;
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/export/text/AbstractBlockTextExportRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/export/text/AbstractBlockTextExportRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/export/text/AbstractBlockTextExportRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,50 @@
+/*
+ * Copyright 2007 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 20 Dec 2007 : Initial version created by gary
+ */
+package org.scribble.export.text;
+
+import org.scribble.export.*;
+import org.scribble.model.*;
+
+/**
+ * This class implements the text based export rule for the
+ * Block entity.
+ */
+public abstract class AbstractBlockTextExportRule implements ExportRule {
+
+	/**
+	 * This method exports the model object.
+	 * 
+	 * @param modelObject The model object
+	 * @param context The context
+	 * @throws IOException Failed to record export information
+	 */
+	public void export(ModelObject modelObject, ExporterContext context)
+							throws java.io.IOException {
+		Block block=(Block)modelObject;
+		
+		((TextFormatter)context.getFormatter()).startBlock();
+		
+		for (int i=0; i < block.getContents().size(); i++) {
+			context.export(block.getContents().get(i));
+		}
+
+		((TextFormatter)context.getFormatter()).endBlock();
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/export/text/AbstractModelReferenceTextExportRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/export/text/AbstractModelReferenceTextExportRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/export/text/AbstractModelReferenceTextExportRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,74 @@
+/*
+ * Copyright 2007 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 20 Dec 2007 : Initial version created by gary
+ */
+package org.scribble.export.text;
+
+import org.scribble.export.*;
+import org.scribble.model.*;
+
+/**
+ * This class implements the text based export rule for the
+ * ModelReference entity.
+ */
+public abstract class AbstractModelReferenceTextExportRule implements ExportRule {
+
+	/**
+	 * This method determines whether the exporter rule is appropriate
+	 * for the supplied model object and format.
+	 * 
+	 * @param modelObject The model object
+	 * @param format The format
+	 * @return Whether the rule is appropriate for the model object and
+	 * 						format
+	 */
+	public boolean isSupported(ModelObject modelObject, Formatter format) {
+		return(ModelReference.class.isAssignableFrom(modelObject.getClass()) &&
+				format instanceof TextFormatter);
+	}
+
+	/**
+	 * This method exports the model object.
+	 * 
+	 * @param modelObject The model object
+	 * @param context The context
+	 * @throws IOException Failed to record export information
+	 */
+	public void export(ModelObject modelObject, ExporterContext context)
+							throws java.io.IOException {
+		ModelReference ref=(ModelReference)modelObject;
+		TextFormatter formatter=(TextFormatter)context.getFormatter();
+		
+		if (ref.isFullyQualified()) {
+			formatter.record(ref.getNamespace()+"."+
+							ref.getLocalpart());
+		} else {
+			formatter.record(ref.getAlias());
+		}
+		
+		if (ref.getLocatedRole() != null) {
+			
+			// Check if sub-definition path defined
+			for (int i=0; i < ref.getSubDefinitionPath().getPathElementCount(); i++) {
+				formatter.record("$"+ref.getSubDefinitionPath().getPathElement(i));				
+			}
+			
+			formatter.record("@"+ref.getLocatedRole());
+		}
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/export/text/AbstractModelTextExportRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/export/text/AbstractModelTextExportRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/export/text/AbstractModelTextExportRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,69 @@
+/*
+ * Copyright 2007 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 17 Dec 2007 : Initial version created by gary
+ */
+package org.scribble.export.text;
+
+import org.scribble.export.*;
+import org.scribble.model.*;
+
+/**
+ * This class implements the text based export rule for the
+ * Model entity.
+ */
+public abstract class AbstractModelTextExportRule implements ExportRule {
+
+	/**
+	 * This method determines whether the exporter rule is appropriate
+	 * for the supplied model object and format.
+	 * 
+	 * @param modelObject The model object
+	 * @param format The format
+	 * @return Whether the rule is appropriate for the model object and
+	 * 						format
+	 */
+	public boolean isSupported(ModelObject modelObject, Formatter format) {
+		return(Model.class.isAssignableFrom(modelObject.getClass()) &&
+				format instanceof TextFormatter);
+	}
+
+	/**
+	 * This method exports the model object.
+	 * 
+	 * @param modelObject The model object
+	 * @param context The context
+	 * @throws IOException Failed to record export information
+	 */
+	public void export(ModelObject modelObject, ExporterContext context)
+							throws java.io.IOException {
+		Model model=(Model)modelObject;
+		TextFormatter formatter=(TextFormatter)context.getFormatter();
+		
+		context.export(model.getNamespace());
+				
+		if (model.getImports().size() > 0) {
+			formatter.record("\r\n");
+		}
+		
+		for (int i=0; i < model.getImports().size(); i++) {
+			context.export(model.getImports().get(i));
+		}
+		
+		formatter.record("\r\n");
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/export/text/BlockTextExportRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/export/text/BlockTextExportRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/export/text/BlockTextExportRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,46 @@
+/*
+ * Copyright 2007 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 20 Dec 2007 : Initial version created by gary
+ */
+package org.scribble.export.text;
+
+import org.scribble.export.*;
+import org.scribble.extensions.RegistryInfo;
+import org.scribble.model.*;
+
+/**
+ * This class implements the text based export rule for the
+ * Block entity.
+ */
+ at RegistryInfo(extension=ExportRule.class)
+public class BlockTextExportRule extends AbstractBlockTextExportRule {
+
+	/**
+	 * This method determines whether the exporter rule is appropriate
+	 * for the supplied model object and format.
+	 * 
+	 * @param modelObject The model object
+	 * @param format The format
+	 * @return Whether the rule is appropriate for the model object and
+	 * 						format
+	 */
+	public boolean isSupported(ModelObject modelObject, Formatter format) {
+		return(modelObject.getClass() == Block.class &&
+				format instanceof TextFormatter);
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/export/text/ChannelListTextExportRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/export/text/ChannelListTextExportRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/export/text/ChannelListTextExportRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,68 @@
+/*
+ * Copyright 2007-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 9 Mar 2008 : Initial version created by gary
+ */
+package org.scribble.export.text;
+
+import org.scribble.export.*;
+import org.scribble.extensions.RegistryInfo;
+import org.scribble.model.*;
+
+/**
+ * This class implements the text based export rule for the
+ * ChannelList entity.
+ */
+ at RegistryInfo(extension=ExportRule.class)
+public class ChannelListTextExportRule implements ExportRule {
+
+	/**
+	 * This method determines whether the exporter rule is appropriate
+	 * for the supplied model object and format.
+	 * 
+	 * @param modelObject The model object
+	 * @param format The format
+	 * @return Whether the rule is appropriate for the model object and
+	 * 						format
+	 */
+	public boolean isSupported(ModelObject modelObject, Formatter format) {
+		return(ChannelList.class.isAssignableFrom(modelObject.getClass()) &&
+				format instanceof TextFormatter);
+	}
+
+	/**
+	 * This method exports the model object.
+	 * 
+	 * @param modelObject The model object
+	 * @param context The context
+	 * @throws IOException Failed to record export information
+	 */
+	public void export(ModelObject modelObject, ExporterContext context)
+							throws java.io.IOException {
+		ChannelList chlist=(ChannelList)modelObject;
+		TextFormatter formatter=(TextFormatter)context.getFormatter();
+		
+		formatter.record("channel\t");
+		
+		for (int i=0; i < chlist.getChannels().size(); i++) {
+			if (i > 0) {
+				formatter.record(", ");
+			}
+			context.export(chlist.getChannels().get(i));
+		}
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/export/text/ChannelTextExportRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/export/text/ChannelTextExportRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/export/text/ChannelTextExportRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,71 @@
+/*
+ * Copyright 2007-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 9 Mar 2008 : Initial version created by gary
+ */
+package org.scribble.export.text;
+
+import org.scribble.export.*;
+import org.scribble.extensions.RegistryInfo;
+import org.scribble.model.*;
+
+/**
+ * This class implements the text based export rule for the
+ * Channel entity.
+ */
+ at RegistryInfo(extension=ExportRule.class)
+public class ChannelTextExportRule implements ExportRule {
+
+	/**
+	 * This method determines whether the exporter rule is appropriate
+	 * for the supplied model object and format.
+	 * 
+	 * @param modelObject The model object
+	 * @param format The format
+	 * @return Whether the rule is appropriate for the model object and
+	 * 						format
+	 */
+	public boolean isSupported(ModelObject modelObject, Formatter format) {
+		return(Channel.class.isAssignableFrom(modelObject.getClass()) &&
+				format instanceof TextFormatter);
+	}
+
+	/**
+	 * This method exports the model object.
+	 * 
+	 * @param modelObject The model object
+	 * @param context The context
+	 * @throws IOException Failed to record export information
+	 */
+	public void export(ModelObject modelObject, ExporterContext context)
+							throws java.io.IOException {
+		Channel ch=(Channel)modelObject;
+		TextFormatter formatter=(TextFormatter)context.getFormatter();
+		
+		formatter.record(ch.getName());
+		
+		if (ch.getFromRole() != null) {
+			formatter.record(" from ");
+			context.export(ch.getFromRole());
+		}
+		
+		if (ch.getToRole() != null) {
+			formatter.record(" to ");
+			context.export(ch.getToRole());
+		}
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/export/text/ConformanceReferenceTextExportRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/export/text/ConformanceReferenceTextExportRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/export/text/ConformanceReferenceTextExportRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,67 @@
+/*
+ * Copyright 2007 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 20 Dec 2007 : Initial version created by gary
+ */
+package org.scribble.export.text;
+
+import org.scribble.export.*;
+import org.scribble.extensions.RegistryInfo;
+import org.scribble.model.*;
+
+/**
+ * This class implements the text based export rule for the
+ * ConformanceReference entity.
+ */
+ at RegistryInfo(extension=ExportRule.class)
+public class ConformanceReferenceTextExportRule
+					extends AbstractModelReferenceTextExportRule {
+
+	/**
+	 * This method determines whether the exporter rule is appropriate
+	 * for the supplied model object and format.
+	 * 
+	 * @param modelObject The model object
+	 * @param format The format
+	 * @return Whether the rule is appropriate for the model object and
+	 * 						format
+	 */
+	public boolean isSupported(ModelObject modelObject, Formatter format) {
+		return(super.isSupported(modelObject, format) &&
+				ConformanceReference.class.isAssignableFrom(modelObject.getClass()));
+	}
+
+	/**
+	 * This method exports the model object.
+	 * 
+	 * @param modelObject The model object
+	 * @param context The context
+	 * @throws IOException Failed to record export information
+	 */
+	public void export(ModelObject modelObject, ExporterContext context)
+							throws java.io.IOException {
+		ConformanceReference ref=(ConformanceReference)modelObject;
+		TextFormatter formatter=(TextFormatter)context.getFormatter();
+		
+		super.export(ref, context);
+		
+		if (ref.getNameMapping().size() > 0) {
+			formatter.record("(");
+			formatter.record(")");			
+		}
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/export/text/ImplementsReferenceTextExportRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/export/text/ImplementsReferenceTextExportRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/export/text/ImplementsReferenceTextExportRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,83 @@
+/*
+ * Copyright 2007 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 20 Dec 2007 : Initial version created by gary
+ */
+package org.scribble.export.text;
+
+import org.scribble.export.*;
+import org.scribble.extensions.RegistryInfo;
+import org.scribble.model.*;
+
+/**
+ * This class implements the text based export rule for the
+ * ImplementsReference entity.
+ */
+ at RegistryInfo(extension=ExportRule.class)
+public class ImplementsReferenceTextExportRule
+					extends AbstractModelReferenceTextExportRule {
+
+	/**
+	 * This method determines whether the exporter rule is appropriate
+	 * for the supplied model object and format.
+	 * 
+	 * @param modelObject The model object
+	 * @param format The format
+	 * @return Whether the rule is appropriate for the model object and
+	 * 						format
+	 */
+	public boolean isSupported(ModelObject modelObject, Formatter format) {
+		return(super.isSupported(modelObject, format) &&
+				ImplementsReference.class.isAssignableFrom(modelObject.getClass()));
+	}
+
+	/**
+	 * This method exports the model object.
+	 * 
+	 * @param modelObject The model object
+	 * @param context The context
+	 * @throws IOException Failed to record export information
+	 */
+	public void export(ModelObject modelObject, ExporterContext context)
+							throws java.io.IOException {
+		ImplementsReference ref=(ImplementsReference)modelObject;
+		TextFormatter formatter=(TextFormatter)context.getFormatter();
+		
+		super.export(ref, context);
+		
+		if (ref.getNameMapping().size() > 0) {
+			formatter.record("(");
+			
+			java.util.Iterator<String> iter=ref.getNameMapping().keySet().iterator();
+			boolean f_first=true;
+			
+			while (iter.hasNext()) {
+				String key=iter.next();
+				String value=ref.getNameMapping().get(key);
+				
+				if (f_first == false) {
+					formatter.record(", ");
+				}
+				formatter.record(value+" for "+key);
+				
+				f_first = false;
+			}
+			
+			formatter.record(")");			
+		}
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/export/text/ImportTextExportRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/export/text/ImportTextExportRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/export/text/ImportTextExportRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,67 @@
+/*
+ * Copyright 2007 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 17 Dec 2007 : Initial version created by gary
+ */
+package org.scribble.export.text;
+
+import org.scribble.export.*;
+import org.scribble.extensions.RegistryInfo;
+import org.scribble.model.*;
+
+/**
+ * This class implements the text based export rule for the
+ * Import entity.
+ */
+ at RegistryInfo(extension=ExportRule.class)
+public class ImportTextExportRule implements ExportRule {
+
+	/**
+	 * This method determines whether the exporter rule is appropriate
+	 * for the supplied model object and format.
+	 * 
+	 * @param modelObject The model object
+	 * @param format The format
+	 * @return Whether the rule is appropriate for the model object and
+	 * 						format
+	 */
+	public boolean isSupported(ModelObject modelObject, Formatter format) {
+		return(Import.class.isAssignableFrom(modelObject.getClass()) &&
+				format instanceof TextFormatter);
+	}
+
+	/**
+	 * This method exports the model object.
+	 * 
+	 * @param modelObject The model object
+	 * @param context The context
+	 * @throws IOException Failed to record export information
+	 */
+	public void export(ModelObject modelObject, ExporterContext context)
+							throws java.io.IOException {
+		Import elem=(Import)modelObject;
+		TextFormatter formatter=(TextFormatter)context.getFormatter();
+		
+		String alias="";
+		
+		if (elem.getAlias() != null) {
+			alias = " as "+elem.getAlias();
+		}
+		
+		formatter.record("import "+elem.getName()+alias);
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/export/text/InteractionTextExportRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/export/text/InteractionTextExportRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/export/text/InteractionTextExportRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,156 @@
+/*
+ * Copyright 2007 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 21 Dec 2007 : Initial version created by gary
+ */
+package org.scribble.export.text;
+
+import org.scribble.export.*;
+import org.scribble.extensions.RegistryInfo;
+import org.scribble.model.*;
+
+/**
+ * This class implements the text based export rule for the
+ * Interaction entity.
+ */
+ at RegistryInfo(extension=ExportRule.class) //,category=Interaction.class)
+public class InteractionTextExportRule implements ExportRule {
+
+	/**
+	 * This method exports the model object.
+	 * 
+	 * @param modelObject The model object
+	 * @param context The context
+	 */
+	public boolean isSupported(ModelObject modelObject, Formatter format) {
+		return(Interaction.class.isAssignableFrom(modelObject.getClass()) &&
+				format instanceof TextFormatter);
+	}
+
+	/**
+	 * This method exports the model object.
+	 * 
+	 * @param modelObject The model object
+	 * @param context The context
+	 * @throws IOException Failed to record export information
+	 */
+	public void export(ModelObject modelObject, ExporterContext context)
+							throws java.io.IOException {
+		Interaction interaction=(Interaction)modelObject;
+		
+		if (interaction.getMessageSignature() != null) {
+			context.export(interaction.getMessageSignature());
+		}
+		
+		exportFrom(interaction, context);
+		
+		exportTo(interaction, context);
+		
+		exportVia(interaction, context);
+		
+		exportRequestLabel(interaction, context);
+		
+		exportReplyToLabel(interaction, context);
+	}
+	
+	/**
+	 * This method exports the text related to an interactions
+	 * 'from' role.
+	 * 
+	 * @param interaction The interaction
+	 * @param context The export context
+	 * @throws java.io.IOException Failed to export information
+	 */
+	protected void exportFrom(Interaction interaction,
+			ExporterContext context) throws java.io.IOException {		
+		TextFormatter formatter=(TextFormatter)context.getFormatter();
+
+		if (interaction.getFromRole() != null) {
+			formatter.record(" from "+interaction.getFromRole().getName());
+		}
+	}
+	
+	/**
+	 * This method exports the text related to an interactions
+	 * 'to' role.
+	 * 
+	 * @param interaction The interaction
+	 * @param context The export context
+	 * @throws java.io.IOException Failed to export information
+	 */
+	protected void exportTo(Interaction interaction,
+			ExporterContext context) throws java.io.IOException {		
+		TextFormatter formatter=(TextFormatter)context.getFormatter();
+
+		if (interaction.getToRole() != null) {
+			formatter.record(" to "+interaction.getToRole().getName());
+		}
+	}
+	
+	/**
+	 * This method exports the text related to an interactions
+	 * 'via' channel.
+	 * 
+	 * @param interaction The interaction
+	 * @param context The export context
+	 * @throws java.io.IOException Failed to export information
+	 */
+	protected void exportVia(Interaction interaction,
+			ExporterContext context) throws java.io.IOException {		
+		TextFormatter formatter=(TextFormatter)context.getFormatter();
+
+		if (interaction.getChannel() != null) {
+			formatter.record(" via "+interaction.getChannel().getName());
+		}
+	}
+	
+	/**
+	 * This method exports the text related to an interactions
+	 * 'request' label.
+	 * 
+	 * @param interaction The interaction
+	 * @param context The export context
+	 * @throws java.io.IOException Failed to export information
+	 */
+	protected void exportRequestLabel(Interaction interaction,
+			ExporterContext context) throws java.io.IOException {		
+		TextFormatter formatter=(TextFormatter)context.getFormatter();
+
+		if (interaction.getRequestLabel() != null) {
+			formatter.record(" request \""+
+					interaction.getRequestLabel()+"\"");
+		}
+	}
+	
+	/**
+	 * This method exports the text related to an interactions
+	 * 'replyTo' label.
+	 * 
+	 * @param interaction The interaction
+	 * @param context The export context
+	 * @throws java.io.IOException Failed to export information
+	 */
+	protected void exportReplyToLabel(Interaction interaction,
+			ExporterContext context) throws java.io.IOException {		
+		TextFormatter formatter=(TextFormatter)context.getFormatter();
+
+		if (interaction.getReplyToLabel() != null) {
+			formatter.record(" replyTo \""+
+					interaction.getReplyToLabel()+"\"");
+		}
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/export/text/MessageSignatureTextExportRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/export/text/MessageSignatureTextExportRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/export/text/MessageSignatureTextExportRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,76 @@
+/*
+ * Copyright 2007 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 21 Dec 2007 : Initial version created by gary
+ */
+package org.scribble.export.text;
+
+import org.scribble.export.*;
+import org.scribble.extensions.RegistryInfo;
+import org.scribble.model.*;
+
+/**
+ * This class implements the text based export rule for the
+ * MessageSignature entity.
+ */
+ at RegistryInfo(extension=ExportRule.class)
+public class MessageSignatureTextExportRule implements ExportRule {
+
+	/**
+	 * This method determines whether the exporter rule is appropriate
+	 * for the supplied model object and format.
+	 * 
+	 * @param modelObject The model object
+	 * @param format The format
+	 * @return Whether the rule is appropriate for the model object and
+	 * 						format
+	 */
+	public boolean isSupported(ModelObject modelObject, Formatter format) {
+		return(MessageSignature.class.isAssignableFrom(modelObject.getClass()) &&
+				format instanceof TextFormatter);
+	}
+
+	/**
+	 * This method exports the model object.
+	 * 
+	 * @param modelObject The model object
+	 * @param context The context
+	 * @throws IOException Failed to record export information
+	 */
+	public void export(ModelObject modelObject, ExporterContext context)
+							throws java.io.IOException {
+		MessageSignature sig=(MessageSignature)modelObject;
+		TextFormatter formatter=(TextFormatter)context.getFormatter();
+		
+		if (sig.getOperation() != null) {
+			formatter.record(sig.getOperation());
+			
+			formatter.record("(");
+		}
+		
+		for (int i=0; i < sig.getTypes().size(); i++) {
+			if (i > 0) {
+				formatter.record(", ");
+			}
+			context.export(sig.getTypes().get(i));
+		}
+		
+		if (sig.getOperation() != null) {
+			formatter.record(")");
+		}
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/export/text/ModelNameTextExportRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/export/text/ModelNameTextExportRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/export/text/ModelNameTextExportRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,65 @@
+/*
+ * Copyright 2007 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 20 Dec 2007 : Initial version created by gary
+ */
+package org.scribble.export.text;
+
+import org.scribble.export.*;
+import org.scribble.extensions.RegistryInfo;
+import org.scribble.model.*;
+
+/**
+ * This class implements the text based export rule for the
+ * ModelName entity.
+ */
+ at RegistryInfo(extension=ExportRule.class)
+public class ModelNameTextExportRule implements ExportRule {
+
+	/**
+	 * This method determines whether the exporter rule is appropriate
+	 * for the supplied model object and format.
+	 * 
+	 * @param modelObject The model object
+	 * @param format The format
+	 * @return Whether the rule is appropriate for the model object and
+	 * 						format
+	 */
+	public boolean isSupported(ModelObject modelObject, Formatter format) {
+		return(LocatedName.class.isAssignableFrom(modelObject.getClass()) &&
+				format instanceof TextFormatter);
+	}
+
+	/**
+	 * This method exports the model object.
+	 * 
+	 * @param modelObject The model object
+	 * @param context The context
+	 * @throws IOException Failed to record export information
+	 */
+	public void export(ModelObject modelObject, ExporterContext context)
+							throws java.io.IOException {
+		LocatedName modelName=(LocatedName)modelObject;
+		TextFormatter formatter=(TextFormatter)context.getFormatter();
+		
+		formatter.record(modelName.getName());
+		
+		if (modelName.getRole() != null) {
+			formatter.record("@"+modelName.getRole());
+		}
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/export/text/NamespaceTextExportRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/export/text/NamespaceTextExportRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/export/text/NamespaceTextExportRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,62 @@
+/*
+ * Copyright 2007 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 17 Dec 2007 : Initial version created by gary
+ */
+package org.scribble.export.text;
+
+import org.scribble.export.*;
+import org.scribble.extensions.RegistryInfo;
+import org.scribble.model.ModelObject;
+import org.scribble.model.Namespace;
+
+/**
+ * This class implements the text based export rule for the
+ * Namespace entity.
+ */
+ at RegistryInfo(extension=ExportRule.class)
+public class NamespaceTextExportRule implements ExportRule {
+
+	/**
+	 * This method determines whether the exporter rule is appropriate
+	 * for the supplied model object and format.
+	 * 
+	 * @param modelObject The model object
+	 * @param format The format
+	 * @return Whether the rule is appropriate for the model object and
+	 * 						format
+	 */
+	public boolean isSupported(ModelObject modelObject, Formatter format) {
+		return(Namespace.class.isAssignableFrom(modelObject.getClass()) &&
+				format instanceof TextFormatter);
+	}
+
+	/**
+	 * This method exports the model object.
+	 * 
+	 * @param modelObject The model object
+	 * @param context The context
+	 * @throws IOException Failed to record export information
+	 */
+	public void export(ModelObject modelObject, ExporterContext context)
+							throws java.io.IOException {
+		Namespace namespace=(Namespace)modelObject;
+		TextFormatter formatter=(TextFormatter)context.getFormatter();
+		
+		formatter.record("namespace "+namespace.getName());
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/export/text/RoleListTextExportRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/export/text/RoleListTextExportRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/export/text/RoleListTextExportRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,68 @@
+/*
+ * Copyright 2007 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 20 Dec 2007 : Initial version created by gary
+ */
+package org.scribble.export.text;
+
+import org.scribble.export.*;
+import org.scribble.extensions.RegistryInfo;
+import org.scribble.model.*;
+
+/**
+ * This class implements the text based export rule for the
+ * RoleList entity.
+ */
+ at RegistryInfo(extension=ExportRule.class)
+public class RoleListTextExportRule implements ExportRule {
+
+	/**
+	 * This method determines whether the exporter rule is appropriate
+	 * for the supplied model object and format.
+	 * 
+	 * @param modelObject The model object
+	 * @param format The format
+	 * @return Whether the rule is appropriate for the model object and
+	 * 						format
+	 */
+	public boolean isSupported(ModelObject modelObject, Formatter format) {
+		return(RoleList.class.isAssignableFrom(modelObject.getClass()) &&
+				format instanceof TextFormatter);
+	}
+
+	/**
+	 * This method exports the model object.
+	 * 
+	 * @param modelObject The model object
+	 * @param context The context
+	 * @throws IOException Failed to record export information
+	 */
+	public void export(ModelObject modelObject, ExporterContext context)
+							throws java.io.IOException {
+		RoleList rolelist=(RoleList)modelObject;
+		TextFormatter formatter=(TextFormatter)context.getFormatter();
+		
+		formatter.record("role\t");
+		
+		for (int i=0; i < rolelist.getRoles().size(); i++) {
+			if (i > 0) {
+				formatter.record(", ");
+			}
+			context.export(rolelist.getRoles().get(i));
+		}
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/export/text/RoleTextExportRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/export/text/RoleTextExportRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/export/text/RoleTextExportRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,61 @@
+/*
+ * Copyright 2007 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 20 Dec 2007 : Initial version created by gary
+ */
+package org.scribble.export.text;
+
+import org.scribble.export.*;
+import org.scribble.extensions.RegistryInfo;
+import org.scribble.model.*;
+
+/**
+ * This class implements the text based export rule for the
+ * Role entity.
+ */
+ at RegistryInfo(extension=ExportRule.class)
+public class RoleTextExportRule implements ExportRule {
+
+	/**
+	 * This method determines whether the exporter rule is appropriate
+	 * for the supplied model object and format.
+	 * 
+	 * @param modelObject The model object
+	 * @param format The format
+	 * @return Whether the rule is appropriate for the model object and
+	 * 						format
+	 */
+	public boolean isSupported(ModelObject modelObject, Formatter format) {
+		return(Role.class.isAssignableFrom(modelObject.getClass()) &&
+				format instanceof TextFormatter);
+	}
+
+	/**
+	 * This method exports the model object.
+	 * 
+	 * @param modelObject The model object
+	 * @param context The context
+	 * @throws IOException Failed to record export information
+	 */
+	public void export(ModelObject modelObject, ExporterContext context)
+							throws java.io.IOException {
+		Role role=(Role)modelObject;
+		TextFormatter formatter=(TextFormatter)context.getFormatter();
+		
+		formatter.record(role.getName());
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/export/text/TextFormatter.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/export/text/TextFormatter.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/export/text/TextFormatter.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,158 @@
+/*
+ * Copyright 2007 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 13 Dec 2007 : Initial version created by gary
+ */
+package org.scribble.export.text;
+
+import org.scribble.export.*;
+
+/**
+ * This class provides the text based implementation of the
+ * Formatter interface.
+ */
+public class TextFormatter extends AbstractFormatter {
+
+	/**
+	 * The default constructor.
+	 */
+	public TextFormatter() {
+		super(TEXT_FORMAT);
+	}
+	
+	/**
+	 * This method sets the output stream to use with the formatter.
+	 * 
+	 * @param os The output stream
+	 */
+	public void setOutputStream(java.io.OutputStream os) {
+		m_outputStream = os;
+	}
+	
+	/**
+	 * This method returns the output stream.
+	 * 
+	 * @return The output stream
+	 */
+	public java.io.OutputStream getOutputStream() {
+		return(m_outputStream);
+	}
+	
+	/**
+	 * This method records the supplied text.
+	 * 
+	 * @param value The information to record
+	 * @throws IOException Failed to record text
+	 */
+	public void record(Object value) throws java.io.IOException {
+		
+		if (value instanceof String) {
+			String text=(String)value;
+			
+			if (m_endOfBlock && text.charAt(0) != ' ') {
+				String str = "\r\n";
+				
+				m_outputStream.write(str.getBytes());
+
+				m_emptyLine = true;
+			}
+			
+			if (m_emptyLine) {
+				// Indent to the appropriate level
+				String str = "\t";
+				
+				for (int i=0; i < getLevel(); i++) {
+					m_outputStream.write(str.getBytes());
+				}
+			}
+			
+			m_outputStream.write(text.getBytes());
+		}
+				
+		m_emptyLine = false;
+		m_endOfBlock = false;
+	}
+	
+	/**
+	 * This method instructs the formatter to end the statement.
+	 */
+	@Override
+	protected void endStatement() throws java.io.IOException {
+		
+		record(";\r\n");
+
+		m_emptyLine = true;
+	}
+
+	/**
+	 * This method instructs the formatter to increase the indentation
+	 * level.
+	 * 
+	 * @throws IOException Failed to increase level
+	 */
+	@Override
+	public void startBlock() throws java.io.IOException {
+		
+		record(" {\r\n");
+		
+		m_emptyLine = true;
+		
+		super.startBlock();
+	}
+
+	/**
+	 * This method instructs the formatter to decrease the indentation
+	 * level.
+	 * 
+	 * @throws IOException Failed to end block
+	 */
+	@Override
+	public void endBlock() throws java.io.IOException {
+		super.endBlock();
+		
+		record("}");
+		
+		m_endOfBlock = true;
+	}
+	
+	/**
+	 * This method cancels the indication of end of block.
+	 * This can be used to allow follow on activities to
+	 * continue their text export after the end of block
+	 * symbol, instead of being placed on a new line.
+	 */
+	public void cancelEndOfBlock() {
+		m_endOfBlock = false;
+	}
+
+	/**
+	 * This method closes the formatter.
+	 * 
+	 * @throws IOException Failed to close formatter
+	 */
+	public void close() throws java.io.IOException {
+		if (m_outputStream != null) {
+			m_outputStream.close();
+		}
+	}
+
+	public static final String TEXT_FORMAT="Text";
+	
+	private java.io.OutputStream m_outputStream=null;
+	private boolean m_endOfBlock=false;
+	private boolean m_emptyLine=true;
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/export/text/TypeReferenceTextExportRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/export/text/TypeReferenceTextExportRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/export/text/TypeReferenceTextExportRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,61 @@
+/*
+ * Copyright 2007 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 20 Dec 2007 : Initial version created by gary
+ */
+package org.scribble.export.text;
+
+import org.scribble.export.*;
+import org.scribble.extensions.RegistryInfo;
+import org.scribble.model.*;
+
+/**
+ * This class implements the text based export rule for the
+ * TypeReference entity.
+ */
+ at RegistryInfo(extension=ExportRule.class)
+public class TypeReferenceTextExportRule
+					extends AbstractModelReferenceTextExportRule {
+
+	/**
+	 * This method determines whether the exporter rule is appropriate
+	 * for the supplied model object and format.
+	 * 
+	 * @param modelObject The model object
+	 * @param format The format
+	 * @return Whether the rule is appropriate for the model object and
+	 * 						format
+	 */
+	public boolean isSupported(ModelObject modelObject, Formatter format) {
+		return(super.isSupported(modelObject, format) &&
+				TypeReference.class.isAssignableFrom(modelObject.getClass()));
+	}
+
+	/**
+	 * This method exports the model object.
+	 * 
+	 * @param modelObject The model object
+	 * @param context The context
+	 * @throws IOException Failed to record export information
+	 */
+	public void export(ModelObject modelObject, ExporterContext context)
+							throws java.io.IOException {
+		TypeReference ref=(TypeReference)modelObject;
+		
+		super.export(ref, context);
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/extensions/AbstractRegistry.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/extensions/AbstractRegistry.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/extensions/AbstractRegistry.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,315 @@
+/*
+ * Copyright 2007 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 16 Oct 2007 : Initial version created by gary
+ */
+package org.scribble.extensions;
+
+import java.util.logging.*;
+
+/**
+ * An abstract implementation of the registry interface.
+ */
+public abstract class AbstractRegistry implements Registry {
+
+	public static final String SCRIBBLE_EXTENSIONS = "Scribble-Extensions";
+
+	/**
+	 * This method triggers the initialization of the
+	 * registry based on extensions in the environment.
+	 * 
+	 * @throws RegistryException Failed to initialize the registry
+	 */
+	public abstract void initialize() throws RegistryException;
+	
+	/**
+	 * This method adds a new extension based on its
+	 * class. The class must provide an annotation (RegistryInfo) to
+	 * provide the information necessary for the registry.
+	 * 
+	 * @param cls The extension class
+	 * @throws RegistryException Failed to add extension
+	 */
+	public void addExtension(Class<?> cls) throws RegistryException {
+		RegistryInfo config=null;
+		
+		// Check whether class has a configuration
+		if ((config=(RegistryInfo)cls.getAnnotation(RegistryInfo.class)) != null) {
+			Class<?> intf=config.extension();
+			
+			java.util.List<Class<?>> clsList=m_extensionClasses.get(intf);
+			
+			if (clsList == null) {
+				clsList = new java.util.Vector<Class<?>>();
+				m_extensionClasses.put(intf, clsList);
+			}
+			
+			clsList.add(cls);
+			
+			// Check if extension is a service that should be
+			// registered
+			if (config.isService()) {
+				registerService(config, cls);
+			}
+			
+			// Check if extension is a notation that should be
+			// maintained in a separate map
+			if (org.scribble.model.Notation.class == intf) {
+				try {
+					org.scribble.model.Notation notation=
+							(org.scribble.model.Notation)cls.newInstance();
+					
+					m_notations.put(notation.getCode(), notation);
+				} catch(Exception e) {
+					logger.severe("Failed to add notation: "+e);
+				}
+			}
+			
+		} else {
+			throw new RegistryException("Class '"+cls.getName()+
+					"' does not have registry information");
+		}
+	}
+	
+	/**
+	 * This method removes an extension based on its
+	 * class.
+	 * 
+	 * @param cls The extension class
+	 * @throws RegistryException Failed to remove extension
+	 */
+	public void removeExtension(Class<?> cls) throws RegistryException {
+		
+		// TODO: Need to implement
+	}
+	
+	/**
+	 * This method registers the service.
+	 * 
+	 * @param config The registry configuration
+	 * @param cls The extension implementation
+	 * @throws RegistryException Failed to register service
+	 */
+	protected void registerService(RegistryInfo config,
+					Class<?> cls) throws RegistryException {
+	}
+	
+	/**
+	 * This method returns the extension associated with the
+	 * supplied interface.
+	 * 
+	 * @param intf The interface associated with the required extension
+	 * @param notation The optional notation
+	 * @return The extension
+	 */
+	public Object getExtension(Class<?> intf, String notation) {
+		Object ret=null;
+		
+		// ISSUE: What if mix of stateless and stateful implementations?
+		// should we maintain a list
+		
+		java.util.List<?> instList=getInstanceList(intf, notation);
+			
+		if (instList != null && instList.size() > 0) {
+			ret = instList.get(0);
+		}
+		
+		return(ret);
+	}
+	
+	/**
+	 * This method returns the set of extensions associated with
+	 * the supplied interface.
+	 * 
+	 * @param intf The interface
+	 * @param notation The optional notation
+	 * @return The list of extensions associated with the interface
+	 */
+	public java.util.List<Object> getExtensions(Class<?> intf, String notation) {
+		return(getInstanceList(intf, notation));
+	}
+	
+	/**
+	 * This method returns the list of instances associated with the
+	 * supplied interface. The list is ordered in terms of precise match
+	 * to notation followed by imprecise match. (Note: currently the
+	 * imprecise matches are not ordered in terms of how imprecise they
+	 * are, so if a precise match is not found, then an implementation
+	 * of the supplied interface for one of the notations 'super notations',
+	 * will be returned if it exists).
+	 * 
+	 * @param intf The interface
+	 * @param notation The optional notation
+	 * @return The list of instances
+	 */
+	protected java.util.List<Object> getInstanceList(Class<?> intf, String notation) {
+		java.util.List<Object> ret=null;
+		NotationDetails details=null;
+		
+		synchronized(m_notationDetails) {
+			details = m_notationDetails.get(notation==null?"null":notation);
+			
+			if (details == null) {
+				details = new NotationDetails();
+				m_notationDetails.put(notation==null?"null":notation, details);
+			}
+		}
+		
+		synchronized(details) {
+			// Check if instance available
+			if (details.hasServiceInstances(intf)) {
+				ret = details.getServiceInstances(intf);
+			} else {
+				java.util.List<Class<?>> list=m_extensionClasses.get(intf);
+				
+				if (list != null && list.size() > 0) {
+					ret = new java.util.Vector<Object>();
+					
+					for (int i=0; i < list.size(); i++) {
+						Class<?> cls=(Class<?>)list.get(i);
+						RegistryInfo config=(RegistryInfo)
+								cls.getAnnotation(RegistryInfo.class);
+					
+						int suitability=getNotationSuitability(notation, config.notation());
+						
+						if (suitability >= 0) {
+							try {
+								if (suitability == 0) {
+									ret.add(0, cls.newInstance());
+								} else {
+									ret.add(cls.newInstance());
+								}
+							} catch(Exception e) {
+								logger.log(Level.SEVERE,
+										"Failed to instantiate the class '"+
+										cls.getName()+"'", e);
+							}
+						}
+					}
+
+					// Remove overridden extensions
+					filterOverriddenExtensions(ret);
+					
+					details.addServiceInstances(intf, ret);
+				}
+			}
+		}
+
+		if (ret == null) {
+			ret = new java.util.Vector<Object>();
+		}
+		
+		return(ret);
+	}
+	
+	/**
+	 * This method iterates through the list of objects to determine
+	 * whether extensions have been overridden, and therefore
+	 * should be removed.
+	 * 
+	 * @param list The list of objects to be filtered.
+	 */
+	protected static void filterOverriddenExtensions(java.util.List<Object> list) {
+		
+		for (int i=0; i < list.size(); i++) {
+			boolean f_remove=false;
+			
+			for (int j=0; f_remove == false &&
+						j < list.size(); j++) {
+				
+				if (i != j &&
+					list.get(i).getClass().isAssignableFrom(
+							list.get(j).getClass())) {
+					f_remove = true;
+				}
+			}
+			
+			if (f_remove) {
+				list.remove(i);
+				i--;
+			}
+		}
+	}
+	
+	/**
+	 * This method determines if the supplied notation is suitable for
+	 * the configured notation value.
+	 * 
+	 * @param supplied The supplied notation
+	 * @param config The notation associated with the extension
+	 * @return Notation suitability rating, -1 not suitable, 0 precise match, 1 and
+	 * 			above represent levels of generality
+	 */
+	protected int getNotationSuitability(String supplied, String config) {
+		int ret=-1;
+		
+		if (supplied == null || config.equals("") ||
+				supplied.equals(config)) {
+			ret = 0;
+		} else {
+			java.util.StringTokenizer st=new java.util.StringTokenizer(config,",");
+			
+			while (ret == -1 && st.hasMoreTokens()) {
+				String notation=st.nextToken();
+				int count=0;
+				
+				org.scribble.model.Notation n=
+							m_notations.get(supplied);
+				
+				while (ret == -1 && n != null) {
+					if (notation.equals(n.getCode())) {
+						ret = count;
+					} else {
+						n = n.getSuperNotation();
+						count++;
+					}
+				}
+			}
+		}
+		
+		return(ret);
+	}
+	
+	private static final Logger logger=Logger.getLogger("org.scribble.extensions");
+
+	private java.util.Map<Class<?>,java.util.List<Class<?>>> m_extensionClasses=
+		new java.util.Hashtable<Class<?>, java.util.List<Class<?>>>();
+	private java.util.Map<String, NotationDetails> m_notationDetails=
+		new java.util.Hashtable<String, NotationDetails>();
+	private java.util.Map<String,org.scribble.model.Notation> m_notations=
+				new java.util.HashMap<String,org.scribble.model.Notation>();
+	
+	public class NotationDetails {
+		public NotationDetails() {
+		}
+		
+		public void addServiceInstances(Class<?> intf, java.util.List<Object> insts) {
+			m_serviceInstances.put(intf, insts);
+		}
+		
+		public boolean hasServiceInstances(Class<?> intf) {
+			return(m_serviceInstances.containsKey(intf));
+		}
+		
+		public java.util.List<Object> getServiceInstances(Class<?> intf) {
+			return(m_serviceInstances.get(intf));
+		}
+		
+		private java.util.Map<Class<?>,java.util.List<Object>> m_serviceInstances=
+			new java.util.Hashtable<Class<?>, java.util.List<Object>>();		
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/extensions/ClasspathRegistry.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/extensions/ClasspathRegistry.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/extensions/ClasspathRegistry.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,123 @@
+/*
+ * Copyright 2005-9 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 19 Jan 2009 : Initial version created by gary
+ */
+package org.scribble.extensions;
+
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+/**
+ * This registry implementation uses the classpath to
+ * locate the relevant extensions.
+ */
+public class ClasspathRegistry extends AbstractRegistry {
+
+	public static void main(String[] args) {
+		ClasspathRegistry cr=new ClasspathRegistry();
+		
+		try {
+			cr.initialize();
+		} catch(Exception e) {
+			e.printStackTrace();
+		}
+	}
+	
+	/**
+	 * This method determines if the registry implementation is
+	 * active.
+	 * 
+	 * @return Whether the registry is active
+	 */
+	public boolean isActive() {
+		return(true);
+	}
+	
+	/**
+	 * This method triggers the initialization of the
+	 * registry based on extensions in the environment.
+	 * 
+	 * @throws RegistryException Failed to initialize the registry
+	 */
+	public void initialize() throws RegistryException {
+		
+		String cpath=System.getProperties().getProperty("java.class.path");
+		
+		java.util.StringTokenizer st=new java.util.StringTokenizer(cpath, ";:");
+		
+		while (st.hasMoreTokens()) {
+			String path=st.nextToken();
+			
+			if (logger.isLoggable(Level.FINE)) {
+				logger.fine("Path="+path);
+			}
+			
+			if (path.endsWith(".jar")) {
+				try {
+					java.util.jar.JarFile jarFile=
+								new java.util.jar.JarFile(path);
+					
+					java.util.jar.Manifest manifest=
+									jarFile.getManifest();
+					
+					String scribbleExtensions=
+							manifest.getMainAttributes().getValue(SCRIBBLE_EXTENSIONS);
+
+					if (scribbleExtensions != null) {
+						registerExtensions(scribbleExtensions);
+					}
+				} catch(Exception e) {
+					e.printStackTrace();
+				}
+			}
+		}
+	}
+	
+	/**
+	 * This method registers the individual extension class names
+	 * in the supplied comma-separated list.
+	 * 
+	 * @param extensions The comma-separated list of extension
+	 * 				class names
+	 */
+	protected void registerExtensions(String extensions) {
+		java.util.StringTokenizer st=
+				new java.util.StringTokenizer(extensions, ", ");
+		
+		while (st.hasMoreTokens()) {
+			String extension=st.nextToken();
+			
+			if (logger.isLoggable(Level.FINE)) {
+				logger.fine("Register extension: "+extension);
+			}
+			
+			try {
+				Class<?> cls=Class.forName(extension);
+				
+				if (cls != null) {
+					addExtension(cls);
+				}
+			} catch(Exception e) {				
+				logger.log(Level.SEVERE, "Failed to register extension '"+
+								extension+"'", e);
+			}
+		}
+	}
+	
+	private static Logger logger = Logger.getLogger("org.scribble.extensions");
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/extensions/OSGiRegistry.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/extensions/OSGiRegistry.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/extensions/OSGiRegistry.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,147 @@
+/*
+ * Copyright 2005-9 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 19 Jan 2009 : Initial version created by gary
+ */
+package org.scribble.extensions;
+
+import java.util.logging.Logger;
+
+import org.osgi.framework.Bundle;
+import org.osgi.framework.BundleContext;
+
+/**
+ * This registry implementation uses the classpath to
+ * locate the relevant extensions.
+ */
+public class OSGiRegistry extends AbstractRegistry {
+
+	/**
+	 * This constructor is for the OSGiRegistry, initialised
+	 * with the OSGi bundle context.
+	 * 
+	 * @param context The bundle context
+	 */
+	public OSGiRegistry(BundleContext context) {
+		m_context = context;
+	}
+	
+	/**
+	 * This method determines if the registry implementation is
+	 * active.
+	 * 
+	 * @return Whether the registry is active
+	 */
+	public boolean isActive() {
+		return(true);
+	}
+	
+	/**
+	 * This method triggers the initialization of the
+	 * registry based on extensions in the environment.
+	 * 
+	 * @throws RegistryException Failed to initialize the registry
+	 */
+	public void initialize() throws RegistryException {
+		
+		if (m_context != null) {
+			Bundle[] bundles=m_context.getBundles();
+
+			for (int i=0; i < bundles.length; i++) {
+				Bundle bundle=bundles[i];
+				
+				if (bundle != null) {
+					Object val=bundle.getHeaders().get(SCRIBBLE_EXTENSIONS);
+					
+					if (val instanceof String) {
+						java.util.StringTokenizer st=new java.util.StringTokenizer((String)val, ", ");
+						
+						while (st.hasMoreTokens()) {
+							String clsName=st.nextToken();
+							
+							try {
+								Class<?> cls=bundle.loadClass(clsName);
+								addExtension(cls);
+								
+								if (logger.isLoggable(java.util.logging.Level.FINE)) {
+									logger.fine("Registered scribble extension: "+cls);
+								}
+								
+							} catch(Exception e) {
+								e.printStackTrace();
+							}
+						}
+					}
+				}
+			}
+		}
+	}
+
+	/**
+	 * This method registers the individual extension class names
+	 * in the supplied comma-separated list.
+	 * 
+	 * @param extensions The comma-separated list of extension
+	 * 				class names
+	 */
+	protected void registerExtensions(String extensions) {
+		java.util.StringTokenizer st=
+				new java.util.StringTokenizer(extensions, ", ");
+		
+		while (st.hasMoreTokens()) {
+			String extension=st.nextToken();
+			
+			try {
+				Class<?> cls=Class.forName(extension);
+				
+				if (cls != null) {
+					addExtension(cls);
+				}
+			} catch(Exception e) {
+				e.printStackTrace();
+			}
+		}
+	}
+	
+	/**
+	 * This method registers the service.
+	 * 
+	 * @param config The registry configuration
+	 * @param cls The extension implementation
+	 * @throws RegistryException Failed to register service
+	 */
+	protected void registerService(RegistryInfo config,
+					Class<?> cls) throws RegistryException {
+		try {
+			m_context.registerService(config.extension().getName(),
+						cls.newInstance(), null);
+			
+			logger.info("Registered '"+
+					config.extension().getName()+"' against implementation '"+
+					cls.getName()+"'");
+			
+		} catch(Exception e) {
+			throw new RegistryException("Failed to register service '"+
+					config.extension().getName()+"' against implementation '"+
+					cls.getName()+"': "+e, e);
+		}
+	}
+	
+	private static Logger logger = Logger.getLogger("org.scribble.extensions");
+
+	private BundleContext m_context=null;
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/extensions/Registry.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/extensions/Registry.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/extensions/Registry.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,56 @@
+/*
+ * Copyright 2007 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 16 Oct 2007 : Initial version created by gary
+ */
+package org.scribble.extensions;
+
+/**
+ * This interface represents the registry of extensions
+ * available within the environment.
+ */
+public interface Registry {
+	
+	/**
+	 * This method determines if the registry implementation is
+	 * active.
+	 * 
+	 * @return Whether the registry is active
+	 */
+	public boolean isActive();
+	
+	/**
+	 * This method returns the extension associated with the
+	 * supplied interface.
+	 * 
+	 * @param intf The interface associated with the required extension
+	 * @param notation The optional notation
+	 * @return The extension
+	 */
+	public Object getExtension(Class<?> intf, String notation);
+	
+	/**
+	 * This method returns the set of extensions associated with
+	 * the supplied interface.
+	 * 
+	 * @param intf The interface
+	 * @param notation The optional notation
+	 * @return The list of extensions associated with the interface
+	 */
+	public java.util.List<Object> getExtensions(Class<?> intf, String notation);
+	
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/extensions/RegistryException.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/extensions/RegistryException.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/extensions/RegistryException.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,54 @@
+/*
+ * Copyright 2007 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 16 Oct 2007 : Initial version created by gary
+ */
+package org.scribble.extensions;
+
+/**
+ * This class represents a registry exception.
+ *
+ */
+public class RegistryException extends Exception {
+
+	/**
+	 * 
+	 */
+	private static final long serialVersionUID = 4132588615349997229L;
+
+	/**
+	 * This method initializes the registry
+	 * exception with a message.
+	 * 
+	 * @param mesg The reason for the exception
+	 */
+	public RegistryException(String mesg) {
+		super(mesg);
+	}
+	
+	/**
+	 * This method initializes the registry
+	 * exception with a message and an associated
+	 * exception.
+	 * 
+	 * @param mesg The reason for the exception
+	 * @param t The associated exception
+	 */
+	public RegistryException(String mesg, Throwable t) {
+		super(mesg, t);
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/extensions/RegistryFactory.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/extensions/RegistryFactory.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/extensions/RegistryFactory.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,110 @@
+/*
+ * Copyright 2007 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 16 Oct 2007 : Initial version created by gary
+ */
+package org.scribble.extensions;
+
+import java.util.logging.*;
+
+/**
+ * This class provides a factory mechanism for retrieving the extension
+ * registry.
+ */
+public class RegistryFactory {
+	
+	/**
+	 * This method returns the registry.
+	 * 
+	 * @return The extension registry
+	 */
+	public static synchronized Registry getRegistry() {
+		
+		if (m_registry == null) {
+			m_registry = createRegistry();
+		}
+		
+		return(m_registry);
+	}
+	
+	/**
+	 * This method sets the registry implementation to be
+	 * used.
+	 * 
+	 * @param registry The registry
+	 */
+	public static void setRegistry(Registry registry) {
+		m_registry = registry;
+	}
+	
+	/**
+	 * This method creates the registry.
+	 * 
+	 * @return The registry
+	 */
+	protected static Registry createRegistry() {
+		Registry ret=null;
+		
+		// Check if system property has been set
+		if (System.getProperties().containsKey("org.scribble.registry.class")) {
+			String clsName=System.getProperty("org.scribble.registry.class");
+			
+			try {
+				Class<?> cls=Class.forName(clsName);
+				ret = (Registry)cls.newInstance();
+			} catch(Exception e) {
+				logger.log(Level.FINE,
+						"Unable to instantiate registry '"+
+						clsName+"'", e);
+			}
+		} else {
+		
+			// Instantiate the first available registry implementation
+			for (int i=0; ret == null &&
+						i < m_registryImpls.length; i++) {
+				
+				try {
+					Class<?> cls=Class.forName(m_registryImpls[i]);
+					ret = (Registry)cls.newInstance();
+					
+					if (ret.isActive() == false) {
+						ret = null;
+					} else if (ret instanceof AbstractRegistry) {
+						((AbstractRegistry)ret).initialize();
+					}
+					
+				} catch(Exception e) {
+					logger.log(Level.FINE,
+							"Unable to instantiate registry '"+
+							m_registryImpls[i]+"'", e);
+					ret = null;
+				}
+			}
+		}
+		
+		return(ret);
+	}
+	
+	private static Logger logger=Logger.getLogger("org.scribble.extensions");
+	
+	private static Registry m_registry=null;
+	
+	private static final String[] m_registryImpls={
+		"org.scribble.extensions.EclipseRegistry",
+		"org.scribble.extensions.ClasspathRegistry"
+	};
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/extensions/RegistryInfo.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/extensions/RegistryInfo.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/extensions/RegistryInfo.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,40 @@
+/*
+ * Copyright 2007 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 16 Oct 2007 : Initial version created by gary
+ */
+package org.scribble.extensions;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * This annotation type defines the information required by the extension
+ * registry, to be able to determine preference order between multiple
+ * extensions of the same interface type, aswell as determine whether
+ * the same extension instance can be returned each time, or whether
+ * a new instance has to be created (i.e. if stateful).
+ */
+ at Retention(RetentionPolicy.RUNTIME)
+ at Target(ElementType.TYPE)
+public @interface RegistryInfo {
+	Class<?> extension();
+	String notation() default "";
+	boolean isService() default false;
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/AbstractNotation.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/AbstractNotation.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/AbstractNotation.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,96 @@
+/*
+ * Copyright 2007 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 23 Oct 2007 : Initial version created by gary
+ */
+package org.scribble.model;
+
+/**
+ * This abstract implementation .
+ */
+public abstract class AbstractNotation implements Notation {
+
+	/**
+	 * The constructor to initialise the details associated
+	 * with the notation.
+	 * 
+	 * @param code The code
+	 * @param name The name
+	 * @param useScribbleEditor Whether the scribble editor
+	 * 						should be used
+	 */
+	public AbstractNotation(String code, String name,
+					boolean useScribbleEditor) {
+		m_code = code;
+		m_name = name;
+		m_useScribbleEditor = useScribbleEditor;
+	}
+	
+	/**
+	 * This method returns the code associated with the notation.
+	 * 
+	 * @return The notation code
+	 */
+	public String getCode() {
+		return(m_code);
+	}
+	
+	/**
+	 * This method returns the name of the notation.
+	 * 
+	 * @return The name
+	 */
+	public String getName() {
+		return(m_name);
+	}
+	
+	/**
+	 * This method returns the initial description associated
+	 * with the supplied reference.
+	 * 
+	 * @param ref The reference
+	 * @return The initial description, or null if no description
+	 */
+	public String getInitialDescription(ModelReference ref) {
+		return(null);
+	}
+	
+	/**
+	 * This method determines whether the Scribble editor should
+	 * be used for editing the notation.
+	 * 
+	 * @return Whether the Scribble editor should be used
+	 */
+	public boolean useScribbleEditor() {
+		return(m_useScribbleEditor);
+	}
+	
+	/**
+	 * This method returns the optional 'super' notation.
+	 * If defined, then this notation is a derived notation
+	 * from the 'super' notation.
+	 * 
+	 * @return The optional 'super' notation
+	 */
+	public Notation getSuperNotation() {
+		return(null);
+	}
+	
+	private String m_code=null;
+	private String m_name=null;
+	private boolean m_useScribbleEditor=false;
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/Activity.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/Activity.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/Activity.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,105 @@
+/*
+ * Copyright 2007 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 22 Oct 2007 : Initial version created by gary
+ */
+package org.scribble.model;
+
+/**
+ * This class represents the base class for all Scribble definition
+ * components.
+ */
+public abstract class Activity extends Statement {
+	
+	private static final long serialVersionUID = 907254090600526766L;
+
+	/**
+	 * This method returns the list of roles that are
+	 * responsible for initiating the activity. This can
+	 * be used to determine whether the model is
+	 * consistent in terms of decision makers subsequently
+	 * initiating actions.
+	 * 
+	 * @return The list of initiator roles
+	 */
+	public java.util.List<Role> getInitiatorRoles() {
+		return(new java.util.Vector<Role>());
+	}
+
+	/**
+	 * This method returns the list of roles that are
+	 * associated with the outcome of the activity.
+	 * 
+	 * @return The list of final roles
+	 */
+	public java.util.List<Role> getFinalRoles() {
+		return(new java.util.Vector<Role>());
+	}
+	
+	/**
+	 * This method returns the optional located role
+	 * associated with the enclosing definition.
+	 * 
+	 * @return The located role, or null if the
+	 * 			enclosing definition is not located
+	 */
+	protected Role getLocatedRole() {
+		Role ret=null;
+		
+		if (getParent() instanceof Activity) {
+			ret = ((Activity)getParent()).getLocatedRole();
+		}
+		
+		return(ret);
+	}
+
+	/**
+	 * This method returns the definition in which this
+	 * activity is contained.
+	 * 
+	 * @return The definition, or null if not found
+	 */
+	public Definition getEnclosingDefinition() {
+		Definition ret=null;
+		
+		if (getParent() instanceof Activity) {
+			ret = ((Activity)getParent()).getEnclosingDefinition();
+		}
+		
+		return(ret);
+	}
+	
+	/**
+	 * This method indicates whether the activity
+	 * is a conditional construct.
+	 * 
+	 * @return Whether the activity is conditional
+	 */
+	public boolean isConditional() {
+		return(false);
+	}
+	
+	/**
+	 * This method returns whether the activity represents
+	 * a scope.
+	 * 
+	 * @return Whether activity represents a scope
+	 */
+	public boolean isScope() {
+		return(false);
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/Annotations.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/Annotations.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/Annotations.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,45 @@
+/*
+ * Copyright 2005-9 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 20 Apr 2009 : Initial version created by gary
+ */
+package org.scribble.model;
+
+/**
+ * This class represents a map of named serializable
+ * information that can be used to provide additional
+ * details about a model component.
+ */
+public class Annotations extends java.util.HashMap<String,java.io.Serializable> {
+
+	private static final long serialVersionUID = -4594153737794956180L;
+
+	/**
+	 * The default constructor.
+	 */
+	public Annotations() {
+	}
+	
+	/**
+	 * This is the copy constructor.
+	 * 
+	 * @param annotations The annotations to copy
+	 */
+	public Annotations(Annotations annotations) {
+		putAll(annotations);
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/Behaviour.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/Behaviour.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/Behaviour.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,59 @@
+/*
+ * Copyright 2007 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 25 Nov 2007 : Initial version created by gary
+ */
+package org.scribble.model;
+
+/**
+ * This class represents the base class for all Scribble behavioural
+ * activities.
+ */
+public abstract class Behaviour extends Activity {
+
+	private static final long serialVersionUID = -487404402751133649L;
+
+	/**
+	 * This method returns whether the behaviour is a grouping
+	 * construct.
+	 * 
+	 * @return Whether the behaviour is a grouping construct 
+	 */
+	public boolean isGroupingConstruct() {
+		return(false);
+	}
+	
+	/**
+	 * This method returns whether the behaviour is a wait
+	 * state.
+	 * 
+	 * @return Whether the behaviour is a wait state
+	 */
+	public boolean isWaitState() {
+		return(false);
+	}
+	
+	/**
+	 * This method returns the list of roles that are
+	 * associated with the behaviour.
+	 * 
+	 * @return The list of associated roles
+	 */
+	public java.util.List<Role> getAssociatedRoles() {
+		return(new java.util.Vector<Role>());
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/Block.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/Block.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/Block.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,79 @@
+/*
+ * Copyright 2007 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 29 Oct 2007 : Initial version created by gary
+ */
+package org.scribble.model;
+
+/**
+ * This class represents a group of activities.
+ * 
+ */
+public class Block extends Activity {
+
+	private static final long serialVersionUID = 6629455247154922281L;
+
+	/**
+	 * This method returns the contents associated with
+	 * the block.
+	 * 
+	 * @return The contents
+	 */
+	@Reference(containment=true)
+	public java.util.List<Activity> getContents() {
+		return(m_contents);
+	}
+	
+	/**
+	 * This method returns the list of roles that are
+	 * responsible for initiating the activity. This can
+	 * be used to determine whether the model is
+	 * consistent in terms of decision makers subsequently
+	 * initiating actions.
+	 * 
+	 * @return The list of initiator roles
+	 */
+	@Override
+	public java.util.List<Role> getInitiatorRoles() {
+		java.util.List<Role> ret=super.getInitiatorRoles();
+		boolean f_end=false;
+		
+		for (int i=0; f_end == false &&
+						i < getContents().size(); i++) {
+			
+			if (getContents().get(i) instanceof Behaviour) {
+				java.util.List<Role> roleList=
+					getContents().get(i).getInitiatorRoles();
+				
+				for (int j=0; j < roleList.size(); j++) {
+					if (ret.contains(roleList.get(j)) == false) {
+						ret.add(roleList.get(j));
+					}
+				}
+				
+				if (getContents().get(i).isConditional() == false) {
+					f_end = true;
+				}
+			}
+		}
+		
+		return(ret);
+	}
+
+	private java.util.List<Activity> m_contents=
+		new ContainmentList<Activity>(this, Activity.class);
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/Channel.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/Channel.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/Channel.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,129 @@
+/*
+ * Copyright 2007 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 22 Oct 2007 : Initial version created by gary
+ */
+package org.scribble.model;
+
+/**
+ * This class represents the channel declaration.
+ */
+public class Channel extends ModelObject implements Declaration {
+
+	private static final long serialVersionUID = 1158151945766114601L;
+
+	/**
+	 * This is the default constructor.
+	 */
+	public Channel() {
+	}
+	
+	/**
+	 * This constructor initializes the channel with a name.
+	 * 
+	 * @param name The channel name
+	 */
+	public Channel(String name) {
+		m_name = name;
+	}
+	
+	/**
+	 * This method returns the name of the channel.
+	 * 
+	 * @return The name
+	 */
+	public String getName() {
+		return(m_name);
+	}
+	
+	/**
+	 * This method sets the name of the channel.
+	 * 
+	 * @param name The name
+	 */
+	public void setName(String name) {
+		m_name = name;
+	}
+	
+	/**
+	 * This method returns the 'from' role.
+	 * 
+	 * @return The 'from' role
+	 */
+	public Role getFromRole() {
+		return(m_fromRole);
+	}
+	
+	/**
+	 * This method sets the 'from' role.
+	 * 
+	 * @param role The 'from' role
+	 */
+	public void setFromRole(Role role) {
+		m_fromRole = role;
+	}
+	
+	/**
+	 * This method returns the 'to' role.
+	 * 
+	 * @return The 'to' role
+	 */
+	public Role getToRole() {
+		return(m_toRole);
+	}
+	
+	/**
+	 * This method sets the 'to' role.
+	 * 
+	 * @param role The 'to' role
+	 */
+	public void setToRole(Role role) {
+		m_toRole = role;
+	}
+	
+	public boolean equals(Object obj) {
+		boolean ret=false;
+	
+		if (obj instanceof Channel) {
+			Channel other=(Channel)obj;
+			
+			if (other.getName() != null && other.getName().equals(m_name)) {
+				ret = true;
+			}
+		}
+		
+		return(ret);
+	}
+	
+	public int hashCode() {
+		int ret=super.hashCode();
+		
+		if (m_name != null) {
+			ret = m_name.hashCode();
+		}
+		
+		return(ret);
+	}
+	
+	public String toString() {
+		return(getName());
+	}
+
+	private String m_name=null;
+	private Role m_fromRole=null;
+	private Role m_toRole=null;
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/ChannelList.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/ChannelList.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/ChannelList.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,41 @@
+/*
+ * Copyright 2007 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 27 Oct 2007 : Initial version created by gary
+ */
+package org.scribble.model;
+
+/**
+ * This class represents the list of channels declared within
+ * a Scribble definition.
+ */
+public class ChannelList extends Activity {
+
+	private static final long serialVersionUID = 1532837321091960033L;
+
+	/**
+	 * This method returns the list of channels.
+	 * 
+	 * @return The list of channels
+	 */
+	@Reference(containment=true)
+	public java.util.List<Channel> getChannels() {
+		return(m_channels);
+	}
+	
+	private java.util.List<Channel> m_channels=new ContainmentList<Channel>(this, Channel.class);
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/ConformanceReference.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/ConformanceReference.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/ConformanceReference.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,48 @@
+/*
+ * Copyright 2007 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 12 Dec 2007 : Initial version created by gary
+ */
+package org.scribble.model;
+
+/**
+ * This class represents a conformance link to another
+ * definition.
+ */
+public class ConformanceReference extends NameMappingReference {
+
+	private static final long serialVersionUID = -6759419194304963409L;
+
+	/**
+	 * This is the constructor for the conformance reference.
+	 * 
+	 * @param notation The notation
+	 */
+	public ConformanceReference(String notation) {
+		super(notation);
+	}
+	
+	/**
+	 * This is the copy constructor for the conformance
+	 * reference.
+	 * 
+	 * @param ref The reference to copy
+	 */
+	public ConformanceReference(ConformanceReference ref) {
+		super(ref);
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/ContainmentList.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/ContainmentList.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/ContainmentList.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,366 @@
+/*
+ * Copyright 2007-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 23 Feb 2008 : Initial version created by gary
+ */
+package org.scribble.model;
+
+import java.util.Collection;
+import java.util.List;
+import java.util.Vector;
+
+/**
+ * This class represents a list that understands how to manage
+ * containment and parent relationships.
+ *
+ * @param <E>
+ */
+public class ContainmentList<E extends ModelObject> extends Vector<E> implements List<E> {
+
+	private static final long serialVersionUID = -4226210156656211621L;
+
+	/**
+	 * This is the constructor for the containment list
+	 * @param parent
+	 */
+	public ContainmentList(ModelObject parent, Class<E> type) {
+		m_parent = parent;
+		m_type = type;
+	}
+	
+	/**
+	 * This method returns the base type associated with the list
+	 * elements.
+	 * 
+	 * @return The base type for the list elements
+	 */
+	public Class<E> getType() {
+		return(m_type);
+	}
+
+    /**
+     * Appends the specified element to the end of this list (optional
+     * operation). <p>
+     *
+     * Lists that support this operation may place limitations on what
+     * elements may be added to this list.  In particular, some
+     * lists will refuse to add null elements, and others will impose
+     * restrictions on the type of elements that may be added.  List
+     * classes should clearly specify in their documentation any restrictions
+     * on what elements may be added.
+     *
+     * @param o element to be appended to this list.
+     * @return <tt>true</tt> (as per the general contract of the
+     *            <tt>Collection.add</tt> method).
+     * 
+     * @throws UnsupportedOperationException if the <tt>add</tt> method is not
+     * 		  supported by this list.
+     * @throws ClassCastException if the class of the specified element
+     * 		  prevents it from being added to this list.
+     * @throws NullPointerException if the specified element is null and this
+     *           list does not support null elements.
+     * @throws IllegalArgumentException if some aspect of this element
+     *            prevents it from being added to this list.
+     */
+    public boolean add(E o) {
+    	boolean ret=super.add(o);
+		
+    	if (ret) {
+    		o.setParent(m_parent);
+    	}
+    	
+    	return(ret);
+    }
+    
+    /**
+     * Removes the first occurrence in this list of the specified element 
+     * (optional operation).  If this list does not contain the element, it is
+     * unchanged.  More formally, removes the element with the lowest index i
+     * such that <tt>(o==null ? get(i)==null : o.equals(get(i)))</tt> (if
+     * such an element exists).
+     *
+     * @param o element to be removed from this list, if present.
+     * @return <tt>true</tt> if this list contained the specified element.
+     * @throws ClassCastException if the type of the specified element
+     * 	          is incompatible with this list (optional).
+     * @throws NullPointerException if the specified element is null and this
+     *            list does not support null elements (optional).
+     * @throws UnsupportedOperationException if the <tt>remove</tt> method is
+     *		  not supported by this list.
+     */
+    public boolean remove(Object o) {
+    	boolean ret=super.remove(o);
+    	
+    	if (ret && o instanceof ModelObject) {
+    		((ModelObject)o).setParent(null);
+    	}
+    	
+    	return(ret);
+    }
+
+    /**
+     * Appends all of the elements in the specified collection to the end of
+     * this list, in the order that they are returned by the specified
+     * collection's iterator (optional operation).  The behavior of this
+     * operation is unspecified if the specified collection is modified while
+     * the operation is in progress.  (Note that this will occur if the
+     * specified collection is this list, and it's nonempty.)
+     *
+     * @param c collection whose elements are to be added to this list.
+     * @return <tt>true</tt> if this list changed as a result of the call.
+     * 
+     * @throws UnsupportedOperationException if the <tt>addAll</tt> method is
+     *         not supported by this list.
+     * @throws ClassCastException if the class of an element in the specified
+     * 	       collection prevents it from being added to this list.
+     * @throws NullPointerException if the specified collection contains one
+     *         or more null elements and this list does not support null
+     *         elements, or if the specified collection is <tt>null</tt>.
+     * @throws IllegalArgumentException if some aspect of an element in the
+     *         specified collection prevents it from being added to this
+     *         list.
+     * @see #add(Object)
+     */
+    public boolean addAll(Collection<? extends E> c) {
+    	boolean ret=super.addAll(c);
+    	
+    	if (ret) {
+    		java.util.Iterator<? extends E> iter=c.iterator();
+    		
+    		while (iter.hasNext()) {
+    			iter.next().setParent(m_parent);
+    		}
+    	}
+    	
+    	return(ret);
+    }
+
+    /**
+     * Inserts all of the elements in the specified collection into this
+     * list at the specified position (optional operation).  Shifts the
+     * element currently at that position (if any) and any subsequent
+     * elements to the right (increases their indices).  The new elements
+     * will appear in this list in the order that they are returned by the
+     * specified collection's iterator.  The behavior of this operation is
+     * unspecified if the specified collection is modified while the
+     * operation is in progress.  (Note that this will occur if the specified
+     * collection is this list, and it's nonempty.)
+     *
+     * @param index index at which to insert first element from the specified
+     *	            collection.
+     * @param c elements to be inserted into this list.
+     * @return <tt>true</tt> if this list changed as a result of the call.
+     * 
+     * @throws UnsupportedOperationException if the <tt>addAll</tt> method is
+     *		  not supported by this list.
+     * @throws ClassCastException if the class of one of elements of the
+     * 		  specified collection prevents it from being added to this
+     * 		  list.
+     * @throws NullPointerException if the specified collection contains one
+     *           or more null elements and this list does not support null
+     *           elements, or if the specified collection is <tt>null</tt>.
+     * @throws IllegalArgumentException if some aspect of one of elements of
+     *		  the specified collection prevents it from being added to
+     *		  this list.
+     * @throws IndexOutOfBoundsException if the index is out of range (index
+     *		  &lt; 0 || index &gt; size()).
+     */
+    public boolean addAll(int index, Collection<? extends E> c) {
+    	boolean ret=super.addAll(index, c);
+    	
+    	if (ret) {
+    		java.util.Iterator<? extends E> iter=c.iterator();
+    		
+    		while (iter.hasNext()) {
+    			iter.next().setParent(m_parent);
+    		}
+    	}
+    	
+    	return(ret);    	
+    }
+
+    /**
+     * Removes from this list all the elements that are contained in the
+     * specified collection (optional operation).
+     *
+     * @param c collection that defines which elements will be removed from
+     *          this list.
+     * @return <tt>true</tt> if this list changed as a result of the call.
+     * 
+     * @throws UnsupportedOperationException if the <tt>removeAll</tt> method
+     * 		  is not supported by this list.
+     * @throws ClassCastException if the types of one or more elements
+     *            in this list are incompatible with the specified
+     *            collection (optional).
+     * @throws NullPointerException if this list contains one or more
+     *            null elements and the specified collection does not support
+     *            null elements (optional).
+     * @throws NullPointerException if the specified collection is
+     *            <tt>null</tt>.
+     * @see #remove(Object)
+     * @see #contains(Object)
+     */
+    public boolean removeAll(Collection<?> c) {
+    	boolean ret=super.removeAll(c);
+    	
+    	if (ret) {
+    		java.util.Iterator<?> iter=c.iterator();
+    		
+    		while (iter.hasNext()) {
+    			Object val=iter.next();
+    			if (val instanceof ModelObject) {
+    				((ModelObject)val).setParent(null);
+    			}
+    		}
+    	}
+    	
+    	return(ret);    	
+    }
+
+    /**
+     * Retains only the elements in this list that are contained in the
+     * specified collection (optional operation).  In other words, removes
+     * from this list all the elements that are not contained in the specified
+     * collection.
+     *
+     * @param c collection that defines which elements this set will retain.
+     * 
+     * @return <tt>true</tt> if this list changed as a result of the call.
+     * 
+     * @throws UnsupportedOperationException if the <tt>retainAll</tt> method
+     * 		  is not supported by this list.
+     * @throws ClassCastException if the types of one or more elements
+     *            in this list are incompatible with the specified
+     *            collection (optional).
+     * @throws NullPointerException if this list contains one or more
+     *            null elements and the specified collection does not support
+     *            null elements (optional).
+     * @throws NullPointerException if the specified collection is
+     *         <tt>null</tt>.
+     * @see #remove(Object)
+     * @see #contains(Object)
+     */
+    public boolean retainAll(Collection<?> c) {
+    	return(super.retainAll(c));
+    }
+
+    /**
+     * Removes all of the elements from this list (optional operation).  This
+     * list will be empty after this call returns (unless it throws an
+     * exception).
+     *
+     * @throws UnsupportedOperationException if the <tt>clear</tt> method is
+     * 		  not supported by this list.
+     */
+    public void clear() {
+		java.util.Iterator<? extends E> iter=iterator();
+		
+		while (iter.hasNext()) {
+			iter.next().setParent(null);
+		}
+
+		super.clear();
+    }
+    
+    /**
+     * Replaces the element at the specified position in this list with the
+     * specified element (optional operation).
+     *
+     * @param index index of element to replace.
+     * @param element element to be stored at the specified position.
+     * @return the element previously at the specified position.
+     * 
+     * @throws UnsupportedOperationException if the <tt>set</tt> method is not
+     *		  supported by this list.
+     * @throws    ClassCastException if the class of the specified element
+     * 		  prevents it from being added to this list.
+     * @throws    NullPointerException if the specified element is null and
+     *            this list does not support null elements.
+     * @throws    IllegalArgumentException if some aspect of the specified
+     *		  element prevents it from being added to this list.
+     * @throws    IndexOutOfBoundsException if the index is out of range
+     *		  (index &lt; 0 || index &gt;= size()).
+     */
+    public E set(int index, E element) {
+    	E ret=super.set(index, element);
+    	
+    	if (element != null) {
+    		element.setParent(m_parent);
+    	}
+    	
+    	if (ret != null) {
+    		ret.setParent(null);
+    	}
+    	
+    	return(ret);
+    }
+
+    /**
+     * Inserts the specified element at the specified position in this list
+     * (optional operation).  Shifts the element currently at that position
+     * (if any) and any subsequent elements to the right (adds one to their
+     * indices).
+     *
+     * @param index index at which the specified element is to be inserted.
+     * @param element element to be inserted.
+     * 
+     * @throws UnsupportedOperationException if the <tt>add</tt> method is not
+     *		  supported by this list.
+     * @throws    ClassCastException if the class of the specified element
+     * 		  prevents it from being added to this list.
+     * @throws    NullPointerException if the specified element is null and
+     *            this list does not support null elements.
+     * @throws    IllegalArgumentException if some aspect of the specified
+     *		  element prevents it from being added to this list.
+     * @throws    IndexOutOfBoundsException if the index is out of range
+     *		  (index &lt; 0 || index &gt; size()).
+     */
+    public void add(int index, E element) {
+    	super.add(index, element);
+    	
+    	if (element != null) {
+    		element.setParent(m_parent);
+    	}
+    }
+
+    /**
+     * Removes the element at the specified position in this list (optional
+     * operation).  Shifts any subsequent elements to the left (subtracts one
+     * from their indices).  Returns the element that was removed from the
+     * list.
+     *
+     * @param index the index of the element to removed.
+     * @return the element previously at the specified position.
+     * 
+     * @throws UnsupportedOperationException if the <tt>remove</tt> method is
+     *		  not supported by this list.
+     * @throws IndexOutOfBoundsException if the index is out of range (index
+     *            &lt; 0 || index &gt;= size()).
+     */
+    public E remove(int index) {
+    	E ret=super.remove(index);
+    	
+    	if (ret != null) {
+    		ret.setParent(null);
+    	}
+    	
+    	return(ret);
+    }
+    
+    private ModelObject m_parent=null;
+    private Class<E> m_type=null;
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/Declaration.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/Declaration.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/Declaration.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,36 @@
+/*
+ * Copyright 2007 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 28 Oct 2007 : Initial version created by gary
+ */
+package org.scribble.model;
+
+/**
+ * This interface represents a named declaration within 
+ * the scope of a Scribble block.
+ * 
+ */
+public interface Declaration {
+
+	/**
+	 * The name associated with the declaration.
+	 * 
+	 * @return The declaration name
+	 */
+	public String getName();
+	
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/DeclarationBinding.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/DeclarationBinding.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/DeclarationBinding.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,86 @@
+/*
+ * Copyright 2007-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 7 Dec 2007 : Initial version created by gary
+ */
+package org.scribble.model;
+
+/**
+ * This class represents the binding between a declaration and
+ * the name of a declaration in a composed definition.
+ */
+public class DeclarationBinding extends ModelObject {
+
+	private static final long serialVersionUID = -8912117052145055821L;
+
+	/**
+	 * The default constructor.
+	 */
+	public DeclarationBinding() {
+	}
+	
+	/**
+	 * This constructor initializes the declaration and bound
+	 * name.
+	 * 
+	 * @param decl The declaration
+	 * @param boundName The bound name
+	 */
+	public DeclarationBinding(Declaration decl, String boundName) {
+		m_declaration = decl;
+		m_boundName = boundName;
+	}
+	
+	/**
+	 * This method sets the declaration.
+	 * 
+	 * @param decl The declaration
+	 */
+	public void setDeclaration(Declaration decl) {
+		m_declaration = decl;
+	}
+	
+	/**
+	 * This method returns the declaration.
+	 * 
+	 * @return The declaration
+	 */
+	public Declaration getDeclaration() {
+		return(m_declaration);
+	}
+
+	/**
+	 * This method sets the bound name.
+	 * 
+	 * @param boundName The bound name
+	 */
+	public void setBoundName(String boundName) {
+		m_boundName = boundName;
+	}
+	
+	/**
+	 * This method returns the bound name.
+	 * 
+	 * @return The bound name
+	 */
+	public String getBoundName() {
+		return(m_boundName);
+	}
+
+	private Declaration m_declaration=null;
+	private String m_boundName=null;
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/Definition.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/Definition.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/Definition.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,326 @@
+/*
+ * Copyright 2007 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 7 Dec 2007 : Initial version created by gary
+ */
+package org.scribble.model;
+
+/**
+ * This class represents the base class for all Scribble definitions.
+ */
+public abstract class Definition extends Activity {
+
+	private static final long serialVersionUID = 6381278356995297737L;
+
+	/**
+	 * This is the default constructor for the definition.
+	 * 
+	 */
+	public Definition() {
+	}
+	
+	/**
+	 * This method returns the name of the definition.
+	 * 
+	 * @return The name
+	 */
+	@Reference(containment=true)
+	public LocatedName getLocatedName() {
+		return(m_locatedName);
+	}
+	
+	/**
+	 * This method sets the name of the definition.
+	 * 
+	 * @param name The name
+	 */
+	public void setLocatedName(LocatedName name) {
+		
+		if (m_locatedName != null) {
+			m_locatedName.setParent(null);
+		}
+		
+		m_locatedName = name;
+		
+		if (m_locatedName != null) {
+			m_locatedName.setParent(this);
+		}
+	}
+	
+	/**
+	 * This method determines whether the definition is stateless.
+	 * 
+	 * @return Whether the definition is stateless
+	 */
+	public boolean isStateless() {
+		return(m_stateless);
+	}
+	
+	/**
+	 * This method sets whether the definition is stateless.
+	 * 
+	 * @param stateless Whether the definition is stateless
+	 */
+	public void setStateless(boolean stateless) {
+		m_stateless = stateless;
+	}
+	
+	/**
+	 * This method returns the list of models that this definition
+	 * must conform to.
+	 * 
+	 * @return The list of models that must be conformed to
+	 */
+	@Reference(containment=true)
+	public java.util.List<ConformanceReference> getConformsTo() {
+		return(m_conformsTo);
+	}
+	
+	/**
+	 * This method returns the list of models that this definition
+	 * implements.
+	 * 
+	 * @return The list of models this definition implements
+	 */
+	@Reference(containment=true)
+	public java.util.List<ImplementsReference> getImplements() {
+		return(m_implements);
+	}
+	
+	/**
+	 * This method returns the block of activities associated
+	 * with the definition.
+	 * 
+	 * @return The block of activities
+	 */
+	@Reference(containment=true)
+	public Block getBlock() {
+		
+		if (m_contents == null) {
+			m_contents = new Block();
+			m_contents.setParent(this);
+		}
+		
+		return(m_contents);
+	}
+	
+	/**
+	 * This method sets the block of activities associated
+	 * with the definition.
+	 * 
+	 * @param block The block of activities
+	 */
+	public void setBlock(Block block) {
+		if (m_contents != null) {
+			m_contents.setParent(null);
+		}
+		
+		m_contents = block;
+		
+		if (m_contents != null) {
+			m_contents.setParent(this);
+		}
+	}
+	
+	/**
+	 * This method returns the model in which this definition
+	 * is contained.
+	 * 
+	 * @return The model, or null if not contained within
+	 * 					a model
+	 */
+	public Model getModel() {
+		Model ret=null;
+		ModelObject cur=this;
+		
+		while (ret == null && cur != null) {
+			if (cur instanceof Model) {
+				ret = (Model)cur;
+			} else {
+				cur = cur.getParent();
+			}
+		}
+		
+		return(ret);
+	}
+	
+	/**
+	 * This method returns the definition in which this
+	 * activity is contained.
+	 * 
+	 * @return The definition, or null if not found
+	 */
+	@Override
+	public Definition getEnclosingDefinition() {
+		return(this);
+	}
+	
+	/**
+	 * This method returns the top level definition.
+	 * 
+	 * @return The top level definition
+	 */
+	public Definition getTopLevelDefinition() {
+		Definition ret=this;
+		
+		if (getParent() instanceof Definition) {
+			ret = ((Definition)getParent()).getTopLevelDefinition();
+		}
+		
+		return(ret);
+	}
+	
+	/**
+	 * This method returns the sub-definition associated
+	 * with the supplied name.
+	 * 
+	 * @param name The name
+	 * @return The sub-definition for the supplied name,
+	 * 				or null if not found
+	 */
+	public Definition getSubDefinition(String name) {
+		Definition ret=null;
+	
+		for (int i=0; ret == null &&
+				i < getBlock().getContents().size(); i++) {
+			Activity act=getBlock().getContents().get(i);
+			
+			if (act instanceof Definition &&
+					((Definition)act).getLocatedName().getName().equals(name)) {
+				ret = (Definition)act;
+			}
+		}
+		
+		return(ret);
+	}
+	
+	/**
+	 * This method returns the sub-definition associated
+	 * with the supplied path.
+	 * 
+	 * @param subPath The sub path
+	 * @return The sub-definition for the supplied path,
+	 * 				or null if not found
+	 */
+	public Definition getSubDefinition(SubDefinitionPath subPath) {
+		Definition ret=this;
+	
+		for (int i=0; ret != null && 
+					i < subPath.getPathElementCount(); i++) {
+			ret = ret.getSubDefinition(subPath.getPathElement(i));
+		}
+		
+		return(ret);
+	}
+	
+	/**
+	 * This method return the top level declarations associated
+	 * with the definition.
+	 * 
+	 * @return The declarations
+	 */
+	public java.util.Set<Declaration> getDeclarations() {
+		java.util.Set<Declaration> ret=new java.util.HashSet<Declaration>();
+		
+		// Check if definition has a located role
+		if (getLocatedName().getRole() != null) {
+			ret.add(getLocatedName().getRole());
+		}
+		
+		// Check activities for suitable declarations
+		java.util.Iterator<Activity> iter=getBlock().getContents().iterator();
+		
+		while (iter.hasNext()) {
+			Activity act=iter.next();
+			
+			if (act instanceof RoleList) {
+				ret.addAll(((RoleList)act).getRoles());
+			} else if (act instanceof ChannelList) {
+				ret.addAll(((ChannelList)act).getChannels());
+			}
+		}
+		
+		return(ret);
+	}
+		
+	/**
+	 * This method returns the named top level declaration,
+	 * associated with this definition.
+	 * 
+	 * @param name The declaration name
+	 * @return The declaration, or null if not found
+	 */
+	public Declaration getDeclaration(String name) {
+		Declaration ret=null;
+		
+		java.util.Iterator<Declaration> iter=getDeclarations().iterator();
+		while (ret == null && iter.hasNext()) {
+			ret = iter.next();
+			
+			if (ret.getName().equals(name) == false) {
+				ret = null;
+			}
+		}
+		
+		return(ret);
+	}
+	
+	/**
+	 * This method returns the list of roles defined at
+	 * the top level of the definition.
+	 * 
+	 * @return The list of roles
+	 */
+	public java.util.List<Role> getRoles() {
+		java.util.List<Role> ret=new java.util.Vector<Role>();
+		
+		for (int i=0; i < getBlock().getContents().size(); i++) {
+		
+			if (getBlock().getContents().get(i) instanceof RoleList) {
+				ret.addAll(((RoleList)getBlock().getContents().get(i)).getRoles());
+			}
+		}
+		
+		return(ret);
+	}
+	
+	/**
+	 * This method returns the optional located role
+	 * associated with the enclosing definition.
+	 * 
+	 * @return The located role, or null if the
+	 * 			enclosing definition is not located
+	 */
+	@Override
+	protected Role getLocatedRole() {
+		Role ret=null;
+		
+		if (getLocatedName() != null) {
+			ret = getLocatedName().getRole();
+		}
+		
+		return(ret);
+	}
+
+	private LocatedName m_locatedName=null;
+	private boolean m_stateless=false;
+	private java.util.List<ConformanceReference> m_conformsTo=
+			new ContainmentList<ConformanceReference>(this, ConformanceReference.class);
+	private java.util.List<ImplementsReference> m_implements=
+			new ContainmentList<ImplementsReference>(this, ImplementsReference.class);
+	private Block m_contents=null;
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/ImplementsReference.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/ImplementsReference.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/ImplementsReference.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,49 @@
+/*
+ * Copyright 2007-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 1 Feb 2008 : Initial version created by gary
+ */
+package org.scribble.model;
+
+/**
+ * This class represents a 'implements' link to another
+ * definition.
+ */
+public class ImplementsReference extends NameMappingReference {
+
+	private static final long serialVersionUID = -4001311732651746245L;
+
+	/**
+	 * This is the constructor for the 'implements' reference.
+	 * 
+	 * @param notation The notation
+	 */
+	public ImplementsReference(String notation) {
+		super(notation);
+	}
+	
+	/**
+	 * This is the copy constructor for the 'implements'
+	 * reference.
+	 * 
+	 * @param ref The reference to copy
+	 */
+	public ImplementsReference(ImplementsReference ref) {
+		super(ref);
+	}
+	
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/Import.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/Import.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/Import.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,76 @@
+/*
+ * Copyright 2007 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 22 Oct 2007 : Initial version created by gary
+ */
+package org.scribble.model;
+
+/**
+ * This class represents an import definition associated with a model.
+ * 
+ */
+public class Import extends Statement {
+
+	private static final long serialVersionUID = -5422814413966814121L;
+
+	/**
+	 * The default constructor.
+	 */
+	public Import() {
+	}
+	
+	/**
+	 * This method returns the fully qualified name of the
+	 * definition(s) being imported.
+	 * 
+	 * @return The name
+	 */
+	public String getName() {
+		return(m_name);
+	}
+	
+	/**
+	 * This method sets the fully qualified name of the
+	 * definition(s) being imported.
+	 * 
+	 * @param name The name
+	 */
+	public void setName(String name) {
+		m_name = name;
+	}
+	
+	/**
+	 * This method returns the optional alias.
+	 * 
+	 * @return The alias
+	 */
+	public String getAlias() {
+		return(m_alias);
+	}
+	
+	/**
+	 * This method sets the optional alias.
+	 * 
+	 * @param alias The alias
+	 */
+	public void setAlias(String alias) {
+		m_alias = alias;
+	}
+	
+	private String m_name=null;
+	private String m_alias=null;
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/Interaction.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/Interaction.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/Interaction.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,303 @@
+/*
+ * Copyright 2007 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 22 Oct 2007 : Initial version created by gary
+ */
+package org.scribble.model;
+
+/**
+ * This class represents an interaction.
+ * 
+ */
+public class Interaction extends Behaviour {
+
+	private static final long serialVersionUID = -3628413228540452576L;
+
+	/**
+	 * This class returns the message signature.
+	 * 
+	 * @return The message signature
+	 */
+	@Reference(containment=true)
+	public MessageSignature getMessageSignature() {
+		return(m_messageSignature);
+	}
+	
+	/**
+	 * This method sets the message signature.
+	 * 
+	 * @param signature The message signature
+	 */
+	public void setMessageSignature(MessageSignature signature) {
+		
+		if (m_messageSignature != null) {
+			m_messageSignature.setParent(null);
+		}
+		
+		m_messageSignature = signature;
+		
+		if (m_messageSignature != null) {
+			m_messageSignature.setParent(this);
+		}
+	}
+	
+	/**
+	 * This method returns the optional channel.
+	 * 
+	 * @return The channel
+	 */
+	public Channel getChannel() {
+		return(m_channel);
+	}
+	
+	/**
+	 * This method sets the channel.
+	 * 
+	 * @param channel The channel
+	 */
+	public void setChannel(Channel channel) {
+		m_channel = channel;
+	}
+	
+	/**
+	 * This method returns the optional 'from' role.
+	 * 
+	 * @return The optional 'from' role
+	 */
+	public Role getFromRole() {
+		return(m_fromRole);
+	}
+	
+	/**
+	 * This method sets the optional 'from' role.
+	 * 
+	 * @param part The optional 'from' role
+	 */
+	public void setFromRole(Role part) {
+		m_fromRole = part;
+	}
+	
+	/**
+	 * This method returns the optional 'to' role.
+	 * 
+	 * @return The optional 'to' role
+	 */
+	public Role getToRole() {
+		return(m_toRole);
+	}
+	
+	/**
+	 * This method sets the optional 'to' role.
+	 * 
+	 * @param part The optional 'to' role
+	 */
+	public void setToRole(Role part) {
+		m_toRole = part;
+	}
+	
+	/**
+	 * This method returns the label used to identify
+	 * this request.
+	 * 
+	 * @return The request label
+	 */
+	public String getRequestLabel() {
+		return(m_requestLabel);
+	}
+	
+	/**
+	 * This method sets the label used to identify this
+	 * request.
+	 * 
+	 * @param label The request label
+	 */
+	public void setRequestLabel(String label) {
+		m_requestLabel = label;
+	}
+	
+	/**
+	 * This method returns the label used to correlate
+	 * this response with a previous request.
+	 * 
+	 * @return The replyTo label
+	 */
+	public String getReplyToLabel() {
+		return(m_replyToLabel);
+	}
+	
+	/**
+	 * This method sets the label used to correlate
+	 * this response with a previous request.
+	 * 
+	 * @param label The replyTo label
+	 */
+	public void setReplyToLabel(String label) {
+		m_replyToLabel = label;
+	}
+	
+	/**
+	 * This method returns the list of roles that are
+	 * responsible for initiating the activity. This can
+	 * be used to determine whether the model is
+	 * consistent in terms of decision makers subsequently
+	 * initiating actions.
+	 * 
+	 * @return The list of initiator roles
+	 */
+	@Override
+	public java.util.List<Role> getInitiatorRoles() {
+		java.util.List<Role> ret=super.getInitiatorRoles();
+		
+		if (getFromRole() != null) {
+			
+			if (ret.contains(getFromRole()) == false) {
+				ret.add(getFromRole());
+			}
+		} else {
+			Definition defn=getEnclosingDefinition();
+			
+			if (defn != null) {
+				Role locatedRole=defn.getLocatedName().getRole();
+				
+				if (locatedRole != null && getToRole() != null &&
+						getToRole().equals(locatedRole) == false &&
+						ret.contains(locatedRole) == false) {
+					ret.add(locatedRole);
+				}
+			}
+		}
+		
+		return(ret);
+	}
+
+	/**
+	 * This method returns the list of roles that are
+	 * associated with the outcome of the activity.
+	 * 
+	 * @return The list of final roles
+	 */
+	@Override
+	public java.util.List<Role> getFinalRoles() {
+		java.util.List<Role> ret=super.getFinalRoles();
+		
+		if (getToRole() != null) {
+			
+			if (ret.contains(getToRole()) == false) {
+				ret.add(getToRole());
+			}
+		} else {
+			Definition defn=getEnclosingDefinition();
+			
+			if (defn != null) {
+				Role locatedRole=defn.getLocatedName().getRole();
+				
+				if (locatedRole != null && getFromRole() != null &&
+						getFromRole().equals(locatedRole) == false &&
+						ret.contains(locatedRole) == false) {
+					ret.add(locatedRole);
+				}
+			}
+		}
+		
+		return(ret);
+	}
+
+	/**
+	 * This method returns the list of roles that are
+	 * associated with the behaviour.
+	 * 
+	 * @return The list of associated roles
+	 */
+	@Override
+	public java.util.List<Role> getAssociatedRoles() {
+		java.util.List<Role> ret=super.getAssociatedRoles();
+		
+		if (getToRole() != null &&
+					ret.contains(getToRole()) == false) {
+			ret.add(getToRole());
+		}
+		
+		if (getFromRole() != null &&
+					ret.contains(getFromRole()) == false) {
+			ret.add(getFromRole());
+		}
+		
+		if (getToRole() == null || getFromRole() == null) {
+			Role locatedRole=getLocatedRole();
+			
+			if (locatedRole != null && ret.contains(locatedRole) == false) {
+				ret.add(locatedRole);
+			}
+		}
+		
+		return(ret);
+	}
+
+	/**
+	 * This method returns whether the behaviour is a wait
+	 * state.
+	 * 
+	 * @return Whether the behaviour is a wait state
+	 */
+	@Override
+	public boolean isWaitState() {
+		boolean ret=false;
+		Role role=getLocatedRole();
+		
+		// Check if interaction is a receive
+		if (role != null &&
+			((getToRole() != null && role.equals(getToRole())) ||
+			(getFromRole() != null && role.equals(getFromRole()) == false))) {
+			ret = true;
+		}
+		
+		return(ret);
+	}
+
+	public String toString() {
+		StringBuffer ret=new StringBuffer();
+		
+		if (getMessageSignature() != null) {
+			ret.append(getMessageSignature());
+			ret.append(" ");
+		}
+		
+		if (getFromRole() != null) {
+			ret.append(getFromRole());
+			ret.append("->");
+			
+			if (getToRole() != null) {
+				ret.append(getToRole());
+			}
+		} else {
+			ret.append("->");
+			
+			if (getToRole() != null) {
+				ret.append(getToRole());
+			}
+		}
+		
+		return(ret.toString());
+	}
+	
+	private MessageSignature m_messageSignature=null;
+	private Channel m_channel=null;
+	private Role m_fromRole=null;
+	private Role m_toRole=null;
+	private String m_requestLabel=null;
+	private String m_replyToLabel=null;
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/LocatedName.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/LocatedName.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/LocatedName.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,133 @@
+/*
+ * Copyright 2007 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 13 Nov 2007 : Initial version created by gary
+ */
+package org.scribble.model;
+
+/**
+ * This class represents the name of a model.
+ */
+public class LocatedName extends ModelObject {
+
+	private static final long serialVersionUID = -7430644107592080014L;
+
+	/**
+	 * This is the default constructor for the model name.
+	 */
+	public LocatedName() {
+	}
+	
+	/**
+	 * This is the constructor for the model name.
+	 * 
+	 * @param name The name
+	 * @param located The optional located role
+	 */
+	public LocatedName(String name, Role located) {
+		m_name = name;
+		m_role = located;
+	}
+	
+	/**
+	 * This method returns the name.
+	 * 
+	 * @return The name
+	 */
+	public String getName() {
+		return(m_name);
+	}
+	
+	/**
+	 * This method sets the name.
+	 * 
+	 * @param name The name
+	 */
+	public void setName(String name) {
+		m_name = name;
+	}
+	
+	/**
+	 * This method returns the located role. This
+	 * field is set when the protocol represents a local
+	 * model.
+	 * 
+	 * @return The located role
+	 */
+	@Reference(containment=true)
+	public Role getRole() {
+		return(m_role);
+	}
+	
+	/**
+	 * This method sets the located role. This
+	 * field is set when the protocol represents a local
+	 * model.
+	 * 
+	 * @param role The located role
+	 */
+	public void setRole(Role role) {
+		
+		if (m_role != null) {
+			m_role.setParent(null);
+		}
+		
+		m_role = role;
+		
+		if (m_role != null) {
+			m_role.setParent(this);
+		}
+	}
+	
+	public int hashCode() {
+		int ret=super.hashCode();
+		
+		if (m_name != null) {
+			ret = m_name.hashCode();
+		}
+		
+		return(ret);
+	}
+	
+	public boolean equals(Object other) {
+		boolean ret=false;
+		
+		if (other instanceof LocatedName &&
+				m_name != null &&
+				((LocatedName)other).m_name != null &&
+				m_name.equals(((LocatedName)other).m_name)) {
+			
+			if (m_role == null &&
+					((LocatedName)other).m_role == null) {
+				ret = true;
+			} else if (m_role != null &&
+					((LocatedName)other).m_role != null &&
+					m_role.equals(((LocatedName)other).m_role)) {
+				ret = true;
+			}
+		}
+		
+		return(ret);
+	}
+			
+	public String toString() {
+		return("Name["+getName()+" loc="+m_role+"]");
+	}
+	
+	private String m_name=null;
+	private Role m_role=null;
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/MessageSignature.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/MessageSignature.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/MessageSignature.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,90 @@
+/*
+ * Copyright 2007 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 24 Oct 2007 : Initial version created by gary
+ */
+package org.scribble.model;
+
+/**
+ * This class represents a message signature.
+ */
+public class MessageSignature extends ModelObject {
+
+	private static final long serialVersionUID = 8952431919812954593L;
+
+	/**
+	 * This method returns the optional operation.
+	 * 
+	 * @return The optional operation
+	 */
+	public String getOperation() {
+		return(m_operation);
+	}
+	
+	/**
+	 * This method sets the operation.
+	 * 
+	 * @param operation The operation
+	 */
+	public void setOperation(String operation) {
+		m_operation = operation;
+	}
+	
+	// TODO: Need to think about actual type for this list
+	// See how JDT DOM handles local details (e.g. short
+	// name) versus fully qualified name identifying the
+	// actual type. Issue also is if the model can be
+	// updated, what happens to the fully qualified name?
+	/**
+	 * This method returns the list of type references. If
+	 * no operation is defined, then only one type reference
+	 * should be defined.
+	 * 
+	 * @return The list of type references
+	 */
+	@Reference(containment=true)
+	public java.util.List<TypeReference> getTypes() {
+		return(m_types);
+	}
+	
+	public String toString() {
+		String ret=getOperation();
+		
+		if (getOperation() != null &&
+					getOperation().trim().length() > 0) {
+			ret += "(";
+		}
+		
+		for (int i=0; i < m_types.size(); i++) {
+			if (i > 0) {
+				ret += ",";
+			}
+			ret += m_types.get(i).getAlias();	
+		}
+		
+		if (getOperation() != null &&
+				getOperation().trim().length() > 0) {
+			ret += ")";
+		}
+		
+		return(ret);
+	}
+	
+	private String m_operation=null;
+	private java.util.List<TypeReference> m_types=
+			new ContainmentList<TypeReference>(this, TypeReference.class);
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/Model.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/Model.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/Model.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,213 @@
+/*
+ * Copyright 2007 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 18 Oct 2007 : Initial version created by gary
+ */
+package org.scribble.model;
+
+/**
+ * This class represents the base class for models associated with
+ * specific notations. The details associated with the notation are
+ * contained within derived classes.
+ *
+ */
+public abstract class Model extends ModelObject {
+
+	private static final long serialVersionUID = -1282833027993451521L;
+
+	/**
+	 * The default constructor for the model.
+	 */
+	public Model() {
+	}
+	
+	/**
+	 * This method sets the namespace associated with the model.
+	 * 
+	 * @param namespace The namespace
+	 */
+	public void setNamespace(Namespace namespace) {
+		
+		if (m_namespace != null) {
+			m_namespace.setParent(null);
+		}
+		
+		m_namespace = namespace;
+		
+		if (m_namespace != null) {
+			m_namespace.setParent(this);
+		}
+	}
+	
+	/**
+	 * This method returns the namespace associated with the model.
+	 * 
+	 * @return The namespace
+	 */
+	@Reference(containment=true)
+	public Namespace getNamespace() {
+		return(m_namespace);
+	}
+	
+	/**
+	 * This method returns the list of import definitions.
+	 * 
+	 * @return The import definitions
+	 */
+	@Reference(containment=true)
+	public java.util.List<Import> getImports() {
+		return(m_imports);
+	}
+	
+	/**
+	 * This method returns the model name associated with
+	 * the model.
+	 * 
+	 * @return The model name
+	 */
+	//public abstract ModelName getModelName();
+
+	/**
+	 * This method returns a list of local model references
+	 * associated with a global conversation model. The
+	 * supplied reference provides the template for the
+	 * local model references.
+	 * 
+	 * @param template The global model reference that should
+	 * 				be used as the template for the local model
+	 * 				references
+	 * @return The list of local model references
+	 */
+	public java.util.List<ModelReference> getLocalModels(final ModelReference template) {
+		final java.util.List<ModelReference> localModelRefs=
+					new java.util.Vector<ModelReference>();
+		
+		java.util.List<Definition> defns=getDefinitions();
+		
+		for (int i=0; i < defns.size(); i++) {
+			// Identify all of the roles defined in the
+			// top level definition
+			defns.get(i).visit(new Visitor() {
+				
+				public boolean visit(ModelObject obj) {
+					boolean ret=true;
+					
+					if (obj instanceof RoleList &&
+							((RoleList)obj).isOpen() == false) {
+						RoleList plist=(RoleList)obj;
+						
+						for (int i=0; i < plist.getRoles().size(); i++) {
+							Role role=plist.getRoles().get(i);
+							
+							// Create model reference for this role
+							ModelReference lref=
+								new ModelReference(template);
+							
+							lref.setLocatedRole(role.getName());
+							
+							Definition defn=plist.getEnclosingDefinition();
+							
+							while (defn != null &&
+										(defn.getParent() instanceof Model) == false) {
+								lref.getSubDefinitionPath().addPathElement(0,
+											defn.getLocatedName().getName());
+								
+								ModelObject parent=defn.getParent();
+								
+								if (parent instanceof Activity) {
+									defn = ((Activity)defn.getParent()).getEnclosingDefinition();
+								} else {
+									defn = null;
+								}
+							}
+							
+							// Associate role annotations with local model reference
+							// NOTE: This may be a temporary measure while Role objects
+							// have the Contract model associated with them, as a
+							// convenient way to make the info available to the generator.
+							lref.getAnnotations().putAll(role.getAnnotations());
+							
+							localModelRefs.add(lref);
+						}
+					}
+					
+					return(ret);
+				}
+			});
+		}
+		
+		return(localModelRefs);
+	}
+
+	/**
+	 * This method returns the list of definitions supported by
+	 * this model.
+	 * 
+	 * @return The list of definitions
+	 */
+	public abstract java.util.List<Definition> getDefinitions();
+	
+	/**
+	 * This method determines whether the model is located.
+	 * 
+	 * @return Whether the model is located
+	 */
+	public boolean isLocated() {
+		boolean ret=false;
+		
+		java.util.List<Definition> defns=getDefinitions();
+		
+		if (defns.size() > 0) {
+			ret = (defns.get(0).getLocatedName().getRole() != null);
+		}
+		
+		return(ret);
+	}
+	
+	/**
+	 * This method initializes the URIs for the model
+	 * objects contained in the model.
+	 *
+	 */
+	public void initializeURIs() {
+		initializeURIPart("");
+	}
+	
+	/**
+	 * This method returns the contained model object,
+	 * within the model, based on the supplied URI.
+	 * 
+	 * @param uri The URI
+	 * @return The model object, or null if not found
+	 */
+	public ModelObject findModelObject(String uri) {
+		ModelObject ret=this;
+		
+		String[] parts=uri.split("/");
+		
+		// Start at position 2, as the URI begins with "//"
+		for (int i=2; ret != null && i < parts.length; i++) {
+			ret = ret.findChild(parts[i]);
+		}
+		
+		return(ret);
+	}
+	
+	private Namespace m_namespace=null;
+	private java.util.List<Import> m_imports=
+				new ContainmentList<Import>(this, Import.class);
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/ModelInclude.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/ModelInclude.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/ModelInclude.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,148 @@
+/*
+ * Copyright 2007 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 1 Dec 2007 : Initial version created by gary
+ */
+package org.scribble.model;
+
+/**
+ * This abstract class represents a behavioural activity that
+ * includes another model description, providing name mapping
+ * information where appropriate.
+ */
+public abstract class ModelInclude extends Behaviour {
+
+	private static final long serialVersionUID = 5201789723150072145L;
+
+	/**
+	 * This method returns the reference associated with
+	 * the included model.
+	 * 
+	 * @return The model reference
+	 */
+	public abstract ModelReference getReference();
+	
+	/**
+	 * This method returns the definition being
+	 * included.
+	 * 
+	 * @return The definition
+	 */
+	public abstract Definition getDefinition();
+	
+	/**
+	 * This method indicates whether the model include is
+	 * an inline definition.
+	 * 
+	 * @return Whether an inline definition
+	 */
+	public boolean isInline() {
+		return(false);
+	}
+
+	/**
+	 * This method returns the bindings for the
+	 * composition construct.
+	 * 
+	 * @return The list of bindings
+	 */
+	public java.util.List<DeclarationBinding> getBindings() {
+		return(m_bindings);
+	}
+	
+	/**
+	 * This method returns the declaration binding associated
+	 * with the supplied declaration.
+	 * 
+	 * @param decl The declaration
+	 * @return The declaration binding, or null if not found
+	 */
+	public DeclarationBinding getDeclarationBinding(Declaration decl) {
+		DeclarationBinding ret=null;
+		
+		java.util.Iterator<DeclarationBinding> iter=getBindings().iterator();
+		
+		while (ret == null && iter.hasNext()) {
+			ret = iter.next();
+			
+			if (ret.getDeclaration() != decl) {
+				ret = null;
+			}
+		}
+		
+		return(ret);
+	}
+		
+	/**
+	 * This method determines whether the model include construct
+	 * is asynchronous.
+	 * 
+	 * @return Whether the model include is asynchronous
+	 */
+	public abstract boolean isAsynchronous();
+	
+	/**
+	 * This method returns the list of roles that are
+	 * responsible for initiating the activity. This can
+	 * be used to determine whether the model is
+	 * consistent in terms of decision makers subsequently
+	 * initiating actions.
+	 * 
+	 * @return The list of initiator roles
+	 */
+	@Override
+	public java.util.List<Role> getInitiatorRoles() {
+		java.util.List<Role> ret=super.getInitiatorRoles();
+		
+		Definition defn=getDefinition();
+		
+		if (defn != null) {
+			ret.addAll(defn.getBlock().getInitiatorRoles());
+		}
+		
+		return(ret);
+	}
+
+	/**
+	 * This method returns the list of roles that are
+	 * associated with the outcome of the activity.
+	 * 
+	 * @return The list of final roles
+	 */
+	@Override
+	public java.util.List<Role> getFinalRoles() {
+		java.util.List<Role> ret=null;
+		
+		if (isAsynchronous()) {
+			ret = getInitiatorRoles();
+			
+		} else {
+			ret = super.getFinalRoles();
+			
+			Definition defn=getDefinition();
+			
+			if (defn != null) {
+				ret.addAll(defn.getBlock().getFinalRoles());
+			}	
+		}
+		
+		
+		return(ret);
+	}
+
+	private java.util.List<DeclarationBinding> m_bindings=new java.util.Vector<DeclarationBinding>();
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/ModelObject.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/ModelObject.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/ModelObject.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,355 @@
+/*
+ * Copyright 2007 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 20 Oct 2007 : Initial version created by gary
+ */
+package org.scribble.model;
+
+import java.util.logging.Logger;
+
+/**
+ * This is the generic object from which all Scribble model objects
+ * are derived.
+ */
+public abstract class ModelObject implements java.io.Serializable {
+
+	private static final long serialVersionUID = -8915435247669402908L;
+
+	/**
+	 * This is the default constructor for the model object.
+	 */
+	public ModelObject() {
+	}
+	
+	/**
+	 * This is the constructor initialized with the source
+	 * reference.
+	 * 
+	 * @param source The source reference
+	 */
+	public ModelObject(int start, int end) {
+		m_sourceRef.setStartPosition(start);
+		m_sourceRef.setEndPosition(end);
+	}
+	
+	/**
+	 * This method returns the source reference.
+	 * 
+	 * @return The source reference
+	 */
+	public SourceRef getSource() {
+		return(m_sourceRef);
+	}
+	
+	/**
+	 * This method returns the parent of this
+	 * model object.
+	 * 
+	 * @return The parent, or null if top model
+	 * 					object
+	 */
+	public ModelObject getParent() {
+		return(m_parent);
+	}
+	
+	/**
+	 * This method sets the parent model object.
+	 * 
+	 * @param parent The parent
+	 */
+	public void setParent(ModelObject parent) {
+		m_parent = parent;
+	}
+	
+	/**
+	 * This method establishes the necessary information to
+	 * indicate that the current model object is derived
+	 * from the supplied source model object.
+	 * 
+	 * @param modelObj The source model object
+	 */
+	public void derivedFrom(ModelObject modelObj) {
+		if (modelObj != null) {
+			m_sourceRef = new SourceRef(modelObj.getSource());
+			
+			m_annotations = new Annotations(modelObj.getAnnotations());
+		}
+	}
+	
+	/**
+	 * This method returns the annotations associated
+	 * with this model object.
+	 * 
+	 * @return The annotations
+	 */
+	public Annotations getAnnotations() {
+		return(m_annotations);
+	}
+	
+	/**
+	 * This method visits the model object using the supplied
+	 * visitor.
+	 * 
+	 * @param visitor The visitor
+	 */
+	public void visit(Visitor visitor) {
+		boolean visitContained=visitor.visit(this);
+		
+		if (visitContained) {
+			
+			// Iterate over references and contained model objects
+			java.beans.BeanInfo bi=null;
+			
+			try {
+				bi = java.beans.Introspector.getBeanInfo(getClass());
+			} catch(Exception e) {
+				logger.log(java.util.logging.Level.SEVERE,
+						"Failed to get bean info for class '"+
+						getClass()+"'", e);
+			}
+			
+			if (bi != null) {
+				java.beans.PropertyDescriptor[] pds=bi.getPropertyDescriptors();
+				
+				for (int i=0; i < pds.length; i++) {
+					if (pds[i].getReadMethod() != null) {
+						org.scribble.model.Reference ref=
+							(org.scribble.model.Reference)
+							pds[i].getReadMethod().getAnnotation(
+									org.scribble.model.Reference.class);
+						
+						if (ref != null && ref.containment()) {
+							try {
+								Object refObject=pds[i].getReadMethod().invoke(this, (Object[])null);
+								
+								if (refObject instanceof java.util.List) {
+									java.util.List<?> list=(java.util.List<?>)refObject;
+									
+									for (int j=0; j < list.size(); j++) {
+										if (list.get(j) instanceof ModelObject) {
+											
+											((ModelObject)list.get(j)).visit(visitor);
+											
+										} else {
+											logger.severe("Property '"+
+													pds[i].getName()+"' on class '"+
+													getClass()+
+													"': Object in list is not a ModelObject");
+										}
+									}
+								} else if (refObject instanceof ModelObject) {
+									((ModelObject)refObject).visit(visitor);
+									
+								} else if (refObject != null) {
+									logger.severe("Property '"+pds[i].getName()+"' on class '"+
+											getClass()+
+											"': Contained object is not a ModelObject or list: "+
+											refObject.getClass());
+								}
+							} catch(Exception e) {
+								logger.severe("Failed to obtain property '"+
+										pds[i].getName()+"' on class '"+
+										getClass()+"': "+e);
+								e.printStackTrace();
+							}
+						}
+					}
+				}			
+			}
+		}
+	}
+	
+	/**
+	 * This method sets the URI on the current model object, and
+	 * iterates through all contained model objects to set the
+	 * relative URI on them.
+	 * 
+	 * @param uriPart The model object's URI part, relative to
+	 * 				its parent
+	 */
+	protected void initializeURIPart(String uriPart) {
+		String uri="";
+		
+		if (getParent() != null) {
+			uri = getParent().getSource().getModelObjectURI();
+		}
+
+		uri += "/" + (uriPart == null ? "":uriPart);
+		
+		// Initialize the URI on the source reference
+		getSource().setModelObjectURI(uri);
+		
+		// Iterate over references and contained model objects
+		java.beans.BeanInfo bi=null;
+		
+		try {
+			bi = java.beans.Introspector.getBeanInfo(getClass());
+		} catch(Exception e) {
+			logger.log(java.util.logging.Level.SEVERE,
+					"Failed to get bean info for class '"+
+					getClass()+"'", e);
+		}
+		
+		if (bi != null) {
+			java.beans.PropertyDescriptor[] pds=bi.getPropertyDescriptors();
+			
+			for (int i=0; i < pds.length; i++) {
+				if (pds[i].getReadMethod() != null) {
+					org.scribble.model.Reference ref=
+						(org.scribble.model.Reference)
+						pds[i].getReadMethod().getAnnotation(
+								org.scribble.model.Reference.class);
+					
+					if (ref != null && ref.containment()) {
+						try {
+							Object refObject=pds[i].getReadMethod().invoke(this, (Object[])null);
+							
+							if (refObject instanceof java.util.List) {
+								java.util.List<?> list=(java.util.List<?>)refObject;
+								
+								for (int j=0; j < list.size(); j++) {
+									if (list.get(j) instanceof ModelObject) {
+										
+										((ModelObject)list.get(j)).initializeURIPart(pds[i].getName()+"."+(j+1));
+										
+									} else {
+										logger.severe("Property '"+
+												pds[i].getName()+"' on class '"+
+												getClass()+
+												"': Object in list is not a ModelObject");
+									}
+								}
+							} else if (refObject instanceof ModelObject) {
+								((ModelObject)refObject).initializeURIPart(pds[i].getName());
+								
+							} else if (refObject != null) {
+								logger.severe("Property '"+pds[i].getName()+"' on class '"+
+										getClass()+
+										"': Contained object is not a ModelObject or list: "+
+										refObject.getClass());
+							}
+						} catch(Exception e) {
+							logger.severe("Failed to obtain property '"+
+									pds[i].getName()+"' on class '"+
+									getClass()+"': "+e);
+							e.printStackTrace();
+						}
+					}
+				}
+			}			
+		}
+	}
+	
+	/**
+	 * This method returns the child model object associated with
+	 * the supplied URI part.
+	 * 
+	 * @param uriPart The URI part
+	 * @return The model object, or null if not found
+	 */
+	protected ModelObject findChild(String uriPart) {
+		ModelObject ret=null;
+		int index=-1;
+		int pos=-1;
+		
+		// Check if has an index
+		if ((index=uriPart.indexOf('.')) != -1) {
+			String num=uriPart.substring(index+1);
+			
+			uriPart = uriPart.substring(0, index);
+			
+			try {
+				pos = Integer.parseInt(num);
+			} catch(Exception e) {
+				e.printStackTrace();
+			}	
+		}
+		
+		// Find property
+		java.beans.BeanInfo bi=null;
+		java.beans.PropertyDescriptor pd=null;
+		
+		try {
+			bi = java.beans.Introspector.getBeanInfo(getClass());
+		} catch(Exception e) {
+			logger.log(java.util.logging.Level.SEVERE,
+					"Failed to get bean info for class '"+
+					getClass()+"'", e);
+		}
+		
+		if (bi != null) {
+			java.beans.PropertyDescriptor[] pds=bi.getPropertyDescriptors();
+			
+			for (int i=0; pd == null && i < pds.length; i++) {
+				if (pds[i].getName().equals(uriPart)) {
+					pd = pds[i];
+				}
+			}
+		}
+		
+		if (pd != null && pd.getReadMethod() != null) {
+			try {
+				Object refObject=pd.getReadMethod().invoke(this, (Object[])null);
+				
+				if (refObject instanceof java.util.List &&
+						pos != -1) {
+					java.util.List<?> list=(java.util.List<?>)refObject;
+					
+					ret = (ModelObject)list.get(pos-1);
+				} else if (refObject instanceof ModelObject) {
+					ret = (ModelObject)refObject;
+					
+				} else if (refObject != null) {
+					logger.severe("Property '"+pd.getName()+"' on class '"+
+							getClass()+
+							"': Contained object is not a ModelObject or list: "+
+							refObject.getClass());
+				}
+			} catch(Exception e) {
+				logger.severe("Failed to obtain property '"+
+						pd.getName()+"' on class '"+
+						getClass()+"': "+e);
+				e.printStackTrace();
+			}
+		}
+		
+		return(ret);
+	}
+	
+	/* DON'T PROVIDE AN EQUALS IMPL, as this causes a problem with comparator rules
+	 * when checking for multiple paths - but can use equality of the source refs
+	public boolean equals(Object obj) {
+		boolean ret=false;
+		
+		if (obj instanceof ModelObject) {
+			ModelObject other=(ModelObject)obj;
+			
+			if (m_sourceRef != null &&
+					other.m_sourceRef != null) {
+				ret = m_sourceRef.equals(other.m_sourceRef);
+			}
+		}
+		return(ret);
+	}
+	*/
+	
+	private static Logger logger = Logger.getLogger("org.scribble.model");
+
+	private SourceRef m_sourceRef=new SourceRef();
+	private ModelObject m_parent=null;
+	private Annotations m_annotations=new Annotations();
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/ModelReference.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/ModelReference.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/ModelReference.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,461 @@
+/*
+ * Copyright 2007 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 18 Oct 2007 : Initial version created by gary
+ */
+package org.scribble.model;
+
+/**
+ * This class represents a reference to a Scribble destination
+ * within the model repository.
+ */
+public class ModelReference extends ModelObject {
+
+	private static final long serialVersionUID = 7962754571821586984L;
+
+	/**
+	 * This is the constructor for the model reference.
+	 * 
+	 * @param notation The notation
+	 */
+	public ModelReference(String notation) {
+		m_notation = notation;
+		
+		// Mark as placeholder, until either alias or
+		// local part set
+		m_placeholder = true;
+	}
+	
+	/**
+	 * This is the copy constructor for the model reference.
+	 * 
+	 * @param ref The reference to copy
+	 */
+	public ModelReference(ModelReference ref) {
+		m_alias = ref.m_alias;
+		m_namespace = ref.m_namespace;
+		m_localpart = ref.m_localpart;
+		m_subDefinitionPath = new SubDefinitionPath(ref.getSubDefinitionPath());
+		m_locatedRole = ref.m_locatedRole;
+		m_notation = ref.m_notation;
+		m_inner = ref.m_inner;
+		m_fullyQualified = ref.m_fullyQualified;
+		
+		if (ref.m_properties != null) {
+			m_properties = new java.util.Hashtable<String, Object>();
+			
+			java.util.Iterator<String> iter=ref.m_properties.keySet().iterator();
+			
+			while (iter.hasNext()) {
+				String key=iter.next();
+				Object value=ref.m_properties.get(key);
+				
+				m_properties.put(key, value);
+			}
+		}
+	}
+	
+	/**
+	 * This is the constructor for the model reference.
+	 * 
+	 * @param namespace The namespace
+	 * @param localpart The localpart
+	 * @param located The optional located role
+	 * @param notation The notation
+	 */
+	public ModelReference(String namespace, String localpart,
+					String located, String notation) {
+		m_namespace = namespace;
+		m_localpart = localpart;
+		m_locatedRole = located;
+		m_notation = notation;
+
+	}
+	
+	/**
+	 * This method returns the alias.
+	 * 
+	 * @return The alias
+	 */
+	public String getAlias() {
+		String ret=m_alias;
+
+		// If alias not defined, then use local part
+		// (The getLocalpart method will do the reverse,
+		// so if only one field is defined, then they
+		// will be treated as the same).
+		if (ret == null) {
+			ret = m_localpart;
+		}
+		
+		return(ret);
+	}
+	
+	/**
+	 * This method sets the alias.
+	 * 
+	 * @param alias The alias
+	 */
+	public void setAlias(String alias) {
+		m_alias = alias;
+		
+		// If the alias is set, then model reference
+		// is not a placeholder
+		m_placeholder = false;
+	}
+	
+	/**
+	 * This method returns the namespace.
+	 * 
+	 * @return The namespace
+	 */
+	public String getNamespace() {
+		return(m_namespace);
+	}
+	
+	/**
+	 * This method sets the namespace.
+	 * 
+	 * @param namespace The namespace
+	 */
+	public void setNamespace(String namespace) {
+		m_namespace = namespace;
+	}
+	
+	/**
+	 * This method returns the localpart.
+	 * 
+	 * @return The localpart
+	 */
+	public String getLocalpart() {
+		String ret=m_localpart;
+		
+		// If local part not defined, then use alias
+		// (The getAlias method will do the reverse,
+		// so if only one field is defined, then they
+		// will be treated as the same).
+		if (ret == null) {
+			ret = m_alias;
+		}
+
+		return(ret);
+	}
+	
+	/**
+	 * This method sets the localpart.
+	 * 
+	 * @param localpart The localpart
+	 */
+	public void setLocalpart(String localpart) {
+		m_localpart = localpart;
+		
+		// If the local part is set, then model reference
+		// is not a placeholder
+		m_placeholder = false;
+	}
+	
+	/**
+	 * This method returns the sub definition path. The
+	 * path identifies the sub definition of interest,
+	 * within a global model, for a located role.
+	 * 
+	 * @return The sub definition path
+	 */
+	public SubDefinitionPath getSubDefinitionPath() {
+		return(m_subDefinitionPath);
+	}
+	
+	/**
+	 * This method returns the located role associated
+	 * with the model reference.
+	 * 
+	 * @return The located role
+	 */
+	public String getLocatedRole() {
+		return(m_locatedRole);
+	}
+	
+	/**
+	 * This method sets the located role associated
+	 * with the model reference.
+	 * 
+	 * @param located The located role
+	 */
+	public void setLocatedRole(String located) {
+		m_locatedRole = located;
+	}
+	
+	/**
+	 * This method returns the notation code associated with the
+	 * model reference.
+	 * 
+	 * @return The notation code
+	 */
+	public String getNotation() {
+		return(m_notation);
+	}
+	
+	/**
+	 * This method sets the notation code associated with the
+	 * model reference.
+	 * 
+	 * @param notation The notation code
+	 */
+	public void setNotation(String notation) {
+		m_notation = notation;
+	}
+	
+	/**
+	 * This method indicates whether the model reference is simply
+	 * being used as a placeholder to provide information about the
+	 * notation of the model.
+	 * 
+	 * @return Whether the model reference is a placeholder
+	 */
+	public boolean isPlaceholder() {
+		return(m_placeholder);
+	}
+	
+	/**
+	 * This method determines whether the model reference is
+	 * fully qualified. This means that the namespace and
+	 * localpart were explicitly defined, as opposed to the
+	 * namespace being implicitly resolved using import
+	 * statements associated with the model.<p>
+	 * <p>
+	 * The default value is false.
+	 * 
+	 * @return Whether the model reference is fully qualified
+	 */
+	public boolean isFullyQualified() {
+		return(m_fullyQualified);
+	}
+	
+	/**
+	 * This method sets whether the model reference is
+	 * fully qualified.
+	 * 
+	 * @param fq Whether the model reference is fully qualified
+	 */
+	public void setFullyQualified(boolean fq) {
+		m_fullyQualified = fq;
+	}
+	
+	/**
+	 * This method determines if the model reference has been resolved
+	 * to an existing definition.
+	 * 
+	 * @return Whether the reference has been resolved
+	 */
+	public boolean isResolved() {
+		return(m_namespace != null || isInner());
+	}
+	
+	/**
+	 * This method determines whether the reference is to an inner
+	 * description.
+	 * 
+	 * @return Whether the reference is related to an inner description
+	 */
+	public boolean isInner() {
+		return(m_inner);
+	}
+	
+	/**
+	 * This method sets whether the reference is to an inner description.
+	 * 
+	 * @param inner Whether reference to inner description
+	 */
+	public void setInner(boolean inner) {
+		m_inner = inner;
+	}
+	
+	/**
+	 * This method sets the property associated with
+	 * the supplied name to the supplied value.
+	 * 
+	 * @param name The name
+	 * @param value The value
+	 */
+	public void setProperty(String name, Object value) {
+		m_properties.put(name, value);
+	}
+	
+	/**
+	 * This method returns the set of property names
+	 * associated with the model reference.
+	 * 
+	 * @return The set of property names
+	 */
+	public java.util.Set<String> getPropertyNames() {
+		return(m_properties.keySet());
+	}
+	
+	/**
+	 * This method determines whether another reference, that
+	 * implements (or conforms to) this reference, can be
+	 * used.
+	 * 
+	 * @return Whether to use an implementation of this
+	 * 				referenced model
+	 */
+	public boolean useImplementations() {
+		return(false);
+	}
+	
+	/**
+	 * This method returns the property associated with
+	 * the supplied name.
+	 * 
+	 * @param name The name
+	 * @return The value, or null if not found
+	 */
+	public Object getProperty(String name) {
+		return(m_properties.get(name));
+	}
+	
+	/**
+	 * This method determines if the named property
+	 * is associated with the model reference.
+	 * 
+	 * @param name The property name
+	 * @return Whether the property is associated with the
+	 * 					model reference
+	 */
+	public boolean hasProperty(String name) {
+		return(m_properties.containsKey(name));
+	}
+	
+	/**
+	 * This method determines if the supplied object is
+	 * equivalent to this object.
+	 * 
+	 * @param other The other object
+	 * @return Whether the objects are equal
+	 */
+	public boolean equals(Object other) {
+		boolean ret=false;
+		
+		// TODO: Do we need to consider comparison against a model ref
+		// with just an alias???
+		
+		if (other instanceof ModelReference) {
+			ModelReference ref=(ModelReference)other;
+			
+			ret = compare(m_namespace, ref.m_namespace);
+			
+			if (ret) {
+				ret = compare(m_localpart, ref.m_localpart);
+			}
+			
+			if (ret) {
+				ret = m_subDefinitionPath.equals(
+							ref.m_subDefinitionPath);
+			}
+			
+			if (ret) {
+				ret = compare(m_locatedRole, ref.m_locatedRole);
+			}
+			
+			if (ret) {
+				ret = compare(m_notation, ref.m_notation);
+			}
+		}
+		
+		return(ret);
+	}
+	
+	/**
+	 * This method compares two strings.
+	 * 
+	 * @param first The first string
+	 * @param second The second string
+	 * @return Whether the strings are the same
+	 */
+	protected boolean compare(String first, String second) {
+		boolean ret=true;
+		
+		if (first == null && second != null) {
+			ret = false;
+		} else if (first != null && second == null) {
+			ret = false;
+		} else if (first != null) {
+			ret = first.equals(second);
+		}
+		
+		return(ret);
+	}
+	
+	/**
+	 * This method returns the hash code.
+	 * 
+	 * @return The hash code
+	 */
+	public int hashCode() {
+		int ret=0;
+		
+		if (getAlias() != null) {
+			ret = getAlias().hashCode();
+		}
+		
+		return(ret);
+	}
+	
+	/**
+	 * This method returns the textual representation of the model
+	 * reference.
+	 * 
+	 * @return The textual representation
+	 */
+	public String toText() {
+		String ret=getNamespace();
+		
+		if (ret == null) {
+			ret = getAlias();
+		} else {
+			ret += "."+getAlias();
+		}
+		
+		if (getLocatedRole() != null) {
+			ret += LOCATED_REFERENCE_SEPARATOR+getLocatedRole();
+		}
+		
+		return(ret);
+	}
+	
+	public String toString() {
+		String subdefnpath=m_subDefinitionPath.toString();
+				
+		return("Ref["+getAlias()+" ns="+m_namespace+" lp="+
+				m_localpart+subdefnpath+" loc="+m_locatedRole+
+				" "+m_notation+"]");
+	}
+	
+	public static final String NAMESPACES_TO_MONITOR="NamespacesToMonitor";
+	public static final String LOCATED_REFERENCE_SEPARATOR="@";
+	
+	private String m_alias=null;
+	private String m_namespace=null;
+	private String m_localpart=null;
+	private SubDefinitionPath m_subDefinitionPath=new SubDefinitionPath();
+	private String m_locatedRole=null;
+	private String m_notation=null;
+	private boolean m_inner=false;
+	private boolean m_fullyQualified=false;
+	private boolean m_placeholder=false;
+	private java.util.Hashtable<String, Object> m_properties=new java.util.Hashtable<String, Object>();
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/MultiPathBehaviour.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/MultiPathBehaviour.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/MultiPathBehaviour.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,109 @@
+/*
+ * Copyright 2007 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 29 Nov 2007 : Initial version created by gary
+ */
+package org.scribble.model;
+
+/**
+ * This interface represents behaviours that are associated
+ * with multiple paths.
+ */
+public abstract class MultiPathBehaviour extends Behaviour {
+
+	private static final long serialVersionUID = 2630833363341001897L;
+
+	/**
+	 * This method returns whether the behaviour is a grouping
+	 * construct.
+	 * 
+	 * @return Whether the behaviour is a grouping construct 
+	 */
+	@Override
+	public boolean isGroupingConstruct() {
+		return(true);
+	}
+	
+	/**
+	 * This method returns the list of mutually exclusive
+	 * activity blocks that comprise the multi-path construct.
+	 * 
+	 * @return The list of blocks
+	 */
+	public abstract java.util.List<Block> getPaths();
+	
+	/**
+	 * This method creates a new path within the multi-path
+	 * behaviour. If the implementation cannot create
+	 * the new path, then it will return null.
+	 * 
+	 * @return The new block, or null if cannot be created
+	 */
+	public abstract Block createNewPath();
+	
+	/**
+	 * This method removes a path from the multi-path
+	 * behaviour.
+	 * 
+	 * @param path The path
+	 * @return Whether the path was removed
+	 */
+	public abstract boolean removePath(Block path);
+	
+	/**
+	 * This method indicates whether the construct requires a
+	 * strict scope to be maintained. If the scope does not
+	 * need to be strictly maintained, then it is possible that
+	 * either activities relevant to each path could either
+	 * be duplicated within each path, or shared following
+	 * the construct.
+	 * 
+	 * @return Whether a strict scope should be maintained
+	 */
+	public boolean isStrictScope() {
+		return(false);
+	}
+	
+	/**
+	 * This method indicates whether the construct is
+	 * conditional.
+	 * 
+	 * @return Whether the construct is conditional
+	 */
+	public boolean isConditional() {
+		return(false);
+	}
+	
+	/**
+	 * This method determines whether the paths are mutually
+	 * exclusive.
+	 * 
+	 * @return Whether the paths are mutually exclusive
+	 */
+	public boolean isMutuallyExclusivePaths() {
+		return(false);
+	}
+	
+	/**
+	 * This method returns the ordering constraint for
+	 * the multipath behaviour.
+	 * 
+	 * @return The ordering constraint
+	 */
+	public abstract OrderingConstraint getOrdering();
+	
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/NameMappingReference.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/NameMappingReference.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/NameMappingReference.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,69 @@
+/*
+ * Copyright 2007-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 20 Mar 2008 : Initial version created by gary
+ */
+package org.scribble.model;
+
+/**
+ * This interfaces represents a reference that has
+ * associated name mapping information.
+ */
+public abstract class NameMappingReference extends ModelReference {
+
+	private static final long serialVersionUID = -4511382903786589595L;
+
+	/**
+	 * This is the constructor for a name mapping reference.
+	 * 
+	 * @param notation The notation
+	 */
+	public NameMappingReference(String notation) {
+		super(notation);
+	}
+
+	/**
+	 * This is the copy constructor for the name mapping
+	 * reference.
+	 * 
+	 * @param ref The reference to copy
+	 */
+	public NameMappingReference(NameMappingReference ref) {
+		super(ref);
+		
+		java.util.Iterator<String> iter=ref.getNameMapping().keySet().iterator();
+		
+		while (iter.hasNext()) {
+			String key=iter.next();
+			String value=ref.getNameMapping().get(key);
+			
+			getNameMapping().put(key, value);
+		}
+	}
+	
+	/**
+	 * This method returns the mapping between names in the main
+	 * definition and the definition being implemented.
+	 * 
+	 * @return The name mapping information
+	 */
+	public java.util.Map<String,String> getNameMapping() {
+		return(m_nameMapping);
+	}
+	
+	private java.util.Map<String,String> m_nameMapping=new java.util.Hashtable<String,String>();
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/Namespace.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/Namespace.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/Namespace.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,55 @@
+/*
+ * Copyright 2007 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 22 Oct 2007 : Initial version created by gary
+ */
+package org.scribble.model;
+
+/**
+ * This class represents the namespace associated with a model.
+ * 
+ */
+public class Namespace extends Statement {
+
+	private static final long serialVersionUID = 2546583254402988900L;
+
+	/**
+	 * The default constructor.
+	 */
+	public Namespace() {
+	}
+	
+	/**
+	 * This method returns the name associated with the namespace.
+	 * 
+	 * @return The name
+	 */
+	public String getName() {
+		return(m_name);
+	}
+	
+	/**
+	 * This method sets the name associated with the namespace.
+	 * 
+	 * @param name The namespace
+	 */
+	public void setName(String name) {
+		m_name = name;
+	}
+	
+	private String m_name=null;
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/Notation.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/Notation.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/Notation.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,68 @@
+/*
+ * Copyright 2007 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 23 Oct 2007 : Initial version created by gary
+ */
+package org.scribble.model;
+
+/**
+ * This interface represents the details associated with a
+ * Scribble notation.
+ */
+public interface Notation {
+
+	/**
+	 * This method returns the code associated with the notation.
+	 * 
+	 * @return The notation code
+	 */
+	public String getCode();
+	
+	/**
+	 * This method returns the name of the notation.
+	 * 
+	 * @return The name
+	 */
+	public String getName();
+	
+	/**
+	 * This method returns the initial description associated
+	 * with the supplied reference.
+	 * 
+	 * @param ref The reference
+	 * @return The initial description, or null if no description
+	 */
+	public String getInitialDescription(ModelReference ref);
+	
+	/**
+	 * This method determines whether the Scribble editor should
+	 * be used for editing the notation.
+	 * 
+	 * @return Whether the Scribble editor should be used
+	 */
+	public boolean useScribbleEditor();
+	
+	/**
+	 * This method returns the optional 'super' notation.
+	 * If defined, then this notation is a derived notation
+	 * from the 'super' notation.
+	 * 
+	 * @return The optional 'super' notation
+	 */
+	public Notation getSuperNotation();
+
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/OrderingConstraint.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/OrderingConstraint.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/OrderingConstraint.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,29 @@
+/*
+ * Copyright 2005-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 18 Oct 2008 : Initial version created by gary
+ */
+package org.scribble.model;
+
+/**
+ * This enumeration determines the ordering constraint for a
+ * grouping construct.
+ */
+public enum OrderingConstraint {
+	Unordered,
+	Ordered
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/Reference.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/Reference.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/Reference.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,36 @@
+/*
+ * Copyright 2007 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 28 Oct 2007 : Initial version created by gary
+ */
+package org.scribble.model;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * This annotation type provides information about a relationship
+ * within the Scribble model.
+ */
+ at Retention(RetentionPolicy.RUNTIME)
+ at Target(ElementType.METHOD)
+public @interface Reference {
+
+	boolean containment() default false;
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/Role.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/Role.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/Role.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,101 @@
+/*
+ * Copyright 2007 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 22 Oct 2007 : Initial version created by gary
+ */
+package org.scribble.model;
+
+/**
+ * This class represents a role.
+ * 
+ */
+public class Role extends ModelObject implements Declaration {
+
+	private static final long serialVersionUID = 3368940100177769548L;
+
+	/**
+	 * This is the default constructor.
+	 */
+	public Role() {
+	}
+	
+	/**
+	 * This is the copy constructor.
+	 * 
+	 * @param role The role
+	 */
+	public Role(Role role) {
+		m_name = role.getName();
+	}
+	
+	/**
+	 * This constructor initializes the role with a name.
+	 * 
+	 * @param roleName The role name
+	 */
+	public Role(String roleName) {
+		m_name = roleName;
+	}
+	
+	/**
+	 * This method returns the name of the role.
+	 * 
+	 * @return The name
+	 */
+	public String getName() {
+		return(m_name);
+	}
+	
+	/**
+	 * This method sets the name of the role.
+	 * 
+	 * @param name The name
+	 */
+	public void setName(String name) {
+		m_name = name;
+	}
+	
+	public boolean equals(Object obj) {
+		boolean ret=false;
+	
+		if (obj instanceof Role) {
+			Role other=(Role)obj;
+			
+			if (other.getName() != null && other.getName().equals(m_name)) {
+				ret = true;
+			}
+		}
+		
+		return(ret);
+	}
+	
+	public int hashCode() {
+		int ret=super.hashCode();
+		
+		if (m_name != null) {
+			ret = m_name.hashCode();
+		}
+		
+		return(ret);
+	}
+	
+	public String toString() {
+		return(getName());
+	}
+	
+	private String m_name=null;	
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/RoleList.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/RoleList.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/RoleList.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,82 @@
+/*
+ * Copyright 2007 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 22 Oct 2007 : Initial version created by gary
+ */
+package org.scribble.model;
+
+/**
+ * This class represents the list of roles declared within
+ * a Scribble definition.
+ */
+public class RoleList extends Activity {
+
+	private static final long serialVersionUID = -536190968014907396L;
+
+	/**
+	 * This method returns the list of roles.
+	 * 
+	 * @return The list of roles
+	 */
+	@Reference(containment=true)
+	public java.util.List<Role> getRoles() {
+		return(m_roles);
+	}
+	
+	/**
+	 * This method returns the role associated with
+	 * the supplied name.
+	 * 
+	 * @param name The role name
+	 * @return The role, or null if not found
+	 */
+	public Role getRole(String name) {
+		Role ret=null;
+		
+		for (int i=0; ret == null &&
+					i < m_roles.size(); i++) {
+			if (m_roles.get(i).getName().equals(name)) {
+				ret = m_roles.get(i);
+			}
+		}
+		
+		return(ret);
+	}
+	
+	/**
+	 * This method determines whether the roles in the
+	 * list are 'open', meaning they can be bound to.
+	 * 
+	 * @return Whether the role list is 'open'
+	 */
+	public boolean isOpen() {
+		return(m_open);
+	}
+	
+	/**
+	 * This method sets whether the role list is 'open'.
+	 *  
+	 * @param open Whether the role list should be open
+	 */
+	public void setOpen(boolean open) {
+		m_open = open;
+	}
+	
+	private boolean m_open=false;
+	private java.util.List<Role> m_roles=
+			new ContainmentList<Role>(this, Role.class);
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/SinglePathBehaviour.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/SinglePathBehaviour.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/SinglePathBehaviour.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,82 @@
+/*
+ * Copyright 2007-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 12 Mar 2008 : Initial version created by gary
+ */
+package org.scribble.model;
+
+/**
+ * This interface represents behaviours that are associated
+ * with a single path.
+ */
+public abstract class SinglePathBehaviour extends Behaviour {
+
+	private static final long serialVersionUID = -2129339015295636976L;
+
+	/**
+	 * This method returns whether the behaviour is a grouping
+	 * construct.
+	 * 
+	 * @return Whether the behaviour is a grouping construct 
+	 */
+	@Override
+	public boolean isGroupingConstruct() {
+		return(true);
+	}
+	
+	/**
+	 * This method returns the block of activities
+	 * associated with the single path.
+	 * 
+	 * @return The block of activities
+	 */
+	public abstract Block getBlock();
+	
+	/**
+	 * This method indicates whether the construct requires a
+	 * strict scope to be maintained. If the scope does not
+	 * need to be strictly maintained, then it is possible that
+	 * activities could be contained by the construct or
+	 * following the construct.
+	 * 
+	 * @return Whether a strict scope should be maintained
+	 */
+	public boolean isStrictScope() {
+		return(false);
+	}
+	
+	/**
+	 * This method indicates whether the construct is
+	 * conditional.
+	 * 
+	 * @return Whether the construct is conditional
+	 */
+	public boolean isConditional() {
+		return(false);
+	}
+	
+	/**
+	 * This method indicates whether the construct is
+	 * repetitive.
+	 * 
+	 * @return Whether the construct supports repetition
+	 */
+	public boolean isRepetition() {
+		return(false);
+	}
+	
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/SourceRef.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/SourceRef.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/SourceRef.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,219 @@
+/*
+ * Copyright 2005-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 9 Jun 2008 : Initial version created by gary
+ */
+package org.scribble.model;
+
+public class SourceRef implements java.io.Serializable {
+
+	private static final long serialVersionUID = -6129050166122933390L;
+
+	/**
+	 * This is the default constructor.
+	 */
+	public SourceRef() {
+	}
+	
+	/**
+	 * This is the copy constructor for the source reference.
+	 * 
+	 * @param ref The source reference to copy
+	 */
+	public SourceRef(SourceRef ref) {
+		m_startPosition = ref.getStartPosition();
+		m_endPosition = ref.getEndPosition();
+		m_modelObjectURI = ref.getModelObjectURI();
+		m_componentURI = ref.getComponentURI();
+		m_object = ref.getObject();
+		m_properties.putAll(ref.getProperties());
+	}
+	
+	/**
+	 * This is the constructor to initialize the source reference
+	 * using positional information.
+	 * 
+	 * @param start The start position
+	 * @param end The end position
+	 */
+	public SourceRef(int start, int end) {
+		setStartPosition(start);
+		setEndPosition(end);
+	}
+	
+	/**
+	 * This method sets the start position of this model object
+	 * within the source description.
+	 * 
+	 * @param pos The start position, or -1 if not relevant
+	 */
+	public void setStartPosition(int pos) {
+		m_startPosition = pos;
+	}
+	
+	/**
+	 * This method returns the start position of this model object
+	 * within the source description.
+	 * 
+	 * @return The start position, or -1 if not set
+	 */
+	public int getStartPosition() {
+		return(m_startPosition);
+	}
+	
+	/**
+	 * This method sets the end position of this model object
+	 * within the source description.
+	 * 
+	 * @param pos The end position, or -1 if not relevant
+	 */
+	public void setEndPosition(int pos) {
+		m_endPosition = pos;
+	}
+	
+	/**
+	 * This method returns the end position of this model object
+	 * within the source description.
+	 * 
+	 * @return The end position, or -1 if not set
+	 */
+	public int getEndPosition() {
+		return(m_endPosition);
+	}
+	
+	/**
+	 * This method returns the model object location within
+	 * the model.
+	 * 
+	 * @return The model object URI
+	 */
+	public String getModelObjectURI() {
+		return(m_modelObjectURI);	
+	}
+	
+	/**
+	 * This method sets the model object location within the
+	 * model.
+	 * 
+	 * @param uri The model object URI
+	 */
+	public void setModelObjectURI(String uri) {
+		m_modelObjectURI = uri;
+	}
+	
+	/**
+	 * This method returns the optional component location within the
+	 * source model. This can be used to locate the source component
+	 * associated with the Scribble model object. The format of the
+	 * location will be dependent upon the nature of the model from
+	 * which the Scribble model was derived.
+	 * 
+	 * @return The component location
+	 */
+	public String getComponentURI() {
+		return(m_componentURI);	
+	}
+	
+	/**
+	 * This method sets the component location within the
+	 * source model.
+	 * 
+	 * @param component The component location
+	 */
+	public void setComponentURI(String component) {
+		m_componentURI = component;
+	}
+	
+	/**
+	 * This method returns the object associated with the
+	 * source reference. If the object is not available then
+	 * it can be resolved using the start/end and/or component
+	 * information.
+	 * 
+	 * @return The object, or null if not defined
+	 */
+	public Object getObject() {
+		return(m_object);
+	}
+	
+	/**
+	 * This method sets the object within the
+	 * source model.
+	 * 
+	 * @param obj The object
+	 */
+	public void setObject(Object obj) {
+		m_object = obj;
+	}
+	
+	/**
+	 * This method returns the set of additional properties
+	 * that are associated with the source reference.
+	 * 
+	 *@return The additional properties
+	 */
+	public java.util.Map<String,Object> getProperties() {
+		return(m_properties);
+	}
+	
+	public String toString() {
+		String ret="";
+		
+		if (m_componentURI != null) {
+			ret = m_componentURI;
+		}
+		
+		if (m_startPosition != -1) {
+			if (ret.length() > 0) {
+				ret += ",";
+			}
+			ret += "start="+m_startPosition;
+		}
+		
+		if (m_endPosition != -1) {
+			if (ret.length() > 0) {
+				ret += ",";
+			}
+			ret += "end="+m_endPosition;
+		}
+		
+		return(ret);
+	}
+	
+	public boolean equals(Object obj) {
+		boolean ret=false;
+
+		if (obj instanceof SourceRef) {
+			SourceRef other=(SourceRef)obj;
+			
+			if (m_modelObjectURI != null &&
+					other.m_modelObjectURI != null) {
+				ret = m_modelObjectURI.equals(other.m_modelObjectURI);
+			}
+		}
+		
+		return(ret);
+	}
+	
+	private int m_startPosition=-1;
+	private int m_endPosition=-1;
+	private String m_modelObjectURI=null;
+	private String m_componentURI=null;
+	private Object m_object=null;
+	private java.util.Map<String,Object> m_properties=
+				new java.util.HashMap<String, Object>();
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/Statement.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/Statement.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/Statement.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,29 @@
+/*
+ * Copyright 2007 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 22 Oct 2007 : Initial version created by gary
+ */
+package org.scribble.model;
+
+/**
+ * This class represents the base class for all Scribble statements.
+ */
+public abstract class Statement extends ModelObject {
+
+	private static final long serialVersionUID = -3646837175049449380L;
+
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/SubDefinitionPath.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/SubDefinitionPath.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/SubDefinitionPath.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,144 @@
+/*
+ * Copyright 2005-9 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 26 Apr 2009 : Initial version created by gary
+ */
+package org.scribble.model;
+
+/**
+ * This class provides the path to a definition scope contained
+ * within a top level definition.
+ */
+public class SubDefinitionPath {
+
+	/**
+	 * The default constructor.
+	 */
+	public SubDefinitionPath() {		
+	}
+	
+	/**
+	 * This constructor is initialised with the arrau of
+	 * path elements.
+	 * 
+	 * @param elems The array of path elements
+	 */
+	public SubDefinitionPath(String[] elems) {
+		for (int i=0; i < elems.length; i++) {
+			m_path.add(elems[i]);
+		}
+	}
+	
+	/**
+	 * The copy constructor.
+	 * 
+	 * @param sdp The path to copy
+	 */
+	public SubDefinitionPath(SubDefinitionPath sdp) {
+		m_path.addAll(sdp.m_path);
+	}
+	
+	/**
+	 * This method adds an element to the end of the path.
+	 * 
+	 * @param elem The element
+	 */
+	public void addPathElement(String elem) {
+		m_path.add(elem);
+	}
+	
+	/**
+	 * This method adds an element to the specified location
+	 * within the path.
+	 * 
+	 * @param pos The position
+	 * @param elem The element
+	 */
+	public void addPathElement(int pos, String elem) {
+		m_path.add(pos, elem);
+	}
+	
+	/**
+	 * This method returns the element at the specified position
+	 * within the path.
+	 * 
+	 * @param pos The position
+	 * @return The element
+	 */
+	public String getPathElement(int pos) {
+		return(m_path.get(pos));
+	}
+	
+	/**
+	 * This method removes an element from the specified location
+	 * within the path.
+	 * 
+	 * @param pos The position
+	 * @return The removed element
+	 */
+	public String removePathElement(int pos) {
+		return(m_path.remove(pos));
+	}
+	
+	/**
+	 * This method returns the number of elements within the
+	 * path.
+	 * 
+	 * @return The number of elements in the path
+	 */
+	public int getPathElementCount() {
+		return(m_path.size());
+	}
+	
+	/**
+	 * This method clears the path associated with the sub
+	 * definition.
+	 */
+	public void clear() {
+		m_path.clear();
+	}
+	
+	public boolean equals(Object other) {
+		boolean ret=false;
+		
+		if (other instanceof SubDefinitionPath) {
+			SubDefinitionPath sdp=(SubDefinitionPath)other;
+			
+			ret = (m_path.size() ==
+				sdp.m_path.size());
+
+			for (int i=0; ret && i < m_path.size(); i++) {
+				ret = m_path.get(i).equals(
+							sdp.m_path.get(i));
+			}
+		}
+		
+		return(ret);
+	}
+	
+	public String toString() {
+		String ret="";
+		
+		for (int i=0; i < m_path.size(); i++) {
+			ret += "$"+m_path.get(i);
+		}
+		
+		return(ret);
+	}		
+	
+	private java.util.List<String> m_path=new java.util.Vector<String>();
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/TypeModel.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/TypeModel.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/TypeModel.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,86 @@
+/*
+ * Copyright 2007-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 23 Jan 2008 : Initial version created by gary
+ */
+package org.scribble.model;
+
+import java.util.List;
+
+import org.scribble.extensions.RegistryInfo;
+
+/**
+ * This class represents the protocol model.
+ * 
+ */
+ at RegistryInfo(extension=Model.class)
+public class TypeModel extends Model {
+
+	private static final long serialVersionUID = 5245035155865638862L;
+
+	/**
+	 * This method returns the notation associated with
+	 * the model.
+	 * 
+	 * @return The notation
+	 */
+	public String getNotation() {
+		return(TYPE);
+	}
+	
+	/**
+	 * This method returns the model name associated with
+	 * the model.
+	 * 
+	 * @return The model name
+	 */
+	public LocatedName getModelName() {
+		return(m_modelName);
+	}
+	
+	/**
+	 * This method is used to set the model name.
+	 * 
+	 * @param modelName The model name
+	 */
+	public void setModelName(LocatedName modelName) {
+		m_modelName = modelName;
+	}
+	
+	/**
+	 * This method returns a read-only list of roles
+	 * associated with the model. If this model represents
+	 * a local model, then the roles in the list
+	 * will be the remote roles, with the local
+	 * role being associated with the model name.
+	 * 
+	 * @return The read-only list of roles, or null if
+	 * 			roles are not relevant for this model
+	 */
+	public java.util.List<Role> getRoles() {
+		return(null);
+	}
+
+	@Override
+	public List<Definition> getDefinitions() {
+		return(new java.util.Vector<Definition>());
+	}
+	
+	public static final String TYPE="stp";
+
+	private LocatedName m_modelName=null;
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/TypeNotation.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/TypeNotation.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/TypeNotation.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,47 @@
+/*
+ * Copyright 2007 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 8 Nov 2007 : Initial version created by gary
+ */
+package org.scribble.model;
+
+import org.scribble.extensions.*;
+
+/**
+ * This class represents the type notation.
+ */
+ at RegistryInfo(extension=org.scribble.model.Notation.class)
+public class TypeNotation extends org.scribble.model.AbstractNotation {
+
+	/**
+	 * This is the default constructor for the type notation.
+	 */
+	public TypeNotation() {
+		super(TypeModel.TYPE, "Type", true);
+	}
+	
+	/**
+	 * This method returns the initial description associated
+	 * with the supplied reference.
+	 * 
+	 * @param ref The reference
+	 * @return The initial description, or null if no description
+	 */
+	public String getInitialDescription(ModelReference ref) {
+		return(null);
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/TypeReference.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/TypeReference.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/TypeReference.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,48 @@
+/*
+ * Copyright 2007 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 24 Oct 2007 : Initial version created by gary
+ */
+package org.scribble.model;
+
+/**
+ * This class represents a type reference.
+ */
+public class TypeReference extends ModelReference {
+
+	private static final long serialVersionUID = 6492984753933254949L;
+
+	/**
+	 * This is the default constructor for the type reference.
+	 */
+	public TypeReference() {
+		super(TypeModel.TYPE);
+	}
+
+	/**
+	 * This method determines whether another reference, that
+	 * implements (or conforms to) this reference, can be
+	 * used.
+	 * 
+	 * @return Whether to use an implementation of this
+	 * 				referenced model
+	 */
+	public boolean useImplementations() {
+		return(true);
+	}
+	
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/Visitor.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/Visitor.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/Visitor.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,36 @@
+/*
+ * Copyright 2007 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 18 Nov 2007 : Initial version created by gary
+ */
+package org.scribble.model;
+
+/**
+ * This interface represents a visitor which can be used
+ * to traverse a model.
+ */
+public interface Visitor {
+
+	/**
+	 * This method visits the supplied model object.
+	 * 
+	 * @param obj The model object
+	 * @return Whether contained objects should be visited
+	 */
+	public boolean visit(ModelObject obj);
+	
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/admin/AbstractDependencyManager.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/admin/AbstractDependencyManager.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/admin/AbstractDependencyManager.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,844 @@
+/*
+ * Copyright 2007-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 8 Nov 2007 : Initial version created by gary
+ */
+package org.scribble.model.admin;
+
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+import org.scribble.extensions.RegistryFactory;
+import org.scribble.model.LocatedName;
+import org.scribble.model.ModelReference;
+import org.scribble.model.Namespace;
+
+/**
+ * This class provides a default implementation of the dependency
+ * manager.
+ */
+public abstract class AbstractDependencyManager implements DependencyManager {
+
+	public AbstractDependencyManager() {
+		initialize();
+	}
+	
+	protected void initialize() {
+		
+		// Need to subscribe for model change events
+		ModelChangeListener l=new DefaultModelChangeListener() {
+			
+			/**
+			 * This method reports a new model has been added.
+			 * 
+			 * @param ref The reference associated with the model
+			 */
+			public void modelAdded(ModelReference ref) {
+				logger.info("Model added: "+ref);
+
+				java.util.List<ModelReference> refs=
+								getDependents(ref, false);
+				
+				checkIndirectDependents(ref, refs);
+				
+				processAdded(refs, ref);
+				
+				// Check if any unresolved references match the added
+				// resource
+				java.util.List<ModelReference> tmplist=getUnresolved();
+				
+				for (int i=0; i < tmplist.size(); i++) {
+					ModelReference unresolved=tmplist.get(i);
+					
+					if (unresolved.getAlias().equals(ref.getLocalpart()) &&
+							unresolved.getNotation().equals(ref.getNotation())) {
+						
+						refs = getDependents(unresolved);
+						
+						if (logger.isLoggable(Level.FINE)) {
+							logger.fine("Process dependents for unresolved: "+unresolved);
+						}
+						
+						processAdded(refs, ref);
+					}
+				}				
+			}
+
+			protected void processAdded(java.util.List<ModelReference> refs,
+									ModelReference ref) {
+				logger.info("Process additions for: "+ref);
+				
+				if (refs != null) {
+					java.util.List<ModelReference> tmplist=
+						new java.util.Vector<ModelReference>(refs);
+					
+					for (int i=0; i < tmplist.size(); i++) {
+						
+						if (logger.isLoggable(Level.FINE)) {
+							logger.fine("Notify dependency addition: "+tmplist.get(i));
+						}
+						
+						java.util.List<Object> handlers=
+							RegistryFactory.getRegistry().getExtensions(
+								org.scribble.model.admin.DependencyHandler.class,
+									tmplist.get(i).getNotation());
+						
+						if (handlers != null) {
+							for (int j=0; j < handlers.size(); j++) {
+								DependencyHandler handler=
+									(DependencyHandler)handlers.get(j);
+								
+								logger.fine("Notify handler: "+handler);
+								
+								handler.dependencyAdded(tmplist.get(i), ref);
+							}
+						}
+					}
+				}
+			}
+			
+			/**
+			 * This method reports an update to a model.
+			 * 
+			 * @param ref The reference associated with the model
+			 */
+			public void modelUpdated(ModelReference ref) {
+				logger.info("Model updated: "+ref);
+
+				java.util.List<ModelReference> notifyList=
+						new java.util.Vector<ModelReference>();
+				
+				findDependents(ref, notifyList);
+				
+				checkIndirectDependents(ref, notifyList);
+				
+				if (notifyList != null && notifyList.size() > 0) {
+					
+					for (int i=0; i < notifyList.size(); i++) {
+											
+						java.util.List<Object> handlers=
+							RegistryFactory.getRegistry().getExtensions(
+								org.scribble.model.admin.DependencyHandler.class,
+								notifyList.get(i).getNotation());
+						
+						if (handlers != null) {
+							for (int j=0; j < handlers.size(); j++) {
+								DependencyHandler handler=
+									(DependencyHandler)handlers.get(j);
+								
+								handler.dependencyUpdated(notifyList.get(i), ref);
+							}
+						}
+					}
+				}
+			}
+			
+			/**
+			 * This method reports an existing model has been removed.
+			 * 
+			 * @param ref The reference associated with the model
+			 */
+			public void modelRemoved(ModelReference ref) {
+				logger.info("Model removed: "+ref);
+
+				java.util.List<ModelReference> refs=
+								getDependents(ref, false);
+				
+				checkIndirectDependents(ref, refs);
+				
+				if (refs != null) {
+					java.util.List<ModelReference> tmplist=
+						new java.util.Vector<ModelReference>(refs);
+					
+					for (int i=0; i < tmplist.size(); i++) {
+						
+						java.util.List<Object> handlers=
+							RegistryFactory.getRegistry().getExtensions(
+								org.scribble.model.admin.DependencyHandler.class,
+									tmplist.get(i).getNotation());
+						
+						if (handlers != null) {
+							for (int j=0; j < handlers.size(); j++) {
+								DependencyHandler handler=
+									(DependencyHandler)handlers.get(j);
+								
+								handler.dependencyRemoved(tmplist.get(i), ref);
+							}
+						}
+					}
+				}
+			}
+		};
+		
+		org.scribble.model.admin.ModelRepository mrep=
+			(org.scribble.model.admin.ModelRepository)
+			RegistryFactory.getRegistry().getExtension(
+					org.scribble.model.admin.ModelRepository.class, null);
+		
+		if (mrep != null) {
+			mrep.addModelChangeListener(l);
+		}
+	}
+	
+	/**
+	 * This method recursively finds dependents associated
+	 * with the supplied reference.
+	 * 
+	 * @param ref The reference
+	 * @param dependents The list of dependents
+	 */
+	protected void findDependents(ModelReference ref,
+			java.util.List<ModelReference> dependents) {
+		java.util.List<ModelReference> refs=
+					getDependents(ref);
+	
+		for (int i=0; i < refs.size(); i++) {
+			if (dependents.contains(refs.get(i)) == false) {
+				dependents.add(refs.get(i));
+				
+				findDependents(refs.get(i), dependents);
+			}
+		}
+	}
+
+	/**
+	 * This method recursively finds dependents associated
+	 * with the supplied reference.
+	 * 
+	 * @param ref The reference
+	 * @param type The dependency type
+	 * @param dependents The list of dependents
+	 */
+	protected void findDependents(ModelReference ref, DependencyType type,
+			java.util.List<ModelReference> dependents) {
+		java.util.List<ModelReference> refs=
+					getDependents(ref, type);
+	
+		for (int i=0; i < refs.size(); i++) {
+			if (dependents.contains(refs.get(i)) == false) {
+				dependents.add(refs.get(i));
+				
+				findDependents(refs.get(i), type, dependents);
+			}
+		}
+	}
+
+	/**
+	 * This method checks whether the supplied reference is a
+	 * global model, with non-persisted local models that
+	 * have dependents.
+	 * 
+	 * @param ref The model reference
+	 * @param list The list of notifiable model references
+	 */
+	protected void checkIndirectDependents(ModelReference ref,
+						java.util.List<ModelReference> list) {
+		
+		if (ref.getLocatedRole() == null) {
+			
+			java.util.List<ModelReference> conforms=
+						getDependencies(ref, DependencyType.ConformsTo);
+			
+			for (int i=0; i < conforms.size(); i++) {
+				ModelReference conform=conforms.get(i);
+				
+				// Only check if conformant reference is a projection of this
+				// global model, and does not exist (TODO)
+				// GPB: 23/6/08 - ignore whether same namespace/localpart
+				// for now, as if conforms to another model that does
+				// not exist, then this model may effectively represent
+				// the behaviour?? May want to check that this conform
+				// ref (both local and global) does not exist before
+				// checking its implements dependences??
+				//if (conform.getNamespace().equals(ref.getNamespace()) &&
+				//		conform.getLocalpart().equals(ref.getLocalpart()) &&
+				//		conform.getNotation().equals(ref.getNotation())) {
+					
+					// Check for dependents on the implements reference
+					// GPB: (23/6/08) was 'conformsTo' ref, but was changed to
+					// use implements relation for consistency with protocol->conversation
+					// relationship
+					java.util.List<ModelReference> dependents=
+							getDependents(conform, DependencyType.Implements);
+					
+					// Check that dependent is not the original reference
+					// or already in the list
+					for (int j=0; j < dependents.size(); j++) {
+						
+						if (dependents.get(j).equals(ref) == false &&
+								list.contains(dependents.get(j)) == false) {
+							list.add(dependents.get(j));
+						}
+					}
+				//}
+			}
+		}
+		
+		/*
+		if (ref.getNotation().equals("java")) {
+			java.util.List<ModelReference> impls=
+					getDependencies(ref, DependencyType.Implements);
+			
+			for (int i=0; i < impls.size(); i++) {
+				java.util.List<ModelReference> uses=
+					getDependents(impls.get(i), DependencyType.Uses);
+				
+				for (int j=0; j < uses.size(); j++) {
+					if (list.contains(uses.get(j)) == false) {
+						list.add(uses.get(j));
+					}
+				}
+			}
+		}
+		*/
+	}
+	
+	/**
+	 * This method indicates that any dependencies recorded
+	 * for the supplied reference should be cleared.
+	 * 
+	 * @param ref The reference
+	 */
+	public void clearDependencies(ModelReference ref) {
+		logger.info("Clear Dependencies: "+ref);
+		
+		// Check for any 'interfaces' that this reference implements.
+		// These will be used, at the end of this method, to determine
+		// if there are any 'uses' of the interface, where the interface
+		// does not actually exist. Then we need to notify the 'uses'
+		// definitions to revalidate themselves.
+		java.util.List<ModelReference> dependencies=
+					getDependencies(ref, DependencyType.Implements);
+		
+		// Clear the model name for ref
+		m_modelNames.remove(ref);
+
+		// Clear the dependency information
+		java.util.Iterator<DependencyInfo> iter=m_dependencyInfo.values().iterator();
+		
+		while (iter.hasNext()) {
+			DependencyInfo info=iter.next();
+			
+			info.clearDependencies(ref);
+		}
+
+		// Check if there are any interfaces that need to be processed
+		// (i.e. uses of the interface revalidated if the interface
+		// does not actually exist - so the implementation of the
+		// interface is standing in for the interface).
+		if (dependencies.size() > 0) {
+			
+			org.scribble.model.admin.ModelRepository mrep=
+				(org.scribble.model.admin.ModelRepository)
+				RegistryFactory.getRegistry().getExtension(
+						org.scribble.model.admin.ModelRepository.class, null);
+			
+			for (int i=0; i < dependencies.size(); i++) {
+				notifyInterfaceDependents(ref, dependencies.get(i), mrep);
+			}
+		}		
+	}
+	
+	/**
+	 * This method indicates that a dependency should be
+	 * established between the 'from' model reference to the
+	 * 'to' model reference. If the 'to' model reference
+	 * should be changed, then then registered
+	 * DependencyHandler implementations will be
+	 * invoked to handle the change. 
+	 * 
+	 * @param from The dependent model reference
+	 * @param to The model reference representing the dependency
+	 * @param type The type of dependency
+	 */
+	public void recordDependency(ModelReference from, ModelReference to,
+							DependencyType type) {
+		java.util.List<ModelResource> refs=null;
+		ModelResource fromResource=getResource(from);
+		ModelResource toResource=getResource(to);
+		
+		if (logger.isLoggable(Level.FINE)) {
+			logger.fine("Record dependency from: "+from+" to: "+to);
+		}
+		
+		// Obtain dependency info for this type
+		DependencyInfo info=m_dependencyInfo.get(type);
+		
+		if (info == null) {
+			info = new DependencyInfo(type);
+			m_dependencyInfo.put(type, info);
+		}
+
+		// Record any unresolved references
+		if (to.isResolved() == false) {
+			if (logger.isLoggable(Level.FINE)) {
+				logger.fine("Add to unresolved: "+to);
+			}
+	
+			info.getUnresolved().add(to);
+		}
+		
+		// Establish link to dependents
+		refs = info.getDependents().get(toResource);
+		
+		if (refs == null) {
+			refs = new java.util.Vector<ModelResource>();
+			info.getDependents().put(toResource, refs);
+		}
+		
+		if (refs.contains(fromResource) == false) {
+			refs.add(fromResource);
+
+			if (logger.isLoggable(Level.FINE)) {
+				logger.fine("Add dependent: "+from+" : resource="+fromResource+" size="+refs.size());
+			}
+		}
+		
+		// Establish reverse relationship
+		refs = info.getDependencies().get(fromResource);
+		
+		if (refs == null) {
+			refs = new java.util.Vector<ModelResource>();
+			info.getDependencies().put(fromResource, refs);
+		}
+
+		// Add reference regardless of whether an equivalent
+		// reference is already in the list, as each reference
+		// may be in a different position in the source file
+		refs.add(toResource);
+		
+		if (logger.isLoggable(Level.FINE)) {
+			logger.fine("Add dependence: "+to+" : resource="+toResource+" size="+refs.size());
+		}
+		
+		logger.info("Recorded dependency between '"+from+"' and '"+to+"' of type "+type);
+		
+		// If 'implements', then check if any dependents need
+		// to be notified
+		if (type == DependencyType.Implements) {
+			
+			org.scribble.model.admin.ModelRepository mrep=
+				(org.scribble.model.admin.ModelRepository)
+				RegistryFactory.getRegistry().getExtension(
+						org.scribble.model.admin.ModelRepository.class, null);
+			
+			notifyInterfaceDependents(from, to, mrep);
+		}
+	}
+
+	/**
+	 * This method checks the uses of an interface, to determine if they need
+	 * to be re-validated when an implementation of that interface is changed.
+	 * 
+	 * @param from The implementation reference
+	 * @param to The interface reference
+	 * @param mrep The model repository
+	 */
+	protected void notifyInterfaceDependents(ModelReference from, ModelReference to,
+					org.scribble.model.admin.ModelRepository mrep) {
+		
+		// Only need to notify if 'interface' does not exist, as
+		// the implementation of the interface can be used to
+		// stand in for the interface.
+		if (mrep.exists(to, null) == false) {
+			
+			if (logger.isLoggable(Level.FINE)) {
+				logger.fine("Notify interface dependents: impl="+from+" intf="+to);
+			}
+			
+			// Check if any unresolved references match the added
+			// resource
+			DependencyInfo uses=m_dependencyInfo.get(DependencyType.Uses);
+			
+			if (uses != null) {
+				java.util.List<ModelReference> tmplist=uses.getUnresolved();
+				
+				for (int i=0; i < tmplist.size(); i++) {
+					ModelReference unresolved=tmplist.get(i);
+					
+					if (unresolved.getAlias().equals(to.getLocalpart()) &&
+							unresolved.getNotation().equals(to.getNotation())) {
+						
+						java.util.List<ModelReference> mrs=getDependents(unresolved);
+						
+						if (logger.isLoggable(Level.FINE)) {
+							logger.fine("Notify dependents for unresolved: "+unresolved);
+						}
+						
+						for (int k=0; k < mrs.size(); k++) {
+							
+							java.util.List<Object> handlers=
+								RegistryFactory.getRegistry().getExtensions(
+									org.scribble.model.admin.DependencyHandler.class,
+									mrs.get(k).getNotation());
+							
+							if (handlers != null) {
+								for (int j=0; j < handlers.size(); j++) {
+									DependencyHandler handler=
+										(DependencyHandler)handlers.get(j);
+									
+									handler.dependencyUpdated(mrs.get(k), from);
+								}
+							}
+						}
+					}
+				}
+			}
+
+			// Check if dependent on the reference
+			java.util.List<ModelReference> notifyList=
+					getDependents(to, DependencyType.Uses);
+		
+			if (notifyList != null && notifyList.size() > 0) {
+				
+				for (int i=0; i < notifyList.size(); i++) {
+										
+					if (logger.isLoggable(Level.FINE)) {
+						logger.fine("Notify dependent: "+notifyList.get(i));
+					}
+
+					java.util.List<Object> handlers=
+						RegistryFactory.getRegistry().getExtensions(
+							org.scribble.model.admin.DependencyHandler.class,
+							notifyList.get(i).getNotation());
+					
+					if (handlers != null) {
+						for (int j=0; j < handlers.size(); j++) {
+							DependencyHandler handler=
+								(DependencyHandler)handlers.get(j);
+							
+							handler.dependencyUpdated(notifyList.get(i), to);
+						}
+					}
+				}
+			}
+
+			// Check if conforms to the reference
+			notifyList = getDependents(to, DependencyType.ConformsTo);
+		
+			if (notifyList != null && notifyList.size() > 0) {
+				
+				for (int i=0; i < notifyList.size(); i++) {
+										
+					if (logger.isLoggable(Level.FINE)) {
+						logger.fine("Notify dependent: "+notifyList.get(i));
+					}
+
+					java.util.List<Object> handlers=
+						RegistryFactory.getRegistry().getExtensions(
+							org.scribble.model.admin.DependencyHandler.class,
+							notifyList.get(i).getNotation());
+					
+					if (handlers != null) {
+						for (int j=0; j < handlers.size(); j++) {
+							DependencyHandler handler=
+								(DependencyHandler)handlers.get(j);
+							
+							handler.dependencyUpdated(notifyList.get(i), to);
+						}
+					}
+				}
+			}
+		}
+	}
+
+	/**
+	 * This method records the model name against the source description's
+	 * model reference.
+	 * 
+	 * @param ref The model reference
+	 * @param modelName The model name
+	 */
+	public void recordModelName(ModelReference ref, LocatedName modelName) {
+		m_modelNames.put(ref, modelName);
+	}
+	
+	/**
+	 * This method records the namespace against the source description's
+	 * model reference.
+	 * 
+	 * @param ref The model reference
+	 * @param namespace The namespace
+	 */
+	public void recordNamespace(ModelReference ref, Namespace namespace) {
+		m_namespaces.put(ref, namespace);
+	}
+	
+	/**
+	 * This method returns the model name associated with the supplied
+	 * model reference.
+	 * 
+	 * @param ref The model reference
+	 * @return The model name
+	 */
+	public LocatedName getModelName(ModelReference ref) {
+		return(m_modelNames.get(ref));
+	}
+	
+	/**
+	 * This method returns the namespace associated with the supplied
+	 * model reference.
+	 * 
+	 * @param ref The model reference
+	 * @return The namespace
+	 */
+	public Namespace getNamespace(ModelReference ref) {
+		return(m_namespaces.get(ref));
+	}
+	
+	/**
+	 * This method returns the list of unresolved model references.
+	 * 
+	 * @return The list of unresolved model references
+	 */
+	public java.util.List<ModelReference> getUnresolved() {
+		java.util.List<ModelReference> ret=new java.util.Vector<ModelReference>();
+		
+		java.util.Iterator<DependencyInfo> iter=m_dependencyInfo.values().iterator();
+		
+		while (iter.hasNext()) {
+			DependencyInfo info=iter.next();
+			
+			java.util.List<ModelReference> refs=info.getUnresolved();
+			
+			if (refs != null) {
+				ret.addAll(refs);
+			}
+		}
+		
+		return(ret);
+	}
+	
+	/**
+	 * This method returns the implementation of the model resource
+	 * associated with the supplied model reference.
+	 * 
+	 * @param ref The model reference
+	 * @return The resource
+	 */
+	protected abstract ModelResource getResource(ModelReference ref);
+	
+	/**
+	 * This method returns the list of model references dependent upon
+	 * the supplied reference.
+	 * 
+	 * @param ref The model reference
+	 * @return The list of model references dependent upon the supplied reference
+	 */
+	public java.util.List<ModelReference> getDependents(ModelReference ref) {
+		return(getDependents(ref, true));
+	}
+	
+	/**
+	 * This method returns the list of model references dependent upon
+	 * the supplied reference.
+	 * 
+	 * @param ref The model reference
+	 * @param useResource Whether to use the resource
+	 * @return The list of model references dependent upon the supplied reference
+	 */
+	protected java.util.List<ModelReference> getDependents(ModelReference ref,
+							boolean useResource) {
+		java.util.List<ModelReference> ret=new java.util.Vector<ModelReference>();
+		ModelResource resource=getResource(ref);
+		java.util.Iterator<DependencyInfo> iter=m_dependencyInfo.values().iterator();
+		
+		while (iter.hasNext()) {
+			DependencyInfo info=iter.next();
+			
+			java.util.List<ModelResource> refs=info.getDependents().get(
+									useResource?resource:ref);
+			
+			if (refs != null) {
+				for (int i=0; i < refs.size(); i++) {
+					ret.add(refs.get(i).getReference());
+				}
+			}
+		}
+		
+		return(ret);
+	}
+	
+	/**
+	 * This method returns the list of model references dependent upon
+	 * the supplied reference, of the supplied dependency type.
+	 * 
+	 * @param ref The model reference
+	 * @param type The type of dependency
+	 * @return The list of model references dependent upon the supplied reference
+	 */
+	public java.util.List<ModelReference> getDependents(ModelReference ref,
+						DependencyType type) {
+		java.util.List<ModelReference> ret=new java.util.Vector<ModelReference>();
+		ModelResource resource=getResource(ref);
+		
+		// Obtain dependency info for this type
+		DependencyInfo info=m_dependencyInfo.get(type);
+		
+		if (info != null) {
+			java.util.List<ModelResource> refs=info.getDependents().get(resource);
+			
+			if (refs != null) {
+				for (int i=0; i < refs.size(); i++) {
+					ret.add(refs.get(i).getReference());
+				}
+			}
+		}
+		
+		return(ret);
+	}
+
+	/**
+	 * This method returns the list of model references that are dependencies for
+	 * the supplied reference.
+	 * 
+	 * @param ref The model reference
+	 * @return The list of model references that are dependencies for 
+	 * 				the supplied reference
+	 */
+	public java.util.List<ModelReference> getDependencies(ModelReference ref) {
+		java.util.List<ModelReference> ret=new java.util.Vector<ModelReference>();		
+		ModelResource resource=getResource(ref);
+		java.util.Iterator<DependencyInfo> iter=m_dependencyInfo.values().iterator();
+		
+		while (iter.hasNext()) {
+			DependencyInfo info=iter.next();
+			
+			java.util.List<ModelResource> refs=info.getDependencies().get(resource);
+			
+			if (refs != null) {
+				for (int i=0; i < refs.size(); i++) {
+					ret.add(refs.get(i).getReference());
+				}
+			}
+		}
+		
+		return(ret);
+	}
+	
+	/**
+	 * This method returns the list of model references that are dependencies for
+	 * the supplied reference, of the supplied dependency type.
+	 * 
+	 * @param ref The model reference
+	 * @param type The type of dependency
+	 * @return The list of model references that are dependencies for 
+	 * 				the supplied reference
+	 */
+	public java.util.List<ModelReference> getDependencies(ModelReference ref,
+						DependencyType type) {
+		java.util.List<ModelReference> ret=new java.util.Vector<ModelReference>();
+		ModelResource resource=getResource(ref);
+		
+		// Obtain dependency info for this type
+		DependencyInfo info=m_dependencyInfo.get(type);
+		
+		if (info != null) {
+			java.util.List<ModelResource> refs=info.getDependencies().get(resource);
+			
+			if (refs != null) {
+				for (int i=0; i < refs.size(); i++) {
+					ret.add(refs.get(i).getReference());
+				}
+			}
+		}
+		
+		return(ret);
+	}
+	
+	private static Logger logger = Logger.getLogger("org.scribble.model");
+
+	private java.util.Map<ModelReference,Namespace> m_namespaces=
+					new java.util.Hashtable<ModelReference, Namespace>();
+	private java.util.Map<ModelReference,LocatedName> m_modelNames=
+					new java.util.Hashtable<ModelReference, LocatedName>();
+	private java.util.Map<DependencyType,DependencyInfo> m_dependencyInfo=
+					new java.util.Hashtable<DependencyType, DependencyInfo>();
+	
+	/**
+	 * This class provides a container for the dependency information
+	 * associated with a particular dependency type.
+	 */
+	public class DependencyInfo {
+		
+		public DependencyInfo(DependencyType type) {
+			m_type = type;
+		}
+		
+		public java.util.Map<ModelResource,java.util.List<ModelResource>> getDependents() {
+			return(m_dependents);
+		}
+		
+		public java.util.Map<ModelResource,java.util.List<ModelResource>> getDependencies() {
+			return(m_dependencies);
+		}
+		
+		public java.util.List<ModelReference> getUnresolved() {
+			return(m_unresolved);
+		}
+		
+		public void clearDependencies(ModelReference ref) {
+			logger.fine("Clearing Dependencies: "+ref+" for type "+m_type);
+			
+			ModelResource resource=getResource(ref);
+
+			java.util.List<ModelResource> refs=m_dependencies.get(resource);
+			
+			if (refs != null) {
+				for (int i=refs.size()-1; i >= 0; i--) {
+					
+					logger.fine("Clear dependency: "+refs.get(i));
+					
+					java.util.List<ModelResource> depends=
+							m_dependents.get(refs.get(i));
+					
+					if (depends != null) {
+						depends.remove(resource);
+						
+						if (logger.isLoggable(Level.FINE)) {
+							logger.fine("Remove dependent: "+ref+" from list: "+
+								depends+" (size="+depends.size()+")");
+						}
+
+						if (depends.size() == 0) {
+							m_dependents.remove(refs.get(i));
+						}
+					}
+					
+					if (refs.get(i).getReference().isResolved() == false) {
+						
+						if (logger.isLoggable(Level.FINE)) {
+							logger.fine("Removed from unresolved: "+ref);
+						}
+						
+						m_unresolved.remove(refs.get(i).getReference());
+					}
+				}
+				
+				m_dependencies.remove(resource);
+			}
+		}
+
+		private DependencyType m_type=null;
+		private java.util.Map<ModelResource,java.util.List<ModelResource>> m_dependents=
+			new java.util.Hashtable<ModelResource,java.util.List<ModelResource>>();
+		private java.util.Map<ModelResource,java.util.List<ModelResource>> m_dependencies=
+			new java.util.Hashtable<ModelResource,java.util.List<ModelResource>>();
+		private java.util.List<ModelReference> m_unresolved=new java.util.Vector<ModelReference>();
+		
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/admin/AbstractModelRepository.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/admin/AbstractModelRepository.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/admin/AbstractModelRepository.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,427 @@
+/*
+ * Copyright 2007-9 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 29 Jun 2009 : Initial version created by gary
+ */
+package org.scribble.model.admin;
+
+import org.scribble.model.*;
+import org.scribble.model.admin.DependencyType;
+import org.scribble.model.admin.ModelChangeListener;
+import org.scribble.model.admin.ModelInfo;
+import org.scribble.model.admin.ModelListener;
+import org.scribble.model.admin.ModelRepository;
+import org.scribble.parser.Parser;
+import org.scribble.extensions.*;
+
+import java.util.logging.*;
+
+/**
+ * This class represents the abstract implementation for the
+ * model repository. Derived classes will be responsible
+ * for grounding the implementation for a specific repository
+ * type.
+ *
+ */
+public abstract class AbstractModelRepository implements ModelRepository {
+
+	/**
+	 * This is the default constructor for the abstract OSGi Model Repository.
+	 */
+	public AbstractModelRepository() {
+	}
+		
+	/**
+	 * This method determines whether the supplied model reference
+	 * is associated with an existing Scribble definition. If the
+	 * optional source reference is specified, then the check will determine
+	 * whether the supplied model reference is also accessible from the
+	 * supplied source reference.
+	 * 
+	 * @param ref The model reference
+	 * @param source The optional source that is checking the reference
+	 * @return Whether a definition exists for the model reference, and
+	 * 					is accessible from the optional source reference
+	 */
+	public boolean exists(ModelReference ref, ModelReference source) {
+		boolean ret=false;
+		
+		if (source == null || canAccess(source, ref, true)) {
+			
+			ret = (getInputStream(ref) != null);
+		}
+		
+		return(ret);
+	}
+	
+	/**
+	 * This method returns the model(s) associated with the supplied
+	 * Scribble reference.
+	 * 
+	 * @param ref The scribble reference
+	 * @param l The model listener
+	 * @return The scribble model(s)
+	 */
+	public java.util.List<ModelInfo> getModels(ModelReference ref, ModelListener l) {
+		java.util.List<ModelInfo> ret=new java.util.Vector<ModelInfo>();
+		java.util.List<java.io.InputStream> instreams=
+					new java.util.Vector<java.io.InputStream>();
+		java.util.List<ModelReference> parsedRefs=
+					new java.util.Vector<ModelReference>();
+		ModelReference globalRef=null;
+		boolean derived=false;
+		
+		synchronized(this) {
+			if (logger.isLoggable(Level.FINEST)) {
+				logger.finest("Get models for: "+ref);
+			}
+			
+			// Load model and invoke the parser
+			java.io.InputStream is=getInputStream(ref);
+			
+			if (is != null) {
+				instreams.add(is);
+				parsedRefs.add(ref);
+				
+			} else if (ref.getLocatedRole() != null) {
+				globalRef = getGlobalModelRef(ref);
+					
+				// Get input stream for global reference
+				is = getInputStream(globalRef);
+				
+				if (is != null) {
+					instreams.add(is);
+					parsedRefs.add(globalRef);
+	
+					// Associate resource with local model reference
+					associateGlobalResource(ref, globalRef);
+				}
+			}
+				
+			org.scribble.model.admin.DependencyManager dm=(org.scribble.model.admin.DependencyManager)
+						org.scribble.extensions.RegistryFactory.getRegistry().getExtension(
+								org.scribble.model.admin.DependencyManager.class, null);
+			
+			// If no input streams found, then check 'conforms to' dependencies
+			if (instreams.size() == 0 && dm != null) {
+				
+				java.util.List<ModelReference> refs=
+					dm.getDependents(ref, DependencyType.ConformsTo);
+				
+				if (refs.size() == 0 && globalRef != null) {
+					refs = dm.getDependents(globalRef, DependencyType.ConformsTo);
+				}
+					
+				for (int i=0; i < refs.size(); i++) {
+					is = getInputStream(refs.get(i));
+	
+					if (is != null) {
+						instreams.add(is);
+						parsedRefs.add(refs.get(i));
+					}
+				}
+				
+				derived = true;
+			}
+			
+			for (int i=0; i < instreams.size(); i++) {
+				if (dm != null) {
+						
+					// Clear the dependencies so that they can be
+					// re-initialized during the parsing of the model
+					dm.clearDependencies(parsedRefs.get(i));
+				}
+				
+				// Obtain a top level model reference (with no sub-definition
+				// path), to parse the complete model. If a sub-definition
+				// is requested, this will be dealt with by the model repository
+				ModelReference parsedRef=new ModelReference(parsedRefs.get(i));
+				parsedRef.getSubDefinitionPath().clear();
+				
+				java.util.List<Object> parsers=
+						org.scribble.extensions.RegistryFactory.getRegistry().getExtensions(
+								org.scribble.parser.Parser.class, ref.getNotation());
+
+				for (int j=0; j < parsers.size(); j++) {
+					Parser parser=(Parser)parsers.get(j);
+					
+					Model model=parser.parse(parsedRef,
+									instreams.get(i), l);
+					
+					// TODO:
+					// Currently sub-definition path is only used by the Projector, so
+					// would not be applied if model did not require projection. Needs
+					// to be moved out to the model repository, and applied to any
+					// resulting model (whether or not projected).
+					
+					if (model != null) {
+						ModelReference miRef=parsedRefs.get(i);
+						
+						// Check if model needs to be projected
+						if (ref.getLocatedRole() != null &&
+								model.isLocated() == false) {
+							
+							org.scribble.projector.Projector projector =
+									(org.scribble.projector.Projector)
+									org.scribble.extensions.RegistryFactory.getRegistry().getExtension(
+												org.scribble.projector.Projector.class, miRef.getNotation());
+							
+							// Obtain projection for this role
+							model = projector.project(
+									parsedRefs.get(i), model,
+									ref.getSubDefinitionPath(),
+									new Role(ref.getLocatedRole()), l);
+							
+							miRef = getLocalModelRef(parsedRefs.get(i),
+									ref.getLocatedRole());
+						}
+						
+						ret.add(new ModelInfo(miRef, model, derived));
+					}
+				}
+			}
+			
+			for (int i=0; i < ret.size(); i++) {
+				if (ret.get(i).getModel() != null) {
+					ret.get(i).getModel().initializeURIs();
+				} else {
+					logger.warning("Could not initialize model: "+ret.get(i).getSource());
+				}
+			}
+		}
+		
+		return(ret);
+	}
+	
+	/**
+	 * This method associates any global resource information associated with the
+	 * supplied global model reference, with the supplied local model reference.
+	 * 
+	 * @param lref The local model reference
+	 * @param gref The global model reference
+	 */
+	protected void associateGlobalResource(ModelReference lref, ModelReference gref) {
+	}
+	
+	/**
+	 * This method takes the supplied global model reference,
+	 * and a role, and returns a local model reference for the
+	 * supplied details.
+	 * 
+	 * @param globalRef The global model reference
+	 * @param role The role
+	 * @return The local model reference
+	 */
+	protected ModelReference getLocalModelRef(ModelReference globalRef,
+						String role) {
+		ModelReference ret=						
+			new ModelReference(globalRef.getNamespace(),
+					globalRef.getLocalpart(),
+					role, globalRef.getNotation());
+		
+		locate(ret, globalRef);
+				
+		return(ret);
+	}
+
+	/**
+	 * This method takes the supplied local model reference and
+	 * returns a global model reference for the supplied details.
+	 * 
+	 * @param localRef The local model reference
+	 * @return The global model reference
+	 */
+	protected ModelReference getGlobalModelRef(ModelReference localRef) {
+		ModelReference ret=						
+			new ModelReference(localRef.getNamespace(),
+					localRef.getLocalpart(),
+					null, localRef.getNotation());
+		
+		locate(ret, localRef);
+		
+		return(ret);
+	}
+
+	/**
+	 * This method determines whether the supplied notation code is
+	 * supported by the model repository.
+	 * 
+	 * @param code The notation code
+	 * @return Whether the notation is supported
+	 */
+	protected static boolean isNotationSupported(String code) {
+		boolean ret=false;
+		
+		for (int i=0; ret == false && i < m_notations.size(); i++) {
+			ret = code.equals(m_notations.get(i).getCode());
+		}
+		
+		return(ret);
+	}
+	
+	/**
+	 * This method updates the model, associated with the
+	 * supplied reference, with the contents of the specified
+	 * model.
+	 * 
+	 * @param ref The model reference
+	 * @param model The model
+	 * @throws java.io.IOException Failed to update the model
+	 */
+	public void updateModel(ModelReference ref, Model model)
+								throws java.io.IOException {
+		
+		if (exists(ref, null)) {
+			
+			org.scribble.export.Exporter exporter=
+				(org.scribble.export.Exporter)
+				RegistryFactory.getRegistry().getExtension(
+						org.scribble.export.Exporter.class, null);
+			
+			org.scribble.export.stream.StreamFormatter formatter=
+					new org.scribble.export.stream.StreamFormatter();
+			
+			java.io.ByteArrayOutputStream os=new java.io.ByteArrayOutputStream();
+		
+			formatter.setOutputStream(os);
+			
+			exporter.export(ref, model, formatter);
+		
+			byte[] b=os.toByteArray();
+		
+			os.close();
+		
+			java.io.ByteArrayInputStream is=
+					new java.io.ByteArrayInputStream(b);
+		
+			updateModel(ref, is);
+			
+			is.close();
+		}
+	}
+	
+	/**
+	 * This method applies the updated model, defined in the supplied input
+	 * stream, to the repository resource associated with the supplied reference.
+	 * 
+	 * @param ref The model reference
+	 * @param is The input stream
+	 * @throws java.io.IOException Failed to update the model
+	 */
+	protected void updateModel(ModelReference ref, java.io.InputStream is)
+										throws java.io.IOException {
+		throw new java.io.IOException("Unsupported operation");
+	}
+
+	/**
+	 * This method returns the input stream for the source associated
+	 * with the model reference.
+	 * 
+	 * @param ref The model reference
+	 * @return The input stream
+	 */
+	protected abstract java.io.InputStream getInputStream(ModelReference ref);
+		
+	/**
+	 * This method adds a model change listener.
+	 * 
+	 * @param l The model change listener
+	 */
+	public void addModelChangeListener(ModelChangeListener l) {
+		synchronized(m_listeners) {
+			m_listeners.add(l);
+		}
+	}
+
+	/**
+	 * This method removes a model change listener.
+	 * 
+	 * @param l The model change listener
+	 */
+	public void removeModelChangeListener(ModelChangeListener l) {
+		synchronized(m_listeners) {
+			m_listeners.remove(l);
+		}
+	}
+	
+	/**
+	 * This method handles an added resource.
+	 * 
+	 * @param ref The resource
+	 */
+	protected void handleResourceAdded(ModelReference ref) {
+
+		// Dispatch resource added notification
+		synchronized(m_listeners) {
+			for (int i=0; i < m_listeners.size(); i++) {
+				ModelChangeListener l=m_listeners.get(i);
+				
+				l.modelAdded(ref);
+			}
+		}
+	}
+		
+	/**
+	 * This method handles an updated resource.
+	 * 
+	 * @param ref The resource
+	 */
+	protected void handleResourceUpdated(ModelReference ref) {
+		
+		// Dispatch resource updated notification
+		synchronized(m_listeners) {
+			for (int i=0; i < m_listeners.size(); i++) {
+				ModelChangeListener l=m_listeners.get(i);
+				
+				l.modelUpdated(ref);
+			}
+		}
+	}
+	
+	/**
+	 * This method handles a removed resource.
+	 * 
+	 * @param ref The resource
+	 */
+	protected void handleResourceRemoved(ModelReference ref) {
+		
+		// Dispatch resource removed notification
+		synchronized(m_listeners) {
+			for (int i=0; i < m_listeners.size(); i++) {
+				ModelChangeListener l=m_listeners.get(i);
+				
+				l.modelRemoved(ref);
+			}
+		}
+	}
+	
+	private static Logger logger = Logger.getLogger("org.scribble.model.admin");
+	
+	private static java.util.List<org.scribble.model.Notation> m_notations=new java.util.Vector<org.scribble.model.Notation>();
+	private java.util.List<ModelChangeListener> m_listeners=new java.util.Vector<ModelChangeListener>();
+
+	static {
+		// Register the notations to be supported
+		java.util.List<Object> notations=
+			org.scribble.extensions.RegistryFactory.getRegistry().getExtensions(
+						org.scribble.model.Notation.class, null);
+		
+		for (int i=0; i < notations.size(); i++) {
+			m_notations.add((org.scribble.model.Notation)notations.get(i));
+		}
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/admin/DefaultModelChangeListener.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/admin/DefaultModelChangeListener.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/admin/DefaultModelChangeListener.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,54 @@
+/*
+ * Copyright 2007 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 8 Nov 2007 : Initial version created by gary
+ */
+package org.scribble.model.admin;
+
+import org.scribble.model.ModelReference;
+
+/**
+ * This class represents a default model change listener.
+ * 
+ */
+public class DefaultModelChangeListener implements ModelChangeListener {
+
+	/**
+	 * This method reports a new model has been added.
+	 * 
+	 * @param ref The reference associated with the model
+	 */
+	public void modelAdded(ModelReference ref) {
+	}
+	
+	/**
+	 * This method reports an update to a model.
+	 * 
+	 * @param ref The reference associated with the model
+	 */
+	public void modelUpdated(ModelReference ref) {
+	}
+	
+	/**
+	 * This method reports an existing model has been removed.
+	 * 
+	 * @param ref The reference associated with the model
+	 */
+	public void modelRemoved(ModelReference ref) {
+	}
+	
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/admin/DefaultModelListener.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/admin/DefaultModelListener.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/admin/DefaultModelListener.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,211 @@
+/*
+ * Copyright 2007 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 11 Nov 2007 : Initial version created by gary
+ */
+package org.scribble.model.admin;
+
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+import org.scribble.model.ModelObject;
+import org.scribble.model.ModelReference;
+import org.scribble.model.resolutions.*;
+
+/**
+ * This class provides the default implementation of the model listener
+ * interface.
+ */
+public class DefaultModelListener implements ModelListener {
+	
+	/**
+	 * The default constructor.
+	 */
+	public DefaultModelListener() {
+	}
+	
+	/**
+	 * This constructor initializes the default model listener
+	 * with an optional external source model reference.
+	 * 
+	 * @param externalSource The optional external source
+	 */
+	public DefaultModelListener(ModelReference externalSource) {
+		m_composedModelSource = externalSource;
+	}
+
+	/**
+	 * This method reports errors detected in model analysis.
+	 * 
+	 * @param issue The issue
+	 */
+	public void error(ModelIssue issue) {
+		
+		if (logger.isLoggable(Level.FINE)) {
+			logger.fine("Reporting error: "+issue.getMessage());
+		}
+		
+		m_errors.add(issue);
+	}
+
+	/**
+	 * This method reports warnings detected in model analysis.
+	 * 
+	 * @param issue The issue
+	 */
+	public void warning(ModelIssue issue) {
+		m_warnings.add(issue);
+	}
+	
+	/**
+	 * This method applies the errors and warnings to the supplied
+	 * model listener.
+	 * 
+	 * @param l The model listener
+	 * @param override The optional model object to override the existing
+	 * 				entries model objects
+	 * @param props Additional properties
+	 * @param resolutions The resolutions
+	 */
+	public void apply(ModelListener l, ModelObject override,
+						java.util.Map<String,Object> props,
+						java.util.List<Resolution> resolutions) {
+		
+		for (int i=0; i < m_errors.size(); i++) {
+			ModelIssue entry=m_errors.get(i);			
+			ModelObject src=entry.getModelObject();
+			
+			if (override != null) {
+				src = override;
+			}
+			
+			ModelIssue newEntry=new ModelIssue(src, applyMessage(entry.getMessage()),
+					applyProperties(entry.getProperties(),entry.getModelObject(),
+							props));
+			
+			newEntry.getResolutions().addAll(entry.getResolutions());
+			
+			if (resolutions != null) {
+				for (int j=0; j < resolutions.size(); j++) {
+					if (newEntry.getResolutions().contains(resolutions.get(j)) == false) {
+						newEntry.getResolutions().add(resolutions.get(j));
+					}
+					
+				}
+			}
+			
+			if (getComposedSource() != null) {
+				ShowComposedIssue res=new ShowComposedIssue();
+				res.setComposedModel(getComposedSource());
+				res.setSourceReference(entry.getModelObject().getSource());
+				newEntry.getResolutions().add(res);
+			}
+
+			l.error(newEntry);
+		}
+		
+		for (int i=0; i < m_warnings.size(); i++) {
+			ModelIssue entry=m_warnings.get(i);
+			ModelObject src=entry.getModelObject();
+			
+			if (override != null) {
+				src = override;
+			}
+			
+			ModelIssue newEntry=new ModelIssue(src, applyMessage(entry.getMessage()),
+					applyProperties(entry.getProperties(),entry.getModelObject(),
+							props));
+			
+			newEntry.getResolutions().addAll(resolutions);
+			
+			if (getComposedSource() != null) {
+				ShowComposedIssue res=new ShowComposedIssue();
+				res.setComposedModel(getComposedSource());
+				res.setSourceReference(entry.getModelObject().getSource());
+				newEntry.getResolutions().add(res);
+			}
+
+			l.warning(newEntry);
+		}
+	}
+	
+	/**
+	 * This method determines what message should be returned.
+	 * 
+	 * @param mesg
+	 * @return The message to use
+	 */
+	protected String applyMessage(String mesg) {
+		String ret=mesg;
+		
+		if (getComposedSource() != null) {
+			String externalMessagePrefix=
+					java.util.PropertyResourceBundle.getBundle(
+						"org.scribble.model.admin.Messages").
+							getString("_COMPOSED_ISSUE_PREFIX");
+			
+			if (ret.startsWith(externalMessagePrefix) == false) {
+				ret = externalMessagePrefix+ret;
+			}
+		}
+		
+		return(ret);
+	}
+
+	protected java.util.Map<String,Object> applyProperties(java.util.Map<String,Object> props,
+						ModelObject modelObject,
+						java.util.Map<String,Object> additionalProps) {
+		java.util.Map<String,Object> ret=props;
+		
+		// Copy additional properties if defined
+		if (additionalProps != null) {
+			if (ret == null) {
+				ret = new java.util.HashMap<String,Object>();
+			}
+			
+			ret.putAll(additionalProps);
+		}
+		
+		return(ret);
+	}
+	
+	/**
+	 * This method returns the list of errors reported to the model
+	 * listener.
+	 * 
+	 * @return The model listener
+	 */
+	public java.util.List<ModelIssue> getErrors() {
+		return(m_errors);
+	}
+	
+	/**
+	 * This method returns the optional composed source model reference
+	 * associated with the errors and warnings being reported.
+	 * 
+	 * @return The optional composed source
+	 */
+	public ModelReference getComposedSource() {
+		return(m_composedModelSource);
+	}
+	
+	private static Logger logger = Logger.getLogger("org.scribble.model.admin");
+
+	private ModelReference m_composedModelSource=null;
+	private java.util.List<ModelIssue> m_errors=new java.util.Vector<ModelIssue>();
+	private java.util.List<ModelIssue> m_warnings=new java.util.Vector<ModelIssue>();
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/admin/DefaultResolution.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/admin/DefaultResolution.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/admin/DefaultResolution.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,123 @@
+/*
+ * Copyright 2005-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 7 Sep 2008 : Initial version created by gary
+ */
+package org.scribble.model.admin;
+
+import org.scribble.model.ModelReference;
+import org.scribble.model.SourceRef;
+import org.scribble.model.resolutions.Resolution;
+import org.scribble.model.resolutions.ResolutionException;
+
+/**
+ * This class provides a default implementation of the
+ * Resolution interface, which can be configured with
+ * the required information to instantiate the resolution,
+ * or derived to create the actual resolution implementation.
+ */
+public class DefaultResolution implements Resolution {
+
+	/**
+	 * This is the default constructor for the
+	 * default resolution implementation.
+	 */
+	public DefaultResolution() {
+	}
+	
+	/**
+	 * This method returns the name of the resolution.
+	 * 
+	 * @return The name
+	 */
+	public String getName() {
+		return(m_name);
+	}
+	
+	/**
+	 * This method sets the name of the resolution.
+	 * 
+	 * @param name The name
+	 */
+	public void setName(String name) {
+		m_name = name;
+	}
+	
+	/**
+	 * This method returns the description of the resolution.
+	 * 
+	 * @return The description
+	 */
+	public String getDescription() {
+		return(m_description);
+	}
+	
+	/**
+	 * This method sets the description.
+	 * 
+	 * @param desc The description
+	 */
+	public void setDescription(String desc) {
+		m_description = desc;
+	}
+	
+	/**
+	 * This method returns the class associated with the
+	 * resolution. This class must have a default constructor.
+	 * 
+	 * @return The resolution class
+	 */
+	public String getResolutionClass() {
+		return(m_className);
+	}
+	
+	/**
+	 * This method returns the properties used to configure
+	 * the resolution.
+	 * 
+	 * @return The properties
+	 */
+	public java.util.Map<String, Object> getProperties() {
+		return(m_properties);
+	}
+
+	/**
+	 * This method is invoked to perform the resolution
+	 * on the identified model, associated with the model
+	 * object located using the supplied source reference
+	 * information. Further details regarding the issue
+	 * to be resolved is provided by the model issue -
+	 * although the 'model object' part of the model
+	 * issue may not be defined. This will have to be
+	 * recovered using the supplied model and source
+	 * reference.
+	 * 
+	 * @param ref The model reference
+	 * @param obj The source reference of the model object
+	 * @param issue The issue
+	 * @exception ResolutionException Failed to resolve
+	 */
+	public void resolve(ModelReference ref, SourceRef obj,
+					ModelIssue issue) throws ResolutionException {
+	}
+	
+	private String m_name=null;
+	private String m_description=null;
+	private String m_className=getClass().getName();
+	private java.util.Map<String, Object> m_properties=
+					new java.util.HashMap<String, Object>();
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/admin/DependencyHandler.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/admin/DependencyHandler.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/admin/DependencyHandler.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,61 @@
+/*
+ * Copyright 2007 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 8 Nov 2007 : Initial version created by gary
+ */
+package org.scribble.model.admin;
+
+import org.scribble.model.ModelReference;
+
+/**
+ * This interface represents the dependency handler component
+ * responsible for processing changes in model reference
+ * dependencies.
+ */
+public interface DependencyHandler {
+
+	/**
+	 * This method indicates that a model that the 'dependent'
+	 * model references has been added.
+	 * 
+	 * @param dependent The dependent model
+	 * @param dependency The dependency
+	 */
+	public void dependencyAdded(ModelReference dependent,
+			ModelReference dependency);
+
+	/**
+	 * This method indicates that a model that the 'dependent'
+	 * model references has been updated.
+	 * 
+	 * @param dependent The dependent model
+	 * @param dependency The dependency
+	 */
+	public void dependencyUpdated(ModelReference dependent,
+			ModelReference dependency);
+
+	/**
+	 * This method indicates that a model that the 'dependent'
+	 * model references has been removed.
+	 * 
+	 * @param dependent The dependent model
+	 * @param dependency The dependency
+	 */
+	public void dependencyRemoved(ModelReference dependent,
+			ModelReference dependency);
+
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/admin/DependencyManager.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/admin/DependencyManager.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/admin/DependencyManager.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,134 @@
+/*
+ * Copyright 2007 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 8 Nov 2007 : Initial version created by gary
+ */
+package org.scribble.model.admin;
+
+import org.scribble.model.LocatedName;
+import org.scribble.model.ModelReference;
+import org.scribble.model.Namespace;
+
+/**
+ * This interface represents the dependency manager component
+ * responsible for monitoring changes in Scribble descriptions
+ * and triggering actions on the dependent models.
+ */
+public interface DependencyManager {
+
+	/**
+	 * This method indicates that any dependencies recorded
+	 * for the supplied reference should be cleared.
+	 * 
+	 * @param ref The reference
+	 */
+	public void clearDependencies(ModelReference ref);
+	
+	/**
+	 * This method indicates that a dependency should be
+	 * established between the 'from' model reference to the
+	 * 'to' model reference. If the 'to' model reference
+	 * should be changed, then then registered
+	 * DependencyHandler implementations will be
+	 * invoked to handle the change. 
+	 * 
+	 * @param from The dependent model reference
+	 * @param to The model reference representing the dependency
+	 * @param type The type of dependency
+	 */
+	public void recordDependency(ModelReference from, ModelReference to,
+						DependencyType type);
+	
+	/**
+	 * This method records the model name against the source description's
+	 * model reference.
+	 * 
+	 * @param ref The model reference
+	 * @param modelName The model name
+	 */
+	public void recordModelName(ModelReference ref, LocatedName modelName);
+	
+	/**
+	 * This method records the namespace against the source description's
+	 * model reference.
+	 * 
+	 * @param ref The model reference
+	 * @param namespace The namespace
+	 */
+	public void recordNamespace(ModelReference ref, Namespace namespace);
+	
+	/**
+	 * This method returns the model name associated with the supplied
+	 * model reference.
+	 * 
+	 * @param ref The model reference
+	 * @return The model name
+	 */
+	public LocatedName getModelName(ModelReference ref);
+	
+	/**
+	 * This method returns the namespace associated with the supplied
+	 * model reference.
+	 * 
+	 * @param ref The model reference
+	 * @return The namespace
+	 */
+	public Namespace getNamespace(ModelReference ref);
+	
+	/**
+	 * This method returns the list of model references dependent upon
+	 * the supplied reference.
+	 * 
+	 * @param ref The model reference
+	 * @return The list of model references dependent upon the supplied reference
+	 */
+	public java.util.List<ModelReference> getDependents(ModelReference ref);
+
+	/**
+	 * This method returns the list of model references dependent upon
+	 * the supplied reference, of the supplied dependency type.
+	 * 
+	 * @param ref The model reference
+	 * @param type The type of dependency
+	 * @return The list of model references dependent upon the supplied reference
+	 */
+	public java.util.List<ModelReference> getDependents(ModelReference ref,
+						DependencyType type);
+
+	/**
+	 * This method returns the list of model references that are dependencies for
+	 * the supplied reference.
+	 * 
+	 * @param ref The model reference
+	 * @return The list of model references that are dependencies for 
+	 * 				the supplied reference
+	 */
+	public java.util.List<ModelReference> getDependencies(ModelReference ref);
+	
+	/**
+	 * This method returns the list of model references that are dependencies for
+	 * the supplied reference, of the supplied dependency type.
+	 * 
+	 * @param ref The model reference
+	 * @param type The type of dependency
+	 * @return The list of model references that are dependencies for 
+	 * 				the supplied reference
+	 */
+	public java.util.List<ModelReference> getDependencies(ModelReference ref,
+						DependencyType type);
+	
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/admin/DependencyType.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/admin/DependencyType.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/admin/DependencyType.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,30 @@
+/*
+ * Copyright 2007 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 22 Nov 2007 : Initial version created by gary
+ */
+package org.scribble.model.admin;
+
+/**
+ * This enumeration represents the different types of
+ * dependency that may be recorded between two models.
+ */
+public enum DependencyType {
+	Uses,		// Usage dependency
+	ConformsTo,	// Strict conformance dependency
+	Implements	// Implements as part of wider definition
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/admin/Messages.properties
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/admin/Messages.properties	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/admin/Messages.properties	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,21 @@
+# /*
+# * Copyright 2005-8 Pi4 Technologies Ltd
+# *
+# * Licensed under the Apache License, Version 2.0 (the "License");
+# * you may not use this file except in compliance with the License.
+# * You may obtain a copy of the License at
+# *
+# *     http://www.apache.org/licenses/LICENSE-2.0
+# *
+# * Unless required by applicable law or agreed to in writing, software
+# * distributed under the License is distributed on an "AS IS" BASIS,
+# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# * See the License for the specific language governing permissions and
+# * limitations under the License.
+# *
+# *
+# * Change History:
+# * 21 Oct 2008 : Initial version created by gary
+# */
+
+_COMPOSED_ISSUE_PREFIX=Composition issue:

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/admin/ModelChangeListener.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/admin/ModelChangeListener.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/admin/ModelChangeListener.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,51 @@
+/*
+ * Copyright 2007 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 20 Oct 2007 : Initial version created by gary
+ */
+package org.scribble.model.admin;
+
+import org.scribble.model.ModelReference;
+
+/**
+ * This interface represents a model change listener.
+ * 
+ */
+public interface ModelChangeListener {
+
+	/**
+	 * This method reports a new model has been added.
+	 * 
+	 * @param ref The reference associated with the model
+	 */
+	public void modelAdded(ModelReference ref);
+	
+	/**
+	 * This method reports an update to a model.
+	 * 
+	 * @param ref The reference associated with the model
+	 */
+	public void modelUpdated(ModelReference ref);
+	
+	/**
+	 * This method reports an existing model has been removed.
+	 * 
+	 * @param ref The reference associated with the model
+	 */
+	public void modelRemoved(ModelReference ref);
+	
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/admin/ModelInfo.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/admin/ModelInfo.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/admin/ModelInfo.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,88 @@
+/*
+ * Copyright 2005-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 17 Oct 2008 : Initial version created by gary
+ */
+package org.scribble.model.admin;
+
+import org.scribble.model.Model;
+import org.scribble.model.ModelReference;
+
+/**
+ * This class represents a container for information related to
+ * a model.
+ */
+public class ModelInfo {
+
+	/**
+	 * This constructor initializes the model information.
+	 * 
+	 * @param srcRef The model reference to the source associated
+	 * 					with the model
+	 * @param model The model
+	 * @param derived Whether the model info was derived
+	 */
+	public ModelInfo(ModelReference srcRef, Model model, boolean derived) {
+		m_sourceReference = srcRef;
+		m_model = model;
+		m_derived = derived;
+	}
+	
+	/**
+	 * This method returns the model reference associated with
+	 * the source resource from which the model was derived.
+	 * 
+	 * @return The source model reference
+	 */
+	public ModelReference getSource() {
+		return(m_sourceReference);
+	}
+	
+	/**
+	 * This method returns the model.
+	 * 
+	 * @return The model
+	 */
+	public Model getModel() {
+		return(m_model);
+	}
+	
+	/**
+	 * This method indicates whether the model information has been
+	 * derived. The information is derived if it was obtained indirectly
+	 * from the requested model reference.
+	 * 
+	 * @return Whether the model info is derived
+	 */
+	public boolean isDerived() {
+		return(m_derived);
+	}
+	
+	/**
+	 * This method sets whether the model information has
+	 * been derived.
+	 * 
+	 * @param derived Whether the model info is derived
+	 */
+	public void setDerived(boolean derived) {
+		m_derived = derived;
+	}
+	
+	private ModelReference m_sourceReference=null;
+	private Model m_model=null;
+	private boolean m_derived=false;
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/admin/ModelIssue.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/admin/ModelIssue.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/admin/ModelIssue.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,152 @@
+/*
+ * Copyright 2005-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 6 Sep 2008 : Initial version created by gary
+ */
+package org.scribble.model.admin;
+
+import org.scribble.model.ModelObject;
+import org.scribble.model.resolutions.Resolution;
+
+/**
+ * This class represents the information related to an issue
+ * associated with a model object.
+ */
+public class ModelIssue {
+	
+	/**
+	 * This is the default constructor for the model
+	 * issue.
+	 */
+	public ModelIssue() {
+	}
+
+	/**
+	 * This is the constructor for initializing the issue
+	 * with the target model object and message.
+	 * 
+	 * @param modelObject The model object
+	 * @param mesg The message
+	 */
+	public ModelIssue(ModelObject modelObject, String mesg) {
+		m_modelObject = modelObject;
+		m_message = mesg;
+	}
+	
+	/**
+	 * This is the constructor for initializing the issue
+	 * with the target model object and message.
+	 * 
+	 * @param modelObject The model object
+	 * @param mesg The message
+	 * @param props The properties
+	 */
+	public ModelIssue(ModelObject modelObject, String mesg,
+			java.util.Map<String,Object> props) {
+		m_modelObject = modelObject;
+		m_message = mesg;
+		m_properties = props;
+	}
+	
+	/**
+	 * This method returns the model object associated
+	 * with the issue.
+	 * 
+	 * @return The model object
+	 */
+	public ModelObject getModelObject() {
+		return(m_modelObject);
+	}
+	
+	/**
+	 * This method sets the model object.
+	 * 
+	 * @param mo The model object
+	 */
+	public void setModelObject(ModelObject mo) {
+		m_modelObject = mo;
+	}
+	
+	/**
+	 * This method returns the message describing the
+	 * issue.
+	 * 
+	 * @return The message
+	 */
+	public String getMessage() {
+		return(m_message);
+	}
+	
+	/**
+	 * This method sets the message.
+	 * 
+	 * @param mesg The message
+	 */
+	public void setMessage(String mesg) {
+		m_message = mesg;
+	}
+	
+	/**
+	 * This method returns the properties associated with
+	 * the issue.
+	 * 
+	 * @return The properties
+	 */
+	public java.util.Map<String,Object> getProperties() {
+		return(m_properties);
+	}
+	
+	/**
+	 * This method returns the resolutions associated
+	 * with the model issue.
+	 * 
+	 * @return The resolutions
+	 */
+	public java.util.List<Resolution> getResolutions() {
+		return(m_resolutions);
+	}
+	
+	public int hashCode() {
+		return(m_message.hashCode());
+	}
+	
+	public boolean equals(Object obj) {
+		boolean ret=false;
+		
+		if (obj instanceof ModelIssue) {
+			ModelIssue other=(ModelIssue)obj;
+			
+			if (getMessage() != null && other.getMessage() != null &&
+					getMessage().equals(other.getMessage()) &&
+					getModelObject() != null &&
+					getModelObject().getSource() != null &&
+					other.getModelObject() != null &&
+					other.getModelObject().getSource() != null) {
+				ret = getModelObject().getSource().equals(other.getModelObject().getSource());
+			}
+		}
+		
+		return(ret);
+	}
+	
+	private ModelObject m_modelObject=null;
+	private String m_message=null;
+	private java.util.Map<String,Object> m_properties=
+					new java.util.HashMap<String,Object>();
+	private java.util.List<Resolution> m_resolutions=
+					new java.util.Vector<Resolution>();
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/admin/ModelListener.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/admin/ModelListener.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/admin/ModelListener.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,43 @@
+/*
+ * Copyright 2007 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 20 Oct 2007 : Initial version created by gary
+ */
+package org.scribble.model.admin;
+
+
+/**
+ * This interface represents a listener for model feedback.
+ * 
+ */
+public interface ModelListener {
+
+	/**
+	 * This method reports errors detected in model analysis.
+	 * 
+	 * @param issue The issue
+	 */
+	public void error(ModelIssue issue);
+	
+	/**
+	 * This method reports warnings detected in model analysis.
+	 * 
+	 * @param issue The issue
+	 */
+	public void warning(ModelIssue issue);
+
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/admin/ModelRepository.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/admin/ModelRepository.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/admin/ModelRepository.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,114 @@
+/*
+ * Copyright 2007 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 16 Oct 2007 : Initial version created by gary
+ */
+package org.scribble.model.admin;
+
+import org.scribble.model.Model;
+import org.scribble.model.ModelReference;
+
+/**
+ * This is the interface for the model repository. This is a generic
+ * interface used to access Scribble models from within an
+ * environment. The repository has the responsibility for understanding
+ * how Scribble descriptions are organised, accessed and monitored
+ * for change.
+ */
+public interface ModelRepository {
+	
+	/**
+	 * This method locates a new model reference in the
+	 * environment associated with a base model reference.
+	 * 
+	 * @param newRef The new model reference
+	 * @param base The base model reference
+	 */
+	public void locate(ModelReference newRef, ModelReference base);
+	
+	/**
+	 * This method determines whether the supplied model reference
+	 * is associated with an existing Scribble definition. If the
+	 * optional source reference is specified, then the check will determine
+	 * whether the supplied model reference is also accessible from the
+	 * supplied source reference.
+	 * 
+	 * @param ref The model reference
+	 * @param source The optional source that is checking the reference
+	 * @return Whether a definition exists for the model reference, and
+	 * 					is accessible from the optional source reference
+	 */
+	public boolean exists(ModelReference ref, ModelReference source);
+	
+	/**
+	 * This method determines whether the source reference has
+	 * access to the target reference. The check for 'self access'
+	 * determines if access to a target reference should be permitted
+	 * if the target reference has the same underlying resource
+	 * as the source.
+	 * 
+	 * @param srcRef The source reference
+	 * @param targetRef The target reference
+	 * @param allowSelfAccess Determines if self access permitted
+	 * @return Whether the model associated with the source
+	 * 				reference has access to the model associated
+	 * 				with the target reference
+	 */
+	public boolean canAccess(ModelReference srcRef,
+			ModelReference targetRef, boolean allowSelfAccess);
+	
+	/**
+	 * This method returns the model(s) associated with the supplied
+	 * Scribble reference. A single reference may return multiple
+	 * models, either because the resource content can be interpreted
+	 * differently depending on the model type of interest, or
+	 * because the model reference is abstract, and has more than
+	 * one concrete implementation model.
+	 * 
+	 * @param ref The model reference
+	 * @param l The model listener
+	 * @return The scribble models
+	 */
+	public java.util.List<ModelInfo> getModels(ModelReference ref, ModelListener l);
+	
+	/**
+	 * This method updates the model, associated with the
+	 * supplied reference, with the contents of the specified
+	 * model.
+	 * 
+	 * @param ref The model reference
+	 * @param model The model
+	 * @throws java.io.IOException Failed to update the model
+	 */
+	public void updateModel(ModelReference ref, Model model)
+								throws java.io.IOException;
+	
+	/**
+	 * This method adds a model change listener.
+	 * 
+	 * @param l The model change listener
+	 */
+	public void addModelChangeListener(ModelChangeListener l);
+
+	/**
+	 * This method removes a model change listener.
+	 * 
+	 * @param l The model change listener
+	 */
+	public void removeModelChangeListener(ModelChangeListener l);
+
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/admin/ModelResource.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/admin/ModelResource.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/admin/ModelResource.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,53 @@
+/*
+ * Copyright 2007-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 14 Feb 2008 : Initial version created by gary
+ */
+package org.scribble.model.admin;
+
+import org.scribble.model.ModelReference;
+
+/**
+ * This interface represents the resource associated with a model
+ * definition.
+ */
+public interface ModelResource {
+
+	/**
+	 * This method returns the URI of the model resource.
+	 * 
+	 * @return The URI
+	 */
+	public java.net.URI getURI();
+	
+	/**
+	 * This method returns the contents associated with
+	 * the model resource.
+	 * 
+	 * @return The contents
+	 * @exception IOException Failed to obtain content
+	 */
+	public java.io.InputStream getContents() throws java.io.IOException;
+	
+	/**
+	 * This method returns the reference associated with the resource.
+	 * 
+	 * @return The model reference associated with the resource
+	 */
+	public ModelReference getReference();
+	
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/analysis/BlockLookaheadRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/analysis/BlockLookaheadRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/analysis/BlockLookaheadRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,91 @@
+/*
+ * Copyright 2007-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 30 Jul 2008 : Initial version created by gary
+ */
+package org.scribble.model.analysis;
+
+import org.scribble.extensions.*;
+import org.scribble.model.*;
+
+/**
+ * This class provides the lookahead rule for the Block.
+ * 
+ */
+ at RegistryInfo(extension=LookaheadRule.class)
+public class BlockLookaheadRule implements LookaheadRule {
+
+	/**
+	 * The default constructor.
+	 */
+	public BlockLookaheadRule() {
+	}
+	
+	/**
+	 * This method determines whether the rule supports
+	 * the supplied object.
+	 * 
+	 * @param mobj The model object
+	 * @return Whether the rule supports the model object
+	 */
+	public boolean isSupported(ModelObject mobj) {
+		return(mobj instanceof Block);
+	}
+	
+	/**
+	 * This method returns the set of interactions that
+	 * will occur next, related to the supplied model
+	 * object.
+	 * 
+	 * @param context The context
+	 * @param mobj The model object
+	 * @return The set of interactions that occur next
+	 */
+	public java.util.Set<Interaction> getInteractions(LookaheadContext context,
+							ModelObject mobj) {
+		Block act=(Block)mobj;
+		
+		java.util.Set<Interaction> ret=new java.util.HashSet<Interaction>();
+		boolean f_end=false;
+		
+		for (int i=0; f_end == false &&
+				i < act.getContents().size(); i++) {
+			
+			if (context.isStopAtConditionalInitiator() &&
+					act.isConditional() &&
+					act.getEnclosingDefinition() != null &&
+					act.getInitiatorRoles().contains(
+							act.getEnclosingDefinition().
+							getLocatedName().getRole())) {
+				f_end = true;
+			} else {
+				java.util.Set<Interaction> interactions=
+						context.getInteractions(act.getContents().get(i));
+				
+				if (interactions != null) {
+					ret.addAll(interactions);
+					
+					if (act.getContents().get(i).isConditional() == false) {
+						f_end = true;
+					}
+				}
+			}
+		}
+				
+		return(ret);
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/analysis/DefaultLookaheadAnalyser.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/analysis/DefaultLookaheadAnalyser.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/analysis/DefaultLookaheadAnalyser.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,65 @@
+/*
+ * Copyright 2005-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 30 Jul 2008 : Initial version created by gary
+ */
+package org.scribble.model.analysis;
+
+import java.util.Set;
+
+import org.scribble.extensions.RegistryInfo;
+import org.scribble.model.*;
+
+/**
+ * The default implementation of the Lookahead Analyser.
+ */
+ at RegistryInfo(extension=LookaheadAnalyser.class,isService=true)
+public class DefaultLookaheadAnalyser implements LookaheadAnalyser {
+
+	/**
+	 * This method returns the set of interactions that
+	 * will occur next, related to the supplied model
+	 * object.
+	 * 
+	 * @param mobj The model object
+	 * @return The set of interactions that occur next
+	 */
+	public Set<Interaction> getInteractions(ModelObject mobj) {
+		return(getInteractions(mobj, false));
+	}
+		
+	/**
+	 * This method returns the set of interactions that
+	 * will occur next, related to the supplied model
+	 * object.
+	 * 
+	 * @param mobj The model object
+	 * @param stopAtConditionalInitiator Whether to lookahead
+	 * 			past decision points
+	 * @return The set of interactions that occur next
+	 */
+	public Set<Interaction> getInteractions(ModelObject mobj,
+					boolean stopAtConditionalInitiator) {
+		
+		DefaultLookaheadContext context=new DefaultLookaheadContext();
+		
+		context.setStopAtConditionalInitiator(stopAtConditionalInitiator);
+		
+		return(context.getInteractions(mobj));
+	}
+
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/analysis/DefaultLookaheadContext.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/analysis/DefaultLookaheadContext.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/analysis/DefaultLookaheadContext.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,111 @@
+/*
+ * Copyright 2005-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 30 Jul 2008 : Initial version created by gary
+ */
+package org.scribble.model.analysis;
+
+import org.scribble.model.*;
+
+/**
+ * This class provides a default implementation for the model
+ * lookahead analysis context interface.
+ */
+public class DefaultLookaheadContext implements LookaheadContext {
+
+	/**
+	 * This is the constructor for the model lookahead context.
+	 * 
+	 */
+	public DefaultLookaheadContext() {
+		
+		// Obtain the relevant rules
+		java.util.List<Object> rules=
+			org.scribble.extensions.RegistryFactory.getRegistry().
+						getExtensions(LookaheadRule.class, null);
+		
+		// Transfer to typed list
+		for (int i=0; i < rules.size(); i++) {
+			if (rules.get(i) instanceof LookaheadRule) {
+				m_rules.add((LookaheadRule)rules.get(i));
+			}
+		}
+	}
+	
+	/**
+	 * This method returns a list of model lookahead analysis
+	 * rules appropriate for the notation being changed.
+	 * 
+	 * @return The list of model lookahead analysis rules
+	 */
+	public java.util.List<LookaheadRule> getRules() {
+		return(m_rules);
+	}
+	
+	/**
+	 * This method determines whether the lookahead analysis
+	 * should stop when it comes across a conditional activity
+	 * that is an initiator.
+	 * 
+	 * This is necessary to determine whether
+	 * at runtime the occurrence of a message would cause
+	 * progression, or whether a local decision needs to be
+	 * made first.
+	 * 
+	 * However, when monitoring a process, lookahead messages
+	 * may be used across conditional points, to understand
+	 * when particular decisions have been taken.
+	 * 
+	 * @return Whether lookahead analysis should stop at
+	 * 				a conditional initiator
+	 */
+	public boolean isStopAtConditionalInitiator() {
+		return(m_stopAtConditionalInitiator);
+	}
+	
+	/**
+	 * This method sets the 'stop at conditional initiator' flag.
+	 * 
+	 * @param stop Whether to stop
+	 */
+	public void setStopAtConditionalInitiator(boolean stop) {
+		m_stopAtConditionalInitiator = stop;
+	}
+	
+	/**
+	 * This method returns the set of interactions that
+	 * will occur next, related to the supplied model
+	 * object.
+	 * 
+	 * @param mobj The model object
+	 * @return The set of interactions that occur next
+	 */
+	public java.util.Set<Interaction> getInteractions(ModelObject mobj) {
+		java.util.Set<Interaction> ret=null;
+		
+		for (int i=0; ret == null && i < m_rules.size(); i++) {
+			if (m_rules.get(i).isSupported(mobj)) {
+				ret = m_rules.get(i).getInteractions(this, mobj);
+			}
+		}
+
+		return(ret);
+	}
+	
+	private java.util.List<LookaheadRule> m_rules=new java.util.Vector<LookaheadRule>();
+	private boolean m_stopAtConditionalInitiator=false;
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/analysis/InteractionLookaheadRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/analysis/InteractionLookaheadRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/analysis/InteractionLookaheadRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,66 @@
+/*
+ * Copyright 2007-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 30 Jul 2008 : Initial version created by gary
+ */
+package org.scribble.model.analysis;
+
+import org.scribble.extensions.*;
+import org.scribble.model.*;
+
+/**
+ * This class provides the lookahead rule for the Interaction.
+ * 
+ */
+ at RegistryInfo(extension=LookaheadRule.class)
+public class InteractionLookaheadRule implements LookaheadRule {
+
+	/**
+	 * The default constructor.
+	 */
+	public InteractionLookaheadRule() {
+	}
+	
+	/**
+	 * This method determines whether the rule supports
+	 * the supplied object.
+	 * 
+	 * @param mobj The model object
+	 * @return Whether the rule supports the model object
+	 */
+	public boolean isSupported(ModelObject mobj) {
+		return(mobj instanceof Interaction);
+	}
+	
+	/**
+	 * This method returns the set of interactions that
+	 * will occur next, related to the supplied model
+	 * object.
+	 * 
+	 * @param context The context
+	 * @param mobj The model object
+	 * @return The set of interactions that occur next
+	 */
+	public java.util.Set<Interaction> getInteractions(LookaheadContext context,
+							ModelObject mobj) {
+		java.util.Set<Interaction> ret=new java.util.HashSet<Interaction>();
+		
+		ret.add((Interaction)mobj);
+		
+		return(ret);
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/analysis/LookaheadAnalyser.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/analysis/LookaheadAnalyser.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/analysis/LookaheadAnalyser.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,53 @@
+/*
+ * Copyright 2005-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 30 Jul 2008 : Initial version created by gary
+ */
+package org.scribble.model.analysis;
+
+import org.scribble.model.Interaction;
+import org.scribble.model.ModelObject;
+
+/**
+ * This interface represents a lookahead analyser.
+ */
+public interface LookaheadAnalyser {
+
+	/**
+	 * This method returns the set of interactions that
+	 * will occur next, related to the supplied model
+	 * object.
+	 * 
+	 * @param mobj The model object
+	 * @return The set of interactions that occur next
+	 */
+	public java.util.Set<Interaction> getInteractions(ModelObject mobj);
+	
+	/**
+	 * This method returns the set of interactions that
+	 * will occur next, related to the supplied model
+	 * object.
+	 * 
+	 * @param mobj The model object
+	 * @param stopAtConditionalInitiator Whether to lookahead
+	 * 			past decision points
+	 * @return The set of interactions that occur next
+	 */
+	public java.util.Set<Interaction> getInteractions(ModelObject mobj,
+					boolean stopAtConditionalInitiator);
+
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/analysis/LookaheadContext.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/analysis/LookaheadContext.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/analysis/LookaheadContext.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,59 @@
+/*
+ * Copyright 2005-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 30 Jul 2008 : Initial version created by gary
+ */
+package org.scribble.model.analysis;
+
+import org.scribble.model.*;
+
+/**
+ * This interface represents the capabilities made available
+ * to the model lookahead analysis rules.
+ */
+public interface LookaheadContext {
+
+	/**
+	 * This method determines whether the lookahead analysis
+	 * should stop when it comes across a conditional activity
+	 * that is an initiator.
+	 * 
+	 * This is necessary to determine whether
+	 * at runtime the occurrence of a message would cause
+	 * progression, or whether a local decision needs to be
+	 * made first.
+	 * 
+	 * However, when monitoring a process, lookahead messages
+	 * may be used across conditional points, to understand
+	 * when particular decisions have been taken.
+	 * 
+	 * @return Whether lookahead analysis should stop at
+	 * 				a conditional initiator
+	 */
+	public boolean isStopAtConditionalInitiator();
+	
+	/**
+	 * This method returns the set of interactions that
+	 * will occur next, related to the supplied model
+	 * object.
+	 * 
+	 * @param mobj The model object
+	 * @return The set of interactions that occur next
+	 */
+	public java.util.Set<Interaction> getInteractions(ModelObject mobj);
+	
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/analysis/LookaheadRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/analysis/LookaheadRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/analysis/LookaheadRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,51 @@
+/*
+ * Copyright 2005-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 30 Jul 2008 : Initial version created by gary
+ */
+package org.scribble.model.analysis;
+
+import org.scribble.model.*;
+
+/**
+ * This interface represents the lookahead capability
+ * for identifying the next set of potential interactions.
+ */
+public interface LookaheadRule {
+
+	/**
+	 * This method determines whether the rule supports
+	 * the supplied object.
+	 * 
+	 * @param mobj The model object
+	 * @return Whether the rule supports the model object
+	 */
+	public boolean isSupported(ModelObject mobj);
+	
+	/**
+	 * This method returns the set of interactions that
+	 * will occur next, related to the supplied model
+	 * object.
+	 * 
+	 * @param context The context
+	 * @param mobj The model object
+	 * @return The set of interactions that occur next
+	 */
+	public java.util.Set<Interaction> getInteractions(LookaheadContext context,
+							ModelObject mobj);
+	
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/analysis/ModelIncludeLookaheadRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/analysis/ModelIncludeLookaheadRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/analysis/ModelIncludeLookaheadRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,69 @@
+/*
+ * Copyright 2007-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 31 Jul 2008 : Initial version created by gary
+ */
+package org.scribble.model.analysis;
+
+import org.scribble.extensions.*;
+import org.scribble.model.*;
+
+/**
+ * This class provides the lookahead rule for the Model Include.
+ * 
+ */
+ at RegistryInfo(extension=LookaheadRule.class)
+public class ModelIncludeLookaheadRule implements LookaheadRule {
+
+	/**
+	 * The default constructor.
+	 */
+	public ModelIncludeLookaheadRule() {
+	}
+	
+	/**
+	 * This method determines whether the rule supports
+	 * the supplied object.
+	 * 
+	 * @param mobj The model object
+	 * @return Whether the rule supports the model object
+	 */
+	public boolean isSupported(ModelObject mobj) {
+		return(mobj instanceof ModelInclude);
+	}
+	
+	/**
+	 * This method returns the set of interactions that
+	 * will occur next, related to the supplied model
+	 * object.
+	 * 
+	 * @param context The context
+	 * @param mobj The model object
+	 * @return The set of interactions that occur next
+	 */
+	public java.util.Set<Interaction> getInteractions(LookaheadContext context,
+							ModelObject mobj) {
+		ModelInclude act=(ModelInclude)mobj;
+		java.util.Set<Interaction> ret=null;
+		
+		if (act.getDefinition() != null) {
+			ret = context.getInteractions(act.getDefinition().getBlock());
+		}
+				
+		return(ret);
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/analysis/MultiPathBehaviourLookaheadRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/analysis/MultiPathBehaviourLookaheadRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/analysis/MultiPathBehaviourLookaheadRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,76 @@
+/*
+ * Copyright 2007-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 30 Jul 2008 : Initial version created by gary
+ */
+package org.scribble.model.analysis;
+
+import org.scribble.extensions.*;
+import org.scribble.model.*;
+
+/**
+ * This class provides the lookahead rule for the Multi
+ * Path Behaviour.
+ * 
+ */
+ at RegistryInfo(extension=LookaheadRule.class)
+public class MultiPathBehaviourLookaheadRule implements LookaheadRule {
+
+	/**
+	 * The default constructor.
+	 */
+	public MultiPathBehaviourLookaheadRule() {
+	}
+	
+	/**
+	 * This method determines whether the rule supports
+	 * the supplied object.
+	 * 
+	 * @param mobj The model object
+	 * @return Whether the rule supports the model object
+	 */
+	public boolean isSupported(ModelObject mobj) {
+		return(mobj instanceof MultiPathBehaviour);
+	}
+	
+	/**
+	 * This method returns the set of interactions that
+	 * will occur next, related to the supplied model
+	 * object.
+	 * 
+	 * @param context The context
+	 * @param mobj The model object
+	 * @return The set of interactions that occur next
+	 */
+	public java.util.Set<Interaction> getInteractions(LookaheadContext context,
+							ModelObject mobj) {
+		MultiPathBehaviour act=(MultiPathBehaviour)mobj;
+		
+		java.util.Set<Interaction> ret=new java.util.HashSet<Interaction>();
+		
+		for (int i=0; i < act.getPaths().size(); i++) {
+			java.util.Set<Interaction> interactions=		
+				context.getInteractions(act.getPaths().get(i));
+			
+			if (interactions != null) {
+				ret.addAll(interactions);
+			}
+		}
+
+		return(ret);
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/analysis/SinglePathBehaviourLookaheadRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/analysis/SinglePathBehaviourLookaheadRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/analysis/SinglePathBehaviourLookaheadRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,68 @@
+/*
+ * Copyright 2007-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 30 Jul 2008 : Initial version created by gary
+ */
+package org.scribble.model.analysis;
+
+import org.scribble.extensions.*;
+import org.scribble.model.*;
+
+/**
+ * This class provides the lookahead rule for the Single
+ * Path Behaviour.
+ * 
+ */
+ at RegistryInfo(extension=LookaheadRule.class)
+public class SinglePathBehaviourLookaheadRule implements LookaheadRule {
+
+	/**
+	 * The default constructor.
+	 */
+	public SinglePathBehaviourLookaheadRule() {
+	}
+	
+	/**
+	 * This method determines whether the rule supports
+	 * the supplied object.
+	 * 
+	 * @param mobj The model object
+	 * @return Whether the rule supports the model object
+	 */
+	public boolean isSupported(ModelObject mobj) {
+		return(mobj instanceof SinglePathBehaviour);
+	}
+	
+	/**
+	 * This method returns the set of interactions that
+	 * will occur next, related to the supplied model
+	 * object.
+	 * 
+	 * @param context The context
+	 * @param mobj The model object
+	 * @return The set of interactions that occur next
+	 */
+	public java.util.Set<Interaction> getInteractions(LookaheadContext context,
+							ModelObject mobj) {
+		SinglePathBehaviour act=(SinglePathBehaviour)mobj;
+		
+		java.util.Set<Interaction> ret=
+				context.getInteractions(act.getBlock());
+				
+		return(ret);
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/change/AbstractModelChangeRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/change/AbstractModelChangeRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/change/AbstractModelChangeRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,136 @@
+/*
+ * Copyright 2005-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 28 Jul 2008 : Initial version created by gary
+ */
+package org.scribble.model.change;
+
+import org.scribble.model.*;
+
+public abstract class AbstractModelChangeRule implements ModelChangeRule {
+
+	/**
+	 * This method determines whether the rule is appropriate
+	 * for the supplied type of model, parent (in the context) and inserted
+	 * model object.
+	 *
+	 * @param context The context
+	 * @param model The model
+	 * @param mobj The model object being inserted
+	 * @param ref The optional reference model object
+	 * @return Whether the rule supports the supplied information
+	 */
+	public boolean isInsertSupported(ModelChangeContext context,
+					Model model, ModelObject mobj, ModelObject ref) {
+		return(false);
+	}
+	
+	/**
+	 * This method adds a new model object, within a
+	 * parent model object, with the details supplied in
+	 * another model object. The supplied model object
+	 * will usually be from a different model representation
+	 * (e.g. due to a merge), so the details will be
+	 * copied and placed in the representation associated
+	 * with the supplied model and parent model object.<p>
+	 * <p>
+	 * If a reference model object is supplied, then the
+	 * insertion will occur relative to it. If the reference
+	 * object is a block, then it means that the insertion
+	 * should occur at the end of the block. Otherwise the
+	 * new model object should be inserted before the
+	 * reference object, within the containing block.<p>
+	 * <p>
+	 * If the reference object is not supplied, then the
+	 * new model object should be inserted at the end of
+	 * the behaviour associated with the parent in the model
+	 * change context.
+	 * 
+	 * @param context The context
+	 * @param model The model being changed
+	 * @param mobj The model object details to be inserted
+	 * @param ref The optional reference model object
+	 * @return Whether the change has been applied
+	 */
+	public boolean insert(ModelChangeContext context,
+				Model model, ModelObject mobj, ModelObject ref) {
+		return(false);
+	}
+	
+	/**
+	 * This method determines whether the rule is appropriate
+	 * for the supplied type of model, parent (in the context)
+	 * and deleted model object.
+	 * 
+	 * @param context The context
+	 * @param model The model
+	 * @param mobj The model object to be removed
+	 * @return Whether the rule supports the supplied information
+	 */
+	public boolean isDeleteSupported(ModelChangeContext context,
+						Model model, ModelObject mobj) {
+		return(false);
+	}
+	
+	/**
+	 * This method removes the supplied model object from the
+	 * supplied model. The model object representation must
+	 * contain the necessary model specific to remove the 
+	 * object from the underlying model representation.
+	 * 
+	 * @param context The context
+	 * @param model The model being changed
+	 * @param mobj The model object to be deleted
+	 * @return Whether the change has been applied
+	 */
+	public boolean delete(ModelChangeContext context,
+				Model model, ModelObject mobj) {
+		return(false);
+	}
+	
+	/**
+	 * This method determines whether the rule is appropriate
+	 * for the supplied type of model, parent (in the context)
+	 * and modified model object.
+	 *
+	 * @param context The context
+	 * @param model The model
+	 * @param fromObj The source model object
+	 * @param toObj The model object to be updated
+	 * @return Whether the rule supports the supplied information
+	 */
+	public boolean isUpdateSupported(ModelChangeContext context,
+					Model model, ModelObject fromObj, ModelObject toObj) {
+		return(false);
+	}
+	
+	/**
+	 * This method modifies an existing model object, within a
+	 * parent model object, with the details supplied in
+	 * another model object.
+	 * 
+	 * @param context The context
+	 * @param model The model being changed
+	 * @param fromObj The source model object
+	 * @param toObj The model object to be updated
+	 * @return Whether the change has been applied
+	 */
+	public boolean update(ModelChangeContext context,
+				Model model, ModelObject fromObj, ModelObject toObj) {
+		return(false);
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/change/DefaultModelChangeContext.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/change/DefaultModelChangeContext.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/change/DefaultModelChangeContext.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,189 @@
+/*
+ * Copyright 2005-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 24 Jul 2008 : Initial version created by gary
+ */
+package org.scribble.model.change;
+
+import org.scribble.model.*;
+
+/**
+ * This class provides a default implementation for the model
+ * change context interface.
+ */
+public class DefaultModelChangeContext implements ModelChangeContext {
+
+	/**
+	 * This is the constructor for the model change context.
+	 * 
+	 * @param ref The reference for the model being changed
+	 * @param role The role associated with the model
+	 */
+	public DefaultModelChangeContext(ModelReference ref, Role role) {
+		
+		m_reference = ref;
+		m_role = role;
+		
+		if (ref != null) {
+			// Obtain the relevant rules
+			java.util.List<Object> rules=
+				org.scribble.extensions.RegistryFactory.getRegistry().
+							getExtensions(ModelChangeRule.class,
+									m_reference.getNotation());
+			
+			// Transfer to typed list
+			for (int i=0; i < rules.size(); i++) {
+				if (rules.get(i) instanceof ModelChangeRule) {
+					m_rules.add((ModelChangeRule)rules.get(i));
+				}
+			}
+		}
+	}
+	
+	/**
+	 * This method returns a list of model change rules appropriate
+	 * for the notation being changed.
+	 * 
+	 * @return The list of model change rules
+	 */
+	public java.util.List<ModelChangeRule> getRules() {
+		return(m_rules);
+	}
+	
+	/**
+	 * This method returns the role associated with the local
+	 * model.
+	 * 
+	 * @return The role
+	 */
+	public Role getRole() {
+		return(m_role);
+	}
+	
+	/**
+	 * This method returns the current parent component.
+	 * 
+	 * @return The parent
+	 */
+	public Object getParent() {
+		return(m_parent);
+	}
+	
+	/**
+	 * This method sets the new parent component.
+	 * 
+	 * @param parent The parent
+	 */
+	public void setParent(Object parent) {
+		m_parent = parent;
+	}
+	
+	/**
+	 * This method adds a new model object, within a
+	 * parent model object, with the details supplied in
+	 * another model object. The supplied model object
+	 * will usually be from a different model representation
+	 * (e.g. due to a merge), so the details will be
+	 * copied and placed in the representation associated
+	 * with the supplied model and parent model object.<p>
+	 * <p>
+	 * If a reference model object is supplied, then the
+	 * insertion will occur relative to it. If the reference
+	 * object is a block, then it means that the insertion
+	 * should occur at the end of the block. Otherwise the
+	 * new model object should be inserted before the
+	 * reference object, within the containing block. 
+	 * 
+	 * @param model The model being changed
+	 * @param mobj The model object details to be inserted
+	 * @param ref The optional reference model object
+	 * @return Whether the change has been applied
+	 */
+	public boolean insert(Model model, ModelObject mobj, ModelObject ref) {
+		boolean ret=false;
+		
+		for (int i=0; ret == false && i < m_rules.size(); i++) {
+			if (m_rules.get(i).isInsertSupported(this, model, mobj, ref)) {
+				ret = m_rules.get(i).insert(this, model,
+						mobj, ref);
+			}
+		}
+		
+		return(ret);
+	}
+	
+	/**
+	 * This method removes an existing model object, within a
+	 * parent model object, with the details supplied in
+	 * another model object.
+	 * 
+	 * @param model The model being changed
+	 * @param mobj The model object details to be deleted
+	 * @param position The position, where relevant
+	 * @return Whether the change has been applied
+	 */
+	public boolean delete(Model model, ModelObject mobj) {
+		boolean ret=false;
+		
+		for (int i=0; ret == false && i < m_rules.size(); i++) {
+			if (m_rules.get(i).isDeleteSupported(this, model, mobj)) {
+				ret = m_rules.get(i).delete(this, model, mobj);
+			}
+		}
+		
+		return(ret);
+	}
+	
+	/**
+	 * This method modifies an existing model object, within a
+	 * parent model object, with the details supplied in
+	 * another model object.
+	 * 
+	 * @param model The model being changed
+	 * @param fromObj The source model object
+	 * @param toObj The model object to be updated
+	 * @return Whether the change has been applied
+	 */
+	public boolean update(Model model, ModelObject fromObj, ModelObject toObj) {
+		boolean ret=false;
+		
+		for (int i=0; ret == false && i < m_rules.size(); i++) {
+			if (m_rules.get(i).isUpdateSupported(this, model, fromObj, toObj)) {
+				ret = m_rules.get(i).update(this, model,
+						fromObj, toObj);
+			}
+		}
+		
+		return(ret);
+	}
+	
+	/**
+	 * This method returns a set of properties used during model change
+	 * processing.
+	 * 
+	 * @return The properties
+	 */
+	public java.util.Map<String,Object> getProperties() {
+		return(m_properties);
+	}
+	
+	private ModelReference m_reference=null;
+	private Role m_role=null;
+	private Object m_parent=null;
+	private java.util.List<ModelChangeRule> m_rules=new java.util.Vector<ModelChangeRule>();
+	private java.util.Map<String,Object> m_properties=new java.util.HashMap<String,Object>();
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/change/DefaultModelGenerator.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/change/DefaultModelGenerator.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/change/DefaultModelGenerator.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,53 @@
+/*
+ * Copyright 2005-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 24 Jul 2008 : Initial version created by gary
+ */
+package org.scribble.model.change;
+
+import org.scribble.extensions.RegistryInfo;
+import org.scribble.model.*;
+
+/**
+ * This class represents a default implementation of the model
+ * generator interface.
+ */
+ at RegistryInfo(extension=ModelGenerator.class,isService=true)
+public class DefaultModelGenerator implements ModelGenerator {
+
+	/**
+	 * This method generates the contents of the target
+	 * model using information in the source model. This
+	 * mechanism is used to create a new instance of the
+	 * model, but with a specific underlying representation.
+	 * 
+	 * @param targetRef The target model's reference
+	 * @param role The role associated with the model
+	 * @param target The model being generated
+	 * @param source The reference model
+	 */
+	public void generate(ModelReference targetRef, Role role,
+					Model target, Model source) {
+		
+		DefaultModelChangeContext context=
+			new DefaultModelChangeContext(targetRef, role);
+		context.setParent(target);
+		
+		context.insert(target, source, null);
+	}
+	
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/change/ModelChangeContext.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/change/ModelChangeContext.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/change/ModelChangeContext.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,107 @@
+/*
+ * Copyright 2005-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 24 Jul 2008 : Initial version created by gary
+ */
+package org.scribble.model.change;
+
+import org.scribble.model.*;
+
+/**
+ * This interface represents the capabilities made available
+ * to the model change rules.
+ */
+public interface ModelChangeContext {
+
+	/**
+	 * This method returns the role associated with the local
+	 * model.
+	 * 
+	 * @return The role
+	 */
+	public Role getRole();
+	
+	/**
+	 * This method returns the current parent component.
+	 * 
+	 * @return The parent
+	 */
+	public Object getParent();
+	
+	/**
+	 * This method sets the new parent component.
+	 * 
+	 * @param parent The parent
+	 */
+	public void setParent(Object parent);
+	
+	/**
+	 * This method adds a new model object, within a
+	 * parent model object, with the details supplied in
+	 * another model object. The supplied model object
+	 * will usually be from a different model representation
+	 * (e.g. due to a merge), so the details will be
+	 * copied and placed in the representation associated
+	 * with the supplied model and parent model object.<p>
+	 * <p>
+	 * If a reference model object is supplied, then the
+	 * insertion will occur relative to it. If the reference
+	 * object is a block, then it means that the insertion
+	 * should occur at the end of the block. Otherwise the
+	 * new model object should be inserted before the
+	 * reference object, within the containing block. 
+	 * 
+	 * @param model The model being changed
+	 * @param mobj The model object details to be inserted
+	 * @param ref The optional reference model object
+	 * @return Whether the change has been applied
+	 */
+	public boolean insert(Model model, ModelObject mobj, ModelObject ref);
+	
+	/**
+	 * This method removes the supplied model object from the
+	 * supplied model. The model object representation must
+	 * contain the necessary model specific to remove the 
+	 * object from the underlying model representation.
+	 * 
+	 * @param model The model being changed
+	 * @param mobj The model object to be deleted
+	 * @return Whether the change has been applied
+	 */
+	public boolean delete(Model model, ModelObject mobj);
+	
+	/**
+	 * This method modifies an existing model object, within a
+	 * parent model object, with the details supplied in
+	 * another model object.
+	 * 
+	 * @param model The model being changed
+	 * @param fromObj The source model object
+	 * @param toObj The model object to be updated
+	 * @return Whether the change has been applied
+	 */
+	public boolean update(Model model, ModelObject fromObj, ModelObject toObj);
+	
+	/**
+	 * This method returns a set of properties used during model change
+	 * processing.
+	 * 
+	 * @return The properties
+	 */
+	public java.util.Map<String,Object> getProperties();
+	
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/change/ModelChangeRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/change/ModelChangeRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/change/ModelChangeRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,130 @@
+/*
+ * Copyright 2005-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 23 Jul 2008 : Initial version created by gary
+ */
+package org.scribble.model.change;
+
+import org.scribble.model.*;
+
+/**
+ * This interface represents a rule that can be used
+ * to insert a new model object into the current model.
+ */
+public interface ModelChangeRule {
+
+	/**
+	 * This method determines whether the rule is appropriate
+	 * for the supplied type of model, parent (in the context)
+	 * and inserted model object.
+	 * 
+	 * @param context The model change context
+	 * @param model The model
+	 * @param mobj The model object being inserted
+	 * @param ref The optional reference model object
+	 * @return Whether the rule supports the supplied information
+	 */
+	public boolean isInsertSupported(ModelChangeContext context,
+					Model model, ModelObject mobj,
+					ModelObject ref);
+	
+	/**
+	 * This method adds a new model object, within a
+	 * parent model object, with the details supplied in
+	 * another model object. The supplied model object
+	 * will usually be from a different model representation
+	 * (e.g. due to a merge), so the details will be
+	 * copied and placed in the representation associated
+	 * with the supplied model and parent model object.<p>
+	 * <p>
+	 * If a reference model object is supplied, then the
+	 * insertion will occur relative to it. If the reference
+	 * object is a block, then it means that the insertion
+	 * should occur at the end of the block. Otherwise the
+	 * new model object should be inserted before the
+	 * reference object, within the containing block.<p>
+	 * <p>
+	 * If the reference object is not supplied, then the
+	 * new model object should be inserted at the end of
+	 * the behaviour associated with the parent in the model
+	 * change context.
+	 * 
+	 * @param context The context
+	 * @param model The model being changed
+	 * @param mobj The model object details to be inserted
+	 * @param ref The optional reference model object
+	 * @return Whether the change has been applied
+	 */
+	public boolean insert(ModelChangeContext context,
+				Model model, ModelObject mobj, ModelObject ref);
+	
+	/**
+	 * This method determines whether the rule is appropriate
+	 * for the supplied type of model, parent (in the context)
+	 * and deleted model object.
+	 *
+	 * @param context The context
+	 * @param model The model
+	 * @param mobj The model object to be removed
+	 * @return Whether the rule supports the supplied information
+	 */
+	public boolean isDeleteSupported(ModelChangeContext context,
+					Model model, ModelObject mobj);
+	
+	/**
+	 * This method removes the supplied model object from the
+	 * supplied model. The model object representation must
+	 * contain the necessary model specific to remove the 
+	 * object from the underlying model representation.
+	 * 
+	 * @param context The context
+	 * @param model The model being changed
+	 * @param mobj The model object to be deleted
+	 * @return Whether the change has been applied
+	 */
+	public boolean delete(ModelChangeContext context,
+				Model model, ModelObject mobj);
+	
+	/**
+	 * This method determines whether the rule is appropriate
+	 * for the supplied type of model, parent (in the context)
+	 * and modified model object.
+	 *
+	 * @param context The context
+	 * @param model The model
+	 * @param fromObj The source model object
+	 * @param toObj The model object to be updated
+	 * @return Whether the rule supports the supplied information
+	 */
+	public boolean isUpdateSupported(ModelChangeContext context,
+					Model model, ModelObject fromObj, ModelObject toObj);
+	
+	/**
+	 * This method modifies an existing model object, within a
+	 * parent model object, with the details supplied in
+	 * another model object.
+	 * 
+	 * @param context The context
+	 * @param model The model being changed
+	 * @param fromObj The source model object
+	 * @param toObj The model object to be updated
+	 * @return Whether the change has been applied
+	 */
+	public boolean update(ModelChangeContext context,
+				Model model, ModelObject fromObj, ModelObject toObj);
+
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/change/ModelGenerator.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/change/ModelGenerator.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/change/ModelGenerator.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,43 @@
+/*
+ * Copyright 2005-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 24 Jul 2008 : Initial version created by gary
+ */
+package org.scribble.model.change;
+
+import org.scribble.model.*;
+
+/**
+ * This interface represents a model generator.
+ */
+public interface ModelGenerator {
+
+	/**
+	 * This method generates the contents of the target
+	 * model using information in the source model. This
+	 * mechanism is used to create a new instance of the
+	 * model, but with a specific underlying representation.
+	 * 
+	 * @param targetRef The target model's reference
+	 * @param role The role associated with the model
+	 * @param target The model being generated
+	 * @param source The reference model
+	 */
+	public void generate(ModelReference targetRef, Role role,
+					Model target, Model source);
+	
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/filter/DefaultModelFilter.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/filter/DefaultModelFilter.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/filter/DefaultModelFilter.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,119 @@
+/*
+ * Copyright 2005-9 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 21 Jan 2009 : Initial version created by gary
+ */
+package org.scribble.model.filter;
+
+import org.scribble.extensions.RegistryInfo;
+import org.scribble.model.*;
+
+/**
+ * This class provides the default implementation of the
+ * model filter capability.
+ */
+ at RegistryInfo(extension=ModelFilter.class)
+public class DefaultModelFilter implements ModelFilter {
+
+	/**
+	 * This method filters the supplied model based on the list
+	 * of roles.
+	 * 
+	 * @param model The model
+	 * @param roles The list of roles
+	 */
+	public void filter(Model model, java.util.List<Role> roles) {
+		
+		for (int i=0; i < model.getDefinitions().size(); i++) {
+			filterBlock(model.getDefinitions().get(i).getBlock(), roles);
+		}
+	}
+
+	/**
+	 * This method filters the block of activities to only include
+	 * activities relevant to the supplied roles.
+	 * 
+	 * @param block The block of activities to be filtered
+	 * @param roles The list of roles
+	 */
+	protected void filterBlock(Block block, java.util.List<Role> roles) {
+		
+		for (int i=0; i < block.getContents().size(); i++) {
+			Activity act=block.getContents().get(i);
+			boolean f_remove=false;
+			
+			if (act instanceof RoleList) {
+				RoleList rl=(RoleList)act;
+				
+				rl.getRoles().retainAll(roles);
+				
+			} else if (act instanceof ModelInclude) {
+				//ModelInclude mi=(ModelInclude)act;
+				
+				// TODO: Need to check what roles are mapped
+				// in all uses of a particular sub-definition
+				// and then make sure all used roles are
+				// retained for the sub-definition
+				
+			} else if (act instanceof MultiPathBehaviour) {
+				MultiPathBehaviour mpb=(MultiPathBehaviour)act;
+				java.util.List<Block> paths=mpb.getPaths();
+				
+				for (int j=0; j < paths.size(); j++) {
+					Block path=paths.get(j);
+					
+					filterBlock(path, roles);
+					
+					// Is path empty?
+					if (path.getContents().size() == 0) {
+						mpb.removePath(path);
+					}
+				}
+				
+				// TODO: Should we check if empty multi-path
+				// behaviour should be removed?
+								
+			} else if (act instanceof SinglePathBehaviour) {
+				SinglePathBehaviour spb=(SinglePathBehaviour)act;
+				
+				filterBlock(spb.getBlock(), roles);
+				
+				// TODO: Should we check if empty single-path
+				// behaviour should be removed?
+
+			} else if (act instanceof Behaviour) {
+				
+				java.util.List<Role> associated=
+						((Behaviour)act).getAssociatedRoles();
+				
+				// Make sure all roles associated with the
+				// behaviour are contained in the supplied list
+				for (int j=0; f_remove == false &&
+						j < associated.size(); j++) {
+					if (roles.contains(associated.get(j)) == false) {
+						f_remove = true;
+					}
+				}
+			}
+			
+			if (f_remove) {
+				block.getContents().remove(i);
+				i--;
+			}
+		}
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/filter/ModelFilter.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/filter/ModelFilter.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/filter/ModelFilter.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,39 @@
+/*
+ * Copyright 2005-9 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 21 Jan 2009 : Initial version created by gary
+ */
+package org.scribble.model.filter;
+
+import org.scribble.model.*;
+
+/**
+ * This component provides a filtering capability for
+ * processing models.
+ */
+public interface ModelFilter {
+
+	/**
+	 * This method filters the supplied model based on the list
+	 * of roles.
+	 * 
+	 * @param model The model
+	 * @param roles The list of roles
+	 */
+	public void filter(Model model, java.util.List<Role> roles);
+	
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/resolutions/DeleteFromModel.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/resolutions/DeleteFromModel.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/resolutions/DeleteFromModel.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,134 @@
+/*
+ * Copyright 2007-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 30 Sep 2008 : Initial version created by gary
+ */
+package org.scribble.model.resolutions;
+
+//import java.util.logging.Logger;
+
+import java.io.IOException;
+
+import org.scribble.model.*;
+import org.scribble.model.admin.DefaultModelListener;
+import org.scribble.model.admin.DefaultResolution;
+import org.scribble.model.admin.ModelInfo;
+import org.scribble.model.admin.ModelIssue;
+import org.scribble.model.change.*;
+
+/**
+ * This class represents a resolution for deleting a model object
+ * from a target model.
+ *
+ */
+public class DeleteFromModel extends DefaultResolution {
+
+	/**
+	 * The default constructor for the 'show reference
+	 * description'.
+	 */
+	public DeleteFromModel() {
+		setName(java.util.PropertyResourceBundle.getBundle(
+				"org.scribble.model.resolutions.Messages").
+					getString("_DELETE_FROM_MODEL_NAME"));
+		setDescription(java.util.PropertyResourceBundle.getBundle(
+				"org.scribble.model.resolutions.Messages").
+					getString("_DELETE_FROM_MODEL_DESC"));
+	}
+		
+	/**
+	 * This method is invoked to perform the resolution
+	 * on the identified model, associated with the model
+	 * object located using the supplied source reference
+	 * information. Further details regarding the issue
+	 * to be resolved is provided by the model issue -
+	 * although the 'model object' part of the model
+	 * issue may not be defined. This will have to be
+	 * recovered using the supplied model and source
+	 * reference.
+	 * 
+	 * @param ref The model reference
+	 * @param obj The source reference of the model object
+	 * @param issue The issue
+	 * @exception ResolutionException Failed to resolve
+	 */
+	@Override
+	public void resolve(ModelReference ref, SourceRef obj,
+					ModelIssue issue) throws ResolutionException {
+			
+		org.scribble.model.admin.ModelRepository mrep=
+				(org.scribble.model.admin.ModelRepository)
+			org.scribble.extensions.RegistryFactory.getRegistry().getExtension(
+					org.scribble.model.admin.ModelRepository.class, null);
+
+		DefaultModelChangeContext context=
+					new DefaultModelChangeContext(ref,
+							ref.getLocatedRole()==null?null :
+								new Role(ref.getLocatedRole()));
+
+		// Retrieve source and reference models and identify
+		// the relevant model objects
+		java.util.List<ModelInfo> models=mrep.getModels(ref, new DefaultModelListener());
+		ModelObject refObj=null;
+		Model model=null;
+		
+		// NOTE: Should only really be one model that matches
+		// the reference - i.e. the source model reference, and
+		// therefore this single model should provide access
+		// to the required model object. If a model reference
+		// is abstract/derived, then it may provide multiple models
+		// that might incorrectly return a model object for the URI.
+		
+		for (int i=0; refObj == null && i < models.size(); i++) {
+			model = models.get(i).getModel();
+			refObj = model.findModelObject(obj.getModelObjectURI());
+		}
+		
+		boolean f_deleted=false;
+		
+		if (model != null && refObj != null) {
+			
+			if (f_deleted = context.delete(model, refObj)) {
+			
+				// Update the model
+				try {
+					mrep.updateModel(ref, model);
+				} catch (IOException e) {
+					throw new ResolutionException(java.util.PropertyResourceBundle.getBundle(
+								"org.scribble.model.resolutions.Messages").
+								getString("_COULD_NOT_SAVE"));
+				}
+			}
+		}
+		
+		if (f_deleted == false) {
+			throw new ResolutionException(java.util.PropertyResourceBundle.getBundle(
+					"org.scribble.model.resolutions.Messages").
+					getString("_COULD_NOT_DELETE"));
+		}
+	}
+	
+	public int hashCode() {
+		return(0);
+	}
+	
+	public boolean equals(Object obj) {
+		return(obj instanceof DeleteFromModel);
+	}
+	
+	//private static Logger logger = Logger.getLogger("org.scribble.model.resolutions");
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/resolutions/InsertFromReferencedDescription.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/resolutions/InsertFromReferencedDescription.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/resolutions/InsertFromReferencedDescription.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,227 @@
+/*
+ * Copyright 2007-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 26 Sep 2008 : Initial version created by gary
+ */
+package org.scribble.model.resolutions;
+
+//import java.util.logging.Logger;
+
+import java.io.IOException;
+
+import org.scribble.model.*;
+import org.scribble.model.admin.DefaultModelListener;
+import org.scribble.model.admin.DefaultResolution;
+import org.scribble.model.admin.ModelInfo;
+import org.scribble.model.admin.ModelIssue;
+import org.scribble.model.change.*;
+
+/**
+ * This class represents a resolution for inserting a model object
+ * from a referenced description into the target model.
+ *
+ */
+public class InsertFromReferencedDescription extends DefaultResolution {
+
+	private static final String SOURCE_REF_END_POSITION = "sourceRefEndPosition";
+	private static final String SOURCE_REF_START_POSITION = "sourceRefStartPosition";
+	private static final String SOURCE_REF_MODEL_OBJECT_URI = "sourceRefModelObjectURI";
+	private static final String SOURCE_REF_COMPONENT_URI = "sourceRefComponentURI";
+	private static final String IFRD_SRC_REF_PREFIX = "_ifrdSrcRef_";
+	private static final String IFRD_MODEL_PREFIX = "_ifrdModel_";
+	private static final String MODEL_NOTATION = "modelNotation";
+	private static final String MODEL_LOCATED_ROLE = "modelLocatedRole";
+	private static final String MODEL_LOCALPART = "modelLocalpart";
+	private static final String MODEL_NAMESPACE = "modelNamespace";
+
+	/**
+	 * The default constructor for the 'show reference
+	 * description'.
+	 */
+	public InsertFromReferencedDescription() {
+		setName(java.util.PropertyResourceBundle.getBundle(
+				"org.scribble.model.resolutions.Messages").
+					getString("_INSERT_FROM_REFERENCED_DESCRIPTION_NAME"));
+		setDescription(java.util.PropertyResourceBundle.getBundle(
+				"org.scribble.model.resolutions.Messages").
+					getString("_INSERT_FROM_REFERENCED_DESCRIPTION_DESC"));
+	}
+		
+	/**
+	 * This method sets the model's reference.
+	 * 
+	 * @param ref The model's reference
+	 */
+	public void setModel(ModelReference ref) {
+		getProperties().put(MODEL_NAMESPACE, ref.getNamespace());
+		getProperties().put(MODEL_LOCALPART, ref.getLocalpart());
+		getProperties().put(MODEL_LOCATED_ROLE, ref.getLocatedRole());
+		getProperties().put(MODEL_NOTATION, ref.getNotation());
+		
+		java.util.Iterator<String> iter=ref.getPropertyNames().iterator();
+		
+		while (iter.hasNext()) {
+			String name=iter.next();
+			getProperties().put(IFRD_MODEL_PREFIX+name, ref.getProperty(name));
+		}
+	}
+	
+	/**
+	 * This method sets the source reference associated with the
+	 * referenced model object.
+	 * 
+	 * @param sref The source reference
+	 */
+	public void setSourceReference(SourceRef sref) {
+		getProperties().put(SOURCE_REF_COMPONENT_URI, sref.getComponentURI());
+		getProperties().put(SOURCE_REF_MODEL_OBJECT_URI, sref.getModelObjectURI());
+		getProperties().put(SOURCE_REF_START_POSITION, sref.getStartPosition());
+		getProperties().put(SOURCE_REF_END_POSITION, sref.getEndPosition());
+
+		java.util.Iterator<String> iter=sref.getProperties().keySet().iterator();
+		
+		while (iter.hasNext()) {
+			String name=iter.next();
+			getProperties().put(IFRD_SRC_REF_PREFIX+name, sref.getProperties().get(name));
+		}
+	}
+
+	/**
+	 * This method is invoked to perform the resolution
+	 * on the identified model, associated with the model
+	 * object located using the supplied source reference
+	 * information. Further details regarding the issue
+	 * to be resolved is provided by the model issue -
+	 * although the 'model object' part of the model
+	 * issue may not be defined. This will have to be
+	 * recovered using the supplied model and source
+	 * reference.
+	 * 
+	 * @param ref The model reference
+	 * @param obj The source reference of the model object
+	 * @param issue The issue
+	 * @exception ResolutionException Failed to resolve
+	 */
+	@Override
+	public void resolve(ModelReference ref, SourceRef obj,
+					ModelIssue issue) throws ResolutionException {
+			
+		// Recover the model reference
+		ModelReference modelRef=new ModelReference(
+				(String)getProperties().get(MODEL_NAMESPACE),
+				(String)getProperties().get(MODEL_LOCALPART),
+				(String)getProperties().get(MODEL_LOCATED_ROLE),
+				(String)getProperties().get(MODEL_NOTATION));
+		
+		// Recover the source reference
+		SourceRef sref=new SourceRef();
+		sref.setComponentURI((String)getProperties().get(SOURCE_REF_COMPONENT_URI));
+		sref.setModelObjectURI((String)getProperties().get(SOURCE_REF_MODEL_OBJECT_URI));
+		sref.setStartPosition((Integer)getProperties().get(SOURCE_REF_START_POSITION));
+		sref.setEndPosition((Integer)getProperties().get(SOURCE_REF_END_POSITION));
+		
+		// Recover the properties for model and source ref
+		java.util.Iterator<String> iter=getProperties().keySet().iterator();
+		while (iter.hasNext()) {
+			String name=iter.next();
+			
+			if (name.startsWith(IFRD_MODEL_PREFIX)) {
+				Object value=getProperties().get(name);
+				
+				name = name.substring(IFRD_MODEL_PREFIX.length());
+				
+				modelRef.setProperty(name, value);
+			} else if (name.startsWith(IFRD_SRC_REF_PREFIX)) {
+				Object value=getProperties().get(name);
+				
+				name = name.substring(IFRD_SRC_REF_PREFIX.length());
+				
+				sref.getProperties().put(name, value);
+			}
+		}		
+		
+		org.scribble.model.admin.ModelRepository mrep=
+				(org.scribble.model.admin.ModelRepository)
+			org.scribble.extensions.RegistryFactory.getRegistry().getExtension(
+					org.scribble.model.admin.ModelRepository.class, null);
+
+		DefaultModelChangeContext context=
+					new DefaultModelChangeContext(ref,
+							ref.getLocatedRole()==null?null :
+								new Role(ref.getLocatedRole()));
+
+		// Retrieve source and reference models and identify
+		// the relevant model objects
+		java.util.List<ModelInfo> models=mrep.getModels(ref, new DefaultModelListener());
+		ModelObject refObj=null;
+		Model model=null;
+		
+		// NOTE: Should only really be one model that matches
+		// the reference - i.e. the source model reference, and
+		// therefore this single model should provide access
+		// to the required model object. If a model reference
+		// is abstract/derived, then it may provide multiple models
+		// that might incorrectly return a model object for the URI.
+		
+		for (int i=0; refObj == null && i < models.size(); i++) {
+			model = models.get(i).getModel();
+			refObj = model.findModelObject(obj.getModelObjectURI());
+		}
+		
+		models = mrep.getModels(modelRef, new DefaultModelListener());
+		ModelObject fromObj=null;
+		Model refModel=null;
+		
+		for (int i=0; fromObj == null && i < models.size(); i++) {
+			refModel = models.get(i).getModel();
+			fromObj = refModel.findModelObject(sref.getModelObjectURI());
+		}
+		
+		boolean f_inserted=false;
+		
+		if (model != null && fromObj != null && refObj != null) {
+			
+			if (f_inserted = context.insert(model, fromObj, refObj)) {
+			
+				try {
+					// Update the model
+					mrep.updateModel(ref, model);
+				} catch (IOException e) {
+					throw new ResolutionException(java.util.PropertyResourceBundle.getBundle(
+								"org.scribble.model.resolutions.Messages").
+								getString("_COULD_NOT_SAVE"));
+				}
+			}
+		}
+		
+		if (f_inserted == false) {
+			throw new ResolutionException(java.util.PropertyResourceBundle.getBundle(
+					"org.scribble.model.resolutions.Messages").
+					getString("_COULD_NOT_INSERT"));
+		}
+	}
+	
+	public int hashCode() {
+		return(0);
+	}
+	
+	public boolean equals(Object obj) {
+		return(obj instanceof InsertFromReferencedDescription);
+	}
+	
+	//private static Logger logger = Logger.getLogger("org.scribble.model.resolutions");
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/resolutions/Messages.properties
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/resolutions/Messages.properties	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/resolutions/Messages.properties	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,34 @@
+# /*
+# * Copyright 2007-8 Pi4 Technologies Ltd
+# *
+# * Licensed under the Apache License, Version 2.0 (the "License");
+# * you may not use this file except in compliance with the License.
+# * You may obtain a copy of the License at
+# *
+# *     http://www.apache.org/licenses/LICENSE-2.0
+# *
+# * Unless required by applicable law or agreed to in writing, software
+# * distributed under the License is distributed on an "AS IS" BASIS,
+# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# * See the License for the specific language governing permissions and
+# * limitations under the License.
+# *
+# *
+# * Change History:
+# * 11 Sept 2008 : Initial version created by gary
+# */
+
+_COULD_NOT_DELETE=Could not delete activities from the model
+_COULD_NOT_INSERT=Could not insert activities found in referenced description
+_COULD_NOT_SAVE=Could not save the model
+_COULD_NOT_UPDATE=Could not update activity with information from referenced description
+_DELETE_FROM_MODEL_NAME=Delete unnecessary activities from model
+_DELETE_FROM_MODEL_DESC=Unnecessary activities, not present in the referenced description, will be deleted from model
+_INSERT_FROM_REFERENCED_DESCRIPTION_NAME=Insert missing behaviour from referenced description
+_INSERT_FROM_REFERENCED_DESCRIPTION_DESC=Insert the missing behaviour from the referenced description
+_SHOW_COMPOSED_ISSUE_NAME=Show composed issue
+_SHOW_COMPOSED_ISSUE_DESC=Display the erronous activity in the composed description
+_SHOW_REFERENCED_DESCRIPTION_NAME=Show referenced description
+_SHOW_REFERENCED_DESCRIPTION_DESC=Display the area in the referenced description being used for conformance analysis
+_UPDATE_FROM_REFERENCED_DESCRIPTION_NAME=Update from referenced description
+_UPDATE_FROM_REFERENCED_DESCRIPTION_DESC=Update the affected behaviour from the referenced description

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/resolutions/Resolution.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/resolutions/Resolution.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/resolutions/Resolution.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,81 @@
+/*
+ * Copyright 2005-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 7 Sep 2008 : Initial version created by gary
+ */
+package org.scribble.model.resolutions;
+
+import org.scribble.model.ModelReference;
+import org.scribble.model.SourceRef;
+import org.scribble.model.admin.ModelIssue;
+
+/**
+ * This interface represents a resolution to a reported
+ * model issue.
+ */
+public interface Resolution {
+
+	/**
+	 * This method returns the name of the resolution.
+	 * 
+	 * @return The name
+	 */
+	public String getName();
+	
+	/**
+	 * This method returns the description of the resolution.
+	 * 
+	 * @return The description
+	 */
+	public String getDescription();
+	
+	/**
+	 * This method returns the class associated with the
+	 * resolution. This class must have a default constructor.
+	 * 
+	 * @return The resolution class
+	 */
+	public String getResolutionClass();
+	
+	/**
+	 * This method returns the properties used to configure
+	 * the resolution.
+	 * 
+	 * @return The properties
+	 */
+	public java.util.Map<String, Object> getProperties();
+	
+	/**
+	 * This method is invoked to perform the resolution
+	 * on the identified model, associated with the model
+	 * object located using the supplied source reference
+	 * information. Further details regarding the issue
+	 * to be resolved is provided by the model issue -
+	 * although the 'model object' part of the model
+	 * issue may not be defined. This will have to be
+	 * recovered using the supplied model and source
+	 * reference.
+	 * 
+	 * @param ref The model reference
+	 * @param obj The source reference of the model object
+	 * @param issue The issue
+	 * @exception ResolutionException Failed to resolve
+	 */
+	public void resolve(ModelReference ref, SourceRef obj,
+					ModelIssue issue) throws ResolutionException;
+	
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/resolutions/ResolutionException.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/resolutions/ResolutionException.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/resolutions/ResolutionException.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,50 @@
+/*
+ * Copyright 2005-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 29 Sep 2008 : Initial version created by gary
+ */
+package org.scribble.model.resolutions;
+
+/**
+ * This class represents an exception that occurs while
+ * executing a resolution.
+ */
+public class ResolutionException extends Exception {
+
+	private static final long serialVersionUID = -1579952405094467030L;
+
+	/**
+	 * This constructor initializes the exception with a
+	 * message.
+	 * 
+	 * @param mesg The message
+	 */
+	public ResolutionException(String mesg) {
+		super(mesg);
+	}
+	
+	/**
+	 * This constructor initializes the exception with a
+	 * message and associated exception.
+	 * 
+	 * @param mesg The message
+	 * @param t The associated exception
+	 */
+	public ResolutionException(String mesg, Throwable t) {
+		super(mesg, t);
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/resolutions/ShowComposedIssue.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/resolutions/ShowComposedIssue.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/resolutions/ShowComposedIssue.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,181 @@
+/*
+ * Copyright 2007-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 7 Sep 2008 : Initial version created by gary
+ */
+package org.scribble.model.resolutions;
+
+import java.util.logging.Logger;
+
+import org.scribble.model.*;
+import org.scribble.model.admin.DefaultResolution;
+import org.scribble.model.admin.ModelIssue;
+import org.scribble.util.ResourceUtil;
+
+/**
+ * This class represents a resolution for navigating to an external
+ * issue.
+ *
+ */
+public class ShowComposedIssue extends DefaultResolution {
+
+	private static final String COMPOSED_SOURCE_REF_END_POSITION = "composedSourceRefEndPosition";
+	private static final String COMPOSED_SOURCE_REF_START_POSITION = "composedSourceRefStartPosition";
+	private static final String COMPOSED_SOURCE_REF_MODEL_OBJECT_URI = "composedSourceRefModelObjectURI";
+	private static final String COMPOSED_SOURCE_REF_COMPONENT_URI = "composedSourceRefComponentURI";
+	private static final String SEI_SRC_REF_PREFIX = "_seiSrcRef_";
+	private static final String SEI_MODEL_PREFIX = "_seiModel_";
+	private static final String COMPOSED_NOTATION = "composedNotation";
+	private static final String COMPOSED_LOCATED_ROLE = "composedLocatedRole";
+	private static final String COMPOSED_LOCALPART = "composedLocalpart";
+	private static final String COMPOSED_NAMESPACE = "composedNamespace";
+
+	/**
+	 * This is the default constructor for the 'show
+	 * external issue' resolution.
+	 */
+	public ShowComposedIssue() {
+		setName(java.util.PropertyResourceBundle.getBundle(
+				"org.scribble.model.resolutions.Messages").
+			getString("_SHOW_COMPOSED_ISSUE_NAME"));
+		setDescription(java.util.PropertyResourceBundle.getBundle(
+				"org.scribble.model.resolutions.Messages").
+			getString("_SHOW_COMPOSED_ISSUE_DESC"));
+	}
+	
+	/**
+	 * This method sets the composed model's reference.
+	 * 
+	 * @param ref The composed model's reference
+	 */
+	public void setComposedModel(ModelReference ref) {
+		getProperties().put(COMPOSED_NAMESPACE, ref.getNamespace());
+		getProperties().put(COMPOSED_LOCALPART, ref.getLocalpart());
+		getProperties().put(COMPOSED_LOCATED_ROLE, ref.getLocatedRole());
+		getProperties().put(COMPOSED_NOTATION, ref.getNotation());
+		
+		java.util.Iterator<String> iter=ref.getPropertyNames().iterator();
+		
+		while (iter.hasNext()) {
+			String name=iter.next();
+			getProperties().put(SEI_MODEL_PREFIX+name, ref.getProperty(name));
+		}
+	}
+
+	/**
+	 * This method sets the source reference associated with the
+	 * referenced model object.
+	 * 
+	 * @param sref The source reference
+	 */
+	public void setSourceReference(SourceRef sref) {
+		getProperties().put(COMPOSED_SOURCE_REF_COMPONENT_URI, sref.getComponentURI());
+		getProperties().put(COMPOSED_SOURCE_REF_MODEL_OBJECT_URI, sref.getModelObjectURI());
+		getProperties().put(COMPOSED_SOURCE_REF_START_POSITION, sref.getStartPosition());
+		getProperties().put(COMPOSED_SOURCE_REF_END_POSITION, sref.getEndPosition());
+
+		java.util.Iterator<String> iter=sref.getProperties().keySet().iterator();
+		
+		while (iter.hasNext()) {
+			String name=iter.next();
+			getProperties().put(SEI_SRC_REF_PREFIX+name, sref.getProperties().get(name));
+		}
+	}
+
+	/**
+	 * This method is invoked to perform the resolution
+	 * on the identified model, associated with the model
+	 * object located using the supplied source reference
+	 * information. Further details regarding the issue
+	 * to be resolved is provided by the model issue -
+	 * although the 'model object' part of the model
+	 * issue may not be defined. This will have to be
+	 * recovered using the supplied model and source
+	 * reference.
+	 * 
+	 * @param ref The model reference
+	 * @param obj The source reference of the model object
+	 * @param issue The issue
+	 * @exception ResolutionException Failed to resolve
+	 */
+	@Override
+	public void resolve(ModelReference ref, SourceRef obj,
+					ModelIssue issue) throws ResolutionException {
+		
+		ModelReference extRef=new ModelReference(
+				(String)getProperties().get(COMPOSED_NAMESPACE),
+				(String)getProperties().get(COMPOSED_LOCALPART),
+				(String)getProperties().get(COMPOSED_LOCATED_ROLE),
+				(String)getProperties().get(COMPOSED_NOTATION));
+		
+		// Recover the source reference
+		SourceRef sref=new SourceRef();
+		sref.setComponentURI((String)getProperties().get(COMPOSED_SOURCE_REF_COMPONENT_URI));
+		sref.setModelObjectURI((String)getProperties().get(COMPOSED_SOURCE_REF_MODEL_OBJECT_URI));
+		sref.setStartPosition((Integer)getProperties().get(COMPOSED_SOURCE_REF_START_POSITION));
+		sref.setEndPosition((Integer)getProperties().get(COMPOSED_SOURCE_REF_END_POSITION));
+		
+		// Recover the properties for model and source ref
+		java.util.Iterator<String> iter=getProperties().keySet().iterator();
+		while (iter.hasNext()) {
+			String name=iter.next();
+			
+			if (name.startsWith(SEI_MODEL_PREFIX)) {
+				Object value=getProperties().get(name);
+				
+				name = name.substring(SEI_MODEL_PREFIX.length());
+				
+				extRef.setProperty(name, value);
+			} else if (name.startsWith(SEI_SRC_REF_PREFIX)) {
+				Object value=getProperties().get(name);
+				
+				name = name.substring(SEI_SRC_REF_PREFIX.length());
+				
+				sref.getProperties().put(name, value);
+			}
+		}		
+		
+		// Find notation for the URI
+		org.scribble.model.Notation notation=
+				ResourceUtil.getNotation(extRef.getNotation());
+				
+		if (notation != null) {
+			org.scribble.editor.EditorManager em=(org.scribble.editor.EditorManager)
+					org.scribble.extensions.RegistryFactory.getRegistry().getExtension(
+							org.scribble.editor.EditorManager.class, notation.getCode());
+			
+			if (em != null) {
+				try {
+					em.focus(extRef, sref, issue.getProperties());
+				} catch(Exception e) {
+					logger.log(java.util.logging.Level.SEVERE,
+							"Failed to focus on model reference: "+extRef, e);
+				}
+			}
+		}
+	}
+	
+	public int hashCode() {
+		return(0);
+	}
+	
+	public boolean equals(Object obj) {
+		return(obj instanceof ShowComposedIssue);
+	}
+	
+	private static Logger logger = Logger.getLogger("org.scribble.osgi.resolutions");
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/resolutions/ShowReferencedDescription.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/resolutions/ShowReferencedDescription.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/resolutions/ShowReferencedDescription.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,182 @@
+/*
+ * Copyright 2007-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 7 Sep 2008 : Initial version created by gary
+ */
+package org.scribble.model.resolutions;
+
+import java.util.logging.Logger;
+
+import org.scribble.model.*;
+import org.scribble.model.admin.DefaultResolution;
+import org.scribble.model.admin.ModelIssue;
+import org.scribble.util.ResourceUtil;
+
+/**
+ * This class represents a resolution for navigating to a referenced
+ * description.
+ *
+ */
+public class ShowReferencedDescription extends DefaultResolution {
+
+	private static final String SOURCE_REF_END_POSITION = "sourceRefEndPosition";
+	private static final String SOURCE_REF_START_POSITION = "sourceRefStartPosition";
+	private static final String SOURCE_REF_MODEL_OBJECT_URI = "sourceRefModelObjectURI";
+	private static final String SOURCE_REF_COMPONENT_URI = "sourceRefComponentURI";
+	private static final String SRD_SRC_REF_PREFIX = "_srdSrcRef_";
+	private static final String SRD_MODEL_PREFIX = "_srdModel_";
+	private static final String MODEL_NOTATION = "modelNotation";
+	private static final String MODEL_LOCATED_ROLE = "modelLocatedRole";
+	private static final String MODEL_LOCALPART = "modelLocalpart";
+	private static final String MODEL_NAMESPACE = "modelNamespace";
+
+	/**
+	 * The default constructor for the 'show reference
+	 * description'.
+	 */
+	public ShowReferencedDescription() {
+		setName(java.util.PropertyResourceBundle.getBundle(
+				"org.scribble.model.resolutions.Messages").
+			getString("_SHOW_REFERENCED_DESCRIPTION_NAME"));
+		setDescription(java.util.PropertyResourceBundle.getBundle(
+				"org.scribble.model.resolutions.Messages").
+			getString("_SHOW_REFERENCED_DESCRIPTION_DESC"));
+	}
+		
+	/**
+	 * This method sets the model's reference.
+	 * 
+	 * @param ref The model's reference
+	 */
+	public void setModel(ModelReference ref) {
+		getProperties().put(MODEL_NAMESPACE, ref.getNamespace());
+		getProperties().put(MODEL_LOCALPART, ref.getLocalpart());
+		getProperties().put(MODEL_LOCATED_ROLE, ref.getLocatedRole());
+		getProperties().put(MODEL_NOTATION, ref.getNotation());
+		
+		java.util.Iterator<String> iter=ref.getPropertyNames().iterator();
+		
+		while (iter.hasNext()) {
+			String name=iter.next();
+			getProperties().put(SRD_MODEL_PREFIX+name, ref.getProperty(name));
+		}
+	}
+	
+	/**
+	 * This method sets the source reference associated with the
+	 * referenced model object.
+	 * 
+	 * @param sref The source reference
+	 */
+	public void setSourceReference(SourceRef sref) {
+		getProperties().put(SOURCE_REF_COMPONENT_URI, sref.getComponentURI());
+		getProperties().put(SOURCE_REF_MODEL_OBJECT_URI, sref.getModelObjectURI());
+		getProperties().put(SOURCE_REF_START_POSITION, sref.getStartPosition());
+		getProperties().put(SOURCE_REF_END_POSITION, sref.getEndPosition());
+
+		java.util.Iterator<String> iter=sref.getProperties().keySet().iterator();
+		
+		while (iter.hasNext()) {
+			String name=iter.next();
+			getProperties().put(SRD_SRC_REF_PREFIX+name, sref.getProperties().get(name));
+		}
+	}
+
+	/**
+	 * This method is invoked to perform the resolution
+	 * on the identified model, associated with the model
+	 * object located using the supplied source reference
+	 * information. Further details regarding the issue
+	 * to be resolved is provided by the model issue -
+	 * although the 'model object' part of the model
+	 * issue may not be defined. This will have to be
+	 * recovered using the supplied model and source
+	 * reference.
+	 * 
+	 * @param ref The model reference
+	 * @param obj The source reference of the model object
+	 * @param issue The issue
+	 * @exception ResolutionException Failed to resolve
+	 */
+	@Override
+	public void resolve(ModelReference ref, SourceRef obj,
+					ModelIssue issue) throws ResolutionException {
+			
+		// Recover the model reference
+		ModelReference modelRef=new ModelReference(
+				(String)getProperties().get(MODEL_NAMESPACE),
+				(String)getProperties().get(MODEL_LOCALPART),
+				(String)getProperties().get(MODEL_LOCATED_ROLE),
+				(String)getProperties().get(MODEL_NOTATION));
+		
+		// Recover the source reference
+		SourceRef sref=new SourceRef();
+		sref.setComponentURI((String)getProperties().get(SOURCE_REF_COMPONENT_URI));
+		sref.setModelObjectURI((String)getProperties().get(SOURCE_REF_MODEL_OBJECT_URI));
+		sref.setStartPosition((Integer)getProperties().get(SOURCE_REF_START_POSITION));
+		sref.setEndPosition((Integer)getProperties().get(SOURCE_REF_END_POSITION));
+		
+		// Recover the properties for model and source ref
+		java.util.Iterator<String> iter=getProperties().keySet().iterator();
+		while (iter.hasNext()) {
+			String name=iter.next();
+			
+			if (name.startsWith(SRD_MODEL_PREFIX)) {
+				Object value=getProperties().get(name);
+				
+				name = name.substring(SRD_MODEL_PREFIX.length());
+				
+				modelRef.setProperty(name, value);
+			} else if (name.startsWith(SRD_SRC_REF_PREFIX)) {
+				Object value=getProperties().get(name);
+				
+				name = name.substring(SRD_SRC_REF_PREFIX.length());
+				
+				sref.getProperties().put(name, value);
+			}
+		}		
+		
+		// Find notation for the URI
+		org.scribble.model.Notation notation=
+				ResourceUtil.getNotation(modelRef.getNotation());
+		
+		if (notation != null) {
+			org.scribble.editor.EditorManager em=(org.scribble.editor.EditorManager)
+					org.scribble.extensions.RegistryFactory.getRegistry().getExtension(
+							org.scribble.editor.EditorManager.class, notation.getCode());
+						
+			if (em != null) {
+				try {
+					em.focus(modelRef, sref, issue.getProperties());
+				} catch(Exception e) {
+					logger.log(java.util.logging.Level.SEVERE,
+							"Failed to focus on model reference: "+modelRef, e);
+				}
+			}
+		}
+	}
+	
+	public int hashCode() {
+		return(0);
+	}
+	
+	public boolean equals(Object obj) {
+		return(obj instanceof ShowReferencedDescription);
+	}
+	
+	private static Logger logger = Logger.getLogger("org.scribble.model.resolutions");
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/resolutions/UpdateFromReferencedDescription.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/resolutions/UpdateFromReferencedDescription.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/resolutions/UpdateFromReferencedDescription.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,228 @@
+/*
+ * Copyright 2007-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 7 Sep 2008 : Initial version created by gary
+ */
+package org.scribble.model.resolutions;
+
+//import java.util.logging.Logger;
+
+import java.io.IOException;
+
+import org.scribble.model.*;
+import org.scribble.model.admin.DefaultModelListener;
+import org.scribble.model.admin.DefaultResolution;
+import org.scribble.model.admin.ModelInfo;
+import org.scribble.model.admin.ModelIssue;
+import org.scribble.model.change.*;
+
+/**
+ * This class represents a resolution for navigating to a referenced
+ * description.
+ *
+ */
+public class UpdateFromReferencedDescription extends DefaultResolution {
+
+	private static final String SOURCE_REF_END_POSITION = "sourceRefEndPosition";
+	private static final String SOURCE_REF_START_POSITION = "sourceRefStartPosition";
+	private static final String SOURCE_REF_MODEL_OBJECT_URI = "sourceRefModelObjectURI";
+	private static final String SOURCE_REF_COMPONENT_URI = "sourceRefComponentURI";
+	private static final String UFRD_SRC_REF_PREFIX = "_ufrdSrcRef_";
+	private static final String UFRD_MODEL_PREFIX = "_ufrdModel_";
+	private static final String MODEL_NOTATION = "modelNotation";
+	private static final String MODEL_LOCATED_ROLE = "modelLocatedRole";
+	private static final String MODEL_LOCALPART = "modelLocalpart";
+	private static final String MODEL_NAMESPACE = "modelNamespace";
+
+	/**
+	 * The default constructor for the 'show reference
+	 * description'.
+	 */
+	public UpdateFromReferencedDescription() {
+		setName(java.util.PropertyResourceBundle.getBundle(
+				"org.scribble.model.resolutions.Messages").
+					getString("_UPDATE_FROM_REFERENCED_DESCRIPTION_NAME"));
+		setDescription(java.util.PropertyResourceBundle.getBundle(
+				"org.scribble.model.resolutions.Messages").
+					getString("_UPDATE_FROM_REFERENCED_DESCRIPTION_DESC"));
+	}
+		
+	/**
+	 * This method sets the model's reference.
+	 * 
+	 * @param ref The model's reference
+	 */
+	public void setModel(ModelReference ref) {
+		getProperties().put(MODEL_NAMESPACE, ref.getNamespace());
+		getProperties().put(MODEL_LOCALPART, ref.getLocalpart());
+		getProperties().put(MODEL_LOCATED_ROLE, ref.getLocatedRole());
+		getProperties().put(MODEL_NOTATION, ref.getNotation());
+		
+		java.util.Iterator<String> iter=ref.getPropertyNames().iterator();
+		
+		while (iter.hasNext()) {
+			String name=iter.next();
+			getProperties().put(UFRD_MODEL_PREFIX+name, ref.getProperty(name));
+		}
+	}
+	
+	/**
+	 * This method sets the source reference associated with the
+	 * referenced model object.
+	 * 
+	 * @param sref The source reference
+	 */
+	public void setSourceReference(SourceRef sref) {
+		getProperties().put(SOURCE_REF_COMPONENT_URI, sref.getComponentURI());
+		getProperties().put(SOURCE_REF_MODEL_OBJECT_URI, sref.getModelObjectURI());
+		getProperties().put(SOURCE_REF_START_POSITION, sref.getStartPosition());
+		getProperties().put(SOURCE_REF_END_POSITION, sref.getEndPosition());
+
+		java.util.Iterator<String> iter=sref.getProperties().keySet().iterator();
+		
+		while (iter.hasNext()) {
+			String name=iter.next();
+			getProperties().put(UFRD_SRC_REF_PREFIX+name, sref.getProperties().get(name));
+		}
+	}
+
+	/**
+	 * This method is invoked to perform the resolution
+	 * on the identified model, associated with the model
+	 * object located using the supplied source reference
+	 * information. Further details regarding the issue
+	 * to be resolved is provided by the model issue -
+	 * although the 'model object' part of the model
+	 * issue may not be defined. This will have to be
+	 * recovered using the supplied model and source
+	 * reference.
+	 * 
+	 * @param ref The model reference
+	 * @param obj The source reference of the model object
+	 * @param issue The issue
+	 * @exception ResolutionException Failed to resolve
+	 */
+	@Override
+	public void resolve(ModelReference ref, SourceRef obj,
+					ModelIssue issue) throws ResolutionException {
+			
+		// Recover the model reference
+		ModelReference modelRef=new ModelReference(
+				(String)getProperties().get(MODEL_NAMESPACE),
+				(String)getProperties().get(MODEL_LOCALPART),
+				(String)getProperties().get(MODEL_LOCATED_ROLE),
+				(String)getProperties().get(MODEL_NOTATION));
+		
+		// Recover the source reference
+		SourceRef sref=new SourceRef();
+		sref.setComponentURI((String)getProperties().get(SOURCE_REF_COMPONENT_URI));
+		sref.setModelObjectURI((String)getProperties().get(SOURCE_REF_MODEL_OBJECT_URI));
+		sref.setStartPosition((Integer)getProperties().get(SOURCE_REF_START_POSITION));
+		sref.setEndPosition((Integer)getProperties().get(SOURCE_REF_END_POSITION));
+		
+		// Recover the properties for model and source ref
+		java.util.Iterator<String> iter=getProperties().keySet().iterator();
+		while (iter.hasNext()) {
+			String name=iter.next();
+			
+			if (name.startsWith(UFRD_MODEL_PREFIX)) {
+				Object value=getProperties().get(name);
+				
+				name = name.substring(UFRD_MODEL_PREFIX.length());
+				
+				modelRef.setProperty(name, value);
+			} else if (name.startsWith(UFRD_SRC_REF_PREFIX)) {
+				Object value=getProperties().get(name);
+				
+				name = name.substring(UFRD_SRC_REF_PREFIX.length());
+				
+				sref.getProperties().put(name, value);
+			}
+		}		
+		
+		org.scribble.model.admin.ModelRepository mrep=
+				(org.scribble.model.admin.ModelRepository)
+			org.scribble.extensions.RegistryFactory.getRegistry().getExtension(
+					org.scribble.model.admin.ModelRepository.class, null);
+
+		DefaultModelChangeContext context=
+					new DefaultModelChangeContext(ref,
+							ref.getLocatedRole()==null?null :
+								new Role(ref.getLocatedRole()));
+
+		// Retrieve source and reference models and identify
+		// the relevant model objects
+		
+		// NOTE: Should only really be one model that matches
+		// the reference - i.e. the source model reference, and
+		// therefore this single model should provide access
+		// to the required model object. If a model reference
+		// is abstract/derived, then it may provide multiple models
+		// that might incorrectly return a model object for the URI.
+		
+		java.util.List<ModelInfo> models=mrep.getModels(ref, new DefaultModelListener());
+		ModelObject toObj=null;
+		Model model=null;
+		
+		for (int i=0; toObj == null && i < models.size(); i++) {
+			model = models.get(i).getModel();
+			toObj = model.findModelObject(obj.getModelObjectURI());
+		}
+				
+		models = mrep.getModels(modelRef, new DefaultModelListener());
+		ModelObject fromObj=null;
+		Model refModel=null;
+		
+		for (int i=0; fromObj == null && i < models.size(); i++) {
+			refModel = models.get(i).getModel();
+			fromObj = refModel.findModelObject(sref.getModelObjectURI());
+		}
+
+		boolean f_updated=false;
+		
+		if (model != null && fromObj != null && toObj != null) {
+
+			if (f_updated=context.update(model, fromObj, toObj)) {
+			
+				try {
+					// Update the model
+					mrep.updateModel(ref, model);
+				} catch (IOException e) {
+					throw new ResolutionException(java.util.PropertyResourceBundle.getBundle(
+								"org.scribble.model.resolutions.Messages").
+								getString("_COULD_NOT_SAVE"));
+				}
+			}
+		}
+		
+		if (f_updated == false) {
+			throw new ResolutionException(java.util.PropertyResourceBundle.getBundle(
+					"org.scribble.model.resolutions.Messages").
+					getString("_COULD_NOT_UPDATE"));
+		}
+	}
+	
+	public int hashCode() {
+		return(0);
+	}
+	
+	public boolean equals(Object obj) {
+		return(obj instanceof UpdateFromReferencedDescription);
+	}
+	
+	//private static Logger logger = Logger.getLogger("org.scribble.model.resolutions");
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/types/DefaultTypeResolver.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/types/DefaultTypeResolver.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/types/DefaultTypeResolver.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,105 @@
+/*
+ * Copyright 2005-9 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 25 Jan 2009 : Initial version created by gary
+ */
+package org.scribble.model.types;
+
+import org.scribble.extensions.RegistryInfo;
+import org.scribble.model.*;
+
+/**
+ * This interface provides type reference resolution
+ * capabilities.
+ */
+ at RegistryInfo(extension=TypeResolver.class)
+public class DefaultTypeResolver implements TypeResolver {
+
+	/**
+	 * This method returns the type reference associated
+	 * with the supplied model object.
+	 * 
+	 * @param modelObject The model object
+	 * @return The type reference associated with the
+	 * 			model object, or null if unknown
+	 */
+	public TypeReference resolve(ModelObject modelObject) {
+		TypeReference ret=null;
+		
+		java.util.List<Object> typeResolverRules=
+			org.scribble.extensions.RegistryFactory.getRegistry().getExtensions(
+						TypeResolverRule.class, null);
+
+		for (int i=0; ret == null &&
+					i < typeResolverRules.size(); i++) {
+			TypeResolverRule resolver=(TypeResolverRule)
+						typeResolverRules.get(i);
+			
+			if (resolver.isSupported(modelObject)) {
+				ret = resolver.resolve(modelObject);
+			}
+		}
+
+		return(ret);
+	}
+
+	/**
+	 * This method resolves additional type information about the
+	 * supplied model object.
+	 * 
+	 * @param modelObject The model object
+	 * @return The set of type information associated with the
+	 * 					supplied type reference
+	 */
+	public java.util.Set<TypeInformation> getTypeInformation(ModelObject modelObject) {
+		java.util.Set<TypeInformation> ret=null;
+		Model model=null;
+		
+		// Derive model from the supplied model object
+		ModelObject cur=modelObject;
+		
+		while (cur != null && model == null) {
+			if (cur instanceof Model) {
+				model = (Model)cur;
+			} else {
+				cur = cur.getParent();
+			}
+		}
+		
+		// Resolve type reference for model object
+		TypeReference tref=resolve(modelObject);
+		
+		if (tref != null && model != null) {
+			java.util.List<Object> tsysList=
+				org.scribble.extensions.RegistryFactory.getRegistry().getExtensions(
+							TypeSystem.class, null);
+			
+			for (int i=0; ret == null && i < tsysList.size(); i++) {
+				TypeSystem tsys=(TypeSystem)tsysList.get(i);
+				
+				ret = tsys.getInformation(model, tref);
+			}
+		}
+	
+		if (ret == null) {
+			ret = new java.util.HashSet<TypeInformation>();
+		}
+		
+		return(ret);
+	}
+	
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/types/TypeInformation.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/types/TypeInformation.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/types/TypeInformation.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,65 @@
+/*
+ * Copyright 2005-9 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 25 Jan 2009 : Initial version created by gary
+ */
+package org.scribble.model.types;
+
+public class TypeInformation {
+
+	/**
+	 * This method returns the type system associated with
+	 * the type information.
+	 * 
+	 * @return The type system
+	 */
+	public TypeSystem getTypeSystem() {
+		return(m_typeSystem);
+	}
+
+	/**
+	 * This method sets the type system.
+	 * 
+	 * @param tsys The type system
+	 */
+	public void setTypeSystem(TypeSystem tsys) {
+		m_typeSystem = tsys;
+	}
+	
+	/**
+	 * This method determines if the type, associated with this
+	 * reference, is a boolean.
+	 * 
+	 * @return Whether the referenced type is a boolean
+	 */
+	public boolean isBoolean() {
+		return(m_boolean);
+	}
+	
+	/**
+	 * This method sets whether the referenced type is
+	 * a boolean.
+	 * 
+	 * @param bool Whether the referenced type is a boolean
+	 */
+	public void setBoolean(boolean bool) {
+		m_boolean = bool;
+	}
+	
+	private TypeSystem m_typeSystem=null;
+	private boolean m_boolean=false;
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/types/TypeResolver.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/types/TypeResolver.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/types/TypeResolver.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,50 @@
+/*
+ * Copyright 2005-9 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 25 Jan 2009 : Initial version created by gary
+ */
+package org.scribble.model.types;
+
+import org.scribble.model.*;
+
+/**
+ * This interface provides type reference resolution
+ * capabilities.
+ */
+public interface TypeResolver {
+
+	/**
+	 * This method returns the type reference associated
+	 * with the supplied model object.
+	 * 
+	 * @param modelObject The model object
+	 * @return The type reference associated with the
+	 * 			model object, or null if unknown
+	 */
+	public TypeReference resolve(ModelObject modelObject);
+	
+	/**
+	 * This method resolves additional type information about the
+	 * supplied model object.
+	 * 
+	 * @param modelObject The model object
+	 * @return The set of type information associated with the
+	 * 					supplied type reference
+	 */
+	public java.util.Set<TypeInformation> getTypeInformation(ModelObject modelObject);
+	
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/types/TypeResolverRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/types/TypeResolverRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/types/TypeResolverRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,49 @@
+/*
+ * Copyright 2005-9 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 25 Jan 2009 : Initial version created by gary
+ */
+package org.scribble.model.types;
+
+import org.scribble.model.*;
+
+/**
+ * This interface provides type reference resolution
+ * rule.
+ */
+public interface TypeResolverRule {
+
+	/**
+	 * This method determines if the type resolver rule
+	 * is appropriate for the supplied model object.
+	 * 
+	 * @param modelObject The model object
+	 * @return Whether the rule is appropriate
+	 */
+	public boolean isSupported(ModelObject modelObject);
+	
+	/**
+	 * This method returns the type reference associated
+	 * with the supplied model object.
+	 * 
+	 * @param modelObject The model object
+	 * @return The type reference associated with the
+	 * 			model object, or null if unknown
+	 */
+	public TypeReference resolve(ModelObject modelObject);
+	
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/types/TypeSystem.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/types/TypeSystem.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/types/TypeSystem.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,50 @@
+/*
+ * Copyright 2005-9 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 25 Jan 2009 : Initial version created by gary
+ */
+package org.scribble.model.types;
+
+import org.scribble.model.*;
+
+/**
+ * This interface represents functionality associated with a type
+ * system.
+ */
+public interface TypeSystem {
+
+	/**
+	 * This method returns the name of the type system.
+	 * 
+	 * @return The type system
+	 */
+	public String getName();
+	
+	/**
+	 * This method resolves additional information about the
+	 * supplied type. The information is obtained using binding
+	 * information defined in the supplied model.
+	 * 
+	 * @param model The model
+	 * @param type The type
+	 * @return The set of type information associated with the
+	 * 					supplied type reference
+	 */
+	public java.util.Set<TypeInformation> getInformation(Model model,
+							TypeReference type);
+	
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/util/InteractionUtil.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/util/InteractionUtil.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/model/util/InteractionUtil.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,113 @@
+/*
+ * Copyright 2007 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 28 Oct 2007 : Initial version created by gary
+ */
+package org.scribble.model.util;
+
+import org.scribble.model.*;
+
+/**
+ * This class provides utility functions related to
+ * interactions.
+ * 
+ */
+public class InteractionUtil {
+
+	/**
+	 * This method returns the list of initial interactions associated with the supplied
+	 * definition.
+	 * 
+	 * @param defn The definition
+	 * @return The list of initial interactions
+	 */
+	public static java.util.List<Interaction> getInitialInteractions(Definition defn) {
+		java.util.List<Interaction> ret=new java.util.Vector<Interaction>();
+		
+		// Find first behaviour in the block
+		for (int i=0; i < defn.getBlock().getContents().size(); i++) {
+			if (defn.getBlock().getContents().get(i) instanceof Behaviour) {
+				findInitialInteractions((Behaviour)defn.getBlock().getContents().get(i),
+									ret);
+				break;
+			}
+		}		
+		
+		return(ret);
+	}
+	
+	protected static void findInitialInteractions(Behaviour behaviour,
+								java.util.List<Interaction> interactions) {
+		if (behaviour instanceof Interaction) {
+			interactions.add((Interaction)behaviour);
+		} else if (behaviour instanceof SinglePathBehaviour) {
+			SinglePathBehaviour spb=(SinglePathBehaviour)behaviour;
+			
+			// Find first behaviour in the block
+			for (int i=0; i < spb.getBlock().getContents().size(); i++) {
+				if (spb.getBlock().getContents().get(i) instanceof Behaviour) {
+					findInitialInteractions((Behaviour)spb.getBlock().getContents().get(i),
+										interactions);
+				}
+			}
+			
+			if (spb.isConditional()) {
+				// TODO: Process behaviour following the single behaviour path
+				
+			}
+		} else if (behaviour instanceof MultiPathBehaviour) {
+			MultiPathBehaviour mpb=(MultiPathBehaviour)behaviour;
+			
+			// Scan the multiple paths
+			for (int i=0; i < mpb.getPaths().size(); i++) {
+				Block path=mpb.getPaths().get(i);
+				
+				for (int j=0; j < path.getContents().size(); j++) {
+					if (path.getContents().get(j) instanceof Behaviour) {
+						findInitialInteractions((Behaviour)path.getContents().get(j),
+											interactions);
+						break;
+					}
+				}
+			}
+		}
+	}
+	
+	/**
+	 * This method determines whether this is an initial interaction
+	 * associated with the definition.
+	 * 
+	 * @param interaction The interaction
+	 * @return Whether the interaction is an initial in the definition
+	 */
+	public static boolean isInitialInteraction(Interaction interaction) {
+		boolean ret=false;
+		
+		// Get definition
+		Definition defn=interaction.getEnclosingDefinition();
+		
+		// Check if top level
+		if (defn.getParent() instanceof Model) {
+			java.util.List<Interaction> interactions=
+				org.scribble.model.util.InteractionUtil.getInitialInteractions(defn);
+			
+			ret = interactions.contains(interaction);
+		}
+		
+		return(ret);
+	}	
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/osgi/Activator.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/osgi/Activator.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/osgi/Activator.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,82 @@
+/*
+ * Copyright 2007 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 16 Oct 2007 : Initial version created by gary
+ */
+package org.scribble.osgi;
+
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+import org.scribble.extensions.OSGiRegistry;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class Activator implements BundleActivator {
+
+	// The plug-in ID
+	public static final String PLUGIN_ID = "org.scribble";
+
+	// The shared instance
+	private static Activator plugin;
+	
+	/**
+	 * The constructor
+	 */
+	public Activator() {
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+	 */
+	public void start(BundleContext context) throws Exception {
+		plugin = this;
+		
+		// Create the OSGiRegistry
+		OSGiRegistry registry=new OSGiRegistry(context);
+		registry.initialize();
+		
+		org.scribble.extensions.RegistryFactory.setRegistry(registry);
+		
+		// Initialize model repository and dependency manager
+		org.scribble.extensions.RegistryFactory.getRegistry().getExtension(
+					org.scribble.model.admin.ModelRepository.class,
+								null);
+
+		org.scribble.extensions.RegistryFactory.getRegistry().getExtension(
+					org.scribble.model.admin.DependencyManager.class, null);
+	}
+	
+	/*
+	 * (non-Javadoc)
+	 * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+	 */
+	public void stop(BundleContext context) throws Exception {
+		plugin = null;
+	}
+
+	/**
+	 * Returns the shared instance
+	 *
+	 * @return the shared instance
+	 */
+	public static Activator getDefault() {
+		return plugin;
+	}
+
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/parser/AbstractImplementsReferenceParserRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/parser/AbstractImplementsReferenceParserRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/parser/AbstractImplementsReferenceParserRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,166 @@
+/*
+ * Copyright 2007-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 1 Feb 2008 : Initial version created by gary
+ */
+package org.scribble.parser;
+
+import org.scribble.model.*;
+import org.scribble.model.admin.ModelIssue;
+import org.scribble.model.admin.ModelListener;
+
+/**
+ * This class provides the parser rule for the Implements Reference
+ * between a global model and a local model.
+ */
+public abstract class AbstractImplementsReferenceParserRule extends AbstractModelReferenceParserRule {
+
+	/**
+	 * This is the default constructor.
+	 */
+	public AbstractImplementsReferenceParserRule() {
+		super(true);
+	}
+	
+	/**
+	 * This method returns the class associated with the
+	 * concrete model reference.
+	 * 
+	 * @return The model reference class
+	 */
+	protected Class<?> getReferenceClass() {
+		return(ImplementsReference.class);
+	}
+
+	/**
+	 * This method instantiates an instance of the model
+	 * reference.
+	 * 
+	 * @param context The parser context
+	 * @param l The model listener
+	 * @return The instantiated model reference
+	 */
+	protected ModelReference createReference(ParserContext context, ModelListener l) {
+		return(new ImplementsReference(getNotation(context, l)));
+	}
+	
+	/**
+	 * This method returns the notation that should be used for the
+	 * 'implements' reference.
+	 * 
+	 * @param context The parser context
+	 * @param l The model listener
+	 * @return The notation code
+	 */
+	protected abstract String getNotation(ParserContext context, ModelListener l);
+
+	/**
+	 * This method parses the description to obtain
+	 * a model object of the appropriate type.
+	 * 
+	 * @param context The context
+	 * @param l The listener
+	 * @return The model object
+	 */
+	public Object parse(ParserContext context, ModelListener l) {
+		Object ret=super.parse(context, l);
+		
+		if (ret instanceof ImplementsReference) {
+			ImplementsReference ref=(ImplementsReference)ret;
+		
+			Token t=context.lookahead(0);
+			
+			if (t.isToken("(", TokenType.Symbol)) {
+				boolean f_error=false;
+				
+				do {
+					// Consume token
+					context.nextToken();
+					
+					// Read next token, which should be an identifier
+					t = context.lookahead(0);
+				
+					if (t.getType() == TokenType.Identifier) {
+						String main=null;
+						String binding=null;
+						
+						// Consume token
+						context.nextToken();
+					
+						main = t.getText();
+						
+						t = context.lookahead(0);
+						
+						if (t.isToken("for", TokenType.Keyword)) {
+							
+							context.nextToken();
+							
+							t = context.lookahead(0);
+							
+							if (t.getType() == TokenType.Identifier) {
+								
+								context.nextToken();
+								
+								binding = t.getText();
+							} else {
+								l.error(new ModelIssue(t, java.util.PropertyResourceBundle.getBundle(
+										"org.scribble.parser.Messages").
+											getString("_EXPECTING_IDENTIFIER")));
+								f_error = true;
+							}
+						} else {
+							l.error(new ModelIssue(t,
+									org.scribble.util.MessageUtil.format(
+											java.util.PropertyResourceBundle.getBundle(
+													"org.scribble.parser.Messages"),
+											"_EXPECTING_KEYWORD",
+											new String[]{"for"})));
+							f_error = true;
+						}
+						
+						if (main != null && binding != null) {
+							ref.getNameMapping().put(binding, main);
+						}
+					} else {
+						l.error(new ModelIssue(t, java.util.PropertyResourceBundle.getBundle(
+							"org.scribble.parser.Messages").
+							getString("_EXPECTING_IDENTIFIER")));
+						f_error = true;
+					}
+					
+					t = context.lookahead(0);
+				
+				} while (f_error == false &&
+						t.isToken(ParserConstants.LIST_SEPARATOR,
+								TokenType.Symbol));			
+				
+				if (t.isToken(")", TokenType.Symbol)) {
+					
+					ref.getSource().setEndPosition(t.getSource().getEndPosition());
+					
+					context.nextToken();
+				} else {
+					l.error(new ModelIssue(t, java.util.PropertyResourceBundle.getBundle(
+							"org.scribble.parser.Messages").
+							getString("_EXPECTING_PARAMETER_LIST_DELIMITER")));
+				}
+			}
+		}
+		
+		return(ret);
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/parser/AbstractModelParserRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/parser/AbstractModelParserRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/parser/AbstractModelParserRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,150 @@
+/*
+ * Copyright 2007 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 21 Oct 2007 : Initial version created by gary
+ */
+package org.scribble.parser;
+
+import org.scribble.model.*;
+import org.scribble.model.admin.ModelListener;
+
+/**
+ * This class provides the generic parsing for the model class.
+ * Specific notations specialise the class to parse the specific
+ * notation.
+ */
+public abstract class AbstractModelParserRule extends AbstractParserRule {
+
+	/**
+	 * The default constructor.
+	 */
+	public AbstractModelParserRule() {
+		super(ParserRuleType.File);
+	}
+	
+	/**
+	 * This method determines whether the parser rules is
+	 * appropriate to return a model object of the required
+	 * type.
+	 * 
+	 * @param type The required type
+	 * @return Whether the parser rule returns a
+	 * 				model object of the required type
+	 */
+	public boolean isSupported(Class<?> type) {
+		return(type.isAssignableFrom(Model.class));
+	}
+	
+	/**
+	 * This method creates the initial empty model.
+	 * 
+	 * @return The model
+	 */
+	protected abstract Model createModel();
+
+	/**
+	 * This method parses the description to obtain
+	 * a model object of the appropriate type.
+	 * 
+	 * @param context The context
+	 * @param l The listener
+	 * @return The model object
+	 */
+	public Object parse(ParserContext context, ModelListener l) {
+		Model ret=createModel();
+		
+		// Parse namespace
+		ret.setNamespace((Namespace)context.parse(Namespace.class, l));
+		
+		// Parse model header items
+		Token t=context.lookahead(0);
+		boolean parsed=true;
+		
+		while (parsed && t.getType() == TokenType.Keyword &&
+				isDefinitionKeyword(t.getText()) == false) {
+			Token prev = context.lookahead(0);
+
+			parseModelHeaderItem(context, l, ret);
+			
+			t = context.lookahead(0);
+			
+			if (t == prev) {
+				parsed = false;
+				
+				do {
+					t = context.nextToken();
+					
+				} while (t.getType() != TokenType.EndOfLine &&
+						t.getType() != TokenType.EndOfFile);
+				
+				t = context.lookahead(0);
+			}
+		}
+		
+		// Parse the model
+		parseModelBody(context, l, ret);
+		
+		return(ret);
+	}
+	
+	/**
+	 * This method determines whether the keyword is associated
+	 * with the model.
+	 * 
+	 * @param keyword The model keyword
+	 * @return Whether the keyword is associated with the definition
+	 */
+	protected abstract boolean isDefinitionKeyword(String keyword);
+
+	/**
+	 * This method parsers the model header items.
+	 * 
+	 * @param context The context
+	 * @param l The model listener
+	 * @param model The model
+	 * @return The item has been parsed
+	 */
+	protected boolean parseModelHeaderItem(ParserContext context,
+			ModelListener l, Model model) {
+		boolean ret=false;
+		
+		Token t = context.lookahead(0);
+		
+		if (t.isToken("import", TokenType.Keyword)) {
+			ret = true;
+			
+			Import imp=(Import)context.parse(Import.class, l);
+		
+			if (imp != null) {
+				model.getImports().add(imp);
+			}
+		}
+		
+		return(ret);
+	}
+	
+	/**
+	 * This method parsers the model body.
+	 * 
+	 * @param context The context
+	 * @param l The model listener
+	 * @param model The model
+	 */
+	protected abstract void parseModelBody(ParserContext context,
+			ModelListener l, Model model);
+	
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/parser/AbstractModelReferenceParserRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/parser/AbstractModelReferenceParserRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/parser/AbstractModelReferenceParserRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,194 @@
+/*
+ * Copyright 2007 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 24 Oct 2007 : Initial version created by gary
+ */
+package org.scribble.parser;
+
+import org.scribble.model.*;
+import org.scribble.model.admin.ModelIssue;
+import org.scribble.model.admin.ModelListener;
+
+/**
+ * This class provides the parser rule for the Type Reference.
+ */
+public abstract class AbstractModelReferenceParserRule extends AbstractParserRule {
+
+	/**
+	 * This is the default constructor.
+	 */
+	public AbstractModelReferenceParserRule(boolean located) {
+		super(ParserRuleType.Clause);
+		
+		m_located = located;
+	}
+	
+	/**
+	 * This method determines whether the parser rules is
+	 * appropriate to return a model object of the required
+	 * type.
+	 * 
+	 * @param type The required type
+	 * @return Whether the parser rule returns a
+	 * 				model object of the required type
+	 */
+	public boolean isSupported(Class<?> type) {
+		return(type.isAssignableFrom(getReferenceClass()));
+	}
+
+	/**
+	 * This method returns whether the model reference parser
+	 * should check for a located role.
+	 * 
+	 * @return Whether model reference may be located
+	 */
+	protected boolean isLocated() {
+		return(m_located);
+	}
+	
+	/**
+	 * This method returns the class associated with the
+	 * concrete model reference.
+	 * 
+	 * @return The model reference class
+	 */
+	protected abstract Class<?> getReferenceClass();
+
+	/**
+	 * This method instantiates an instance of the model
+	 * reference.
+	 * 
+	 * @param context The parser context
+	 * @param l The model listener
+	 * @return The instantiated model reference
+	 */
+	protected abstract ModelReference createReference(ParserContext context, ModelListener l);
+	
+	/**
+	 * This method parses the description to obtain
+	 * a model object of the appropriate type.
+	 * 
+	 * @param context The context
+	 * @param l The listener
+	 * @return The model object
+	 */
+	public Object parse(ParserContext context, ModelListener l) {
+		ModelReference ret=null;
+		
+		Token t=context.nextToken();
+		
+		if (t.getType() == TokenType.Identifier) {
+			int startpos=t.getSource().getStartPosition();
+
+			ret = createReference(context, l);
+			
+			//ret.setAlias(buf.toString());
+			int endpos = parseReference(context, l, t, ret);
+			
+			// Check if reference could be located
+			t = context.lookahead(0);
+			
+			if (isLocated() && t.isToken(ModelReference.LOCATED_REFERENCE_SEPARATOR,
+								TokenType.Symbol)) {
+				context.nextToken();
+				
+				t = context.lookahead(0);
+				
+				if (t.getType() == TokenType.Identifier) {
+					endpos = t.getSource().getEndPosition();
+					
+					context.nextToken();
+					
+					// TODO: Should this be role object
+					// rather than string - would need to move
+					// Role class from protocol to core??
+					// Not sure if should be role object
+					// on reference, but should possibly should
+					// have option for validating role.
+					
+					ret.setLocatedRole(t.getText());
+				} else {
+					l.error(new ModelIssue(t, java.util.PropertyResourceBundle.getBundle(
+							"org.scribble.parser.Messages").
+								getString("_EXPECTING_ROLE_NAME")));
+				}
+			}
+			
+			// Resolve reference
+			// 30/1/08: Now done by code retrieving the reference, so that it
+			// can register the appropriate dependency type
+			//resolveReference(context, l, ret);
+			
+			ret.getSource().setStartPosition(startpos);
+			ret.getSource().setEndPosition(endpos);
+		} else {
+			l.error(new ModelIssue(t, java.util.PropertyResourceBundle.getBundle(
+						"org.scribble.parser.Messages").
+						getString("_EXPECTING_IDENTIFIER")));
+		}
+		
+		return(ret);
+	}
+	
+	protected int parseReference(ParserContext context, ModelListener l,
+			Token initialToken, ModelReference ref) {
+		int ret=initialToken.getSource().getEndPosition();
+		StringBuffer namespace=new StringBuffer();
+		Token prevToken=initialToken;
+		
+		// Check if next token is a '.'
+		Token t=context.lookahead(0);
+		boolean f_error=false;
+		
+		while (f_error==false && t.isToken(".", TokenType.Symbol)) {
+			
+			context.nextToken();
+			
+			t = context.nextToken();
+			
+			if (t.getType() == TokenType.Identifier) {
+			
+				if (namespace.length() > 0) {
+					namespace.append(".");
+				}
+				namespace.append(prevToken.getText());
+				
+				prevToken = t;
+				
+				t = context.lookahead(0);
+				
+				ret = t.getSource().getEndPosition();
+				
+			} else {
+				f_error = true;
+			}
+		}
+		
+		if (namespace.length() == 0) {
+			ref.setAlias(prevToken.getText());
+		} else {
+			ref.setNamespace(namespace.toString());
+			ref.setLocalpart(prevToken.getText());
+			
+			ref.setFullyQualified(true);
+		}
+		
+		return(ret);
+	}
+	
+	private boolean m_located=false;
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/parser/AbstractParserRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/parser/AbstractParserRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/parser/AbstractParserRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,378 @@
+/*
+ * Copyright 2007 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 22 Oct 2007 : Initial version created by gary
+ */
+package org.scribble.parser;
+
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+import org.scribble.model.*;
+import org.scribble.model.admin.DependencyType;
+import org.scribble.model.admin.ModelIssue;
+import org.scribble.model.admin.ModelListener;
+
+/**
+ * This class is the abstract parser rule.
+ */
+public abstract class AbstractParserRule implements ParserRule {
+
+	/**
+	 * This constructor initializes the parser rule type.
+	 * 
+	 * @param type The parser rule type
+	 */
+	public AbstractParserRule(ParserRuleType type) {
+		m_type = type;
+	}
+	
+	/**
+	 * This method returns the parser rule type.
+	 * 
+	 * @return The parser rule type
+	 */
+	public ParserRuleType getType() {
+		return(m_type);
+	}
+	
+	/**
+	 * This method parses a group of model objects contained within
+	 * a block delimited by curly braces.
+	 * 
+	 * @param context The context
+	 * @param l The model listener
+	 * @param block The block to add the model objects
+	 * @param isolatedState The group should be parsed within an
+	 * 					isolated scope
+	 * @return The number of model objects added
+	 */
+	protected int parseGroup(ParserContext context, ModelListener l,
+					Block block, boolean isolatedState) {
+		int ret=0;
+		
+		// Store current state
+		if (isolatedState) {
+			context.pushState();
+		}
+		
+		Token t=context.nextToken();
+		
+		//if (t.isToken(ParserConstants.BLOCK_START, TokenType.Symbol)) {
+		if (t.getType() == TokenType.StartOfBlock) {
+			Token errorStart=null;
+			Token errorEnd=null;
+			
+			block.getSource().setStartPosition(t.getSource().getStartPosition());
+			
+			// Remove 'end of line' tokens
+			while ((t = context.lookahead(0)).getType() ==
+								TokenType.EndOfLine) {
+				context.nextToken();
+			}
+			
+			// Iterate until end of group reported			
+			while (//t.isToken(ParserConstants.BLOCK_END, TokenType.Symbol) == false &&
+					t.getType() != TokenType.EndOfBlock &&
+					context.moreTokens()) {
+						
+				Object obj=context.parse(Activity.class, l);
+				
+				if (obj instanceof Activity) {
+					block.getContents().add((Activity)obj);
+					ret++;
+					
+					// Check if previous error token was identified
+					if (errorStart != null) {
+						Token errorToken=new Token("", TokenType.Identifier,
+								errorStart.getSource().getStartPosition(),
+								errorEnd.getSource().getEndPosition());
+						
+						l.error(new ModelIssue(errorToken,
+								org.scribble.util.MessageUtil.format(
+										java.util.PropertyResourceBundle.getBundle(
+												"org.scribble.parser.Messages"),
+										"_EXPECTING_ACTIVITY",
+										new String[]{errorStart.getText()})));
+						
+						errorStart = null;
+						errorEnd = null;
+					}
+				} else {
+					
+					if (errorStart == null) {
+						errorStart = context.lookahead(0);
+					}
+					
+					// Move to next token
+					errorEnd = context.nextToken();
+				}
+				
+				/* GPB: 25/3/08 - not sure need end of line check
+				 * just move to next token if component not found
+				if (obj == null) {
+					
+					// Need to consume up to next terminator
+					// NOTE: Must also consume the terminator
+					// as this would normally be done as part of
+					// parsing the specific line or group type.
+					Token terminator=context.nextToken();
+					while (//terminator.isToken(ParserConstants.BLOCK_END, TokenType.Symbol) == false &&
+							//terminator.isToken(ParserConstants.LINE_TERMINATOR, TokenType.Symbol) == false &&
+							terminator.getType() != TokenType.EndOfBlock &&
+							terminator.getType() != TokenType.EndOfLine &&
+							terminator.getType() != TokenType.EndOfFile) {
+						terminator = context.nextToken();
+					}
+		
+					l.error(preActivity,
+							"Expecting an activity, but found '"+
+							preActivity.getText()+"'", null);
+				}
+				*/
+		
+				// Remove 'end of line' tokens
+				while ((t = context.lookahead(0)).getType() ==
+									TokenType.EndOfLine) {
+					context.nextToken();
+				}
+			}
+			
+			if (t.getType() == TokenType.EndOfBlock) {
+				context.nextToken();
+			} else if (context.moreTokens() == false) {
+				l.error(new ModelIssue(t, "Missing '"+ParserConstants.BLOCK_END+"'"));
+			}
+
+			block.getSource().setEndPosition(t.getSource().getEndPosition());
+			
+		} else {
+			l.error(new ModelIssue(t, "Expecting '"+ParserConstants.BLOCK_START+"'"));
+		}
+		
+		// Pop state
+		if (isolatedState) {
+			context.popState();
+		}
+		
+		return(ret);
+	}
+	
+	/**
+	 * This method resolves the supplied model reference, using the import
+	 * information defined in the definition.
+	 * 
+	 * @param context The parser context
+	 * @param l The model listener
+	 * @param ref The model reference to be resolved
+	 */
+	public static void resolveReference(ParserContext context, ModelListener l,
+								ModelReference ref, DependencyType dependencyType) {
+		java.util.List<String> namespacesToMonitor=new java.util.Vector<String>();
+		
+		if (logger.isLoggable(Level.FINEST)) {
+			logger.finest("Resolve reference: "+ref+" dependency="+dependencyType);
+		}
+		
+		// Use the import information in the definition (available via
+		// the context) to locate the referenced definition
+		// TODO: model repository needs an existence operation
+		// TODO: iterate through list of imports - if namespace.* then
+		// test the namespace with the alias to see if locates a definition
+		// else if namespace.localpart, where localpart is the same as
+		// the alias - or the alias is associated with the import.
+		// Else check the local namespace.
+		
+		// NOTE: parsing is to resolve the reference, not report on whether
+		// the definition is found - this should be the task of the
+		// validation rule
+		
+		org.scribble.model.admin.ModelRepository mrep=
+			(org.scribble.model.admin.ModelRepository)
+			org.scribble.extensions.RegistryFactory.getRegistry().getExtension(
+					org.scribble.model.admin.ModelRepository.class,
+								null/*ref.getNotation()*/);
+		
+		org.scribble.model.admin.DependencyManager dm=
+			(org.scribble.model.admin.DependencyManager)
+			org.scribble.extensions.RegistryFactory.getRegistry().getExtension(
+					org.scribble.model.admin.DependencyManager.class, null);
+		
+		if (mrep != null && ref.isResolved() == false) {
+			boolean f_end=false;
+			
+			// Need to check local namespace
+			ModelReference tmpref=new ModelReference(context.getSource().getNamespace(),
+					ref.getAlias(), ref.getLocatedRole(), ref.getNotation());
+			
+			mrep.locate(tmpref, context.getSource());
+	
+			boolean f_exists=mrep.exists(tmpref, context.getSource());
+			
+			// Check if local reference
+			if (f_exists == false && tmpref.getLocatedRole() != null) {
+				tmpref.setLocatedRole(null);
+			
+				// If global model exists
+				f_exists = mrep.exists(tmpref, context.getSource());
+			}
+			
+			if (f_exists == false && ref.useImplementations()) {
+				
+				if (dm != null) {
+					java.util.List<ModelReference> impls=
+							dm.getDependents(tmpref, DependencyType.Implements);
+					
+					if (logger.isLoggable(Level.FINEST)) {
+						logger.finest("Checking for implements dependent: "+impls.size());
+					}
+					
+					for (int i=0; f_exists == false &&
+								i < impls.size(); i++) {
+						f_exists = mrep.exists(impls.get(i), context.getSource());
+					}
+				}				
+			}
+	
+			if (f_exists) {
+				ref.setNamespace(context.getSource().getNamespace());
+				ref.setLocalpart(ref.getAlias());
+				
+				f_end = true;
+			} else {
+				namespacesToMonitor.add(context.getSource().getNamespace());
+			}
+			
+			if (logger.isLoggable(Level.FINEST)) {
+				logger.finest("Number of imports="+context.getImports().size());
+			}
+			
+			// Check imports
+			for (int i=0; f_end == false &&
+						i < context.getImports().size(); i++) {
+				Import imp=context.getImports().get(i);
+				
+				if (logger.isLoggable(Level.FINEST)) {
+					logger.finest("Checking import: "+imp.getName());
+				}
+	
+				if (imp.getName() != null) {
+					int ind=imp.getName().lastIndexOf('.');
+					String lastelem=null;
+					String firstpart=null;
+					
+					if (ind == -1) {
+						firstpart = "";
+						lastelem = imp.getName();
+					} else {
+						firstpart = imp.getName().substring(0, ind);
+						lastelem = imp.getName().substring(ind+1);
+					}
+					
+					if (lastelem.equals("*")) {
+						// Wildcard, so will need to check repository
+						
+						tmpref = new ModelReference(firstpart,
+								ref.getAlias(), ref.getLocatedRole(),
+								ref.getNotation());
+						
+						mrep.locate(tmpref, context.getSource());
+	
+						f_exists=mrep.exists(tmpref, context.getSource());
+						
+						// Check if local reference
+						if (f_exists == false && tmpref.getLocatedRole() != null) {
+							tmpref.setLocatedRole(null);
+						
+							// If global model exists
+							f_exists = mrep.exists(tmpref, context.getSource());
+						}
+						
+						if (f_exists == false && ref.useImplementations()) {
+													
+							if (dm != null) {
+								java.util.List<ModelReference> impls=
+										dm.getDependents(tmpref, DependencyType.Implements);
+								
+								if (logger.isLoggable(Level.FINEST)) {
+									logger.finest("Checking for implements dependent: "+impls.size());
+								}
+	
+								for (int j=0; f_exists == false &&
+											j < impls.size(); j++) {
+									f_exists = mrep.exists(impls.get(j),
+											context.getSource());
+								}
+							}				
+						}
+						
+						if (f_exists) {
+							
+							ref.setNamespace(firstpart);
+							ref.setLocalpart(ref.getAlias());
+							
+							f_end = true;
+						} else {
+							if (logger.isLoggable(Level.FINEST)) {
+								logger.finest("Monitor namespace: "+firstpart);
+							}
+							
+							namespacesToMonitor.add(firstpart);
+						}
+						
+					} else if ((imp.getAlias() != null &&
+							imp.getAlias().equals(ref.getAlias())) ||
+							(imp.getAlias() == null &&
+							lastelem.equals(ref.getAlias()))) {
+						ref.setNamespace(firstpart);
+						ref.setLocalpart(lastelem);
+						
+						if (logger.isLoggable(Level.FINEST)) {
+							logger.finest("Resolved from specific import: "+ref);
+						}
+	
+						f_end = true;
+					}	
+				}
+			}
+			
+			// Check if reference was resolved
+			if (ref.isResolved() == false) {
+				if (logger.isLoggable(Level.FINEST)) {
+					logger.finest("Not resolved - add namespaces to monitor: "+
+							namespacesToMonitor);
+				}
+				
+				ref.setProperty(ModelReference.NAMESPACES_TO_MONITOR,
+									namespacesToMonitor);
+			}
+		}
+
+		if (mrep != null) {
+			mrep.locate(ref, context.getSource());			
+		}
+		
+		// Establish dependency on the reference
+		if (dm != null) {
+			dm.recordDependency(context.getSource(), ref, dependencyType);
+		}		
+	}
+	
+	private static Logger logger = Logger.getLogger("org.scribble.parser");
+
+	private ParserRuleType m_type=null;
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/parser/ChannelListParserRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/parser/ChannelListParserRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/parser/ChannelListParserRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,197 @@
+/*
+ * Copyright 2007 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 27 Oct 2007 : Initial version created by gary
+ */
+package org.scribble.parser;
+
+import org.scribble.extensions.*;
+import org.scribble.model.Channel;
+import org.scribble.model.ChannelList;
+import org.scribble.model.Role;
+import org.scribble.model.admin.ModelIssue;
+import org.scribble.model.admin.ModelListener;
+
+/**
+ * This class provides the parser rule for the Channel List
+ * declaration.
+ */
+ at RegistryInfo(extension=ParserRule.class)
+public class ChannelListParserRule extends org.scribble.parser.AbstractParserRule {
+
+	/**
+	 * The default constructor.
+	 */
+	public ChannelListParserRule() {
+		super(ParserRuleType.Line);
+	}
+	
+	/**
+	 * This method determines whether the parser rules is
+	 * appropriate to return a model object of the required
+	 * type.
+	 * 
+	 * @param type The required type
+	 * @return Whether the parser rule returns a
+	 * 				model object of the required type
+	 */
+	public boolean isSupported(Class<?> type) {
+		return(type.isAssignableFrom(ChannelList.class));
+	}
+
+	/**
+	 * This method parses the description to obtain
+	 * a model object of the appropriate type.
+	 * 
+	 * @param context The context
+	 * @param l The listener
+	 * @return The model object
+	 */
+	public Object parse(ParserContext context, ModelListener l) {
+		ChannelList ret=null;
+		
+		Token t=context.lookahead(0);
+		
+		if (t.isToken("channel", TokenType.Keyword)) {
+			boolean f_error=false;
+			
+			ret = new ChannelList();
+			
+			do {
+				// Consume token
+				context.nextToken();
+				
+				// Read next token, which should be an identifier
+				t = context.lookahead(0);
+			
+				if (t.getType() == TokenType.Identifier) {
+					
+					// Consume token
+					context.nextToken();
+				
+					Channel ch=new Channel();
+					ch.getSource().setStartPosition(t.getSource().getStartPosition());
+				
+					ch.setName(t.getText());
+					
+					ch.getSource().setEndPosition(t.getSource().getEndPosition());
+					
+					ret.getChannels().add(ch);
+					
+					// Check if name has already been defined in state
+					if (context.getState(t.getText()) != null) {
+						l.error(new ModelIssue(t,
+								org.scribble.util.MessageUtil.format(
+										java.util.PropertyResourceBundle.getBundle(
+												"org.scribble.parser.Messages"),
+										"_DUPLICATE_DECLARATION",
+										new String[]{t.getText()})));
+					} else {
+					
+						// Add to state
+						context.setState(ch.getName(), ch);
+					}
+					
+					t = context.lookahead(0);
+					
+					if (t.isToken("from", TokenType.Keyword)) {
+					
+						// Consume
+						context.nextToken();
+						
+						t = context.lookahead(0);
+						
+						if (t.getType() == TokenType.Identifier) {
+							
+							// Consume
+							context.nextToken();
+							
+							// Locate the role definition
+							Object part=context.getState(t.getText());
+							
+							if (part == null) {
+								l.error(new ModelIssue(t,
+									org.scribble.util.MessageUtil.format(
+											java.util.PropertyResourceBundle.getBundle(
+													"org.scribble.parser.Messages"),
+											"_UNKNOWN_ROLE",
+											new String[]{t.getText()})));
+							} else if (part instanceof Role) {
+								ch.setFromRole((Role)part);
+							} else {
+								l.error(new ModelIssue(t,
+									org.scribble.util.MessageUtil.format(
+											java.util.PropertyResourceBundle.getBundle(
+													"org.scribble.parser.Messages"),
+											"_REQUIRED_ROLE",
+											new String[]{t.getText()})));
+							}
+							
+							t = context.lookahead(0);
+						}
+					}
+					
+					if (t.isToken("to", TokenType.Keyword)) {
+						
+						// Consume
+						context.nextToken();
+
+						t = context.lookahead(0);
+
+						if (t.getType() == TokenType.Identifier) {
+							
+							// Consume
+							context.nextToken();
+							
+							// Locate the role definition
+							Object part=context.getState(t.getText());
+							
+							if (part == null) {
+								l.error(new ModelIssue(t,
+									org.scribble.util.MessageUtil.format(
+											java.util.PropertyResourceBundle.getBundle(
+													"org.scribble.parser.Messages"),
+											"_UNKNOWN_ROLE",
+											new String[]{t.getText()})));
+							} else if (part instanceof Role) {
+								ch.setToRole((Role)part);
+							} else {
+								l.error(new ModelIssue(t,
+									org.scribble.util.MessageUtil.format(
+											java.util.PropertyResourceBundle.getBundle(
+													"org.scribble.parser.Messages"),
+											"_REQUIRED_ROLE",
+											new String[]{t.getText()})));
+							}
+							
+							t = context.lookahead(0);
+						}
+					}
+				} else {
+					l.error(new ModelIssue(t, java.util.PropertyResourceBundle.getBundle(
+								"org.scribble.parser.Messages").
+								getString("_EXPECTING_CHANNEL_NAME")));
+					f_error = true;
+				}
+			} while (f_error == false &&
+					t.isToken(ParserConstants.LIST_SEPARATOR,
+							TokenType.Symbol));				
+		}
+		
+		return(ret);
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/parser/ConformanceReferenceParserRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/parser/ConformanceReferenceParserRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/parser/ConformanceReferenceParserRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,165 @@
+/*
+ * Copyright 2007 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 12 Dec 2007 : Initial version created by gary
+ */
+package org.scribble.parser;
+
+import org.scribble.extensions.*;
+import org.scribble.model.*;
+import org.scribble.model.admin.ModelIssue;
+import org.scribble.model.admin.ModelListener;
+
+/**
+ * This class provides the parser rule for the Conformance Reference
+ * between a global model and a local model.
+ */
+ at RegistryInfo(extension=ParserRule.class) //,category=ConformanceReference.class)
+public class ConformanceReferenceParserRule extends AbstractModelReferenceParserRule {
+
+	/**
+	 * This is the default constructor.
+	 */
+	public ConformanceReferenceParserRule() {
+		super(true);
+	}
+	
+	/**
+	 * This method returns the class associated with the
+	 * concrete model reference.
+	 * 
+	 * @return The model reference class
+	 */
+	protected Class<?> getReferenceClass() {
+		return(ConformanceReference.class);
+	}
+
+	/**
+	 * This method instantiates an instance of the model
+	 * reference.
+	 * 
+	 * @param context The parser context
+	 * @param l The model listener
+	 * @return The instantiated model reference
+	 */
+	protected ModelReference createReference(ParserContext context, ModelListener l) {
+		return(new ConformanceReference(context.getSource().getNotation()));
+	}
+
+	/**
+	 * This method parses the description to obtain
+	 * a model object of the appropriate type.
+	 * 
+	 * @param context The context
+	 * @param l The listener
+	 * @return The model object
+	 */
+	public Object parse(ParserContext context, ModelListener l) {
+		Object ret=super.parse(context, l);
+		
+		if (ret instanceof ConformanceReference) {
+			ConformanceReference ref=(ConformanceReference)ret;
+		
+			// Check that referenced model is a local model
+			if (ref.getLocatedRole() == null) {
+				l.error(new ModelIssue(ref, java.util.PropertyResourceBundle.getBundle(
+						"org.scribble.parser.Messages").
+							getString("_EXPECTING_LOCATED_REFERENCE")));
+			}
+			
+			Token t=context.lookahead(0);
+			
+			if (t.isToken("(", TokenType.Symbol)) {
+				boolean f_error=false;
+				
+				do {
+					// Consume token
+					context.nextToken();
+					
+					// Read next token, which should be an identifier
+					t = context.lookahead(0);
+				
+					if (t.getType() == TokenType.Identifier) {
+						String main=null;
+						String binding=null;
+						
+						// Consume token
+						context.nextToken();
+					
+						main = t.getText();
+						
+						t = context.lookahead(0);
+						
+						if (t.isToken("for", TokenType.Keyword)) {
+							
+							context.nextToken();
+							
+							t = context.lookahead(0);
+							
+							if (t.getType() == TokenType.Identifier) {
+								
+								context.nextToken();
+								
+								binding = t.getText();
+							} else {
+								l.error(new ModelIssue(t, java.util.PropertyResourceBundle.getBundle(
+										"org.scribble.parser.Messages").
+											getString("_EXPECTING_IDENTIFIER")));
+								f_error = true;
+							}
+						} else {
+							l.error(new ModelIssue(t,
+									org.scribble.util.MessageUtil.format(
+											java.util.PropertyResourceBundle.getBundle(
+													"org.scribble.parser.Messages"),
+											"_EXPECTING_KEYWORD",
+											new String[]{"for"})));
+							f_error = true;
+						}
+						
+						if (main != null && binding != null) {
+							ref.getNameMapping().put(binding, main);
+						}
+					} else {
+						l.error(new ModelIssue(t, java.util.PropertyResourceBundle.getBundle(
+							"org.scribble.parser.Messages").
+							getString("_EXPECTING_IDENTIFIER")));
+						f_error = true;
+					}
+					
+					t = context.lookahead(0);
+				
+				} while (f_error == false &&
+						t.isToken(ParserConstants.LIST_SEPARATOR,
+								TokenType.Symbol));			
+				
+				if (t.isToken(")", TokenType.Symbol)) {
+					
+					ref.getSource().setEndPosition(t.getSource().getEndPosition());
+					
+					context.nextToken();
+				} else {
+					l.error(new ModelIssue(t, java.util.PropertyResourceBundle.getBundle(
+							"org.scribble.parser.Messages").
+							getString("_EXPECTING_PARAMETER_LIST_DELIMITER")));
+				}
+			}
+		}
+		
+		return(ret);
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/parser/DefaultKeyWordProvider.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/parser/DefaultKeyWordProvider.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/parser/DefaultKeyWordProvider.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,67 @@
+/*
+ * Copyright 2007 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 17 Oct 2007 : Initial version created by gary
+ */
+package org.scribble.parser;
+
+/**
+ * This class provides a default implementation of the keyword provider. Derived
+ * classes can supply the list of keywords appropriate for the notation they
+ * represent.
+ */
+public class DefaultKeyWordProvider implements org.scribble.parser.KeyWordProvider {
+
+	/**
+	 * This is the constructor for the default keyword provider. This
+	 * construct is supplied the list of keywords it represents.
+	 * 
+	 * @param keywords The list of keywords
+	 */
+	public DefaultKeyWordProvider(String[] keywords) {
+		m_keywords = keywords;
+	}
+	
+	/**
+	 * This method returns the list of keywords.
+	 * 
+	 * @return The list of keywords
+	 */
+	public String[] getKeyWords() {
+		return(m_keywords);
+	}
+
+	/**
+	 * This method determines whether the supplied value is
+	 * a keyword.
+	 * 
+	 * @return Whether the supplied word is a keyword
+	 */
+	public boolean isKeyWord(String keyword) {
+		boolean ret=false;
+		
+		for (int i=0; ret == false && i < m_keywords.length; i++) {
+			if (keyword.equals(m_keywords[i])) {
+				ret = true;
+			}
+		}
+		
+		return(ret);
+	}
+	
+	private String[] m_keywords=null;
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/parser/DefaultParser.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/parser/DefaultParser.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/parser/DefaultParser.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,81 @@
+/*
+ * Copyright 2007 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 18 Oct 2007 : Initial version created by gary
+ */
+package org.scribble.parser;
+
+import org.scribble.extensions.RegistryInfo;
+import org.scribble.model.*;
+import org.scribble.model.admin.ModelListener;
+
+/**
+ * This class represents a default parser, for use
+ * with a range of Scribble notations.
+ *
+ */
+ at RegistryInfo(extension=Parser.class,isService=true)
+public class DefaultParser implements Parser {
+
+	/**
+	 * This is the constructor for the default parser.
+	 * 
+	 */
+	public DefaultParser() {
+	}
+	
+	/**
+	 * This method parses the source located using the supplied
+	 * scribble reference, to return a typed model. If any
+	 * errors are detected, they will be reported to the parser
+	 * listener.
+	 * 
+	 */
+	public Model parse(ModelReference ref, java.io.InputStream is,
+								ModelListener l) {
+		Model ret=null;
+		
+		org.scribble.model.admin.DependencyManager dm=
+			(org.scribble.model.admin.DependencyManager)
+			org.scribble.extensions.RegistryFactory.getRegistry().getExtension(
+					org.scribble.model.admin.DependencyManager.class, null);
+		
+		Tokenizer tokenizer=(Tokenizer)
+					org.scribble.extensions.RegistryFactory.getRegistry().
+						getExtension(Tokenizer.class, ref.getNotation());
+
+		DefaultParserContext context=
+				new DefaultParserContext(ref, is, tokenizer);
+		
+		ret = (Model)context.parse(Model.class, l);
+		
+		// Record model name and namespace
+		if (ret != null && dm != null) {
+			java.util.List<Definition> defns=ret.getDefinitions();
+			
+			for (int i=0; i < defns.size(); i++) {
+				dm.recordModelName(context.getSource(), defns.get(i).getLocatedName());
+			}
+			
+			if (ret.getNamespace() != null) {
+				dm.recordNamespace(context.getSource(), ret.getNamespace());
+			}
+		}
+
+		return(ret);
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/parser/DefaultParserContext.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/parser/DefaultParserContext.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/parser/DefaultParserContext.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,424 @@
+/*
+ * Copyright 2007 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 21 Oct 2007 : Initial version created by gary
+ */
+package org.scribble.parser;
+
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+import org.scribble.model.*;
+import org.scribble.model.admin.ModelIssue;
+import org.scribble.model.admin.ModelListener;
+import org.scribble.util.Scope;
+
+/**
+ * This class provides the default implementation of the parser
+ * context.
+ */
+class DefaultParserContext implements ParserContext {
+
+	/**
+	 * This is the constructor for the default parser context.
+	 * 
+	 * @param ref The model reference
+	 * @param is The input stream
+	 * @param tokenizer The optional tokenizer to use
+	 */
+	public DefaultParserContext(ModelReference ref, java.io.InputStream is,
+						Tokenizer tokenizer) {
+		m_modelReference = ref;
+		
+		initializeScope(m_scope);
+		
+		initialize(is, tokenizer);
+	}
+	
+	/**
+	 * This method initializes the tokens from the supplied input stream.
+	 * 
+	 * @param is The input stream
+	 * @param tokenizer The optional tokenizer to use
+	 */
+	protected void initialize(java.io.InputStream is, Tokenizer tokenizer) {
+		
+		// Initialize the tokens
+		if (tokenizer == null) {
+			tokenizer = (Tokenizer)
+					org.scribble.extensions.RegistryFactory.getRegistry().
+							getExtension(Tokenizer.class, getNotation());
+		}
+		
+		if (tokenizer != null) {
+			try {
+				m_tokens = tokenizer.getTokens(getSource(), is);
+			} catch(Exception e) {
+				logger.log(Level.SEVERE, "Failed to get tokens: "+e, e);
+			}
+		} else {
+			logger.severe("Failed to get tokenizer");
+		}
+	}
+		
+	/**
+	 * This method returns the notation.
+	 * 
+	 * @return The notation
+	 */
+	protected String getNotation() {
+		return(m_modelReference.getNotation());
+	}
+	
+	/**
+	 * This method returns the source model reference associated
+	 * with the definition being parsed.
+	 * 
+	 * @return The model reference
+	 */
+	public ModelReference getSource() {
+		return(m_modelReference);
+	}
+
+	/**
+	 * This method returns the located role associated with the
+	 * current scope.
+	 * 
+	 * @return The located role
+	 */
+	public String getLocatedRole() {
+		return(m_scope.getLocatedRole());
+	}
+	
+	/**
+	 * This method sets the located role associated with the
+	 * current scope.
+	 * 
+	 * @param located The located role
+	 */
+	public void setLocatedRole(String located) {
+		m_scope.setLocatedRole(located);
+	}
+	
+	/**
+	 * This method returns whether there are more tokens
+	 * available.
+	 * 
+	 * @return Whether more tokens are available
+	 */
+	public boolean moreTokens() {
+		return(m_tokens == null ? false : m_position < m_tokens.size());
+	}
+	
+	/**
+	 * This method returns the number of tokens.
+	 * 
+	 * @return The number of tokens
+	 */
+	protected int getTokenCount() {
+		return(m_tokens == null ? 0 : m_tokens.size());
+	}
+
+	/**
+	 * This method returns the next available token.
+	 * 
+	 * @return The next token
+	 */
+	public Token nextToken() {
+		Token ret=null;
+		
+		if (m_tokens != null && m_position < m_tokens.size()) {
+			ret = m_tokens.get(m_position++);
+		}
+
+		logger.fine("Consume: "+ret);
+		
+		if (ret == null) {
+			ret = new Token("", TokenType.EndOfFile, 0, 0);
+		}
+
+		return(ret);
+	}
+
+	/**
+	 * This method peeks a specified number of tokens ahead.
+	 * 
+	 * @param num The number of lookahead
+	 * @return The token
+	 */
+	public Token lookahead(int num) {
+		Token ret=null;
+		
+		if (m_tokens != null && (m_position+num) < m_tokens.size()) {
+			ret = m_tokens.get(m_position+num);
+		}
+		
+		if (ret == null) {
+			ret = new Token("", TokenType.EndOfFile, 0, 0);
+		}
+
+		return(ret);
+	}
+	
+	/**
+	 * This method parses the description to determine if a
+	 * model object associated with the supplied type can be
+	 * 
+	 * @param modelType The model type
+	 * @param l The model listener
+	 * @return The model object, or null if not found
+	 */
+	public Object parse(Class<?> modelType, ModelListener l) {
+		Object ret=null;
+		
+		// Look up parser rules appropriate for this model type
+		java.util.List<Object> allrules=
+				org.scribble.extensions.RegistryFactory.getRegistry().
+							getExtensions(ParserRule.class, getNotation());
+	
+		if (allrules != null) {
+			java.util.List<ParserRule> rules=new java.util.Vector<ParserRule>();
+		
+			for (int i=0; i < allrules.size(); i++) {
+				ParserRule rule=(ParserRule)allrules.get(i);
+				
+				if (rule.isSupported(modelType)) {
+					rules.add(rule);
+				}
+			}
+			
+			if (rules.size() > 0) {
+				ret = parseUsingRules(rules, l);
+			}
+		}
+		
+		// Retain imports
+		if (ret instanceof Import) {
+			m_imports.add((Import)ret);
+		}
+		
+		return(ret);
+	}
+
+	/**
+	 * This method parses the current tokens against the list of
+	 * rules, to identify an appropriate rule.
+	 * 
+	 * @param rules The list of possible rules
+	 * @param l The model listener
+	 * @return The model object, or null if no rules matched the
+	 * 						current tokens
+	 */
+	protected Object parseUsingRules(java.util.List<ParserRule> rules,
+										ModelListener l) {
+		Object ret=null;
+		int checkPoint=getPosition();
+		
+		m_errorReported = false;
+
+		if (rules != null) {
+			for (int i=0; m_errorReported == false &&
+					ret == null && i < rules.size(); i++) {
+				ParserRule rule=(ParserRule)rules.get(i);
+				
+				ret = rule.parse(this, l);
+				
+				if (ret != null) {
+					// Check that terminator appropriate for rule
+					// was specified
+					if (rule.getType() == ParserRuleType.Line) {
+						Token terminator=nextToken();
+						
+						if (m_errorReported == false &&
+								terminator.getType() != TokenType.EndOfLine) {
+								//terminator.isToken(ParserConstants.LINE_TERMINATOR,
+								//		TokenType.Symbol) == false) {
+							l.error(new ModelIssue(terminator, "Expecting terminator '"+
+									ParserConstants.LINE_TERMINATOR+"'"));
+							
+							do {
+								terminator = nextToken();
+							//} while (terminator.isToken(ParserConstants.LINE_TERMINATOR,
+							//			TokenType.Symbol) == false &&
+							} while (terminator.getType() != TokenType.EndOfLine &&
+									terminator.getType() != TokenType.EndOfFile);							
+						}
+					} else if (rule.getType() == ParserRuleType.Group) {
+						Token terminator=lookahead(-1);
+						
+						if (m_errorReported == false &&
+								terminator.getType() != TokenType.EndOfBlock) {
+								//terminator.isToken(ParserConstants.BLOCK_END,
+								//			TokenType.Symbol) == false) {
+							l.error(new ModelIssue(terminator, "Expecting terminator '"+
+									ParserConstants.BLOCK_END+"'"));
+
+							do {
+								terminator = nextToken();
+							} while (//terminator.isToken(ParserConstants.BLOCK_END,
+										//	TokenType.Symbol) == false &&
+									terminator.getType() != TokenType.EndOfBlock &&
+									terminator.getType() != TokenType.EndOfFile);
+						}
+					}
+				}
+				
+				if (ret == null) {
+					// Reset position
+					resetPosition(checkPoint);
+				}
+			}
+		}
+		
+		return(ret);
+	}
+
+	/**
+	 * This method resets the token position.
+	 * 
+	 * @param position The position
+	 */
+	protected void resetPosition(int position) {
+		m_position = position;
+	}
+	
+	/**
+	 * This method returns the current token position.
+	 * 
+	 * @return The position
+	 */
+	protected int getPosition() {
+		return(m_position);
+	}
+	
+	/**
+	 * This method returns the named state from the current
+	 * scope.
+	 * 
+	 * @param name The state name
+	 * @return The state value, or null if not found
+	 */
+	public Object getState(String name) {
+		return(m_scope.getState(name));
+	}
+	
+	/**
+	 * This method sets the value associated with the supplied
+	 * name in the current state scope.
+	 * 
+	 * @param name The state name
+	 * @param value The state value
+	 */
+	public void setState(String name, Object value) {
+		m_scope.setState(name, value);
+	}
+
+	/**
+	 * This method pushes the current state onto a stack.
+	 */
+	public void pushState() {
+		m_scope.pushState();
+	}
+	
+	/**
+	 * This method pops the current state from the stack.
+	 */
+	public void popState() {
+		m_scope.popState();
+	}
+		
+	/**
+	 * This method pushes the current scope onto a stack.
+	 */
+	public void pushScope() {
+		m_scopeStack.add(0, m_scope);
+		m_scope = new Scope();
+		
+		initializeScope(m_scope);
+	}
+	
+	protected void initializeScope(Scope scope) {
+		// Add unresolved references property
+		scope.getProperties().put(UNRESOLVED_REFERENCES,
+				new java.util.Vector<ModelReference>());
+	}
+	
+	/**
+	 * This method pops the current scope from the stack.
+	 */
+	public void popScope() {
+		if (m_scopeStack.size() > 0) {
+			java.util.List<ModelReference> oldUnresolved=
+				(java.util.List<ModelReference>)
+				m_scope.getProperties().get(UNRESOLVED_REFERENCES);
+			
+			m_scope = m_scopeStack.remove(0);
+			
+			java.util.List<ModelReference> newUnresolved=
+				(java.util.List<ModelReference>)
+				m_scope.getProperties().get(UNRESOLVED_REFERENCES);
+			
+			// Transfer the unresolved references from the
+			// sub-scope to the parent scope
+			newUnresolved.addAll(oldUnresolved);
+			
+		} else {
+			logger.severe("No state entry to pop from stack");
+		}
+	}
+	
+	/**
+	 * This method determines whether the context is associated
+	 * with the outer scope.
+	 * 
+	 * @return Whether the context is for the outer scope
+	 */
+	public boolean isOuterScope() {
+		return(m_scopeStack.size() < 2);
+	}
+
+	/**
+	 * This method returns the import declarations.
+	 * 
+	 * @return The imports
+	 */
+	public java.util.List<Import> getImports() {
+		return(m_imports);
+	}
+	
+	/**
+	 * This method returns the list of unresolved references.
+	 * 
+	 * @return The list of unresolved references
+	 */
+	public java.util.List<ModelReference> getUnresolvedReferences() {
+		return((java.util.List<ModelReference>)
+				m_scope.getProperties().get(UNRESOLVED_REFERENCES));
+	}
+		
+	private static Logger logger = Logger.getLogger("org.scribble.parser");
+
+	private static final String UNRESOLVED_REFERENCES="UnresolvedReferences";
+	
+	private ModelReference m_modelReference=null;
+	private int m_position=0;
+	private java.util.List<Token> m_tokens=null;
+	private boolean m_errorReported=false;
+	private Scope m_scope=new Scope();
+	private java.util.List<Scope> m_scopeStack=new java.util.Vector<Scope>();
+	private java.util.List<Import> m_imports=new java.util.Vector<Import>();
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/parser/DefaultTokenizer.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/parser/DefaultTokenizer.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/parser/DefaultTokenizer.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,191 @@
+/*
+ * Copyright 2005-9 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 6 May 2009 : Initial version created by gary
+ */
+package org.scribble.parser;
+
+import org.scribble.extensions.RegistryInfo;
+import org.scribble.model.ModelReference;
+
+/**
+ * This is the text based implementation of the tokenizer
+ * interface.
+ */
+ at RegistryInfo(extension=Tokenizer.class)
+public class DefaultTokenizer implements Tokenizer {
+
+	/**
+	 * The default constructor.
+	 */
+	public DefaultTokenizer() {
+	}
+	
+	/**
+	 * This method obtains a list of tokens based on the
+	 * contents of the input stream.
+	 * 
+	 * @param ref The model reference for the input source
+	 * @param is The input stream
+	 * @return The list of tokens
+	 * @throws java.io.IOException Failed to derive 
+	 */
+	public java.util.List<Token> getTokens(ModelReference ref,
+			java.io.InputStream is)	throws java.io.IOException {
+		java.util.List<Token> ret=new java.util.Vector<Token>();
+		
+		java.util.List<Object> kwproviders=org.scribble.extensions.RegistryFactory.
+				getRegistry().getExtensions(KeyWordProvider.class, ref.getNotation());
+
+		try {
+			byte[] b=new byte[is.available()];
+			is.read(b);
+			
+			String text=new String(b);
+			
+			// Initialize the tokens
+			java.util.StringTokenizer st=new java.util.StringTokenizer(text,
+					" {}:;,.&|-+=()@'\"\r\n\t", true);
+			int pos=0;
+			
+			while (st.hasMoreTokens()) {
+				String token=st.nextToken();
+				int newpos=text.indexOf(token, pos);
+							
+				if (token.length() == 1 &&
+						Character.isWhitespace(token.charAt(0))) {
+					// Ignore
+				} else if (isKeyWord(kwproviders, token)) {
+					ret.add(new Token(token, TokenType.Keyword,
+							newpos, newpos+token.length()));
+					
+					if (newpos >= 0) {
+						pos = newpos+token.length();
+					}
+					
+				} else if (token.startsWith("//")) {
+					do {
+						token = st.nextToken();
+						
+					} while (st.hasMoreTokens() &&
+							token.equals("\n") == false &&
+							token.equals("\r") == false);
+					
+				} else if (token.equals(ParserConstants.BLOCK_START)) {
+	
+					ret.add(new Token(token, TokenType.StartOfBlock,
+							newpos, newpos+token.length()));
+	
+					if (newpos >= 0) {
+						pos = newpos+token.length();
+					}
+				} else if (token.equals(ParserConstants.LINE_TERMINATOR)) {
+	
+					ret.add(new Token(token, TokenType.EndOfLine,
+							newpos, newpos+token.length()));
+	
+					if (newpos >= 0) {
+						pos = newpos+token.length();
+					}
+				} else if (token.equals(ParserConstants.BLOCK_END)) {
+	
+					ret.add(new Token(token, TokenType.EndOfBlock,
+							newpos, newpos+token.length()));
+	
+					if (newpos >= 0) {
+						pos = newpos+token.length();
+					}
+				} else if (token.startsWith("\"")) {
+					
+					do {
+						token = st.nextToken();
+						
+					} while (st.hasMoreTokens() &&
+							token.equals("\"") == false &&
+							token.equals("\n") == false &&
+							token.equals("\r") == false);
+	
+					int endpos=text.indexOf('\"', newpos+1);
+					int tmppos=text.indexOf('\r', newpos);
+					
+					if (endpos == -1 || (tmppos != -1 && tmppos < endpos)) {
+						endpos = tmppos;
+					}
+					
+					tmppos=text.indexOf('\n', newpos);
+					
+					if (endpos == -1 || (tmppos != -1 && tmppos < endpos)) {
+						endpos = tmppos;
+					}
+					
+					ret.add(new Token(text.substring(newpos+1, endpos),
+							TokenType.StringLiteral, newpos,
+							endpos));
+					
+					if (endpos != -1) {
+						pos = endpos+1;
+					}
+									
+				} else if (token.length() == 1 &&
+						" ,.:&|-+*/=()@'".indexOf(token) != -1) {
+	
+					ret.add(new Token(token, TokenType.Symbol,
+							newpos, newpos+token.length()));
+	
+					if (newpos >= 0) {
+						pos = newpos+token.length();
+					}
+				} else {
+	
+					ret.add(new Token(token, TokenType.Identifier,
+							newpos, newpos+token.length()));
+	
+					if (newpos >= 0) {
+						pos = newpos+token.length();
+					}
+				}
+			}
+		} catch(Exception e) {
+			e.printStackTrace();
+		}
+		
+		return(ret);
+	}
+
+	/**
+	 * This method determines whether the supplied text is a keyword.
+	 * 
+	 * @param providers The list of keyword providers
+	 * @param keyword The text
+	 * @return Whether the text is a keyword
+	 */
+	protected boolean isKeyWord(java.util.List<Object> providers,
+						String keyword) {
+		boolean ret=false;
+		
+		if (providers != null) {
+			for (int i=0; ret == false &&
+					i < providers.size(); i++) {
+				KeyWordProvider provider=(KeyWordProvider)providers.get(i);
+				
+				ret = provider.isKeyWord(keyword);
+			}
+		}
+		
+		return(ret);
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/parser/ImportParserRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/parser/ImportParserRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/parser/ImportParserRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,140 @@
+/*
+ * Copyright 2007 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 2 Nov 2007 : Initial version created by gary
+ */
+package org.scribble.parser;
+
+import org.scribble.extensions.*;
+import org.scribble.model.*;
+import org.scribble.model.admin.ModelIssue;
+import org.scribble.model.admin.ModelListener;
+
+/**
+ * This class provides the parser rule for the Import statement.
+ */
+ at RegistryInfo(extension=ParserRule.class)
+public class ImportParserRule extends AbstractParserRule {
+
+	/**
+	 * This is the default constructor.
+	 */
+	public ImportParserRule() {
+		super(ParserRuleType.Line);
+	}
+	
+	/**
+	 * This method determines whether the parser rules is
+	 * appropriate to return a model object of the required
+	 * type.
+	 * 
+	 * @param type The required type
+	 * @return Whether the parser rule returns a
+	 * 				model object of the required type
+	 */
+	public boolean isSupported(Class<?> type) {
+		return(type.isAssignableFrom(Import.class));
+	}
+
+	/**
+	 * This method parses the description to obtain
+	 * a model object of the appropriate type.
+	 * 
+	 * @param context The context
+	 * @param l The listener
+	 * @return The model object
+	 */
+	public Object parse(ParserContext context, ModelListener l) {
+		Import ret=null;
+		
+		Token t=context.lookahead(0);
+		
+		if (t.isToken("import", TokenType.Keyword)) {
+			ret = new Import();
+			
+			ret.getSource().setStartPosition(t.getSource().getStartPosition());
+			
+			// Consume token
+			context.nextToken();
+			
+			t = context.lookahead(0);
+			
+			String fqname="";
+			boolean f_end=false;
+			
+			do {
+				if (t.getType() == TokenType.Identifier) {
+					Token id=context.nextToken();
+					fqname += id.getText();
+				
+					t = context.lookahead(0);
+				
+					if (t.isToken(".", TokenType.Symbol)) {
+					
+						context.nextToken();
+						
+						fqname += ".";
+					
+						t = context.lookahead(0);
+					} else {
+						f_end = true;
+					}
+				} else if (t.isToken("*", TokenType.Symbol)) {
+					
+					context.nextToken();
+					
+					fqname += "*";
+					
+					f_end = true;
+				} else {
+					
+					l.error(new ModelIssue(t, java.util.PropertyResourceBundle.getBundle(
+							"org.scribble.parser.Messages").
+								getString("_EXPECTING_IDENTIFIER")));
+					
+					f_end = true;
+				}
+			} while (f_end == false);
+			
+			if (fqname.length() > 0) {
+				ret.setName(fqname);
+			}
+			
+			if (t.isToken("as", TokenType.Keyword)) {
+				context.nextToken();
+				
+				t = context.lookahead(0);
+				
+				if (t.getType() == TokenType.Identifier) {
+					
+					context.nextToken();
+					
+					ret.setAlias(t.getText());
+				} else {
+					l.error(new ModelIssue(t, java.util.PropertyResourceBundle.getBundle(
+							"org.scribble.parser.Messages").
+							getString("_EXPECTING_IDENTIFIER")));
+				}
+			}
+			
+			ret.getSource().setEndPosition(t.getSource().getEndPosition());
+		}
+		
+		return(ret);
+	}
+	
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/parser/InteractionParserRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/parser/InteractionParserRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/parser/InteractionParserRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,292 @@
+/*
+ * Copyright 2007 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 24 Oct 2007 : Initial version created by gary
+ */
+package org.scribble.parser;
+
+import org.scribble.extensions.*;
+import org.scribble.model.Channel;
+import org.scribble.model.Interaction;
+import org.scribble.model.MessageSignature;
+import org.scribble.model.Role;
+import org.scribble.model.admin.ModelIssue;
+import org.scribble.model.admin.ModelListener;
+
+/**
+ * This class provides the parser rule for the Interaction.
+ * 
+ */
+ at RegistryInfo(extension=ParserRule.class) //,category=Interaction.class)
+public class InteractionParserRule extends org.scribble.parser.AbstractParserRule {
+
+	/**
+	 * The default constructor.
+	 */
+	public InteractionParserRule() {
+		super(ParserRuleType.Line);
+	}
+	
+	/**
+	 * This method determines whether the parser rules is
+	 * appropriate to return a model object of the required
+	 * type.
+	 * 
+	 * @param type The required type
+	 * @return Whether the parser rule returns a
+	 * 				model object of the required type
+	 */
+	public boolean isSupported(Class<?> type) {
+		return(type.isAssignableFrom(Interaction.class));
+	}
+	
+	/**
+	 * This method creates a new interaction instance.
+	 * 
+	 * @return The interaction instance
+	 */
+	protected Interaction createInteraction() {
+		return(new Interaction());
+	}
+
+	/**
+	 * This method parses the description to obtain
+	 * a model object of the appropriate type.
+	 * 
+	 * @param context The context
+	 * @param l The listener
+	 * @return The model object
+	 */
+	public Object parse(ParserContext context, ModelListener l) {
+		Interaction ret=null;
+		boolean f_processed=false;
+		int firstpos=0;
+		int lastpos=0;
+		MessageSignature sig=null;
+		
+		do {
+			f_processed = false;
+			
+			Token t=context.lookahead(0);
+			
+			if (firstpos == 0) {
+				firstpos = t.getSource().getStartPosition();
+			}
+			
+			lastpos = t.getSource().getEndPosition();
+
+			// TODO: Need to determine if the identifier is a channel
+			// or an operation name or type in a type based message signature
+			if (t.getType() == TokenType.Identifier) {
+							
+				// Only check for message signature if it has
+				// not already been found
+				if (sig == null) {
+					sig = (MessageSignature)
+							context.parse(MessageSignature.class, l);
+					
+					if (sig != null) {					
+						f_processed = true;
+						
+						// If signature has more than just one type, then
+						// could assume this is an interaction
+						if (ret == null && (sig.getTypes().size() > 1 ||
+								sig.getOperation() != null)) {
+							ret = createInteraction();
+						}
+					}
+				}
+			} else if (t.getType() == TokenType.Keyword) {
+				Interaction before=ret;
+				
+				if (ret == null) {
+					ret = createInteraction();
+				}
+				
+				if ((f_processed = parseKeyword(t.getText(), ret,
+							context, l)) == false) {
+					
+					// Reset the return value if the keyword is
+					// not processed
+					ret = before;
+				}
+			}
+		} while(f_processed);
+		
+		if (ret != null) {
+			ret.getSource().setStartPosition(firstpos);
+			ret.getSource().setEndPosition(lastpos);
+			
+			// Associate message signature (which may be null)
+			ret.setMessageSignature(sig);
+		}
+		
+		return(ret);
+	}
+	
+	/**
+	 * This method parses the set of tokens associated with an interaction
+	 * based on the supplied keyword.
+	 * 
+	 * @param keyword The keyword
+	 * @param interaction The interaction being constructed
+	 * @param context The context
+	 * @param l The model listener
+	 * @return Whether the supplied keyword was processed
+	 */
+	protected boolean parseKeyword(String keyword, Interaction interaction,
+					ParserContext context, ModelListener l) {
+		boolean f_processed=false;
+		
+		if (keyword.equals("via")) {
+
+			// Consume
+			context.nextToken();
+			
+			Token channelName=context.nextToken();
+			
+			Object channel=context.getState(channelName.getText());
+			
+			if (channel == null) {
+				l.error(new ModelIssue(channelName,
+						org.scribble.util.MessageUtil.format(
+								java.util.PropertyResourceBundle.getBundle(
+										"org.scribble.parser.Messages"),
+								"_UNKNOWN_CHANNEL",
+								new String[]{channelName.getText()})));
+			} else if (channel instanceof Channel) {
+				Channel c=new Channel();
+				c.setName(channelName.getText());
+				
+				c.derivedFrom(channelName);
+				
+				interaction.setChannel(c);
+			} else {
+				l.error(new ModelIssue(channelName,
+						org.scribble.util.MessageUtil.format(
+								java.util.PropertyResourceBundle.getBundle(
+										"org.scribble.parser.Messages"),
+								"_REQUIRED_CHANNEL",
+								new String[]{channelName.getText()})));
+			}
+			
+			f_processed = true;
+
+		} else if (keyword.equals("from")) {
+						
+			// Consume
+			context.nextToken();
+			
+			Token role=context.nextToken();
+			
+			if (role.getType() == TokenType.Identifier) {
+				
+				// Locate the role definition
+				Object part=context.getState(role.getText());
+				
+				if (part == null) {
+					l.error(new ModelIssue(role,
+							org.scribble.util.MessageUtil.format(
+									java.util.PropertyResourceBundle.getBundle(
+											"org.scribble.parser.Messages"),
+									"_UNKNOWN_ROLE",
+									new String[]{role.getText()})));
+				} else if (part instanceof Role) {					
+					Role r=new Role();
+					r.setName(role.getText());
+					
+					r.derivedFrom(role);
+					
+					interaction.setFromRole(r);
+				} else {
+					l.error(new ModelIssue(role,
+							org.scribble.util.MessageUtil.format(
+									java.util.PropertyResourceBundle.getBundle(
+											"org.scribble.parser.Messages"),
+									"_REQUIRED_ROLE",
+									new String[]{role.getText()})));
+				}
+				
+				f_processed = true;
+			}
+		} else if (keyword.equals("to")) {
+						
+			// Consume
+			context.nextToken();
+			
+			Token role=context.nextToken();
+			
+			if (role.getType() == TokenType.Identifier) {
+				
+				// Locate the role definition
+				Object part=context.getState(role.getText());
+				
+				if (part == null) {
+					l.error(new ModelIssue(role,
+							org.scribble.util.MessageUtil.format(
+									java.util.PropertyResourceBundle.getBundle(
+											"org.scribble.parser.Messages"),
+									"_UNKNOWN_ROLE",
+									new String[]{role.getText()})));
+				} else if (part instanceof Role) {
+					Role r=new Role();
+					r.setName(role.getText());
+					
+					r.derivedFrom(role);
+					
+					interaction.setToRole(r);
+				} else {
+					l.error(new ModelIssue(role,
+							org.scribble.util.MessageUtil.format(
+									java.util.PropertyResourceBundle.getBundle(
+											"org.scribble.parser.Messages"),
+									"_REQUIRED_ROLE",
+									new String[]{role.getText()})));
+				}
+				
+				f_processed = true;
+			}
+		} else if (keyword.equals("request")) {
+			
+			// Consume
+			context.nextToken();
+			
+			Token label=context.lookahead(0);
+			
+			if (label.getType() == TokenType.StringLiteral) {
+				interaction.setRequestLabel(label.getText());
+				
+				context.nextToken();
+			}
+				
+		} else if (keyword.equals("replyTo")) {
+			
+			// Consume
+			context.nextToken();
+			
+			Token label=context.lookahead(0);
+			
+			if (label.getType() == TokenType.StringLiteral) {
+				interaction.setReplyToLabel(label.getText());
+				
+				context.nextToken();
+			}
+		}
+		
+		return(f_processed);
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/parser/KeyWordProvider.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/parser/KeyWordProvider.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/parser/KeyWordProvider.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,45 @@
+/*
+ * Copyright 2007 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 17 Oct 2007 : Initial version created by gary
+ */
+package org.scribble.parser;
+
+/**
+ * This interface represents a keyword provider associated with a
+ * particular notation. The keyword provider is responsible for returning
+ * information about the valid keywords associated with a particular
+ * Scribble notation.
+ */
+public interface KeyWordProvider {
+
+	/**
+	 * This method returns the list of keywords.
+	 * 
+	 * @return The list of keywords
+	 */
+	public String[] getKeyWords();
+	
+	/**
+	 * This method determines whether the supplied value is
+	 * a keyword.
+	 * 
+	 * @return Whether the supplied word is a keyword
+	 */
+	public boolean isKeyWord(String keyword);
+	
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/parser/MessageSignatureParserRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/parser/MessageSignatureParserRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/parser/MessageSignatureParserRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,131 @@
+/*
+ * Copyright 2007 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 24 Oct 2007 : Initial version created by gary
+ */
+package org.scribble.parser;
+
+import org.scribble.extensions.*;
+import org.scribble.model.*;
+import org.scribble.model.admin.DependencyType;
+import org.scribble.model.admin.ModelIssue;
+import org.scribble.model.admin.ModelListener;
+
+/**
+ * This class provides the parser rule for the Message Signature.
+ * 
+ */
+ at RegistryInfo(extension=ParserRule.class)
+public class MessageSignatureParserRule extends org.scribble.parser.AbstractParserRule {
+
+	/**
+	 * The default constructor.
+	 */
+	public MessageSignatureParserRule() {
+		super(ParserRuleType.Clause);
+	}
+	
+	/**
+	 * This method determines whether the parser rules is
+	 * appropriate to return a model object of the required
+	 * type.
+	 * 
+	 * @param type The required type
+	 * @return Whether the parser rule returns a
+	 * 				model object of the required type
+	 */
+	public boolean isSupported(Class<?> type) {
+		return(type.isAssignableFrom(MessageSignature.class));
+	}
+
+	/**
+	 * This method parses the description to obtain
+	 * a model object of the appropriate type.
+	 * 
+	 * @param context The context
+	 * @param l The listener
+	 * @return The model object
+	 */
+	public Object parse(ParserContext context, ModelListener l) {
+		MessageSignature ret=null;
+		
+		Token t = context.lookahead(0);
+
+		TypeReference ref=(TypeReference)context.parse(TypeReference.class, l);
+		
+		if (ref != null) {
+			resolveReference(context, l, ref, DependencyType.Uses);
+
+			ret = new MessageSignature();
+			
+			String text=ref.getAlias();
+			
+			// Check next token before determining whether
+			// this is a message type or operation
+			t = context.lookahead(0);
+			
+			if (t.isToken("(", TokenType.Symbol)) {
+				// Consume '('
+				context.nextToken();
+				
+				ret.setOperation(text);
+				
+				boolean f_end=false;
+				do {
+					ref = (TypeReference)context.parse(TypeReference.class, l);
+					
+					//if (t.getType() == TokenType.Identifier) {
+					if (ref != null) {
+						resolveReference(context, l, ref, DependencyType.Uses);
+
+						ret.getTypes().add(ref);
+						
+						t = context.nextToken();
+						
+						if (t.isToken(",", TokenType.Symbol) == false &&
+								t.isToken(")", TokenType.Symbol) == false) {
+							
+							l.error(new ModelIssue(t, java.util.PropertyResourceBundle.getBundle(
+									"org.scribble.parser.Messages").
+									getString("_EXPECTING_PARAMETER_LIST_DELIMITER")));
+							f_end = true;
+						}
+					} else {
+						l.error(new ModelIssue(t, java.util.PropertyResourceBundle.getBundle(
+							"org.scribble.parser.Messages").
+							getString("_EXPECTING_TYPE")));
+						f_end = true;
+					}
+					
+					if (t.getType() == TokenType.EndOfFile ||
+								t.isToken(")", TokenType.Symbol)) {
+						f_end = true;
+					}
+				} while (f_end == false);
+				
+			} else {
+				ret.getTypes().add(ref);
+			}
+		} else {
+			l.error(new ModelIssue(t, java.util.PropertyResourceBundle.getBundle(
+					"org.scribble.parser.Messages").
+					getString("_EXPECTING_IDENTIFIER")));
+		}
+		
+		return(ret);
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/parser/Messages.properties
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/parser/Messages.properties	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/parser/Messages.properties	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,38 @@
+# /*
+# * Copyright 2007 Pi4 Technologies Ltd
+# *
+# * Licensed under the Apache License, Version 2.0 (the "License");
+# * you may not use this file except in compliance with the License.
+# * You may obtain a copy of the License at
+# *
+# *     http://www.apache.org/licenses/LICENSE-2.0
+# *
+# * Unless required by applicable law or agreed to in writing, software
+# * distributed under the License is distributed on an "AS IS" BASIS,
+# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# * See the License for the specific language governing permissions and
+# * limitations under the License.
+# *
+# *
+# * Change History:
+# * 28 Oct 2007 : Initial version created by gary
+# */
+
+_DUPLICATE_DECLARATION=Name '{0}' has already been declared
+_EXISTING_DECLARATION=Duplicate declaration name '{0}'
+_EXPECTING_ACTIVITY=Expecting an activity, but found '{0}'
+_EXPECTING_CHANNEL_NAME=Expecting channel name
+_EXPECTING_IDENTIFIER=Expecting an identifier
+_EXPECTING_KEYWORD=Expecting keyword '{0}'
+_EXPECTING_LOCATED_REFERENCE=Expecting a located reference
+_EXPECTING_PARAMETER_LIST_DELIMITER=Expecting either ',' or ')'
+_EXPECTING_ROLE_NAME=Expecting role name
+_EXPECTING_SYMBOL=Expecting symbol '{0}'
+_EXPECTING_TYPE=Expecting type
+_INCOMPATIBLE_NAME=Name is incompatible with file name
+_REQUIRED_CHANNEL=Must specify a channel '{0}'
+_REQUIRED_DECLARATION=Must specify a declaration '{0}'
+_REQUIRED_ROLE=Must specify a role '{0}'
+_UNKNOWN_CHANNEL=Unknown channel '{0}'
+_UNKNOWN_DECLARATION=Unknown declaration '{0}'
+_UNKNOWN_ROLE=Unknown role '{0}'

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/parser/ModelNameParserRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/parser/ModelNameParserRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/parser/ModelNameParserRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,115 @@
+/*
+ * Copyright 2007 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 24 Oct 2007 : Initial version created by gary
+ */
+package org.scribble.parser;
+
+import org.scribble.extensions.RegistryInfo;
+import org.scribble.model.*;
+import org.scribble.model.admin.ModelIssue;
+import org.scribble.model.admin.ModelListener;
+
+/**
+ * This class provides the parser rule for the Model Name.
+ */
+ at RegistryInfo(extension=ParserRule.class)
+public class ModelNameParserRule extends AbstractParserRule {
+
+	/**
+	 * This is the default constructor.
+	 */
+	public ModelNameParserRule() {
+		super(ParserRuleType.Clause);
+	}
+	
+	/**
+	 * This method determines whether the parser rules is
+	 * appropriate to return a model object of the required
+	 * type.
+	 * 
+	 * @param type The required type
+	 * @return Whether the parser rule returns a
+	 * 				model object of the required type
+	 */
+	public boolean isSupported(Class<?> type) {
+		return(type.isAssignableFrom(LocatedName.class));
+	}
+
+	/**
+	 * This method parses the description to obtain
+	 * a model object of the appropriate type.
+	 * 
+	 * @param context The context
+	 * @param l The listener
+	 * @return The model object
+	 */
+	public Object parse(ParserContext context, ModelListener l) {
+		LocatedName ret=null;
+		
+		Token t=context.lookahead(0);
+		
+		if (t.getType() == TokenType.Identifier) {
+			int startpos=t.getSource().getStartPosition();
+			int endpos=t.getSource().getEndPosition();
+			
+			context.nextToken();
+			
+			ret = new LocatedName();
+			
+			ret.setName(t.getText());
+			
+			// Check if name could be located
+			t = context.lookahead(0);
+			
+			if (t.isToken(ModelReference.LOCATED_REFERENCE_SEPARATOR,
+									TokenType.Symbol)) {
+				context.nextToken();
+				
+				t = context.lookahead(0);
+				
+				if (t.getType() == TokenType.Identifier) {
+					endpos = t.getSource().getEndPosition();
+					
+					context.nextToken();
+					
+					Role p=new Role();
+					
+					p.setName(t.getText());
+					
+					p.getSource().setStartPosition(t.getSource().getStartPosition());
+					p.getSource().setEndPosition(t.getSource().getEndPosition());
+
+					ret.setRole(p);
+				} else {
+					l.error(new ModelIssue(t, java.util.PropertyResourceBundle.getBundle(
+							"org.scribble.parser.Messages").
+								getString("_EXPECTING_ROLE_NAME")));
+				}
+			}
+			
+			ret.getSource().setStartPosition(startpos);
+			ret.getSource().setEndPosition(endpos);
+		} else {
+			l.error(new ModelIssue(t, java.util.PropertyResourceBundle.getBundle(
+						"org.scribble.parser.Messages").
+						getString("_EXPECTING_IDENTIFIER")));
+		}
+		
+		return(ret);
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/parser/NamespaceParserRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/parser/NamespaceParserRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/parser/NamespaceParserRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,121 @@
+/*
+ * Copyright 2007 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 22 Oct 2007 : Initial version created by gary
+ */
+package org.scribble.parser;
+
+import org.scribble.extensions.*;
+import org.scribble.model.*;
+import org.scribble.model.admin.ModelIssue;
+import org.scribble.model.admin.ModelListener;
+
+/**
+ * This class provides the parser rule for the Namespace.
+ */
+ at RegistryInfo(extension=ParserRule.class)
+public class NamespaceParserRule extends AbstractParserRule {
+
+	/**
+	 * This is the default constructor.
+	 */
+	public NamespaceParserRule() {
+		super(ParserRuleType.Line);
+	}
+	
+	/**
+	 * This method determines whether the parser rules is
+	 * appropriate to return a model object of the required
+	 * type.
+	 * 
+	 * @param type The required type
+	 * @return Whether the parser rule returns a
+	 * 				model object of the required type
+	 */
+	public boolean isSupported(Class<?> type) {
+		return(type.isAssignableFrom(Namespace.class));
+	}
+
+	/**
+	 * This method parses the description to obtain
+	 * a model object of the appropriate type.
+	 * 
+	 * @param context The context
+	 * @param l The listener
+	 * @return The model object
+	 */
+	public Object parse(ParserContext context, ModelListener l) {
+		Namespace ret=null;
+		
+		Token t=context.lookahead(0);
+		
+		if (t.isToken("namespace", TokenType.Keyword)) {
+			
+			ret = new Namespace();
+			ret.getSource().setStartPosition(t.getSource().getStartPosition());
+
+			// Consume token
+			context.nextToken();
+			
+			t = context.lookahead(0);
+			
+			String fqname="";
+			boolean f_end=false;
+			int endpos=t.getSource().getEndPosition();
+			
+			do {
+				if (t.getType() == TokenType.Identifier) {
+					Token id=context.nextToken();
+					fqname += id.getText();
+				
+					endpos=t.getSource().getEndPosition();
+					
+					t = context.lookahead(0);
+				
+					if (t.isToken(".", TokenType.Symbol)) {
+					
+						context.nextToken();
+						
+						endpos=t.getSource().getEndPosition();
+						
+						fqname += ".";
+					
+						t = context.lookahead(0);
+					} else {
+						f_end = true;
+					}
+				} else {
+					
+					l.error(new ModelIssue(t, java.util.PropertyResourceBundle.getBundle(
+							"org.scribble.parser.Messages").
+								getString("_EXPECTING_IDENTIFIER")));
+					
+					f_end = true;
+				}
+			} while (f_end == false);
+			
+			if (fqname.length() > 0) {
+				ret.setName(fqname);
+			}
+			
+			ret.getSource().setEndPosition(endpos);
+		}
+		
+		return(ret);
+	}
+	
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/parser/Parser.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/parser/Parser.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/parser/Parser.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,41 @@
+/*
+ * Copyright 2007 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 18 Oct 2007 : Initial version created by gary
+ */
+package org.scribble.parser;
+
+import org.scribble.model.*;
+import org.scribble.model.admin.ModelListener;
+
+public interface Parser {
+
+	/**
+	 * This method parses the source located using the supplied
+	 * scribble reference, to return a model. If any
+	 * errors are detected, they will be reported to the parser
+	 * listener.
+	 * 
+	 * @param ref The scribble source reference
+	 * @param is The input stream
+	 * @param l The model listener
+	 * @return The model, or null if not found
+	 */
+	public Model parse(ModelReference ref, java.io.InputStream is,
+								ModelListener l);
+	
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/parser/ParserConstants.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/parser/ParserConstants.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/parser/ParserConstants.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,34 @@
+/*
+ * Copyright 2007 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 22 Oct 2007 : Initial version created by gary
+ */
+package org.scribble.parser;
+
+/**
+ * This class provides the parser constants.
+ */
+public class ParserConstants {
+
+	public static final String LINE_TERMINATOR=";";
+	
+	public static final String BLOCK_START="{";
+	public static final String BLOCK_END="}";
+	
+	public static final String LIST_SEPARATOR=",";
+	
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/parser/ParserContext.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/parser/ParserContext.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/parser/ParserContext.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,149 @@
+/*
+ * Copyright 2007 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 21 Oct 2007 : Initial version created by gary
+ */
+package org.scribble.parser;
+
+import org.scribble.model.*;
+import org.scribble.model.admin.ModelListener;
+
+/**
+ * This interface provides the services required by the parser
+ * rules.
+ */
+public interface ParserContext {
+
+	/**
+	 * This method returns the source model reference associated
+	 * with the definition being parsed.
+	 * 
+	 * @return The model reference
+	 */
+	public ModelReference getSource();
+	
+	/**
+	 * This method returns the located role associated with the
+	 * current scope.
+	 * 
+	 * @return The located role
+	 */
+	public String getLocatedRole();
+	
+	/**
+	 * This method sets the located role associated with the
+	 * current scope.
+	 * 
+	 * @param located The located role
+	 */
+	public void setLocatedRole(String located);
+	
+	/**
+	 * This method parses the description to determine if a
+	 * model object associated with the supplied type can be
+	 * found.
+	 * 
+	 * @param modelType The model type
+	 * @param l The model listener
+	 * @return The model object, or null if not found
+	 */
+	public Object parse(Class<?> modelType, ModelListener l);
+	
+	/**
+	 * This method returns the next available token.
+	 * 
+	 * @return The next token
+	 */
+	public Token nextToken();
+
+	/**
+	 * This method peeks a specified number of tokens ahead.
+	 * 
+	 * @param num The number of lookahead
+	 * @return The token
+	 */
+	public Token lookahead(int num);
+
+	/**
+	 * This method returns whether there are more tokens
+	 * available.
+	 * 
+	 * @return Whether more tokens are available
+	 */
+	public boolean moreTokens();
+	
+	/**
+	 * This method returns the named state from the current
+	 * scope.
+	 * 
+	 * @param name The state name
+	 * @return The state value, or null if not found
+	 */
+	public Object getState(String name);
+	
+	/**
+	 * This method sets the value associated with the supplied
+	 * name in the current state.
+	 * 
+	 * @param name The state name
+	 * @param value The state value
+	 */
+	public void setState(String name, Object value);
+	
+	/**
+	 * This method pushes the current state onto a stack.
+	 */
+	public void pushState();
+	
+	/**
+	 * This method pops the current state from the stack.
+	 */
+	public void popState();
+	
+	/**
+	 * This method pushes the current scope onto a stack.
+	 */
+	public void pushScope();
+	
+	/**
+	 * This method pops the current scope from the stack.
+	 */
+	public void popScope();
+	
+	/**
+	 * This method determines whether the context is associated
+	 * with the outer scope.
+	 * 
+	 * @return Whether the context is for the outer scope
+	 */
+	public boolean isOuterScope();
+	
+	/**
+	 * This method returns the import declarations.
+	 * 
+	 * @return The imports
+	 */
+	public java.util.List<Import> getImports();
+	
+	/**
+	 * This method returns the list of unresolved references.
+	 * 
+	 * @return The list of unresolved references
+	 */
+	public java.util.List<ModelReference> getUnresolvedReferences();
+	
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/parser/ParserRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/parser/ParserRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/parser/ParserRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,59 @@
+/*
+ * Copyright 2007 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 16 Oct 2007 : Initial version created by gary
+ */
+package org.scribble.parser;
+
+import org.scribble.model.*;
+import org.scribble.model.admin.ModelListener;
+
+/**
+ * This interface represents a parser rule associated with
+ * a Scribble language construct.
+ */
+public interface ParserRule {
+
+	/**
+	 * This method determines whether the parser rules is
+	 * appropriate to return a model object of the required
+	 * type.
+	 * 
+	 * @param type The required type
+	 * @return Whether the parser rule returns a
+	 * 				model object of the required type
+	 */
+	public boolean isSupported(Class<?> type);
+	
+	/**
+	 * This method returns the parser rule type.
+	 * 
+	 * @return The parser rule type
+	 */
+	public ParserRuleType getType();
+	
+	/**
+	 * This method parses the description to obtain
+	 * a model object of the appropriate type.
+	 * 
+	 * @param context The context
+	 * @param l The listener
+	 * @return The model object
+	 */
+	public Object parse(ParserContext context, ModelListener l);
+	
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/parser/ParserRuleType.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/parser/ParserRuleType.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/parser/ParserRuleType.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,30 @@
+/*
+ * Copyright 2007 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 22 Oct 2007 : Initial version created by gary
+ */
+package org.scribble.parser;
+
+/**
+ * Enumeration of parser rule types.
+ */
+public enum ParserRuleType {
+	Clause,
+	Line,
+	Group,
+	File
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/parser/RoleListParserRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/parser/RoleListParserRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/parser/RoleListParserRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,155 @@
+/*
+ * Copyright 2007 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 22 Oct 2007 : Initial version created by gary
+ */
+package org.scribble.parser;
+
+import org.scribble.extensions.*;
+import org.scribble.model.*;
+import org.scribble.model.admin.DependencyType;
+import org.scribble.model.admin.ModelIssue;
+import org.scribble.model.admin.ModelListener;
+
+/**
+ * This class provides the parser rule for the Role
+ * declaration.
+ */
+ at RegistryInfo(extension=ParserRule.class) //,category=RoleList.class)
+public class RoleListParserRule extends org.scribble.parser.AbstractParserRule {
+
+	/**
+	 * The default constructor.
+	 */
+	public RoleListParserRule() {
+		super(ParserRuleType.Line);
+	}
+	
+	/**
+	 * This method determines whether the parser rules is
+	 * appropriate to return a model object of the required
+	 * type.
+	 * 
+	 * @param type The required type
+	 * @return Whether the parser rule returns a
+	 * 				model object of the required type
+	 */
+	public boolean isSupported(Class<?> type) {
+		return(type.isAssignableFrom(RoleList.class));
+	}
+
+	/**
+	 * This method parses the description to obtain
+	 * a model object of the appropriate type.
+	 * 
+	 * @param context The context
+	 * @param l The listener
+	 * @return The model object
+	 */
+	public Object parse(ParserContext context, ModelListener l) {
+		RoleList ret=null;
+		
+		Token t=context.lookahead(0);
+		
+		if (t.isToken("role", TokenType.Keyword)) {
+			boolean f_error=false;
+			
+			ret = new RoleList();
+			
+			ret.getSource().setStartPosition(t.getSource().getStartPosition());
+			
+			do {
+				// Consume token
+				context.nextToken();
+				
+				// Read next token, which should be an identifier
+				t = context.lookahead(0);
+			
+				if (t.getType() == TokenType.Identifier) {
+					
+					// Consume token
+					context.nextToken();
+				
+					Role part=new Role();
+					part.getSource().setStartPosition(t.getSource().getStartPosition());
+				
+					part.setName(t.getText());
+					
+					part.getSource().setEndPosition(t.getSource().getEndPosition());
+					
+					ret.getSource().setEndPosition(t.getSource().getEndPosition());
+					
+					ret.getRoles().add(part);
+					
+					// Check if name has already been defined in state
+					if (context.getState(t.getText()) != null) {
+						l.error(new ModelIssue(t,
+								org.scribble.util.MessageUtil.format(
+										java.util.PropertyResourceBundle.getBundle(
+												"org.scribble.parser.Messages"),
+										"_DUPLICATE_DECLARATION",
+										new String[]{t.getText()})));
+					} else {
+					
+						// Add to state
+						context.setState(part.getName(), part);
+
+						// If outer definition and not a local model,
+						// then add dependency on a local model for
+						// this role
+						if (context.getLocatedRole() == null &&
+								context.isOuterScope()) {
+							// Establish dependency on the reference
+							org.scribble.model.admin.DependencyManager dm=
+								(org.scribble.model.admin.DependencyManager)
+								org.scribble.extensions.RegistryFactory.getRegistry().getExtension(
+										org.scribble.model.admin.DependencyManager.class, null);
+							
+							org.scribble.model.admin.ModelRepository mrep=
+								(org.scribble.model.admin.ModelRepository)
+								RegistryFactory.getRegistry().getExtension(
+										org.scribble.model.admin.ModelRepository.class, null);
+
+							if (dm != null && mrep != null) {
+								ModelReference ref=
+									new ModelReference(context.getSource().getNamespace(),
+										context.getSource().getLocalpart(), part.getName(),
+										context.getSource().getNotation());
+								
+								mrep.locate(ref, context.getSource());
+								
+								dm.recordDependency(context.getSource(), ref,
+										DependencyType.ConformsTo);
+							}
+						}
+					}
+					
+					t = context.lookahead(0);
+				} else {
+					l.error(new ModelIssue(t, java.util.PropertyResourceBundle.getBundle(
+						"org.scribble.parser.Messages").
+						getString("_EXPECTING_ROLE_NAME")));
+					f_error = true;
+				}
+			} while (f_error == false &&
+					t.isToken(ParserConstants.LIST_SEPARATOR,
+							TokenType.Symbol));				
+		}
+		
+		return(ret);
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/parser/Token.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/parser/Token.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/parser/Token.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,112 @@
+/*
+ * Copyright 2007 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 21 Oct 2007 : Initial version created by gary
+ */
+package org.scribble.parser;
+
+/**
+ * This class represents a token found within the
+ * source description.
+ */
+public class Token extends org.scribble.model.ModelObject {
+
+	private static final long serialVersionUID = 2131683235998230790L;
+
+	/**
+	 * This is the constructor for the token.
+	 * 
+	 * @param text The text
+	 * @param type The token type
+	 * @param startPos The start position
+	 * @param endPos The end position
+	 */
+	public Token(String text, TokenType type,
+			int startPos, int endPos) {
+		super(startPos, endPos);
+		
+		m_text = text;
+		m_type = type;
+	}
+	
+	/**
+	 * This constructor initializes the token with an
+	 * object.
+	 * 
+	 * @param obj The object representing the token
+	 */
+	public Token(Object obj) {
+		m_object = obj;
+		m_type = TokenType.Object;
+	}
+	
+	/**
+	 * This method returns the text.
+	 * 
+	 * @return The text
+	 */
+	public String getText() {
+		return(m_text);
+	}
+
+	/**
+	 * This method returns the object associated with
+	 * the token.
+	 * 
+	 * @return The object
+	 */
+	public Object getObject() {
+		return(m_object);
+	}
+	
+	/**
+	 * This method returns the token type.
+	 * 
+	 * @return The token type
+	 */
+	public TokenType getType() {
+		return(m_type);
+	}
+
+	/**
+	 * This method determines whether there is a match between
+	 * the supplied text and token type.
+	 * 
+	 * @param text The text
+	 * @param type The token type
+	 * @return Whether the supplied information matches the token
+	 */
+	public boolean isToken(String text, TokenType type) {
+		boolean ret=false;
+		
+		if (type == m_type && text != null &&
+				text.equals(m_text)) {
+			ret = true;
+		}
+		
+		return(ret);
+	}
+	
+	public String toString() {
+		return("Token[text="+m_text+",type="+m_type+
+				",start="+getSource().getStartPosition()+",end="+getSource().getEndPosition()+"]");
+	}
+
+	private String m_text=null;
+	private Object m_object=null;
+	private TokenType m_type=null;
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/parser/TokenType.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/parser/TokenType.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/parser/TokenType.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,36 @@
+/*
+ * Copyright 2007 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 21 Oct 2007 : Initial version created by gary
+ */
+package org.scribble.parser;
+
+/**
+ * This enum represents the token type.
+ */
+public enum TokenType {
+	Identifier,
+	Keyword,
+	Symbol,
+	StartOfBlock,
+	EndOfBlock,
+	EndOfLine,
+	EndOfFile,
+	StringLiteral,
+	Object,
+	Other
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/parser/Tokenizer.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/parser/Tokenizer.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/parser/Tokenizer.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,43 @@
+/*
+ * Copyright 2005-9 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 6 May 2009 : Initial version created by gary
+ */
+package org.scribble.parser;
+
+import org.scribble.model.ModelReference;
+
+/**
+ * This interface represents a component that tokenizes the
+ * contents of an input stream, to provide a list of tokens
+ * to a parser.
+ */
+public interface Tokenizer {
+
+	/**
+	 * This method obtains a list of tokens based on the
+	 * contents of the input stream.
+	 * 
+	 * @param ref The model reference for the input source
+	 * @param is The input stream
+	 * @return The list of tokens
+	 * @throws java.io.IOException Failed to derive 
+	 */
+	public java.util.List<Token> getTokens(ModelReference ref,
+			java.io.InputStream is)	throws java.io.IOException;
+
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/parser/TypeReferenceParserRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/parser/TypeReferenceParserRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/parser/TypeReferenceParserRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,61 @@
+/*
+ * Copyright 2007 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 24 Oct 2007 : Initial version created by gary
+ */
+package org.scribble.parser;
+
+import org.scribble.extensions.*;
+import org.scribble.model.*;
+import org.scribble.model.admin.ModelListener;
+
+/**
+ * This class provides the parser rule for the Type Reference.
+ */
+ at RegistryInfo(extension=ParserRule.class)
+public class TypeReferenceParserRule extends AbstractModelReferenceParserRule {
+
+	/**
+	 * This is the default constructor.
+	 */
+	public TypeReferenceParserRule() {
+		super(false);
+	}
+	
+	/**
+	 * This method returns the class associated with the
+	 * concrete model reference.
+	 * 
+	 * @return The model reference class
+	 */
+	protected Class<?> getReferenceClass() {
+		return(TypeReference.class);
+	}
+
+	/**
+	 * This method instantiates an instance of the model
+	 * reference.
+	 * 
+	 * @param context The parser context
+	 * @param l The model listener
+	 * @return The instantiated model reference
+	 */
+	protected ModelReference createReference(ParserContext context, ModelListener l) {
+		return(new TypeReference());
+	}
+
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/projector/AbstractBlockProjectorRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/projector/AbstractBlockProjectorRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/projector/AbstractBlockProjectorRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,82 @@
+/*
+ * Copyright 2007 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 19 Nov 2007 : Initial version created by gary
+ */
+package org.scribble.projector;
+
+import org.scribble.model.*;
+import org.scribble.model.admin.ModelListener;
+
+/**
+ * This class provides the Block implementation of the
+ * projector rule.
+ */
+public abstract class AbstractBlockProjectorRule implements ProjectorRule {
+
+	/**
+	 * This method creates a new block of the appropriate
+	 * type.
+	 * 
+	 * @return The block
+	 */
+	protected abstract Block createBlock();
+	
+	/**
+	 * This method projects the supplied model object based on the
+	 * specified role.
+	 * 
+	 * @param model The model object
+	 * @param role The role
+	 * @param l The model listener
+	 * @return The projected model object
+	 */
+	public ModelObject project(ProjectorContext context, ModelObject model,
+					Role role, ModelListener l) {
+		Block ret=createBlock();
+		Block source=(Block)model;
+		
+		ret.derivedFrom(source);
+		
+		context.pushState();
+		
+		for (int i=0; i < source.getContents().size(); i++) {
+			Activity act=(Activity)
+					context.project(source.getContents().get(i), role,
+							l);
+			
+			if (act != null) {
+				
+				if (act instanceof Block) {
+					// Copy contents
+					ret.getContents().addAll(((Block)act).getContents());
+				} else {
+					ret.getContents().add(act);
+				}
+			}
+		}
+
+		context.popState();
+		
+		// Only return block if it contains atleast one activity
+		if (ret.getContents().size() == 0) {
+			ret = null;
+		}
+		
+		return(ret);
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/projector/BlockProjectorRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/projector/BlockProjectorRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/projector/BlockProjectorRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,53 @@
+/*
+ * Copyright 2007 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 19 Nov 2007 : Initial version created by gary
+ */
+package org.scribble.projector;
+
+import org.scribble.extensions.RegistryInfo;
+import org.scribble.model.*;
+
+/**
+ * This class provides the Block implementation of the
+ * projector rule.
+ */
+ at RegistryInfo(extension=ProjectorRule.class)
+public class BlockProjectorRule extends AbstractBlockProjectorRule {
+
+	/**
+	 * This method determines whether the projection rule is
+	 * appropriate for the supplied model object.
+	 * 
+	 * @param obj The model object to be projected
+	 * @return Whether the rule is relevant for the
+	 * 				model object
+	 */
+	public boolean isSupported(ModelObject obj) {
+		return(obj.getClass() == Block.class);
+	}
+	
+	/**
+	 * This method creates a new block of the appropriate
+	 * type.
+	 * 
+	 * @return The block
+	 */
+	protected Block createBlock() {
+		return(new Block());
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/projector/ChannelListProjectorRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/projector/ChannelListProjectorRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/projector/ChannelListProjectorRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,74 @@
+/*
+ * Copyright 2007 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 19 Nov 2007 : Initial version created by gary
+ */
+package org.scribble.projector;
+
+import org.scribble.extensions.RegistryInfo;
+import org.scribble.model.*;
+import org.scribble.model.admin.ModelListener;
+
+/**
+ * This class provides the ChannelList implementation of the
+ * projector rule.
+ */
+ at RegistryInfo(extension=ProjectorRule.class)
+public class ChannelListProjectorRule implements ProjectorRule {
+
+	/**
+	 * This method determines whether the projection rule is
+	 * appropriate for the supplied model object.
+	 * 
+	 * @param obj The model object to be projected
+	 * @return Whether the rule is relevant for the
+	 * 				model object
+	 */
+	public boolean isSupported(ModelObject obj) {
+		return(obj.getClass() == ChannelList.class);
+	}
+	
+	/**
+	 * This method projects the supplied model object based on the
+	 * specified role.
+	 * 
+	 * @param model The model object
+	 * @param role The role
+	 * @param l The model listener
+	 * @return The projected model object
+	 */
+	public ModelObject project(ProjectorContext context, ModelObject model,
+					Role role, ModelListener l) {
+		ChannelList ret=new ChannelList();
+		ChannelList source=(ChannelList)model;
+		
+		for (int i=0; i < source.getChannels().size(); i++) {
+			if (source.getChannels().get(i).equals(role) == false) {
+				Channel ch=new Channel();
+				
+				ch.setName(source.getChannels().get(i).getName());
+				
+				// Add to state
+				context.setState(ch.getName(), ch);
+
+				ret.getChannels().add(ch);
+			}
+		}
+		
+		return(ret);
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/projector/ConformanceReferenceProjectorRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/projector/ConformanceReferenceProjectorRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/projector/ConformanceReferenceProjectorRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,108 @@
+/*
+ * Copyright 2007-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 18 Jun 2008 : Initial version created by gary
+ */
+package org.scribble.projector;
+
+import org.scribble.extensions.RegistryInfo;
+import org.scribble.model.*;
+import org.scribble.model.admin.ModelListener;
+
+/**
+ * This class provides the ConformanceReference implementation of the
+ * projector rule.
+ */
+ at RegistryInfo(extension=ProjectorRule.class)
+public class ConformanceReferenceProjectorRule extends ModelReferenceProjectorRule {
+
+	/**
+	 * This is the default constructor.
+	 */
+	public ConformanceReferenceProjectorRule() {
+		super(true);
+	}
+	
+	/**
+	 * This method determines whether the projection rule is
+	 * appropriate for the supplied model object.
+	 * 
+	 * @param obj The model object to be projected
+	 * @return Whether the rule is relevant for the
+	 * 				model object
+	 */
+	public boolean isSupported(ModelObject obj) {
+		return(obj.getClass() == ConformanceReference.class);
+	}
+	
+	/**
+	 * This method returns the new reference instance.
+	 * 
+	 * @param source The source reference
+	 * @return The model reference
+	 */
+	protected ModelReference createReference(ModelReference source) {
+		return(new ConformanceReference(source.getNotation()));
+	}
+	
+	/**
+	 * This method projects the supplied model object based on the
+	 * specified role.
+	 * 
+	 * @param model The model object
+	 * @param role The role
+	 * @param l The model listener
+	 * @return The projected model object
+	 */
+	public ModelObject project(ProjectorContext context, ModelObject model,
+					Role role, ModelListener l) {
+		ConformanceReference source=(ConformanceReference)model;
+
+		ConformanceReference ret=null;
+		
+		// Check if conformance reference relates to the projected role
+		// TODO: Need to be able to project if projected role is in the
+		// name mapping list?? Also possibly if source is not located
+		if (source.getLocatedRole() != null &&
+				source.getLocatedRole().equals(role.getName())) {
+			ret = (ConformanceReference)super.project(context,
+					model, role, l);
+			
+			// Project name mapping
+			java.util.Map<String,String> mapping=source.getNameMapping();
+			String mappedName=null;
+			
+			java.util.Iterator<String> iter=mapping.keySet().iterator();
+			while (iter.hasNext()) {
+				String key=iter.next();
+				String value=mapping.get(key);
+				
+				ret.getNameMapping().put(key, value);
+				
+				if (role.getName().equals(value)) {
+					mappedName = key;
+				}
+			}
+			
+			if (mappedName != null) {
+				ret.setLocatedRole(mappedName);
+			}
+		}
+
+		return(ret);
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/projector/DefaultProjector.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/projector/DefaultProjector.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/projector/DefaultProjector.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,103 @@
+/*
+ * Copyright 2007 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 18 Nov 2007 : Initial version created by gary
+ */
+package org.scribble.projector;
+
+import org.scribble.extensions.RegistryInfo;
+import org.scribble.model.*;
+import org.scribble.model.admin.ModelIssue;
+import org.scribble.model.admin.ModelListener;
+
+/**
+ * This class provides the default implementation
+ * of the Projector interface.
+ */
+ at RegistryInfo(extension=Projector.class)
+public class DefaultProjector implements Projector {
+
+	/**
+	 * This is the default constructor for the projector.
+	 */
+	public DefaultProjector() {
+	}
+	
+	/**
+	 * This method projects the supplied model based on the
+	 * specified role.
+	 * 
+	 * @param ref The model reference
+	 * @param model The model
+	 * @param role The role
+	 * @param l The model listener
+	 * @return The projected model
+	 */
+	public Model project(ModelReference ref, Model model, Role role,
+						ModelListener l) {
+		return(project(ref, model, null, role, l));
+	}
+
+	/**
+	 * This method projects the supplied model based on the
+	 * specified role. This version takes the additional
+	 * 'subDefinitionPath' to locate the specific definition
+	 * that should be projected to the specified role.
+	 * 
+	 * @param ref The model reference
+	 * @param model The model
+	 * @param subDefinitionPath The optional sub-definition path
+	 * @param role The role
+	 * @param l The model listener
+	 * @return The projected model
+	 */
+	public Model project(ModelReference ref, Model model,
+			SubDefinitionPath subDefinitionPath, Role role,
+						ModelListener l) {
+		Model ret=null;
+		
+		DefaultProjectorContext context=new DefaultProjectorContext(ref,
+								subDefinitionPath);
+		ModelObject obj=context.project(model, role, l);
+		
+		if (obj != null) {
+			if (obj instanceof Model) {
+				ret = (Model)obj;
+			} else {
+				String modelName=model.getNamespace().getName();
+				
+				java.util.List<Definition> defns=model.getDefinitions();
+				for (int i=0; i < defns.size(); i++) {
+					modelName += "("+defns.get(i).getLocatedName().getName();
+					
+					if (defns.get(i).getLocatedName().getRole() != null) {
+						modelName += ","+defns.get(i).getLocatedName().getRole();
+					}
+					
+					modelName += ")";
+				}
+				
+				l.error(new ModelIssue(model, org.scribble.util.MessageUtil.format(
+						java.util.PropertyResourceBundle.getBundle("org.scribble.validation.Messages"),
+						"_NOT_PROJECTED_MODEL",
+						new String[]{modelName})));
+			}
+		}
+		
+		return(ret);
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/projector/DefaultProjectorContext.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/projector/DefaultProjectorContext.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/projector/DefaultProjectorContext.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,208 @@
+/*
+ * Copyright 2007 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 18 Nov 2007 : Initial version created by gary
+ */
+package org.scribble.projector;
+
+import java.util.logging.Logger;
+
+import org.scribble.model.*;
+import org.scribble.model.admin.ModelListener;
+import org.scribble.util.Scope;
+
+/**
+ * This class represents the default projection context.
+ */
+public class DefaultProjectorContext implements ProjectorContext {
+
+	/**
+	 * This is the default constructor for the projection context.
+	 * 
+	 * @param ref The model reference being projected
+	 * @param subDefinitionPath The sub definition path
+	 */
+	public DefaultProjectorContext(ModelReference ref,
+			SubDefinitionPath subDefinitionPath) {
+		
+		java.util.List<Object> rules=
+			org.scribble.extensions.RegistryFactory.getRegistry().
+						getExtensions(ProjectorRule.class, ref.getNotation());
+		
+		// Transfer to typed list
+		for (int i=0; i < rules.size(); i++) {
+			if (rules.get(i) instanceof ProjectorRule) {
+				m_rules.add((ProjectorRule)rules.get(i));
+			}
+		}
+		
+		m_subDefinitionPath = subDefinitionPath;
+		
+		if (m_subDefinitionPath == null) {
+			m_subDefinitionPath = new SubDefinitionPath();
+		}
+	}
+	
+	/**
+	 * This method projects the supplied model object based on the
+	 * specified role.
+	 * 
+	 * @param model The model object
+	 * @param role The role
+	 * @param l The model listener
+	 * @return The projected model object
+	 */
+	public ModelObject project(ModelObject model, Role role,
+						ModelListener l) {
+		ModelObject ret=null;
+		
+		for (int i=0; model != null && ret == null && i < getRules().size(); i++) {
+			if (getRules().get(i).isSupported(model)) {
+				ret = getRules().get(i).project(this, model, role,
+								l);
+			}
+		}
+				
+		return(ret);
+	}
+		
+	/**
+	 * This method returns a list of projection rules.
+	 * 
+	 * @return The list of projection rules
+	 */
+	public java.util.List<ProjectorRule> getRules() {
+		return(m_rules);
+	}
+	
+	/**
+	 * This method returns the named state from the current
+	 * scope.
+	 * 
+	 * @param name The state name
+	 * @return The state value, or null if not found
+	 */
+	public Object getState(String name) {
+		return(m_scope.getState(name));
+	}
+	
+	/**
+	 * This method sets the value associated with the supplied
+	 * name in the current state scope.
+	 * 
+	 * @param name The state name
+	 * @param value The state value
+	 */
+	public void setState(String name, Object value) {
+		m_scope.setState(name, value);
+	}
+
+	/**
+	 * This method pushes the current state onto a stack.
+	 */
+	public void pushState() {
+		m_scope.pushState();
+	}
+	
+	/**
+	 * This method pops the current state from the stack.
+	 */
+	public void popState() {
+		m_scope.popState();
+	}
+		
+	/**
+	 * This method pushes the current scope onto a stack.
+	 */
+	public void pushScope() {
+		m_scopeStack.add(0, m_scope);
+		m_scope = new Scope();
+	}
+	
+	/**
+	 * This method pops the current scope from the stack.
+	 */
+	public void popScope() {
+		if (m_scopeStack.size() > 0) {
+			m_scope = m_scopeStack.remove(0);
+		} else {
+			logger.severe("No state entry to pop from stack");
+		}
+	}
+	
+	/**
+	 * This method determines whether the context is associated
+	 * with the outer scope.
+	 * 
+	 * @return Whether the context is for the outer scope
+	 */
+	public boolean isOuterScope() {
+		return(m_scopeStack.size() < 1);
+	}
+
+	/**
+	 * This method registers an interest in the projected role
+	 * associated with the supplied definition.
+	 * 
+	 * @param defn The definition
+	 * @param role The projected role of interest
+	 */
+	public void registerInterest(Definition defn, Role role) {
+		java.util.List<Role> roles=m_definitionRoleMap.get(defn);
+		
+		if (roles == null) {
+			roles = new java.util.Vector<Role>();
+			m_definitionRoleMap.put(defn, roles);
+		}
+		
+		if (roles.contains(role) == false) {
+			roles.add(role);
+		}
+	}
+	
+	/**
+	 * This method returns the list of roles of interest
+	 * for the supplied definition.
+	 * 
+	 * @param defn The definition
+	 * @return The list of roles, or null if no roles have
+	 * 				registered interest in the definition
+	 */
+	public java.util.List<Role> getRolesOfInterestForDefinition(Definition defn) {
+		return(m_definitionRoleMap.get(defn));
+	}
+	
+	/**
+	 * This method returns the sub definition path being
+	 * projected. If the list is empty, then the top level
+	 * definition will be used.
+	 * 
+	 * @return The sub definition path
+	 */
+	public SubDefinitionPath getSubDefinitionPath() {
+		return(m_subDefinitionPath);
+	}
+	
+	private static Logger logger = Logger.getLogger("org.scribble.projector");
+
+	private java.util.List<ProjectorRule> m_rules=new java.util.Vector<ProjectorRule>();
+	private Scope m_scope=new Scope();
+	private java.util.List<Scope> m_scopeStack=new java.util.Vector<Scope>();
+	private java.util.Map<Definition,java.util.List<Role>> m_definitionRoleMap=
+					new java.util.HashMap<Definition,java.util.List<Role>>();
+	private SubDefinitionPath m_subDefinitionPath=null;
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/projector/ImplementsReferenceProjectorRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/projector/ImplementsReferenceProjectorRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/projector/ImplementsReferenceProjectorRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,100 @@
+/*
+ * Copyright 2007-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 20 Mar 2008 : Initial version created by gary
+ */
+package org.scribble.projector;
+
+import org.scribble.extensions.RegistryInfo;
+import org.scribble.model.*;
+import org.scribble.model.admin.ModelListener;
+
+/**
+ * This class provides the ImplementsReference implementation of the
+ * projector rule.
+ */
+ at RegistryInfo(extension=ProjectorRule.class)
+public class ImplementsReferenceProjectorRule extends ModelReferenceProjectorRule {
+
+	/**
+	 * This is the default constructor.
+	 */
+	public ImplementsReferenceProjectorRule() {
+		super(true);
+	}
+	
+	/**
+	 * This method determines whether the projection rule is
+	 * appropriate for the supplied model object.
+	 * 
+	 * @param obj The model object to be projected
+	 * @return Whether the rule is relevant for the
+	 * 				model object
+	 */
+	public boolean isSupported(ModelObject obj) {
+		return(obj.getClass() == ImplementsReference.class);
+	}
+	
+	/**
+	 * This method returns the new reference instance.
+	 * 
+	 * @param source The source reference
+	 * @return The model reference
+	 */
+	protected ModelReference createReference(ModelReference source) {
+		return(new ImplementsReference(source.getNotation()));
+	}
+	
+	/**
+	 * This method projects the supplied model object based on the
+	 * specified role.
+	 * 
+	 * @param model The model object
+	 * @param role The role
+	 * @param l The model listener
+	 * @return The projected model object
+	 */
+	public ModelObject project(ProjectorContext context, ModelObject model,
+					Role role, ModelListener l) {
+		ImplementsReference source=(ImplementsReference)model;
+
+		ImplementsReference ret=(ImplementsReference)super.project(context,
+				model, role, l);
+		
+		// Project name mapping
+		java.util.Map<String,String> mapping=source.getNameMapping();
+		String mappedName=null;
+		
+		java.util.Iterator<String> iter=mapping.keySet().iterator();
+		while (iter.hasNext()) {
+			String key=iter.next();
+			String value=mapping.get(key);
+			
+			ret.getNameMapping().put(key, value);
+			
+			if (role.getName().equals(value)) {
+				mappedName = key;
+			}
+		}
+		
+		if (mappedName != null) {
+			ret.setLocatedRole(mappedName);
+		}
+
+		return(ret);
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/projector/ImportProjectorRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/projector/ImportProjectorRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/projector/ImportProjectorRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,67 @@
+/*
+ * Copyright 2007 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 19 Nov 2007 : Initial version created by gary
+ */
+package org.scribble.projector;
+
+import org.scribble.extensions.RegistryInfo;
+import org.scribble.model.*;
+import org.scribble.model.admin.ModelListener;
+
+/**
+ * This class provides the Import implementation of the
+ * projector rule.
+ */
+ at RegistryInfo(extension=ProjectorRule.class)
+public class ImportProjectorRule implements ProjectorRule {
+
+	/**
+	 * This method determines whether the projection rule is
+	 * appropriate for the supplied model object.
+	 * 
+	 * @param obj The model object to be projected
+	 * @return Whether the rule is relevant for the
+	 * 				model object
+	 */
+	public boolean isSupported(ModelObject obj) {
+		return(obj.getClass() == Import.class);
+	}
+	
+	/**
+	 * This method projects the supplied model object based on the
+	 * specified role.
+	 * 
+	 * @param model The model object
+	 * @param role The role
+	 * @param l The model listener
+	 * @return The projected model object
+	 */
+	public ModelObject project(ProjectorContext context, ModelObject model,
+					Role role, ModelListener l) {
+		Import ret=new Import();
+		Import source=(Import)model;
+		
+		ret.setName(source.getName());
+		
+		if (source.getAlias() != null) {
+			ret.setAlias(source.getAlias());
+		}
+		
+		return(ret);
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/projector/InteractionProjectorRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/projector/InteractionProjectorRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/projector/InteractionProjectorRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,155 @@
+/*
+ * Copyright 2007 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 19 Nov 2007 : Initial version created by gary
+ */
+package org.scribble.projector;
+
+import org.scribble.extensions.RegistryInfo;
+import org.scribble.model.*;
+import org.scribble.model.admin.ModelListener;
+
+/**
+ * This class provides the Interaction implementation of the
+ * projector rule.
+ */
+ at RegistryInfo(extension=ProjectorRule.class)
+public class InteractionProjectorRule implements ProjectorRule {
+
+	/**
+	 * This method determines whether the projection rule is
+	 * appropriate for the supplied model object.
+	 * 
+	 * @param obj The model object to be projected
+	 * @return Whether the rule is relevant for the
+	 * 				model object
+	 */
+	public boolean isSupported(ModelObject obj) {
+		return(obj.getClass() == Interaction.class);
+	}
+	
+	/**
+	 * This method returns a new instance of the interaction model
+	 * object.
+	 * 
+	 * @return The new interaction
+	 */
+	protected Interaction createInteraction() {
+		return(new Interaction());
+	}
+	
+	/**
+	 * This method projects the supplied model object based on the
+	 * specified role.<p>
+	 * 
+	 * @param model The model object
+	 * @param role The role
+	 * @param l The model listener
+	 * @return The projected model object
+	 */
+	public ModelObject project(ProjectorContext context, ModelObject model,
+					Role role, ModelListener l) {
+		Interaction ret=createInteraction();
+		Interaction source=(Interaction)model;
+		boolean f_roleFound=false;
+		
+		ret.derivedFrom(source);
+
+		if (source.getRequestLabel() != null) {
+			ret.setRequestLabel(source.getRequestLabel());
+		}
+		
+		if (source.getReplyToLabel() != null) {
+			ret.setReplyToLabel(source.getReplyToLabel());
+		}
+		
+		if (source.getFromRole() != null) {
+			
+			if (source.getFromRole().equals(role)) {				
+				f_roleFound = true;
+			} else {
+				// Only set role if not projected role
+				// Find role in state
+				Object state=context.getState(source.getFromRole().getName());
+				
+				if (state instanceof Role) {
+					Role r=new Role();
+					r.setName(source.getFromRole().getName());
+					
+					r.derivedFrom(source.getFromRole());
+					
+					ret.setFromRole(r);
+				}
+			}
+		}
+		
+		if (source.getToRole() != null) {
+			
+			if (source.getToRole().equals(role)) {
+				f_roleFound = true;
+			} else {
+				// Only set role if not projected role
+				// Find role in state
+				Object state=context.getState(source.getToRole().getName());
+				
+				if (state instanceof Role) {
+					Role r=new Role();
+					r.setName(source.getToRole().getName());
+					
+					r.derivedFrom(source.getToRole());
+					
+					ret.setToRole(r);
+				}
+			}
+		}
+		
+		if (source.getChannel() != null) {
+			
+			// Find channel in state
+			Object state=context.getState(source.getChannel().getName());
+			
+			if (state instanceof Channel) {
+				Channel c=new Channel();
+				c.setName(source.getChannel().getName());
+				
+				c.derivedFrom(source.getChannel());
+				
+				ret.setChannel(c);
+			}
+			
+			if (source.getChannel().getFromRole() != null &&
+					source.getChannel().getFromRole().equals(role)) {
+				f_roleFound = true;
+			} else if (source.getChannel().getToRole() != null &&
+					source.getChannel().getToRole().equals(role)) {
+				f_roleFound = true;
+			}
+		}
+		
+		// Check if role found
+		if (f_roleFound) {
+			ret.setMessageSignature((MessageSignature)
+					context.project(source.getMessageSignature(),
+							role, l));
+		} else {
+			// Role not associated with the interaction
+			ret = null;
+		}
+		
+		return(ret);
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/projector/LocatedNameProjectorRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/projector/LocatedNameProjectorRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/projector/LocatedNameProjectorRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,67 @@
+/*
+ * Copyright 2007 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 19 Nov 2007 : Initial version created by gary
+ */
+package org.scribble.projector;
+
+import org.scribble.extensions.RegistryInfo;
+import org.scribble.model.*;
+import org.scribble.model.admin.ModelListener;
+
+/**
+ * This class provides the LocatedName implementation of the
+ * projector rule.
+ */
+ at RegistryInfo(extension=ProjectorRule.class)
+public class LocatedNameProjectorRule implements ProjectorRule {
+
+	/**
+	 * This method determines whether the projection rule is
+	 * appropriate for the supplied model object.
+	 * 
+	 * @param obj The model object to be projected
+	 * @return Whether the rule is relevant for the
+	 * 				model object
+	 */
+	public boolean isSupported(ModelObject obj) {
+		return(obj.getClass() == LocatedName.class);
+	}
+	
+	/**
+	 * This method projects the supplied model object based on the
+	 * specified role.
+	 * 
+	 * @param model The model object
+	 * @param role The role
+	 * @param l The model listener
+	 * @return The projected model object
+	 */
+	public ModelObject project(ProjectorContext context, ModelObject model,
+					Role role, ModelListener l) {
+		LocatedName ret=new LocatedName();
+		LocatedName source=(LocatedName)model;
+		
+		ret.setName(source.getName());
+		
+		Role located=(Role)context.project(role, role, l);
+
+		ret.setRole(located);
+		
+		return(ret);
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/projector/MessageSignatureProjectorRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/projector/MessageSignatureProjectorRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/projector/MessageSignatureProjectorRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,75 @@
+/*
+ * Copyright 2007 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 19 Nov 2007 : Initial version created by gary
+ */
+package org.scribble.projector;
+
+import org.scribble.extensions.RegistryInfo;
+import org.scribble.model.*;
+import org.scribble.model.admin.ModelListener;
+
+/**
+ * This class provides the MessageSignature implementation of the
+ * projector rule.
+ */
+ at RegistryInfo(extension=ProjectorRule.class)
+public class MessageSignatureProjectorRule implements ProjectorRule {
+
+	/**
+	 * This method determines whether the projection rule is
+	 * appropriate for the supplied model object.
+	 * 
+	 * @param obj The model object to be projected
+	 * @return Whether the rule is relevant for the
+	 * 				model object
+	 */
+	public boolean isSupported(ModelObject obj) {
+		return(obj.getClass() == MessageSignature.class);
+	}
+	
+	/**
+	 * This method projects the supplied model object based on the
+	 * specified role.
+	 * 
+	 * @param model The model object
+	 * @param role The role
+	 * @param l The model listener
+	 * @return The projected model object
+	 */
+	public ModelObject project(ProjectorContext context, ModelObject model,
+					Role role, ModelListener l) {
+		MessageSignature ret=new MessageSignature();
+		MessageSignature source=(MessageSignature)model;
+		
+		ret.derivedFrom(source);
+		
+		ret.setOperation(source.getOperation());
+		
+		for (int i=0; i < source.getTypes().size(); i++) {
+			TypeReference ref=(TypeReference)
+					context.project(source.getTypes().get(i),
+							role, l);
+			
+			if (ref != null) {
+				ret.getTypes().add(ref);
+			}
+		}
+		
+		return(ret);
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/projector/Messages.properties
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/projector/Messages.properties	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/projector/Messages.properties	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,21 @@
+# /*
+# * Copyright 2007 Pi4 Technologies Ltd
+# *
+# * Licensed under the Apache License, Version 2.0 (the "License");
+# * you may not use this file except in compliance with the License.
+# * You may obtain a copy of the License at
+# *
+# *     http://www.apache.org/licenses/LICENSE-2.0
+# *
+# * Unless required by applicable law or agreed to in writing, software
+# * distributed under the License is distributed on an "AS IS" BASIS,
+# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# * See the License for the specific language governing permissions and
+# * limitations under the License.
+# *
+# *
+# * Change History:
+# * 18 Nov 2007 : Initial version created by gary
+# */
+
+_NOT_PROJECTED_MODEL=Model '{0}' was not projected to another model
\ No newline at end of file

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/projector/ModelIncludeProjectorRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/projector/ModelIncludeProjectorRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/projector/ModelIncludeProjectorRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,85 @@
+/*
+ * Copyright 2007 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 7 Dec 2007 : Initial version created by gary
+ */
+package org.scribble.projector;
+
+import org.scribble.model.*;
+import org.scribble.model.admin.ModelListener;
+
+/**
+ * This abstract class provides the ModelInclude implementation of the
+ * projector rule.
+ */
+public abstract class ModelIncludeProjectorRule implements ProjectorRule {
+
+	/**
+	 * This method creates the model include object being projected.
+	 * 
+	 * @return The model include
+	 */
+	protected abstract ModelInclude createModelInclude();
+	
+	/**
+	 * This method projects the supplied model object based on the
+	 * specified role.
+	 * 
+	 * @param model The model object
+	 * @param role The role
+	 * @param l The model listener
+	 * @return The projected model object
+	 */
+	public ModelObject project(ProjectorContext context, ModelObject model,
+					Role role, ModelListener l) {
+		ModelInclude ret=createModelInclude();
+		ModelInclude source=(ModelInclude)model;
+		
+		ret.derivedFrom(source);
+		
+		java.util.Iterator<DeclarationBinding> iter=
+					source.getBindings().iterator();
+		while (iter.hasNext()) {
+			DeclarationBinding db=iter.next();
+			
+			// Don't project declaration if same as role - this
+			// will be done in the model include statement,
+			// not the bindings
+			if (db.getDeclaration() != role) {
+				
+				// Find declaration in local projected context
+				Object localDecl=context.getState(db.getDeclaration().getName());
+				
+				if (localDecl instanceof Declaration) {
+					DeclarationBinding dbcopy=
+						new DeclarationBinding((Declaration)localDecl,
+									db.getBoundName());
+					
+					dbcopy.derivedFrom(db);
+					
+					ret.getBindings().add(dbcopy);
+				} else {
+					
+					// TODO: What should happen if not declaration,
+					// or not found?
+				}
+			}
+		}
+		
+		return(ret);
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/projector/ModelProjectorRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/projector/ModelProjectorRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/projector/ModelProjectorRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,75 @@
+/*
+ * Copyright 2007 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 19 Nov 2007 : Initial version created by gary
+ */
+package org.scribble.projector;
+
+import org.scribble.model.*;
+import org.scribble.model.admin.ModelListener;
+
+/**
+ * This class provides the abstract Model implementation of the
+ * projector rule.
+ */
+public abstract class ModelProjectorRule implements ProjectorRule {
+
+	/**
+	 * This method creates the model instance being projected.
+	 * 
+	 * @return The new model
+	 */
+	protected abstract Model createModel();
+		
+	/**
+	 * This method projects the supplied model object based on the
+	 * specified role.
+	 * 
+	 * @param model The model object
+	 * @param role The role
+	 * @param l The model listener
+	 * @return The projected model object
+	 */
+	public ModelObject project(ProjectorContext context, ModelObject model,
+					Role role, ModelListener l) {
+		Model ret=createModel();
+		Model source=(Model)model;
+		
+		Namespace ns=null;
+		
+		if (source.getNamespace() != null) {
+			ns = (Namespace)context.project(source.getNamespace(),
+					role, l);
+		}
+		
+		ret.setNamespace(ns);
+		
+		// Project import statements
+		for (int i=0; i < source.getImports().size(); i++) {
+			
+			Import newImport=(Import)
+					context.project(source.getImports().get(i),
+								role, l);
+			
+			if (newImport != null) {
+				ret.getImports().add(newImport);
+			}
+		}
+		
+		return(ret);
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/projector/ModelReferenceProjectorRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/projector/ModelReferenceProjectorRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/projector/ModelReferenceProjectorRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,101 @@
+/*
+ * Copyright 2007 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 19 Nov 2007 : Initial version created by gary
+ */
+package org.scribble.projector;
+
+import org.scribble.extensions.RegistryFactory;
+import org.scribble.model.*;
+import org.scribble.model.admin.ModelListener;
+import org.scribble.model.admin.ModelRepository;
+
+/**
+ * This class provides the abstract ModelReference implementation of the
+ * projector rule.
+ */
+public abstract class ModelReferenceProjectorRule implements ProjectorRule {
+
+	public ModelReferenceProjectorRule(boolean locatedRoleProjected) {
+		m_locatedRoleProjected = locatedRoleProjected;
+	}
+	
+	/**
+	 * This method returns the new reference instance.
+	 * 
+	 * @param source The source reference
+	 * @return The model reference
+	 */
+	protected abstract ModelReference createReference(ModelReference source);
+		
+	/**
+	 * This method projects the supplied model object based on the
+	 * specified role.
+	 * 
+	 * @param model The model object
+	 * @param role The role
+	 * @param l The model listener
+	 * @return The projected model object
+	 */
+	public ModelObject project(ProjectorContext context, ModelObject model,
+					Role role, ModelListener l) {
+		ModelReference source=(ModelReference)model;
+		ModelReference ret=(ModelReference)createReference(source);
+		
+		ret.derivedFrom(source);
+
+		// Make full copy of model reference - if projection
+		// needs to change located role, then this should be
+		// done in the context of where the reference is used
+		ret.setAlias(source.getAlias());
+		ret.setLocalpart(source.getLocalpart());
+		ret.setNamespace(source.getNamespace());
+		
+		ret.setFullyQualified(source.isFullyQualified());
+		ret.setInner(source.isInner());
+		ret.setNotation(source.getNotation());
+		
+		if (isLocatedRoleProjected()) {
+			ret.setLocatedRole(role.getName());
+		} else {
+			ret.setLocatedRole(source.getLocatedRole());
+		}
+		
+		// Located the reference based on the source
+		ModelRepository mrep=(ModelRepository)
+				RegistryFactory.getRegistry().getExtension(
+						ModelRepository.class, null);
+
+		if (mrep != null) {
+			mrep.locate(ret, source);
+		}
+		
+		return(ret);
+	}
+	
+	/**
+	 * This method determines whether the located role
+	 * should be projected.
+	 * 
+	 * @return Whether the located role should be projected
+	 */
+	protected boolean isLocatedRoleProjected() {
+		return(m_locatedRoleProjected);
+	}
+	
+	private boolean m_locatedRoleProjected=false;
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/projector/NamespaceProjectorRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/projector/NamespaceProjectorRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/projector/NamespaceProjectorRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,63 @@
+/*
+ * Copyright 2007 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 18 Nov 2007 : Initial version created by gary
+ */
+package org.scribble.projector;
+
+import org.scribble.extensions.RegistryInfo;
+import org.scribble.model.*;
+import org.scribble.model.admin.ModelListener;
+
+/**
+ * This class provides the Namespace implementation of the
+ * projector rule.
+ */
+ at RegistryInfo(extension=ProjectorRule.class)
+public class NamespaceProjectorRule implements ProjectorRule {
+
+	/**
+	 * This method determines whether the projection rule is
+	 * appropriate for the supplied model object.
+	 * 
+	 * @param obj The model object to be projected
+	 * @return Whether the rule is relevant for the
+	 * 				model object
+	 */
+	public boolean isSupported(ModelObject obj) {
+		return(obj.getClass() == Namespace.class);
+	}
+	
+	/**
+	 * This method projects the supplied model object based on the
+	 * specified role.
+	 * 
+	 * @param model The model object
+	 * @param role The role
+	 * @param l The model listener
+	 * @return The projected model object
+	 */
+	public ModelObject project(ProjectorContext context, ModelObject model,
+					Role role, ModelListener l) {
+		Namespace ret=new Namespace();
+		Namespace source=(Namespace)model;
+		
+		ret.setName(source.getName());
+		
+		return(ret);
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/projector/Projector.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/projector/Projector.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/projector/Projector.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,62 @@
+/*
+ * Copyright 2007 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 18 Nov 2007 : Initial version created by gary
+ */
+package org.scribble.projector;
+
+import org.scribble.model.*;
+import org.scribble.model.admin.ModelListener;
+
+/**
+ * This interface represents the component for projecting
+ * a global model to a local model associated with a
+ * role.
+ */
+public interface Projector {
+
+	/**
+	 * This method projects the supplied model based on the
+	 * specified role.
+	 * 
+	 * @param ref The model reference
+	 * @param model The model
+	 * @param role The role
+	 * @param l The model listener
+	 * @return The projected model
+	 */
+	public Model project(ModelReference ref, Model model, Role role,
+						ModelListener l);
+	
+	/**
+	 * This method projects the supplied model based on the
+	 * specified role. This version takes the additional
+	 * 'subDefinitionPath' to locate the specific definition
+	 * that should be projected to the specified role.
+	 * 
+	 * @param ref The model reference
+	 * @param model The model
+	 * @param subDefinitionPath The optional sub-definition path
+	 * @param role The role
+	 * @param l The model listener
+	 * @return The projected model
+	 */
+	public Model project(ModelReference ref, Model model,
+			SubDefinitionPath subDefinitionPath, Role role,
+						ModelListener l);
+	
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/projector/ProjectorContext.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/projector/ProjectorContext.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/projector/ProjectorContext.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,116 @@
+/*
+ * Copyright 2007 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 18 Nov 2007 : Initial version created by gary
+ */
+package org.scribble.projector;
+
+import org.scribble.model.*;
+import org.scribble.model.admin.ModelListener;
+
+/**
+ * This interface represents the comparator context.
+ */
+public interface ProjectorContext {
+	
+	/**
+	 * This method projects the supplied model object based on the
+	 * specified role.
+	 * 
+	 * @param model The model object
+	 * @param role The role
+	 * @param l The model listener
+	 * @return The projected model object
+	 */
+	public ModelObject project(ModelObject model, Role role,
+						ModelListener l);
+	
+	/**
+	 * This method returns the named state from the current
+	 * scope.
+	 * 
+	 * @param name The state name
+	 * @return The state value, or null if not found
+	 */
+	public Object getState(String name);
+	
+	/**
+	 * This method sets the value associated with the supplied
+	 * name in the current state.
+	 * 
+	 * @param name The state name
+	 * @param value The state value
+	 */
+	public void setState(String name, Object value);
+	
+	/**
+	 * This method pushes the current state onto a stack.
+	 */
+	public void pushState();
+	
+	/**
+	 * This method pops the current state from the stack.
+	 */
+	public void popState();
+	
+	/**
+	 * This method pushes the current scope onto a stack.
+	 */
+	public void pushScope();
+	
+	/**
+	 * This method pops the current scope from the stack.
+	 */
+	public void popScope();
+	
+	/**
+	 * This method determines whether the context is associated
+	 * with the outer scope.
+	 * 
+	 * @return Whether the context is for the outer scope
+	 */
+	public boolean isOuterScope();
+	
+	/**
+	 * This method registers an interest in the projected role
+	 * associated with the supplied definition.
+	 * 
+	 * @param defn The definition
+	 * @param role The projected role of interest
+	 */
+	public void registerInterest(Definition defn, Role role);
+	
+	/**
+	 * This method returns the list of roles of interest
+	 * for the supplied definition.
+	 * 
+	 * @param defn The definition
+	 * @return The list of roles, or null if no roles have
+	 * 				registered interest in the definition
+	 */
+	public java.util.List<Role> getRolesOfInterestForDefinition(Definition defn);
+	
+	/**
+	 * This method returns the sub definition path being
+	 * projected. If the list is empty, then the top level
+	 * definition will be used.
+	 * 
+	 * @return The sub definition path
+	 */
+	public SubDefinitionPath getSubDefinitionPath();
+	
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/projector/ProjectorRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/projector/ProjectorRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/projector/ProjectorRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,53 @@
+/*
+ * Copyright 2007 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 18 Nov 2007 : Initial version created by gary
+ */
+package org.scribble.projector;
+
+import org.scribble.model.*;
+import org.scribble.model.admin.ModelListener;
+
+/**
+ * This interface represents the projection rule used to
+ * derive another model object associated with a role.
+ */
+public interface ProjectorRule {
+
+	/**
+	 * This method determines whether the projection rule is
+	 * appropriate for the supplied model object.
+	 * 
+	 * @param obj The model object to be projected
+	 * @return Whether the rule is relevant for the
+	 * 				model object
+	 */
+	public boolean isSupported(ModelObject obj);
+	
+	/**
+	 * This method projects the supplied model object based on the
+	 * specified role.
+	 * 
+	 * @param model The model object
+	 * @param role The role
+	 * @param l The model listener
+	 * @return The projected model object
+	 */
+	public ModelObject project(ProjectorContext context, ModelObject model,
+					Role role, ModelListener l);
+	
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/projector/RoleListProjectorRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/projector/RoleListProjectorRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/projector/RoleListProjectorRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,71 @@
+/*
+ * Copyright 2007 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 19 Nov 2007 : Initial version created by gary
+ */
+package org.scribble.projector;
+
+import org.scribble.extensions.RegistryInfo;
+import org.scribble.model.*;
+import org.scribble.model.admin.ModelListener;
+
+/**
+ * This class provides the RoleList implementation of the
+ * projector rule.
+ */
+ at RegistryInfo(extension=ProjectorRule.class)
+public class RoleListProjectorRule implements ProjectorRule {
+
+	/**
+	 * This method determines whether the projection rule is
+	 * appropriate for the supplied model object.
+	 * 
+	 * @param obj The model object to be projected
+	 * @return Whether the rule is relevant for the
+	 * 				model object
+	 */
+	public boolean isSupported(ModelObject obj) {
+		return(obj.getClass() == RoleList.class);
+	}
+	
+	/**
+	 * This method projects the supplied model object based on the
+	 * specified role.
+	 * 
+	 * @param model The model object
+	 * @param role The role
+	 * @param l The model listener
+	 * @return The projected model object
+	 */
+	public ModelObject project(ProjectorContext context, ModelObject model,
+					Role role, ModelListener l) {
+		RoleList ret=new RoleList();
+		RoleList source=(RoleList)model;
+		
+		for (int i=0; i < source.getRoles().size(); i++) {
+			if (source.getRoles().get(i).equals(role) == false) {
+				Role p=(Role)context.project(source.getRoles().get(i), role, l);
+
+				if (p != null) {
+					ret.getRoles().add(p);
+				}
+			}
+		}
+		
+		return(ret);
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/projector/RoleProjectorRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/projector/RoleProjectorRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/projector/RoleProjectorRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,68 @@
+/*
+ * Copyright 2007-9 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 2 Oct 2009 : Initial version created by gary
+ */
+package org.scribble.projector;
+
+import org.scribble.extensions.RegistryInfo;
+import org.scribble.model.*;
+import org.scribble.model.admin.ModelListener;
+
+/**
+ * This class provides the Role implementation of the
+ * projector rule.
+ */
+ at RegistryInfo(extension=ProjectorRule.class)
+public class RoleProjectorRule implements ProjectorRule {
+
+	/**
+	 * This method determines whether the projection rule is
+	 * appropriate for the supplied model object.
+	 * 
+	 * @param obj The model object to be projected
+	 * @return Whether the rule is relevant for the
+	 * 				model object
+	 */
+	public boolean isSupported(ModelObject obj) {
+		return(obj.getClass() == Role.class);
+	}
+	
+	/**
+	 * This method projects the supplied model object based on the
+	 * specified role.
+	 * 
+	 * @param model The model object
+	 * @param role The role
+	 * @param l The model listener
+	 * @return The projected model object
+	 */
+	public ModelObject project(ProjectorContext context, ModelObject model,
+					Role role, ModelListener l) {
+		Role ret=new Role();
+		Role source=(Role)model;
+		
+		ret.derivedFrom(source);
+				
+		ret.setName(source.getName());
+				
+		// Add to state
+		context.setState(ret.getName(), ret);
+		
+		return(ret);
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/projector/TypeReferenceProjectorRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/projector/TypeReferenceProjectorRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/projector/TypeReferenceProjectorRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,79 @@
+/*
+ * Copyright 2007 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 19 Nov 2007 : Initial version created by gary
+ */
+package org.scribble.projector;
+
+import org.scribble.extensions.RegistryInfo;
+import org.scribble.model.*;
+import org.scribble.model.admin.ModelListener;
+
+/**
+ * This class provides the TypeReference implementation of the
+ * projector rule.
+ */
+ at RegistryInfo(extension=ProjectorRule.class)
+public class TypeReferenceProjectorRule extends ModelReferenceProjectorRule {
+
+	/**
+	 * This is the default constructor.
+	 */
+	public TypeReferenceProjectorRule() {
+		super(false);
+	}
+	
+	/**
+	 * This method determines whether the projection rule is
+	 * appropriate for the supplied model object.
+	 * 
+	 * @param obj The model object to be projected
+	 * @return Whether the rule is relevant for the
+	 * 				model object
+	 */
+	public boolean isSupported(ModelObject obj) {
+		return(obj.getClass() == TypeReference.class);
+	}
+	
+	/**
+	 * This method returns the new reference instance.
+	 * 
+	 * @param source The source reference
+	 * @return The model reference
+	 */
+	protected ModelReference createReference(ModelReference source) {
+		return(new TypeReference());
+	}
+	
+	/**
+	 * This method projects the supplied model object based on the
+	 * specified role.
+	 * 
+	 * @param model The model object
+	 * @param role The role
+	 * @param l The model listener
+	 * @return The projected model object
+	 */
+	public ModelObject project(ProjectorContext context, ModelObject model,
+					Role role, ModelListener l) {
+		TypeReference ret=(TypeReference)super.project(context,
+									model, role, l);
+		//TypeReference source=(TypeReference)model;
+				
+		return(ret);
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/util/MessageUtil.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/util/MessageUtil.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/util/MessageUtil.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,101 @@
+/*
+ * Copyright 2007 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 28 Oct 2007 : Initial version created by gary
+ */
+package org.scribble.util;
+
+/**
+ * This class provides utility functions related to
+ * messages.
+ * 
+ */
+public class MessageUtil {
+
+	/**
+	 * This method formats the message associated with the supplied
+	 * bundle and key using the supplied parameters.
+	 * 
+	 * @param bundle The bundle of message resources
+	 * @param key The message key
+	 * @param params The list of parameters
+	 * @return The formatted text
+	 */
+	public static String format(java.util.ResourceBundle bundle, String key,
+						String[] params) {
+		String ret=null;
+		
+		String mesg=bundle.getString(key);
+	
+		ret = format(mesg, params);
+					
+		return(ret);
+	}
+	
+	/**
+	 * This method formats the supplied text using the supplied
+	 * parameters.
+	 * 
+	 * @param mesg The message text
+	 * @param params The list of parameters
+	 * @return The formatted text
+	 */
+	public static String format(String mesg, String[] params) {
+		
+		String ret="";
+		int pos=0;
+		int prev=0;
+		String nextToken=INDEX_START;
+		
+		while ((pos=mesg.indexOf(nextToken, pos)) != -1) {
+			String token=mesg.substring(prev, pos);
+			
+			if (nextToken == INDEX_START) {
+				ret += token;
+				nextToken = INDEX_END;
+			} else if (nextToken == INDEX_END){
+				int index=-1;
+				
+				try {
+					index = Integer.valueOf(token).intValue();
+				} catch(Exception e) {
+					// Ignore
+				}
+				
+				if (params != null && index >= 0 &&
+						index < params.length) {
+					ret += params[index];
+				} else {
+					ret += INDEX_START+index+INDEX_END;
+				}
+				
+				nextToken = INDEX_START;
+			}
+			
+			prev = pos+1;
+		}
+		
+		if (prev != -1) {
+			ret += mesg.substring(prev);
+		}
+		
+		return(ret);
+	}
+
+	public static final String INDEX_START="{";
+	public static final String INDEX_END="}";
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/util/ModelIssueUtil.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/util/ModelIssueUtil.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/util/ModelIssueUtil.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,151 @@
+/*
+ * Copyright 2005-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 7 Sep 2008 : Initial version created by gary
+ */
+package org.scribble.util;
+
+import org.scribble.model.admin.DefaultResolution;
+import org.scribble.model.resolutions.Resolution;
+
+/**
+ * This class provides utility functions for dealing with
+ * model issues.
+ */
+public class ModelIssueUtil {
+
+	private static final String RESOLUTION_PROPERTY_VALUE = "ResolutionPropertyValue";
+	private static final String RESOLUTION_PROPERTY_NAME = "ResolutionPropertyName";
+	private static final String RESOLUTION_NUMBER_OF_PROPERTIES = "ResolutionNumberOfProperties";
+	private static final String RESOLUTION_CLASS = "ResolutionClass";
+	private static final String NUMBER_OF_RESOLUTIONS = "NumberOfResolutions";
+
+	/**
+	 * This method serializes the resolutions associated with a
+	 * model issue.
+	 *  
+	 * @param resolutions The resolutions
+	 * @return The serialized properties
+	 */
+	public static java.util.Map<String,Object> serializeResolutions(java.util.List<Resolution> resolutions) {
+		java.util.Map<String,Object> ret=new java.util.HashMap<String, Object>();
+		
+		ret.put(NUMBER_OF_RESOLUTIONS, resolutions.size());
+			
+		for (int i=0; i < resolutions.size(); i++) {
+			Resolution res=resolutions.get(i);
+			
+			ret.put(RESOLUTION_CLASS+"-"+i, res.getResolutionClass());
+			
+			java.util.Map<String,Object> props=res.getProperties();
+			
+			ret.put(RESOLUTION_NUMBER_OF_PROPERTIES+"-"+i,
+							props.size());
+			
+			int propNo=0;
+			
+			java.util.Iterator<String> iter=props.keySet().iterator();
+			while (iter.hasNext()) {
+				String key=iter.next();
+				Object value=props.get(key);
+				
+				ret.put(RESOLUTION_PROPERTY_NAME+"-"+i+"-"+propNo, key);
+				ret.put(RESOLUTION_PROPERTY_VALUE+"-"+i+"-"+propNo, value);
+				
+				propNo++;
+			}
+		}
+		
+		return(ret);
+	}
+	
+	/**
+	 * This method deserializes the supplied properties to create
+	 * a list of resolutions.
+	 * 
+	 * @param props The properties
+	 * @return The list of resolutions
+	 */
+	public static java.util.List<Resolution> deserializeResolutions(java.util.Map<String,Object> props) {
+		java.util.List<Resolution> ret=new java.util.Vector<Resolution>();
+		
+		Object obj=props.get(NUMBER_OF_RESOLUTIONS);
+		int num=-1;
+		if (obj instanceof Integer) {
+			num = ((Integer)obj).intValue();
+		} else if (obj instanceof String) {
+			try {
+				num = Integer.parseInt((String)obj);
+			} catch(Exception e) {
+				e.printStackTrace();
+			}
+		}
+		
+		for (int i=0; i < num; i++) {
+			String clsName=(String)props.get(RESOLUTION_CLASS+"-"+i);
+			
+			Resolution res=null;
+			
+			try {
+				Class<?> cls=Class.forName(clsName);
+				
+				res = (Resolution)cls.newInstance();
+				
+			} catch(ClassNotFoundException cfne) {
+				res = new DefaultResolution();
+			} catch(Exception e) {
+				e.printStackTrace();
+			}
+
+			int propNo=0;
+			
+			obj = props.get(RESOLUTION_NUMBER_OF_PROPERTIES+"-"+i);
+			if (obj instanceof Integer) {
+				propNo = ((Integer)obj).intValue();
+			} else if (obj instanceof String) {
+				try {
+					propNo = Integer.parseInt((String)obj);
+				} catch(Exception e) {
+					e.printStackTrace();
+				}
+			}
+
+			for (int j=0; j < propNo; j++) {				
+				String key=(String)props.get(RESOLUTION_PROPERTY_NAME+"-"+i+"-"+j);
+				Object value=props.get(RESOLUTION_PROPERTY_VALUE+"-"+i+"-"+j);
+				
+				res.getProperties().put(key, value);
+			}
+			
+			ret.add(res);
+		}
+
+		return(ret);
+	}
+	
+	/**
+	 * This method determines if the supplied properties contains
+	 * the serialized information associated with a set of
+	 * resolutions.
+	 * 
+	 * @param props The properties
+	 * @return Whether resolutions have been defined
+	 */
+	public static boolean hasResolutions(java.util.Map<String,Object> props) {
+		return(props.containsKey(NUMBER_OF_RESOLUTIONS));
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/util/ResourceUtil.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/util/ResourceUtil.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/util/ResourceUtil.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,68 @@
+/*
+ * Copyright 2005-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 22 Aug 2008 : Initial version created by gary
+ */
+package org.scribble.util;
+
+public class ResourceUtil {
+
+	/**
+	 * This method returns the notation associated with the
+	 * supplied URI.
+	 * 
+	 * @param uri The URI
+	 * @return The notation, or null if an appropriate notation
+	 * 			could not be found
+	 */
+	public static org.scribble.model.Notation getNotation(String uri) {
+		org.scribble.model.Notation ret=null;
+		String ext=null;
+		String filename=null;
+		
+		// Extract extension
+		int index=uri.lastIndexOf('.');
+		
+		if (index != -1) {
+			ext = uri.substring(index+1);
+		}
+		
+		// Extract full file name
+		index = uri.lastIndexOf('/');
+		
+		if (index != -1) {
+			filename = uri.substring(index+1);
+		} else {
+			filename = uri;
+		}
+		
+		// Check if notation is available
+		java.util.List<Object> notations=
+			org.scribble.extensions.RegistryFactory.getRegistry().getExtensions(
+					org.scribble.model.Notation.class, null);
+		
+		for (int i=0; ret == null && i < notations.size(); i++) {
+			if ((ext != null &&
+				((org.scribble.model.Notation)notations.get(i)).getCode().equals(ext)) ||
+					((org.scribble.model.Notation)notations.get(i)).getCode().equals(filename)) {
+				ret = (org.scribble.model.Notation)notations.get(i);
+			}
+		}
+
+		return(ret);
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/util/Scope.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/util/Scope.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/util/Scope.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,152 @@
+/*
+ * Copyright 2007 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 1 Nov 2007 : Initial version created by gary
+ */
+package org.scribble.util;
+
+import java.util.logging.Logger;
+
+/**
+ * This class represents information associated with a scope.
+ */
+public class Scope {
+
+	/**
+	 * The default constructor for the scope.
+	 */
+	public Scope() {
+		// Initialize the state
+		pushState();
+	}
+	
+	/**
+	 * This is the copy constructor for the scope.
+	 * 
+	 * @param copy The copy
+	 */
+	public Scope(Scope copy) {
+		m_locatedRole = copy.m_locatedRole;
+		
+		for (int i=0; i < copy.m_stateStack.size(); i++) {
+			java.util.Map<String,Object> current=copy.m_stateStack.get(i);
+			
+			java.util.Map<String,Object> copyStackEntry=
+						new java.util.Hashtable<String,Object>();
+		
+			java.util.Iterator<String> iter=current.keySet().iterator();
+			
+			while (iter.hasNext()) {
+				String key=iter.next();
+				Object value=current.get(key);
+				
+				copyStackEntry.put(key, value);
+			}
+			
+			m_stateStack.add(copyStackEntry);
+		}
+	}
+	
+	/**
+	 * This method returns the named state from the current
+	 * scope.
+	 * 
+	 * @param name The state name
+	 * @return The state value, or null if not found
+	 */
+	public Object getState(String name) {
+		Object ret=null;
+		
+		if (m_stateStack.size() > 0) {
+			for (int i=0; ret == null && i < m_stateStack.size(); i++) {
+				java.util.Map<String,Object> current=m_stateStack.get(i);
+				ret = current.get(name);
+			}
+		}
+		
+		return(ret);
+	}
+	
+	/**
+	 * This method sets the value associated with the supplied
+	 * name in the current state scope.
+	 * 
+	 * @param name The state name
+	 * @param value The state value
+	 */
+	public void setState(String name, Object value) {
+		if (m_stateStack.size() > 0) {
+			java.util.Map<String,Object> current=m_stateStack.get(0);
+			current.put(name, value);
+		}
+	}
+
+	/**
+	 * This method returns the located role associated with the
+	 * current scope.
+	 * 
+	 * @return The located role
+	 */
+	public String getLocatedRole() {
+		return(m_locatedRole);
+	}
+	
+	/**
+	 * This method sets the located role associated with the
+	 * current scope.
+	 * 
+	 * @param located The located role
+	 */
+	public void setLocatedRole(String located) {
+		m_locatedRole = located;
+	}
+
+	/**
+	 * This method pushes the current state onto a stack.
+	 */
+	public void pushState() {
+		m_stateStack.add(0, new java.util.Hashtable<String,Object>());
+	}
+	
+	/**
+	 * This method pops the current state from the stack.
+	 */
+	public void popState() {
+		if (m_stateStack.size() > 0) {
+			m_stateStack.remove(0);
+		} else {
+			logger.severe("No state entry to pop from stack");
+		}
+	}
+	
+	/**
+	 * This method returns the properties associated with
+	 * the scope.
+	 * 
+	 * @return The properties
+	 */
+	public java.util.Map<String,Object> getProperties() {
+		return(m_properties);
+	}
+		
+	private static Logger logger = Logger.getLogger("org.scribble.parser");
+
+	private String m_locatedRole=null;
+	private java.util.List<java.util.Map<String,Object>> m_stateStack=
+		new java.util.Vector<java.util.Map<String,Object>>();
+	private java.util.Map<String,Object> m_properties=new java.util.HashMap<String, Object>();
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/validation/AbstractValidationRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/validation/AbstractValidationRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/validation/AbstractValidationRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,53 @@
+/*
+ * Copyright 2007 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 7 Nov 2007 : Initial version created by gary
+ */
+package org.scribble.validation;
+
+public abstract class AbstractValidationRule implements ValidationRule {
+
+	/**
+	 * This is the default validation rule constructor.
+	 */
+	public AbstractValidationRule() {
+	}
+	
+	/**
+	 * This abstract validation rule constructor initializes
+	 * whether the validation rule should be a background
+	 * task.
+	 * 
+	 * @param backgroundTask Whether a background task
+	 */
+	public AbstractValidationRule(boolean backgroundTask) {
+		m_backgroundTask = backgroundTask;	
+	}
+	
+	/**
+	 * This method determines whether this validation task
+	 * should be performed in the background.
+	 * 
+	 * @return Whether the validation should be performed
+	 * 			as a background task
+	 */
+	public boolean isBackgroundTask() {
+		return(m_backgroundTask);
+	}
+	
+	private boolean m_backgroundTask=false;
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/validation/BlockValidationRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/validation/BlockValidationRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/validation/BlockValidationRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,66 @@
+/*
+ * Copyright 2007-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 13 Mar 2008 : Initial version created by gary
+ */
+package org.scribble.validation;
+
+import org.scribble.extensions.*;
+import org.scribble.model.*;
+import org.scribble.model.admin.ModelListener;
+
+/**
+ * This class implements the validation rule for the
+ * Block component.
+ */
+ at RegistryInfo(extension=ValidationRule.class)
+public class BlockValidationRule extends AbstractValidationRule {
+
+	/**
+	 * This is the default constructor.
+	 */
+	public BlockValidationRule() {
+		super();
+	}
+
+	/**
+	 * This method determines whether the rule is appropriate for
+	 * the supplied model object.
+	 * 
+	 * @param obj The model object
+	 * @return Whether the rule is appropriate
+	 */
+	public boolean isSupported(ModelObject obj) {
+		return(obj instanceof Block);
+	}
+
+	/**
+	 * This method validates the supplied model object.
+	 * 
+	 * @param obj The model object
+	 * @param context The context
+	 * @param l The listener
+	 */
+	public void validate(ModelObject obj, ValidationContext context,
+							ModelListener l) {
+		Block block=(Block)obj;
+
+		for (int i=0; i < block.getContents().size(); i++) {
+			context.validate(block.getContents().get(i), l);
+		}
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/validation/ChannelListValidationRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/validation/ChannelListValidationRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/validation/ChannelListValidationRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,65 @@
+/*
+ * Copyright 2007-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 13 Mar 2008 : Initial version created by gary
+ */
+package org.scribble.validation;
+
+import org.scribble.extensions.*;
+import org.scribble.model.*;
+import org.scribble.model.admin.ModelListener;
+
+/**
+ * This class implements the validation rule for the
+ * ChannelList construct.
+ */
+ at RegistryInfo(extension=ValidationRule.class)
+public class ChannelListValidationRule extends AbstractValidationRule {
+
+	/**
+	 * This is the default constructor.
+	 */
+	public ChannelListValidationRule() {
+	}
+
+	/**
+	 * This method determines whether the rule is appropriate for
+	 * the supplied model object.
+	 * 
+	 * @param obj The model object
+	 * @return Whether the rule is appropriate
+	 */
+	public boolean isSupported(ModelObject obj) {
+		return(obj instanceof ChannelList);
+	}
+
+	/**
+	 * This method validates the supplied model object.
+	 * 
+	 * @param obj The model object
+	 * @param context The context
+	 * @param l The listener
+	 */
+	public void validate(ModelObject obj, ValidationContext context,
+			ModelListener l) {
+		ChannelList elem=(ChannelList)obj;
+
+		for (int i=0; i < elem.getChannels().size(); i++) {
+			context.validate(elem.getChannels().get(i), l);
+		}
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/validation/ChannelValidationRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/validation/ChannelValidationRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/validation/ChannelValidationRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,63 @@
+/*
+ * Copyright 2007-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 13 Mar 2008 : Initial version created by gary
+ */
+package org.scribble.validation;
+
+import org.scribble.extensions.*;
+import org.scribble.model.*;
+import org.scribble.model.admin.ModelListener;
+
+/**
+ * This class implements the validation rule for the
+ * Channel construct.
+ */
+ at RegistryInfo(extension=ValidationRule.class)
+public class ChannelValidationRule extends AbstractValidationRule {
+
+	/**
+	 * This is the default constructor.
+	 */
+	public ChannelValidationRule() {
+	}
+
+	/**
+	 * This method determines whether the rule is appropriate for
+	 * the supplied model object.
+	 * 
+	 * @param obj The model object
+	 * @return Whether the rule is appropriate
+	 */
+	public boolean isSupported(ModelObject obj) {
+		return(obj instanceof Channel);
+	}
+
+	/**
+	 * This method validates the supplied model object.
+	 * 
+	 * @param obj The model object
+	 * @param context The context
+	 * @param l The listener
+	 */
+	public void validate(ModelObject obj, ValidationContext context,
+			ModelListener l) {
+		//Channel elem=(Channel)obj;
+
+		// TODO: Validate roles in the context of the channel
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/validation/DefaultValidationContext.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/validation/DefaultValidationContext.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/validation/DefaultValidationContext.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,323 @@
+/*
+ * Copyright 2007 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 28 Oct 2007 : Initial version created by gary
+ */
+package org.scribble.validation;
+
+import org.scribble.comparator.Comparator;
+import org.scribble.extensions.RegistryFactory;
+import org.scribble.model.*;
+import org.scribble.model.admin.DependencyManager;
+import org.scribble.model.admin.ModelIssue;
+import org.scribble.model.admin.ModelListener;
+import org.scribble.model.admin.ModelRepository;
+import org.scribble.util.Scope;
+
+import java.util.logging.Logger;
+
+/**
+ * This class provides the default implementation of the
+ * validation context supplied to each validation rule.
+ * 
+ */
+public class DefaultValidationContext implements ValidationContext {
+
+	/**
+	 * The constructor for the default validation context.
+	 * 
+	 * @param ref The model reference
+	 * @param rules The list of rules
+	 */
+	public DefaultValidationContext(org.scribble.model.ModelReference ref,
+							java.util.List<ValidationRule> rules) {
+		m_modelReference = ref;
+		m_rules = rules;
+		
+	}
+		
+	/**
+	 * This is the copy constructor for the default validation context.
+	 * 
+	 * @param copy The copy
+	 */
+	protected DefaultValidationContext(DefaultValidationContext copy) {
+		
+		m_modelRepository = copy.getModelRepository();
+		m_dependencyManager = copy.getDependencyManager();
+		m_comparator = copy.getComparator();
+		
+		m_modelReference = copy.m_modelReference;
+		
+		m_rules = copy.m_rules;
+		
+		m_scope = new Scope(copy.m_scope);
+	}
+	
+	/**
+	 * This method gets the model repository.
+	 * 
+	 * @return The model repository
+	 */
+	public ModelRepository getModelRepository() {
+		if (m_modelRepository == null) {
+			m_modelRepository = (org.scribble.model.admin.ModelRepository)
+					RegistryFactory.getRegistry().getExtension(
+							org.scribble.model.admin.ModelRepository.class, null);
+		}
+		
+		return(m_modelRepository);
+	}
+	
+	/**
+	 * This method sets the model repository.
+	 * 
+	 * @param mrep The model repository
+	 */
+	public void setModelRepository(ModelRepository mrep) {
+		m_modelRepository = mrep;
+	}
+
+	/**
+	 * This method gets the dependency manager.
+	 * 
+	 * @return The dependency manager
+	 */
+	public DependencyManager getDependencyManager() {
+		if (m_dependencyManager == null) {
+			m_dependencyManager = (org.scribble.model.admin.DependencyManager)
+				org.scribble.extensions.RegistryFactory.getRegistry().getExtension(
+						org.scribble.model.admin.DependencyManager.class, null);
+		}
+		
+		return(m_dependencyManager);
+	}
+	
+	/**
+	 * This method sets the dependency manager.
+	 * 
+	 * @param dm The dependency manager
+	 */
+	public void setDependencyManager(DependencyManager dm) {
+		m_dependencyManager = dm;
+	}
+
+	/**
+	 * This method gets the comparator.
+	 * 
+	 * @return The comparator
+	 */
+	public Comparator getComparator() {
+		if (m_comparator == null) {
+			m_comparator = (org.scribble.comparator.Comparator)
+				org.scribble.extensions.RegistryFactory.getRegistry().getExtension(
+						org.scribble.comparator.Comparator.class, null);
+		}
+		
+		return(m_comparator);
+	}
+	
+	/**
+	 * This method sets the comparator.
+	 * 
+	 * @param comparator The comparator
+	 */
+	public void setComparator(Comparator comparator) {
+		m_comparator = comparator;
+	}
+
+	/**
+	 * This method returns the source model reference associated
+	 * with the definition being validated.
+	 * 
+	 * @return The model reference
+	 */
+	public ModelReference getSource() {
+		return(m_modelReference);
+	}
+
+	/**
+	 * This method returns a list of validation rules appropriate
+	 * for the notation being validated.
+	 * 
+	 * @return The list of validation rules
+	 */
+	public java.util.List<ValidationRule> getRules() {
+		return(m_rules);
+	}
+	
+	/**
+	 * This method validates a supplied model object.
+	 * 
+	 * @param obj The model object
+	 * @param l The model listener
+	 */
+	public void validate(ModelObject obj, ModelListener l) {
+
+		logger.fine("Validate "+obj);
+		
+		if (obj instanceof Activity &&
+					((Activity)obj).isScope()) {
+			pushScope();
+		}
+		
+		if (obj instanceof Behaviour &&
+				((Behaviour)obj).isGroupingConstruct()) {
+			pushState();
+		}
+		
+		if (obj instanceof Declaration) {
+			// Check if state already exists for this name
+			if (getState(((Declaration)obj).getName()) != null) {
+				
+				l.error(new ModelIssue(obj, org.scribble.util.MessageUtil.format(
+						java.util.PropertyResourceBundle.getBundle("org.scribble.validation.Messages"),
+						"_EXISTING_DECLARATION",
+						new String[]{((Declaration)obj).getName()})));
+			} else {
+				setState(((Declaration)obj).getName(), obj);
+			}
+		}
+		
+		for (int i=0; i < getRules().size(); i++) {
+			ValidationRule rule=getRules().get(i);
+			
+			if (rule.isSupported(obj)) {
+				
+				if (rule.isBackgroundTask()) {
+					final ModelObject bobj=obj;
+					final ModelListener bl=l;
+					final ValidationRule brule=rule;
+					
+					new Thread(new Runnable() {
+						public void run() {
+							// Need to take copy of the context so
+							// that the background task is not affected
+							// by changes in the context as a result
+							// of other concurrently running validation
+							// rules
+							DefaultValidationContext newcontext=
+								new DefaultValidationContext(DefaultValidationContext.this);
+							
+							brule.validate(bobj,
+									newcontext, bl);
+						}
+					}).start();
+					
+				} else {
+					rule.validate(obj, this, l);
+				}
+			}
+		}
+		
+		if (obj instanceof Behaviour &&
+				((Behaviour)obj).isGroupingConstruct()) {
+			popState();
+		}
+
+		if (obj instanceof Activity &&
+					((Activity)obj).isScope()) {
+			popScope();
+		}
+	}
+
+	/**
+	 * This method returns the located role associated with the
+	 * current scope.
+	 * 
+	 * @return The located role
+	 */
+	public String getLocatedRole() {
+		return(m_scope.getLocatedRole());
+	}
+	
+	/**
+	 * This method sets the located role associated with the
+	 * current scope.
+	 * 
+	 * @param located The located role
+	 */
+	public void setLocatedRole(String located) {
+		m_scope.setLocatedRole(located);
+	}
+	
+	/**
+	 * This method returns the named state from the current
+	 * scope.
+	 * 
+	 * @param name The state name
+	 * @return The state value, or null if not found
+	 */
+	public Object getState(String name) {
+		return(m_scope.getState(name));
+	}
+	
+	/**
+	 * This method sets the value associated with the supplied
+	 * name in the current state scope.
+	 * 
+	 * @param name The state name
+	 * @param value The state value
+	 */
+	public void setState(String name, Object value) {
+		m_scope.setState(name, value);
+	}
+
+	/**
+	 * This method pushes the current set of declarations onto the
+	 * stack.
+	 */
+	public void pushState() {
+		m_scope.pushState();
+	}
+	
+	/**
+	 * This method pops the current set of declarations off the stack.
+	 */
+	public void popState() {
+		m_scope.popState();
+	}
+	
+	/**
+	 * This method pushes the current scope onto a stack.
+	 */
+	public void pushScope() {
+		m_scopeStack.add(0, m_scope);
+		m_scope = new Scope();
+	}
+	
+	/**
+	 * This method pops the current scope from the stack.
+	 */
+	public void popScope() {
+		if (m_scopeStack.size() > 0) {
+			m_scope = m_scopeStack.remove(0);
+		} else {
+			logger.severe("No state entry to pop from stack");
+		}
+	}
+		
+	private static Logger logger = Logger.getLogger("org.scribble.validation");
+
+	private ModelRepository m_modelRepository=null;
+	private DependencyManager m_dependencyManager=null;
+	private Comparator m_comparator=null;
+	private ModelReference m_modelReference=null;
+	private java.util.List<ValidationRule> m_rules=new java.util.Vector<ValidationRule>();
+	private Scope m_scope=new Scope();
+	private java.util.List<Scope> m_scopeStack=new java.util.Vector<Scope>();
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/validation/DefaultValidator.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/validation/DefaultValidator.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/validation/DefaultValidator.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,180 @@
+/*
+ * Copyright 2007 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 21 Oct 2007 : Initial version created by gary
+ */
+package org.scribble.validation;
+
+import java.util.logging.Logger;
+
+import org.scribble.comparator.Comparator;
+import org.scribble.extensions.RegistryFactory;
+import org.scribble.extensions.RegistryInfo;
+import org.scribble.model.*;
+import org.scribble.model.admin.DependencyManager;
+import org.scribble.model.admin.ModelListener;
+import org.scribble.model.admin.ModelRepository;
+
+/**
+ * This class provides the default implementation of the validator
+ * interface.
+ */
+ at RegistryInfo(extension=Validator.class)
+public class DefaultValidator implements Validator {
+
+	/**
+	 * This method gets the model repository.
+	 * 
+	 * @return The model repository
+	 */
+	public ModelRepository getModelRepository() {
+		if (m_modelRepository == null) {
+			m_modelRepository = (org.scribble.model.admin.ModelRepository)
+					RegistryFactory.getRegistry().getExtension(
+							org.scribble.model.admin.ModelRepository.class, null);
+		}
+		
+		return(m_modelRepository);
+	}
+	
+	/**
+	 * This method sets the model repository.
+	 * 
+	 * @param mrep The model repository
+	 */
+	public void setModelRepository(ModelRepository mrep) {
+		m_modelRepository = mrep;
+	}
+
+	/**
+	 * This method gets the dependency manager.
+	 * 
+	 * @return The dependency manager
+	 */
+	public DependencyManager getDependencyManager() {
+		if (m_dependencyManager == null) {
+			m_dependencyManager = (org.scribble.model.admin.DependencyManager)
+				org.scribble.extensions.RegistryFactory.getRegistry().getExtension(
+						org.scribble.model.admin.DependencyManager.class, null);
+		}
+		
+		return(m_dependencyManager);
+	}
+	
+	/**
+	 * This method sets the dependency manager.
+	 * 
+	 * @param dm The dependency manager
+	 */
+	public void setDependencyManager(DependencyManager dm) {
+		m_dependencyManager = dm;
+	}
+
+	/**
+	 * This method gets the comparator.
+	 * 
+	 * @return The comparator
+	 */
+	public Comparator getComparator() {
+		return(m_comparator);
+	}
+	
+	/**
+	 * This method sets the comparator.
+	 * 
+	 * @param comparator The comparator
+	 */
+	public void setComparator(Comparator comparator) {
+		m_comparator = comparator;
+	}
+
+	/**
+	 * This method validates the supplied model, based on the supplied
+	 * notation code, and reports any relevant details to the
+	 * validation listener.
+	 * 
+	 * @param model The model
+	 * @param ref The model reference
+	 * @param l The listener
+	 * @return Whether model was validated
+	 */
+	public boolean validate(Model model, ModelReference ref, ModelListener l) {
+		boolean f_validate=false;
+		
+		// Prevent the same model reference being validated
+		// multiple times concurrently
+		synchronized(m_inValidation) {
+			if (m_inValidation.contains(ref) == false) {
+				if (logger.isLoggable(java.util.logging.Level.FINEST)) {
+					logger.finest("Set 'in validation' status of '"+ref+"'");
+				}
+				
+				f_validate = true;
+
+				m_inValidation.add(ref);
+			} else {
+				if (logger.isLoggable(java.util.logging.Level.FINEST)) {
+					logger.finest("Skip validation of '"+ref+"'");
+				}
+			}
+		}
+		
+		if (f_validate) {
+			try {
+				if (logger.isLoggable(java.util.logging.Level.FINEST)) {
+					logger.finest("Validate '"+ref+"'");
+				}
+				
+				java.util.List<Object> ruleObjects=
+					org.scribble.extensions.RegistryFactory.getRegistry().
+								getExtensions(ValidationRule.class, ref.getNotation());
+				java.util.List<ValidationRule> rules=
+					new java.util.Vector<ValidationRule>();
+				
+				// Transfer to typed list
+				for (int i=0; i < ruleObjects.size(); i++) {
+					if (ruleObjects.get(i) instanceof ValidationRule) {
+						rules.add((ValidationRule)ruleObjects.get(i));
+					}
+				}
+
+				DefaultValidationContext context=new DefaultValidationContext(ref, rules);
+				context.setModelRepository(getModelRepository());
+				context.setDependencyManager(getDependencyManager());
+				context.setComparator(getComparator());
+			
+				context.validate(model, l);
+			} finally {
+				synchronized(m_inValidation) {
+					if (logger.isLoggable(java.util.logging.Level.FINEST)) {
+						logger.finest("Clear 'in validation' status of '"+ref+"'");
+					}
+					m_inValidation.remove(ref);
+				}
+			}
+		}
+		
+		return(f_validate);
+	}
+	
+	private static Logger logger = Logger.getLogger("org.scribble.validation");
+
+	private ModelRepository m_modelRepository=null;
+	private DependencyManager m_dependencyManager=null;
+	private Comparator m_comparator=null;
+	private static java.util.List<ModelReference> m_inValidation=new java.util.Vector<ModelReference>();
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/validation/InteractionValidationRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/validation/InteractionValidationRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/validation/InteractionValidationRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,104 @@
+/*
+ * Copyright 2007 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 28 Oct 2007 : Initial version created by gary
+ */
+package org.scribble.validation;
+
+import org.scribble.extensions.*;
+import org.scribble.model.*;
+import org.scribble.model.admin.ModelIssue;
+import org.scribble.model.admin.ModelListener;
+
+/**
+ * This class implements the validation rule for the
+ * interaction.
+ */
+ at RegistryInfo(extension=ValidationRule.class)
+public class InteractionValidationRule extends AbstractValidationRule {
+
+	/**
+	 * This is the default constructor.
+	 */
+	public InteractionValidationRule() {
+	}
+
+	/**
+	 * This method determines whether the rule is appropriate for
+	 * the supplied model object.
+	 * 
+	 * @param obj The model object
+	 * @return Whether the rule is appropriate
+	 */
+	public boolean isSupported(ModelObject obj) {
+		return(obj instanceof Interaction);
+	}
+
+	/**
+	 * This method validates the supplied model object.
+	 * 
+	 * @param obj The model object
+	 * @param context The context
+	 * @param l The listener
+	 */
+	public void validate(ModelObject obj, ValidationContext context,
+			ModelListener l) {
+		Interaction interaction=(Interaction)obj;
+		
+		if (interaction.getMessageSignature() != null) {
+			context.validate(interaction.getMessageSignature(), l);			
+		}
+		
+		// Check that between the channel and the interaction, there
+		// are 'to' and 'from' roles defined
+		if (interaction.getFromRole() == null &&
+				(interaction.getChannel() == null ||
+				interaction.getChannel().getFromRole() == null)) {
+			
+			// Check if local model and 'to' is not the same as the
+			// located role
+			if (context.getLocatedRole() == null ||
+					interaction.getToRole() == null ||
+					context.getLocatedRole().equals(
+							interaction.getToRole().getName())) {
+			
+				l.error(new ModelIssue(obj, org.scribble.util.MessageUtil.format(
+						java.util.PropertyResourceBundle.getBundle("org.scribble.validation.Messages"),
+						"_INTERACTION_ROLE",
+						new String[]{"from"})));
+			}
+		}
+
+		if (interaction.getToRole() == null &&
+				(interaction.getChannel() == null ||
+				interaction.getChannel().getToRole() == null)) {
+			
+			// Check if local model and 'from' is not the same as the
+			// located role
+			if (context.getLocatedRole() == null ||
+					interaction.getFromRole() == null ||
+					context.getLocatedRole().equals(
+							interaction.getFromRole().getName())) {
+			
+				l.error(new ModelIssue(obj, org.scribble.util.MessageUtil.format(
+						java.util.PropertyResourceBundle.getBundle("org.scribble.validation.Messages"),
+						"_INTERACTION_ROLE",
+						new String[]{"to"})));
+			}
+		}
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/validation/MessageSignatureValidationRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/validation/MessageSignatureValidationRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/validation/MessageSignatureValidationRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,65 @@
+/*
+ * Copyright 2007-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 13 Mar 2008 : Initial version created by gary
+ */
+package org.scribble.validation;
+
+import org.scribble.extensions.*;
+import org.scribble.model.*;
+import org.scribble.model.admin.ModelListener;
+
+/**
+ * This class implements the validation rule for the
+ * MessageSignature construct.
+ */
+ at RegistryInfo(extension=ValidationRule.class)
+public class MessageSignatureValidationRule extends AbstractValidationRule {
+
+	/**
+	 * This is the default constructor.
+	 */
+	public MessageSignatureValidationRule() {
+	}
+
+	/**
+	 * This method determines whether the rule is appropriate for
+	 * the supplied model object.
+	 * 
+	 * @param obj The model object
+	 * @return Whether the rule is appropriate
+	 */
+	public boolean isSupported(ModelObject obj) {
+		return(obj instanceof MessageSignature);
+	}
+
+	/**
+	 * This method validates the supplied model object.
+	 * 
+	 * @param obj The model object
+	 * @param context The context
+	 * @param l The listener
+	 */
+	public void validate(ModelObject obj, ValidationContext context,
+			ModelListener l) {
+		MessageSignature ms=(MessageSignature)obj;
+
+		for (int i=0; i < ms.getTypes().size(); i++) {
+			context.validate(ms.getTypes().get(i), l);
+		}
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/validation/Messages.properties
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/validation/Messages.properties	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/validation/Messages.properties	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,24 @@
+# /*
+# * Copyright 2007 Pi4 Technologies Ltd
+# *
+# * Licensed under the Apache License, Version 2.0 (the "License");
+# * you may not use this file except in compliance with the License.
+# * You may obtain a copy of the License at
+# *
+# *     http://www.apache.org/licenses/LICENSE-2.0
+# *
+# * Unless required by applicable law or agreed to in writing, software
+# * distributed under the License is distributed on an "AS IS" BASIS,
+# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# * See the License for the specific language governing permissions and
+# * limitations under the License.
+# *
+# *
+# * Change History:
+# * 2 Nov 2007 : Initial version created by gary
+# */
+
+_EXISTING_DECLARATION=Declaration already exists for name '{0}'
+_NOT_FOUND_BOUND_DECLARATION=Bound declaration '{0}' not found in definition '{1}' 
+_NOT_FOUND_REFERENCE=Definition '{0}' of type '{1}' could not be found
+_INTERACTION_ROLE=Interaction needs to define a '{0}' role

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/validation/ModelReferenceValidationRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/validation/ModelReferenceValidationRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/validation/ModelReferenceValidationRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,117 @@
+/*
+ * Copyright 2007 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 2 Nov 2007 : Initial version created by gary
+ */
+package org.scribble.validation;
+
+import org.scribble.extensions.*;
+import org.scribble.model.*;
+import org.scribble.model.admin.DependencyType;
+import org.scribble.model.admin.ModelIssue;
+import org.scribble.model.admin.ModelListener;
+
+/**
+ * This class implements the validation rule for the
+ * model reference.
+ */
+ at RegistryInfo(extension=ValidationRule.class)
+public class ModelReferenceValidationRule extends AbstractValidationRule {
+
+	/**
+	 * This is the default constructor.
+	 */
+	public ModelReferenceValidationRule() {
+	}
+
+	/**
+	 * This method determines whether the rule is appropriate for
+	 * the supplied model object.
+	 * 
+	 * @param obj The model object
+	 * @return Whether the rule is appropriate
+	 */
+	public boolean isSupported(ModelObject obj) {
+		return(obj.getClass() == ModelReference.class);
+	}
+
+	/**
+	 * This method validates the supplied model object.
+	 * 
+	 * @param obj The model object
+	 * @param context The context
+	 * @param l The listener
+	 */
+	public void validate(ModelObject obj, ValidationContext context,
+			ModelListener l) {
+		ModelReference ref=(ModelReference)obj;
+		
+		if (ref.isInner() == false) {
+			org.scribble.model.admin.ModelRepository mrep=
+				(org.scribble.model.admin.ModelRepository)
+				org.scribble.extensions.RegistryFactory.getRegistry().getExtension(
+						org.scribble.model.admin.ModelRepository.class,
+									null/*ref.getNotation()*/);
+			
+			boolean f_exists=mrep.exists(ref, context.getSource());
+			
+			// Check if local reference, but has a global model
+			if (f_exists == false && ref.getLocatedRole() != null) {
+				
+				ModelReference tmpref=new ModelReference(ref.getNamespace(),
+						ref.getLocalpart(), null, ref.getNotation());
+				
+				mrep.locate(tmpref, ref);
+				
+				f_exists = mrep.exists(tmpref, context.getSource());
+			}
+			
+			if (f_exists == false && ref.useImplementations()) {
+				
+				org.scribble.model.admin.DependencyManager dm=
+					(org.scribble.model.admin.DependencyManager)
+					org.scribble.extensions.RegistryFactory.getRegistry().getExtension(
+							org.scribble.model.admin.DependencyManager.class, null);
+				
+				if (dm != null) {
+					java.util.List<ModelReference> impls=
+							dm.getDependents(ref, DependencyType.Implements);
+					
+					for (int i=0; f_exists == false &&
+								i < impls.size(); i++) {
+						f_exists = mrep.exists(impls.get(i),
+								context.getSource());
+					}
+				}				
+			}
+			
+			if (f_exists == false) {
+				String name=ref.getAlias();
+				
+				if (ref.getLocatedRole() != null) {
+					name += ModelReference.LOCATED_REFERENCE_SEPARATOR+
+									ref.getLocatedRole();
+				}
+				
+				l.error(new ModelIssue(obj, org.scribble.util.MessageUtil.format(
+						java.util.PropertyResourceBundle.getBundle("org.scribble.validation.Messages"),
+						"_NOT_FOUND_REFERENCE",
+						new String[]{name,ref.getNotation()})));
+			}
+		}
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/validation/ModelValidationRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/validation/ModelValidationRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/validation/ModelValidationRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,133 @@
+/*
+ * Copyright 2007 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 2 Nov 2007 : Initial version created by gary
+ */
+package org.scribble.validation;
+
+import java.util.logging.Logger;
+
+import org.scribble.extensions.*;
+import org.scribble.model.*;
+import org.scribble.model.admin.DefaultModelListener;
+import org.scribble.model.admin.DependencyType;
+import org.scribble.model.admin.ModelInfo;
+import org.scribble.model.admin.ModelListener;
+
+/**
+ * This class implements the validation rule for the
+ * model.
+ */
+ at RegistryInfo(extension=ValidationRule.class)
+public class ModelValidationRule extends AbstractValidationRule {
+
+	/**
+	 * This is the default constructor.
+	 */
+	public ModelValidationRule() {
+		super(true);	// Background task
+	}
+
+	/**
+	 * This method determines whether the rule is appropriate for
+	 * the supplied model object.
+	 * 
+	 * @param obj The model object
+	 * @return Whether the rule is appropriate
+	 */
+	public boolean isSupported(ModelObject obj) {
+		return(obj instanceof Model);
+	}
+
+	/**
+	 * This method validates the supplied model object.
+	 * 
+	 * @param obj The model object
+	 * @param context The context
+	 * @param l The listener
+	 */
+	public void validate(ModelObject obj, ValidationContext context,
+							ModelListener l) {
+		Model model=(Model)obj;
+		ModelReference ref=context.getSource();
+		
+		java.util.List<ModelReference> refs=context.getDependencyManager().getDependencies(ref,
+						DependencyType.ConformsTo);
+		
+		java.util.List<ModelReference> implsRefs=context.getDependencyManager().getDependencies(ref,
+						DependencyType.Implements);
+		
+		if (refs == null && implsRefs != null) {
+			refs = implsRefs;
+		} else if (refs != null && implsRefs != null) {
+			for (int i=0; i < implsRefs.size(); i++) {
+				if (refs.contains(implsRefs.get(i)) == false) {
+					refs.add(implsRefs.get(i));
+				}
+			}
+		}
+	
+		if (logger.isLoggable(java.util.logging.Level.FINEST)) {
+			logger.finest(Thread.currentThread()+" Validate dependencies: "+ref+
+						", No. of dependent models="+refs.size());
+		}
+		
+		for (int i=0; refs != null && i < refs.size(); i++) {
+				
+			DefaultModelListener tmpml=new DefaultModelListener();
+			
+			java.util.List<ModelInfo> refModels=
+					context.getModelRepository().getModels(refs.get(i), tmpml);
+
+			if (logger.isLoggable(java.util.logging.Level.FINEST)) {
+				logger.finest(Thread.currentThread()+" Checking ref: "+refs.get(i)+
+							" No. of models="+refModels.size());
+			}	
+			
+			for (int j=0; j < refModels.size(); j++) {
+				
+				if (logger.isLoggable(java.util.logging.Level.FINEST)) {
+					logger.finest(Thread.currentThread()+" Checking model info: "+refModels.get(j));
+				}	
+				
+				// Check that reference resource can be accessed
+				// from the resource being validated.
+				// Check that the reference resource exists - and
+				// if does not exist, then check that the source
+				// associated with the reference is different from
+				// the resource being validated - i.e. that it
+				// is not derived from the source being validated,
+				// otherwise comparison would be pointless.
+				if (context.getModelRepository().canAccess(context.getSource(),
+							refModels.get(j).getSource(), false) &&
+						(context.getModelRepository().exists(refs.get(i), null) ||
+						context.getSource().equals(refModels.get(j).getSource()) == false)) {
+
+					if (logger.isLoggable(java.util.logging.Level.FINEST)) {
+						logger.finest(Thread.currentThread()+" Compare: "+context.getSource());
+					}
+					
+					context.getComparator().compare(model, context.getSource(),
+							refModels.get(j).getModel(),
+								refModels.get(j).getSource(), l);
+				}
+			}
+		}
+	}
+	
+	private static Logger logger = Logger.getLogger("org.scribble.validation");
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/validation/RoleListValidationRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/validation/RoleListValidationRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/validation/RoleListValidationRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,65 @@
+/*
+ * Copyright 2007-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 13 Mar 2008 : Initial version created by gary
+ */
+package org.scribble.validation;
+
+import org.scribble.extensions.*;
+import org.scribble.model.*;
+import org.scribble.model.admin.ModelListener;
+
+/**
+ * This class implements the validation rule for the
+ * RoleList construct.
+ */
+ at RegistryInfo(extension=ValidationRule.class)
+public class RoleListValidationRule extends AbstractValidationRule {
+
+	/**
+	 * This is the default constructor.
+	 */
+	public RoleListValidationRule() {
+	}
+
+	/**
+	 * This method determines whether the rule is appropriate for
+	 * the supplied model object.
+	 * 
+	 * @param obj The model object
+	 * @return Whether the rule is appropriate
+	 */
+	public boolean isSupported(ModelObject obj) {
+		return(obj instanceof RoleList);
+	}
+
+	/**
+	 * This method validates the supplied model object.
+	 * 
+	 * @param obj The model object
+	 * @param context The context
+	 * @param l The listener
+	 */
+	public void validate(ModelObject obj, ValidationContext context,
+			ModelListener l) {
+		RoleList elem=(RoleList)obj;
+
+		for (int i=0; i < elem.getRoles().size(); i++) {
+			context.validate(elem.getRoles().get(i), l);
+		}
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/validation/RoleValidationRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/validation/RoleValidationRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/validation/RoleValidationRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,63 @@
+/*
+ * Copyright 2007-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 13 Mar 2008 : Initial version created by gary
+ */
+package org.scribble.validation;
+
+import org.scribble.extensions.*;
+import org.scribble.model.*;
+import org.scribble.model.admin.ModelListener;
+
+/**
+ * This class implements the validation rule for the
+ * Role construct.
+ */
+ at RegistryInfo(extension=ValidationRule.class)
+public class RoleValidationRule extends AbstractValidationRule {
+
+	/**
+	 * This is the default constructor.
+	 */
+	public RoleValidationRule() {
+	}
+
+	/**
+	 * This method determines whether the rule is appropriate for
+	 * the supplied model object.
+	 * 
+	 * @param obj The model object
+	 * @return Whether the rule is appropriate
+	 */
+	public boolean isSupported(ModelObject obj) {
+		return(obj instanceof Role);
+	}
+
+	/**
+	 * This method validates the supplied model object.
+	 * 
+	 * @param obj The model object
+	 * @param context The context
+	 * @param l The listener
+	 */
+	public void validate(ModelObject obj, ValidationContext context,
+			ModelListener l) {
+		//Role elem=(Role)obj;
+
+		// TODO: Validate role
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/validation/TypeReferenceValidationRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/validation/TypeReferenceValidationRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/validation/TypeReferenceValidationRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,117 @@
+/*
+ * Copyright 2007 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 2 Nov 2007 : Initial version created by gary
+ */
+package org.scribble.validation;
+
+import org.scribble.extensions.*;
+import org.scribble.model.*;
+import org.scribble.model.admin.DependencyType;
+import org.scribble.model.admin.ModelIssue;
+import org.scribble.model.admin.ModelListener;
+
+/**
+ * This class implements the validation rule for the
+ * model reference.
+ */
+ at RegistryInfo(extension=ValidationRule.class)
+public class TypeReferenceValidationRule extends AbstractValidationRule {
+
+	/**
+	 * This is the default constructor.
+	 */
+	public TypeReferenceValidationRule() {
+	}
+
+	/**
+	 * This method determines whether the rule is appropriate for
+	 * the supplied model object.
+	 * 
+	 * @param obj The model object
+	 * @return Whether the rule is appropriate
+	 */
+	public boolean isSupported(ModelObject obj) {
+		return(obj.getClass() == TypeReference.class);
+	}
+
+	/**
+	 * This method validates the supplied model object.
+	 * 
+	 * @param obj The model object
+	 * @param context The context
+	 * @param l The listener
+	 */
+	public void validate(ModelObject obj, ValidationContext context,
+			ModelListener l) {
+		ModelReference ref=(ModelReference)obj;
+		
+		if (ref.isInner() == false) {
+			org.scribble.model.admin.ModelRepository mrep=
+				(org.scribble.model.admin.ModelRepository)
+				org.scribble.extensions.RegistryFactory.getRegistry().getExtension(
+						org.scribble.model.admin.ModelRepository.class,
+									null/*ref.getNotation()*/);
+			
+			boolean f_exists=mrep.exists(ref, context.getSource());
+			
+			// Check if local reference, but has a global model
+			if (f_exists == false && ref.getLocatedRole() != null) {
+				
+				ModelReference tmpref=new ModelReference(ref.getNamespace(),
+						ref.getLocalpart(), null, ref.getNotation());
+				
+				mrep.locate(tmpref, ref);
+				
+				f_exists = mrep.exists(tmpref, context.getSource());
+			}
+			
+			if (f_exists == false && ref.useImplementations()) {
+				
+				org.scribble.model.admin.DependencyManager dm=
+					(org.scribble.model.admin.DependencyManager)
+					org.scribble.extensions.RegistryFactory.getRegistry().getExtension(
+							org.scribble.model.admin.DependencyManager.class, null);
+				
+				if (dm != null) {
+					java.util.List<ModelReference> impls=
+							dm.getDependents(ref, DependencyType.Implements);
+					
+					for (int i=0; f_exists == false &&
+								i < impls.size(); i++) {
+						f_exists = mrep.exists(impls.get(i),
+								context.getSource());
+					}
+				}				
+			}
+			
+			if (f_exists == false) {
+				String name=ref.getAlias();
+				
+				if (ref.getLocatedRole() != null) {
+					name += ModelReference.LOCATED_REFERENCE_SEPARATOR+
+									ref.getLocatedRole();
+				}
+				
+				l.error(new ModelIssue(obj, org.scribble.util.MessageUtil.format(
+						java.util.PropertyResourceBundle.getBundle("org.scribble.validation.Messages"),
+						"_NOT_FOUND_REFERENCE",
+						new String[]{name,ref.getNotation()})));
+			}
+		}
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/validation/ValidationContext.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/validation/ValidationContext.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/validation/ValidationContext.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,107 @@
+/*
+ * Copyright 2007 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 28 Oct 2007 : Initial version created by gary
+ */
+package org.scribble.validation;
+
+import org.scribble.comparator.Comparator;
+import org.scribble.model.ModelObject;
+import org.scribble.model.ModelReference;
+import org.scribble.model.admin.DependencyManager;
+import org.scribble.model.admin.ModelListener;
+import org.scribble.model.admin.ModelRepository;
+
+/**
+ * This interface represents the context provided to all
+ * validation rules.
+ * 
+ */
+public interface ValidationContext {
+	
+	/**
+	 * This method gets the model repository.
+	 * 
+	 * @return The model repository
+	 */
+	public ModelRepository getModelRepository();
+	
+	/**
+	 * This method gets the dependency manager.
+	 * 
+	 * @return The dependency manager
+	 */
+	public DependencyManager getDependencyManager();
+	
+	/**
+	 * This method gets the comparator.
+	 * 
+	 * @return The comparator
+	 */
+	public Comparator getComparator();
+	
+	/**
+	 * This method validates a supplied model object.
+	 * 
+	 * @param obj The model object
+	 * @param l The model listener
+	 */
+	public void validate(ModelObject obj, ModelListener l);
+	
+	/**
+	 * This method returns the source model reference associated
+	 * with the definition being validated.
+	 * 
+	 * @return The model reference
+	 */
+	public ModelReference getSource();
+	
+	/**
+	 * This method returns the located role associated with the
+	 * current scope.
+	 * 
+	 * @return The located role
+	 */
+	public String getLocatedRole();
+	
+	/**
+	 * This method sets the located role associated with the
+	 * current scope.
+	 * 
+	 * @param located The located role
+	 */
+	public void setLocatedRole(String located);
+	
+	/**
+	 * This method returns the named state from the current
+	 * scope.
+	 * 
+	 * @param name The state name
+	 * @return The state value, or null if not found
+	 */
+	public Object getState(String name);
+	
+	/**
+	 * This method sets the value associated with the supplied
+	 * name in the current state.
+	 * 
+	 * @param name The state name
+	 * @param value The state value
+	 */
+	public void setState(String name, Object value);
+
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/validation/ValidationRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/validation/ValidationRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/validation/ValidationRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,60 @@
+/*
+ * Copyright 2007 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 28 Oct 2007 : Initial version created by gary
+ */
+package org.scribble.validation;
+
+import org.scribble.model.*;
+import org.scribble.model.admin.ModelListener;
+
+/**
+ * This interface represents a validation rule associated with
+ * a Scribble language construct.
+ */
+public interface ValidationRule {
+
+	/**
+	 * This method determines whether the validation rule is
+	 * appropriate for the supplied model object.
+	 * 
+	 * @param obj The model object to be validated
+	 * @return Whether the valid rule is relevant for the
+	 * 				model object
+	 */
+	public boolean isSupported(ModelObject obj);
+	
+	/**
+	 * This method determines whether this validation task
+	 * should be performed in the background.
+	 * 
+	 * @return Whether the validation should be performed
+	 * 			as a background task
+	 */
+	public boolean isBackgroundTask();
+	
+	/**
+	 * This method validates the supplied model object.
+	 * 
+	 * @param obj The model object
+	 * @param context The context
+	 * @param l The listener
+	 */
+	public void validate(ModelObject obj, ValidationContext context,
+								ModelListener l);
+	
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/validation/Validator.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/validation/Validator.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/java/org/scribble/validation/Validator.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,88 @@
+/*
+ * Copyright 2007 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 20 Oct 2007 : Initial version created by gary
+ */
+package org.scribble.validation;
+
+import org.scribble.comparator.Comparator;
+import org.scribble.model.*;
+import org.scribble.model.admin.DependencyManager;
+import org.scribble.model.admin.ModelListener;
+import org.scribble.model.admin.ModelRepository;
+
+/**
+ * This interface represents the validator for Scribble models.
+ */
+public interface Validator {
+
+	/**
+	 * This method gets the model repository.
+	 * 
+	 * @return The model repository
+	 */
+	public ModelRepository getModelRepository();
+	
+	/**
+	 * This method sets the model repository.
+	 * 
+	 * @param mrep The model repository
+	 */
+	public void setModelRepository(ModelRepository mrep);
+	
+	/**
+	 * This method gets the dependency manager.
+	 * 
+	 * @return The dependency manager
+	 */
+	public DependencyManager getDependencyManager();
+	
+	/**
+	 * This method sets the dependency manager.
+	 * 
+	 * @param dm The dependency manager
+	 */
+	public void setDependencyManager(DependencyManager dm);
+	
+	/**
+	 * This method gets the comparator.
+	 * 
+	 * @return The comparator
+	 */
+	public Comparator getComparator();
+	
+	/**
+	 * This method sets the comparator.
+	 * 
+	 * @param comparator The comparator
+	 */
+	public void setComparator(Comparator comparator);
+	
+	/**
+	 * This method validates the supplied model, based on the supplied
+	 * notation code associated with the model reference, and reports
+	 * any relevant details to the validation listener.
+	 * 
+	 * @param model The model
+	 * @param ref The model reference
+	 * @param l The listener
+	 * @return Whether the model was validated
+	 */
+	public boolean validate(Model model, ModelReference ref,
+							ModelListener l);
+
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/comparator/BlockComparatorRuleTest.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/comparator/BlockComparatorRuleTest.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/comparator/BlockComparatorRuleTest.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,66 @@
+/*
+ * Copyright 2005-9 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 23 Feb 2009 : Initial version created by gary
+ */
+package org.scribble.comparator;
+
+import org.scribble.model.*;
+import org.scribble.model.admin.*;
+
+import junit.framework.TestCase;
+
+public class BlockComparatorRuleTest extends TestCase {
+
+	public void testCompareShallow() {
+		BlockComparatorRule rule=new BlockComparatorRule();
+		
+		DefaultComparatorContext context=
+				new DefaultComparatorContext(new ModelReference("test"),
+							new ModelReference("test"), null);
+		
+		Block main=new Block();
+		Block reference=new Block();
+		
+		DefaultModelListener l=new DefaultModelListener();
+		
+		boolean result=rule.compare(context, main, reference, l, false);
+		
+		if (result == false) {
+			fail("Shallow comparator failed");
+		}
+	}
+
+	public void testCompareDeep() {
+		BlockComparatorRule rule=new BlockComparatorRule();
+		
+		DefaultComparatorContext context=
+				new DefaultComparatorContext(new ModelReference("test"),
+							new ModelReference("test"), null);
+		
+		Block main=new Block();
+		Block reference=new Block();
+		
+		DefaultModelListener l=new DefaultModelListener();
+		
+		boolean result=rule.compare(context, main, reference, l, true);
+		
+		if (result == true) {
+			fail("Deep comparator should fail - currently not supported");
+		}
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/comparator/ChannelComparatorRuleTest.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/comparator/ChannelComparatorRuleTest.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/comparator/ChannelComparatorRuleTest.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,133 @@
+/*
+ * Copyright 2005-9 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 23 Feb 2009 : Initial version created by gary
+ */
+package org.scribble.comparator;
+
+import org.scribble.model.*;
+import org.scribble.model.admin.*;
+
+import junit.framework.TestCase;
+
+public class ChannelComparatorRuleTest extends TestCase {
+
+	private static final String NAME2 = "name2";
+	private static final String NAME1 = "name1";
+
+	public void testCompareSameNamesNoNameMapping() {
+		ChannelComparatorRule rule=new ChannelComparatorRule();
+		
+		DefaultComparatorContext context=
+				new DefaultComparatorContext(new ModelReference("test"),
+							new ModelReference("test"), null);
+		
+		Channel main=new Channel();
+		main.setName(NAME1);
+		
+		Channel reference=new Channel();
+		reference.setName(NAME1);
+		
+		DefaultModelListener l=new DefaultModelListener();
+		
+		boolean result=rule.compare(context, main, reference, l, false);
+		
+		if (result == false) {
+			fail("Compare of same names, with no mapping, failed");
+		}
+	}
+
+	public void testCompareDiffNamesWithNoNameMapping() {
+		ChannelComparatorRule rule=new ChannelComparatorRule();
+		
+		DefaultComparatorContext context=
+				new DefaultComparatorContext(new ModelReference("test"),
+							new ModelReference("test"), null);
+		
+		Channel main=new Channel();
+		main.setName(NAME1);
+		
+		Channel reference=new Channel();
+		reference.setName(NAME2);
+		
+		DefaultModelListener l=new DefaultModelListener();
+		
+		boolean result=rule.compare(context, main, reference, l, false);
+		
+		if (result == true) {
+			fail("Compare of diff names, with no mapping, should have failed");
+		}
+	}
+
+	public void testCompareWithMainNameMapping() {
+		ChannelComparatorRule rule=new ChannelComparatorRule();
+		
+		DefaultComparatorContext context=
+				new DefaultComparatorContext(new ModelReference("test"),
+							new ModelReference("test"), null);
+		
+		java.util.Map<String,String> nameMap=new java.util.HashMap<String, String>();
+		NameMap map=new DefaultNameMap(nameMap);
+		
+		nameMap.put(NAME1, NAME2);
+		
+		context.pushMainNameMap(map);
+		
+		Channel main=new Channel();
+		main.setName(NAME1);
+		
+		Channel reference=new Channel();
+		reference.setName(NAME2);
+		
+		DefaultModelListener l=new DefaultModelListener();
+		
+		boolean result=rule.compare(context, main, reference, l, false);
+		
+		if (result == false) {
+			fail("Compare of diff names, with main name mapping, failed");
+		}
+	}
+
+	public void testCompareWithRefNameMapping() {
+		ChannelComparatorRule rule=new ChannelComparatorRule();
+		
+		DefaultComparatorContext context=
+				new DefaultComparatorContext(new ModelReference("test"),
+							new ModelReference("test"), null);
+		
+		java.util.Map<String,String> nameMap=new java.util.HashMap<String, String>();
+		NameMap map=new DefaultNameMap(nameMap);
+		
+		nameMap.put(NAME2, NAME1);
+		
+		context.pushReferenceNameMap(map);
+		
+		Channel main=new Channel();
+		main.setName(NAME1);
+		
+		Channel reference=new Channel();
+		reference.setName(NAME2);
+		
+		DefaultModelListener l=new DefaultModelListener();
+		
+		boolean result=rule.compare(context, main, reference, l, false);
+		
+		if (result == false) {
+			fail("Compare of diff names, with reference name mapping, failed");
+		}
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/comparator/DefaultNameMapTest.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/comparator/DefaultNameMapTest.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/comparator/DefaultNameMapTest.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,67 @@
+/*
+ * Copyright 2005-9 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 23 Feb 2009 : Initial version created by gary
+ */
+package org.scribble.comparator;
+
+import junit.framework.TestCase;
+
+public class DefaultNameMapTest extends TestCase {
+
+	public void testGetSameName() {
+		java.util.Map<String, String> nameMap=
+				new java.util.HashMap<String, String>();
+		
+		DefaultNameMap map=new DefaultNameMap(nameMap);
+		
+		String testName="fred";
+		
+		String name=map.getName(testName);
+		
+		if (name == null) {
+			fail("Name should not be null");
+		}
+		
+		if (name.equals(testName) == false) {
+			fail("Returned name should be same as requested name");
+		}
+	}
+
+	public void testGetMappedName() {
+		java.util.Map<String, String> nameMap=
+				new java.util.HashMap<String, String>();
+		
+		DefaultNameMap map=new DefaultNameMap(nameMap);
+		
+		String testName="fred";
+		String toName="joe";
+		
+		nameMap.put(testName, toName);
+		
+		String name=map.getName(testName);
+		
+		if (name == null) {
+			fail("Name should not be null");
+		}
+		
+		if (name.equals(toName) == false) {
+			fail("Returned name should be '"+
+					toName+"', but was: "+name);
+		}
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/comparator/GlobalToLocalModelComparatorRuleTest.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/comparator/GlobalToLocalModelComparatorRuleTest.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/comparator/GlobalToLocalModelComparatorRuleTest.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,245 @@
+/*
+ * Copyright 2005-9 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 28 Feb 2009 : Initial version created by gary
+ */
+package org.scribble.comparator;
+
+import org.scribble.extensions.RegistryFactory;
+import org.scribble.model.*;
+import org.scribble.model.admin.*;
+
+import junit.framework.TestCase;
+
+public class GlobalToLocalModelComparatorRuleTest extends TestCase {
+
+	private static final String TEST_NOTATION = "test";
+	private static final String TEST_ROLE = "testRole";
+	private static final String TEST_MODEL = "testModel";
+
+	public void testIsSupported1() {
+		GlobalToLocalModelComparatorRule rule=
+				new GlobalToLocalModelComparatorRule();
+		
+		TestModel mainModel=new TestModel();	
+		Definition defn=new Definition(){
+			private static final long serialVersionUID = 1L;
+		};
+		
+		LocatedName mainMName=new LocatedName();
+		defn.setLocatedName(mainMName);
+		
+		mainModel.getDefinitions().add(defn);
+		
+		TestModel refModel=new TestModel();
+		defn = new Definition(){
+			private static final long serialVersionUID = 1L;
+		};
+		
+		LocatedName refMName=new LocatedName();
+		defn.setLocatedName(refMName);
+		
+		refModel.getDefinitions().add(defn);
+				
+		boolean result=rule.isComparisonSupported(mainModel, refModel);
+		
+		if (result == true) {
+			fail("Two global models should not be supported");
+		}
+		
+	}
+
+	public void testIsSupported2() {
+		GlobalToLocalModelComparatorRule rule=
+				new GlobalToLocalModelComparatorRule();
+		
+		TestModel mainModel=new TestModel();		
+		Definition defn=new Definition(){
+			private static final long serialVersionUID = 1L;
+		};
+
+		LocatedName mainMName=new LocatedName();
+		mainMName.setRole(new Role());
+		defn.setLocatedName(mainMName);
+
+		mainModel.getDefinitions().add(defn);
+
+		TestModel refModel=new TestModel();
+		defn=new Definition(){
+			private static final long serialVersionUID = 1L;
+		};
+
+		LocatedName refMName=new LocatedName();
+		defn.setLocatedName(refMName);
+		
+		refModel.getDefinitions().add(defn);
+				
+		boolean result=rule.isComparisonSupported(mainModel, refModel);
+		
+		if (result == true) {
+			fail("Local main model should not be supported");
+		}
+		
+	}
+
+	public void testIsSupported3() {
+		GlobalToLocalModelComparatorRule rule=
+				new GlobalToLocalModelComparatorRule();
+		
+		TestModel mainModel=new TestModel();		
+		Definition defn=new Definition(){
+			private static final long serialVersionUID = 1L;
+		};
+
+		LocatedName mainMName=new LocatedName();
+		mainMName.setRole(new Role());
+		defn.setLocatedName(mainMName);
+		mainModel.getDefinitions().add(defn);
+		
+		TestModel refModel=new TestModel();
+		defn=new Definition(){
+			private static final long serialVersionUID = 1L;
+		};
+
+		LocatedName refMName=new LocatedName();
+		refMName.setRole(new Role());
+		defn.setLocatedName(refMName);
+		refModel.getDefinitions().add(defn);
+				
+		boolean result=rule.isComparisonSupported(mainModel, refModel);
+		
+		if (result == true) {
+			fail("Two local models should not be supported");
+		}
+		
+	}
+
+	public void testIsSupported4() {
+		GlobalToLocalModelComparatorRule rule=
+				new GlobalToLocalModelComparatorRule();
+		
+		TestModel mainModel=new TestModel();		
+		Definition defn=new Definition(){
+			private static final long serialVersionUID = 1L;
+		};
+
+		LocatedName mainMName=new LocatedName();
+		defn.setLocatedName(mainMName);
+		mainModel.getDefinitions().add(defn);
+		
+		TestModel refModel=new TestModel();
+		defn=new Definition(){
+			private static final long serialVersionUID = 1L;
+		};
+
+		LocatedName refMName=new LocatedName();
+		refMName.setRole(new Role());
+		defn.setLocatedName(refMName);
+		refModel.getDefinitions().add(defn);
+				
+		boolean result=rule.isComparisonSupported(mainModel, refModel);
+		
+		if (result == false) {
+			fail("Local ref model should be supported");
+		}
+		
+	}
+
+	public void testCompare() {
+		GlobalToLocalModelComparatorRule rule=
+				new GlobalToLocalModelComparatorRule();
+		
+		TestModel main=new TestModel();		
+		Definition defn=new Definition(){
+			private static final long serialVersionUID = 1L;
+		};
+
+		LocatedName mainMName=new LocatedName();
+		mainMName.setName(TEST_MODEL);
+		defn.setLocatedName(mainMName);
+		main.getDefinitions().add(defn);
+		
+		final TestModel mainProjected=new TestModel();		
+		defn=new Definition(){
+			private static final long serialVersionUID = 1L;
+		};
+
+		LocatedName mainMNameP=new LocatedName();
+		mainMNameP.setName(TEST_MODEL);
+		Role mainRoleP=new Role();
+		mainRoleP.setName(TEST_ROLE);
+		mainMNameP.setRole(mainRoleP);
+		defn.setLocatedName(mainMNameP);
+		mainProjected.getDefinitions().add(defn);
+		
+		TestModel reference=new TestModel();
+		defn=new Definition(){
+			private static final long serialVersionUID = 1L;
+		};
+		
+		LocatedName refMName=new LocatedName();
+		refMName.setName(TEST_MODEL);
+		Role refRole=new Role();
+		refRole.setName(TEST_ROLE);
+		refMName.setRole(refRole);
+		defn.setLocatedName(refMName);
+		reference.getDefinitions().add(defn);
+		
+		java.util.Map<Class<?>,Object> map=
+			new java.util.HashMap<Class<?>,Object>();
+		
+		org.scribble.projector.TestProjector projector=
+			new org.scribble.projector.TestProjector();
+		
+		map.put(org.scribble.projector.Projector.class,
+							projector);
+		
+		projector.setProjectedMode(main, mainProjected);
+		
+		org.scribble.extensions.TestTypeMapRegistry reg=
+			new org.scribble.extensions.TestTypeMapRegistry(map);
+		
+		RegistryFactory.setRegistry(reg);
+		
+		DefaultModelListener l=new DefaultModelListener();
+		
+		java.util.List<ComparatorRule> rules=
+					new java.util.Vector<ComparatorRule>();
+		
+		org.scribble.comparator.TestComparatorRule comparatorRule=
+			new org.scribble.comparator.TestComparatorRule(TestModel.class,
+					TestModel.class, true) {
+			
+			public boolean compare(ComparatorContext context, ModelObject main,
+					ModelObject reference, ModelListener l, boolean deep) {
+				return(mainProjected == main);
+			}
+		};
+		
+		rules.add(comparatorRule);
+		
+		DefaultComparatorContext context=
+			new DefaultComparatorContext(new ModelReference(TEST_NOTATION),
+						new ModelReference(TEST_NOTATION), rules);
+	
+		boolean result=rule.compare(context, main, reference, l, false);
+		
+		if (result == false) {
+			fail("Comparator failed");
+		}
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/comparator/InteractionComparatorRuleTest.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/comparator/InteractionComparatorRuleTest.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/comparator/InteractionComparatorRuleTest.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,642 @@
+/*
+ * Copyright 2005-9 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 28 Feb 2009 : Initial version created by gary
+ */
+package org.scribble.comparator;
+
+import org.scribble.extensions.RegistryFactory;
+import org.scribble.model.*;
+import org.scribble.model.admin.*;
+
+import junit.framework.TestCase;
+
+public class InteractionComparatorRuleTest extends TestCase {
+
+	private static final String TEST_NOTATION = "test";
+
+	public void testCompareSameExplicitRolesDiffSig() {
+		InteractionComparatorRule rule=
+				new InteractionComparatorRule();
+		
+		RegistryFactory.setRegistry(null);
+		
+		DefaultModelListener l=new DefaultModelListener();
+		
+		java.util.List<ComparatorRule> rules=
+					new java.util.Vector<ComparatorRule>();
+		
+		rules.add(new RoleComparatorRule());
+		rules.add(new ChannelComparatorRule());
+		rules.add(new MessageSignatureComparatorRule());
+		rules.add(new TypeReferenceComparatorRule());
+		
+		DefaultComparatorContext context=
+			new DefaultComparatorContext(new ModelReference(TEST_NOTATION),
+						new ModelReference(TEST_NOTATION), rules);
+		
+		Role fromRole=new Role();
+		fromRole.setName("fromRole");
+		
+		Role toRole=new Role();
+		toRole.setName("toRole");
+		
+		MessageSignature msig1=new MessageSignature();
+		TypeReference typeRef1=new TypeReference();
+		typeRef1.setLocalpart("testType1");
+		msig1.getTypes().add(typeRef1);
+		
+		MessageSignature msig2=new MessageSignature();
+		TypeReference typeRef2=new TypeReference();
+		typeRef2.setLocalpart("testType2");
+		msig2.getTypes().add(typeRef2);
+		
+		Interaction main=new Interaction();
+		main.setMessageSignature(msig1);
+		main.setFromRole(fromRole);
+		main.setToRole(toRole);
+		
+		Interaction reference=new Interaction();
+		reference.setMessageSignature(msig2);
+		reference.setFromRole(fromRole);
+		reference.setToRole(toRole);
+	
+		boolean result=rule.compare(context, main, reference, l, false);
+		
+		if (l.getErrors().size() != 1) {
+			fail("One error expected");
+		}
+		
+		if (result == true) {
+			fail("Comparator should have failed");
+		}
+	}
+
+	public void testCompareGlobalSameExplicitRoles() {
+		InteractionComparatorRule rule=
+				new InteractionComparatorRule();
+		
+		RegistryFactory.setRegistry(null);
+		
+		DefaultModelListener l=new DefaultModelListener();
+		
+		java.util.List<ComparatorRule> rules=
+					new java.util.Vector<ComparatorRule>();
+		
+		rules.add(new RoleComparatorRule());
+		rules.add(new ChannelComparatorRule());
+		rules.add(new MessageSignatureComparatorRule());
+		rules.add(new TypeReferenceComparatorRule());
+		
+		DefaultComparatorContext context=
+			new DefaultComparatorContext(new ModelReference(TEST_NOTATION),
+						new ModelReference(TEST_NOTATION), rules);
+		
+		Role fromRole=new Role();
+		fromRole.setName("fromRole");
+		
+		Role toRole=new Role();
+		toRole.setName("toRole");
+		
+		MessageSignature msig=new MessageSignature();
+		TypeReference typeRef=new TypeReference();
+		typeRef.setLocalpart("testType");
+		msig.getTypes().add(typeRef);
+		
+		Interaction main=new Interaction();
+		main.setMessageSignature(msig);
+		main.setFromRole(fromRole);
+		main.setToRole(toRole);
+		
+		Interaction reference=new Interaction();
+		reference.setMessageSignature(msig);
+		reference.setFromRole(fromRole);
+		reference.setToRole(toRole);
+	
+		boolean result=rule.compare(context, main, reference, l, false);
+		
+		if (l.getErrors().size() > 0) {
+			fail("No errors expected");
+		}
+		
+		if (result == false) {
+			fail("Comparator failed");
+		}
+	}
+
+	public void testCompareGlobalDiffExplicitFromRoles() {
+		InteractionComparatorRule rule=
+				new InteractionComparatorRule();
+		
+		RegistryFactory.setRegistry(null);
+		
+		DefaultModelListener l=new DefaultModelListener();
+		
+		java.util.List<ComparatorRule> rules=
+					new java.util.Vector<ComparatorRule>();
+		
+		rules.add(new RoleComparatorRule());
+		rules.add(new ChannelComparatorRule());
+		rules.add(new MessageSignatureComparatorRule());
+		rules.add(new TypeReferenceComparatorRule());
+		
+		DefaultComparatorContext context=
+			new DefaultComparatorContext(new ModelReference(TEST_NOTATION),
+						new ModelReference(TEST_NOTATION), rules);
+		
+		Role fromRole1=new Role();
+		fromRole1.setName("fromRole1");
+		
+		Role fromRole2=new Role();
+		fromRole2.setName("fromRole2");
+		
+		Role toRole=new Role();
+		toRole.setName("toRole");
+		
+		MessageSignature msig=new MessageSignature();
+		TypeReference typeRef=new TypeReference();
+		typeRef.setLocalpart("testType");
+		msig.getTypes().add(typeRef);
+		
+		Interaction main=new Interaction();
+		main.setMessageSignature(msig);
+		main.setFromRole(fromRole1);
+		main.setToRole(toRole);
+		
+		Interaction reference=new Interaction();
+		reference.setMessageSignature(msig);
+		reference.setFromRole(fromRole2);
+		reference.setToRole(toRole);
+	
+		boolean result=rule.compare(context, main, reference, l, false);
+		
+		// Should report role comparison error - actual error
+		// is determine by RoleComparatorRule, just passed
+		// through by this rule
+		if (l.getErrors().size() != 1) {
+			fail("One error expected");
+		}
+		
+		if (result == true) {
+			fail("Comparator should have failed");
+		}
+	}
+
+	public void testCompareGlobalDiffExplicitToRoles() {
+		InteractionComparatorRule rule=
+				new InteractionComparatorRule();
+		
+		RegistryFactory.setRegistry(null);
+		
+		DefaultModelListener l=new DefaultModelListener();
+		
+		java.util.List<ComparatorRule> rules=
+					new java.util.Vector<ComparatorRule>();
+		
+		rules.add(new RoleComparatorRule());
+		rules.add(new ChannelComparatorRule());
+		rules.add(new MessageSignatureComparatorRule());
+		rules.add(new TypeReferenceComparatorRule());
+		
+		DefaultComparatorContext context=
+			new DefaultComparatorContext(new ModelReference(TEST_NOTATION),
+						new ModelReference(TEST_NOTATION), rules);
+		
+		Role fromRole=new Role();
+		fromRole.setName("fromRole");
+		
+		Role toRole1=new Role();
+		toRole1.setName("toRole1");
+		
+		Role toRole2=new Role();
+		toRole2.setName("toRole2");
+		
+		MessageSignature msig=new MessageSignature();
+		TypeReference typeRef=new TypeReference();
+		typeRef.setLocalpart("testType");
+		msig.getTypes().add(typeRef);
+		
+		Interaction main=new Interaction();
+		main.setMessageSignature(msig);
+		main.setFromRole(fromRole);
+		main.setToRole(toRole1);
+		
+		Interaction reference=new Interaction();
+		reference.setMessageSignature(msig);
+		reference.setFromRole(fromRole);
+		reference.setToRole(toRole2);
+	
+		boolean result=rule.compare(context, main, reference, l, false);
+		
+		// Should report role comparison error - actual error
+		// is determine by RoleComparatorRule, just passed
+		// through by this rule
+		if (l.getErrors().size() != 1) {
+			fail("One error expected");
+		}
+		
+		if (result == true) {
+			fail("Comparator should have failed");
+		}
+	}
+	
+	public void testCompareGlobalSameImplicitRoles() {
+		InteractionComparatorRule rule=
+				new InteractionComparatorRule();
+		
+		RegistryFactory.setRegistry(null);
+		
+		DefaultModelListener l=new DefaultModelListener();
+		
+		java.util.List<ComparatorRule> rules=
+					new java.util.Vector<ComparatorRule>();
+		
+		rules.add(new RoleComparatorRule());
+		rules.add(new ChannelComparatorRule());
+		rules.add(new MessageSignatureComparatorRule());
+		rules.add(new TypeReferenceComparatorRule());
+		
+		DefaultComparatorContext context=
+			new DefaultComparatorContext(new ModelReference(TEST_NOTATION),
+						new ModelReference(TEST_NOTATION), rules);
+		
+		Role fromRole=new Role();
+		fromRole.setName("fromRole");
+		
+		Role toRole=new Role();
+		toRole.setName("toRole");
+		
+		Channel mainCh=new Channel();
+		mainCh.setName("testch");
+		mainCh.setFromRole(fromRole);
+		mainCh.setToRole(toRole);
+		
+		Channel refCh=new Channel();
+		refCh.setName("testch");
+		refCh.setFromRole(fromRole);
+		refCh.setToRole(toRole);
+		
+		MessageSignature msig=new MessageSignature();
+		TypeReference typeRef=new TypeReference();
+		typeRef.setLocalpart("testType");
+		msig.getTypes().add(typeRef);
+		
+		Interaction main=new Interaction();
+		main.setMessageSignature(msig);
+		main.setChannel(mainCh);
+		
+		Interaction reference=new Interaction();
+		reference.setMessageSignature(msig);
+		reference.setChannel(refCh);
+
+		boolean result=rule.compare(context, main, reference, l, false);
+		
+		if (l.getErrors().size() > 0) {
+			fail("No errors expected");
+		}
+		
+		if (result == false) {
+			fail("Comparator failed");
+		}
+	}
+
+	public void testCompareGlobalDiffImplicitFromRoles() {
+		InteractionComparatorRule rule=
+				new InteractionComparatorRule();
+		
+		RegistryFactory.setRegistry(null);
+		
+		DefaultModelListener l=new DefaultModelListener();
+		
+		java.util.List<ComparatorRule> rules=
+					new java.util.Vector<ComparatorRule>();
+		
+		rules.add(new RoleComparatorRule());
+		rules.add(new ChannelComparatorRule());
+		rules.add(new MessageSignatureComparatorRule());
+		rules.add(new TypeReferenceComparatorRule());
+		
+		DefaultComparatorContext context=
+			new DefaultComparatorContext(new ModelReference(TEST_NOTATION),
+						new ModelReference(TEST_NOTATION), rules);
+		
+		Role fromRole1=new Role();
+		fromRole1.setName("fromRole1");
+		
+		Role fromRole2=new Role();
+		fromRole2.setName("fromRole2");
+		
+		Role toRole=new Role();
+		toRole.setName("toRole");
+		
+		Channel mainCh=new Channel();
+		mainCh.setName("testch");
+		mainCh.setFromRole(fromRole1);
+		mainCh.setToRole(toRole);
+		
+		Channel refCh=new Channel();
+		refCh.setName("testch");
+		refCh.setFromRole(fromRole2);
+		refCh.setToRole(toRole);
+		
+		MessageSignature msig=new MessageSignature();
+		TypeReference typeRef=new TypeReference();
+		typeRef.setLocalpart("testType");
+		msig.getTypes().add(typeRef);
+		
+		Interaction main=new Interaction();
+		main.setMessageSignature(msig);
+		main.setChannel(mainCh);
+		
+		Interaction reference=new Interaction();
+		reference.setMessageSignature(msig);
+		reference.setChannel(refCh);
+	
+		boolean result=rule.compare(context, main, reference, l, false);
+		
+		if (l.getErrors().size() != 1) {
+			fail("One error expected");
+		}
+		
+		if (result == true) {
+			fail("Comparator should have failed");
+		}
+	}
+
+	public void testCompareGlobalDiffImplicitToRoles() {
+		InteractionComparatorRule rule=
+				new InteractionComparatorRule();
+		
+		RegistryFactory.setRegistry(null);
+		
+		DefaultModelListener l=new DefaultModelListener();
+		
+		java.util.List<ComparatorRule> rules=
+					new java.util.Vector<ComparatorRule>();
+		
+		rules.add(new RoleComparatorRule());
+		rules.add(new ChannelComparatorRule());
+		rules.add(new MessageSignatureComparatorRule());
+		rules.add(new TypeReferenceComparatorRule());
+		
+		DefaultComparatorContext context=
+			new DefaultComparatorContext(new ModelReference(TEST_NOTATION),
+						new ModelReference(TEST_NOTATION), rules);
+		
+		Role fromRole=new Role();
+		fromRole.setName("fromRole");
+		
+		Role toRole1=new Role();
+		toRole1.setName("toRole1");
+		
+		Role toRole2=new Role();
+		toRole2.setName("toRole2");
+		
+		Channel mainCh=new Channel();
+		mainCh.setName("testch");
+		mainCh.setFromRole(fromRole);
+		mainCh.setToRole(toRole1);
+		
+		Channel refCh=new Channel();
+		refCh.setName("testch");
+		refCh.setFromRole(fromRole);
+		refCh.setToRole(toRole2);
+		
+		MessageSignature msig=new MessageSignature();
+		TypeReference typeRef=new TypeReference();
+		typeRef.setLocalpart("testType");
+		msig.getTypes().add(typeRef);
+		
+		Interaction main=new Interaction();
+		main.setMessageSignature(msig);
+		main.setChannel(mainCh);
+		
+		Interaction reference=new Interaction();
+		reference.setMessageSignature(msig);
+		reference.setChannel(refCh);
+	
+		boolean result=rule.compare(context, main, reference, l, false);
+		
+		if (l.getErrors().size() != 1) {
+			fail("One error expected");
+		}
+		
+		if (result == true) {
+			fail("Comparator should have failed");
+		}
+	}
+
+	public void testCompareLocalSameExplicitFromRoles() {
+		InteractionComparatorRule rule=
+				new InteractionComparatorRule();
+		
+		RegistryFactory.setRegistry(null);
+		
+		DefaultModelListener l=new DefaultModelListener();
+		
+		java.util.List<ComparatorRule> rules=
+					new java.util.Vector<ComparatorRule>();
+		
+		rules.add(new RoleComparatorRule());
+		rules.add(new ChannelComparatorRule());
+		rules.add(new MessageSignatureComparatorRule());
+		rules.add(new TypeReferenceComparatorRule());
+		
+		DefaultComparatorContext context=
+			new DefaultComparatorContext(new ModelReference(TEST_NOTATION),
+						new ModelReference(TEST_NOTATION), rules);
+		
+		Role fromRole=new Role();
+		fromRole.setName("fromRole");
+		
+		MessageSignature msig=new MessageSignature();
+		TypeReference typeRef=new TypeReference();
+		typeRef.setLocalpart("testType");
+		msig.getTypes().add(typeRef);
+		
+		Interaction main=new Interaction();
+		main.setMessageSignature(msig);
+		main.setFromRole(fromRole);
+		
+		Interaction reference=new Interaction();
+		reference.setMessageSignature(msig);
+		reference.setFromRole(fromRole);
+	
+		boolean result=rule.compare(context, main, reference, l, false);
+		
+		if (l.getErrors().size() > 0) {
+			fail("No errors expected");
+		}
+		
+		if (result == false) {
+			fail("Comparator failed");
+		}
+	}
+
+	public void testCompareLocalSameExplicitToRoles() {
+		InteractionComparatorRule rule=
+				new InteractionComparatorRule();
+		
+		RegistryFactory.setRegistry(null);
+		
+		DefaultModelListener l=new DefaultModelListener();
+		
+		java.util.List<ComparatorRule> rules=
+					new java.util.Vector<ComparatorRule>();
+		
+		rules.add(new RoleComparatorRule());
+		rules.add(new ChannelComparatorRule());
+		rules.add(new MessageSignatureComparatorRule());
+		rules.add(new TypeReferenceComparatorRule());
+		
+		DefaultComparatorContext context=
+			new DefaultComparatorContext(new ModelReference(TEST_NOTATION),
+						new ModelReference(TEST_NOTATION), rules);
+		
+		Role toRole=new Role();
+		toRole.setName("toRole");
+		
+		MessageSignature msig=new MessageSignature();
+		TypeReference typeRef=new TypeReference();
+		typeRef.setLocalpart("testType");
+		msig.getTypes().add(typeRef);
+		
+		Interaction main=new Interaction();
+		main.setMessageSignature(msig);
+		main.setToRole(toRole);
+		
+		Interaction reference=new Interaction();
+		reference.setMessageSignature(msig);
+		reference.setToRole(toRole);
+	
+		boolean result=rule.compare(context, main, reference, l, false);
+		
+		if (l.getErrors().size() > 0) {
+			fail("No errors expected");
+		}
+		
+		if (result == false) {
+			fail("Comparator failed");
+		}
+	}
+
+	public void testCompareLocalDiffExplicitFromRoles() {
+		InteractionComparatorRule rule=
+				new InteractionComparatorRule();
+		
+		RegistryFactory.setRegistry(null);
+		
+		DefaultModelListener l=new DefaultModelListener();
+		
+		java.util.List<ComparatorRule> rules=
+					new java.util.Vector<ComparatorRule>();
+		
+		rules.add(new RoleComparatorRule());
+		rules.add(new ChannelComparatorRule());
+		rules.add(new MessageSignatureComparatorRule());
+		rules.add(new TypeReferenceComparatorRule());
+		
+		DefaultComparatorContext context=
+			new DefaultComparatorContext(new ModelReference(TEST_NOTATION),
+						new ModelReference(TEST_NOTATION), rules);
+		
+		Role fromRole1=new Role();
+		fromRole1.setName("fromRole1");
+		
+		Role fromRole2=new Role();
+		fromRole2.setName("fromRole2");
+				
+		MessageSignature msig=new MessageSignature();
+		TypeReference typeRef=new TypeReference();
+		typeRef.setLocalpart("testType");
+		msig.getTypes().add(typeRef);
+		
+		Interaction main=new Interaction();
+		main.setMessageSignature(msig);
+		main.setFromRole(fromRole1);
+		
+		Interaction reference=new Interaction();
+		reference.setMessageSignature(msig);
+		reference.setFromRole(fromRole2);
+	
+		boolean result=rule.compare(context, main, reference, l, false);
+		
+		// Should report role comparison error - actual error
+		// is determine by RoleComparatorRule, just passed
+		// through by this rule
+		if (l.getErrors().size() != 1) {
+			fail("One error expected");
+		}
+		
+		if (result == true) {
+			fail("Comparator should have failed");
+		}
+	}
+
+	public void testCompareLocalDiffExplicitToRoles() {
+		InteractionComparatorRule rule=
+				new InteractionComparatorRule();
+		
+		RegistryFactory.setRegistry(null);
+		
+		DefaultModelListener l=new DefaultModelListener();
+		
+		java.util.List<ComparatorRule> rules=
+					new java.util.Vector<ComparatorRule>();
+		
+		rules.add(new RoleComparatorRule());
+		rules.add(new ChannelComparatorRule());
+		rules.add(new MessageSignatureComparatorRule());
+		rules.add(new TypeReferenceComparatorRule());
+		
+		DefaultComparatorContext context=
+			new DefaultComparatorContext(new ModelReference(TEST_NOTATION),
+						new ModelReference(TEST_NOTATION), rules);
+		
+		Role toRole1=new Role();
+		toRole1.setName("toRole1");
+		
+		Role toRole2=new Role();
+		toRole2.setName("toRole2");
+		
+		MessageSignature msig=new MessageSignature();
+		TypeReference typeRef=new TypeReference();
+		typeRef.setLocalpart("testType");
+		msig.getTypes().add(typeRef);
+		
+		Interaction main=new Interaction();
+		main.setMessageSignature(msig);
+		main.setToRole(toRole1);
+		
+		Interaction reference=new Interaction();
+		reference.setMessageSignature(msig);
+		reference.setToRole(toRole2);
+	
+		boolean result=rule.compare(context, main, reference, l, false);
+		
+		// Should report role comparison error - actual error
+		// is determine by RoleComparatorRule, just passed
+		// through by this rule
+		if (l.getErrors().size() != 1) {
+			fail("One error expected");
+		}
+		
+		if (result == true) {
+			fail("Comparator should have failed");
+		}
+	}	
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/comparator/MessageSignatureComparatorRuleTest.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/comparator/MessageSignatureComparatorRuleTest.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/comparator/MessageSignatureComparatorRuleTest.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,257 @@
+/*
+ * Copyright 2005-9 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 28 Feb 2009 : Initial version created by gary
+ */
+package org.scribble.comparator;
+
+import org.scribble.extensions.RegistryFactory;
+import org.scribble.model.*;
+import org.scribble.model.admin.*;
+
+import junit.framework.TestCase;
+
+public class MessageSignatureComparatorRuleTest extends TestCase {
+
+	private static final String TEST_NOTATION = "test";
+
+	public void testCompareSameOpNoTypes() {
+		MessageSignatureComparatorRule rule=
+				new MessageSignatureComparatorRule();
+		
+		RegistryFactory.setRegistry(null);
+		
+		DefaultModelListener l=new DefaultModelListener();
+		
+		java.util.List<ComparatorRule> rules=
+					new java.util.Vector<ComparatorRule>();
+		
+		rules.add(new TypeReferenceComparatorRule());
+		
+		DefaultComparatorContext context=
+			new DefaultComparatorContext(new ModelReference(TEST_NOTATION),
+						new ModelReference(TEST_NOTATION), rules);
+		
+		MessageSignature main=new MessageSignature();
+		main.setOperation("opName");
+		
+		MessageSignature reference=new MessageSignature();
+		reference.setOperation("opName");
+	
+		boolean result=rule.compare(context, main, reference, l, false);
+		
+		if (l.getErrors().size() > 0) {
+			fail("No errors expected");
+		}
+		
+		if (result == false) {
+			fail("Comparator failed");
+		}
+	}
+
+	public void testCompareDiffOpNoTypes() {
+		MessageSignatureComparatorRule rule=
+				new MessageSignatureComparatorRule();
+		
+		RegistryFactory.setRegistry(null);
+		
+		DefaultModelListener l=new DefaultModelListener();
+		
+		java.util.List<ComparatorRule> rules=
+					new java.util.Vector<ComparatorRule>();
+		
+		rules.add(new TypeReferenceComparatorRule());
+		
+		DefaultComparatorContext context=
+			new DefaultComparatorContext(new ModelReference(TEST_NOTATION),
+						new ModelReference(TEST_NOTATION), rules);
+		
+		MessageSignature main=new MessageSignature();
+		main.setOperation("opName1");
+		
+		MessageSignature reference=new MessageSignature();
+		reference.setOperation("opName2");
+	
+		boolean result=rule.compare(context, main, reference, l, false);
+		
+		if (l.getErrors().size() != 1) {
+			fail("One error expected");
+		}
+		
+		if (result == true) {
+			fail("Comparator should have failed");
+		}
+	}
+	
+	public void testCompareNoOpSameTypes() {
+		MessageSignatureComparatorRule rule=
+				new MessageSignatureComparatorRule();
+		
+		RegistryFactory.setRegistry(null);
+		
+		DefaultModelListener l=new DefaultModelListener();
+		
+		java.util.List<ComparatorRule> rules=
+					new java.util.Vector<ComparatorRule>();
+		
+		rules.add(new TypeReferenceComparatorRule());
+		
+		DefaultComparatorContext context=
+			new DefaultComparatorContext(new ModelReference(TEST_NOTATION),
+						new ModelReference(TEST_NOTATION), rules);
+
+		TypeReference typeRef=new TypeReference();
+		typeRef.setLocalpart("typeRef");
+		
+		MessageSignature main=new MessageSignature();
+		main.getTypes().add(typeRef);
+		
+		MessageSignature reference=new MessageSignature();
+		reference.getTypes().add(typeRef);
+	
+		boolean result=rule.compare(context, main, reference, l, false);
+		
+		if (l.getErrors().size() > 0) {
+			fail("No errors expected");
+		}
+		
+		if (result == false) {
+			fail("Comparator failed");
+		}
+	}
+	
+	public void testCompareNoOpDiffTypes() {
+		MessageSignatureComparatorRule rule=
+				new MessageSignatureComparatorRule();
+		
+		RegistryFactory.setRegistry(null);
+		
+		DefaultModelListener l=new DefaultModelListener();
+		
+		java.util.List<ComparatorRule> rules=
+					new java.util.Vector<ComparatorRule>();
+		
+		rules.add(new TypeReferenceComparatorRule());
+		
+		DefaultComparatorContext context=
+			new DefaultComparatorContext(new ModelReference(TEST_NOTATION),
+						new ModelReference(TEST_NOTATION), rules);
+
+		TypeReference typeRef1=new TypeReference();
+		typeRef1.setLocalpart("typeRef1");
+		
+		TypeReference typeRef2=new TypeReference();
+		typeRef2.setLocalpart("typeRef2");
+		
+		MessageSignature main=new MessageSignature();
+		main.getTypes().add(typeRef1);
+		
+		MessageSignature reference=new MessageSignature();
+		reference.getTypes().add(typeRef2);
+	
+		boolean result=rule.compare(context, main, reference, l, false);
+		
+		if (l.getErrors().size() != 1) {
+			fail("One error expected");
+		}
+		
+		if (result == true) {
+			fail("Comparator should have failed");
+		}
+	}
+	
+	public void testCompareOpSameTypes() {
+		MessageSignatureComparatorRule rule=
+				new MessageSignatureComparatorRule();
+		
+		RegistryFactory.setRegistry(null);
+		
+		DefaultModelListener l=new DefaultModelListener();
+		
+		java.util.List<ComparatorRule> rules=
+					new java.util.Vector<ComparatorRule>();
+		
+		rules.add(new TypeReferenceComparatorRule());
+		
+		DefaultComparatorContext context=
+			new DefaultComparatorContext(new ModelReference(TEST_NOTATION),
+						new ModelReference(TEST_NOTATION), rules);
+
+		TypeReference typeRef=new TypeReference();
+		typeRef.setLocalpart("typeRef");
+		
+		MessageSignature main=new MessageSignature();
+		main.setOperation("opName");
+		main.getTypes().add(typeRef);
+		
+		MessageSignature reference=new MessageSignature();
+		reference.setOperation("opName");
+		reference.getTypes().add(typeRef);
+	
+		boolean result=rule.compare(context, main, reference, l, false);
+		
+		if (l.getErrors().size() > 0) {
+			fail("No errors expected");
+		}
+		
+		if (result == false) {
+			fail("Comparator failed");
+		}
+	}
+	
+	public void testCompareOpDiffTypes() {
+		MessageSignatureComparatorRule rule=
+				new MessageSignatureComparatorRule();
+		
+		RegistryFactory.setRegistry(null);
+		
+		DefaultModelListener l=new DefaultModelListener();
+		
+		java.util.List<ComparatorRule> rules=
+					new java.util.Vector<ComparatorRule>();
+		
+		rules.add(new TypeReferenceComparatorRule());
+		
+		DefaultComparatorContext context=
+			new DefaultComparatorContext(new ModelReference(TEST_NOTATION),
+						new ModelReference(TEST_NOTATION), rules);
+
+		TypeReference typeRef1=new TypeReference();
+		typeRef1.setLocalpart("typeRef1");
+		
+		TypeReference typeRef2=new TypeReference();
+		typeRef2.setLocalpart("typeRef2");
+		
+		MessageSignature main=new MessageSignature();
+		main.setOperation("opName");
+		main.getTypes().add(typeRef1);
+		
+		MessageSignature reference=new MessageSignature();
+		reference.setOperation("opName");
+		reference.getTypes().add(typeRef2);
+	
+		boolean result=rule.compare(context, main, reference, l, false);
+		
+		if (l.getErrors().size() != 1) {
+			fail("One error expected");
+		}
+		
+		if (result == true) {
+			fail("Comparator should have failed");
+		}
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/comparator/NamespaceComparatorRuleTest.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/comparator/NamespaceComparatorRuleTest.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/comparator/NamespaceComparatorRuleTest.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,101 @@
+/*
+ * Copyright 2005-9 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 28 Feb 2009 : Initial version created by gary
+ */
+package org.scribble.comparator;
+
+import org.scribble.extensions.RegistryFactory;
+import org.scribble.model.*;
+import org.scribble.model.admin.*;
+
+import junit.framework.TestCase;
+
+public class NamespaceComparatorRuleTest extends TestCase {
+
+	private static final String TEST_NOTATION = "test";
+
+	public void testCompareSameNamespace() {
+		NamespaceComparatorRule rule=
+				new NamespaceComparatorRule();
+		
+		RegistryFactory.setRegistry(null);
+		
+		DefaultModelListener l=new DefaultModelListener();
+		
+		java.util.List<ComparatorRule> rules=
+					new java.util.Vector<ComparatorRule>();
+		
+		DefaultComparatorContext context=
+			new DefaultComparatorContext(new ModelReference(TEST_NOTATION),
+						new ModelReference(TEST_NOTATION), rules);
+		
+		Namespace main=new Namespace();
+		main.setName("test.namespace");
+		
+		Namespace reference=new Namespace();
+		reference.setName("test.namespace");
+	
+		boolean result=rule.compare(context, main, reference, l, false);
+		
+		if (l.getErrors().size() > 0) {
+			fail("No errors expected");
+		}
+		
+		if (result == false) {
+			fail("Comparator failed");
+		}
+	}
+	
+	public void testCompareDiffNamespace() {
+		NamespaceComparatorRule rule=
+				new NamespaceComparatorRule();
+		
+		RegistryFactory.setRegistry(null);
+		
+		DefaultModelListener l=new DefaultModelListener();
+		
+		java.util.List<ComparatorRule> rules=
+					new java.util.Vector<ComparatorRule>();
+		
+		DefaultComparatorContext context=
+			new DefaultComparatorContext(new ModelReference(TEST_NOTATION),
+						new ModelReference(TEST_NOTATION), rules);
+		
+		Namespace main=new Namespace();
+		main.setName("test.namespace1");
+		
+		Namespace reference=new Namespace();
+		reference.setName("test.namespace2");
+	
+		boolean result=rule.compare(context, main, reference, l, false);
+		
+		/*
+		 * Currently does not report message - may need to
+		 * change, including doing name mapping of the
+		 * namespace?
+		 * 
+		if (l.getErrors().size() != 1) {
+			fail("One error expected");
+		}
+		*/
+		
+		if (result == true) {
+			fail("Comparator should have failed");
+		}
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/comparator/RoleComparatorRuleTest.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/comparator/RoleComparatorRuleTest.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/comparator/RoleComparatorRuleTest.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,95 @@
+/*
+ * Copyright 2005-9 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 28 Feb 2009 : Initial version created by gary
+ */
+package org.scribble.comparator;
+
+import org.scribble.extensions.RegistryFactory;
+import org.scribble.model.*;
+import org.scribble.model.admin.*;
+
+import junit.framework.TestCase;
+
+public class RoleComparatorRuleTest extends TestCase {
+
+	private static final String TEST_NOTATION = "test";
+
+	public void testCompareSameName() {
+		RoleComparatorRule rule=
+				new RoleComparatorRule();
+		
+		RegistryFactory.setRegistry(null);
+		
+		DefaultModelListener l=new DefaultModelListener();
+		
+		java.util.List<ComparatorRule> rules=
+					new java.util.Vector<ComparatorRule>();
+		
+		DefaultComparatorContext context=
+			new DefaultComparatorContext(new ModelReference(TEST_NOTATION),
+						new ModelReference(TEST_NOTATION), rules);
+		
+		Role main=new Role();
+		main.setName("roleName");
+		
+		Role reference=new Role();
+		reference.setName("roleName");
+	
+		boolean result=rule.compare(context, main, reference, l, false);
+		
+		if (l.getErrors().size() > 0) {
+			fail("No errors expected");
+		}
+		
+		if (result == false) {
+			fail("Comparator failed");
+		}
+	}
+	
+	public void testCompareDiffNames() {
+		RoleComparatorRule rule=
+				new RoleComparatorRule();
+		
+		RegistryFactory.setRegistry(null);
+		
+		DefaultModelListener l=new DefaultModelListener();
+		
+		java.util.List<ComparatorRule> rules=
+					new java.util.Vector<ComparatorRule>();
+		
+		DefaultComparatorContext context=
+			new DefaultComparatorContext(new ModelReference(TEST_NOTATION),
+						new ModelReference(TEST_NOTATION), rules);
+		
+		Role main=new Role();
+		main.setName("roleName1");
+		
+		Role reference=new Role();
+		reference.setName("roleName2");
+	
+		boolean result=rule.compare(context, main, reference, l, false);
+		
+		if (l.getErrors().size() != 1) {
+			fail("One error expected");
+		}
+		
+		if (result == true) {
+			fail("Comparator should have failed");
+		}
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/comparator/TestComparatorRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/comparator/TestComparatorRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/comparator/TestComparatorRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,52 @@
+/*
+ * Copyright 2005-9 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 28 Feb 2009 : Initial version created by gary
+ */
+package org.scribble.comparator;
+
+import org.scribble.model.ModelObject;
+import org.scribble.model.admin.ModelListener;
+
+public class TestComparatorRule implements ComparatorRule {
+
+	public TestComparatorRule(Class<?> modelType, Class<?> refType,
+					boolean result) {
+		m_modelType = modelType;
+		m_refType = refType;
+		m_compareResult = result;
+	}
+	
+	public boolean compare(ComparatorContext context, ModelObject main,
+			ModelObject reference, ModelListener l, boolean deep) {
+		return(m_compareResult);
+	}
+
+	public boolean isComparisonSupported(ModelObject main, ModelObject ref) {
+		return(m_modelType.isAssignableFrom(main.getClass()) &&
+				m_refType.isAssignableFrom(ref.getClass()));
+	}
+
+	public boolean isTypeSupported(ModelObject obj) {
+		return(m_modelType.isAssignableFrom(obj.getClass()) &&
+				m_refType.isAssignableFrom(obj.getClass()));
+	}
+
+	private boolean m_compareResult=true;
+	private Class<?> m_modelType=null;
+	private Class<?> m_refType=null;
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/comparator/TypeReferenceComparatorRuleTest.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/comparator/TypeReferenceComparatorRuleTest.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/comparator/TypeReferenceComparatorRuleTest.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,95 @@
+/*
+ * Copyright 2005-9 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 28 Feb 2009 : Initial version created by gary
+ */
+package org.scribble.comparator;
+
+import org.scribble.extensions.RegistryFactory;
+import org.scribble.model.*;
+import org.scribble.model.admin.*;
+
+import junit.framework.TestCase;
+
+public class TypeReferenceComparatorRuleTest extends TestCase {
+
+	private static final String TEST_NOTATION = "test";
+
+	public void testCompareSameType() {
+		TypeReferenceComparatorRule rule=
+				new TypeReferenceComparatorRule();
+		
+		RegistryFactory.setRegistry(null);
+		
+		DefaultModelListener l=new DefaultModelListener();
+		
+		java.util.List<ComparatorRule> rules=
+					new java.util.Vector<ComparatorRule>();
+		
+		DefaultComparatorContext context=
+			new DefaultComparatorContext(new ModelReference(TEST_NOTATION),
+						new ModelReference(TEST_NOTATION), rules);
+		
+		TypeReference main=new TypeReference();
+		main.setLocalpart("type");
+		
+		TypeReference reference=new TypeReference();
+		reference.setLocalpart("type");
+	
+		boolean result=rule.compare(context, main, reference, l, false);
+		
+		if (l.getErrors().size() > 0) {
+			fail("No errors expected");
+		}
+		
+		if (result == false) {
+			fail("Comparator failed");
+		}
+	}
+	
+	public void testCompareDiffTypes() {
+		TypeReferenceComparatorRule rule=
+			new TypeReferenceComparatorRule();
+	
+		RegistryFactory.setRegistry(null);
+		
+		DefaultModelListener l=new DefaultModelListener();
+		
+		java.util.List<ComparatorRule> rules=
+					new java.util.Vector<ComparatorRule>();
+		
+		DefaultComparatorContext context=
+			new DefaultComparatorContext(new ModelReference(TEST_NOTATION),
+						new ModelReference(TEST_NOTATION), rules);
+		
+		TypeReference main=new TypeReference();
+		main.setLocalpart("type1");
+		
+		TypeReference reference=new TypeReference();
+		reference.setLocalpart("type2");
+	
+		boolean result=rule.compare(context, main, reference, l, false);
+		
+		if (l.getErrors().size() != 1) {
+			fail("One error expected");
+		}
+		
+		if (result == true) {
+			fail("Comparator should have failed");
+		}
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/extensions/AbstractRegistryTest.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/extensions/AbstractRegistryTest.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/extensions/AbstractRegistryTest.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,562 @@
+/*
+ * Copyright 2005-9 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 15 Feb 2009 : Initial version created by gary
+ */
+package org.scribble.extensions;
+
+import junit.framework.TestCase;
+
+import org.scribble.extensions.test.*;
+import org.scribble.model.AbstractNotation;
+import org.scribble.model.Notation;
+
+public class AbstractRegistryTest extends TestCase {
+
+	// Need to test that rules returned for notation hierarchy
+	// including the notation=null
+	
+	public void testExtensionNoNotation() {
+		TestRegistry reg=new TestRegistry();
+		
+		try {
+			reg.addExtension(MainNotation1.class);
+			reg.addExtension(MainNotation2.class);
+			reg.addExtension(SubNotation1A.class);
+			reg.addExtension(Extension1Rule.class);
+		} catch(Exception e) {
+			fail("Failed to register extensions");
+		}
+		
+		Object ext=reg.getExtension(Extension1.class, null);
+		
+		if (ext == null) {
+			fail("Failed to retrieve extension");
+		}
+		
+		if (ext.getClass() != Extension1Rule.class) {
+			fail("Unexpected extension returns '"+ext.getClass()+
+					"', was expecting: "+Extension1Rule.class);
+		}
+	}
+
+	public void testExtensionMain1() {
+		TestRegistry reg=new TestRegistry();
+		
+		try {
+			reg.addExtension(MainNotation1.class);
+			reg.addExtension(MainNotation2.class);
+			reg.addExtension(SubNotation1A.class);
+			reg.addExtension(Extension1Rule_MN1.class);
+			reg.addExtension(Extension1Rule_MN2.class);
+		} catch(Exception e) {
+			fail("Failed to register extensions");
+		}
+		
+		Object ext=reg.getExtension(Extension1.class,
+						MainNotation1.NOTATION);
+		
+		if (ext == null) {
+			fail("Failed to retrieve extension");
+		}
+		
+		if (ext.getClass() != Extension1Rule_MN1.class) {
+			fail("Unexpected extension returns '"+ext.getClass()+
+					"', was expecting: "+Extension1Rule_MN1.class);
+		}
+	}
+
+
+	public void testExtensionMain2() {
+		TestRegistry reg=new TestRegistry();
+		
+		try {
+			reg.addExtension(MainNotation1.class);
+			reg.addExtension(MainNotation2.class);
+			reg.addExtension(SubNotation1A.class);
+			reg.addExtension(Extension1Rule_MN1.class);
+			reg.addExtension(Extension1Rule_MN2.class);
+		} catch(Exception e) {
+			fail("Failed to register extensions");
+		}
+		
+		Object ext=reg.getExtension(Extension1.class,
+						MainNotation2.NOTATION);
+		
+		if (ext == null) {
+			fail("Failed to retrieve extension");
+		}
+		
+		if (ext.getClass() != Extension1Rule_MN2.class) {
+			fail("Unexpected extension returns '"+ext.getClass()+
+					"', was expecting: "+Extension1Rule_MN2.class);
+		}
+	}
+
+	public void testExtensionsNoNotation() {
+		TestRegistry reg=new TestRegistry();
+		
+		try {
+			reg.addExtension(MainNotation1.class);
+			reg.addExtension(MainNotation2.class);
+			reg.addExtension(SubNotation1A.class);
+			reg.addExtension(Extension1Rule.class);
+			reg.addExtension(Extension1Rule_MN1.class);
+			reg.addExtension(Extension1Rule_SN1A.class);
+		} catch(Exception e) {
+			fail("Failed to register extensions");
+		}
+		
+		java.util.List<Object> exts=reg.getExtensions(Extension1.class, null);
+		
+		if (exts == null) {
+			fail("Failed to retrieve extensions");
+		}
+		
+		// All registered extensions, with the exception of
+		// extensions that have been overridden by another
+		// extension - in this case, the Extension1Rule_MN1
+		// overrides Extension1Rule
+		if (exts.size() != 2) {
+			fail("Should be 2 extensions returned");
+		}
+		
+		for (int i=0; i < exts.size(); i++) {
+			if (exts.get(i).getClass() == Extension1Rule.class) {
+				fail("Extension 'Extension1Rule' should not be in the list");
+			}
+		}
+	}
+
+	public void testExtensionsNoNotation_Derived() {
+		TestRegistry reg=new TestRegistry();
+		
+		try {
+			reg.addExtension(MainNotation1.class);
+			reg.addExtension(MainNotation2.class);
+			reg.addExtension(SubNotation1A.class);
+			reg.addExtension(Extension1Rule.class);
+			reg.addExtension(Extension1Rule_MN1.class);
+			reg.addExtension(Extension1Rule_Derived_SN1A.class);
+		} catch(Exception e) {
+			fail("Failed to register extensions");
+		}
+		
+		java.util.List<Object> exts=reg.getExtensions(Extension1.class, null);
+		
+		if (exts == null) {
+			fail("Failed to retrieve extensions");
+		}
+		
+		// All registered extensions, with the exception of
+		// extensions that have been overridden by another
+		// extension - in this case, the Extension1Rule_Derived_SN1A
+		// overrides Extension1Rule_MN1, and Extension1Rule_MN1
+		// overrides Extension1Rule
+		if (exts.size() != 1) {
+			fail("Should be 1 extensions returned");
+		}
+		
+		for (int i=0; i < exts.size(); i++) {
+			if (exts.get(i).getClass() == Extension1Rule_MN1.class) {
+				fail("Extension 'Extension1Rule_MN1' should not be in the list");
+			}
+			if (exts.get(i).getClass() == Extension1Rule.class) {
+				fail("Extension 'Extension1Rule' should not be in the list");
+			}
+		}
+	}
+
+	/**
+	 * This test ensures that if an extension is overridden
+	 * by a specific notation (MN1), then a request by
+	 * that notation (MN1) returns the derived extension.
+	 */
+	public void testExtensionMN1() {
+		TestRegistry reg=new TestRegistry();
+		
+		try {
+			reg.addExtension(MainNotation1.class);
+			reg.addExtension(MainNotation2.class);
+			reg.addExtension(SubNotation1A.class);
+			reg.addExtension(Extension1Rule.class);
+			reg.addExtension(Extension1Rule_MN1.class);
+		} catch(Exception e) {
+			fail("Failed to register extensions");
+		}
+		
+		Object ext=reg.getExtension(Extension1.class,
+							MainNotation1.NOTATION);
+		
+		if (ext == null) {
+			fail("Failed to retrieve extension");
+		}
+		
+		if (ext.getClass() != Extension1Rule_MN1.class) {
+			fail("Unexpected extension returns '"+ext.getClass()+
+					"', was expecting: "+Extension1Rule_MN1.class);
+		}
+	}
+
+	/**
+	 * This test ensures that if an extension is overridden
+	 * by another specific notation (MN1), then a request by
+	 * another notation (MN2) makes a request, which should
+	 * still return the generic extension.
+	 */
+	public void testExtensionMN2() {
+		TestRegistry reg=new TestRegistry();
+		
+		try {
+			reg.addExtension(MainNotation1.class);
+			reg.addExtension(MainNotation2.class);
+			reg.addExtension(SubNotation1A.class);
+			reg.addExtension(Extension1Rule.class);
+			reg.addExtension(Extension1Rule_MN1.class);
+		} catch(Exception e) {
+			fail("Failed to register extensions");
+		}
+		
+		Object ext=reg.getExtension(Extension1.class,
+							MainNotation2.NOTATION);
+		
+		if (ext == null) {
+			fail("Failed to retrieve extension");
+		}
+		
+		if (ext.getClass() != Extension1Rule.class) {
+			fail("Unexpected extension returns '"+ext.getClass()+
+					"', was expecting: "+Extension1Rule.class);
+		}
+	}
+
+	/**
+	 * This test makes a request for a derived notation,
+	 * but should return the extension for a generic
+	 * notation as a specific extension has not been
+	 * defined for the derived notation.
+	 */
+	public void testExtensionForDerivedNotation1() {
+		TestRegistry reg=new TestRegistry();
+		
+		try {
+			reg.addExtension(MainNotation1.class);
+			reg.addExtension(MainNotation2.class);
+			reg.addExtension(SubNotation1A.class);
+			reg.addExtension(Extension1Rule.class);
+			reg.addExtension(Extension1Rule_MN1.class);
+		} catch(Exception e) {
+			fail("Failed to register extensions");
+		}
+		
+		Object ext=reg.getExtension(Extension1.class,
+							SubNotation1A.NOTATION);
+		
+		if (ext == null) {
+			fail("Failed to retrieve extension");
+		}
+		
+		if (ext.getClass() != Extension1Rule_MN1.class) {
+			fail("Unexpected extension returns '"+ext.getClass()+
+					"', was expecting: "+Extension1Rule_MN1.class);
+		}
+	}
+
+	/**
+	 * This test returns a list of extensions that are appropriate
+	 * for the supplied 'sub' notation. This will include one
+	 * extension associated with the supplied notation, and
+	 * another associated with a generic (super) notation.
+	 */
+	public void testExtensionsForDerivedNotation1() {
+		TestRegistry reg=new TestRegistry();
+		
+		try {
+			reg.addExtension(MainNotation1.class);
+			reg.addExtension(MainNotation2.class);
+			reg.addExtension(SubNotation1A.class);
+			reg.addExtension(Extension1Rule.class);
+			reg.addExtension(Extension1Rule_MN1.class);
+			reg.addExtension(Extension1Rule_SN1A.class);
+		} catch(Exception e) {
+			fail("Failed to register extensions");
+		}
+		
+		java.util.List<Object> exts=reg.getExtensions(Extension1.class,
+							SubNotation1A.NOTATION);
+		
+		if (exts.size() != 2) {
+			fail("Was expecting 2 extensions");
+		}
+		
+		for (int i=0; i < exts.size(); i++) {
+			if (exts.get(i).getClass() == Extension1Rule.class) {
+				fail("Extension 'Extension1Rule' should not be in the list");
+			}
+		}	
+	}
+
+	/**
+	 * This test returns a list of extensions that are appropriate
+	 * for the supplied 'sub' notation. This will include one
+	 * extension associated with the supplied notation. The
+	 * other potential extension (Extension1Rule_MN1) would have
+	 * been overridden.
+	 */
+	public void testExtensionsForDerivedNotation2() {
+		TestRegistry reg=new TestRegistry();
+		
+		try {
+			reg.addExtension(MainNotation1.class);
+			reg.addExtension(MainNotation2.class);
+			reg.addExtension(SubNotation1A.class);
+			reg.addExtension(Extension1Rule.class);
+			reg.addExtension(Extension1Rule_MN1.class);
+			reg.addExtension(Extension1Rule_Derived_SN1A.class);
+		} catch(Exception e) {
+			fail("Failed to register extensions");
+		}
+		
+		java.util.List<Object> exts=reg.getExtensions(Extension1.class,
+							SubNotation1A.NOTATION);
+		
+		if (exts.size() != 1) {
+			fail("Was expecting 1 extensions");
+		}
+		
+		for (int i=0; i < exts.size(); i++) {
+			if (exts.get(i).getClass() == Extension1Rule.class) {
+				fail("Extension 'Extension1Rule' should not be in the list");
+			}
+			if (exts.get(i).getClass() == Extension1Rule_MN1.class) {
+				fail("Extension 'Extension1Rule_MN1' should not be in the list");
+			}
+		}	
+	}
+
+	public void testGetNotationSuitabilitySameNotations1() {
+		TestRegistry reg=new TestRegistry();
+		
+		try {
+			reg.addExtension(NotationA.class);
+			reg.addExtension(NotationB.class);
+			reg.addExtension(NotationC.class);
+		} catch (RegistryException e) {
+			fail("Failed to register extensions: "+e);
+		}
+		
+		int suitability=reg.getNotationSuitability("A", "A");
+		
+		if (suitability != 0) {
+			fail("Suitability should be 0: "+suitability);
+		}
+	}
+
+	public void testGetNotationSuitabilitySameNotations2() {
+		TestRegistry reg=new TestRegistry();
+		
+		try {
+			reg.addExtension(NotationA.class);
+			reg.addExtension(NotationB.class);
+			reg.addExtension(NotationC.class);
+		} catch (RegistryException e) {
+			fail("Failed to register extensions: "+e);
+		}
+		
+		int suitability=reg.getNotationSuitability("A", "C,A");
+		
+		if (suitability != 0) {
+			fail("Suitability should be 0: "+suitability);
+		}
+	}
+	
+	// Should return -1 as no relationship between the requested
+	// notation and the one that would be associated with the
+	// extension.
+	public void testGetNotationSuitabilityDiffNotations() {
+		TestRegistry reg=new TestRegistry();
+		
+		try {
+			reg.addExtension(NotationA.class);
+			reg.addExtension(NotationB.class);
+			reg.addExtension(NotationC.class);
+		} catch (RegistryException e) {
+			fail("Failed to register extensions: "+e);
+		}
+		
+		int suitability=reg.getNotationSuitability("A", "C");
+		
+		if (suitability != -1) {
+			fail("Suitability should be -1: "+suitability);
+		}
+	}
+	
+	// Should return success, but indicate there is a single level
+	// of indirection between the requested type (B) and the one
+	// is available (A).
+	public void testGetNotationSuitabilityDerivedNotations() {
+		TestRegistry reg=new TestRegistry();
+		
+		try {
+			reg.addExtension(NotationA.class);
+			reg.addExtension(NotationB.class);
+			reg.addExtension(NotationC.class);
+		} catch (RegistryException e) {
+			fail("Failed to register extensions: "+e);
+		}
+		
+		int suitability=reg.getNotationSuitability("B", "A");
+		
+		if (suitability != 1) {
+			fail("Suitability should be 1: "+suitability);
+		}
+	}
+	
+	// Check that if asking for generic notation, should not
+	// consider derived notation suitable. Derived (or rather
+	// a more specific) notation should only be returned if
+	// either requested, or a more specific notation is
+	// requested.
+	public void testGetNotationSuitabilitySuperNotations() {
+		TestRegistry reg=new TestRegistry();
+		
+		try {
+			reg.addExtension(NotationA.class);
+			reg.addExtension(NotationB.class);
+			reg.addExtension(NotationC.class);
+		} catch (RegistryException e) {
+			fail("Failed to register extensions: "+e);
+		}
+		
+		int suitability=reg.getNotationSuitability("A", "B");
+		
+		if (suitability != -1) {
+			fail("Suitability should be -1: "+suitability);
+		}
+	}
+	
+	// Check that extension for requested notation is
+	// returned.
+	public void testGetInstanceListRequestedNotation() {
+		TestRegistry reg=new TestRegistry();
+		
+		try {
+			reg.addExtension(NotationA.class);
+			reg.addExtension(NotationB.class);
+			reg.addExtension(TestExtensionAImpl.class);
+			reg.addExtension(TestExtensionBImpl.class);
+		} catch (RegistryException e) {
+			fail("Failed to register extensions: "+e);
+		}
+		
+		java.util.List<Object> list=reg.getInstanceList(TestExtension.class, "A");
+		
+		if (list == null) {
+			fail("List is null");
+		}
+		
+		if (list.size() != 1) {
+			fail("List should have 1 element: "+list.size());
+		}
+		
+		if (list.get(0).getClass() != TestExtensionAImpl.class) {
+			fail("Expecting class 'TestExtensionAImpl', but got: "+
+					list.get(0).getClass());
+		}
+	}
+	
+	// Check that extension for requested notation is
+	// returned ahead of extension for super-notation.
+	public void testGetInstanceList() {
+		TestRegistry reg=new TestRegistry();
+		
+		try {
+			reg.addExtension(NotationA.class);
+			reg.addExtension(NotationB.class);
+			reg.addExtension(TestExtensionAImpl.class);
+			reg.addExtension(TestExtensionBImpl.class);
+		} catch (RegistryException e) {
+			fail("Failed to register extensions: "+e);
+		}
+		
+		java.util.List<Object> list=reg.getInstanceList(TestExtension.class, "B");
+		
+		if (list == null) {
+			fail("List is null");
+		}
+		
+		if (list.size() != 2) {
+			fail("List should have 2 elements: "+list.size());
+		}
+		
+		if (list.get(0).getClass() != TestExtensionBImpl.class) {
+			fail("First element expecting class 'TestExtensionBImpl', but got: "+
+					list.get(0).getClass());
+		}		
+		
+		if (list.get(1).getClass() != TestExtensionAImpl.class) {
+			fail("Second element expecting class 'TestExtensionAImpl', but got: "+
+					list.get(1).getClass());
+		}		
+	}
+	
+	@RegistryInfo(extension=Notation.class)
+	public static class NotationA extends AbstractNotation {
+		public NotationA() {
+			super("A","NotationA",false);
+		}
+	}
+	
+	@RegistryInfo(extension=Notation.class)
+	public static class NotationB extends AbstractNotation {
+		public NotationB() {
+			super("B","NotationB",false);
+		}
+		public Notation getSuperNotation() {
+			return(new NotationA());
+		}
+	}
+	
+	@RegistryInfo(extension=Notation.class)
+	public static class NotationC extends AbstractNotation {
+		public NotationC() {
+			super("C","NotationC",false);
+		}
+	}
+	
+	public interface TestExtension {
+		public void testMethod();
+	}
+	
+	@RegistryInfo(extension=TestExtension.class,notation="A")
+	public static class TestExtensionAImpl implements TestExtension {
+		public TestExtensionAImpl() {	
+		}
+		
+		public void testMethod() {
+		}
+	}
+	
+	@RegistryInfo(extension=TestExtension.class,notation="B")
+	public static class TestExtensionBImpl implements TestExtension {
+		public TestExtensionBImpl() {	
+		}
+		
+		public void testMethod() {
+		}
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/extensions/TestRegistry.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/extensions/TestRegistry.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/extensions/TestRegistry.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,32 @@
+/*
+ * Copyright 2005-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 1 May 2008 : Initial version created by gary
+ */
+package org.scribble.extensions;
+
+public class TestRegistry extends AbstractRegistry {
+
+	@Override
+	public void initialize() throws RegistryException {
+	}
+
+	public boolean isActive() {
+		return true;
+	}
+
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/extensions/TestSingleExtensionRegistry.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/extensions/TestSingleExtensionRegistry.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/extensions/TestSingleExtensionRegistry.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,43 @@
+/*
+ * Copyright 2007 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 9 Nov 2007 : Initial version created by gary
+ */
+package org.scribble.extensions;
+
+import java.util.List;
+
+public class TestSingleExtensionRegistry implements Registry {
+
+	public TestSingleExtensionRegistry(Object extension) {
+		m_extension = extension;
+	}
+
+	public boolean isActive() {
+		return true;
+	}
+
+	public Object getExtension(Class<?> intf, String notation) {
+		return(m_extension);
+	}
+
+	public List<Object> getExtensions(Class<?> intf, String notation) {
+		return null;
+	}
+	
+	private Object m_extension=null;
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/extensions/TestTypeMapRegistry.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/extensions/TestTypeMapRegistry.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/extensions/TestTypeMapRegistry.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,43 @@
+/*
+ * Copyright 2007-9 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 28 Feb 2009 : Initial version created by gary
+ */
+package org.scribble.extensions;
+
+import java.util.List;
+
+public class TestTypeMapRegistry implements Registry {
+
+	public TestTypeMapRegistry(java.util.Map<Class<?>,Object> map) {
+		m_extensions = map;
+	}
+
+	public boolean isActive() {
+		return true;
+	}
+
+	public Object getExtension(Class<?> intf, String notation) {
+		return(m_extensions.get(intf));
+	}
+
+	public List<Object> getExtensions(Class<?> intf, String notation) {
+		return null;
+	}
+	
+	private java.util.Map<Class<?>,Object> m_extensions=null;
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/extensions/test/Extension1.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/extensions/test/Extension1.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/extensions/test/Extension1.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,24 @@
+/*
+ * Copyright 2005-9 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 15 Feb 2009 : Initial version created by gary
+ */
+package org.scribble.extensions.test;
+
+public interface Extension1 {
+
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/extensions/test/Extension1Rule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/extensions/test/Extension1Rule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/extensions/test/Extension1Rule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,27 @@
+/*
+ * Copyright 2005-9 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 15 Feb 2009 : Initial version created by gary
+ */
+package org.scribble.extensions.test;
+
+import org.scribble.extensions.*;
+
+ at RegistryInfo(extension=Extension1.class)
+public class Extension1Rule implements Extension1 {
+
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/extensions/test/Extension1Rule_Derived_SN1A.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/extensions/test/Extension1Rule_Derived_SN1A.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/extensions/test/Extension1Rule_Derived_SN1A.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,27 @@
+/*
+ * Copyright 2005-9 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 15 Feb 2009 : Initial version created by gary
+ */
+package org.scribble.extensions.test;
+
+import org.scribble.extensions.*;
+
+ at RegistryInfo(extension=Extension1.class,notation=SubNotation1A.NOTATION)
+public class Extension1Rule_Derived_SN1A extends Extension1Rule_MN1 {
+
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/extensions/test/Extension1Rule_MN1.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/extensions/test/Extension1Rule_MN1.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/extensions/test/Extension1Rule_MN1.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,27 @@
+/*
+ * Copyright 2005-9 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 15 Feb 2009 : Initial version created by gary
+ */
+package org.scribble.extensions.test;
+
+import org.scribble.extensions.*;
+
+ at RegistryInfo(extension=Extension1.class,notation=MainNotation1.NOTATION)
+public class Extension1Rule_MN1 extends Extension1Rule {
+
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/extensions/test/Extension1Rule_MN2.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/extensions/test/Extension1Rule_MN2.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/extensions/test/Extension1Rule_MN2.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,27 @@
+/*
+ * Copyright 2005-9 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 15 Feb 2009 : Initial version created by gary
+ */
+package org.scribble.extensions.test;
+
+import org.scribble.extensions.*;
+
+ at RegistryInfo(extension=Extension1.class,notation=MainNotation2.NOTATION)
+public class Extension1Rule_MN2 extends Extension1Rule {
+
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/extensions/test/Extension1Rule_SN1A.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/extensions/test/Extension1Rule_SN1A.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/extensions/test/Extension1Rule_SN1A.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,27 @@
+/*
+ * Copyright 2005-9 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 15 Feb 2009 : Initial version created by gary
+ */
+package org.scribble.extensions.test;
+
+import org.scribble.extensions.*;
+
+ at RegistryInfo(extension=Extension1.class,notation=SubNotation1A.NOTATION)
+public class Extension1Rule_SN1A implements Extension1 {
+
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/extensions/test/MainNotation1.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/extensions/test/MainNotation1.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/extensions/test/MainNotation1.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,32 @@
+/*
+ * Copyright 2005-9 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 15 Feb 2009 : Initial version created by gary
+ */
+package org.scribble.extensions.test;
+
+import org.scribble.extensions.RegistryInfo;
+
+ at RegistryInfo(extension=org.scribble.model.Notation.class)
+public class MainNotation1 extends org.scribble.model.AbstractNotation {
+
+	public static final String NOTATION="MN1";
+	
+	public MainNotation1() {
+		super(NOTATION, "MainNotation1", false);
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/extensions/test/MainNotation2.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/extensions/test/MainNotation2.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/extensions/test/MainNotation2.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,32 @@
+/*
+ * Copyright 2005-9 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 15 Feb 2009 : Initial version created by gary
+ */
+package org.scribble.extensions.test;
+
+import org.scribble.extensions.RegistryInfo;
+
+ at RegistryInfo(extension=org.scribble.model.Notation.class)
+public class MainNotation2 extends org.scribble.model.AbstractNotation {
+
+	public static final String NOTATION="MN2";
+	
+	public MainNotation2() {
+		super(NOTATION, "MainNotation2", false);
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/extensions/test/SubNotation1A.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/extensions/test/SubNotation1A.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/extensions/test/SubNotation1A.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,37 @@
+/*
+ * Copyright 2005-9 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 15 Feb 2009 : Initial version created by gary
+ */
+package org.scribble.extensions.test;
+
+import org.scribble.extensions.RegistryInfo;
+import org.scribble.model.Notation;
+
+ at RegistryInfo(extension=org.scribble.model.Notation.class)
+public class SubNotation1A extends org.scribble.model.AbstractNotation {
+
+	public static final String NOTATION="SN1A";
+	
+	public SubNotation1A() {
+		super(NOTATION, "SubNotation1A", false);
+	}
+	
+	public Notation getSuperNotation() {
+		return(new MainNotation1());
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/model/InteractionTest.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/model/InteractionTest.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/model/InteractionTest.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,117 @@
+/*
+ * Copyright 2005-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 11 Nov 2008 : Initial version created by gary
+ */
+package org.scribble.model;
+
+import junit.framework.TestCase;
+
+public class InteractionTest extends TestCase {
+
+	public void testIsWaitStateFalse1() {
+		
+		Definition d=new Definition() {
+		};
+		
+		LocatedName mn=new LocatedName();
+		d.setLocatedName(mn);
+		
+		Role r=new Role();
+		r.setName("r1");
+		
+		mn.setRole(r);
+		
+		Interaction interaction=new Interaction();
+		
+		d.getBlock().getContents().add(interaction);
+		
+		if (interaction.isWaitState()) {
+			fail("Not a wait state");
+		}
+	}
+
+	public void testIsWaitStateFalse2() {
+		
+		Definition d=new Definition() {
+		};
+		
+		LocatedName mn=new LocatedName();
+		d.setLocatedName(mn);
+		
+		Role r=new Role();
+		r.setName("r1");
+		
+		mn.setRole(r);
+		
+		Interaction interaction=new Interaction();
+		
+		interaction.setFromRole(r);
+		
+		d.getBlock().getContents().add(interaction);
+		
+		if (interaction.isWaitState()) {
+			fail("Not a wait state");
+		}
+	}
+
+	public void testIsWaitStateFalse3() {
+		
+		Definition d=new Definition() {
+		};
+		
+		LocatedName mn=new LocatedName();
+		d.setLocatedName(mn);
+		
+		Role r=new Role();
+		r.setName("r1");
+		
+		Interaction interaction=new Interaction();
+		
+		interaction.setToRole(r);
+		
+		d.getBlock().getContents().add(interaction);
+		
+		if (interaction.isWaitState()) {
+			fail("Not a wait state");
+		}
+	}
+
+	public void testIsWaitStateTrue1() {
+		
+		Definition d=new Definition() {
+		};
+		
+		LocatedName mn=new LocatedName();
+		d.setLocatedName(mn);
+		
+		Role r=new Role();
+		r.setName("r1");
+		
+		mn.setRole(r);
+		
+		Interaction interaction=new Interaction();
+		
+		interaction.setToRole(r);
+		
+		d.getBlock().getContents().add(interaction);
+		
+		if (interaction.isWaitState() == false) {
+			fail("IS a wait state");
+		}
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/model/ModelObjectTest.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/model/ModelObjectTest.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/model/ModelObjectTest.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,231 @@
+/*
+ * Copyright 2005-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 6 Sep 2008 : Initial version created by gary
+ */
+package org.scribble.model;
+
+import junit.framework.TestCase;
+
+public class ModelObjectTest extends TestCase {
+
+	public void testGetSourceModelObjectURI() {
+		Top t=new Top();
+		
+		Middle mid=new Middle();
+		t.setMid(mid);
+		mid.setParent(t);
+		
+		Bottom b_mid_1=new Bottom();
+		mid.getBottom().add(b_mid_1);
+		
+		Bottom b_mid_2=new Bottom();
+		mid.getBottom().add(b_mid_2);
+		
+		Middle m1=new Middle();
+		t.getMiddle().add(m1);
+		
+		Bottom bot1=new Bottom();
+		m1.setOther(bot1);
+		bot1.setParent(m1);
+		
+		Bottom b1_1=new Bottom();
+		m1.getBottom().add(b1_1);
+		
+		Bottom b1_2=new Bottom();
+		m1.getBottom().add(b1_2);
+		
+		Middle m2=new Middle();
+		t.getMiddle().add(m2);
+		
+		Bottom b2_1=new Bottom();
+		m2.getBottom().add(b2_1);
+		
+		Bottom b2_2=new Bottom();
+		m2.getBottom().add(b2_2);
+		
+		t.initializeURIPart("");
+		
+		String uri=b1_1.getSource().getModelObjectURI();
+		
+		if (uri == null) {
+			fail("URI not set");
+		}
+		
+		if (uri.equals("//middle.1/bottom.1") == false) {
+			fail("URI not as expected: "+uri);
+		}
+		
+		if (b1_1.getSource().getModelObjectURI().equals(uri) == false) {
+			fail("b1_1 source ref mo URI not same as URI");
+		}
+		
+		uri = b2_2.getSource().getModelObjectURI();
+		
+		if (uri == null) {
+			fail("URI not set");
+		}
+		
+		if (uri.equals("//middle.2/bottom.2") == false) {
+			fail("URI not as expected: "+uri);
+		}
+		
+		if (b2_2.getSource().getModelObjectURI().equals(uri) == false) {
+			fail("b2_2 source ref mo URI not same as URI");
+		}
+		
+		uri = m2.getSource().getModelObjectURI();
+		
+		if (uri == null) {
+			fail("URI not set");
+		}
+		
+		if (uri.equals("//middle.2") == false) {
+			fail("URI not as expected: "+uri);
+		}
+		
+		if (m2.getSource().getModelObjectURI().equals(uri) == false) {
+			fail("m2 source ref mo URI not same as URI");
+		}
+		
+		uri = bot1.getSource().getModelObjectURI();
+		
+		if (uri == null) {
+			fail("URI not set");
+		}
+		
+		if (uri.equals("//middle.1/other") == false) {
+			fail("URI not as expected: "+uri);
+		}
+		
+		if (bot1.getSource().getModelObjectURI().equals(uri) == false) {
+			fail("bot1 source ref mo URI not same as URI");
+		}
+		
+		uri = b_mid_1.getSource().getModelObjectURI();
+		
+		if (uri == null) {
+			fail("URI not set");
+		}
+		
+		if (uri.equals("//mid/bottom.1") == false) {
+			fail("URI not as expected: "+uri);
+		}
+		
+		if (b_mid_1.getSource().getModelObjectURI().equals(uri) == false) {
+			fail("b_mid_1 source ref mo URI not same as URI");
+		}
+	}
+	
+	public void testFindChild() {
+		Top t=new Top();
+		
+		Middle mid=new Middle();
+		t.setMid(mid);
+		mid.setParent(t);
+		
+		Bottom b_mid_1=new Bottom();
+		mid.getBottom().add(b_mid_1);
+		
+		Bottom b_mid_2=new Bottom();
+		mid.getBottom().add(b_mid_2);
+		
+		Middle m1=new Middle();
+		t.getMiddle().add(m1);
+		
+		Bottom bot1=new Bottom();
+		m1.setOther(bot1);
+		bot1.setParent(m1);
+		
+		Bottom b1_1=new Bottom();
+		m1.getBottom().add(b1_1);
+		
+		Bottom b1_2=new Bottom();
+		m1.getBottom().add(b1_2);
+		
+		Middle m2=new Middle();
+		t.getMiddle().add(m2);
+		
+		Bottom b2_1=new Bottom();
+		m2.getBottom().add(b2_1);
+		
+		Bottom b2_2=new Bottom();
+		m2.getBottom().add(b2_2);
+		
+		t.initializeURIPart("");
+		
+		if (t.findChild("middle.2") != m2) {
+			fail("Failed to find middle.2 child");
+		}
+		
+		if (m1.findChild("bottom.1") != b1_1) {
+			fail("Failed to find bottom 1 child");
+		}
+		
+		if (m1.findChild("other") != bot1) {
+			fail("Failed to find other child");
+		}
+		
+		if (t.findChild("mid") != mid) {
+			fail("Failed to find mid child");
+		}
+	}
+	
+	public class Top extends ModelObject {
+		
+		@Reference(containment=true)
+		public java.util.List<Middle> getMiddle() {
+			return(m_middle);
+		}
+		
+		@Reference(containment=true)
+		public Middle getMid() {
+			return(m_mid);
+		}
+		
+		public void setMid(Middle mid) {
+			m_mid = mid;
+		}
+		
+		private java.util.List<Middle> m_middle=new ContainmentList<Middle>(Top.this, Middle.class);
+		private Middle m_mid=null;
+	}
+	
+	public class Middle extends ModelObject {
+		
+		@Reference(containment=true)
+		public java.util.List<Bottom> getBottom() {
+			return(m_bottom);
+		}
+		
+		@Reference(containment=true)
+		public Bottom getOther() {
+			return(m_other);
+		}
+		
+		public void setOther(Bottom b) {
+			m_other = b;
+		}
+		
+		private java.util.List<Bottom> m_bottom=new ContainmentList<Bottom>(Middle.this, Bottom.class);
+		private Bottom m_other=null;
+	}
+	
+	public class Bottom extends ModelObject {
+		
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/model/ModelReferenceTest.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/model/ModelReferenceTest.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/model/ModelReferenceTest.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,117 @@
+/*
+ * Copyright 2005-9 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 28 Feb 2009 : Initial version created by gary
+ */
+package org.scribble.model;
+
+import junit.framework.TestCase;
+
+public class ModelReferenceTest extends TestCase {
+
+	private static final String TEST_NOTATION = "test";
+
+	public void testEqualsLocalpartSame() {
+		ModelReference ref1=new ModelReference(TEST_NOTATION);
+		ModelReference ref2=new ModelReference(TEST_NOTATION);
+
+		ref1.setLocalpart("local");
+		ref2.setLocalpart("local");
+		
+		if (ref1.equals(ref2) == false) {
+			fail("Model refs should be same");
+		}
+	}
+
+	public void testEqualsLocalpartDiff() {
+		ModelReference ref1=new ModelReference(TEST_NOTATION);
+		ModelReference ref2=new ModelReference(TEST_NOTATION);
+
+		ref1.setLocalpart("local1");
+		ref2.setLocalpart("local2");
+		
+		if (ref1.equals(ref2) == true) {
+			fail("Model refs should NOT be same");
+		}
+	}
+
+	public void testEqualsFQNSame() {
+		ModelReference ref1=new ModelReference(TEST_NOTATION);
+		ModelReference ref2=new ModelReference(TEST_NOTATION);
+
+		ref1.setLocalpart("local");
+		ref1.setNamespace("ns");
+		ref2.setLocalpart("local");
+		ref2.setNamespace("ns");
+		
+		if (ref1.equals(ref2) == false) {
+			fail("Model refs should be same");
+		}
+	}
+
+	public void testEqualsFQNDiffLocalpart() {
+		ModelReference ref1=new ModelReference(TEST_NOTATION);
+		ModelReference ref2=new ModelReference(TEST_NOTATION);
+
+		ref1.setLocalpart("local1");
+		ref1.setNamespace("ns");
+		ref2.setLocalpart("local2");
+		ref2.setNamespace("ns");
+		
+		if (ref1.equals(ref2) == true) {
+			fail("Model refs should NOT be same");
+		}
+	}
+
+	public void testEqualsFQNDiffNS() {
+		ModelReference ref1=new ModelReference(TEST_NOTATION);
+		ModelReference ref2=new ModelReference(TEST_NOTATION);
+
+		ref1.setLocalpart("local");
+		ref1.setNamespace("ns1");
+		ref2.setLocalpart("local");
+		ref2.setNamespace("ns2");
+		
+		if (ref1.equals(ref2) == true) {
+			fail("Model refs should NOT be same");
+		}
+	}
+	
+	public void testHashCodeLocalpartSame() {
+		ModelReference ref1=new ModelReference(TEST_NOTATION);
+		ModelReference ref2=new ModelReference(TEST_NOTATION);
+
+		ref1.setLocalpart("local");
+		ref2.setLocalpart("local");
+		
+		if (ref1.hashCode() != ref2.hashCode()) {
+			fail("Model refs hashCode should be same");
+		}
+	}
+
+	public void testHashCodeLocalpartDiff() {
+		ModelReference ref1=new ModelReference(TEST_NOTATION);
+		ModelReference ref2=new ModelReference(TEST_NOTATION);
+
+		ref1.setLocalpart("local1");
+		ref2.setLocalpart("local2");
+		
+		if (ref1.hashCode() == ref2.hashCode()) {
+			fail("Model refs hashCode should NOT be same");
+		}
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/model/ModelTest.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/model/ModelTest.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/model/ModelTest.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,122 @@
+/*
+ * Copyright 2005-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 6 Sep 2008 : Initial version created by gary
+ */
+package org.scribble.model;
+
+import java.util.List;
+
+import junit.framework.TestCase;
+
+public class ModelTest extends TestCase {
+
+	public void testFindModelObject() {
+		
+		TopModel t=new TopModel();
+		
+		Middle mid=new Middle();
+		t.setMid(mid);
+		mid.setParent(t);
+		
+		Bottom b_mid_1=new Bottom();
+		mid.getBottom().add(b_mid_1);
+		
+		Bottom b_mid_2=new Bottom();
+		mid.getBottom().add(b_mid_2);
+		
+		Middle m1=new Middle();
+		t.getMiddle().add(m1);
+		
+		Bottom bot1=new Bottom();
+		m1.setOther(bot1);
+		bot1.setParent(m1);
+		
+		Bottom b1_1=new Bottom();
+		m1.getBottom().add(b1_1);
+		
+		Bottom b1_2=new Bottom();
+		m1.getBottom().add(b1_2);
+		
+		Middle m2=new Middle();
+		t.getMiddle().add(m2);
+		
+		Bottom b2_1=new Bottom();
+		m2.getBottom().add(b2_1);
+		
+		Bottom b2_2=new Bottom();
+		m2.getBottom().add(b2_2);
+		
+		t.initializeURIs();
+		
+		if (t.findModelObject("//middle.1/bottom.1") != b1_1) {
+			fail("Failed to find m1->b1");
+		}
+		
+		if (t.findModelObject("//mid/bottom.2") != b_mid_2) {
+			fail("Failed to find mid->b2");
+		}
+		
+		if (t.findModelObject("//middle.1/other") != bot1) {
+			fail("Failed to find m1->other");
+		}
+	}
+	
+	public class TopModel extends TestModel {
+		
+		@Reference(containment=true)
+		public java.util.List<Middle> getMiddle() {
+			return(m_middle);
+		}
+		
+		@Reference(containment=true)
+		public Middle getMid() {
+			return(m_mid);
+		}
+		
+		public void setMid(Middle mid) {
+			m_mid = mid;
+		}
+
+		private java.util.List<Middle> m_middle=new ContainmentList<Middle>(TopModel.this, Middle.class);
+		private Middle m_mid=null;
+	}
+	
+	public class Middle extends ModelObject {
+		
+		@Reference(containment=true)
+		public java.util.List<Bottom> getBottom() {
+			return(m_bottom);
+		}
+		
+		@Reference(containment=true)
+		public Bottom getOther() {
+			return(m_other);
+		}
+		
+		public void setOther(Bottom b) {
+			m_other = b;
+		}
+		
+		private java.util.List<Bottom> m_bottom=new ContainmentList<Bottom>(Middle.this, Bottom.class);
+		private Bottom m_other=null;
+	}
+	
+	public class Bottom extends ModelObject {
+		
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/model/TestDefinition.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/model/TestDefinition.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/model/TestDefinition.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,29 @@
+/*
+ * Copyright 2005-9 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 8 November 2009 : Initial version created by gary
+ */
+package org.scribble.model;
+
+public class TestDefinition extends Definition {
+
+	/**
+	 * 
+	 */
+	private static final long serialVersionUID = 6928397919692808974L;
+
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/model/TestModel.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/model/TestModel.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/model/TestModel.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,40 @@
+/*
+ * Copyright 2005-9 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 28 Feb 2009 : Initial version created by gary
+ */
+package org.scribble.model;
+
+import java.util.List;
+
+public class TestModel extends Model {
+
+	private static final long serialVersionUID = 1451347101999033427L;
+
+	public void setDefinition(Definition defn) {
+		defn.setParent(this);
+		
+		m_definitions.add(defn);
+	}
+	
+	@Override
+	public List<Definition> getDefinitions() {
+		return(m_definitions);
+	}
+
+	private List<Definition> m_definitions=new java.util.Vector<Definition>();
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/model/TestMultiPathBehaviour.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/model/TestMultiPathBehaviour.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/model/TestMultiPathBehaviour.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,62 @@
+/*
+ * Copyright 2005-9 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 8 November 2009 : Initial version created by gary
+ */
+package org.scribble.model;
+
+import java.util.List;
+
+public class TestMultiPathBehaviour extends MultiPathBehaviour {
+
+	private static final long serialVersionUID = 8235810904977687042L;
+
+	public TestMultiPathBehaviour() {
+	}
+	
+	@Override
+	public Block createNewPath() {
+		Block ret=new Block();
+		ret.setParent(this);
+		
+		m_paths.add(ret);
+		
+		return(ret);
+	}
+
+	@Override
+	public OrderingConstraint getOrdering() {
+		return(m_ordering);
+	}
+	
+	public void setOrdering(OrderingConstraint oc) {
+		m_ordering = oc;
+	}
+
+	@Override
+	public List<Block> getPaths() {
+		return(m_paths);
+	}
+
+	@Override
+	public boolean removePath(Block path) {
+		return(m_paths.remove(path));
+	}
+
+	private java.util.List<Block> m_paths=new java.util.Vector<Block>();
+	private OrderingConstraint m_ordering=OrderingConstraint.Ordered;
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/model/TestSinglePathBehaviour.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/model/TestSinglePathBehaviour.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/model/TestSinglePathBehaviour.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,36 @@
+/*
+ * Copyright 2005-9 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 8 November 2009 : Initial version created by gary
+ */
+package org.scribble.model;
+
+public class TestSinglePathBehaviour extends SinglePathBehaviour {
+
+	private static final long serialVersionUID = 7412502499877343886L;
+
+	public TestSinglePathBehaviour() {
+		m_block.setParent(this);
+	}
+	
+	@Override
+	public Block getBlock() {
+		return(m_block);
+	}
+
+	private Block m_block=new Block();
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/model/admin/AbstractDependencyManagerTest.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/model/admin/AbstractDependencyManagerTest.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/model/admin/AbstractDependencyManagerTest.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,263 @@
+/*
+ * Copyright 2007 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 9 Nov 2007 : Initial version created by gary
+ */
+package org.scribble.model.admin;
+
+import org.scribble.model.ModelReference;
+import org.scribble.model.admin.DependencyType;
+
+import junit.framework.TestCase;
+
+public class AbstractDependencyManagerTest extends TestCase {
+
+	public void testDependents1() {
+		
+		org.scribble.extensions.TestSingleExtensionRegistry reg=
+			new org.scribble.extensions.TestSingleExtensionRegistry(null);
+		org.scribble.extensions.RegistryFactory.setRegistry(reg);
+		
+		AbstractDependencyManager mgr=new AbstractDependencyManager() {
+			@Override
+			protected ModelResource getResource(ModelReference ref) {
+				return(new TestModelResource(ref));
+			}
+		};
+		
+		ModelReference fromRef1=new ModelReference("ns1","lp1",null,"spm");
+		ModelReference toRef1=new ModelReference("ns2","lp2",null,"spm");
+		
+		mgr.recordDependency(fromRef1, toRef1, DependencyType.Uses);
+		
+		java.util.List<ModelReference> dependents=mgr.getDependents(toRef1);
+		
+		if (dependents == null) {
+			fail("Should not be empty list");
+		}
+		
+		if (dependents.size() != 1) {
+			fail("Should only be 1 entry: "+dependents.size());
+		}
+		
+		if (dependents.get(0) != fromRef1) {
+			fail("Expecting single entry to be: "+fromRef1+
+					", but was: "+dependents.get(0));
+		}
+		
+		dependents = mgr.getDependents(toRef1, DependencyType.Uses);
+		
+		if (dependents == null) {
+			fail("Should not be empty list for Uses dependency type");
+		}
+		
+		if (dependents.size() != 1) {
+			fail("Should only be 1 entry for Uses: "+dependents.size());
+		}
+		
+		if (dependents.get(0) != fromRef1) {
+			fail("Expecting single entry (for Uses) to be: "+fromRef1+
+					", but was: "+dependents.get(0));
+		}
+		
+		dependents = mgr.getDependents(toRef1, DependencyType.ConformsTo);
+
+		if (dependents == null) {
+			fail("Should not be empty list for ConformsTo dependency type");
+		}
+		
+		if (dependents.size() != 0) {
+			fail("Should be 0 entries for ConformsTo: "+dependents.size());
+		}
+	}
+	
+	public void testDependents2() {
+		
+		org.scribble.extensions.TestSingleExtensionRegistry reg=
+			new org.scribble.extensions.TestSingleExtensionRegistry(null);
+		org.scribble.extensions.RegistryFactory.setRegistry(reg);
+		
+		AbstractDependencyManager mgr=new AbstractDependencyManager() {
+			@Override
+			protected ModelResource getResource(ModelReference ref) {
+				return(new TestModelResource(ref));
+			}
+		};
+		
+		ModelReference fromRef1=new ModelReference("ns1","lp1",null,"spm");
+		ModelReference fromRef2=new ModelReference("ns1","lp2",null,"spm");
+		ModelReference toRef1=new ModelReference("ns2","lp2",null,"spm");
+		
+		mgr.recordDependency(fromRef1, toRef1, DependencyType.Uses);
+		mgr.recordDependency(fromRef2, toRef1, DependencyType.ConformsTo);
+		
+		java.util.List<ModelReference> dependents=
+							mgr.getDependents(toRef1);
+		
+		if (dependents == null) {
+			fail("Should not be empty list");
+		}
+		
+		if (dependents.size() != 2) {
+			fail("Should only be 2 entry: "+dependents.size());
+		}
+		
+		if (dependents.contains(fromRef1) == false) {
+			fail("Expecting list to contain "+fromRef1);
+		}
+		
+		if (dependents.contains(fromRef2) == false) {
+			fail("Expecting list to contain "+fromRef2);
+		}
+		
+		dependents = mgr.getDependents(toRef1, DependencyType.Uses);
+		
+		if (dependents == null) {
+			fail("Should not be empty list for Uses dependency type");
+		}
+		
+		if (dependents.size() != 1) {
+			fail("Should only be 1 entry for Uses: "+dependents.size());
+		}
+		
+		if (dependents.get(0) != fromRef1) {
+			fail("Expecting single entry (for Uses) to be: "+fromRef1+
+					", but was: "+dependents.get(0));
+		}
+		
+		dependents = mgr.getDependents(toRef1, DependencyType.ConformsTo);
+		
+		if (dependents == null) {
+			fail("Should not be empty list for ConformsTo dependency type");
+		}
+		
+		if (dependents.size() != 1) {
+			fail("Should only be 1 entry for ConformsTo: "+dependents.size());
+		}
+		
+		if (dependents.get(0) != fromRef2) {
+			fail("Expecting single entry (for ConformsTo) to be: "+fromRef2+
+					", but was: "+dependents.get(0));
+		}
+		
+	}
+	
+	public void testDependents3() {
+		
+		org.scribble.extensions.TestSingleExtensionRegistry reg=
+			new org.scribble.extensions.TestSingleExtensionRegistry(null);
+		org.scribble.extensions.RegistryFactory.setRegistry(reg);
+		
+		AbstractDependencyManager mgr=new AbstractDependencyManager() {
+			@Override
+			protected ModelResource getResource(ModelReference ref) {
+				return(new TestModelResource(ref));
+			}
+		};
+		
+		ModelReference fromRef1=new ModelReference("ns1","lp1",null,"spm");
+		ModelReference fromRef2=new ModelReference("ns1","lp2",null,"spm");
+		ModelReference toRef1=new ModelReference("ns2","lp1",null,"spm");
+		ModelReference toRef2=new ModelReference("ns2","lp2",null,"spm");
+		
+		mgr.recordDependency(fromRef1, toRef1, DependencyType.Uses);
+		mgr.recordDependency(fromRef1, toRef2, DependencyType.Uses);
+		mgr.recordDependency(fromRef2, toRef1, DependencyType.Uses);
+		mgr.recordDependency(fromRef2, toRef2, DependencyType.Uses);
+		
+		java.util.List<ModelReference> dependents1=mgr.getDependents(toRef1, DependencyType.Uses);
+		
+		if (dependents1 == null) {
+			fail("Should not be empty list");
+		}
+		
+		if (dependents1.size() != 2) {
+			fail("Should only be 2 entry: "+dependents1.size());
+		}
+		
+		if (dependents1.get(0) != fromRef1) {
+			fail("Expecting first entry to be: "+fromRef1+
+					", but was: "+dependents1.get(0));
+		}
+		
+		if (dependents1.get(1) != fromRef2) {
+			fail("Expecting second entry to be: "+fromRef2+
+					", but was: "+dependents1.get(1));
+		}
+		
+		java.util.List<ModelReference> dependents2=mgr.getDependents(toRef2, DependencyType.Uses);
+		
+		if (dependents2 == null) {
+			fail("Should not be empty list");
+		}
+		
+		if (dependents2.size() != 2) {
+			fail("Should only be 2 entry: "+dependents2.size());
+		}
+		
+		if (dependents2.get(0) != fromRef1) {
+			fail("Expecting first entry to be: "+fromRef1+
+					", but was: "+dependents2.get(0));
+		}
+		
+		if (dependents2.get(1) != fromRef2) {
+			fail("Expecting second entry to be: "+fromRef2+
+					", but was: "+dependents2.get(1));
+		}
+	}
+
+	public void testClearDependencies1() {
+		
+		org.scribble.extensions.TestSingleExtensionRegistry reg=
+			new org.scribble.extensions.TestSingleExtensionRegistry(null);
+		org.scribble.extensions.RegistryFactory.setRegistry(reg);
+		
+		AbstractDependencyManager mgr=new AbstractDependencyManager() {
+			@Override
+			protected ModelResource getResource(ModelReference ref) {
+				return(new TestModelResource(ref));
+			}
+		};
+		
+		ModelReference fromRef1=new ModelReference("ns1","lp1",null,"spm");
+		ModelReference fromRef2=new ModelReference("ns1","lp2",null,"spm");
+		ModelReference toRef1=new ModelReference("ns2","lp1",null,"spm");
+		ModelReference toRef2=new ModelReference("ns2","lp2",null,"spm");
+		
+		mgr.recordDependency(fromRef1, toRef1, DependencyType.Uses);
+		mgr.recordDependency(fromRef1, toRef2, DependencyType.Uses);
+		mgr.recordDependency(fromRef2, toRef1, DependencyType.Uses);
+		mgr.recordDependency(fromRef2, toRef2, DependencyType.Uses);
+		
+		mgr.clearDependencies(fromRef1);
+		
+		java.util.List<ModelReference> dependents2=mgr.getDependents(toRef2, DependencyType.Uses);
+		
+		if (dependents2 == null) {
+			fail("Should not be empty list");
+		}
+		
+		if (dependents2.size() != 1) {
+			fail("Should only be 1 entry: "+dependents2.size());
+		}
+		
+		if (dependents2.get(0) != fromRef2) {
+			fail("Expecting first entry to be: "+fromRef2+
+					", but was: "+dependents2.get(0));
+		}
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/model/admin/DefaultModelListenerTest.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/model/admin/DefaultModelListenerTest.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/model/admin/DefaultModelListenerTest.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,229 @@
+/*
+ * Copyright 2005-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 30 Apr 2008 : Initial version created by gary
+ */
+package org.scribble.model.admin;
+
+import junit.framework.TestCase;
+
+public class DefaultModelListenerTest extends TestCase {
+
+	private static final String OTHER_RESOLUTION = "OtherResolution";
+
+	public void testPlaceholder() {
+	}
+	
+	/*
+	public void testCheckShowReferenceDescriptionProperties1() {
+		java.util.Map<String,Object> props=new java.util.HashMap<String,Object>();
+		java.util.Map<String,Object> additionalProps=new java.util.HashMap<String,Object>();
+		
+		props.put(ModelListener.RESOLUTIONS, ModelListener.SHOW_REFERENCE_DESCRIPTION_RESOLUTION);
+		props.put(ModelListener.REFERENCE_MODEL, "refmodel1");
+		props.put(ModelListener.REFERENCE_MODEL_START_POSITION, "1");
+		props.put(ModelListener.REFERENCE_MODEL_END_POSITION, "2");
+		
+		additionalProps.put(ModelListener.RESOLUTIONS, ModelListener.SHOW_REFERENCE_DESCRIPTION_RESOLUTION);
+		additionalProps.put(ModelListener.REFERENCE_MODEL, "refmodel2");
+		additionalProps.put(ModelListener.REFERENCE_MODEL_START_POSITION, "3");
+		additionalProps.put(ModelListener.REFERENCE_MODEL_END_POSITION, "4");
+		
+		DefaultModelListener l=new DefaultModelListener();
+		
+		l.checkShowReferenceDescriptionProperties(props, additionalProps);
+		
+		if (additionalProps.containsKey(ModelListener.RESOLUTIONS)) {
+			fail("Resolution should not be defined");
+		}
+		
+		if (additionalProps.containsKey(ModelListener.REFERENCE_MODEL)) {
+			fail("Reference model should not be defined");
+		}
+		
+		if (additionalProps.containsKey(ModelListener.REFERENCE_MODEL_START_POSITION)) {
+			fail("Reference model start should not be defined");
+		}
+		
+		if (additionalProps.containsKey(ModelListener.REFERENCE_MODEL_END_POSITION)) {
+			fail("Reference model end should not be defined");
+		}
+	}
+
+	public void testCheckShowReferenceDescriptionProperties2() {
+		java.util.Map<String,Object> props=new java.util.HashMap<String,Object>();
+		java.util.Map<String,Object> additionalProps=new java.util.HashMap<String,Object>();
+		
+		props.put(ModelListener.RESOLUTIONS, ModelListener.SHOW_REFERENCE_DESCRIPTION_RESOLUTION);
+		props.put(ModelListener.REFERENCE_MODEL, "refmodel1");
+		props.put(ModelListener.REFERENCE_MODEL_START_POSITION, "1");
+		props.put(ModelListener.REFERENCE_MODEL_END_POSITION, "2");
+		
+		additionalProps.put(ModelListener.RESOLUTIONS,
+				ModelListener.SHOW_REFERENCE_DESCRIPTION_RESOLUTION+","+
+				OTHER_RESOLUTION);
+		additionalProps.put(ModelListener.REFERENCE_MODEL, "refmodel2");
+		additionalProps.put(ModelListener.REFERENCE_MODEL_START_POSITION, "3");
+		additionalProps.put(ModelListener.REFERENCE_MODEL_END_POSITION, "4");
+		
+		DefaultModelListener l=new DefaultModelListener();
+		
+		l.checkShowReferenceDescriptionProperties(props, additionalProps);
+		
+		if (additionalProps.get(ModelListener.RESOLUTIONS).equals(OTHER_RESOLUTION) == false) {
+			fail("Resolution not as expected: "+additionalProps.get(ModelListener.RESOLUTIONS));
+		}
+		
+		if (additionalProps.containsKey(ModelListener.REFERENCE_MODEL)) {
+			fail("Reference model should not be defined");
+		}
+		
+		if (additionalProps.containsKey(ModelListener.REFERENCE_MODEL_START_POSITION)) {
+			fail("Reference model start should not be defined");
+		}
+		
+		if (additionalProps.containsKey(ModelListener.REFERENCE_MODEL_END_POSITION)) {
+			fail("Reference model end should not be defined");
+		}
+	}
+
+	public void testCheckShowReferenceDescriptionProperties3() {
+		java.util.Map<String,Object> props=new java.util.HashMap<String,Object>();
+		java.util.Map<String,Object> additionalProps=new java.util.HashMap<String,Object>();
+		
+		props.put(ModelListener.RESOLUTIONS, ModelListener.SHOW_REFERENCE_DESCRIPTION_RESOLUTION);
+		props.put(ModelListener.REFERENCE_MODEL, "refmodel1");
+		props.put(ModelListener.REFERENCE_MODEL_START_POSITION, "1");
+		props.put(ModelListener.REFERENCE_MODEL_END_POSITION, "2");
+		props.put(ModelListener.REFERENCE_MODEL_COMPONENT, "comp1");
+		
+		additionalProps.put(ModelListener.RESOLUTIONS, OTHER_RESOLUTION+","+
+				ModelListener.SHOW_REFERENCE_DESCRIPTION_RESOLUTION);
+		additionalProps.put(ModelListener.REFERENCE_MODEL, "refmodel2");
+		additionalProps.put(ModelListener.REFERENCE_MODEL_START_POSITION, "3");
+		additionalProps.put(ModelListener.REFERENCE_MODEL_END_POSITION, "4");
+		additionalProps.put(ModelListener.REFERENCE_MODEL_COMPONENT, "comp2");
+		
+		DefaultModelListener l=new DefaultModelListener();
+		
+		l.checkShowReferenceDescriptionProperties(props, additionalProps);
+		
+		if (additionalProps.get(ModelListener.RESOLUTIONS).equals(OTHER_RESOLUTION) == false) {
+			fail("Resolution not as expected: "+additionalProps.get(ModelListener.RESOLUTIONS));
+		}
+		
+		if (additionalProps.containsKey(ModelListener.REFERENCE_MODEL)) {
+			fail("Reference model should not be defined");
+		}
+		
+		if (additionalProps.containsKey(ModelListener.REFERENCE_MODEL_START_POSITION)) {
+			fail("Reference model start should not be defined");
+		}
+		
+		if (additionalProps.containsKey(ModelListener.REFERENCE_MODEL_END_POSITION)) {
+			fail("Reference model end should not be defined");
+		}
+		
+		if (additionalProps.containsKey(ModelListener.REFERENCE_MODEL_COMPONENT)) {
+			fail("Reference model component should not be defined");
+		}
+	}
+	*/
+
+	/*
+	public void testApplyProperties1() {
+		java.util.Map<String,Object> props=new java.util.HashMap<String,Object>();
+		java.util.Map<String,Object> additionalProps=new java.util.HashMap<String,Object>();
+		
+		props.put(ModelListener.RESOLUTIONS, ModelListener.SHOW_REFERENCE_DESCRIPTION_RESOLUTION);
+		props.put(ModelListener.REFERENCE_MODEL, "refmodel1");
+		props.put(ModelListener.REFERENCE_MODEL_START_POSITION, "1");
+		props.put(ModelListener.REFERENCE_MODEL_END_POSITION, "2");
+		props.put(ModelListener.REFERENCE_MODEL_COMPONENT, "comp1");
+		
+		additionalProps.put(ModelListener.RESOLUTIONS, ModelListener.SHOW_REFERENCE_DESCRIPTION_RESOLUTION);
+		additionalProps.put(ModelListener.REFERENCE_MODEL, "refmodel2");
+		additionalProps.put(ModelListener.REFERENCE_MODEL_START_POSITION, "3");
+		additionalProps.put(ModelListener.REFERENCE_MODEL_END_POSITION, "4");
+		additionalProps.put(ModelListener.REFERENCE_MODEL_COMPONENT, "comp2");
+		
+		DefaultModelListener l=new DefaultModelListener();
+		
+		l.applyProperties(props, null, additionalProps);
+		
+		if (props.get(ModelListener.RESOLUTIONS).equals(
+				ModelListener.SHOW_REFERENCE_DESCRIPTION_RESOLUTION) == false) {
+			fail("Resolution not as expected: "+props.get(ModelListener.RESOLUTIONS));
+		}
+		
+		if (props.get(ModelListener.REFERENCE_MODEL).equals("refmodel1") == false) {
+			fail("Reference model not as expected: "+props.get(ModelListener.REFERENCE_MODEL));
+		}
+		
+		if (props.get(ModelListener.REFERENCE_MODEL_START_POSITION).equals("1") == false) {
+			fail("Reference model start not as expected: "+props.get(ModelListener.REFERENCE_MODEL_START_POSITION));
+		}
+		
+		if (props.get(ModelListener.REFERENCE_MODEL_END_POSITION).equals("2") == false) {
+			fail("Reference model end not as expected: "+props.get(ModelListener.REFERENCE_MODEL_END_POSITION));
+		}
+		
+		if (props.get(ModelListener.REFERENCE_MODEL_COMPONENT).equals("comp1") == false) {
+			fail("Reference model component not as expected: "+props.get(ModelListener.REFERENCE_MODEL_COMPONENT));
+		}
+	}
+
+	public void testApplyProperties2() {
+		java.util.Map<String,Object> props=new java.util.HashMap<String,Object>();
+		java.util.Map<String,Object> additionalProps=new java.util.HashMap<String,Object>();
+		
+		props.put(ModelListener.RESOLUTIONS, ModelListener.SHOW_REFERENCE_DESCRIPTION_RESOLUTION);
+		props.put(ModelListener.REFERENCE_MODEL, "refmodel1");
+		props.put(ModelListener.REFERENCE_MODEL_START_POSITION, "1");
+		props.put(ModelListener.REFERENCE_MODEL_END_POSITION, "2");
+		
+		additionalProps.put(ModelListener.RESOLUTIONS,
+				ModelListener.SHOW_REFERENCE_DESCRIPTION_RESOLUTION+","+
+								OTHER_RESOLUTION);
+		additionalProps.put(ModelListener.REFERENCE_MODEL, "refmodel2");
+		additionalProps.put(ModelListener.REFERENCE_MODEL_START_POSITION, "3");
+		additionalProps.put(ModelListener.REFERENCE_MODEL_END_POSITION, "4");
+		
+		DefaultModelListener l=new DefaultModelListener();
+		
+		l.applyProperties(props, null, additionalProps);
+		
+		if (props.get(ModelListener.RESOLUTIONS).equals(
+				ModelListener.SHOW_REFERENCE_DESCRIPTION_RESOLUTION+","+
+						OTHER_RESOLUTION) == false) {
+			fail("Resolution not as expected: "+props.get(ModelListener.RESOLUTIONS));
+		}
+		
+		if (props.get(ModelListener.REFERENCE_MODEL).equals("refmodel1") == false) {
+			fail("Reference model not as expected: "+props.get(ModelListener.REFERENCE_MODEL));
+		}
+		
+		if (props.get(ModelListener.REFERENCE_MODEL_START_POSITION).equals("1") == false) {
+			fail("Reference model start not as expected: "+props.get(ModelListener.REFERENCE_MODEL_START_POSITION));
+		}
+		
+		if (props.get(ModelListener.REFERENCE_MODEL_END_POSITION).equals("2") == false) {
+			fail("Reference model end not as expected: "+props.get(ModelListener.REFERENCE_MODEL_END_POSITION));
+		}
+	}
+	*/
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/model/admin/ErrorRecorder.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/model/admin/ErrorRecorder.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/model/admin/ErrorRecorder.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,121 @@
+/*
+ * Copyright 2005-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 14 Jul 2008 : Initial version created by gary
+ */
+package org.scribble.model.admin;
+
+import org.scribble.model.admin.ModelIssue;
+import org.scribble.model.admin.ModelListener;
+
+public class ErrorRecorder implements ModelListener {
+
+	public ErrorRecorder() {
+	}
+	
+	public void error(ModelIssue issue) {
+		
+		if (issue.getModelObject() == null) {
+			throw new RuntimeException("Null model object");
+		}
+		
+		m_errors.add(issue);
+		reported(issue.getMessage());
+	}
+
+	public void warning(ModelIssue issue) {
+
+		if (issue.getModelObject() == null) {
+			throw new RuntimeException("Null model object");
+		}
+
+		m_warnings.add(issue);
+		reported(issue.getMessage());
+	}
+	
+	protected void reported(String mesg) {
+		if (mesg != null) {
+			
+			// Check if in the list of messages to be
+			// detected
+			if (m_errorsToDetect.contains(mesg)) {
+				m_errorsToDetect.remove(mesg);
+			} else {
+				m_unexpectedErrors.add(mesg);
+			}
+		}		
+	}
+
+	public void addExpectedError(String mesg) {
+		m_errorsToDetect.add(mesg);
+	}
+	
+	public boolean isValid() {
+		// If there are no more errors to detect, and no
+		// unexpected errors have been reported, then
+		// the expression has been validated as expected
+		return(m_errorsToDetect.size() == 0 &&
+				m_unexpectedErrors.size() == 0);
+	}
+	
+	public String invalidMessage() {
+		String ret="\r\n";
+		
+		if (m_errorsToDetect.size() > 0) {
+			ret += "Errors not detected:\r\n";
+			
+			for (int i=0; i < m_errorsToDetect.size(); i++) {
+				ret += m_errorsToDetect.get(i)+"\r\n";
+			}
+		}
+		
+		if (m_unexpectedErrors.size() > 0) {
+			ret += "Unexpected Errors:\r\n";
+			
+			for (int i=0; i < m_unexpectedErrors.size(); i++) {
+				ret += m_unexpectedErrors.get(i)+"\r\n";
+			}
+		}
+		
+		return(ret);
+	}
+
+	public java.util.List<ModelIssue> getErrors() {
+		return(m_errors);
+	}
+	
+	public java.util.List<ModelIssue> getWarnings() {
+		return(m_warnings);
+	}
+	
+	public boolean hasError(String mesg) {
+		boolean ret=false;
+		
+		for (int i=0; ret == false && i < m_errors.size(); i++) {
+			ModelIssue re=m_errors.get(i);
+			
+			ret = re.getMessage().equals(mesg);
+		}
+		
+		return(ret);
+	}
+	
+	private java.util.List<ModelIssue> m_errors=new java.util.Vector<ModelIssue>();
+	private java.util.List<ModelIssue> m_warnings=new java.util.Vector<ModelIssue>();
+	private java.util.List<String> m_errorsToDetect=new java.util.Vector<String>();
+	private java.util.List<String> m_unexpectedErrors=new java.util.Vector<String>();
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/model/admin/TestModelResource.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/model/admin/TestModelResource.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/model/admin/TestModelResource.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,51 @@
+package org.scribble.model.admin;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.URI;
+
+import org.scribble.model.ModelReference;
+
+public class TestModelResource implements ModelResource {
+
+	public TestModelResource(ModelReference ref) {
+		m_reference = ref;
+	}
+
+	@Override
+	public InputStream getContents() throws IOException {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	@Override
+	public ModelReference getReference() {
+		return(m_reference);
+	}
+
+	@Override
+	public URI getURI() {
+		// TODO Auto-generated method stub
+		return null;
+	}
+	
+	public boolean equals(Object obj) {
+		boolean ret=false;
+		
+		if (obj instanceof TestModelResource) {
+			TestModelResource tmr=(TestModelResource)obj;
+			
+			if (m_reference.equals(tmr.getReference())) {
+				ret = true;
+			}
+		}
+		
+		return(ret);
+	}
+	
+	public int hashCode() {
+		return(m_reference.hashCode());
+	}
+	
+	private ModelReference m_reference=null;
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/model/analysis/TestLookaheadAnalyser.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/model/analysis/TestLookaheadAnalyser.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/model/analysis/TestLookaheadAnalyser.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,43 @@
+/*
+ * Copyright 2005-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 5 Aug 2008 : Initial version created by gary
+ */
+package org.scribble.model.analysis;
+
+import java.util.Set;
+
+import org.scribble.model.Interaction;
+import org.scribble.model.ModelObject;
+
+public class TestLookaheadAnalyser implements LookaheadAnalyser {
+
+	public Set<Interaction> getInteractions(ModelObject mobj) {
+		return(m_interactions);
+	}
+
+	public Set<Interaction> getInteractions(ModelObject mobj,
+			boolean stopAtConditionalInitiator) {
+		return(m_interactions);
+	}
+
+	public void setInteractions(Set<Interaction> interactions) {
+		m_interactions = interactions;
+	}
+	
+	private Set<Interaction> m_interactions=null;
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/model/change/TestChangeInformation.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/model/change/TestChangeInformation.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/model/change/TestChangeInformation.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,76 @@
+/*
+ * Copyright 2005-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 30 Jul 2008 : Initial version created by gary
+ */
+package org.scribble.model.change;
+
+import org.scribble.model.Model;
+import org.scribble.model.ModelObject;
+
+public class TestChangeInformation {
+
+	public TestChangeInformation(Model model, ModelObject mobj,
+						ModelObject other) {
+		m_model = model;
+		m_mobj = mobj;
+		m_other = other;
+	}
+	
+	public void setInsert(boolean insert) {
+		m_insert = insert;
+	}
+	
+	public boolean isInsert() {
+		return(m_insert);
+	}
+	
+	public void setUpdate(boolean update) {
+		m_update = update;
+	}
+	
+	public boolean isUpdate() {
+		return(m_update);
+	}
+	
+	public void setDelete(boolean delete) {
+		m_delete = delete;
+	}
+	
+	public boolean isDelete() {
+		return(m_delete);
+	}
+	
+	public Model getModel() {
+		return(m_model);
+	}
+	
+	public ModelObject getModelObject() {
+		return(m_mobj);
+	}
+	
+	public ModelObject getOther() {
+		return(m_other);
+	}
+	
+	private boolean m_insert=false;
+	private boolean m_update=false;
+	private boolean m_delete=false;
+	private Model m_model=null;
+	private ModelObject m_mobj=null;
+	private ModelObject m_other=null;
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/model/change/TestModelChangeContext.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/model/change/TestModelChangeContext.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/model/change/TestModelChangeContext.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,79 @@
+/*
+ * Copyright 2005-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 30 Jul 2008 : Initial version created by gary
+ */
+package org.scribble.model.change;
+
+import org.scribble.model.Model;
+import org.scribble.model.ModelObject;
+import org.scribble.model.Role;
+
+public class TestModelChangeContext implements ModelChangeContext {
+
+	public Object getParent() {
+		return(m_parent);
+	}
+
+	public void setParent(Object parent) {
+		m_parent = parent;
+	}
+
+	public Role getRole() {
+		return(m_role);
+	}
+	
+	public void setRole(Role role) {
+		m_role = role;
+	}
+
+	public boolean insert(Model model, ModelObject mobj, ModelObject ref) {
+		TestChangeInformation tci=new TestChangeInformation(model, mobj, ref);
+		tci.setInsert(true);
+		m_changeInfo.add(tci);
+		return(true);
+	}
+
+	public boolean update(Model model, ModelObject mobj, ModelObject toObj) {
+		TestChangeInformation tci=new TestChangeInformation(model, mobj, toObj);
+		tci.setUpdate(true);
+		m_changeInfo.add(tci);
+		return(true);
+	}
+
+	public boolean delete(Model model, ModelObject mobj) {
+		TestChangeInformation tci=new TestChangeInformation(model, mobj, null);
+		tci.setDelete(true);
+		m_changeInfo.add(tci);
+		return(true);
+	}
+
+	/**
+	 * This method returns a set of properties used during model change
+	 * processing.
+	 * 
+	 * @return The properties
+	 */
+	public java.util.Map<String,Object> getProperties() {
+		return(m_properties);
+	}
+	
+	private Role m_role=null;
+	private Object m_parent=null;
+	private java.util.List<TestChangeInformation> m_changeInfo=new java.util.Vector<TestChangeInformation>();
+	private java.util.Map<String,Object> m_properties=new java.util.HashMap<String,Object>();
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/model/filter/DefaultModelFilterTest.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/model/filter/DefaultModelFilterTest.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/model/filter/DefaultModelFilterTest.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,115 @@
+/*
+ * Copyright 2005-9 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 21 Jan 2009 : Initial version created by gary
+ */
+package org.scribble.model.filter;
+
+import java.util.List;
+
+import junit.framework.TestCase;
+
+import org.scribble.model.*;
+
+public class DefaultModelFilterTest extends TestCase {
+
+	public void testInteractionFilter() {
+		DefaultModelFilter dmf=new DefaultModelFilter();
+		
+		TestModel model=new TestModel();
+		
+		TestDefinition defn=new TestDefinition();
+		model.getDefinitions().add(defn);
+	
+		Role r1=new Role();
+		r1.setName("r1");
+		
+		Role r2=new Role();
+		r2.setName("r2");
+		
+		Role r3=new Role();
+		r3.setName("r3");
+		
+		Interaction i1=new Interaction();
+		i1.setFromRole(r1);
+		i1.setToRole(r2);
+		
+		defn.getBlock().getContents().add(i1);
+		
+		Interaction i2=new Interaction();
+		i2.setFromRole(r2);
+		i2.setToRole(r3);
+		
+		defn.getBlock().getContents().add(i2);
+		
+		Interaction i3=new Interaction();
+		i3.setFromRole(r3);
+		i3.setToRole(r2);
+		
+		defn.getBlock().getContents().add(i3);
+		
+		Interaction i4=new Interaction();
+		i4.setFromRole(r2);
+		i4.setToRole(r1);
+		
+		defn.getBlock().getContents().add(i4);
+		
+		java.util.List<Role> roles=new java.util.Vector<Role>();
+		roles.add(r1);
+		roles.add(r2);
+		
+		dmf.filter(model, roles);
+		
+		if (defn.getBlock().getContents().size() != 2) {
+			fail("Only two interactions should be left");
+		}
+		
+		if (defn.getBlock().getContents().get(0) != i1) {
+			fail("First interaction not i1");
+		}
+		
+		if (defn.getBlock().getContents().get(1) != i4) {
+			fail("Second interaction not i2");
+		}
+	}
+	
+	public class TestDefinition extends Definition {
+		
+	}
+	
+	public class TestModel extends Model {
+		
+		public List<Definition> getDefinitions() {
+			return(m_definitions);
+		}
+
+		public LocatedName getModelName() {
+			return null;
+		}
+
+		public String getNotation() {
+			return null;
+		}
+
+		public List<Role> getRoles() {
+			return null;
+		}
+		
+		private java.util.List<Definition> m_definitions=
+						new java.util.Vector<Definition>();
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/model/util/InteractionUtilTest.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/model/util/InteractionUtilTest.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/model/util/InteractionUtilTest.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,177 @@
+/*
+ * Copyright 2005-9 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 8 November 2009 : Initial version created by gary
+ */
+package org.scribble.model.util;
+
+import junit.framework.TestCase;
+
+import org.scribble.model.*;
+
+public class InteractionUtilTest extends TestCase {
+
+	public void testGetInitialInteractions() {
+		Definition defn=new TestDefinition();
+		
+		Interaction i1=new Interaction();
+		
+		defn.getBlock().getContents().add(i1);
+		
+		Interaction i2=new Interaction();
+		
+		defn.getBlock().getContents().add(i2);
+		
+		java.util.List<Interaction> results=InteractionUtil.getInitialInteractions(defn);
+		
+		if (results.size() != 1) {
+			fail("Only expecting 1 result: "+results.size());
+		}
+		
+		if (results.get(0) != i1) {
+			fail("Interaction not the expected one");
+		}
+	}
+	
+	public void testGetInitialInteractionsInSinglePath() {
+		Definition defn=new TestDefinition();
+		
+		TestSinglePathBehaviour spb=new TestSinglePathBehaviour();
+		
+		Interaction i1=new Interaction();
+		spb.getBlock().getContents().add(i1);
+		
+		defn.getBlock().getContents().add(spb);
+		
+		java.util.List<Interaction> results=InteractionUtil.getInitialInteractions(defn);
+		
+		if (results.size() != 1) {
+			fail("Only expecting 1 result: "+results.size());
+		}
+		
+		if (results.get(0) != i1) {
+			fail("Interaction not the expected one");
+		}
+	}	
+	
+	public void testGetInitialInteractionsInMultiPath() {
+		Definition defn=new TestDefinition();
+		
+		TestMultiPathBehaviour mpb=new TestMultiPathBehaviour();
+		
+		Interaction i1=new Interaction();
+		
+		Block b1=mpb.createNewPath();
+		
+		b1.getContents().add(i1);
+		
+		Interaction i2=new Interaction();
+		
+		Block b2=mpb.createNewPath();
+		
+		b2.getContents().add(i2);
+		
+		defn.getBlock().getContents().add(mpb);
+		
+		java.util.List<Interaction> results=InteractionUtil.getInitialInteractions(defn);
+		
+		if (results.size() != 2) {
+			fail("Only expecting 2 results: "+results.size());
+		}
+		
+		if (results.contains(i1) == false) {
+			fail("Interaction i1 not in the results");
+		}
+		
+		if (results.contains(i2) == false) {
+			fail("Interaction i2 not in the results");
+		}
+	}
+	
+	public void testIsInitialInteraction() {
+		
+		TestModel model=new TestModel();
+		
+		Definition defn=new TestDefinition();
+		model.setDefinition(defn);
+		
+		Interaction i1=new Interaction();
+		
+		defn.getBlock().getContents().add(i1);
+		
+		Interaction i2=new Interaction();
+	
+		defn.getBlock().getContents().add(i2);
+		
+		if (InteractionUtil.isInitialInteraction(i1) == false) {
+			fail("Should be initial interaction");
+		}
+		
+		if (InteractionUtil.isInitialInteraction(i2)) {
+			fail("Should NOT be initial interaction");
+		}
+	}
+	
+	public void testIsInitialInteractionInSinglePath() {
+		TestModel model=new TestModel();
+		
+		Definition defn=new TestDefinition();
+		model.setDefinition(defn);
+		
+		TestSinglePathBehaviour spb=new TestSinglePathBehaviour();
+		
+		Interaction i1=new Interaction();
+		spb.getBlock().getContents().add(i1);
+		
+		defn.getBlock().getContents().add(spb);
+		
+		if (InteractionUtil.isInitialInteraction(i1) == false) {
+			fail("Should be initial interaction");
+		}
+	}	
+	
+	public void testIsInitialInteractionInMultiPath() {
+		TestModel model=new TestModel();
+		
+		Definition defn=new TestDefinition();
+		model.setDefinition(defn);
+		
+		TestMultiPathBehaviour mpb=new TestMultiPathBehaviour();
+		
+		Interaction i1=new Interaction();
+		
+		Block b1=mpb.createNewPath();
+		
+		b1.getContents().add(i1);
+		
+		Interaction i2=new Interaction();
+		
+		Block b2=mpb.createNewPath();
+		
+		b2.getContents().add(i2);
+		
+		defn.getBlock().getContents().add(mpb);
+		
+		if (InteractionUtil.isInitialInteraction(i1) == false) {
+			fail("Interaction i1 not initial");
+		}
+		
+		if (InteractionUtil.isInitialInteraction(i2) == false) {
+			fail("Interaction i2 not initial");
+		}
+	}	
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/parser/ChannelListParserRuleTest.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/parser/ChannelListParserRuleTest.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/parser/ChannelListParserRuleTest.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,176 @@
+/*
+ * Copyright 2005-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 5 May 2008 : Initial version created by gary
+ */
+package org.scribble.parser;
+
+import junit.framework.TestCase;
+
+import org.scribble.model.*;
+import org.scribble.model.admin.ErrorRecorder;
+
+public class ChannelListParserRuleTest extends TestCase {
+
+	protected void setUp() throws Exception {
+		org.scribble.extensions.TestRegistry reg=
+				new org.scribble.extensions.TestRegistry();
+		
+		reg.addExtension(GenericKeyWordProvider.class);
+		reg.addExtension(GenericParser.class);
+		reg.addExtension(org.scribble.parser.ChannelListParserRule.class);
+		reg.addExtension(TestModelRepository.class);
+		
+		org.scribble.extensions.RegistryFactory.setRegistry(reg);
+	}
+	
+	protected void tearDown() throws Exception {
+		// Clear registry
+		org.scribble.extensions.RegistryFactory.setRegistry(null);
+	}
+	
+	public void testValidChannelList() {
+		String role1Name="Customer";
+		Role role1=new Role(role1Name);
+		String role2Name="Supplier";
+		Role role2=new Role(role2Name);
+		String channel1Name="Ch1";
+		String channel2Name="Ch2";
+
+		String text="channel "+channel1Name+" from "+role1Name+" to "+role2Name+
+					", "+channel2Name+";";
+		
+		ModelReference ref=new ModelReference("");
+		TestParserContext context=new TestParserContext(ref, text);
+		ErrorRecorder l=new ErrorRecorder();
+		
+		context.setState(role1Name, role1);
+		context.setState(role2Name, role2);
+		
+		Object obj=context.parse(ChannelList.class, l);
+		
+		if (obj instanceof ChannelList) {
+			ChannelList chlist=(ChannelList)obj;
+			
+			if (chlist.getChannels().size() != 2) {
+				fail("Two channels expected: "+
+						chlist.getChannels().size());
+			}
+			
+			if (chlist.getChannels().get(0).getFromRole() == null) {
+				fail("First channel From role not set");
+			} else if (chlist.getChannels().get(0).getFromRole() != role1) {
+				fail("First channel From role not expected: "+chlist.getChannels().get(0).getFromRole());
+			}
+			
+			if (chlist.getChannels().get(0).getToRole() == null) {
+				fail("First channel To role not set");
+			} else if (chlist.getChannels().get(0).getFromRole() != role1) {
+				fail("First channel To role not expected: "+chlist.getChannels().get(0).getToRole());
+			}
+			
+			if (chlist.getChannels().get(1).getFromRole() != null) {
+				fail("Second channel should not have 'from' role");
+			}
+			
+			if (chlist.getChannels().get(1).getToRole() != null) {
+				fail("Second channel should not have 'to' role");
+			}
+			
+			Channel ch1=(Channel)context.getState(channel1Name);
+			Channel ch2=(Channel)context.getState(channel2Name);
+			
+			if (ch1 == null) {
+				fail("Channel1 not created");
+			}
+			
+			if (ch2 == null) {
+				fail("Channel2 not created");
+			}
+			
+			// Check no errors or warnings
+			if (l.getErrors().size() > 0) {
+				fail("Not expecting "+l.getErrors().size()+" errors");
+			} else if (l.getWarnings().size() > 0) {
+				fail("Not expecting "+l.getWarnings().size()+" warnings");
+			}
+			
+		} else if (obj == null) {
+			fail("No object returned");
+		} else {
+			fail("Unexpected object type: "+obj.getClass());
+		}
+	}
+
+	public void testInvalidChannelListToRole() {
+		String role1Name="Customer";
+		Role role1=new Role(role1Name);
+		String role2Name="Supplier";
+		Role role2=new Role(role2Name);
+		String channel1Name="Ch1";
+		String channel2Name="Ch2";
+
+		String text="channel "+channel1Name+" from "+role1Name+" to "+role2Name+
+					", "+channel2Name+";";
+		
+		ModelReference ref=new ModelReference("");
+		TestParserContext context=new TestParserContext(ref, text);
+		ErrorRecorder l=new ErrorRecorder();
+		
+		context.setState(role1Name, role1);
+		//context.setState(role2Name, role2);
+		
+		context.parse(ChannelList.class, l);
+		
+		if (l.hasError(org.scribble.util.MessageUtil.format(
+					java.util.PropertyResourceBundle.getBundle(
+						"org.scribble.parser.Messages"),
+							"_UNKNOWN_ROLE",
+						new String[]{role2Name})) == false) {
+			fail("Should register 'unknown role' error");
+		}
+	}
+
+	public void testInvalidChannelListFromRole() {
+		String role1Name="Customer";
+		Role role1=new Role(role1Name);
+		String role2Name="Supplier";
+		Role role2=new Role(role2Name);
+		String channel1Name="Ch1";
+		String channel2Name="Ch2";
+
+		String text="channel "+channel1Name+" from "+role1Name+" to "+role2Name+
+					", "+channel2Name+";";
+		
+		ModelReference ref=new ModelReference("");
+		TestParserContext context=new TestParserContext(ref, text);
+		ErrorRecorder l=new ErrorRecorder();
+		
+		//context.setState(role1Name, role1);
+		context.setState(role2Name, role2);
+		
+		context.parse(ChannelList.class, l);
+		
+		if (l.hasError(org.scribble.util.MessageUtil.format(
+					java.util.PropertyResourceBundle.getBundle(
+						"org.scribble.parser.Messages"),
+							"_UNKNOWN_ROLE",
+						new String[]{role1Name})) == false) {
+			fail("Should register 'unknown role' error");
+		}
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/parser/ConformanceReferenceParserRuleTest.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/parser/ConformanceReferenceParserRuleTest.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/parser/ConformanceReferenceParserRuleTest.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,266 @@
+/*
+ * Copyright 2005-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 7 May 2008 : Initial version created by gary
+ */
+package org.scribble.parser;
+
+import junit.framework.TestCase;
+
+import org.scribble.model.*;
+import org.scribble.model.admin.ErrorRecorder;
+
+public class ConformanceReferenceParserRuleTest extends TestCase {
+
+	protected void setUp() throws Exception {
+		org.scribble.extensions.TestRegistry reg=
+				new org.scribble.extensions.TestRegistry();
+		
+		reg.addExtension(GenericKeyWordProvider.class);
+		reg.addExtension(GenericParser.class);
+		reg.addExtension(org.scribble.parser.ConformanceReferenceParserRule.class);
+		reg.addExtension(TestModelRepository.class);
+		
+		org.scribble.extensions.RegistryFactory.setRegistry(reg);
+	}
+	
+	protected void tearDown() throws Exception {
+		// Clear registry
+		org.scribble.extensions.RegistryFactory.setRegistry(null);
+	}
+	
+	public void testValidConformanceReference() {
+		String type="TestType";
+		String located="Buyer";
+		String text=type+"@"+located;
+		
+		ModelReference ref=new ModelReference("");
+		TestParserContext context=new TestParserContext(ref, text);
+		ErrorRecorder l=new ErrorRecorder();
+		
+		Object obj=context.parse(ConformanceReference.class, l);
+		
+		if (obj instanceof ConformanceReference) {
+			ConformanceReference cref=(ConformanceReference)obj;
+			
+			if (cref.getAlias() == null ||
+					cref.getAlias().equals(type) == false) {
+				fail("Incorrect alias: "+cref.getLocalpart());
+			}
+			
+			if (cref.getLocatedRole() == null ||
+					cref.getLocatedRole().equals(located) == false) {
+				fail("Incorrect located role: "+cref.getLocatedRole());
+			}
+			
+			// Check no errors or warnings
+			if (l.getErrors().size() > 0) {
+				fail("Not expecting "+l.getErrors().size()+" errors");
+			} else if (l.getWarnings().size() > 0) {
+				fail("Not expecting "+l.getWarnings().size()+" warnings");
+			}
+			
+		} else if (obj == null) {
+			fail("No object returned");
+		} else {
+			fail("Unexpected object type: "+obj.getClass());
+		}
+	}
+	
+	public void testValidConformanceReferenceWithBindings() {
+		String type="TestType";
+		String located="Buyer";
+		String varLocal1="varA";
+		String varRemote1="varB";
+		String text=type+"@"+located+"("+varLocal1+" for "+varRemote1+")";
+		
+		ModelReference ref=new ModelReference("");
+		TestParserContext context=new TestParserContext(ref, text);
+		ErrorRecorder l=new ErrorRecorder();
+		
+		Object obj=context.parse(ConformanceReference.class, l);
+		
+		if (obj instanceof ConformanceReference) {
+			ConformanceReference cref=(ConformanceReference)obj;
+			
+			if (cref.getAlias() == null ||
+					cref.getAlias().equals(type) == false) {
+				fail("Incorrect alias: "+cref.getLocalpart());
+			}
+			
+			if (cref.getLocatedRole() == null ||
+					cref.getLocatedRole().equals(located) == false) {
+				fail("Incorrect located role: "+cref.getLocatedRole());
+			}
+			
+			if (cref.getNameMapping().size() != 1) {
+				fail("Should only be 1 name mapping: "+cref.getNameMapping().size());
+			}
+			
+			if (cref.getNameMapping().get(varRemote1).equals(varLocal1) == false) {
+				fail("Invalid name maping: "+cref.getNameMapping().get(varRemote1));
+			}
+			
+			// Check no errors or warnings
+			if (l.getErrors().size() > 0) {
+				fail("Not expecting "+l.getErrors().size()+" errors");
+			} else if (l.getWarnings().size() > 0) {
+				fail("Not expecting "+l.getWarnings().size()+" warnings");
+			}
+			
+		} else if (obj == null) {
+			fail("No object returned");
+		} else {
+			fail("Unexpected object type: "+obj.getClass());
+		}
+	}
+	
+	public void testInvalidConformanceReference1() {
+		String type="TestType";
+		String text=type;
+		
+		ModelReference ref=new ModelReference("");
+		TestParserContext context=new TestParserContext(ref, text);
+		ErrorRecorder l=new ErrorRecorder();
+		
+		Object obj=context.parse(ConformanceReference.class, l);
+		
+		if (obj instanceof ConformanceReference) {
+			
+			if (l.hasError(java.util.PropertyResourceBundle.getBundle(
+								"org.scribble.parser.Messages").
+							getString("_EXPECTING_LOCATED_REFERENCE")) == false) {
+				fail("Expecting located reference");
+			}
+			
+		} else if (obj == null) {
+			fail("No object returned");
+		} else {
+			fail("Unexpected object type: "+obj.getClass());
+		}
+	}
+	
+	public void testInvalidConformanceReference2() {
+		String type="TestType";
+		String located="Buyer";
+		String text=type+"@"+located+"(";
+		
+		ModelReference ref=new ModelReference("");
+		TestParserContext context=new TestParserContext(ref, text);
+		ErrorRecorder l=new ErrorRecorder();
+		
+		Object obj=context.parse(ConformanceReference.class, l);
+		
+		if (obj instanceof ConformanceReference) {
+			
+			if (l.hasError(java.util.PropertyResourceBundle.getBundle(
+					"org.scribble.parser.Messages").
+					getString("_EXPECTING_IDENTIFIER")) == false) {
+				fail("Expecting identifier");
+			}
+			
+		} else if (obj == null) {
+			fail("No object returned");
+		} else {
+			fail("Unexpected object type: "+obj.getClass());
+		}
+	}
+
+	public void testInvalidConformanceReference3() {
+		String type="TestType";
+		String located="Buyer";
+		String varLocal1="varA";
+		String text=type+"@"+located+"("+varLocal1+" to ";
+		
+		ModelReference ref=new ModelReference("");
+		TestParserContext context=new TestParserContext(ref, text);
+		ErrorRecorder l=new ErrorRecorder();
+		
+		Object obj=context.parse(ConformanceReference.class, l);
+		
+		if (obj instanceof ConformanceReference) {
+			
+			if (l.hasError(org.scribble.util.MessageUtil.format(
+					java.util.PropertyResourceBundle.getBundle(
+							"org.scribble.parser.Messages"),
+								"_EXPECTING_KEYWORD",
+								new String[]{"for"})) == false) {
+				fail("Expecting located reference");
+			}
+			
+		} else if (obj == null) {
+			fail("No object returned");
+		} else {
+			fail("Unexpected object type: "+obj.getClass());
+		}
+	}
+
+	public void testInvalidConformanceReference4() {
+		String type="TestType";
+		String located="Buyer";
+		String varLocal1="varA";
+		String text=type+"@"+located+"("+varLocal1+" for ";
+		
+		ModelReference ref=new ModelReference("");
+		TestParserContext context=new TestParserContext(ref, text);
+		ErrorRecorder l=new ErrorRecorder();
+		
+		Object obj=context.parse(ConformanceReference.class, l);
+		
+		if (obj instanceof ConformanceReference) {
+			
+			if (l.hasError(java.util.PropertyResourceBundle.getBundle(
+						"org.scribble.parser.Messages").
+						getString("_EXPECTING_IDENTIFIER")) == false) {
+				fail("Expecting identifier");
+			}
+			
+		} else if (obj == null) {
+			fail("No object returned");
+		} else {
+			fail("Unexpected object type: "+obj.getClass());
+		}
+	}
+
+	public void testInvalidConformanceReference5() {
+		String type="TestType";
+		String located="Buyer";
+		String varLocal1="varA";
+		String varRemote1="varB";
+		String text=type+"@"+located+"("+varLocal1+" for "+varRemote1;
+		
+		ModelReference ref=new ModelReference("");
+		TestParserContext context=new TestParserContext(ref, text);
+		ErrorRecorder l=new ErrorRecorder();
+		
+		Object obj=context.parse(ConformanceReference.class, l);
+		
+		if (obj instanceof ConformanceReference) {
+			
+			if (l.hasError(java.util.PropertyResourceBundle.getBundle(
+					"org.scribble.parser.Messages").
+					getString("_EXPECTING_PARAMETER_LIST_DELIMITER")) == false) {
+				fail("Expecting delimiter");
+			}
+			
+		} else if (obj == null) {
+			fail("No object returned");
+		} else {
+			fail("Unexpected object type: "+obj.getClass());
+		}
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/parser/DefaultParserContextTest.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/parser/DefaultParserContextTest.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/parser/DefaultParserContextTest.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,145 @@
+/*
+ * Copyright 2005-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 19 May 2008 : Initial version created by gary
+ */
+package org.scribble.parser;
+
+import org.scribble.model.ModelReference;
+
+import junit.framework.TestCase;
+
+public class DefaultParserContextTest extends TestCase {
+
+	protected void setUp() throws Exception {
+		org.scribble.extensions.TestRegistry reg=
+				new org.scribble.extensions.TestRegistry();
+		
+		reg.addExtension(GenericKeyWordProvider.class);
+		reg.addExtension(GenericParser.class);
+		reg.addExtension(TestModelRepository.class);
+		
+		org.scribble.extensions.RegistryFactory.setRegistry(reg);
+	}
+	
+	protected void tearDown() throws Exception {
+		// Clear registry
+		org.scribble.extensions.RegistryFactory.setRegistry(null);
+	}
+	
+	public void testTokenLineComment() {
+		String id1="ID1";
+		String id2="ID2";
+		String text=id1+"\r\n // Line comment \r\n"+id2;
+		
+		ModelReference ref=new ModelReference("");
+		DefaultParserContext context=new DefaultParserContext(ref,
+				new java.io.ByteArrayInputStream(text.getBytes()),
+				new DefaultTokenizer());
+		
+		// Should be 2 tokens, as comment is filtered out
+		if (context.getTokenCount() != 2) {
+			fail("Expecting 2 tokens, but got: "+context.getTokenCount());
+		}
+	}
+	
+	public void testTokenBlockComment() {
+		String id1="ID1";
+		String id2="ID2";
+		String text=id1+"\r\n /* Block comment starts \r\n and continues */ \r\n"+id2;
+		
+		ModelReference ref=new ModelReference("");
+		DefaultParserContext context=new DefaultParserContext(ref,
+				new java.io.ByteArrayInputStream(text.getBytes()),
+				new DefaultTokenizer());
+		
+		// Should be 2 tokens, as comment is filtered out
+		if (context.getTokenCount() != 2) {
+			fail("Expecting 2 tokens, but got: "+context.getTokenCount());
+		}
+	}
+	
+	public void testTokenKeyword() {
+		String id1="ID1";
+		String id2="ID2";
+		String keyword="role";
+		String text=id1+" "+keyword+" "+id2;
+		
+		ModelReference ref=new ModelReference("");
+		DefaultParserContext context=new DefaultParserContext(ref,
+				new java.io.ByteArrayInputStream(text.getBytes()),
+				new DefaultTokenizer());
+		
+		if (context.getTokenCount() != 3) {
+			fail("Expecting 3 tokens, but got: "+context.getTokenCount());
+		}
+		
+		if (context.lookahead(1).getType() != TokenType.Keyword) {
+			fail("Expecting keyword type, but got: "+context.lookahead(1).getType());
+		}
+	}
+	
+	public void testTokenStringLiteral() {
+		String str="hello world";
+		String text="first \""+str+"\" second";
+		
+		ModelReference ref=new ModelReference("");
+		DefaultParserContext context=new DefaultParserContext(ref,
+				new java.io.ByteArrayInputStream(text.getBytes()),
+				new DefaultTokenizer());
+		
+		// Should be 3 tokens
+		if (context.getTokenCount() != 3) {
+			fail("Expecting 3 tokens, but got: "+context.getTokenCount());
+		}
+		
+		Token token=context.lookahead(1);
+		
+		if (token.getType() != TokenType.StringLiteral) {
+			fail("Not string literal");
+		}
+		
+		if (token.getText().equals(str) == false) {
+			fail("String '"+token.getText()+"' incorrect, expecting: "+str);
+		}
+	}	
+	
+	public void testTokenStringLiteralLineTerminated() {
+		String str="hello world";
+		String text="first \""+str+"\r\n";
+		
+		ModelReference ref=new ModelReference("");
+		DefaultParserContext context=new DefaultParserContext(ref,
+				new java.io.ByteArrayInputStream(text.getBytes()),
+				new DefaultTokenizer());
+		
+		// Should be 2 tokens
+		if (context.getTokenCount() != 2) {
+			fail("Expecting 2 tokens, but got: "+context.getTokenCount());
+		}
+		
+		Token token=context.lookahead(1);
+		
+		if (token.getType() != TokenType.StringLiteral) {
+			fail("Not string literal");
+		}
+		
+		if (token.getText().equals(str) == false) {
+			fail("String '"+token.getText()+"' incorrect, expecting: "+str);
+		}
+	}	
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/parser/GenericKeyWordProvider.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/parser/GenericKeyWordProvider.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/parser/GenericKeyWordProvider.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,47 @@
+/*
+ * Copyright 2007-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 2 May 2008 : Initial version created by gary
+ */
+package org.scribble.parser;
+
+import org.scribble.extensions.RegistryInfo;
+import org.scribble.parser.DefaultKeyWordProvider;
+import org.scribble.parser.KeyWordProvider;
+
+/**
+ * The generic notation keyword provider.
+ */
+ at RegistryInfo(extension=KeyWordProvider.class,notation="")
+public class GenericKeyWordProvider extends DefaultKeyWordProvider {
+	
+	public GenericKeyWordProvider() {
+		super(GENERIC_KEYWORDS);
+	}
+	
+	private static final String[] GENERIC_KEYWORDS={
+		"namespace",
+		"import",
+		"as",
+		"role",
+		"channel",
+		"via",
+		"for",
+		"from",
+		"to"
+	};
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/parser/GenericParser.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/parser/GenericParser.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/parser/GenericParser.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,27 @@
+/*
+ * Copyright 2007-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 2 May 2008 : Initial version created by gary
+ */
+package org.scribble.parser;
+
+import org.scribble.extensions.*;
+
+ at RegistryInfo(extension=Parser.class,notation="")
+public class GenericParser extends org.scribble.parser.DefaultParser {
+
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/parser/ImportParserRuleTest.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/parser/ImportParserRuleTest.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/parser/ImportParserRuleTest.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,169 @@
+/*
+ * Copyright 2005-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 7 May 2008 : Initial version created by gary
+ */
+package org.scribble.parser;
+
+import junit.framework.TestCase;
+
+import org.scribble.model.*;
+import org.scribble.model.admin.ErrorRecorder;
+
+public class ImportParserRuleTest extends TestCase {
+
+	protected void setUp() throws Exception {
+		org.scribble.extensions.TestRegistry reg=
+				new org.scribble.extensions.TestRegistry();
+		
+		reg.addExtension(GenericKeyWordProvider.class);
+		reg.addExtension(GenericParser.class);
+		reg.addExtension(org.scribble.parser.ImportParserRule.class);
+		reg.addExtension(TestModelRepository.class);
+		
+		org.scribble.extensions.RegistryFactory.setRegistry(reg);
+	}
+	
+	protected void tearDown() throws Exception {
+		// Clear registry
+		org.scribble.extensions.RegistryFactory.setRegistry(null);
+	}
+	
+	public void testValidImport() {
+		String type="com.hello.*";
+		String text="import "+type+";";
+		
+		ModelReference ref=new ModelReference("");
+		TestParserContext context=new TestParserContext(ref, text);
+		ErrorRecorder l=new ErrorRecorder();
+		
+		Object obj=context.parse(Import.class, l);
+		
+		if (obj instanceof Import) {
+			Import imp=(Import)obj;
+			
+			if (imp.getName() == null ||
+					imp.getName().equals(type) == false) {
+				fail("Incorrect name: "+imp.getName());
+			}
+			
+			if (imp.getAlias() != null) {
+				fail("Not expecting alias: "+imp.getAlias());
+			}
+			
+			// Check no errors or warnings
+			if (l.getErrors().size() > 0) {
+				fail("Not expecting "+l.getErrors().size()+" errors");
+			} else if (l.getWarnings().size() > 0) {
+				fail("Not expecting "+l.getWarnings().size()+" warnings");
+			}
+			
+		} else if (obj == null) {
+			fail("No object returned");
+		} else {
+			fail("Unexpected object type: "+obj.getClass());
+		}
+	}
+	
+	public void testValidImportWithAlias() {
+		String type="com.hello.MyValue";
+		String alias="Value";
+		String text="import "+type+" as "+alias+";";
+		
+		ModelReference ref=new ModelReference("");
+		TestParserContext context=new TestParserContext(ref, text);
+		ErrorRecorder l=new ErrorRecorder();
+		
+		Object obj=context.parse(Import.class, l);
+		
+		if (obj instanceof Import) {
+			Import imp=(Import)obj;
+			
+			if (imp.getName() == null ||
+					imp.getName().equals(type) == false) {
+				fail("Incorrect name: "+imp.getName());
+			}
+			
+			if (imp.getAlias() == null ||
+					imp.getAlias().equals(alias) == false) {
+				fail("Invalid alias: "+imp.getAlias());
+			}
+			
+			// Check no errors or warnings
+			if (l.getErrors().size() > 0) {
+				fail("Not expecting "+l.getErrors().size()+" errors");
+			} else if (l.getWarnings().size() > 0) {
+				fail("Not expecting "+l.getWarnings().size()+" warnings");
+			}
+			
+		} else if (obj == null) {
+			fail("No object returned");
+		} else {
+			fail("Unexpected object type: "+obj.getClass());
+		}
+	}
+	
+	public void testInvalidImport1() {
+		String type="com.hello.";
+		String text="import "+type+";";
+		
+		ModelReference ref=new ModelReference("");
+		TestParserContext context=new TestParserContext(ref, text);
+		ErrorRecorder l=new ErrorRecorder();
+		
+		Object obj=context.parse(Import.class, l);
+		
+		if (obj instanceof Import) {
+
+			if (l.hasError(java.util.PropertyResourceBundle.getBundle(
+							"org.scribble.parser.Messages").
+								getString("_EXPECTING_IDENTIFIER")) == false) {
+				fail("Expecting identifier");
+			}
+			
+		} else if (obj == null) {
+			fail("No object returned");
+		} else {
+			fail("Unexpected object type: "+obj.getClass());
+		}
+	}
+	
+	public void testInvalidImport2() {
+		String type="com.hello.MyValue";
+		String text="import "+type+" as;";
+		
+		ModelReference ref=new ModelReference("");
+		TestParserContext context=new TestParserContext(ref, text);
+		ErrorRecorder l=new ErrorRecorder();
+		
+		Object obj=context.parse(Import.class, l);
+		
+		if (obj instanceof Import) {
+
+			if (l.hasError(java.util.PropertyResourceBundle.getBundle(
+							"org.scribble.parser.Messages").
+								getString("_EXPECTING_IDENTIFIER")) == false) {
+				fail("Expecting identifier");
+			}
+			
+		} else if (obj == null) {
+			fail("No object returned");
+		} else {
+			fail("Unexpected object type: "+obj.getClass());
+		}
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/parser/InteractionParserRuleTest.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/parser/InteractionParserRuleTest.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/parser/InteractionParserRuleTest.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,288 @@
+/*
+ * Copyright 2005-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 2 May 2008 : Initial version created by gary
+ */
+package org.scribble.parser;
+
+import junit.framework.TestCase;
+
+import org.scribble.model.*;
+import org.scribble.model.admin.ErrorRecorder;
+
+public class InteractionParserRuleTest extends TestCase {
+
+	protected void setUp() throws Exception {
+		org.scribble.extensions.TestRegistry reg=
+				new org.scribble.extensions.TestRegistry();
+		
+		reg.addExtension(GenericKeyWordProvider.class);
+		reg.addExtension(GenericParser.class);
+		reg.addExtension(org.scribble.parser.InteractionParserRule.class);
+		reg.addExtension(org.scribble.parser.MessageSignatureParserRule.class);
+		reg.addExtension(org.scribble.parser.TypeReferenceParserRule.class);
+		reg.addExtension(TestModelRepository.class);
+		
+		org.scribble.extensions.RegistryFactory.setRegistry(reg);
+	}
+	
+	protected void tearDown() throws Exception {
+		// Clear registry
+		org.scribble.extensions.RegistryFactory.setRegistry(null);
+	}
+	
+	public void testValidInteraction() {
+		String type="Order";
+		String role1Name="Customer";
+		Role role1=new Role(role1Name);
+		String role2Name="Supplier";
+		Role role2=new Role(role2Name);
+		String channelName="Ch1";
+		Channel ch1=new Channel(channelName);
+
+		String text=type+" from "+role1Name+" to "+role2Name+
+					" via "+channelName+";";
+		
+		ModelReference ref=new ModelReference("");
+		TestParserContext context=new TestParserContext(ref, text);
+		ErrorRecorder l=new ErrorRecorder();
+		
+		context.setState(role1Name, role1);
+		context.setState(role2Name, role2);
+		context.setState(channelName, ch1);
+		
+		Object obj=context.parse(Interaction.class, l);
+		
+		if (obj instanceof Interaction) {
+			Interaction interaction=(Interaction)obj;
+			
+			if (interaction.getMessageSignature() == null) {
+				fail("No message signature");
+			} else if (interaction.getMessageSignature().getOperation() != null) {
+				fail("No operation expected");
+			} else if (interaction.getMessageSignature().getTypes().size() != 1) {
+				fail("Only one message sig type expected: "+
+						interaction.getMessageSignature().getTypes().size());
+			} else if (interaction.getMessageSignature().getTypes().get(0).
+						getAlias().equals(type) == false) {
+				fail("Message sig type not expected '"+type+"': "+
+						interaction.getMessageSignature().getTypes().get(0).
+						getAlias());
+			}
+			
+			if (interaction.getFromRole() == null) {
+				fail("From role not set");
+			} else if (interaction.getFromRole().equals(role1) == false) {
+				fail("From role not expected: "+interaction.getFromRole());
+			}
+			
+			if (interaction.getToRole() == null) {
+				fail("To role not set");
+			} else if (interaction.getToRole().equals(role2) == false) {
+				fail("To role not expected: "+interaction.getToRole());
+			}
+			
+			if (interaction.getChannel() == null) {
+				fail("Channel not set");
+			} else if (interaction.getChannel().equals(ch1) == false) {
+				fail("Channel not expected");
+			}
+			
+			// Check no errors or warnings
+			if (l.getErrors().size() > 0) {
+				fail("Not expecting "+l.getErrors().size()+" errors");
+			} else if (l.getWarnings().size() > 0) {
+				fail("Not expecting "+l.getWarnings().size()+" warnings");
+			}
+			
+		} else if (obj == null) {
+			fail("No object returned");
+		} else {
+			fail("Unexpected object type: "+obj.getClass());
+		}
+	}
+
+	public void testInvalidInteractionToRole() {
+		String type="Order";
+		String role1Name="Customer";
+		Role role1=new Role(role1Name);
+		String role2Name="Supplier";
+		//Role role2=new Role(role2Name);
+
+		String text=type+" from "+role1Name+" to "+role2Name+";";
+		
+		ModelReference ref=new ModelReference("");
+		TestParserContext context=new TestParserContext(ref, text);
+		ErrorRecorder l=new ErrorRecorder();
+		
+		context.setState(role1Name, role1);
+		//context.setState(role2Name, role2);
+		
+		context.parse(Interaction.class, l);
+		
+		if (l.hasError(org.scribble.util.MessageUtil.format(
+					java.util.PropertyResourceBundle.getBundle(
+						"org.scribble.parser.Messages"),
+							"_UNKNOWN_ROLE",
+						new String[]{role2Name})) == false) {
+			fail("Should register 'unknown role' error");
+		}
+	}
+
+	public void testInvalidInteractionToRole2() {
+		String type="Order";
+		String role1Name="Customer";
+		Role role1=new Role(role1Name);
+		String role2Name="Supplier";
+		//Role role2=new Role(role2Name);
+
+		String text=type+" from "+role1Name+" to "+role2Name+";";
+		
+		ModelReference ref=new ModelReference("");
+		TestParserContext context=new TestParserContext(ref, text);
+		ErrorRecorder l=new ErrorRecorder();
+		
+		context.setState(role1Name, role1);
+		context.setState(role2Name, "INVALID");
+		
+		context.parse(Interaction.class, l);
+		
+		if (l.hasError(org.scribble.util.MessageUtil.format(
+					java.util.PropertyResourceBundle.getBundle(
+						"org.scribble.parser.Messages"),
+							"_REQUIRED_ROLE",
+						new String[]{role2Name})) == false) {
+			fail("Should register 'required role' error");
+		}
+	}
+
+	public void testInvalidInteractionFromRole() {
+		String type="Order";
+		String role1Name="Customer";
+		//Role role1=new Role(role1Name);
+		String role2Name="Supplier";
+		Role role2=new Role(role2Name);
+
+		String text=type+" from "+role1Name+" to "+role2Name+";";
+		
+		ModelReference ref=new ModelReference("");
+		TestParserContext context=new TestParserContext(ref, text);
+		ErrorRecorder l=new ErrorRecorder();
+		
+		//context.setState(role1Name, role1);
+		context.setState(role2Name, role2);
+		
+		context.parse(Interaction.class, l);
+		
+		if (l.hasError(org.scribble.util.MessageUtil.format(
+					java.util.PropertyResourceBundle.getBundle(
+						"org.scribble.parser.Messages"),
+							"_UNKNOWN_ROLE",
+						new String[]{role1Name})) == false) {
+			fail("Should register 'unknown role' error");
+		}
+	}
+
+	public void testInvalidInteractionFromRole2() {
+		String type="Order";
+		String role1Name="Customer";
+		//Role role1=new Role(role1Name);
+		String role2Name="Supplier";
+		Role role2=new Role(role2Name);
+
+		String text=type+" from "+role1Name+" to "+role2Name+";";
+		
+		ModelReference ref=new ModelReference("");
+		TestParserContext context=new TestParserContext(ref, text);
+		ErrorRecorder l=new ErrorRecorder();
+		
+		context.setState(role1Name, "INVALID");
+		context.setState(role2Name, role2);
+		
+		context.parse(Interaction.class, l);
+		
+		if (l.hasError(org.scribble.util.MessageUtil.format(
+					java.util.PropertyResourceBundle.getBundle(
+						"org.scribble.parser.Messages"),
+							"_REQUIRED_ROLE",
+						new String[]{role1Name})) == false) {
+			fail("Should register 'required role' error");
+		}
+	}
+
+	public void testInvalidInteractionChannel() {
+		String type="Order";
+		String role1Name="Customer";
+		Role role1=new Role(role1Name);
+		String role2Name="Supplier";
+		Role role2=new Role(role2Name);
+		String channelName="Ch1";
+		//Channel ch1=new Channel(channelName);
+
+		String text=type+" from "+role1Name+" to "+role2Name+
+					" via "+channelName+";";
+		
+		ModelReference ref=new ModelReference("");
+		TestParserContext context=new TestParserContext(ref, text);
+		ErrorRecorder l=new ErrorRecorder();
+		
+		context.setState(role1Name, role1);
+		context.setState(role2Name, role2);
+		//context.setState(channelName, ch1);
+		
+		context.parse(Interaction.class, l);
+		
+		if (l.hasError(org.scribble.util.MessageUtil.format(
+					java.util.PropertyResourceBundle.getBundle(
+						"org.scribble.parser.Messages"),
+							"_UNKNOWN_CHANNEL",
+						new String[]{channelName})) == false) {
+			fail("Should register 'unknown channel' error");
+		}
+	}
+
+	public void testInvalidInteractionChannel2() {
+		String type="Order";
+		String role1Name="Customer";
+		Role role1=new Role(role1Name);
+		String role2Name="Supplier";
+		Role role2=new Role(role2Name);
+		String channelName="Ch1";
+		//Channel ch1=new Channel(channelName);
+
+		String text=type+" from "+role1Name+" to "+role2Name+
+					" via "+channelName+";";
+		
+		ModelReference ref=new ModelReference("");
+		TestParserContext context=new TestParserContext(ref, text);
+		ErrorRecorder l=new ErrorRecorder();
+		
+		context.setState(role1Name, role1);
+		context.setState(role2Name, role2);
+		context.setState(channelName, "INVALAID");
+		
+		context.parse(Interaction.class, l);
+		
+		if (l.hasError(org.scribble.util.MessageUtil.format(
+					java.util.PropertyResourceBundle.getBundle(
+						"org.scribble.parser.Messages"),
+							"_REQUIRED_CHANNEL",
+						new String[]{channelName})) == false) {
+			fail("Should register 'required channel' error");
+		}
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/parser/MessageSignatureParserRuleTest.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/parser/MessageSignatureParserRuleTest.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/parser/MessageSignatureParserRuleTest.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,183 @@
+/*
+ * Copyright 2005-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 7 May 2008 : Initial version created by gary
+ */
+package org.scribble.parser;
+
+import junit.framework.TestCase;
+
+import org.scribble.model.*;
+import org.scribble.model.admin.ErrorRecorder;
+
+public class MessageSignatureParserRuleTest extends TestCase {
+
+	protected void setUp() throws Exception {
+		org.scribble.extensions.TestRegistry reg=
+				new org.scribble.extensions.TestRegistry();
+		
+		reg.addExtension(GenericKeyWordProvider.class);
+		reg.addExtension(GenericParser.class);
+		reg.addExtension(org.scribble.parser.MessageSignatureParserRule.class);
+		reg.addExtension(org.scribble.parser.TypeReferenceParserRule.class);
+		reg.addExtension(TestModelRepository.class);
+		
+		org.scribble.extensions.RegistryFactory.setRegistry(reg);
+	}
+	
+	protected void tearDown() throws Exception {
+		// Clear registry
+		org.scribble.extensions.RegistryFactory.setRegistry(null);
+	}
+	
+	public void testValidMessageSignature() {
+		String type="Order";
+
+		String text=type;
+		
+		ModelReference ref=new ModelReference("");
+		TestParserContext context=new TestParserContext(ref, text);
+		ErrorRecorder l=new ErrorRecorder();
+		
+		Object obj=context.parse(MessageSignature.class, l);
+		
+		if (obj instanceof MessageSignature) {
+			MessageSignature msig=(MessageSignature)obj;
+			
+			if (msig.getOperation() != null) {
+				fail("No operation should be defined");
+			}
+			
+			if (msig.getTypes().size() != 1) {
+				fail("Only one type should be defined");
+			}
+			
+			if (msig.getTypes().get(0).getAlias().equals(type) == false) {
+				fail("Invalid type: "+msig.getTypes().get(0).getAlias());
+			}
+			
+			// Check no errors or warnings
+			if (l.getErrors().size() > 0) {
+				fail("Not expecting "+l.getErrors().size()+" errors");
+			} else if (l.getWarnings().size() > 0) {
+				fail("Not expecting "+l.getWarnings().size()+" warnings");
+			}
+			
+		} else if (obj == null) {
+			fail("No object returned");
+		} else {
+			fail("Unexpected object type: "+obj.getClass());
+		}
+	}
+	
+	public void testValidMessageSignature2() {
+		String type1="Order";
+		String type2="Invoice";
+		String op="placeOrder";
+		String text=op+"("+type1+","+type2+")";
+		
+		ModelReference ref=new ModelReference("");
+		TestParserContext context=new TestParserContext(ref, text);
+		ErrorRecorder l=new ErrorRecorder();
+		
+		Object obj=context.parse(MessageSignature.class, l);
+		
+		if (obj instanceof MessageSignature) {
+			MessageSignature msig=(MessageSignature)obj;
+			
+			if (msig.getOperation() == null ||
+					msig.getOperation().equals(op) == false) {
+				fail("Invalid operation: "+msig.getOperation());
+			}
+			
+			if (msig.getTypes().size() != 2) {
+				fail("Only two types should be defined");
+			}
+			
+			if (msig.getTypes().get(0).getAlias().equals(type1) == false) {
+				fail("Invalid type1: "+msig.getTypes().get(0).getAlias());
+			}
+			
+			if (msig.getTypes().get(1).getAlias().equals(type2) == false) {
+				fail("Invalid type2: "+msig.getTypes().get(1).getAlias());
+			}
+			
+			// Check no errors or warnings
+			if (l.getErrors().size() > 0) {
+				fail("Not expecting "+l.getErrors().size()+" errors");
+			} else if (l.getWarnings().size() > 0) {
+				fail("Not expecting "+l.getWarnings().size()+" warnings");
+			}
+			
+		} else if (obj == null) {
+			fail("No object returned");
+		} else {
+			fail("Unexpected object type: "+obj.getClass());
+		}
+	}
+
+	public void testInvalidMessageSignature1() {
+		String op="placeOrder";
+		String text=op+"()";
+		
+		ModelReference ref=new ModelReference("");
+		TestParserContext context=new TestParserContext(ref, text);
+		ErrorRecorder l=new ErrorRecorder();
+		
+		Object obj=context.parse(MessageSignature.class, l);
+		
+		if (obj instanceof MessageSignature) {
+			
+			if (l.hasError(java.util.PropertyResourceBundle.getBundle(
+					"org.scribble.parser.Messages").
+						getString("_EXPECTING_TYPE")) == false) {
+				fail("Expecting type");
+			}
+			
+		} else if (obj == null) {
+			fail("No object returned");
+		} else {
+			fail("Unexpected object type: "+obj.getClass());
+		}
+	}
+
+	public void testInvalidMessageSignature2() {
+		String type1="Order";
+		String op="placeOrder";
+		String text=op+"("+type1+":";
+		
+		ModelReference ref=new ModelReference("");
+		TestParserContext context=new TestParserContext(ref, text);
+		ErrorRecorder l=new ErrorRecorder();
+		
+		Object obj=context.parse(MessageSignature.class, l);
+		
+		if (obj instanceof MessageSignature) {
+			
+			if (l.hasError(java.util.PropertyResourceBundle.getBundle(
+					"org.scribble.parser.Messages").
+						getString("_EXPECTING_PARAMETER_LIST_DELIMITER")) == false) {
+				fail("Expecting , or )");
+			}
+			
+		} else if (obj == null) {
+			fail("No object returned");
+		} else {
+			fail("Unexpected object type: "+obj.getClass());
+		}
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/parser/ModelNameParserRuleTest.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/parser/ModelNameParserRuleTest.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/parser/ModelNameParserRuleTest.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,150 @@
+/*
+ * Copyright 2005-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 14 May 2008 : Initial version created by gary
+ */
+package org.scribble.parser;
+
+import junit.framework.TestCase;
+
+import org.scribble.model.*;
+import org.scribble.model.admin.ErrorRecorder;
+
+public class ModelNameParserRuleTest extends TestCase {
+
+	protected void setUp() throws Exception {
+		org.scribble.extensions.TestRegistry reg=
+				new org.scribble.extensions.TestRegistry();
+		
+		reg.addExtension(GenericKeyWordProvider.class);
+		reg.addExtension(GenericParser.class);
+		reg.addExtension(org.scribble.parser.ModelNameParserRule.class);
+		reg.addExtension(TestModelRepository.class);
+		
+		org.scribble.extensions.RegistryFactory.setRegistry(reg);
+	}
+	
+	protected void tearDown() throws Exception {
+		// Clear registry
+		org.scribble.extensions.RegistryFactory.setRegistry(null);
+	}
+	
+	public void testValidModelName1() {
+		String text="PurchaseGoods";
+
+		ModelReference ref=new ModelReference("");
+		TestParserContext context=new TestParserContext(ref, text);
+		ErrorRecorder l=new ErrorRecorder();
+		
+		Object obj=context.parse(LocatedName.class, l);
+		
+		if (obj instanceof LocatedName) {
+			LocatedName modelName=(LocatedName)obj;
+			
+			if (modelName.getName().equals(text) == false) {
+				fail("Unexpected model name: "+modelName.getName());
+			}
+			
+			if (modelName.getRole() != null) {
+				fail("Role not expected: "+modelName.getRole());
+			}
+			
+			// Check no errors or warnings
+			if (l.getErrors().size() > 0) {
+				fail("Not expecting "+l.getErrors().size()+" errors");
+			} else if (l.getWarnings().size() > 0) {
+				fail("Not expecting "+l.getWarnings().size()+" warnings");
+			}
+			
+		} else if (obj == null) {
+			fail("No object returned");
+		} else {
+			fail("Unexpected object type: "+obj.getClass());
+		}
+	}
+	
+	public void testValidModelName2() {
+		String name="PurchaseGoods";
+		String roleName="Buyer";
+		
+		String text=name+"@"+roleName;
+
+		ModelReference ref=new ModelReference("");
+		TestParserContext context=new TestParserContext(ref, text);
+		ErrorRecorder l=new ErrorRecorder();
+		
+		Object obj=context.parse(LocatedName.class, l);
+		
+		if (obj instanceof LocatedName) {
+			LocatedName modelName=(LocatedName)obj;
+			
+			if (modelName.getName().equals(name) == false) {
+				fail("Unexpected model name: "+modelName.getName());
+			}
+			
+			if (modelName.getRole().getName().equals(roleName) == false) {
+				fail("Unexpected role: "+modelName.getRole());
+			}
+			
+			// Check no errors or warnings
+			if (l.getErrors().size() > 0) {
+				fail("Not expecting "+l.getErrors().size()+" errors");
+			} else if (l.getWarnings().size() > 0) {
+				fail("Not expecting "+l.getWarnings().size()+" warnings");
+			}
+			
+		} else if (obj == null) {
+			fail("No object returned");
+		} else {
+			fail("Unexpected object type: "+obj.getClass());
+		}
+	}
+	
+	public void testInvalidModelName1() {
+		String name="@";
+		
+		ModelReference ref=new ModelReference("");
+		TestParserContext context=new TestParserContext(ref, name);
+		ErrorRecorder l=new ErrorRecorder();
+		
+		context.parse(LocatedName.class, l);
+		
+		if (l.hasError(java.util.PropertyResourceBundle.getBundle(
+					"org.scribble.parser.Messages").
+						getString("_EXPECTING_IDENTIFIER")) == false) {
+			fail("Should report error regarding expected identifier");
+		}
+	}
+	
+	public void testInvalidModelName2() {
+		String name="PurchaseGoods";
+		
+		String text=name+"@"+";";
+
+		ModelReference ref=new ModelReference("");
+		TestParserContext context=new TestParserContext(ref, text);
+		ErrorRecorder l=new ErrorRecorder();
+		
+		context.parse(LocatedName.class, l);
+		
+		if (l.hasError(java.util.PropertyResourceBundle.getBundle(
+					"org.scribble.parser.Messages").
+						getString("_EXPECTING_ROLE_NAME")) == false) {
+			fail("Should report error regarding expected role name");
+		}
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/parser/NamespaceParserRuleTest.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/parser/NamespaceParserRuleTest.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/parser/NamespaceParserRuleTest.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,141 @@
+/*
+ * Copyright 2005-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 14 May 2008 : Initial version created by gary
+ */
+package org.scribble.parser;
+
+import junit.framework.TestCase;
+
+import org.scribble.model.*;
+import org.scribble.model.admin.ErrorRecorder;
+
+public class NamespaceParserRuleTest extends TestCase {
+
+	protected void setUp() throws Exception {
+		org.scribble.extensions.TestRegistry reg=
+				new org.scribble.extensions.TestRegistry();
+		
+		reg.addExtension(GenericKeyWordProvider.class);
+		reg.addExtension(GenericParser.class);
+		reg.addExtension(org.scribble.parser.NamespaceParserRule.class);
+		reg.addExtension(TestModelRepository.class);
+		
+		org.scribble.extensions.RegistryFactory.setRegistry(reg);
+	}
+	
+	protected void tearDown() throws Exception {
+		// Clear registry
+		org.scribble.extensions.RegistryFactory.setRegistry(null);
+	}
+	
+	public void testValidNamespace1() {
+		String namespace="simple";
+		String text="namespace "+namespace+";";
+
+		ModelReference ref=new ModelReference("");
+		TestParserContext context=new TestParserContext(ref, text);
+		ErrorRecorder l=new ErrorRecorder();
+		
+		Object obj=context.parse(Namespace.class, l);
+		
+		if (obj instanceof Namespace) {
+			Namespace ns=(Namespace)obj;
+			
+			if (ns.getName().equals(namespace) == false) {
+				fail("Unexpected namespace: "+ns.getName());
+			}
+						
+			// Check no errors or warnings
+			if (l.getErrors().size() > 0) {
+				fail("Not expecting "+l.getErrors().size()+" errors");
+			} else if (l.getWarnings().size() > 0) {
+				fail("Not expecting "+l.getWarnings().size()+" warnings");
+			}
+			
+		} else if (obj == null) {
+			fail("No object returned");
+		} else {
+			fail("Unexpected object type: "+obj.getClass());
+		}
+	}
+	
+	public void testValidNamespace2() {
+		String namespace="scoped.package.name";
+		String text="namespace "+namespace+";";
+
+		ModelReference ref=new ModelReference("");
+		TestParserContext context=new TestParserContext(ref, text);
+		ErrorRecorder l=new ErrorRecorder();
+		
+		Object obj=context.parse(Namespace.class, l);
+		
+		if (obj instanceof Namespace) {
+			Namespace ns=(Namespace)obj;
+			
+			if (ns.getName().equals(namespace) == false) {
+				fail("Unexpected namespace: "+ns.getName());
+			}
+						
+			// Check no errors or warnings
+			if (l.getErrors().size() > 0) {
+				fail("Not expecting "+l.getErrors().size()+" errors");
+			} else if (l.getWarnings().size() > 0) {
+				fail("Not expecting "+l.getWarnings().size()+" warnings");
+			}
+			
+		} else if (obj == null) {
+			fail("No object returned");
+		} else {
+			fail("Unexpected object type: "+obj.getClass());
+		}
+	}
+	
+	public void testInvalidNamespace1() {
+		String namespace="scoped.";
+		String text="namespace "+namespace+";";
+		
+		ModelReference ref=new ModelReference("");
+		TestParserContext context=new TestParserContext(ref, text);
+		ErrorRecorder l=new ErrorRecorder();
+		
+		context.parse(Namespace.class, l);
+		
+		if (l.hasError(java.util.PropertyResourceBundle.getBundle(
+					"org.scribble.parser.Messages").
+						getString("_EXPECTING_IDENTIFIER")) == false) {
+			fail("Should report error regarding expected identifier");
+		}
+	}
+
+	public void testInvalidNamespace2() {
+		String namespace="scoped.*.notallowed";
+		String text="namespace "+namespace+";";
+		
+		ModelReference ref=new ModelReference("");
+		TestParserContext context=new TestParserContext(ref, text);
+		ErrorRecorder l=new ErrorRecorder();
+		
+		context.parse(Namespace.class, l);
+		
+		if (l.hasError(java.util.PropertyResourceBundle.getBundle(
+					"org.scribble.parser.Messages").
+						getString("_EXPECTING_IDENTIFIER")) == false) {
+			fail("Should report error regarding expected identifier");
+		}
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/parser/RoleListParserRuleTest.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/parser/RoleListParserRuleTest.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/parser/RoleListParserRuleTest.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,133 @@
+/*
+ * Copyright 2005-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 19 May 2008 : Initial version created by gary
+ */
+package org.scribble.parser;
+
+import junit.framework.TestCase;
+
+import org.scribble.model.*;
+import org.scribble.model.admin.ErrorRecorder;
+
+public class RoleListParserRuleTest extends TestCase {
+
+	protected void setUp() throws Exception {
+		org.scribble.extensions.TestRegistry reg=
+				new org.scribble.extensions.TestRegistry();
+		
+		reg.addExtension(GenericKeyWordProvider.class);
+		reg.addExtension(GenericParser.class);
+		reg.addExtension(org.scribble.parser.RoleListParserRule.class);
+		reg.addExtension(TestModelRepository.class);
+		
+		org.scribble.extensions.RegistryFactory.setRegistry(reg);
+	}
+	
+	protected void tearDown() throws Exception {
+		// Clear registry
+		org.scribble.extensions.RegistryFactory.setRegistry(null);
+	}
+	
+	public void testValidRoleList() {
+		String role1Name="Customer";
+		String role2Name="Supplier";
+
+		String text="role "+role1Name+", "+role2Name+";";
+		
+		ModelReference ref=new ModelReference("");
+		TestParserContext context=new TestParserContext(ref, text);
+		ErrorRecorder l=new ErrorRecorder();
+		
+		Object obj=context.parse(RoleList.class, l);
+		
+		if (obj instanceof RoleList) {
+			RoleList rolelist=(RoleList)obj;
+			
+			if (rolelist.getRoles().size() != 2) {
+				fail("Two roles expected: "+
+						rolelist.getRoles().size());
+			}
+			
+			if (rolelist.getRoles().get(0).getName() == null) {
+				fail("First role name not set");
+			} else if (rolelist.getRoles().get(0).getName().equals(role1Name) == false) {
+				fail("First role name not expected: "+rolelist.getRoles().get(0).getName());
+			} else if (context.getState(role1Name) != rolelist.getRoles().get(0)) {
+				fail("First role not in context state");
+			}
+						
+			if (rolelist.getRoles().get(1).getName() == null) {
+				fail("Second role name not set");
+			} else if (rolelist.getRoles().get(1).getName().equals(role2Name) == false) {
+				fail("Second role name not expected: "+rolelist.getRoles().get(1).getName());
+			} else if (context.getState(role2Name) != rolelist.getRoles().get(1)) {
+				fail("Second role not in context state");
+			}
+						
+			// Check no errors or warnings
+			if (l.getErrors().size() > 0) {
+				fail("Not expecting "+l.getErrors().size()+" errors");
+			} else if (l.getWarnings().size() > 0) {
+				fail("Not expecting "+l.getWarnings().size()+" warnings");
+			}
+			
+		} else if (obj == null) {
+			fail("No object returned");
+		} else {
+			fail("Unexpected object type: "+obj.getClass());
+		}
+	}
+
+	public void testInvalidRoleListNoIdentifier() {
+		String role1Name="Customer";
+
+		String text="role "+role1Name+", "+";";
+				
+		ModelReference ref=new ModelReference("");
+		TestParserContext context=new TestParserContext(ref, text);
+		ErrorRecorder l=new ErrorRecorder();
+		
+		context.parse(RoleList.class, l);
+		
+		if (l.hasError(java.util.PropertyResourceBundle.getBundle(
+					"org.scribble.parser.Messages").
+						getString("_EXPECTING_ROLE_NAME")) == false) {
+			fail("Should register 'expecting role name' error");
+		}
+	}
+
+	public void testInvalidRoleListDuplicateRole() {
+		String role1Name="Customer";
+
+		String text="role "+role1Name+", "+role1Name+";";
+				
+		ModelReference ref=new ModelReference("");
+		TestParserContext context=new TestParserContext(ref, text);
+		ErrorRecorder l=new ErrorRecorder();
+		
+		context.parse(RoleList.class, l);
+		
+		if (l.hasError(org.scribble.util.MessageUtil.format(
+				java.util.PropertyResourceBundle.getBundle(
+						"org.scribble.parser.Messages"),
+							"_DUPLICATE_DECLARATION",
+							new String[]{role1Name})) == false) {
+			fail("Should register 'duplicate declaration' error");
+		}
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/parser/TestModelRepository.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/parser/TestModelRepository.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/parser/TestModelRepository.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,73 @@
+/*
+ * Copyright 2005-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 2 May 2008 : Initial version created by gary
+ */
+package org.scribble.parser;
+
+import org.scribble.extensions.RegistryInfo;
+import org.scribble.model.*;
+import org.scribble.model.admin.ModelChangeListener;
+import org.scribble.model.admin.ModelInfo;
+import org.scribble.model.admin.ModelListener;
+import org.scribble.model.admin.ModelRepository;
+
+ at RegistryInfo(extension=ModelRepository.class)
+public class TestModelRepository implements org.scribble.model.admin.ModelRepository {
+
+	public void addModelChangeListener(ModelChangeListener l) {
+		// TODO Auto-generated method stub
+		
+	}
+
+	public boolean exists(ModelReference ref, ModelReference source) {
+		// TODO Auto-generated method stub
+		return false;
+	}
+
+	public java.util.List<ModelInfo> getModels(ModelReference ref, ModelListener l) {
+		// TODO Auto-generated method stub
+		return(new java.util.Vector<ModelInfo>());
+	}
+
+	public void locate(ModelReference newRef, ModelReference base) {
+		// TODO Auto-generated method stub
+		
+	}
+
+	public void removeModelChangeListener(ModelChangeListener l) {
+		// TODO Auto-generated method stub
+		
+	}
+
+	public ModelReference getSource(ModelReference ref) {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	public void updateModel(ModelReference ref, Model model) {
+		// TODO Auto-generated method stub
+		
+	}
+
+	public boolean canAccess(ModelReference srcRef,
+			ModelReference targetRef, boolean allowSelfAccess) {
+		// TODO Auto-generated method stub
+		return false;
+	}
+
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/parser/TestParserContext.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/parser/TestParserContext.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/parser/TestParserContext.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,29 @@
+/*
+ * Copyright 2005-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 1 May 2008 : Initial version created by gary
+ */
+package org.scribble.parser;
+
+public class TestParserContext extends DefaultParserContext {
+
+	public TestParserContext(org.scribble.model.ModelReference ref,
+								String text) {
+		super(ref, new java.io.ByteArrayInputStream(text.getBytes()),
+				new DefaultTokenizer());
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/parser/TestTypeReferenceParserRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/parser/TestTypeReferenceParserRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/parser/TestTypeReferenceParserRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,81 @@
+/*
+ * Copyright 2007 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 24 Oct 2007 : Initial version created by gary
+ */
+package org.scribble.parser;
+
+import org.scribble.extensions.RegistryInfo;
+import org.scribble.model.*;
+import org.scribble.model.admin.ModelIssue;
+import org.scribble.model.admin.ModelListener;
+
+/**
+ * This class provides the parser rule for the Type Reference.
+ */
+ at RegistryInfo(extension=ParserRule.class)
+public class TestTypeReferenceParserRule extends AbstractParserRule {
+
+	/**
+	 * This is the default constructor.
+	 */
+	public TestTypeReferenceParserRule() {
+		super(ParserRuleType.Clause);
+	}
+	
+	/**
+	 * This method determines whether the parser rules is
+	 * appropriate to return a model object of the required
+	 * type.
+	 * 
+	 * @param type The required type
+	 * @return Whether the parser rule returns a
+	 * 				model object of the required type
+	 */
+	public boolean isSupported(Class<?> type) {
+		return(type.isAssignableFrom(TypeReference.class));
+	}
+
+	/**
+	 * This method parses the description to obtain
+	 * a model object of the appropriate type.
+	 * 
+	 * @param context The context
+	 * @param l The listener
+	 * @return The model object
+	 */
+	public Object parse(ParserContext context, ModelListener l) {
+		ModelReference ret=null;
+		
+		Token t=context.nextToken();
+		
+		if (t.getType() == TokenType.Identifier) {
+			ret = new TypeReference();
+			
+			ret.setLocalpart(t.getText());
+			
+		} else {
+			l.error(new ModelIssue(t, java.util.PropertyResourceBundle.getBundle(
+						"org.scribble.parser.Messages").
+						getString("_EXPECTING_IDENTIFIER")));
+		}
+		
+		return(ret);
+	}
+	
+	private boolean m_located=false;
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/parser/TypeReferenceParserRuleTest.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/parser/TypeReferenceParserRuleTest.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/parser/TypeReferenceParserRuleTest.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,135 @@
+/*
+ * Copyright 2005-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 19 May 2008 : Initial version created by gary
+ */
+package org.scribble.parser;
+
+import junit.framework.TestCase;
+
+import org.scribble.model.*;
+import org.scribble.model.admin.ErrorRecorder;
+
+public class TypeReferenceParserRuleTest extends TestCase {
+
+	protected void setUp() throws Exception {
+		org.scribble.extensions.TestRegistry reg=
+				new org.scribble.extensions.TestRegistry();
+		
+		reg.addExtension(GenericKeyWordProvider.class);
+		reg.addExtension(GenericParser.class);
+		reg.addExtension(org.scribble.parser.TypeReferenceParserRule.class);
+		reg.addExtension(TestModelRepository.class);
+		
+		org.scribble.extensions.RegistryFactory.setRegistry(reg);
+	}
+	
+	protected void tearDown() throws Exception {
+		// Clear registry
+		org.scribble.extensions.RegistryFactory.setRegistry(null);
+	}
+	
+	public void testValidTypeReference() {
+		String type="TestType";
+		String text=type;
+		
+		ModelReference ref=new ModelReference("");
+		TestParserContext context=new TestParserContext(ref, text);
+		ErrorRecorder l=new ErrorRecorder();
+		
+		Object obj=context.parse(TypeReference.class, l);
+		
+		if (obj instanceof TypeReference) {
+			TypeReference tref=(TypeReference)obj;
+			
+			if (tref.getAlias() == null ||
+					tref.getAlias().equals(type) == false) {
+				fail("Incorrect alias: "+tref.getLocalpart());
+			}
+			
+			if (tref.getLocatedRole() != null) {
+				fail("Should not be located");
+			}
+			
+			// Check no errors or warnings
+			if (l.getErrors().size() > 0) {
+				fail("Not expecting "+l.getErrors().size()+" errors");
+			} else if (l.getWarnings().size() > 0) {
+				fail("Not expecting "+l.getWarnings().size()+" warnings");
+			}
+			
+		} else if (obj == null) {
+			fail("No object returned");
+		} else {
+			fail("Unexpected object type: "+obj.getClass());
+		}
+	}
+
+	public void testValidTypeReferenceNotLocated() {
+		String type="TestType";
+		String located="Buyer";
+		String text=type+"@"+located;
+		
+		ModelReference ref=new ModelReference("");
+		TestParserContext context=new TestParserContext(ref, text);
+		ErrorRecorder l=new ErrorRecorder();
+		
+		Object obj=context.parse(TypeReference.class, l);
+		
+		if (obj instanceof TypeReference) {
+			TypeReference tref=(TypeReference)obj;
+			
+			if (tref.getAlias() == null ||
+					tref.getAlias().equals(type) == false) {
+				fail("Incorrect alias: "+tref.getLocalpart());
+			}
+			
+			if (tref.getLocatedRole() != null) {
+				fail("Type reference should not be located");
+			}
+			
+			// Check no errors or warnings
+			if (l.getErrors().size() > 0) {
+				fail("Not expecting "+l.getErrors().size()+" errors");
+			} else if (l.getWarnings().size() > 0) {
+				fail("Not expecting "+l.getWarnings().size()+" warnings");
+			}
+			
+		} else if (obj == null) {
+			fail("No object returned");
+		} else {
+			fail("Unexpected object type: "+obj.getClass());
+		}
+	}
+
+	public void testInvalidTypeReference1() {
+		String type=":";
+		String text=type;
+		
+		ModelReference ref=new ModelReference("");
+		TestParserContext context=new TestParserContext(ref, text);
+		ErrorRecorder l=new ErrorRecorder();
+		
+		context.parse(TypeReference.class, l);
+		
+		if (l.hasError(java.util.PropertyResourceBundle.getBundle(
+						"org.scribble.parser.Messages").
+							getString("_EXPECTING_IDENTIFIER")) == false) {
+			fail("Expecting identifier error");
+		}
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/projector/TestProjector.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/projector/TestProjector.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/projector/TestProjector.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,48 @@
+/*
+ * Copyright 2005-9 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 28 Feb 2009 : Initial version created by gary
+ */
+package org.scribble.projector;
+
+import org.scribble.model.Model;
+import org.scribble.model.ModelReference;
+import org.scribble.model.SubDefinitionPath;
+import org.scribble.model.Role;
+import org.scribble.model.admin.ModelListener;
+import org.scribble.extensions.*;
+
+ at RegistryInfo(extension=Projector.class)
+public class TestProjector implements Projector {
+
+	public void setProjectedMode(Model from, Model to) {
+		m_map.put(from, to);
+	}
+	
+	public Model project(ModelReference ref, Model model, Role role,
+			ModelListener l) {
+		return(project(ref, model, null, role, l));
+	}
+
+	public Model project(ModelReference ref, Model model,
+			SubDefinitionPath subDefinitionPath, Role role,
+			ModelListener l) {
+		return(m_map.get(model));
+	}
+
+	private java.util.Map<Model,Model> m_map=new java.util.HashMap<Model, Model>();
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/util/ModelIssueUtilTest.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/util/ModelIssueUtilTest.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/util/ModelIssueUtilTest.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,160 @@
+/*
+ * Copyright 2005-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 7 Sep 2008 : Initial version created by gary
+ */
+package org.scribble.util;
+
+import junit.framework.TestCase;
+
+import org.scribble.model.*;
+import org.scribble.model.admin.DefaultResolution;
+import org.scribble.model.resolutions.Resolution;
+
+public class ModelIssueUtilTest extends TestCase {
+
+	public void testSerDeSerResolutions() {
+		
+		// 1) Implement ser/de-ser test
+		// 2) Need to make resolution manager generic
+		//   so that current resolutions can be
+		//   Eclipse independent and called from an
+		//   Eclipse specific harness
+		
+		java.util.List<Resolution> res=new java.util.Vector<Resolution>();
+		
+		Resolution res1=new Resolution1();
+		
+		res1.getProperties().put("p1", "prop1");
+		res1.getProperties().put("p2", 2);
+		
+		Resolution res2=new Resolution2();
+		
+		res2.getProperties().put("p3", true);
+		res2.getProperties().put("p4", "prop4");
+		res2.getProperties().put("p5", "prop5");
+		
+		res.add(res1);
+		res.add(res2);
+		
+		java.util.Map<String,Object> props=ModelIssueUtil.serializeResolutions(res);
+		
+		java.util.List<Resolution> results=ModelIssueUtil.deserializeResolutions(props);
+		
+		// Check resolutions against originals
+		if (results.size() != 2) {
+			fail("Should be 2 results: "+results.size());
+		}
+		
+		Resolution result1=results.get(0);
+		Resolution result2=results.get(1);
+		
+		if (result1.getClass() != res1.getClass()) {
+			fail("First resolution not correct class");
+		}
+		
+		if (result2.getClass() != res2.getClass()) {
+			fail("Second resolution not correct class");
+		}
+		
+		if (result1.getProperties().size() != 2) {
+			fail("Result 1 should have 2 properties: "+result1.getProperties().size());
+		}
+		
+		if (result2.getProperties().size() != 3) {
+			fail("Result 2 should have 3 properties: "+result2.getProperties().size());
+		}
+		
+		if (result1.getProperties().get("p1").equals("prop1") == false) {
+			fail("Property p1 not correct");
+		}
+		
+		if (result1.getProperties().get("p2").equals(2) == false) {
+			fail("Property p2 not correct");
+		}
+		
+		if (result2.getProperties().get("p3").equals(true) == false) {
+			fail("Property p3 not correct");
+		}
+		
+		if (result2.getProperties().get("p4").equals("prop4") == false) {
+			fail("Property p4 not correct");
+		}
+
+		if (result2.getProperties().get("p5").equals("prop5") == false) {
+			fail("Property p5 not correct");
+		}
+	}
+	
+	public void testDuplicateProperties() {
+		
+		java.util.List<Resolution> res=new java.util.Vector<Resolution>();
+		
+		Resolution res1=new Resolution1();		
+		res1.getProperties().put("p1", "prop1");
+		
+		Resolution res2=new Resolution2();
+		res2.getProperties().put("p1", "prop2");
+		
+		res.add(res1);
+		res.add(res2);
+		
+		java.util.Map<String,Object> props=ModelIssueUtil.serializeResolutions(res);
+		
+		java.util.List<Resolution> results=ModelIssueUtil.deserializeResolutions(props);
+		
+		// Check resolutions against originals
+		if (results.size() != 2) {
+			fail("Should be 2 results: "+results.size());
+		}
+		
+		Resolution result1=results.get(0);
+		Resolution result2=results.get(1);
+		
+		if (result1.getClass() != res1.getClass()) {
+			fail("First resolution not correct class");
+		}
+		
+		if (result2.getClass() != res2.getClass()) {
+			fail("Second resolution not correct class");
+		}
+		
+		if (result1.getProperties().size() != 1) {
+			fail("Result 1 should have 1 properties: "+result1.getProperties().size());
+		}
+		
+		if (result2.getProperties().size() != 1) {
+			fail("Result 2 should have 1 properties: "+result2.getProperties().size());
+		}
+		
+		if (result1.getProperties().get("p1").equals("prop1") == false) {
+			fail("Property p1 in result 1 not correct");
+		}
+		
+		if (result2.getProperties().get("p1").equals("prop2") == false) {
+			fail("Property p1 in result 2 not correct");
+		}		
+	}
+	
+	public static class Resolution1 extends DefaultResolution {
+		
+	}
+	
+	public static class Resolution2 extends DefaultResolution {
+		
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/util/ScopeTest.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/util/ScopeTest.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.core/src/test/org/scribble/util/ScopeTest.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,61 @@
+/*
+ * Copyright 2007 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 7 Nov 2007 : Initial version created by gary
+ */
+package org.scribble.util;
+
+import junit.framework.TestCase;
+
+public class ScopeTest extends TestCase {
+
+	public void testCopyConstructor1() {
+		
+		Scope scope=new Scope();
+		scope.setLocatedRole("hello");
+		
+		Scope copy=new Scope(scope);
+		
+		if (copy.getLocatedRole() == null) {
+			fail("Located role should not be null '"+
+					copy.getLocatedRole()+"'");
+		}
+		
+		if (copy.getLocatedRole().equals(scope.getLocatedRole()) == false) {
+			fail("Located role should be '"+
+					scope.getLocatedRole()+"', but was: "+
+					copy.getLocatedRole());
+		}
+	}
+	
+	public void testCopyConstructor2() {
+		
+		Scope scope=new Scope();
+		scope.setState("name1", "value1");
+		
+		Scope copy=new Scope(scope);
+		
+		if (copy.getState("name1") == null) {
+			fail("No state found for 'name1'");
+		}
+		
+		if (copy.getState("name1").equals(scope.getState("name1")) == false) {
+			fail("State for 'name1' was '"+copy.getState("name1")+
+					"', but was expecting: "+scope.getState("name1"));
+		}
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.eclipse/.classpath
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.eclipse/.classpath	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.eclipse/.classpath	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="src" path="src/java"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+	<classpathentry kind="output" path="classes"/>
+</classpath>

Added: tools/eclipse/trunk/plugins/org.scribble.eclipse/.project
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.eclipse/.project	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.eclipse/.project	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>org.scribble.eclipse</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.ManifestBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.SchemaBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.pde.PluginNature</nature>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+	</natures>
+</projectDescription>

Added: tools/eclipse/trunk/plugins/org.scribble.eclipse/LICENSE.txt
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.eclipse/LICENSE.txt	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.eclipse/LICENSE.txt	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,201 @@
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.

Added: tools/eclipse/trunk/plugins/org.scribble.eclipse/META-INF/MANIFEST.MF
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.eclipse/META-INF/MANIFEST.MF	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.eclipse/META-INF/MANIFEST.MF	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,23 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Scribble Eclipse Support Plug-in
+Bundle-SymbolicName: org.scribble.eclipse;singleton:=true
+Bundle-Version: 0.1.0.qualifier
+Bundle-Activator: org.scribble.eclipse.osgi.Activator
+Bundle-Vendor: www.scribble.org
+Require-Bundle: org.eclipse.core.runtime,
+ org.scribble.core,
+ org.eclipse.core.resources,
+ org.eclipse.swt,
+ org.eclipse.ui,
+ org.eclipse.ui.ide,
+ org.eclipse.ui.editors,
+ org.eclipse.jdt.core
+Bundle-ActivationPolicy: lazy
+Scribble-Extensions: org.scribble.eclipse.model.admin.OSGIModelRepository,
+  org.scribble.eclipse.model.outliner.DefaultModelOutliner,
+  org.scribble.eclipse.model.admin.OSGIDependencyManager,
+  org.scribble.eclipse.model.admin.ReValidationDependencyHandler
+Export-Package: org.scribble.eclipse.model.admin,
+ org.scribble.eclipse.model.outliner,
+ org.scribble.eclipse.util

Added: tools/eclipse/trunk/plugins/org.scribble.eclipse/build.properties
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.eclipse/build.properties	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.eclipse/build.properties	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,5 @@
+source.. = src/java/
+output.. = classes/
+bin.includes = META-INF/,\
+               .,\
+               plugin.xml

Added: tools/eclipse/trunk/plugins/org.scribble.eclipse/classes/org/scribble/eclipse/actions/ExportTextAction.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.eclipse/classes/org/scribble/eclipse/actions/ExportTextAction.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.eclipse/classes/org/scribble/eclipse/actions/ProjectAction.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.eclipse/classes/org/scribble/eclipse/actions/ProjectAction.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.eclipse/classes/org/scribble/eclipse/model/admin/OSGIDefinitions.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.eclipse/classes/org/scribble/eclipse/model/admin/OSGIDefinitions.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.eclipse/classes/org/scribble/eclipse/model/admin/OSGIDependencyManager.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.eclipse/classes/org/scribble/eclipse/model/admin/OSGIDependencyManager.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.eclipse/classes/org/scribble/eclipse/model/admin/OSGIModelListener$1.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.eclipse/classes/org/scribble/eclipse/model/admin/OSGIModelListener$1.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.eclipse/classes/org/scribble/eclipse/model/admin/OSGIModelListener$ReportEntry.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.eclipse/classes/org/scribble/eclipse/model/admin/OSGIModelListener$ReportEntry.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.eclipse/classes/org/scribble/eclipse/model/admin/OSGIModelListener.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.eclipse/classes/org/scribble/eclipse/model/admin/OSGIModelListener.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.eclipse/classes/org/scribble/eclipse/model/admin/OSGIModelRepository$1$1.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.eclipse/classes/org/scribble/eclipse/model/admin/OSGIModelRepository$1$1.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.eclipse/classes/org/scribble/eclipse/model/admin/OSGIModelRepository$1.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.eclipse/classes/org/scribble/eclipse/model/admin/OSGIModelRepository$1.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.eclipse/classes/org/scribble/eclipse/model/admin/OSGIModelRepository$2.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.eclipse/classes/org/scribble/eclipse/model/admin/OSGIModelRepository$2.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.eclipse/classes/org/scribble/eclipse/model/admin/OSGIModelRepository$3.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.eclipse/classes/org/scribble/eclipse/model/admin/OSGIModelRepository$3.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.eclipse/classes/org/scribble/eclipse/model/admin/OSGIModelRepository$4.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.eclipse/classes/org/scribble/eclipse/model/admin/OSGIModelRepository$4.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.eclipse/classes/org/scribble/eclipse/model/admin/OSGIModelRepository$5.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.eclipse/classes/org/scribble/eclipse/model/admin/OSGIModelRepository$5.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.eclipse/classes/org/scribble/eclipse/model/admin/OSGIModelRepository$6.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.eclipse/classes/org/scribble/eclipse/model/admin/OSGIModelRepository$6.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.eclipse/classes/org/scribble/eclipse/model/admin/OSGIModelRepository$ValidationJob.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.eclipse/classes/org/scribble/eclipse/model/admin/OSGIModelRepository$ValidationJob.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.eclipse/classes/org/scribble/eclipse/model/admin/OSGIModelRepository.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.eclipse/classes/org/scribble/eclipse/model/admin/OSGIModelRepository.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.eclipse/classes/org/scribble/eclipse/model/admin/OSGIModelResource.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.eclipse/classes/org/scribble/eclipse/model/admin/OSGIModelResource.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.eclipse/classes/org/scribble/eclipse/model/admin/ReValidationDependencyHandler.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.eclipse/classes/org/scribble/eclipse/model/admin/ReValidationDependencyHandler.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.eclipse/classes/org/scribble/eclipse/model/images/ScribbleImages.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.eclipse/classes/org/scribble/eclipse/model/images/ScribbleImages.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.eclipse/classes/org/scribble/eclipse/model/images/activity.png
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.eclipse/classes/org/scribble/eclipse/model/images/activity.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.eclipse/classes/org/scribble/eclipse/model/images/declaration.png
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.eclipse/classes/org/scribble/eclipse/model/images/declaration.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.eclipse/classes/org/scribble/eclipse/model/images/import.png
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.eclipse/classes/org/scribble/eclipse/model/images/import.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.eclipse/classes/org/scribble/eclipse/model/images/namespace.png
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.eclipse/classes/org/scribble/eclipse/model/images/namespace.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.eclipse/classes/org/scribble/eclipse/model/images/role.png
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.eclipse/classes/org/scribble/eclipse/model/images/role.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.eclipse/classes/org/scribble/eclipse/model/outliner/AbstractModelOutlinerRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.eclipse/classes/org/scribble/eclipse/model/outliner/AbstractModelOutlinerRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.eclipse/classes/org/scribble/eclipse/model/outliner/DefaultModelOutliner.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.eclipse/classes/org/scribble/eclipse/model/outliner/DefaultModelOutliner.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.eclipse/classes/org/scribble/eclipse/model/outliner/ModelOutliner.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.eclipse/classes/org/scribble/eclipse/model/outliner/ModelOutliner.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.eclipse/classes/org/scribble/eclipse/model/outliner/OutlinerRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.eclipse/classes/org/scribble/eclipse/model/outliner/OutlinerRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.eclipse/classes/org/scribble/eclipse/osgi/Activator.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.eclipse/classes/org/scribble/eclipse/osgi/Activator.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.eclipse/classes/org/scribble/eclipse/resolutions/MarkerResolutionGenerator$MarkerResolutionWrapper.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.eclipse/classes/org/scribble/eclipse/resolutions/MarkerResolutionGenerator$MarkerResolutionWrapper.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.eclipse/classes/org/scribble/eclipse/resolutions/MarkerResolutionGenerator$ResolutionComparator.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.eclipse/classes/org/scribble/eclipse/resolutions/MarkerResolutionGenerator$ResolutionComparator.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.eclipse/classes/org/scribble/eclipse/resolutions/MarkerResolutionGenerator.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.eclipse/classes/org/scribble/eclipse/resolutions/MarkerResolutionGenerator.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.eclipse/classes/org/scribble/eclipse/util/ResourceUtil.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.eclipse/classes/org/scribble/eclipse/util/ResourceUtil.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.eclipse/plugin.xml
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.eclipse/plugin.xml	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.eclipse/plugin.xml	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,85 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.2"?>
+<plugin>
+
+  <extension
+        point="org.eclipse.ui.startup">
+     <startup
+           class="org.scribble.eclipse.osgi.Activator">
+     </startup>
+  </extension>
+
+  <extension
+        id="org.scribble.ScribbleProblem"
+        name="Scribble Problem"
+        point="org.eclipse.core.resources.markers">
+     <super
+           type="org.eclipse.core.resources.problemmarker">
+     </super>
+     <persistent
+           value="true">
+     </persistent>
+  </extension>
+
+   <extension
+         point="org.eclipse.ui.ide.markerResolution">
+	<markerResolutionGenerator
+		markerType="org.scribble.ScribbleProblem"
+		class="org.scribble.eclipse.resolutions.MarkerResolutionGenerator">
+	</markerResolutionGenerator>
+   </extension>
+
+  <extension point="org.eclipse.ui.popupMenus"> 
+	<objectContribution 
+      id="org.scribble.contribution.spr"
+   			objectClass="org.eclipse.core.resources.IFile"
+   				nameFilter="*.spr">
+	  <menu
+         id="org.scribble.menu"
+         label="Scribble"
+         path="additions">
+      	<separator name="group1"/>
+      </menu>
+      <action
+           label="Project"
+           class="org.scribble.eclipse.actions.ProjectAction"
+           menubarPath="org.scribble.menu/group1"
+           enablesFor="1"
+           id="org.scribble.eclipse.actions.ProjectAction">
+     </action> 
+      <action
+           label="Export as Text"
+           class="org.scribble.eclipse.actions.ExportTextAction"
+           menubarPath="org.scribble.menu/group1"
+           enablesFor="1"
+           id="org.scribble.eclipse.actions.ExportTextAction">
+     </action> 
+    </objectContribution>
+	<objectContribution 
+      id="org.scribble.contribution.scv"
+   			objectClass="org.eclipse.core.resources.IFile"
+   				nameFilter="*.scv">
+	  <menu
+         id="org.scribble.menu"
+         label="Scribble"
+         path="additions">
+      	<separator name="group1"/>
+      </menu>
+      <action
+           label="Project"
+           class="org.scribble.eclipse.actions.ProjectAction"
+           menubarPath="org.scribble.menu/group1"
+           enablesFor="1"
+           id="org.scribble.eclipse.actions.ProjectAction">
+     </action> 
+      <action
+           label="Export as Text"
+           class="org.scribble.eclipse.actions.ExportTextAction"
+           menubarPath="org.scribble.menu/group1"
+           enablesFor="1"
+           id="org.scribble.eclipse.actions.ExportTextAction">
+     </action> 
+    </objectContribution>
+  </extension>
+
+</plugin>

Added: tools/eclipse/trunk/plugins/org.scribble.eclipse/src/java/org/scribble/eclipse/actions/ExportTextAction.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.eclipse/src/java/org/scribble/eclipse/actions/ExportTextAction.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.eclipse/src/java/org/scribble/eclipse/actions/ExportTextAction.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,136 @@
+/*
+ * Copyright 2005-7 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 17 Dec, 2007 : Initial version created by gary
+ */
+package org.scribble.eclipse.actions;
+
+import java.io.IOException;
+import java.util.logging.Logger;
+
+import org.eclipse.core.resources.*;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.MessageBox;
+import org.eclipse.ui.IObjectActionDelegate;
+import org.eclipse.ui.IWorkbenchPart;
+import org.scribble.extensions.RegistryFactory;
+import org.scribble.model.ModelReference;
+import org.scribble.model.admin.DefaultModelListener;
+
+public class ExportTextAction implements IObjectActionDelegate {
+
+	/**
+	 * This method implements the action's run method.
+	 * 
+	 * @param action The action
+	 */
+	public void run(IAction action) {
+		
+		if (m_selection instanceof StructuredSelection) {
+			StructuredSelection sel=(StructuredSelection)m_selection;
+			
+			IResource res=(IResource)sel.getFirstElement();
+			
+			if (res instanceof IFile) {
+				
+				// Derive model reference
+				ModelReference ref=
+					org.scribble.eclipse.model.admin.OSGIModelRepository.createReference(res);
+				
+				// Get the model, which will indirectly parse it
+				org.scribble.model.admin.ModelRepository mrep=
+					(org.scribble.model.admin.ModelRepository)
+					RegistryFactory.getRegistry().getExtension(
+							org.scribble.model.admin.ModelRepository.class, null);
+			
+				java.util.List<org.scribble.model.admin.ModelInfo> models=
+						mrep.getModels(ref, new DefaultModelListener());
+				
+				for (int i=0; i < models.size(); i++) {
+					
+					org.scribble.export.Exporter exporter=
+						(org.scribble.export.Exporter)
+						RegistryFactory.getRegistry().getExtension(
+								org.scribble.export.Exporter.class, null);
+					
+					org.scribble.export.text.TextFormatter formatter=
+						new org.scribble.export.text.TextFormatter();
+					
+					java.io.ByteArrayOutputStream os=
+						new java.io.ByteArrayOutputStream();
+					
+					formatter.setOutputStream(os);
+					
+					try {
+						exporter.export(models.get(i).getSource(),
+								models.get(i).getModel(), formatter);
+						
+						String str=new String(os.toByteArray());
+						
+						System.out.println("EXPORTED TEXT:");
+						System.out.println(str);
+					} catch(Exception e) {
+						e.printStackTrace();
+					}
+				}
+			}
+		}
+	}
+	
+	/**
+	 * This method indicates that the selection has changed.
+	 * 
+	 * @param action The action
+	 * @param selection The selection
+	 */
+	public void selectionChanged(IAction action,
+            ISelection selection) {
+		m_selection = selection;
+	}
+
+	/**
+	 * This method sets the currently active workbench part.
+	 * 
+	 * @param action The action
+	 * @param targetPart The active workbench part
+	 */
+	public void setActivePart(IAction action,
+            IWorkbenchPart targetPart) {
+		m_targetPart = targetPart;
+	}
+	
+	/**
+	 * This method is used to report a warning.
+	 * 
+	 * @param mesg The warning message
+	 */
+	public void warn(String mesg) {
+		
+		MessageBox mbox=new MessageBox(m_targetPart.getSite().getShell(),
+				SWT.ICON_WARNING|SWT.OK);
+		mbox.setMessage(mesg);
+		mbox.open();
+	}
+
+	private static Logger logger = Logger.getLogger("org.scribble.eclipse.actions");
+	
+	private ISelection m_selection=null;
+    private IWorkbenchPart m_targetPart=null;
+}

Added: tools/eclipse/trunk/plugins/org.scribble.eclipse/src/java/org/scribble/eclipse/actions/ProjectAction.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.eclipse/src/java/org/scribble/eclipse/actions/ProjectAction.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.eclipse/src/java/org/scribble/eclipse/actions/ProjectAction.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,182 @@
+/*
+ * Copyright 2005-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 24 Jan, 2008 : Initial version created by gary
+ */
+package org.scribble.eclipse.actions;
+
+import java.util.logging.Logger;
+
+import org.eclipse.core.resources.*;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.MessageBox;
+import org.eclipse.ui.IObjectActionDelegate;
+import org.eclipse.ui.IWorkbenchPart;
+import org.scribble.eclipse.model.admin.*;
+import org.scribble.extensions.RegistryFactory;
+import org.scribble.model.ModelReference;
+import org.scribble.model.admin.DefaultModelListener;
+
+public class ProjectAction implements IObjectActionDelegate {
+
+	/**
+	 * This method implements the action's run method.
+	 * 
+	 * @param action The action
+	 */
+	public void run(IAction action) {
+		
+		if (m_selection instanceof StructuredSelection) {
+			StructuredSelection sel=(StructuredSelection)m_selection;
+			
+			IResource res=(IResource)sel.getFirstElement();
+			
+			if (res instanceof IFile) {
+				
+				// Derive model reference
+				ModelReference ref=
+					org.scribble.eclipse.model.admin.OSGIModelRepository.createReference(res);
+				
+				// Check if model is a global model
+				if (ref != null && ref.getLocatedRole() == null) {
+					
+					// Get the model, which will indirectly parse it
+					org.scribble.model.admin.ModelRepository mrep=
+						(org.scribble.model.admin.ModelRepository)
+						RegistryFactory.getRegistry().getExtension(
+								org.scribble.model.admin.ModelRepository.class, null);
+				
+					org.scribble.export.Exporter exporter=
+						(org.scribble.export.Exporter)
+						RegistryFactory.getRegistry().getExtension(
+								org.scribble.export.Exporter.class, null);
+					
+					java.util.List<org.scribble.model.admin.ModelInfo> models=
+							mrep.getModels(ref, new DefaultModelListener());
+					
+					for (int j=0; j < models.size(); j++) {
+						java.util.List<ModelReference> localRefs=
+										models.get(j).getModel().getLocalModels(ref);
+						
+						// Select role - for now project all roles
+						for (int i=0; i < localRefs.size(); i++) {
+							ModelReference localRef=localRefs.get(i);
+							
+							mrep.locate(localRef, ref);
+							
+							java.util.List<org.scribble.model.admin.ModelInfo> localModels=
+								mrep.getModels(localRef, new DefaultModelListener());
+							
+							for (int k=0; k < localModels.size(); k++) {
+								org.scribble.export.text.TextFormatter formatter=
+									new org.scribble.export.text.TextFormatter();
+								
+								java.io.ByteArrayOutputStream os=
+									new java.io.ByteArrayOutputStream();
+								
+								formatter.setOutputStream(os);
+								
+								try {
+									exporter.export(localModels.get(k).getSource(),
+											localModels.get(k).getModel(),
+												formatter);
+									
+									String str=new String(os.toByteArray());
+									
+									// Create file
+									IFile file=OSGIModelRepository.createFile(localRef);
+									
+									if (file != null) {
+										boolean f_create=true;
+										
+										if (file.exists()) {
+											// Check if should overwrite
+											MessageBox mbox=new MessageBox(m_targetPart.getSite().getShell(),
+													SWT.ICON_WARNING|SWT.OK|SWT.CANCEL);
+											mbox.setMessage("Should overwrite "+
+													file.getName()+"?");
+											if (mbox.open() == SWT.CANCEL) {
+												f_create = false;
+											}
+										}
+										
+										if (f_create) {
+											if (file.exists()) {
+												file.setContents(new java.io.ByteArrayInputStream(str.getBytes()),
+														true, true, null);
+											} else {
+												file.create(new java.io.ByteArrayInputStream(str.getBytes()),
+														true, null);
+											}
+										}
+									}
+								} catch(Exception e) {
+									e.printStackTrace();
+								}
+							}
+						}
+					}
+				} else {
+					warn("Can only project global models");
+				}
+			}
+		}
+	}
+	
+	/**
+	 * This method indicates that the selection has changed.
+	 * 
+	 * @param action The action
+	 * @param selection The selection
+	 */
+	public void selectionChanged(IAction action,
+            ISelection selection) {
+		m_selection = selection;
+	}
+
+	/**
+	 * This method sets the currently active workbench part.
+	 * 
+	 * @param action The action
+	 * @param targetPart The active workbench part
+	 */
+	public void setActivePart(IAction action,
+            IWorkbenchPart targetPart) {
+		m_targetPart = targetPart;
+	}
+	
+	/**
+	 * This method is used to report a warning.
+	 * 
+	 * @param mesg The warning message
+	 */
+	public void warn(String mesg) {
+		
+		MessageBox mbox=new MessageBox(m_targetPart.getSite().getShell(),
+				SWT.ICON_WARNING|SWT.OK);
+		mbox.setMessage(mesg);
+		mbox.open();
+	}
+
+	private static Logger logger = Logger.getLogger("org.scribble.eclipse.actions");
+	
+	private ISelection m_selection=null;
+    private IWorkbenchPart m_targetPart=null;
+}

Added: tools/eclipse/trunk/plugins/org.scribble.eclipse/src/java/org/scribble/eclipse/model/admin/OSGIDefinitions.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.eclipse/src/java/org/scribble/eclipse/model/admin/OSGIDefinitions.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.eclipse/src/java/org/scribble/eclipse/model/admin/OSGIDefinitions.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,30 @@
+/*
+ * Copyright 2007-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 21 Feb 2008 : Initial version created by gary
+ */
+package org.scribble.eclipse.model.admin;
+
+/**
+ * This class contains common definitions used by Scribble OSGI related
+ * components.
+ */
+public class OSGIDefinitions {
+
+	public static final String SCRIBBLE_PROBLEM = "org.scribble.ScribbleProblem";
+
+}

Added: tools/eclipse/trunk/plugins/org.scribble.eclipse/src/java/org/scribble/eclipse/model/admin/OSGIDependencyManager.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.eclipse/src/java/org/scribble/eclipse/model/admin/OSGIDependencyManager.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.eclipse/src/java/org/scribble/eclipse/model/admin/OSGIDependencyManager.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,51 @@
+/*
+ * Copyright 2007-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 14 Feb 2008 : Initial version created by gary
+ */
+package org.scribble.eclipse.model.admin;
+
+import org.scribble.extensions.RegistryInfo;
+import org.scribble.model.*;
+import org.scribble.model.admin.AbstractDependencyManager;
+import org.scribble.model.admin.DependencyManager;
+import org.scribble.model.admin.ModelResource;
+
+/**
+ * This class provides an OSGI implementation of the dependency
+ * manager.
+ */
+ at RegistryInfo(extension=DependencyManager.class)
+public class OSGIDependencyManager extends AbstractDependencyManager {
+
+	/**
+	 * The default constructor.
+	 */
+	public OSGIDependencyManager() {
+	}
+	
+	/**
+	 * This method returns the implementation of the model resource
+	 * associated with the supplied model reference.
+	 * 
+	 * @param ref The model reference
+	 * @return The resource
+	 */
+	protected ModelResource getResource(ModelReference ref) {
+		return(new OSGIModelResource(ref));
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.eclipse/src/java/org/scribble/eclipse/model/admin/OSGIModelListener.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.eclipse/src/java/org/scribble/eclipse/model/admin/OSGIModelListener.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.eclipse/src/java/org/scribble/eclipse/model/admin/OSGIModelListener.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,313 @@
+/*
+ * Copyright 2007 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 8 Nov 2007 : Initial version created by gary
+ */
+package org.scribble.eclipse.model.admin;
+
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+import org.eclipse.core.resources.IMarker;
+import org.eclipse.core.resources.IResource;
+import org.scribble.eclipse.osgi.*;
+import org.scribble.model.*;
+import org.scribble.model.admin.ModelIssue;
+import org.scribble.util.*;
+
+/**
+ * This class implements a model listener that reports information to
+ * the Eclipse problems view.
+ */
+public class OSGIModelListener implements org.scribble.model.admin.ModelListener {
+
+	public static final String MODEL_NOTATION = "modelNotation";
+	public static final String MODEL_LOCATED_ROLE = "modelLocatedRole";
+	public static final String MODEL_LOCALPART = "modelLocalpart";
+	public static final String MODEL_NAMESPACE = "modelNamespace";
+	public static final String MODEL_PROP_PREFIX = "_mp_";
+	public static final String SOURCE_MODEL_OBJECT_URI = "sourceModelObjectURI";
+	public static final String SOURCE_COMPONENT_URI = "sourceComponentURI";
+
+	/**
+	 * This method is the constructor for the validation model
+	 * listener.
+	 * 
+	 * @param ref The model reference
+	 */
+	public OSGIModelListener(ModelReference ref) {
+		m_reference = ref;
+		
+		m_resource = OSGIModelRepository.getFile(m_reference);
+		
+		if (m_resource == null) {
+			logger.severe("Resource not found - cannot listen for problems: "+
+					m_reference);
+		}
+	}
+	
+	public void error(ModelIssue issue) {
+		reportIssue(issue, ReportEntry.ERROR_TYPE);
+	}
+
+	public void warning(ModelIssue issue) {		
+		reportIssue(issue, ReportEntry.WARNING_TYPE);
+	}
+	
+	protected void reportIssue(ModelIssue issue, int issueType) {
+		
+		if (m_resource != null) {
+			// Find notation for the resource name
+			org.scribble.model.Notation notation=
+					ResourceUtil.getNotation(m_resource.getName());
+			
+			if (notation != null) {
+				org.scribble.editor.EditorManager em=(org.scribble.editor.EditorManager)
+						org.scribble.extensions.RegistryFactory.getRegistry().getExtension(
+								org.scribble.editor.EditorManager.class, notation.getCode());
+				
+				if (em != null) {
+					em.enrich(issue);
+				}
+			}
+	
+			synchronized(m_entries) {
+				m_entries.add(new ReportEntry(issue, issueType));
+			}
+			
+			if (m_finished) {
+				// Publish immediately
+				finished();
+			}
+		}
+	}			
+	
+	public void finished() {
+		org.eclipse.swt.widgets.Display.getDefault().asyncExec(new Runnable() {
+			public void run() {
+				
+				if (m_resource != null && m_resource.exists()) {
+					// Clear current markers
+					try {
+						synchronized(m_entries) {
+							
+							if (m_finished == false) {
+								m_resource.deleteMarkers(OSGIDefinitions.SCRIBBLE_PROBLEM, true,
+										IResource.DEPTH_INFINITE);
+								m_finished = true;
+							}
+						
+							// Update the markers
+							for (int i=0; i < m_entries.size(); i++) {
+								ReportEntry re=(ReportEntry)m_entries.get(i);
+								
+								if (m_reported.contains(re) == false) {
+									createMarker(re.getSource(), re.getStartPosition(),
+										re.getEndPosition(),
+										re.getMessage(), re.getType(),
+										re.getProperties());
+									
+									m_reported.add(re);
+								}
+							}
+							
+							m_entries.clear();
+						}
+					} catch(Exception e) {
+						logger.log(Level.SEVERE,
+								"Failed to update problems", e);
+						Activator.logError("Failed to update problems " +
+								"view with validation messages",e);
+					}
+				}
+			}
+		});
+	}
+	
+	protected void createMarker(ModelObject src, int startPos, int endPos, String mesg,
+			int type, java.util.Map<String,Object> props) {
+					
+		// Create marker for message
+		try {
+			IMarker marker=m_resource.createMarker(OSGIDefinitions.SCRIBBLE_PROBLEM);
+			
+			// Initialize the attributes on the marker
+			marker.setAttribute(IMarker.MESSAGE, mesg);
+			
+			if (type == ReportEntry.ERROR_TYPE) {
+				marker.setAttribute(IMarker.SEVERITY, IMarker.SEVERITY_ERROR);
+			} else if (type == ReportEntry.WARNING_TYPE) {
+				marker.setAttribute(IMarker.SEVERITY, IMarker.SEVERITY_WARNING);
+			} else if (type == ReportEntry.INFORMATION_TYPE) {
+				marker.setAttribute(IMarker.SEVERITY, IMarker.SEVERITY_INFO);
+			}
+			
+			if (startPos >= 0) {
+				marker.setAttribute(IMarker.CHAR_START, startPos);
+			}
+			
+			if (endPos >= 0) {
+				marker.setAttribute(IMarker.CHAR_END, endPos);
+			}
+			
+			marker.setAttribute(SOURCE_MODEL_OBJECT_URI, src.getSource().getModelObjectURI());
+			marker.setAttribute(SOURCE_COMPONENT_URI, src.getSource().getComponentURI());
+			
+			marker.setAttribute(MODEL_NAMESPACE, m_reference.getNamespace());
+			marker.setAttribute(MODEL_LOCALPART, m_reference.getLocalpart());
+			marker.setAttribute(MODEL_LOCATED_ROLE, m_reference.getLocatedRole());
+			marker.setAttribute(MODEL_NOTATION, m_reference.getNotation());
+			
+			java.util.Iterator<String> propiter=m_reference.getPropertyNames().iterator();
+			
+			while (propiter.hasNext()) {
+				String name=propiter.next();
+				Object val=convertValue(m_reference.getProperty(name));
+				
+				if (val != null) {
+					marker.setAttribute(MODEL_PROP_PREFIX+name, val);
+				}
+			}
+
+			// Transfer properties
+			if (props != null) {
+				java.util.Iterator<String> iter=props.keySet().iterator();
+				
+				while (iter.hasNext()) {
+					String prop=iter.next();
+					Object value=props.get(prop);
+					
+					if (value != null) {
+						value = convertValue(value);
+
+						if (value instanceof Integer) {
+							marker.setAttribute(prop, ((Integer)value).intValue());
+						} else if (value instanceof Boolean) {
+							marker.setAttribute(prop, ((Boolean)value).booleanValue());
+						} else if (value instanceof String) {
+							marker.setAttribute(prop, value);
+						} else {
+							logger.warning("Could not record property '"+
+									prop+"' as not int, boolean or string");
+						}
+					}
+				}
+			}
+		} catch(Exception e) {
+			
+			// TODO: report error
+			e.printStackTrace();
+		}
+	}
+	
+	protected Object convertValue(Object value) {
+		Object ret=value;
+		
+		if (value instanceof ModelReference) {
+			org.eclipse.core.resources.IFile file=
+					org.scribble.eclipse.model.admin.OSGIModelRepository.getFile(
+									(ModelReference)value);
+			
+			if (file == null || file.exists() == false) {
+				file = org.scribble.eclipse.model.admin.OSGIModelRepository.getGlobalFile(
+						(ModelReference)value);
+			}
+			
+			if (file != null && file.exists()) {
+				ret = file.getFullPath().toPortableString();
+			}
+		} else if (value instanceof IResource) {
+			ret = ((IResource)value).getFullPath().toPortableString();
+		}
+		
+		return(ret);
+	}
+	
+	private static Logger logger = Logger.getLogger("org.scribble.eclipse");
+
+	private ModelReference m_reference=null;
+	private IResource m_resource=null;
+	private boolean m_finished=false;
+	private java.util.Vector<ReportEntry> m_entries=new java.util.Vector<ReportEntry>();
+	private java.util.Vector<ReportEntry> m_reported=new java.util.Vector<ReportEntry>();
+
+	/**
+	 * This is a simple data container class to hold the
+	 * information reported during validation.
+	 *
+	 */
+	public class ReportEntry {
+		public ReportEntry(ModelIssue issue, int type) {
+			m_issue = issue;
+			m_type = type;
+		}
+		
+		public ModelObject getSource() {
+			return(m_issue.getModelObject());
+		}
+		
+		public int getStartPosition() {
+			return(m_issue.getModelObject().getSource().getStartPosition());
+		}
+		
+		public int getEndPosition() {
+			return(m_issue.getModelObject().getSource().getEndPosition());
+		}
+		
+		public String getMessage() {
+			return(m_issue.getMessage());
+		}
+		
+		public int getType() {
+			return(m_type);
+		}
+		
+		public java.util.Map<String,Object> getProperties() {
+			java.util.Map<String,Object> ret=m_issue.getProperties();
+			
+			if (m_issue.getResolutions().size() > 0) {
+				java.util.Map<String,Object> resProps=
+						ModelIssueUtil.serializeResolutions(m_issue.getResolutions());
+				
+				ret.putAll(resProps);
+			}
+			
+			return(ret);
+		}
+		
+		public int hashCode() {
+			return(m_issue.hashCode());
+		}
+		
+		public boolean equals(Object obj) {
+			boolean ret=false;
+			
+			if (obj instanceof ReportEntry) {
+				ret = m_issue.equals(((ReportEntry)obj).m_issue);
+			}
+			
+			return(ret);
+		}
+		
+		public static final int ERROR_TYPE=0;
+		public static final int WARNING_TYPE=1;
+		public static final int INFORMATION_TYPE=2;
+		
+		private ModelIssue m_issue=null;
+		private int m_type=0;
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.eclipse/src/java/org/scribble/eclipse/model/admin/OSGIModelRepository.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.eclipse/src/java/org/scribble/eclipse/model/admin/OSGIModelRepository.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.eclipse/src/java/org/scribble/eclipse/model/admin/OSGIModelRepository.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,1108 @@
+/*
+ * Copyright 2007 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 20 Oct 2007 : Initial version created by gary
+ */
+package org.scribble.eclipse.model.admin;
+
+import org.scribble.model.*;
+import org.scribble.model.admin.AbstractModelRepository;
+import org.scribble.model.admin.DefaultModelListener;
+import org.scribble.model.admin.DependencyType;
+import org.scribble.model.admin.ModelInfo;
+import org.scribble.model.admin.ModelRepository;
+import org.scribble.extensions.*;
+import org.scribble.extensions.RegistryFactory;
+
+import java.util.logging.*;
+
+import org.eclipse.core.resources.*;
+import org.eclipse.core.runtime.*;
+import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.jdt.core.JavaCore;
+import org.eclipse.jdt.core.IJavaProject;
+
+/**
+ * This class represents the abstract implementation for the
+ * OSGi model repository. Derived classes will be responsible
+ * for grounding the implementation with a specific Scribble
+ * notation type. 
+ *
+ */
+ at RegistryInfo(extension=ModelRepository.class)
+public class OSGIModelRepository extends AbstractModelRepository {
+
+	private static final String SUB_DEFN_PATH_SEPARATOR = "$";
+
+	/**
+	 * This is the default constructor for the abstract OSGi Model Repository.
+	 */
+	public OSGIModelRepository() {
+		
+		IResourceChangeListener rcl=
+			new IResourceChangeListener() {
+	
+			public void resourceChanged(IResourceChangeEvent evt) {
+		
+				try {
+					evt.getDelta().accept(new IResourceDeltaVisitor() {
+						
+				        public boolean visit(IResourceDelta delta) {
+				        	boolean ret=true;
+				        	IResource res = delta.getResource();
+				        	
+				        	// Only process non-derived resources,
+				        	// as if the resource is copied to the
+				        	// 'classes' folder we only want to
+				        	// process the original
+				        	if (res.isDerived() == false) {
+				        						        		
+								// Determine if the change is relevant
+								if (isUpdate(res, delta)) {
+					        		ModelReference ref=createReference(res);
+									
+									// Validate the resource
+									handleResourceUpdated(ref);
+									
+								} else if (isAddition(res, delta)) {
+					        		ModelReference ref=createReference(res);
+									
+									handleResourceAdded(ref);
+
+								} else if (isDeletion(res, delta)) {
+					        		ModelReference ref=createReference(res);
+									
+									handleResourceRemoved(ref);
+								}								
+				        	}
+				        	
+				        	return(ret);
+				        }
+				 	});
+				} catch(Exception e) {
+					logger.log(Level.SEVERE,
+						"Failed to process resource change event", e);
+				}
+			}
+		};
+		
+		// Register the resource change listener
+		ResourcesPlugin.getWorkspace().addResourceChangeListener(rcl,
+				IResourceChangeEvent.POST_CHANGE);
+		
+		m_modelChangeListener = new org.scribble.model.admin.DefaultModelChangeListener() {
+
+			public void modelAdded(ModelReference ref) {
+				validateModel(ref);
+			}
+			
+			public void modelUpdated(ModelReference ref) {
+				validateModel(ref);
+			}
+		};		
+		
+		addModelChangeListener(m_modelChangeListener);
+
+		new Thread(new Runnable() {
+			public void run() {
+				initializeDependencies();				
+			}
+		}).start();
+	}
+	
+	protected static void initializeDependencies() {
+		
+		// Register the notations to be supported
+		java.util.List<Object> notations=
+				RegistryFactory.getRegistry().getExtensions(
+						org.scribble.model.Notation.class, null);
+		
+		java.util.List<String> notationCodes=new java.util.Vector<String>();
+		
+		for (int i=0; i < notations.size(); i++) {
+			Notation notation=(org.scribble.model.Notation)notations.get(i);
+			
+			notationCodes.add(notation.getCode());
+		}
+		
+		IProject[] projects=
+			org.eclipse.core.resources.ResourcesPlugin.getWorkspace().getRoot().getProjects();
+		
+		for (int i=0; i < projects.length; i++) {
+			if (projects[i].isOpen()) {
+				initializeProject(projects[i], notationCodes);
+			}
+		}
+		
+		m_initialized = true;
+	}
+	
+	protected static void initializeProject(IProject proj, java.util.List<String> notations) {
+		final java.util.List<String> codes=notations;
+		
+		try {
+			// Get the model, which will indirectly parse it
+			final org.scribble.model.admin.ModelRepository mrep=
+				(org.scribble.model.admin.ModelRepository)
+				RegistryFactory.getRegistry().getExtension(
+						org.scribble.model.admin.ModelRepository.class, null);
+			
+			proj.accept(new IResourceVisitor() {
+	
+				public boolean visit(IResource resource) throws CoreException {
+					
+					// Check if resource is of interest
+					// Only non-derived resources, to avoid processing
+					// files placed in the 'classes' folder - only
+					// want to process original source
+					if (resource instanceof IFile &&
+							resource.isDerived() == false &&
+							(codes.contains(((IFile)resource).getFileExtension()) ||
+							codes.contains(((IFile)resource).getName()))) {
+
+						logger.info("Initialize: "+resource);
+							
+						// Derive model reference
+						ModelReference ref=
+							org.scribble.eclipse.model.admin.OSGIModelRepository.createReference(resource);
+						
+						// Get the model, which will indirectly parse it
+						mrep.getModels(ref, new DefaultModelListener());
+					}
+					
+					return(true);
+				}			
+			});
+
+		} catch(Exception e) {
+			logger.log(java.util.logging.Level.SEVERE,
+					"Failed to initialize dependencies", e);
+		}
+	}
+	
+	public static boolean isInitialized() {
+		return(m_initialized);
+	}
+	
+	/**
+	 * This method locates a new model reference in the
+	 * environment associated with a base model reference.
+	 * 
+	 * @param newRef The new model reference
+	 * @param base The base model reference
+	 */
+	public void locate(ModelReference newRef, ModelReference base) {
+		
+		// Transfer the project property
+		if (base.hasProperty(PROJECT_PROPERTY)) {
+			newRef.setProperty(PROJECT_PROPERTY,
+					getProject(base));
+		}
+		
+		// Derive the resource property - just retrieving
+		// the file will result in the resource properties
+		// being established
+		getFile(newRef);
+	}
+	
+	/**
+	 * This method takes a model reference, and returns the underlying
+	 * model reference associated with the source that provides
+	 * the model associated with the supplied reference. If more
+	 * than one source model reference is available, only the
+	 * first one will be returned.
+	 * 
+	 * @param ref The model reference
+	 * @return The source model reference
+	 */
+	public ModelReference getSource(ModelReference ref) {
+		ModelReference ret=ref;
+		
+		if (getFile(ref) != null) {
+			ret = ref;
+		} else if (ref.getLocatedRole() != null) {
+			ModelReference globalRef=new ModelReference(ref.getNamespace(),
+					ref.getLocalpart(), null, ref.getNotation());
+		
+			locate(globalRef, ref);
+			
+			if (getFile(globalRef) != null) {
+				ret = globalRef;
+			} else {
+
+				// Get 'conforms to' dependent for reference
+				org.scribble.model.admin.DependencyManager dm=
+					(org.scribble.model.admin.DependencyManager)
+					org.scribble.extensions.RegistryFactory.getRegistry().getExtension(
+							org.scribble.model.admin.DependencyManager.class, null);
+				
+				if (dm != null) {
+					java.util.List<ModelReference> refs=
+								dm.getDependents(ref, DependencyType.ConformsTo);
+					
+					// Only use reference if a single dependent exists?
+					
+					// TODO: Determine if derived model references
+					// should link back to their original source implicitly?
+					
+					if (refs.size() == 1) {
+						globalRef = refs.get(0);
+						
+						if (getFile(globalRef) != null) {
+							ret = globalRef;
+						}
+					}
+				}
+			}	
+		} else {
+			// TODO: GPB Check 'conforms to' on the provided ref
+		}
+		
+		return(ret);
+	}
+	
+	/**
+	 * This method explicitly requests the validation of
+	 * the model associated with the supplied model reference.
+	 * 
+	 * @param ref The model reference
+	 */
+	public static void validateModel(ModelReference ref) {
+		try {				
+			// Create the validation job
+			ValidationJob job=new ValidationJob(ref);
+			job.setPriority(Job.DECORATE);
+			job.schedule();
+				
+		} catch(Exception e) {
+			logger.log(Level.SEVERE,
+				"Failed to schedule validation of scribble description", e);
+		}
+	}			
+	
+	/**
+	 * This method determines whether the source reference has
+	 * access to the target reference. The check for 'self access'
+	 * determines if access to a target reference should be permitted
+	 * if the target reference has the same underlying resource
+	 * as the source.
+	 * 
+	 * @param srcRef The source reference
+	 * @param targetRef The target reference
+	 * @param allowSelfAccess Determines if self access permitted
+	 * @return Whether the model associated with the source
+	 * 				reference has access to the model associated
+	 * 				with the target reference
+	 */
+	public boolean canAccess(ModelReference srcRef,
+			ModelReference targetRef, boolean allowSelfAccess) {
+		boolean ret=false;
+		
+		ModelReference ssrcRef=getSource(srcRef);
+		ModelReference stargetRef=getSource(targetRef);
+		
+		if (logger.isLoggable(Level.FINEST)) {
+			logger.finest("srcRef="+srcRef+" targetRef="+targetRef+" allowSelfAccess="+allowSelfAccess);
+			logger.finest("ssrcRef="+ssrcRef+" stargetRef="+stargetRef);
+		}
+
+		if (ssrcRef != null && stargetRef != null &&
+				(allowSelfAccess ||
+						ssrcRef.equals(stargetRef) == false)) {
+			IProject srcProj=getProject(ssrcRef);
+			IProject targetProj=getProject(stargetRef);
+			
+			if (logger.isLoggable(Level.FINEST)) {
+				logger.info("srcProj="+srcProj+" targetProj="+targetProj);
+			}
+
+			// Should not matter which resource is source or target.
+			// If the projects are associated and accessible in one
+			// direction, then they should be accessible in both directions.
+			if (srcProj != null && targetProj != null &&
+					(isProjectAssociated(srcProj, targetProj) ||
+					isProjectAssociated(targetProj, srcProj))) {
+				ret = true;
+			}
+		}
+		
+		if (logger.isLoggable(Level.FINEST)) {
+			logger.finest("Can access? "+ret);
+		}
+		
+		return(ret);
+	}
+	
+	protected boolean isProjectAssociated(IProject src, IProject target) {
+		boolean ret=false;
+	
+		if (src == target) {
+			ret = true;
+		} else {
+			try {
+				for (int i=0; ret == false &&
+						i < src.getReferencedProjects().length; i++) {
+					ret = isProjectAssociated(src.getReferencedProjects()[i], target);
+				}
+			} catch(Exception e) {
+				e.printStackTrace();
+			}
+			
+			if (ret == false) {
+				try {
+					if (src.hasNature(JavaCore.NATURE_ID)) {
+				
+						// Check if Java projects are related
+						IJavaProject jproject=JavaCore.create(src); 
+					
+						String projects[]=jproject.getRequiredProjectNames();
+							
+						for (int i=0; ret == false && i < projects.length; i++) {
+							IProject dependent=
+								org.eclipse.core.resources.ResourcesPlugin.getWorkspace().
+										getRoot().getProject(projects[i]);
+							
+							ret = isProjectAssociated(dependent, target);
+						}
+					}
+				} catch(Exception e) {
+					logger.severe("Failed to check dependent projects: "+e);
+				}
+			}
+		}
+		
+		return(ret);
+	}
+	
+	/**
+	 * This method associates any global resource information associated with the
+	 * supplied global model reference, with the supplied local model reference.
+	 * 
+	 * @param lref The local model reference
+	 * @param gref The global model reference
+	 */
+	@Override
+	protected void associateGlobalResource(ModelReference lref, ModelReference gref) {
+		lref.setProperty(GLOBAL_RESOURCE_PROPERTY, getFile(gref));
+	}
+	
+	/**
+	 * This method takes the supplied global model reference,
+	 * and a role, and returns a local model reference for the
+	 * supplied details.
+	 * 
+	 * @param globalRef The global model reference
+	 * @param role The role
+	 * @return The local model reference
+	 */
+	@Override
+	protected ModelReference getLocalModelRef(ModelReference globalRef,
+						String role) {
+		ModelReference ret=super.getLocalModelRef(globalRef, role);					
+		
+		// Transfer resource property
+		if (globalRef.hasProperty(RESOURCE_PROPERTY)) {
+			ret.setProperty(GLOBAL_RESOURCE_PROPERTY,
+					globalRef.getProperty(RESOURCE_PROPERTY));
+		}
+		
+		return(ret);
+	}
+
+	/**
+	 * This method takes the supplied local model reference and
+	 * returns a global model reference for the supplied details.
+	 * 
+	 * @param localRef The local model reference
+	 * @return The global model reference
+	 */
+	@Override
+	protected ModelReference getGlobalModelRef(ModelReference localRef) {
+		ModelReference ret=super.getGlobalModelRef(localRef);					
+
+		// Transfer resource property
+		if (localRef.hasProperty(GLOBAL_RESOURCE_PROPERTY)) {
+			ret.setProperty(RESOURCE_PROPERTY,
+					localRef.getProperty(GLOBAL_RESOURCE_PROPERTY));
+		}
+		
+		return(ret);
+	}
+
+	/**
+	 * This method determines whether the supplied resource
+	 * is relevant and has changed.
+	 * 
+	 * @param res The resource
+	 * @param deltaFlags The flags
+	 * @return Whether the change is relevant
+	 */
+	protected boolean isUpdate(IResource res, IResourceDelta delta) {
+		boolean ret=false;
+
+		// Are the changes associated with the contents?
+		if (res != null && res.getFileExtension() != null &&
+				(isNotationSupported(res.getFileExtension()) ||
+						isNotationSupported(res.getName())) &&
+				(delta.getFlags() & IResourceDelta.CONTENT) != 0) {
+			ret = true;
+		}
+
+		return(ret);
+	}
+	
+	/**
+	 * This method determines whether the supplied resource
+	 * is relevant and has been added.
+	 * 
+	 * @param res The resource
+	 * @param deltaFlags The flags
+	 * @return Whether the change is relevant
+	 */
+	protected boolean isAddition(IResource res, IResourceDelta delta) {
+		boolean ret=false;
+
+		// Are the changes associated with the contents?
+		if (res != null && res.getFileExtension() != null &&
+				(isNotationSupported(res.getFileExtension()) ||
+						isNotationSupported(res.getName())) &&
+				delta.getKind() == IResourceDelta.ADDED) {
+			ret = true;
+		}
+
+		return(ret);
+	}
+	
+	/**
+	 * This method determines whether the supplied resource
+	 * is relevant and has been removed.
+	 * 
+	 * @param res The resource
+	 * @param deltaFlags The flags
+	 * @return Whether the change is relevant
+	 */
+	protected boolean isDeletion(IResource res, IResourceDelta delta) {
+		boolean ret=false;
+
+		// Are the changes associated with the contents?
+		if (res != null && res.getFileExtension() != null &&
+				(isNotationSupported(res.getFileExtension()) ||
+						isNotationSupported(res.getName())) &&
+				delta.getKind() == IResourceDelta.REMOVED) {
+			ret = true;
+		}
+
+		return(ret);
+	}
+	
+	/**
+	 * This method applies the updated model, defined in the supplied input
+	 * stream, to the repository resource associated with the supplied reference.
+	 * 
+	 * @param ref The model reference
+	 * @param is The input stream
+	 * @throws java.io.IOException Failed to update the model
+	 */
+	@Override
+	protected void updateModel(ModelReference ref, java.io.InputStream is)
+										throws java.io.IOException {
+		IFile file=getFile(ref);
+		
+		/* GPB: 29/6/09 not sure should change file, as the contents
+		 * will be geared towards the located file.
+		 *
+		if (file == null) {
+			file = getGlobalFile(ref);
+		}
+		*/
+		
+		if (file != null) {
+			try {
+				file.setContents(is, true, true, new NullProgressMonitor());
+			} catch (CoreException e) {
+				throw new java.io.IOException("Failed to update file contents", e);
+			}
+			
+			is.close();
+		}
+	}
+
+	/**
+	 * This method returns the input stream for the source associated
+	 * with the model reference.
+	 * 
+	 * @param ref The model reference
+	 * @return The input stream
+	 */
+	public java.io.InputStream getInputStream(ModelReference ref) {
+		java.io.InputStream ret=null;
+		
+		IFile file=getFile(ref);
+		
+		if (file != null) {
+			try {
+				ret = file.getContents();
+			} catch(Exception e) {
+				// Ignore for now
+			}			
+		}
+		
+		return(ret);
+	}
+	
+	/**
+	 * This method returns the file for the global source associated
+	 * with the model reference.
+	 * 
+	 * @param ref The model reference
+	 * @return The file
+	 */
+	public static IFile getGlobalFile(ModelReference ref) {
+		IFile ret=null;
+		
+		Object obj=ref.getProperty(GLOBAL_RESOURCE_PROPERTY);
+		
+		if (obj instanceof IFile) {
+			ret = (IFile)obj;
+			
+		} else if (obj instanceof String) {
+			// Assume is URL for the project
+			IWorkspaceRoot root=
+					ResourcesPlugin.getWorkspace().getRoot();
+			
+			ret = root.getFile(new Path((String)obj));
+			
+			if (ret != null) {
+				// Replace with File object to avoid
+				// having to resolve again
+				ref.setProperty(GLOBAL_RESOURCE_PROPERTY, ret);
+			}
+		}
+		
+		return(ret);
+	}
+	
+	/**
+	 * This method returns a reference to a file associated with
+	 * the supplied model reference. The file may refer to an
+	 * existing resource, and this must be checked by the client.
+	 * 
+	 * @param ref The model reference
+	 * @return The created file, or null if no project information
+	 * 					was associated with the reference
+	 */
+	public static IFile createFile(ModelReference ref) {
+		IFile ret=null;
+		
+		if (ref.getProperty(PROJECT_PROPERTY) != null &&
+				ref.getNamespace() != null &&
+				ref.getLocalpart() != null) {
+	
+			// Need to locate resource based on namespace, localpart
+			// and notation
+			String path=ref.getNamespace();
+			
+			path = path.replace('.', java.io.File.separatorChar);
+			
+			path += java.io.File.separator+ref.getLocalpart();
+			
+			if (ref.getLocatedRole() != null) {
+				path += ModelReference.LOCATED_REFERENCE_SEPARATOR+
+							ref.getLocatedRole();
+			}
+			
+			path += "."+ref.getNotation();
+			
+			IProject project=getProject(ref);
+			
+			ret = project.getFile(path);
+		}
+		
+		return(ret);
+	}
+	
+	/**
+	 * This method returns the project associated with the
+	 * supplied object.
+	 * 
+	 * @param ref The model reference
+	 * @return The project, or null if not found
+	 */
+	public static IProject getProject(ModelReference ref) {
+		IProject ret=null;
+		
+		Object obj=ref.getProperty(PROJECT_PROPERTY);
+	
+		if (obj instanceof IProject) {
+			ret = (IProject)obj;
+		} else if (obj instanceof String) {
+			// Assume is URL for the project
+			IWorkspaceRoot root=
+					ResourcesPlugin.getWorkspace().getRoot();
+			
+			ret = root.getProject((String)obj);
+			
+			if (ret != null) {
+				// Replace with Project object to avoid
+				// having to resolve again
+				ref.setProperty(PROJECT_PROPERTY, ret);
+			}
+		}
+		
+		return(ret);
+	}
+	
+	/**
+	 * This method returns the file for the source associated
+	 * with the model reference.
+	 * 
+	 * @param ref The model reference
+	 * @return The file
+	 */
+	public static IFile getFile(ModelReference ref) {
+		IFile ret=null;
+		
+		Object obj=ref.getProperty(RESOURCE_PROPERTY);
+		
+		if (obj instanceof IFile) {
+			ret = (IFile)obj;
+			
+		} else if (obj instanceof String) {
+			// Assume is URL for the project
+			IWorkspaceRoot root=
+					ResourcesPlugin.getWorkspace().getRoot();
+			
+			ret = root.getFile(new Path((String)obj));
+			
+			if (ret != null) {
+				// Replace with File object to avoid
+				// having to resolve again
+				ref.setProperty(RESOURCE_PROPERTY, ret);
+			}
+		} else if (ref.hasProperty(PROJECT_PROPERTY) &&
+						ref.getNamespace() != null &&
+						ref.getLocalpart() != null) {
+			
+			// Need to locate resource based on namespace, localpart
+			// and notation
+			String path=ref.getNamespace();
+			
+			path = path.replace('.', java.io.File.separatorChar);
+			
+			path += java.io.File.separator+ref.getLocalpart();
+			
+			if (ref.getLocatedRole() != null) {
+				
+				// Check if sub definition path defined
+				for (int i=0; i < ref.getSubDefinitionPath().getPathElementCount(); i++) {
+					path += SUB_DEFN_PATH_SEPARATOR+ref.getSubDefinitionPath().getPathElement(i);
+				}
+				
+				path += ModelReference.LOCATED_REFERENCE_SEPARATOR+
+							ref.getLocatedRole();
+			}
+			
+			path += "."+ref.getNotation();
+			
+			IProject project=getProject(ref);
+			
+			ret = findFileInProjectPath(project, path);
+			
+			if (ret != null && ret.exists()) {
+				ref.setProperty(RESOURCE_PROPERTY, ret);
+			} else {
+				ret = null;
+			}
+		}
+		
+		return(ret);
+	}
+	
+	/**
+	 * This method sets the file as the resource associated
+	 * with the model reference.
+	 * 
+	 * @param ref The reference
+	 * @param file The file
+	 */
+	public static void setFile(ModelReference ref, IFile file) {
+		ref.setProperty(RESOURCE_PROPERTY, file);
+	}
+	
+	protected static IFile findFileInProjectPath(IProject project, String path) {
+		IFile ret=null;
+		
+		// Find project associated with the reference
+		if (project != null) {
+			ret = project.getFile(path);
+			
+			if (ret == null || ret.exists() == false) {
+				
+				ret = null;
+				
+				// Check related projects
+				IJavaProject jproject=JavaCore.create(project); 
+				
+				try {
+					// Check if a Java project
+					if (project.hasNature(JavaCore.NATURE_ID)) {
+						String projects[]=jproject.getRequiredProjectNames();
+						
+						for (int i=0; ret == null && i < projects.length; i++) {
+							IProject dependent=
+								org.eclipse.core.resources.ResourcesPlugin.getWorkspace().
+										getRoot().getProject(projects[i]);
+							
+							ret = findFileInProjectPath(dependent, path);
+	
+							logger.info("Checking project '"+projects[i]+"' for: "+path);
+						}
+					}
+				} catch(Exception e) {
+					logger.severe("Failed to check dependent projects: "+e);
+				}
+			}
+		}
+		
+		return(ret);
+	}
+	
+	public static ModelReference createReference(IResource res) {
+		ModelReference ret=null;
+		
+		// Identify the model reference from the resource
+		org.eclipse.core.runtime.IPath path=res.getFullPath();
+		org.eclipse.core.runtime.IPath fqnPath=path.removeFirstSegments(1);
+		
+		String[] segments=fqnPath.segments();
+		
+		String local=segments[segments.length-1];
+		
+		String namespace="";
+		
+		for (int i=0; i < segments.length-1; i++) {
+			if (i > 0) {
+				namespace += ".";
+			}
+			namespace += segments[i];
+		}
+		
+		String notation=null;
+		String located=null;
+		String[] subdefnpath=null;
+		
+		if (local != null) {
+			int nindex=local.lastIndexOf('.');
+			if (nindex != -1) {
+				notation = local.substring(nindex+1);
+				local = local.substring(0, nindex);
+
+				int pindex=local.lastIndexOf(ModelReference.LOCATED_REFERENCE_SEPARATOR);
+				if (pindex != -1) {
+					located = local.substring(pindex+1);
+					local = local.substring(0, pindex);
+				}
+				
+				if (located != null && local.indexOf(SUB_DEFN_PATH_SEPARATOR) != -1) {
+					
+					// Retrieve sub definition path
+					subdefnpath = local.split("\\"+SUB_DEFN_PATH_SEPARATOR);
+					
+					local = subdefnpath[0];
+				}
+				
+				// Check if notation is supported
+				if (isNotationSupported(notation) == false) {
+					notation = local+"."+notation;
+					
+					if (isNotationSupported(notation) == false) {
+						// TODO: Report error?
+					}
+				}
+			}
+		}
+		
+		ret = new ModelReference(namespace, local, located, notation);
+		
+		if (subdefnpath != null) {
+			for (int i=1; i < subdefnpath.length; i++) {
+				ret.getSubDefinitionPath().addPathElement(subdefnpath[i]);
+			}
+		}
+		
+		if (res.exists()) {
+			ret.setProperty(RESOURCE_PROPERTY, res);			
+		}
+		
+		ret.setProperty(PROJECT_PROPERTY, res.getProject());
+		
+		return(ret);
+	}
+
+	/**
+	 * This method handles an added resource.
+	 * 
+	 * @param ref The resource
+	 */
+	@Override
+	protected void handleResourceAdded(ModelReference ref) {
+		super.handleResourceAdded(ref);
+		
+		synchronized(m_updateModelNames) {
+			
+			if (m_updateModelNames.contains(ref)) {
+				
+				// Need to update the name in this model
+				final ModelReference currentRef=ref;
+				
+				Job job=new Job("Update Renamed Description") {
+					
+			    	public IStatus run(IProgressMonitor mon) {
+						try {
+							java.util.List<ModelInfo> models=getModels(currentRef, new DefaultModelListener());
+	
+							for (int i=0; i < models.size(); i++) {
+								//Model model=models.get(i).getModel();
+
+								logger.warning("TO BE IMPLEMENTED");
+								
+								/*
+								if (model != null && model.getModelName() != null) {
+									IFile file=getFile(models.get(i).getSource());
+									java.io.InputStream is=file.getContents();
+									
+									byte[] b=new byte[is.available()];
+									is.read(b);
+									
+									StringBuffer buf=new StringBuffer();
+									buf.append(new String(b));
+									
+									String str=currentRef.getLocalpart();
+									
+									if (currentRef.getLocatedRole() != null) {
+										str += ModelReference.LOCATED_REFERENCE_SEPARATOR+
+													currentRef.getLocatedRole();
+									}
+									
+									buf.replace(model.getModelName().getSource().getStartPosition(),
+											model.getModelName().getSource().getEndPosition(),
+													str);
+									
+									file.setContents(new java.io.ByteArrayInputStream(
+											buf.toString().getBytes()), true, true, null);
+								}
+								*/
+							}
+															
+						} catch(Exception e) {
+							// Ignore for now
+							e.printStackTrace();
+						}
+									
+						logger.info("About to remove update model name");
+						synchronized(m_updateModelNames) {
+							m_updateModelNames.remove(currentRef);
+						}
+						logger.info("Removed update model name");
+					
+						return(Status.OK_STATUS);
+			    	}
+				};
+				
+				job.schedule();
+			}
+		}
+		
+		if (m_changedModelName != null) {
+				
+			// Need to update the name in this model
+			final ModelReference currentRef=ref;
+			
+			Job job=new Job("Update Changed Description") {
+				
+		    	public IStatus run(IProgressMonitor mon) {
+					try {
+						java.util.List<ModelInfo> models=getModels(currentRef, new DefaultModelListener());
+						
+						for (int i=0; i < models.size(); i++) {
+							//Model model=models.get(i).getModel();
+							
+							logger.warning("TO BE IMPLEMENTED");
+
+							/*
+							if (model != null && model.getModelName() != null &&
+									model.getModelName().getName() != null &&
+									model.getModelName().getName().equals(m_changedModelName.getLocalpart())) {
+								m_changedModelName = null;
+								
+								IFile file=getFile(models.get(i).getSource());
+								java.io.InputStream is=file.getContents();
+								
+								byte[] b=new byte[is.available()];
+								is.read(b);
+								
+								StringBuffer buf=new StringBuffer();
+								buf.append(new String(b));
+								
+								String str=currentRef.getLocalpart();
+								
+								if (currentRef.getLocatedRole() != null) {
+									str += ModelReference.LOCATED_REFERENCE_SEPARATOR+
+												currentRef.getLocatedRole();
+								}
+								
+								buf.replace(model.getModelName().getSource().getStartPosition(),
+										model.getModelName().getSource().getEndPosition(),
+												str);
+								
+								// Update namespace
+								int startpos=0;
+								int endpos=0;
+								
+								if (model.getNamespace() != null) {
+									startpos = model.getNamespace().getSource().getStartPosition();
+									endpos = model.getNamespace().getSource().getEndPosition();
+								}
+								
+								str = "namespace "+currentRef.getNamespace();
+								
+								buf.replace(startpos, endpos, str);
+	
+								file.setContents(new java.io.ByteArrayInputStream(
+										buf.toString().getBytes()), true, true, null);
+							}
+							*/
+						}
+					} catch(Exception e) {
+						// Ignore for now
+						e.printStackTrace();
+					}
+				
+					return(Status.OK_STATUS);
+		    	}
+			};
+			
+			job.schedule();
+		}
+	}
+	
+	/**
+	 * This method indicates when the resource associated
+	 * with the supplied reference is added, the model name
+	 * should be updated to be in sync with the file name.
+	 * 
+	 * @param ref The model reference
+	 */
+	public static void changeModelName(ModelReference ref) {
+		m_changedModelName = ref;
+	}
+	
+	private static Logger logger = Logger.getLogger("org.scribble.osgi.model");
+	
+	private static final String PROJECT_PROPERTY = "project";
+	private static final String RESOURCE_PROPERTY = "resource";
+	private static final String GLOBAL_RESOURCE_PROPERTY = "globalResource";
+	
+	private static java.util.List<org.scribble.model.Notation> m_notations=new java.util.Vector<org.scribble.model.Notation>();
+	private static java.util.List<ModelReference> m_updateModelNames=new java.util.Vector<ModelReference>();
+	private static ModelReference m_changedModelName=null;	
+	private static boolean m_initialized=false;
+	
+	private org.scribble.model.admin.ModelChangeListener m_modelChangeListener=null;
+
+	static {
+		// Register the notations to be supported
+		java.util.List<Object> notations=
+			org.scribble.extensions.RegistryFactory.getRegistry().getExtensions(
+						org.scribble.model.Notation.class, null);
+		
+		for (int i=0; i < notations.size(); i++) {
+			m_notations.add((org.scribble.model.Notation)notations.get(i));
+		}
+	}
+	
+	/**
+     * This class implements the Scribble validation task.
+     */
+    static class ValidationJob extends Job {
+    	
+    	/**
+    	 * This is the constructor for the Scribble validation job.
+    	 * 
+    	 * @param ref The model reference
+    	 */
+    	public ValidationJob(ModelReference ref) {
+    		super("Scribble Validation");
+    		
+    		m_reference = ref;
+    		
+    		if (OSGIModelRepository.getFile(m_reference) == null) {
+    			logger.severe("Cannot validate model reference without associated resource: "+
+    					m_reference);
+    		}
+    	}
+    	
+    	/**
+    	 * This method runs the validation task.
+    	 * 
+    	 * @param mon The progress monitor
+    	 * @return The status of the job
+    	 */
+    	public IStatus run(IProgressMonitor mon) {
+    		
+    		OSGIModelListener modelListener=
+    					new OSGIModelListener(m_reference);
+    		
+			org.scribble.model.admin.ModelRepository mrep=
+				(org.scribble.model.admin.ModelRepository)
+				org.scribble.extensions.RegistryFactory.getRegistry().getExtension(
+						org.scribble.model.admin.ModelRepository.class, null);
+		
+			java.util.List<org.scribble.model.admin.ModelInfo> models=
+					mrep.getModels(m_reference,	modelListener);
+			
+			boolean f_validated=false;
+			
+			for (int i=0; i < models.size(); i++) {
+				// Invoke validation
+				org.scribble.validation.Validator validator=
+					(org.scribble.validation.Validator)
+					org.scribble.extensions.RegistryFactory.getRegistry().getExtension(
+							org.scribble.validation.Validator.class, null);
+				
+				// Must use the source reference, as comparison between
+				// models will only be done if the source reference can
+				// access the resources associated with the other models
+				// being compared with. If the source reference is not
+				// supplied, then access to these other models will be
+				// restricted, and therefore no comparisons performed.
+				if (validator.validate(models.get(i).getModel(),
+							models.get(i).getSource(), modelListener)) {
+					f_validated = true;
+				}
+			}
+			
+			if (f_validated) {
+				modelListener.finished();
+			}
+			
+			return(Status.OK_STATUS);
+		}
+		
+    	private ModelReference m_reference=null;
+    }	
+}

Added: tools/eclipse/trunk/plugins/org.scribble.eclipse/src/java/org/scribble/eclipse/model/admin/OSGIModelResource.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.eclipse/src/java/org/scribble/eclipse/model/admin/OSGIModelResource.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.eclipse/src/java/org/scribble/eclipse/model/admin/OSGIModelResource.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,150 @@
+/*
+ * Copyright 2007-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 14 Feb 2008 : Initial version created by gary
+ */
+package org.scribble.eclipse.model.admin;
+
+import java.util.logging.Logger;
+
+import org.scribble.model.ModelReference;
+import org.scribble.model.admin.ModelResource;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IFile;
+
+/**
+ * This class implements the ModelResource interface for
+ * OSGI based resources.
+ */
+public class OSGIModelResource implements ModelResource {
+
+	/**
+	 * This constructor is initialized with the Eclipse
+	 * file resource.
+	 * 
+	 * @param file The file
+	 */
+	public OSGIModelResource(IFile file) {
+		m_reference = new ModelReference(file.getFileExtension());
+		
+		OSGIModelRepository.setFile(m_reference,
+						file);
+	}
+	
+	/**
+	 * This constructor is initialised with the reference
+	 * that it represents.
+	 * 
+	 * @param ref The reference
+	 */
+	public OSGIModelResource(ModelReference ref) {
+		m_reference = ref;
+	}
+	
+	/**
+	 * This method returns the URI of the model resource.
+	 * 
+	 * @return The URI
+	 */
+	public java.net.URI getURI() {
+		java.net.URI ret=null;
+		
+		IResource thisRes=OSGIModelRepository.getFile(m_reference);
+		
+		if (thisRes != null) {
+			ret = thisRes.getLocationURI();
+		}
+
+		return(ret);
+	}
+	
+	/**
+	 * This method returns the contents associated with
+	 * the model resource.
+	 * 
+	 * @return The contents
+	 * @exception IOException Failed to obtain content
+	 */
+	public java.io.InputStream getContents() throws java.io.IOException {
+		java.io.InputStream ret=null;
+		
+		IFile thisRes=OSGIModelRepository.getFile(m_reference);
+	
+		try {
+			ret = ((IFile)thisRes).getContents();
+		} catch(Exception e) {
+			throw new java.io.IOException("Failed to obtain contents: "+e);
+		}
+	
+		return(ret);
+	}
+	
+	/**
+	 * This method returns the model reference.
+	 * 
+	 * @return The model reference
+	 */
+	public ModelReference getReference() {
+		return(m_reference);
+	}
+
+	public boolean equals(Object obj) {
+		boolean ret=false;
+		
+		if (obj instanceof ModelResource) {
+			ModelReference otherRef=((ModelResource)obj).getReference();
+			
+			if (otherRef != null) {
+				// Get the OSGI resource from the references
+				IResource otherRes=OSGIModelRepository.getFile(otherRef);
+				IResource thisRes=OSGIModelRepository.getFile(m_reference);
+				
+				logger.finest("EQUAL: "+otherRef+" against "+m_reference);
+				logger.finest("EQUAL: "+otherRes+" against "+thisRes);
+				
+				if (otherRes != null && thisRes != null) {
+					ret = otherRes.equals(thisRes);
+					logger.finest("EQUAL RES: "+ret);
+				} else {
+					ret = otherRef.equals(m_reference);
+					logger.finest("EQUAL REF: "+ret);
+				}
+			}
+		} else if (obj instanceof ModelReference) {
+			ModelReference otherRef=(ModelReference)obj;
+			
+			ret = otherRef.equals(m_reference);
+			
+			logger.info(">>>> CHECK EQUAL: "+otherRef+" against "+m_reference+" ret="+ret);
+		}
+		
+		return(ret);
+	}
+	
+	public String toString() {
+		IResource thisRes=OSGIModelRepository.getFile(m_reference);
+		return("["+m_reference+" resource="+thisRes+"]");
+	}
+	
+	public int hashCode() {
+		return(m_reference.hashCode());
+	}
+	
+	private static Logger logger = Logger.getLogger("org.scribble.osgi.model");
+
+	private ModelReference m_reference=null;
+}

Added: tools/eclipse/trunk/plugins/org.scribble.eclipse/src/java/org/scribble/eclipse/model/admin/ReValidationDependencyHandler.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.eclipse/src/java/org/scribble/eclipse/model/admin/ReValidationDependencyHandler.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.eclipse/src/java/org/scribble/eclipse/model/admin/ReValidationDependencyHandler.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,119 @@
+/*
+ * Copyright 2007 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 8 Nov 2007 : Initial version created by gary
+ */
+package org.scribble.eclipse.model.admin;
+
+import java.util.logging.Logger;
+
+import org.scribble.extensions.RegistryFactory;
+import org.scribble.extensions.RegistryInfo;
+import org.scribble.model.*;
+import org.scribble.model.admin.DependencyHandler;
+
+/**
+ * This class provides an implementation of the dependency handler
+ * interface for re-validating models that may be affected by
+ * added, updated or removed models.
+ */
+ at RegistryInfo(extension=DependencyHandler.class)
+public class ReValidationDependencyHandler implements DependencyHandler {
+
+	/**
+	 * This method indicates that a model that the 'dependent'
+	 * model references has been added.
+	 * 
+	 * @param dependent The dependent model
+	 * @param dependency The dependency
+	 */
+	public void dependencyAdded(ModelReference dependent,
+			ModelReference dependency) {
+		reValidate(dependent);
+	}
+
+	/**
+	 * This method indicates that a model that the 'dependent'
+	 * model references has been updated.
+	 * 
+	 * @param dependent The dependent model
+	 * @param dependency The dependency
+	 */
+	public void dependencyUpdated(ModelReference dependent,
+			ModelReference dependency) {		
+		reValidate(dependent);
+	}
+
+	/**
+	 * This method indicates that a model that the 'dependent'
+	 * model references has been removed.
+	 * 
+	 * @param dependent The dependent model
+	 * @param dependency The dependency
+	 */
+	public void dependencyRemoved(ModelReference dependent,
+			ModelReference dependency) {
+		reValidate(dependent);
+	}
+
+	/**
+	 * This method revalidates the model associated with the
+	 * supplied reference.
+	 * 
+	 * @param ref The model reference
+	 */
+	protected void reValidate(ModelReference ref) {
+		
+		if (OSGIModelRepository.isInitialized()) {
+			logger.info("ReValidate "+ref);
+			
+			OSGIModelListener modelListener=new OSGIModelListener(ref);
+			
+			org.scribble.model.admin.ModelRepository mrep=
+				(org.scribble.model.admin.ModelRepository)
+				RegistryFactory.getRegistry().getExtension(
+						org.scribble.model.admin.ModelRepository.class, null);
+		
+			java.util.List<org.scribble.model.admin.ModelInfo> models=
+						mrep.getModels(ref,	modelListener);
+			
+			org.scribble.validation.Validator validator=
+				(org.scribble.validation.Validator)
+				RegistryFactory.getRegistry().getExtension(
+						org.scribble.validation.Validator.class, null);
+			
+			boolean f_validated=false;
+			
+			for (int i=0; i < models.size(); i++) {
+
+				// Invoke validation - need to supply source
+				// model reference as explained in the
+				// OSGIModelRepository ValidationJob
+				if (validator.validate(models.get(i).getModel(),
+							models.get(i).getSource(), modelListener)) {
+					f_validated = true;
+				}
+			}
+			
+			if (f_validated) {
+				modelListener.finished();
+			}
+		}
+	}
+	
+	private static Logger logger = Logger.getLogger("org.scribble.eclipse.model.admin");	
+}

Added: tools/eclipse/trunk/plugins/org.scribble.eclipse/src/java/org/scribble/eclipse/model/images/ScribbleImages.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.eclipse/src/java/org/scribble/eclipse/model/images/ScribbleImages.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.eclipse/src/java/org/scribble/eclipse/model/images/ScribbleImages.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,71 @@
+/*
+ * Copyright 2007-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 21 Feb 2008 : Initial version created by gary
+ */
+package org.scribble.eclipse.model.images;
+
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.jface.resource.ImageDescriptor;
+
+/**
+ * This class provides access to images configured within the
+ * environment.
+ */
+public class ScribbleImages {
+
+	/**
+     * This method returns the image associated with the
+     * supplied name.
+     * 
+     * @param name The name
+     * @return The image
+     */
+    public static Image getImage(String name) {
+    	Image ret=null;
+    	
+    	// Make sure the image descriptor is registered
+    	getImageDescriptor(name);
+    	
+    	ret = m_registry.get(name);
+    	
+    	return(ret);
+    }
+    
+    /**
+     * This method returns the image descriptor associated with the
+     * supplied name.
+     * 
+     * @param name The name
+     * @return The descriptor
+     */
+    public static ImageDescriptor getImageDescriptor(String name) {
+    	ImageDescriptor ret=null;
+    	
+    	if ((ret = m_registry.getDescriptor(name)) == null) {
+    	    ret = ImageDescriptor.createFromFile(ScribbleImages.class,
+    	    				name);
+    	    
+    	    m_registry.put(name, ret);
+    	}
+    	
+    	return(ret);
+    }
+
+    private static org.eclipse.jface.resource.ImageRegistry m_registry=
+    		new org.eclipse.jface.resource.ImageRegistry();
+}

Added: tools/eclipse/trunk/plugins/org.scribble.eclipse/src/java/org/scribble/eclipse/model/images/activity.png
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.eclipse/src/java/org/scribble/eclipse/model/images/activity.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.eclipse/src/java/org/scribble/eclipse/model/images/declaration.png
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.eclipse/src/java/org/scribble/eclipse/model/images/declaration.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.eclipse/src/java/org/scribble/eclipse/model/images/import.png
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.eclipse/src/java/org/scribble/eclipse/model/images/import.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.eclipse/src/java/org/scribble/eclipse/model/images/namespace.png
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.eclipse/src/java/org/scribble/eclipse/model/images/namespace.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.eclipse/src/java/org/scribble/eclipse/model/images/role.png
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.eclipse/src/java/org/scribble/eclipse/model/images/role.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.eclipse/src/java/org/scribble/eclipse/model/outliner/AbstractModelOutlinerRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.eclipse/src/java/org/scribble/eclipse/model/outliner/AbstractModelOutlinerRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.eclipse/src/java/org/scribble/eclipse/model/outliner/AbstractModelOutlinerRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,270 @@
+/*
+ * Copyright 2007-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 21 Feb 2008 : Initial version created by gary
+ */
+package org.scribble.eclipse.model.outliner;
+
+import org.eclipse.swt.graphics.Image;
+import org.scribble.model.*;
+
+/**
+ * This is the abstract base implementation of the ModelOutliner
+ * interface, responsible for the model objects in the generic
+ * Scribble model package.
+ */
+public class AbstractModelOutlinerRule implements OutlinerRule {
+
+	/**
+	 * This method determines whether the outliner rules is
+	 * appropriate to process the supplied element.
+	 * 
+	 * @param element The element
+	 * @return Whether the outliner rule can process the
+	 * 						supplied element
+	 */
+	public boolean isSupported(Object element) {
+		boolean ret=false;
+		
+		if (element.getClass() == org.scribble.model.Namespace.class ||
+				element.getClass() == org.scribble.model.Import.class ||
+				element.getClass() == org.scribble.model.Definition.class ||
+				element instanceof java.util.List ||
+				element.getClass() == org.scribble.model.Block.class ||
+				element instanceof Interaction ||
+				element instanceof RoleList ||
+				element instanceof Role) {
+			ret = true;
+		}
+		
+		return(ret);
+	}
+	
+	/**
+	 * This method returns the label to be displayed
+	 * for the supplied object.
+	 * 
+	 * @param obj The object
+	 * @return The label
+	 */
+	public String getLabel(Object obj) {
+		String ret=null;
+		
+		if (obj instanceof org.scribble.model.Namespace) {
+			ret = ((org.scribble.model.Namespace)obj).getName();
+			
+		} else if (obj instanceof org.scribble.model.Import) {
+			ret = ((org.scribble.model.Import)obj).getName();
+		
+		} else if (obj instanceof org.scribble.model.RoleList) {
+			ret = "Roles";
+		
+		} else if (obj instanceof org.scribble.model.Role) {
+			ret = ((org.scribble.model.Role)obj).getName();
+		
+		} else if (obj instanceof org.scribble.model.Interaction) {
+			Interaction interaction=(Interaction)obj;
+			
+			ret = "";
+			
+			if (interaction.getFromRole() != null) {
+				ret += interaction.getFromRole().getName();
+			}
+			
+			ret += "->";
+			
+			if (interaction.getToRole() != null) {
+				ret += interaction.getToRole().getName();
+			}
+			
+			ret += " : ";
+			
+			if (interaction.getMessageSignature() != null) {
+				
+				if (interaction.getMessageSignature().getOperation() != null) {
+					ret += interaction.getMessageSignature().getOperation();
+					
+					ret += "(";
+				}
+				
+				for (int i=0; i < interaction.getMessageSignature().getTypes().size(); i++) {
+					if (i > 0) {
+						ret += ",";
+					}
+					ret += interaction.getMessageSignature().getTypes().get(i).getAlias();
+				}
+				
+				if (interaction.getMessageSignature().getOperation() != null) {
+					ret += ")";
+				}
+			}
+		
+		} else if (obj instanceof ContainmentList) {
+			Class<?> type=((ContainmentList<?>)obj).getType();
+			
+			if (type != null) {
+				ret = type.getName();
+			
+				int index=ret.lastIndexOf('.');
+				if (index != -1) {
+					ret = ret.substring(index+1);
+				}
+			}
+			
+		} else if (obj instanceof java.util.List &&
+				((java.util.List<?>)obj).size() > 0) {
+			Class<?> cls=((java.util.List<?>)obj).get(0).getClass();
+			
+			if (cls.getInterfaces().length > 0) {
+				ret = cls.getInterfaces()[0].getName();
+			} else {
+				ret = cls.getName();
+			}
+			
+			int index=ret.lastIndexOf('.');
+			if (index != -1) {
+				ret = ret.substring(index+1);
+			}
+		}
+		
+		return(ret);
+	}
+	
+	/**
+	 * This method returns an optional image associated with
+	 * the supplied object.
+	 * 
+	 * @param obj The object
+	 * @return The image, or null if no image to display
+	 */
+	public org.eclipse.swt.graphics.Image getImage(Object obj) {
+		Image ret=null;
+
+		if (obj instanceof org.scribble.model.Namespace) {
+			ret = org.scribble.eclipse.model.images.ScribbleImages.getImage("namespace.png");
+		} else if (obj instanceof org.scribble.model.Import) {
+			ret = org.scribble.eclipse.model.images.ScribbleImages.getImage("import.png");
+		} else if (obj instanceof org.scribble.model.Role ||
+				obj instanceof org.scribble.model.RoleList) {
+			ret = org.scribble.eclipse.model.images.ScribbleImages.getImage("role.png");
+		} else if (obj instanceof java.util.List &&
+				((java.util.List<?>)obj).size() > 0) {
+			ret = getImage(((java.util.List<?>)obj).get(0));
+		}
+		
+		return(ret);		
+	}
+	
+	/**
+	 * This method returns the list of children associated
+	 * with the supplied object.
+	 * 
+	 * @param obj The object
+	 * @return The list of child objects
+	 */
+	public java.util.List<Object> getChildren(Object obj) {
+		java.util.List<Object> ret=null;
+		
+		if (obj instanceof Definition) {
+			Definition defn=(Definition)obj;
+			
+			ret = getChildren(defn.getBlock());
+			
+		} else if (obj instanceof Block) {
+			ret = new java.util.Vector<Object>(((Block)obj).getContents());
+			
+		} else if (obj instanceof MultiPathBehaviour) {
+			ret = new java.util.Vector<Object>(((MultiPathBehaviour)obj).getPaths());
+			
+		} else if (obj instanceof RoleList) {
+			ret = new java.util.Vector<Object>(((RoleList)obj).getRoles());
+			
+		} else if (obj instanceof java.util.List) {
+			ret = new java.util.Vector<Object>();
+			
+			ret.addAll((java.util.List<?>)obj);
+		}
+		
+		return(ret);		
+	}
+	
+	/**
+	 * This method returns the children for the model.
+	 * 
+	 * @param model The model
+	 * @return The list of children
+	 */
+	protected java.util.List<Object> getModelChildren(org.scribble.model.Model model) {
+		java.util.List<Object> ret=new java.util.Vector<Object>();
+					
+		if (model.getNamespace() != null) {
+			ret.add(model.getNamespace());
+		}
+		
+		ret.add(model.getImports());
+		
+		return(ret);			
+	}
+	
+	/**
+	 * This method determines whether the supplied object has
+	 * children.
+	 * 
+	 * @param obj The object
+	 * @return Whether the object has children
+	 */
+	public boolean hasChildren(Object obj) {
+		boolean ret=false;
+		
+		if (obj instanceof Definition ||
+				obj instanceof Block ||
+				obj instanceof RoleList ||
+				obj instanceof MultiPathBehaviour ||
+				obj instanceof java.util.List) {
+			ret = true;
+		}
+		
+		return(ret);
+	}
+	
+	/**
+	 * This method returns the textual description associated
+	 * with the supplied reference.
+	 * 
+	 * @param ref The reference
+	 * @return The description
+	 */
+	protected String getReferenceDescription(ModelReference ref) {
+		String ret="";
+		
+		if (ref.getNamespace() != null) {
+			ret += ref.getNamespace();
+		}
+		
+		if (ret.length() > 0) {
+			ret += ".";
+		}
+		
+		ret += ref.getLocalpart();
+		
+		if (ref.getLocatedRole() != null) {
+			ret += "@"+ref.getLocatedRole();
+		}
+		
+		return(ret);
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.eclipse/src/java/org/scribble/eclipse/model/outliner/DefaultModelOutliner.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.eclipse/src/java/org/scribble/eclipse/model/outliner/DefaultModelOutliner.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.eclipse/src/java/org/scribble/eclipse/model/outliner/DefaultModelOutliner.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,175 @@
+/*
+ * Copyright 2007-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 21 Feb 2008 : Initial version created by gary
+ */
+package org.scribble.eclipse.model.outliner;
+
+import org.eclipse.swt.graphics.Image;
+import org.scribble.extensions.RegistryInfo;
+import org.scribble.model.*;
+
+/**
+ * This is the abstract base implementation of the ModelOutliner
+ * interface, responsible for the model objects in the generic
+ * Scribble model package.
+ */
+ at RegistryInfo(extension=ModelOutliner.class,isService=true)
+public class DefaultModelOutliner implements ModelOutliner {
+
+	private static final String NO_NOTATION = "";
+
+	/**
+	 * This method returns the label to be displayed
+	 * for the supplied object.
+	 * 
+	 * @param ref The model reference
+	 * @param obj The object
+	 * @return The label
+	 */
+	public String getLabel(ModelReference ref, Object obj) {
+		String ret=null;
+		
+		java.util.List<Object> rules=getRules(ref);
+		
+		for (int i=0; ret == null && i < rules.size(); i++) {
+			if (((org.scribble.eclipse.model.outliner.OutlinerRule)
+					rules.get(i)).isSupported(obj)) {
+				ret = ((org.scribble.eclipse.model.outliner.OutlinerRule)
+						rules.get(i)).getLabel(obj);
+			}
+		}
+		
+		if (ret == null) {
+			
+			if (obj instanceof org.scribble.model.Declaration) {
+				ret = ((org.scribble.model.Declaration)obj).getName();
+			}
+		}
+		
+		return(ret);
+	}
+	
+	protected synchronized java.util.List<Object> getRules(ModelReference ref) {
+		java.util.List<Object> ret=null;
+		
+		String notation=null;
+		String key=null;
+		
+		if (ref != null) {
+			notation = ref.getNotation();
+		}
+		
+		if (notation == null) {
+			key = NO_NOTATION;
+		} else {
+			key = notation;
+		}
+		
+		ret = m_rules.get(key);
+		
+		if (ret == null) {
+			ret = org.scribble.extensions.RegistryFactory.getRegistry().getExtensions(
+						org.scribble.eclipse.model.outliner.OutlinerRule.class, notation);
+			
+			if (ret != null) {
+				m_rules.put(key, ret);
+			}
+		}
+		
+		return(ret);
+	}
+	
+	/**
+	 * This method returns an optional image associated with
+	 * the supplied object.
+	 * 
+	 * @param ref The model reference
+	 * @param obj The object
+	 * @return The image, or null if no image to display
+	 */
+	public org.eclipse.swt.graphics.Image getImage(ModelReference ref, Object obj) {
+		Image ret=null;
+
+		java.util.List<Object> rules=getRules(ref);
+		
+		for (int i=0; ret == null && i < rules.size(); i++) {
+			ret = ((org.scribble.eclipse.model.outliner.OutlinerRule)
+						rules.get(i)).getImage(obj);
+		}
+		
+		if (ret == null) {
+			
+			if (obj instanceof org.scribble.model.Declaration) {
+				ret = org.scribble.eclipse.model.images.ScribbleImages.getImage("declaration.png");
+			} else if (obj instanceof org.scribble.model.Activity) {
+				ret = org.scribble.eclipse.model.images.ScribbleImages.getImage("activity.png");
+			}
+		}
+		
+		return(ret);		
+	}
+	
+	/**
+	 * This method returns the list of children associated
+	 * with the supplied object.
+	 * 
+	 * @param ref The model reference
+	 * @param obj The object
+	 * @return The list of child objects
+	 */
+	public java.util.List<Object> getChildren(ModelReference ref, Object obj) {
+		java.util.List<Object> ret=null;
+		
+		java.util.List<Object> rules=getRules(ref);
+		
+		for (int i=0; ret == null && i < rules.size(); i++) {
+			ret = ((org.scribble.eclipse.model.outliner.OutlinerRule)
+						rules.get(i)).getChildren(obj);
+		}
+		
+		if (ret == null) {
+			ret = new java.util.Vector<Object>();
+		}
+		
+		return(ret);		
+	}
+	
+	/**
+	 * This method determines whether the supplied object has
+	 * children.
+	 * 
+	 * @param ref The model reference
+	 * @param obj The object
+	 * @return Whether the object has children
+	 */
+	public boolean hasChildren(ModelReference ref, Object obj) {
+		boolean ret=false;
+		
+		java.util.List<Object> rules=getRules(ref);
+		
+		for (int i=0; ret == false && i < rules.size(); i++) {
+			ret = ((org.scribble.eclipse.model.outliner.OutlinerRule)
+						rules.get(i)).hasChildren(obj);
+		}
+		
+		return(ret);
+	}
+	
+	private java.util.Map<String,java.util.List<Object>> m_rules=
+			new java.util.Hashtable<String,java.util.List<Object>>();
+}

Added: tools/eclipse/trunk/plugins/org.scribble.eclipse/src/java/org/scribble/eclipse/model/outliner/ModelOutliner.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.eclipse/src/java/org/scribble/eclipse/model/outliner/ModelOutliner.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.eclipse/src/java/org/scribble/eclipse/model/outliner/ModelOutliner.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,70 @@
+/*
+ * Copyright 2007-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 21 Feb 2008 : Initial version created by gary
+ */
+package org.scribble.eclipse.model.outliner;
+
+import org.scribble.model.*;
+
+/**
+ * This interface represents the component responsible for providing
+ * outline information related to model components.
+ */
+public interface ModelOutliner {
+
+	/**
+	 * This method returns the label to be displayed
+	 * for the supplied object.
+	 * 
+	 * @param ref The model reference
+	 * @param obj The object
+	 * @return The label
+	 */
+	public String getLabel(ModelReference ref, Object obj);
+	
+	/**
+	 * This method returns an optional image associated with
+	 * the supplied object.
+	 * 
+	 * @param ref The model reference
+	 * @param obj The object
+	 * @return The image, or null if no image to display
+	 */
+	public org.eclipse.swt.graphics.Image getImage(ModelReference ref, Object obj);
+	
+	/**
+	 * This method returns the list of children associated
+	 * with the supplied object.
+	 * 
+	 * @param ref The model reference
+	 * @param obj The object
+	 * @return The list of child objects
+	 */
+	public java.util.List<Object> getChildren(ModelReference ref, Object obj);
+	
+	/**
+	 * This method determines whether the supplied object has
+	 * children.
+	 * 
+	 * @param ref The model reference
+	 * @param obj The object
+	 * @return Whether the object has children
+	 */
+	public boolean hasChildren(ModelReference ref, Object obj);
+	
+}

Added: tools/eclipse/trunk/plugins/org.scribble.eclipse/src/java/org/scribble/eclipse/model/outliner/OutlinerRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.eclipse/src/java/org/scribble/eclipse/model/outliner/OutlinerRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.eclipse/src/java/org/scribble/eclipse/model/outliner/OutlinerRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,74 @@
+/*
+ * Copyright 2007-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 22 Feb 2008 : Initial version created by gary
+ */
+package org.scribble.eclipse.model.outliner;
+
+/**
+ * This interface represents a rule that is applied to a model
+ * element to provide outline information.
+ */
+public interface OutlinerRule {
+
+	/**
+	 * This method determines whether the outliner rules is
+	 * appropriate to process the supplied element.
+	 * 
+	 * @param element The element
+	 * @return Whether the outliner rule can process the
+	 * 						supplied element
+	 */
+	public boolean isSupported(Object element);
+
+	/**
+	 * This method returns the label to be displayed
+	 * for the supplied object.
+	 * 
+	 * @param obj The object
+	 * @return The label
+	 */
+	public String getLabel(Object obj);
+	
+	/**
+	 * This method returns an optional image associated with
+	 * the supplied object.
+	 * 
+	 * @param obj The object
+	 * @return The image, or null if no image to display
+	 */
+	public org.eclipse.swt.graphics.Image getImage(Object obj);
+	
+	/**
+	 * This method returns the list of children associated
+	 * with the supplied object.
+	 * 
+	 * @param obj The object
+	 * @return The list of child objects
+	 */
+	public java.util.List<Object> getChildren(Object obj);
+
+	/**
+	 * This method determines whether the supplied object has
+	 * children.
+	 * 
+	 * @param obj The object
+	 * @return Whether the object has children
+	 */
+	public boolean hasChildren(Object obj);
+	
+}

Added: tools/eclipse/trunk/plugins/org.scribble.eclipse/src/java/org/scribble/eclipse/osgi/Activator.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.eclipse/src/java/org/scribble/eclipse/osgi/Activator.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.eclipse/src/java/org/scribble/eclipse/osgi/Activator.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,100 @@
+/*
+ * Copyright 2007-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 26 April 2008 : Initial version created by gary
+ */
+package org.scribble.eclipse.osgi;
+
+import java.util.logging.Logger;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Plugin;
+import org.eclipse.core.runtime.Status;
+import org.osgi.framework.BundleContext;
+import org.scribble.model.ModelReference;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class Activator extends Plugin implements org.eclipse.ui.IStartup {
+
+	// The plug-in ID
+	public static final String PLUGIN_ID = "org.scribble.osgi";
+
+	// The shared instance
+	private static Activator plugin;
+	
+	/**
+	 * The constructor
+	 */
+	public Activator() {
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+	 */
+	public void start(BundleContext context) throws Exception {
+		super.start(context);
+		plugin = this;		
+		
+		// Reference class in core to cause it to be loaded
+		new ModelReference("");
+	}
+	
+	/*
+	 * (non-Javadoc)
+	 * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+	 */
+	public void stop(BundleContext context) throws Exception {
+		plugin = null;
+		super.stop(context);
+	}
+
+	/**
+	 * Returns the shared instance
+	 *
+	 * @return the shared instance
+	 */
+	public static Activator getDefault() {
+		return plugin;
+	}
+
+	/**
+	 * This method logs an error against the plugin.
+	 * 
+	 * @param mesg The error message
+	 * @param t The optional exception
+	 */
+	public static void logError(String mesg, Throwable t) {
+		
+		if (getDefault() != null) {
+			Status status=new Status(IStatus.ERROR,
+					PLUGIN_ID, 0, mesg, t);
+			
+			getDefault().getLog().log(status);
+		}
+		
+		logger.severe("LOG ERROR: "+mesg+
+				(t == null ? "" : ": "+t));
+	}
+
+	public void earlyStartup() {
+	}
+	
+	private static Logger logger = Logger.getLogger("org.scribble.osgi.eclipse");
+}

Added: tools/eclipse/trunk/plugins/org.scribble.eclipse/src/java/org/scribble/eclipse/resolutions/MarkerResolutionGenerator.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.eclipse/src/java/org/scribble/eclipse/resolutions/MarkerResolutionGenerator.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.eclipse/src/java/org/scribble/eclipse/resolutions/MarkerResolutionGenerator.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,206 @@
+/*
+ * Copyright 2007 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 1 Dec 2007 : Initial version created by gary
+ */
+package org.scribble.eclipse.resolutions;
+
+import java.util.Comparator;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+import org.eclipse.core.resources.IMarker;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.ui.internal.UIPlugin;
+import org.scribble.eclipse.model.admin.OSGIModelListener;
+import org.scribble.model.*;
+import org.scribble.model.admin.ModelIssue;
+import org.scribble.model.resolutions.Resolution;
+import org.scribble.util.*;
+
+/**
+ * This class represents the implementation of the marker
+ * resolution generator interface, responsible for
+ * providing resolutions related to markers.
+ *
+ */
+public class MarkerResolutionGenerator 
+			implements org.eclipse.ui.IMarkerResolutionGenerator2 {
+
+	/**
+	 * This method determines whether there are available resolutions
+	 * for the supplied marker.
+	 * 
+	 * @param marker The marker
+	 * @return Whether resolutions are available
+	 */
+	public boolean hasResolutions(org.eclipse.core.resources.IMarker marker) {
+		boolean ret=false;
+		
+		try {
+			ret = ModelIssueUtil.hasResolutions(marker.getAttributes());
+		} catch(Exception e) {
+			e.printStackTrace();
+		}
+		
+		return(ret);
+	}
+	
+	/**
+	 * This method returns any available resolutions for the supplied
+	 * marker.
+	 * 
+	 * @param marker The marker
+	 * @return The list of available resolutions
+	 */
+	public org.eclipse.ui.IMarkerResolution[] getResolutions(org.eclipse.core.resources.IMarker marker) {
+		org.eclipse.ui.IMarkerResolution[] ret=null;
+		
+		try {
+			java.util.List<Resolution> resolutions=
+				ModelIssueUtil.deserializeResolutions(marker.getAttributes());
+			
+			java.util.Collections.sort(resolutions, new ResolutionComparator());
+			
+			ret = new org.eclipse.ui.IMarkerResolution[resolutions.size()];
+			
+			for (int i=0; i < resolutions.size(); i++) {
+				ret[i] = new MarkerResolutionWrapper(resolutions.get(i));
+			}
+		} catch(Exception e) {
+			e.printStackTrace();
+		}
+		
+		/*
+		String resolutions=marker.getAttribute(org.scribble.model.ModelListener.RESOLUTIONS, null);
+		
+		try {
+			java.util.List<org.eclipse.ui.IMarkerResolution> impls=
+				new java.util.Vector<org.eclipse.ui.IMarkerResolution>();
+			
+			java.util.StringTokenizer st=new java.util.StringTokenizer(resolutions,",");
+			
+			while (st.hasMoreTokens()) {
+				String resolution=st.nextToken();
+				
+				if (resolution.equals(ModelListener.SHOW_EXTERNAL_ISSUE_RESOLUTION)) {
+					impls.add(new ShowExternalIssue());
+				} else if (resolution.equals(ModelListener.SHOW_REFERENCE_DESCRIPTION_RESOLUTION)) {
+					impls.add(new ShowReferencedDescription());
+				} else {
+					try {
+						Class<?> cls=Class.forName(resolution);
+					
+						org.eclipse.ui.IMarkerResolution res=
+							(org.eclipse.ui.IMarkerResolution)cls.newInstance();
+					
+						impls.add(res);
+					} catch(Exception cnfe) {
+						org.scribble.osgi.eclipse.Activator.logError(
+								"Failed to instantiate resolution '"+resolution+"'", cnfe);
+					}
+				}
+			}
+			
+			ret = new org.eclipse.ui.IMarkerResolution[impls.size()];
+			
+			impls.toArray(ret);
+			
+		} catch(Exception e) {
+			org.scribble.osgi.eclipse.Activator.logError(
+					"Failed to instantiate resolution '"+resolutions+"'", e);
+		}
+		*/
+		
+		return(ret);
+	}
+	
+	private static Logger logger = Logger.getLogger("org.scribble.osgi.resolutions");
+	
+	public class ResolutionComparator implements Comparator<Resolution> {
+
+		public int compare(Resolution res1, Resolution res2) {
+			return(res1.getName().compareTo(res2.getName()));
+		}	
+	}
+	
+	public class MarkerResolutionWrapper implements org.eclipse.ui.IMarkerResolution2 {
+
+		public MarkerResolutionWrapper(Resolution res) {
+			m_resolution = res;
+		}
+		
+		public String getLabel() {
+			return(m_resolution.getName());
+		}
+
+		public String getDescription() {
+			return(m_resolution.getDescription());
+		}
+
+		public Image getImage() {
+			// TODO Auto-generated method stub
+			return null;
+		}	
+
+		public void run(IMarker marker) {
+			try {
+				ModelIssue issue=new ModelIssue();
+				issue.setMessage((String)marker.getAttribute(IMarker.MESSAGE));
+				issue.getProperties().putAll(marker.getAttributes());
+				
+				SourceRef obj=new SourceRef();
+				obj.setStartPosition(((Integer)marker.getAttribute(IMarker.CHAR_START, 0)).intValue());
+				obj.setEndPosition(((Integer)marker.getAttribute(IMarker.CHAR_END, 0)).intValue());
+				obj.setModelObjectURI((String)marker.getAttribute(OSGIModelListener.SOURCE_MODEL_OBJECT_URI));
+				obj.setComponentURI((String)marker.getAttribute(OSGIModelListener.SOURCE_COMPONENT_URI));
+				
+				ModelReference ref=new ModelReference(
+						(String)marker.getAttribute(OSGIModelListener.MODEL_NAMESPACE),
+						(String)marker.getAttribute(OSGIModelListener.MODEL_LOCALPART),
+						(String)marker.getAttribute(OSGIModelListener.MODEL_LOCATED_ROLE),
+						(String)marker.getAttribute(OSGIModelListener.MODEL_NOTATION));
+						
+				// Recover the properties for model ref
+				java.util.Iterator<String> iter=
+						marker.getAttributes().keySet().iterator();
+				while (iter.hasNext()) {
+					String name=iter.next();
+					
+					if (name.startsWith(OSGIModelListener.MODEL_PROP_PREFIX)) {
+						Object value=marker.getAttributes().get(name);
+						
+						name = name.substring(OSGIModelListener.MODEL_PROP_PREFIX.length());
+						
+						ref.setProperty(name, value);
+					}
+				}		
+				
+				m_resolution.resolve(ref, obj, issue);
+			} catch(Exception e) {
+								
+				org.eclipse.jface.dialogs.MessageDialog.openError(
+						UIPlugin.getDefault().getWorkbench().getDisplay().getActiveShell(),
+						"Error", e.getLocalizedMessage());
+				
+				logger.log(Level.SEVERE, "Failed to resolve", e);
+			}
+		}
+		
+		private Resolution m_resolution=null;
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.eclipse/src/java/org/scribble/eclipse/util/ResourceUtil.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.eclipse/src/java/org/scribble/eclipse/util/ResourceUtil.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.eclipse/src/java/org/scribble/eclipse/util/ResourceUtil.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,77 @@
+/*
+ * Copyright 2005-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 19 Aug 2008 : Initial version created by gary
+ */
+package org.scribble.eclipse.util;
+
+import org.eclipse.core.resources.IMarker;
+import org.eclipse.core.resources.IResource;
+import org.scribble.eclipse.model.admin.*;
+
+public class ResourceUtil {
+
+	/**
+	 * This method determines if the supplied resource has any
+	 * errors associated with it.
+	 * 
+	 * @param res The resource
+	 * @return Whether any errors are associated with the resource
+	 */
+	public static boolean hasErrors(IResource res) {
+		boolean ret=false;
+		
+		if (res != null) {
+			
+			try {
+				IMarker[] markers=
+					res.findMarkers(IMarker.PROBLEM,
+							true, IResource.DEPTH_ZERO);
+				
+				for (int i=0; markers != null && ret == false &&
+							i < markers.length; i++) {
+					Object obj=markers[i].getAttribute(IMarker.SEVERITY);
+					
+					if (obj instanceof Integer &&
+							((Integer)obj).intValue() == IMarker.SEVERITY_ERROR) {
+					    ret = true;						
+					}
+				}
+
+				// If no errors, check for scribble specific issues
+				if (ret == false) {
+					markers = res.findMarkers(OSGIDefinitions.SCRIBBLE_PROBLEM,
+								true, IResource.DEPTH_ZERO);
+					
+					for (int i=0; markers != null && ret == false &&
+								i < markers.length; i++) {
+						Object obj=markers[i].getAttribute(IMarker.SEVERITY);
+						
+						if (obj instanceof Integer &&
+								((Integer)obj).intValue() == IMarker.SEVERITY_ERROR) {
+						    ret = true;						
+						}
+					}
+				}
+			} catch(Exception e) {
+			    ret = true;
+			}
+		}
+		
+		return(ret);
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.experimental.feature/.project
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.experimental.feature/.project	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.experimental.feature/.project	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>org.scribble.experimental.feature</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.pde.FeatureBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.pde.FeatureNature</nature>
+	</natures>
+</projectDescription>

Added: tools/eclipse/trunk/plugins/org.scribble.experimental.feature/LICENSE.txt
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.experimental.feature/LICENSE.txt	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.experimental.feature/LICENSE.txt	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,201 @@
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.

Added: tools/eclipse/trunk/plugins/org.scribble.experimental.feature/build.properties
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.experimental.feature/build.properties	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.experimental.feature/build.properties	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1 @@
+bin.includes = feature.xml

Added: tools/eclipse/trunk/plugins/org.scribble.experimental.feature/feature.xml
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.experimental.feature/feature.xml	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.experimental.feature/feature.xml	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,60 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<feature
+      id="org.scribble.experimental.feature"
+      label="Scribble Experimental Feature"
+      version="0.1.0.qualifier"
+      provider-name="www.scribble.org">
+
+   <description>
+      The Scribble Experimental Feature provides access to a core set of experimental capabilities that can be used in conjunction with other experimental plugins.
+   </description>
+
+   <copyright>
+      Copyright 2005-8 Pi4 Technologies Ltd Licensed under the Apache License, Version 2.0 (the &quot;License&quot;); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an &quot;AS IS&quot; BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
+   </copyright>
+
+   <license url="http://www.apache.org/licenses/LICENSE-2.0.html">
+      The scribble tools suite is licensed under the open source Apache License, version 2.0. http://www.apache.org/licenses/LICENSE-2.0.html
+   </license>
+
+   <requires>
+      <import plugin="org.eclipse.core.runtime"/>
+      <import plugin="org.scribble.core"/>
+      <import plugin="org.scribble.conversation.model"/>
+      <import plugin="org.eclipse.jdt.core"/>
+      <import plugin="org.eclipse.core.resources"/>
+      <import plugin="org.scribble.eclipse"/>
+      <import plugin="org.scribble.protocol.model"/>
+      <import plugin="org.eclipse.ui"/>
+      <import plugin="org.eclipse.ui.ide"/>
+   </requires>
+
+   <plugin
+         id="org.scribble.lang.model"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.scribble.protocol.comparator"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.scribble.conversation.comparator"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.scribble.conformance"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+</feature>

Added: tools/eclipse/trunk/plugins/org.scribble.expression.xpath/.classpath
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.expression.xpath/.classpath	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.expression.xpath/.classpath	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+	<classpathentry kind="src" path="src/java"/>
+	<classpathentry kind="output" path="classes"/>
+</classpath>

Added: tools/eclipse/trunk/plugins/org.scribble.expression.xpath/.project
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.expression.xpath/.project	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.expression.xpath/.project	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>org.scribble.expression.xpath</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.ManifestBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.SchemaBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.pde.PluginNature</nature>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+	</natures>
+</projectDescription>

Added: tools/eclipse/trunk/plugins/org.scribble.expression.xpath/LICENSE.txt
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.expression.xpath/LICENSE.txt	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.expression.xpath/LICENSE.txt	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,201 @@
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.

Added: tools/eclipse/trunk/plugins/org.scribble.expression.xpath/META-INF/MANIFEST.MF
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.expression.xpath/META-INF/MANIFEST.MF	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.expression.xpath/META-INF/MANIFEST.MF	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,16 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Scribble Expression Xpath Plug-in
+Bundle-SymbolicName: org.scribble.expression.xpath;singleton:=true
+Bundle-Version: 0.1.0.qualifier
+Bundle-Activator: org.scribble.expression.xpath.osgi.Activator
+Import-Package: org.osgi.framework;version="1.3.0"
+Require-Bundle: org.scribble.core,
+ org.scribble.conversation.model
+Bundle-ActivationPolicy: lazy
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Bundle-Vendor: www.scribble.org
+Scribble-Extensions: org.scribble.expression.xpath.validation.XPathExpressionValidationRule,
+  org.scribble.expression.xpath.export.text.XPathExpressionTextExportRule,
+  org.scribble.expression.xpath.model.types.XPathExpressionTypeResolverRule
+Export-Package: org.scribble.expression.xpath.model

Added: tools/eclipse/trunk/plugins/org.scribble.expression.xpath/build.properties
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.expression.xpath/build.properties	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.expression.xpath/build.properties	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,5 @@
+source.. = src/java/
+output.. = classes/
+bin.includes = META-INF/,\
+               .,\
+               plugin.xml

Added: tools/eclipse/trunk/plugins/org.scribble.expression.xpath/classes/org/scribble/expression/xpath/export/text/XPathExpressionTextExportRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.expression.xpath/classes/org/scribble/expression/xpath/export/text/XPathExpressionTextExportRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.expression.xpath/classes/org/scribble/expression/xpath/model/XPathExpression.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.expression.xpath/classes/org/scribble/expression/xpath/model/XPathExpression.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.expression.xpath/classes/org/scribble/expression/xpath/model/types/XPathExpressionTypeResolverRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.expression.xpath/classes/org/scribble/expression/xpath/model/types/XPathExpressionTypeResolverRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.expression.xpath/classes/org/scribble/expression/xpath/osgi/Activator.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.expression.xpath/classes/org/scribble/expression/xpath/osgi/Activator.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.expression.xpath/classes/org/scribble/expression/xpath/validation/XPathExpressionValidationRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.expression.xpath/classes/org/scribble/expression/xpath/validation/XPathExpressionValidationRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.expression.xpath/src/java/org/scribble/expression/xpath/export/text/XPathExpressionTextExportRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.expression.xpath/src/java/org/scribble/expression/xpath/export/text/XPathExpressionTextExportRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.expression.xpath/src/java/org/scribble/expression/xpath/export/text/XPathExpressionTextExportRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,69 @@
+/*
+ * Copyright 2007-9 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 8 Feb 2009 : Initial version created by gary
+ */
+package org.scribble.expression.xpath.export.text;
+
+import org.scribble.export.*;
+import org.scribble.export.text.*;
+import org.scribble.extensions.RegistryInfo;
+import org.scribble.model.*;
+import org.scribble.expression.xpath.model.*;
+
+/**
+ * This class implements the text based export rule for the
+ * XPathExpression entity.
+ */
+ at RegistryInfo(extension=ExportRule.class)
+public class XPathExpressionTextExportRule implements ExportRule {
+
+	/**
+	 * This method determines whether the exporter rule is appropriate
+	 * for the supplied model object and format.
+	 * 
+	 * @param modelObject The model object
+	 * @param format The format
+	 * @return Whether the rule is appropriate for the model object and
+	 * 						format
+	 */
+	public boolean isSupported(ModelObject modelObject, Formatter format) {
+		return(XPathExpression.class.isAssignableFrom(modelObject.getClass()) &&
+				format instanceof TextFormatter);
+	}
+
+	/**
+	 * This method exports the model object.
+	 * 
+	 * @param modelObject The model object
+	 * @param context The context
+	 * @throws IOException Failed to record export information
+	 */
+	public void export(ModelObject modelObject, ExporterContext context)
+							throws java.io.IOException {
+		XPathExpression expr=(XPathExpression)modelObject;
+		TextFormatter formatter=(TextFormatter)context.getFormatter();
+		
+		formatter.record("xpath[");	
+		
+		if (expr.getQuery() != null) {
+			formatter.record(expr.getQuery());
+		}
+		
+		formatter.record("]");
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.expression.xpath/src/java/org/scribble/expression/xpath/model/XPathExpression.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.expression.xpath/src/java/org/scribble/expression/xpath/model/XPathExpression.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.expression.xpath/src/java/org/scribble/expression/xpath/model/XPathExpression.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,50 @@
+/*
+ * Copyright 2005-9 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 25 Jan 2009 : Initial version created by gary
+ */
+package org.scribble.expression.xpath.model;
+
+/**
+ * This class represents an xpath expression.
+ */
+public class XPathExpression extends org.scribble.conversation.model.Expression {
+
+	private static final long serialVersionUID = 6297823747605191013L;
+
+	/**
+	 * This method sets the query string associated with the
+	 * expression.
+	 * 
+	 * @param query The query
+	 */
+	public void setQuery(String query) {
+		m_query = query;
+	}
+	
+	/**
+	 * This method returns the query string associated with
+	 * the xpath expression.
+	 * 
+	 * @return The query
+	 */
+	public String getQuery() {
+		return(m_query);
+	}
+	
+	private String m_query=null;
+}

Added: tools/eclipse/trunk/plugins/org.scribble.expression.xpath/src/java/org/scribble/expression/xpath/model/types/XPathExpressionTypeResolverRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.expression.xpath/src/java/org/scribble/expression/xpath/model/types/XPathExpressionTypeResolverRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.expression.xpath/src/java/org/scribble/expression/xpath/model/types/XPathExpressionTypeResolverRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,62 @@
+/*
+ * Copyright 2005-9 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 25 Jan 2009 : Initial version created by gary
+ */
+package org.scribble.expression.xpath.model.types;
+
+import org.scribble.model.ModelObject;
+import org.scribble.model.TypeReference;
+import org.scribble.model.types.*;
+import org.scribble.expression.xpath.model.*;
+import org.scribble.extensions.RegistryInfo;
+
+/**
+ * This class implements the type resolver rule for the
+ * XPathExpression model object.
+ */
+ at RegistryInfo(extension=TypeResolverRule.class)
+public class XPathExpressionTypeResolverRule implements TypeResolverRule {
+
+	/**
+	 * This method determines if the type resolver rule
+	 * is appropriate for the supplied model object.
+	 * 
+	 * @param modelObject The model object
+	 * @return Whether the rule is appropriate
+	 */
+	public boolean isSupported(ModelObject modelObject) {
+		return(modelObject instanceof XPathExpression);
+	}
+	
+	/**
+	 * This method returns the type reference associated
+	 * with the supplied model object.
+	 * 
+	 * @param modelObject The model object
+	 * @return The type reference associated with the
+	 * 			model object, or null if unknown
+	 */
+	public TypeReference resolve(ModelObject modelObject) {
+		TypeReference ret=null;
+		XPathExpression expr=(XPathExpression)modelObject;
+		
+		// TODO: Identify the resulting type from the expression
+		
+		return(ret);
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.expression.xpath/src/java/org/scribble/expression/xpath/osgi/Activator.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.expression.xpath/src/java/org/scribble/expression/xpath/osgi/Activator.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.expression.xpath/src/java/org/scribble/expression/xpath/osgi/Activator.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,48 @@
+package org.scribble.expression.xpath.osgi;
+
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class Activator implements BundleActivator {
+
+	// The plug-in ID
+	public static final String PLUGIN_ID = "org.scribble.expression.xpath";
+
+	// The shared instance
+	private static Activator plugin;
+	
+	/**
+	 * The constructor
+	 */
+	public Activator() {
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.eclipse.core.runtime.Plugins#start(org.osgi.framework.BundleContext)
+	 */
+	public void start(BundleContext context) throws Exception {
+		plugin = this;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.eclipse.core.runtime.Plugin#stop(org.osgi.framework.BundleContext)
+	 */
+	public void stop(BundleContext context) throws Exception {
+		plugin = null;
+	}
+
+	/**
+	 * Returns the shared instance
+	 *
+	 * @return the shared instance
+	 */
+	public static Activator getDefault() {
+		return plugin;
+	}
+
+}

Added: tools/eclipse/trunk/plugins/org.scribble.expression.xpath/src/java/org/scribble/expression/xpath/validation/XPathExpressionValidationRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.expression.xpath/src/java/org/scribble/expression/xpath/validation/XPathExpressionValidationRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.expression.xpath/src/java/org/scribble/expression/xpath/validation/XPathExpressionValidationRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,66 @@
+/*
+ * Copyright 2007-9 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 25 Jan 2009 : Initial version created by gary
+ */
+package org.scribble.expression.xpath.validation;
+
+import org.scribble.extensions.*;
+import org.scribble.model.*;
+import org.scribble.expression.xpath.model.*;
+import org.scribble.validation.*;
+import org.scribble.model.admin.ModelListener;
+
+/**
+ * This class implements the validation rule for the
+ * XPathExpression construct.
+ */
+ at RegistryInfo(extension=ValidationRule.class)
+public class XPathExpressionValidationRule extends AbstractValidationRule {
+
+	/**
+	 * This is the default constructor.
+	 */
+	public XPathExpressionValidationRule() {
+	}
+
+	/**
+	 * This method determines whether the rule is appropriate for
+	 * the supplied model object.
+	 * 
+	 * @param obj The model object
+	 * @return Whether the rule is appropriate
+	 */
+	public boolean isSupported(ModelObject obj) {
+		return(obj instanceof XPathExpression);
+	}
+
+	/**
+	 * This method validates the supplied model object.
+	 * 
+	 * @param obj The model object
+	 * @param context The context
+	 * @param l The listener
+	 */
+	public void validate(ModelObject obj, ValidationContext context,
+			ModelListener l) {
+		XPathExpression elem=(XPathExpression)obj;
+
+		// TODO: Use an appropriate xpath parser to validate the
+		// expression and that the referenced variables exist
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.feature/.project
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.feature/.project	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.feature/.project	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>org.scribble.feature</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.pde.FeatureBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.pde.FeatureNature</nature>
+	</natures>
+</projectDescription>

Added: tools/eclipse/trunk/plugins/org.scribble.feature/LICENSE.txt
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.feature/LICENSE.txt	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.feature/LICENSE.txt	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,201 @@
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.

Added: tools/eclipse/trunk/plugins/org.scribble.feature/build.properties
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.feature/build.properties	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.feature/build.properties	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1 @@
+bin.includes = feature.xml

Added: tools/eclipse/trunk/plugins/org.scribble.feature/feature.xml
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.feature/feature.xml	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.feature/feature.xml	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<feature
+      id="org.scribble.feature"
+      label="Scribble Core Feature"
+      version="0.1.0.qualifier"
+      provider-name="www.scribble.org">
+
+   <description>
+      This feature provides the Scribble core notation and capabilities.
+   </description>
+
+   <copyright>
+      Copyright 2005-8 Pi4 Technologies Ltd Licensed under the Apache
+License, Version 2.0 (the &quot;License&quot;); you may not use this file
+except in compliance with the License. You may obtain a copy
+of the License at http://www.apache.org/licenses/LICENSE-2.0
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an &quot;AS IS&quot; BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+or implied. See the License for the specific language governing
+permissions and limitations under the License.
+   </copyright>
+
+   <license url="http://www.apache.org/licenses/LICENSE-2.0.html">
+      The scribble tools suite is licensed under the open source Apache License, version 2.0. http://www.apache.org/licenses/LICENSE-2.0.html
+   </license>
+
+   <requires>
+      <import plugin="org.eclipse.ui"/>
+      <import plugin="org.eclipse.core.runtime"/>
+      <import plugin="org.eclipse.core.resources"/>
+      <import plugin="org.eclipse.jface.text"/>
+      <import plugin="org.eclipse.ui.views"/>
+      <import plugin="org.eclipse.ui.editors"/>
+      <import plugin="org.eclipse.ui.workbench.texteditor"/>
+      <import plugin="org.eclipse.ltk.core.refactoring"/>
+      <import plugin="org.eclipse.ui.ide"/>
+      <import plugin="org.eclipse.swt"/>
+      <import plugin="org.eclipse.jdt.core"/>
+   </requires>
+
+   <plugin
+         id="org.scribble.eclipse"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.scribble.core"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+</feature>

Added: tools/eclipse/trunk/plugins/org.scribble.java.feature/.project
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.java.feature/.project	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.java.feature/.project	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>org.scribble.java.feature</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.pde.FeatureBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.pde.FeatureNature</nature>
+	</natures>
+</projectDescription>

Added: tools/eclipse/trunk/plugins/org.scribble.java.feature/build.properties
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.java.feature/build.properties	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.java.feature/build.properties	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1 @@
+bin.includes = feature.xml

Added: tools/eclipse/trunk/plugins/org.scribble.java.feature/feature.xml
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.java.feature/feature.xml	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.java.feature/feature.xml	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<feature
+      id="org.scribble.java.feature"
+      label="Scribble Java Feature"
+      version="0.1.0.qualifier"
+      provider-name="www.scribble.org">
+
+   <description>
+      This feature provides the Scribble Java related capabilities.
+   </description>
+
+   <copyright>
+      Copyright 2005-8 Pi4 Technologies Ltd Licensed under the Apache
+License, Version 2.0 (the &quot;License&quot;); you may not use this file
+except in compliance with the License. You may obtain a copy
+of the License at http://www.apache.org/licenses/LICENSE-2.0
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an &quot;AS IS&quot; BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+or implied. See the License for the specific language governing
+permissions and limitations under the License.
+   </copyright>
+
+   <license url="http://www.apache.org/licenses/LICENSE-2.0.html">
+      The scribble tools suite is licensed under the open source Apache License, version 2.0. http://www.apache.org/licenses/LICENSE-2.0.html
+   </license>
+
+   <plugin
+         id="org.scribble.type.java"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+</feature>

Added: tools/eclipse/trunk/plugins/org.scribble.lang.comparator/.classpath
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.lang.comparator/.classpath	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.lang.comparator/.classpath	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="src" path="src/java"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+	<classpathentry kind="output" path="classes"/>
+</classpath>

Added: tools/eclipse/trunk/plugins/org.scribble.lang.comparator/.project
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.lang.comparator/.project	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.lang.comparator/.project	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>org.scribble.lang.comparator</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.ManifestBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.SchemaBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.pde.PluginNature</nature>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+	</natures>
+</projectDescription>

Added: tools/eclipse/trunk/plugins/org.scribble.lang.comparator/LICENSE.txt
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.lang.comparator/LICENSE.txt	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.lang.comparator/LICENSE.txt	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,201 @@
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.

Added: tools/eclipse/trunk/plugins/org.scribble.lang.comparator/META-INF/MANIFEST.MF
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.lang.comparator/META-INF/MANIFEST.MF	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.lang.comparator/META-INF/MANIFEST.MF	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,14 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Scribble Language Comparator Plug-in
+Bundle-SymbolicName: org.scribble.lang.comparator;singleton:=true
+Bundle-Version: 0.1.0.qualifier
+Bundle-Activator: org.scribble.lang.comparator.osgi.Activator
+Bundle-Vendor: www.scribble.org
+Import-Package: org.osgi.framework;version="1.3.0"
+Require-Bundle: org.scribble.core,
+ org.scribble.lang.model,
+ org.scribble.conversation.model,
+ org.scribble.conformance
+Eclipse-LazyStart: true
+Scribble-Extensions: org.scribble.lang.comparator.LanguageModelComparatorRule

Added: tools/eclipse/trunk/plugins/org.scribble.lang.comparator/build.properties
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.lang.comparator/build.properties	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.lang.comparator/build.properties	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,5 @@
+source.. = src/java/
+output.. = classes/
+bin.includes = META-INF/,\
+               .,\
+               plugin.xml

Added: tools/eclipse/trunk/plugins/org.scribble.lang.comparator/classes/org/scribble/lang/comparator/LanguageModelComparatorRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.lang.comparator/classes/org/scribble/lang/comparator/LanguageModelComparatorRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.lang.comparator/classes/org/scribble/lang/comparator/osgi/Activator.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.lang.comparator/classes/org/scribble/lang/comparator/osgi/Activator.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.lang.comparator/src/java/org/scribble/lang/comparator/LanguageModelComparatorRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.lang.comparator/src/java/org/scribble/lang/comparator/LanguageModelComparatorRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.lang.comparator/src/java/org/scribble/lang/comparator/LanguageModelComparatorRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,118 @@
+/*
+ * Copyright 2007-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 19 Jan 2008 : Initial version created by gary
+ */
+package org.scribble.lang.comparator;
+
+import org.scribble.model.*;
+import org.scribble.model.admin.ModelListener;
+import org.scribble.comparator.*;
+import org.scribble.extensions.RegistryInfo;
+import org.scribble.lang.model.*;
+import org.scribble.conversation.model.*;
+
+/**
+ * This class provides the Language Model comparator rule,
+ * for comparing against a local Conversation for conformance.
+ */
+ at RegistryInfo(extension=ComparatorRule.class)
+public class LanguageModelComparatorRule implements ComparatorRule {
+
+	/**
+	 * This method determines whether the comparison rule is
+	 * associated with the supplied type.
+	 * 
+	 * @param obj The object to check
+	 * @return Whether the object is of a type supported by the
+	 * 					comparison rule
+	 */
+	public boolean isTypeSupported(ModelObject obj) {
+		return(obj instanceof LanguageModel ||
+				obj instanceof ConversationModel);
+	}
+	
+	/**
+	 * This method determines whether the comparison rule is
+	 * appropriate for the supplied model objects.
+	 * 
+	 * @param main The main model object to be compared
+	 * @param ref The reference model object to be compared against
+	 * @return Whether the rule is relevant for the
+	 * 				model objects
+	 */
+	public boolean isComparisonSupported(ModelObject main, ModelObject ref) {
+		return(main instanceof LanguageModel &&
+				ref instanceof ConversationModel);
+	}
+	
+	/**
+	 * This method compares a model object against a reference
+	 * component to determine if they are equal.
+	 * 
+	 * @param context The context
+	 * @param main The main model object
+	 * @param reference The reference model object
+	 * @param l The model listener
+	 * @param deep Perform a deep compare
+	 * @return Whether the model objects are comparable
+	 */
+	public boolean compare(ComparatorContext context, ModelObject main,
+					ModelObject reference, ModelListener l, boolean deep) {
+		boolean ret=false;
+		LanguageModel mainModel=(LanguageModel)main;
+		ConversationModel refModel=(ConversationModel)reference;
+		
+		// Create temporary reference for comparing against the
+		// 'conforms to' list associated with the language model
+		// conversations
+		java.util.List<ConformanceReference> list=
+				new java.util.Vector<ConformanceReference>();
+		list.addAll(refModel.getConversation().getConformsTo());
+		
+		ConformanceReference tmpref=
+				new ConformanceReference(ConversationNotation.NOTATION_CODE);
+		tmpref.setNamespace(refModel.getNamespace().getName());
+		tmpref.setLocalpart(refModel.getModelName().getName());
+		
+		if (refModel.getModelName().getRole() != null) {
+			tmpref.setLocatedRole(refModel.getModelName().getRole().getName());
+		}
+		
+		list.add(tmpref);
+		
+		// Find which conversation in the language the reference
+		// model relates to.
+		boolean f_end=false;
+		
+		for (int i=0; f_end == false &&
+					i < mainModel.getConversations().size(); i++) {
+			Conversation mainConv = mainModel.getConversations().get(i);
+			
+			for (int j=0; f_end == false && j < list.size(); j++) {
+				if (mainConv.getImplements().contains(list.get(j))) {
+					ret = context.compare(mainConv, refModel.getConversation(),
+							l, deep);
+					
+					f_end = true;
+				}
+			}
+		}
+		
+		return(ret);
+	}	
+}

Added: tools/eclipse/trunk/plugins/org.scribble.lang.comparator/src/java/org/scribble/lang/comparator/osgi/Activator.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.lang.comparator/src/java/org/scribble/lang/comparator/osgi/Activator.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.lang.comparator/src/java/org/scribble/lang/comparator/osgi/Activator.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,48 @@
+package org.scribble.lang.comparator.osgi;
+
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class Activator implements BundleActivator {
+
+	// The plug-in ID
+	public static final String PLUGIN_ID = "org.scribble.experimental.lang.comparator";
+
+	// The shared instance
+	private static Activator plugin;
+	
+	/**
+	 * The constructor
+	 */
+	public Activator() {
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.eclipse.core.runtime.Plugins#start(org.osgi.framework.BundleContext)
+	 */
+	public void start(BundleContext context) throws Exception {
+		plugin = this;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.eclipse.core.runtime.Plugin#stop(org.osgi.framework.BundleContext)
+	 */
+	public void stop(BundleContext context) throws Exception {
+		plugin = null;
+	}
+
+	/**
+	 * Returns the shared instance
+	 *
+	 * @return the shared instance
+	 */
+	public static Activator getDefault() {
+		return plugin;
+	}
+
+}

Added: tools/eclipse/trunk/plugins/org.scribble.lang.model/.classpath
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.lang.model/.classpath	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.lang.model/.classpath	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="src" path="src/java"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+	<classpathentry kind="output" path="classes"/>
+</classpath>

Added: tools/eclipse/trunk/plugins/org.scribble.lang.model/.project
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.lang.model/.project	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.lang.model/.project	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>org.scribble.lang.model</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.ManifestBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.SchemaBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.pde.PluginNature</nature>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+	</natures>
+</projectDescription>

Added: tools/eclipse/trunk/plugins/org.scribble.lang.model/LICENSE.txt
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.lang.model/LICENSE.txt	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.lang.model/LICENSE.txt	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,201 @@
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.

Added: tools/eclipse/trunk/plugins/org.scribble.lang.model/META-INF/MANIFEST.MF
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.lang.model/META-INF/MANIFEST.MF	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.lang.model/META-INF/MANIFEST.MF	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,13 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Scribble Language Model Plug-in
+Bundle-SymbolicName: org.scribble.lang.model;singleton:=true
+Bundle-Version: 0.1.0.qualifier
+Bundle-Activator: org.scribble.lang.model.osgi.Activator
+Bundle-Vendor: www.scribble.org
+Import-Package: org.osgi.framework;version="1.3.0"
+Require-Bundle: org.scribble.core,
+ org.scribble.conversation.model
+Eclipse-LazyStart: true
+Export-Package: org.scribble.lang.model
+Scribble-Extensions: org.scribble.lang.model.JavaLanguageModel

Added: tools/eclipse/trunk/plugins/org.scribble.lang.model/build.properties
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.lang.model/build.properties	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.lang.model/build.properties	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,5 @@
+source.. = src/java/
+output.. = classes/
+bin.includes = META-INF/,\
+               .,\
+               plugin.xml

Added: tools/eclipse/trunk/plugins/org.scribble.lang.model/classes/org/scribble/lang/model/JavaLanguageModel.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.lang.model/classes/org/scribble/lang/model/JavaLanguageModel.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.lang.model/classes/org/scribble/lang/model/LanguageModel$1.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.lang.model/classes/org/scribble/lang/model/LanguageModel$1.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.lang.model/classes/org/scribble/lang/model/LanguageModel$2.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.lang.model/classes/org/scribble/lang/model/LanguageModel$2.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.lang.model/classes/org/scribble/lang/model/LanguageModel.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.lang.model/classes/org/scribble/lang/model/LanguageModel.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.lang.model/classes/org/scribble/lang/model/osgi/Activator.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.lang.model/classes/org/scribble/lang/model/osgi/Activator.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.lang.model/src/java/org/scribble/lang/model/JavaLanguageModel.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.lang.model/src/java/org/scribble/lang/model/JavaLanguageModel.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.lang.model/src/java/org/scribble/lang/model/JavaLanguageModel.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,43 @@
+/*
+ * Copyright 2007-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 12 Jan 2008 : Initial version created by gary
+ */
+package org.scribble.lang.model;
+
+import org.scribble.model.*;
+import org.scribble.extensions.*;
+
+/**
+ * This class represents the Java language model.
+ * 
+ */
+ at RegistryInfo(extension=Model.class,notation=JavaLanguageModel.JAVA_LANGUAGE)
+public class JavaLanguageModel extends LanguageModel {
+
+	/**
+	 * This method returns the notation associated with
+	 * the model.
+	 * 
+	 * @return The notation
+	 */
+	public String getNotation() {
+		return(JAVA_LANGUAGE);
+	}
+	
+	public static final String JAVA_LANGUAGE="java";
+}

Added: tools/eclipse/trunk/plugins/org.scribble.lang.model/src/java/org/scribble/lang/model/LanguageModel.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.lang.model/src/java/org/scribble/lang/model/LanguageModel.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.lang.model/src/java/org/scribble/lang/model/LanguageModel.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,125 @@
+/*
+ * Copyright 2007-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 12 Jan 2008 : Initial version created by gary
+ */
+package org.scribble.lang.model;
+
+import org.scribble.model.*;
+import org.scribble.conversation.model.*;
+
+/**
+ * This class represents the language model.
+ * 
+ */
+public abstract class LanguageModel extends Model {
+
+	/**
+	 * This method returns the model name associated with
+	 * the model.
+	 * 
+	 * @return The model name
+	 */
+	public LocatedName getModelName() {
+		return(m_modelName);
+	}
+	
+	/**
+	 * This method sets the model name.
+	 * 
+	 * @param modelName The model name
+	 */
+	public void setModelName(LocatedName modelName) {
+		m_modelName = modelName;
+	}
+	
+	/**
+	 * This method returns a read-only list of roles
+	 * associated with the model. If this model represents
+	 * a local model, then the roles in the list
+	 * will be the remote roles, with the local
+	 * role being associated with the model name.
+	 * 
+	 * @return The read-only list of roles
+	 */
+	public java.util.List<Role> getRoles() {
+		java.util.List<Role> ret=null;
+		final java.util.List<Role> roles=
+			new java.util.Vector<Role>();
+		
+		if (m_conversations != null) {
+			// Identify all of the roles defined in the
+			// top level conversations
+			for (int i=0; i < m_conversations.size(); i++) {
+				m_conversations.get(i).visit(new Visitor() {
+					
+					public boolean visit(ModelObject obj) {
+						boolean ret=true;
+						
+						if (obj instanceof Conversation &&
+								m_conversations.contains(obj)) {
+							ret = false;
+							
+						} else if (obj instanceof RoleList) {
+							RoleList plist=(RoleList)obj;
+							
+							roles.addAll(plist.getRoles());
+						}
+						
+						return(ret);
+					}
+				});
+			}
+		}
+		
+		ret = new java.util.Vector<Role>(roles) {
+			public boolean add(Role obj) {
+				throw new java.lang.RuntimeException("Read only list");
+			}
+		};
+		
+		return(ret);
+	}
+
+	/**
+	 * This method returns the protocol.
+	 * 
+	 * @return The protocol
+	 */
+	@Reference(containment=true)
+	public java.util.List<Conversation> getConversations() {
+		return(m_conversations);
+	}
+	
+	/**
+	 * This method returns the list of definitions supported by
+	 * this model.
+	 * 
+	 * @return The list of definitions
+	 */
+	public java.util.List<Definition> getDefinitions() {
+		java.util.List<Definition> ret=new java.util.Vector<Definition>();
+		
+		ret.addAll(getConversations());
+		
+		return(ret);
+	}
+	
+	private LocatedName m_modelName=null;
+	private java.util.List<Conversation> m_conversations=
+				new ContainmentList<Conversation>(this, Conversation.class);
+}

Added: tools/eclipse/trunk/plugins/org.scribble.lang.model/src/java/org/scribble/lang/model/osgi/Activator.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.lang.model/src/java/org/scribble/lang/model/osgi/Activator.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.lang.model/src/java/org/scribble/lang/model/osgi/Activator.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,48 @@
+package org.scribble.lang.model.osgi;
+
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class Activator implements BundleActivator {
+
+	// The plug-in ID
+	public static final String PLUGIN_ID = "org.scribble.experimental.lang.model";
+
+	// The shared instance
+	private static Activator plugin;
+	
+	/**
+	 * The constructor
+	 */
+	public Activator() {
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.eclipse.core.runtime.Plugins#start(org.osgi.framework.BundleContext)
+	 */
+	public void start(BundleContext context) throws Exception {
+		plugin = this;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.eclipse.core.runtime.Plugin#stop(org.osgi.framework.BundleContext)
+	 */
+	public void stop(BundleContext context) throws Exception {
+		plugin = null;
+	}
+
+	/**
+	 * Returns the shared instance
+	 *
+	 * @return the shared instance
+	 */
+	public static Activator getDefault() {
+		return plugin;
+	}
+
+}

Added: tools/eclipse/trunk/plugins/org.scribble.monitor/.classpath
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.monitor/.classpath	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.monitor/.classpath	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+	<classpathentry kind="src" path="src/java"/>
+	<classpathentry kind="src" path="src/test"/>
+	<classpathentry kind="src" path="src/perftest"/>
+	<classpathentry kind="lib" path="src/lib/jaxen-1.1.1.jar"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/3"/>
+	<classpathentry kind="output" path="classes"/>
+</classpath>

Added: tools/eclipse/trunk/plugins/org.scribble.monitor/.project
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.monitor/.project	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.monitor/.project	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>org.scribble.monitor</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.ManifestBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.SchemaBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.pde.PluginNature</nature>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+	</natures>
+</projectDescription>

Added: tools/eclipse/trunk/plugins/org.scribble.monitor/Issues.txt
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.monitor/Issues.txt	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.monitor/Issues.txt	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,22 @@
+
+
+
+Need to consider how best to associate conversation identities with sessions (and sub-sessions) so
+the mapping is updated in the conversation manager. Also needs to make sure the sub-sessions are
+cleaned up - should they also notify the ConversationListener?
+
+
+
+
+When event propagated from child session to parent session, causing parent session to complete, need
+to make sure it will be removed.
+
+Messages should be directed to specific session or sub-session. But only want to indicate conversation instance
+when all session/sub-session have finished.
+
+
+
+
+Abstract classes vs interfaces:
+found no performance difference with either against normal class invocation
+however if abstract class used as inner class, this had an impact on instantiation - 50% slower than normal or interface based
\ No newline at end of file

Added: tools/eclipse/trunk/plugins/org.scribble.monitor/META-INF/MANIFEST.MF
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.monitor/META-INF/MANIFEST.MF	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.monitor/META-INF/MANIFEST.MF	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,13 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Scribble Monitor Plug-in
+Bundle-SymbolicName: org.scribble.monitor
+Bundle-Version: 0.1.0.qualifier
+Bundle-Activator: org.scribble.monitor.osgi.Activator
+Bundle-Vendor: www.scribble.org
+Import-Package: org.osgi.framework;version="1.3.0"
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Bundle-ActivationPolicy: lazy
+Export-Package: org.scribble.monitor,
+ org.scribble.monitor.expression,
+ org.scribble.monitor.model

Added: tools/eclipse/trunk/plugins/org.scribble.monitor/build.properties
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.monitor/build.properties	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.monitor/build.properties	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,4 @@
+source.. = src/java/
+output.. = classes/
+bin.includes = META-INF/,\
+               .

Added: tools/eclipse/trunk/plugins/org.scribble.monitor/classes/org/scribble/monitor/Conversation.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.monitor/classes/org/scribble/monitor/Conversation.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.monitor/classes/org/scribble/monitor/ConversationIdentity.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.monitor/classes/org/scribble/monitor/ConversationIdentity.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.monitor/classes/org/scribble/monitor/ConversationIdentityType.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.monitor/classes/org/scribble/monitor/ConversationIdentityType.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.monitor/classes/org/scribble/monitor/ConversationListener.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.monitor/classes/org/scribble/monitor/ConversationListener.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.monitor/classes/org/scribble/monitor/ConversationManager.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.monitor/classes/org/scribble/monitor/ConversationManager.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.monitor/classes/org/scribble/monitor/ConversationTypeName.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.monitor/classes/org/scribble/monitor/ConversationTypeName.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.monitor/classes/org/scribble/monitor/ConversationTypeRepository.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.monitor/classes/org/scribble/monitor/ConversationTypeRepository.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.monitor/classes/org/scribble/monitor/InvokedConversationFinishedEvent.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.monitor/classes/org/scribble/monitor/InvokedConversationFinishedEvent.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.monitor/classes/org/scribble/monitor/Message.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.monitor/classes/org/scribble/monitor/Message.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.monitor/classes/org/scribble/monitor/MessageSignature.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.monitor/classes/org/scribble/monitor/MessageSignature.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.monitor/classes/org/scribble/monitor/Monitor.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.monitor/classes/org/scribble/monitor/Monitor.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.monitor/classes/org/scribble/monitor/MonitorContext.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.monitor/classes/org/scribble/monitor/MonitorContext.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.monitor/classes/org/scribble/monitor/MonitorEvent.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.monitor/classes/org/scribble/monitor/MonitorEvent.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.monitor/classes/org/scribble/monitor/MonitorException.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.monitor/classes/org/scribble/monitor/MonitorException.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.monitor/classes/org/scribble/monitor/MonitorFactory.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.monitor/classes/org/scribble/monitor/MonitorFactory.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.monitor/classes/org/scribble/monitor/MonitorListener.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.monitor/classes/org/scribble/monitor/MonitorListener.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.monitor/classes/org/scribble/monitor/MonitoringService.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.monitor/classes/org/scribble/monitor/MonitoringService.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.monitor/classes/org/scribble/monitor/Result.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.monitor/classes/org/scribble/monitor/Result.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.monitor/classes/org/scribble/monitor/expression/Expression.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.monitor/classes/org/scribble/monitor/expression/Expression.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.monitor/classes/org/scribble/monitor/expression/ExpressionFactory.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.monitor/classes/org/scribble/monitor/expression/ExpressionFactory.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.monitor/classes/org/scribble/monitor/expression/Function.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.monitor/classes/org/scribble/monitor/expression/Function.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.monitor/classes/org/scribble/monitor/expression/FunctionContext.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.monitor/classes/org/scribble/monitor/expression/FunctionContext.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.monitor/classes/org/scribble/monitor/expression/FunctionRegistry.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.monitor/classes/org/scribble/monitor/expression/FunctionRegistry.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.monitor/classes/org/scribble/monitor/expression/NamespaceResolver.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.monitor/classes/org/scribble/monitor/expression/NamespaceResolver.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.monitor/classes/org/scribble/monitor/expression/jaxen/JaxenDOMExpression.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.monitor/classes/org/scribble/monitor/expression/jaxen/JaxenDOMExpression.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.monitor/classes/org/scribble/monitor/expression/jaxen/JaxenDOMExpressionTest$1.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.monitor/classes/org/scribble/monitor/expression/jaxen/JaxenDOMExpressionTest$1.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.monitor/classes/org/scribble/monitor/expression/jaxen/JaxenDOMExpressionTest.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.monitor/classes/org/scribble/monitor/expression/jaxen/JaxenDOMExpressionTest.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.monitor/classes/org/scribble/monitor/expression/jaxen/JaxenDOMVariableContextImpl.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.monitor/classes/org/scribble/monitor/expression/jaxen/JaxenDOMVariableContextImpl.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.monitor/classes/org/scribble/monitor/expression/jaxen/JaxenFunctionContextImpl$FunctionProxy.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.monitor/classes/org/scribble/monitor/expression/jaxen/JaxenFunctionContextImpl$FunctionProxy.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.monitor/classes/org/scribble/monitor/expression/jaxen/JaxenFunctionContextImpl.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.monitor/classes/org/scribble/monitor/expression/jaxen/JaxenFunctionContextImpl.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.monitor/classes/org/scribble/monitor/expression/jaxen/JaxenJavaBeanExpression.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.monitor/classes/org/scribble/monitor/expression/jaxen/JaxenJavaBeanExpression.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.monitor/classes/org/scribble/monitor/expression/jaxen/JaxenJavaBeanExpressionTest$1.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.monitor/classes/org/scribble/monitor/expression/jaxen/JaxenJavaBeanExpressionTest$1.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.monitor/classes/org/scribble/monitor/expression/jaxen/JaxenJavaBeanExpressionTest$Main.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.monitor/classes/org/scribble/monitor/expression/jaxen/JaxenJavaBeanExpressionTest$Main.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.monitor/classes/org/scribble/monitor/expression/jaxen/JaxenJavaBeanExpressionTest$Sub.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.monitor/classes/org/scribble/monitor/expression/jaxen/JaxenJavaBeanExpressionTest$Sub.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.monitor/classes/org/scribble/monitor/expression/jaxen/JaxenJavaBeanExpressionTest.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.monitor/classes/org/scribble/monitor/expression/jaxen/JaxenJavaBeanExpressionTest.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.monitor/classes/org/scribble/monitor/expression/jaxen/JaxenJavaBeanVariableContextImpl.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.monitor/classes/org/scribble/monitor/expression/jaxen/JaxenJavaBeanVariableContextImpl.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.monitor/classes/org/scribble/monitor/expression/jaxen/NamespaceContextImpl.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.monitor/classes/org/scribble/monitor/expression/jaxen/NamespaceContextImpl.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.monitor/classes/org/scribble/monitor/expression/xalan/XalanDOMExpression.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.monitor/classes/org/scribble/monitor/expression/xalan/XalanDOMExpression.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.monitor/classes/org/scribble/monitor/impl/ConversationImpl.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.monitor/classes/org/scribble/monitor/impl/ConversationImpl.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.monitor/classes/org/scribble/monitor/impl/ConversationInstanceRef.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.monitor/classes/org/scribble/monitor/impl/ConversationInstanceRef.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.monitor/classes/org/scribble/monitor/impl/DefaultConversationManager.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.monitor/classes/org/scribble/monitor/impl/DefaultConversationManager.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.monitor/classes/org/scribble/monitor/impl/DefaultConversationTypeRepository.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.monitor/classes/org/scribble/monitor/impl/DefaultConversationTypeRepository.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.monitor/classes/org/scribble/monitor/impl/DefaultMonitor.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.monitor/classes/org/scribble/monitor/impl/DefaultMonitor.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.monitor/classes/org/scribble/monitor/impl/DefaultMonitorContext.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.monitor/classes/org/scribble/monitor/impl/DefaultMonitorContext.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.monitor/classes/org/scribble/monitor/impl/Scope.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.monitor/classes/org/scribble/monitor/impl/Scope.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.monitor/classes/org/scribble/monitor/model/ChoiceNode.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.monitor/classes/org/scribble/monitor/model/ChoiceNode.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.monitor/classes/org/scribble/monitor/model/ConditionalNode.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.monitor/classes/org/scribble/monitor/model/ConditionalNode.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.monitor/classes/org/scribble/monitor/model/ConversationContext.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.monitor/classes/org/scribble/monitor/model/ConversationContext.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.monitor/classes/org/scribble/monitor/model/ConversationType.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.monitor/classes/org/scribble/monitor/model/ConversationType.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.monitor/classes/org/scribble/monitor/model/MessageBasedNode.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.monitor/classes/org/scribble/monitor/model/MessageBasedNode.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.monitor/classes/org/scribble/monitor/model/MonitorNode.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.monitor/classes/org/scribble/monitor/model/MonitorNode.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.monitor/classes/org/scribble/monitor/model/ParallelNode.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.monitor/classes/org/scribble/monitor/model/ParallelNode.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.monitor/classes/org/scribble/monitor/model/ReceiveNode.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.monitor/classes/org/scribble/monitor/model/ReceiveNode.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.monitor/classes/org/scribble/monitor/model/RecordActivity.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.monitor/classes/org/scribble/monitor/model/RecordActivity.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.monitor/classes/org/scribble/monitor/model/RunNode.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.monitor/classes/org/scribble/monitor/model/RunNode.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.monitor/classes/org/scribble/monitor/model/SendNode.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.monitor/classes/org/scribble/monitor/model/SendNode.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.monitor/classes/org/scribble/monitor/model/SequenceNode.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.monitor/classes/org/scribble/monitor/model/SequenceNode.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.monitor/classes/org/scribble/monitor/model/SpawnNode.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.monitor/classes/org/scribble/monitor/model/SpawnNode.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.monitor/classes/org/scribble/monitor/osgi/Activator.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.monitor/classes/org/scribble/monitor/osgi/Activator.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.monitor/classes/performance/PerformanceTests$PerformanceTestCase.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.monitor/classes/performance/PerformanceTests$PerformanceTestCase.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.monitor/classes/performance/PerformanceTests.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.monitor/classes/performance/PerformanceTests.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.monitor/classes/performance/expressions/JaxenExpressionTest$Main.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.monitor/classes/performance/expressions/JaxenExpressionTest$Main.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.monitor/classes/performance/expressions/JaxenExpressionTest$Sub.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.monitor/classes/performance/expressions/JaxenExpressionTest$Sub.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.monitor/classes/performance/expressions/JaxenExpressionTest.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.monitor/classes/performance/expressions/JaxenExpressionTest.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.monitor/classes/performance/monitor/DynaTest$Broker.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.monitor/classes/performance/monitor/DynaTest$Broker.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.monitor/classes/performance/monitor/DynaTest$BrokerImpl.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.monitor/classes/performance/monitor/DynaTest$BrokerImpl.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.monitor/classes/performance/monitor/DynaTest$BrokerProxy.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.monitor/classes/performance/monitor/DynaTest$BrokerProxy.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.monitor/classes/performance/monitor/DynaTest$BuyConfirmed.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.monitor/classes/performance/monitor/DynaTest$BuyConfirmed.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.monitor/classes/performance/monitor/DynaTest$BuyFailed.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.monitor/classes/performance/monitor/DynaTest$BuyFailed.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.monitor/classes/performance/monitor/DynaTest$BuyRequest.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.monitor/classes/performance/monitor/DynaTest$BuyRequest.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.monitor/classes/performance/monitor/DynaTest$CreditAgency.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.monitor/classes/performance/monitor/DynaTest$CreditAgency.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.monitor/classes/performance/monitor/DynaTest$CreditAgencyImpl.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.monitor/classes/performance/monitor/DynaTest$CreditAgencyImpl.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.monitor/classes/performance/monitor/DynaTest$CreditAgencyProxy.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.monitor/classes/performance/monitor/DynaTest$CreditAgencyProxy.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.monitor/classes/performance/monitor/DynaTest$CreditCheck.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.monitor/classes/performance/monitor/DynaTest$CreditCheck.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.monitor/classes/performance/monitor/DynaTest$CreditInvalid.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.monitor/classes/performance/monitor/DynaTest$CreditInvalid.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.monitor/classes/performance/monitor/DynaTest$CreditValid.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.monitor/classes/performance/monitor/DynaTest$CreditValid.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.monitor/classes/performance/monitor/DynaTest$InboundMonitorProxy.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.monitor/classes/performance/monitor/DynaTest$InboundMonitorProxy.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.monitor/classes/performance/monitor/DynaTest$OrderConfirmed.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.monitor/classes/performance/monitor/DynaTest$OrderConfirmed.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.monitor/classes/performance/monitor/DynaTest$OrderRequest.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.monitor/classes/performance/monitor/DynaTest$OrderRequest.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.monitor/classes/performance/monitor/DynaTest$OutOfStock.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.monitor/classes/performance/monitor/DynaTest$OutOfStock.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.monitor/classes/performance/monitor/DynaTest$OutboundMonitorProxy.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.monitor/classes/performance/monitor/DynaTest$OutboundMonitorProxy.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.monitor/classes/performance/monitor/DynaTest$Supplier.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.monitor/classes/performance/monitor/DynaTest$Supplier.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.monitor/classes/performance/monitor/DynaTest$SupplierImpl.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.monitor/classes/performance/monitor/DynaTest$SupplierImpl.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.monitor/classes/performance/monitor/DynaTest$SupplierProxy.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.monitor/classes/performance/monitor/DynaTest$SupplierProxy.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.monitor/classes/performance/monitor/DynaTest.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.monitor/classes/performance/monitor/DynaTest.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.monitor/classes/performance/monitor/MonitorTestCase.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.monitor/classes/performance/monitor/MonitorTestCase.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.monitor/classes/performance/monitor/MonitorTestCase1.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.monitor/classes/performance/monitor/MonitorTestCase1.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.monitor/classes/performance/monitor/MonitorTestCase2.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.monitor/classes/performance/monitor/MonitorTestCase2.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.monitor/classes/performance/monitor/MonitorTestCase3.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.monitor/classes/performance/monitor/MonitorTestCase3.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.monitor/classes/performance/monitor/MonitorTestCase4.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.monitor/classes/performance/monitor/MonitorTestCase4.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.monitor/classes/performance/monitor/MonitorTestCase5.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.monitor/classes/performance/monitor/MonitorTestCase5.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.monitor/classes/performance/monitor/MonitorTestCase6.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.monitor/classes/performance/monitor/MonitorTestCase6.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.monitor/classes/performance/monitor/TestData.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.monitor/classes/performance/monitor/TestData.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.monitor/classes/performance/monitor/TestMonitor$1.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.monitor/classes/performance/monitor/TestMonitor$1.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.monitor/classes/performance/monitor/TestMonitor$DummyMonitor.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.monitor/classes/performance/monitor/TestMonitor$DummyMonitor.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.monitor/classes/performance/monitor/TestMonitor.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.monitor/classes/performance/monitor/TestMonitor.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/Conversation.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/Conversation.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/Conversation.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,122 @@
+/*
+ * Copyright 2005-9 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 17 May 2009 : Initial version created by gary
+ */
+package org.scribble.monitor;
+
+import org.scribble.monitor.ConversationIdentity;
+import org.scribble.monitor.model.MonitorNode;
+
+/**
+ * This interface represents a conversation instance. 
+ */
+public interface Conversation {
+
+	/**
+	 * This method returns the conversation type name associated with
+	 * this conversation.
+	 * 
+	 * @return The conversation type name
+	 */
+	public ConversationTypeName getName();
+	
+	/**
+	 * This method registers the supplied node for
+	 * subsequent processing.
+	 * 
+	 * @param node The node
+	 */
+	public void register(MonitorNode node);
+	
+	/**
+	 * This method attempts to locate a node that can
+	 * process the supplied 'sent' message. At any one
+	 * time, within a session, only a single node
+	 * should be able to process the message.
+	 * 
+	 * @param mc The monitor context
+	 * @param mesg The message
+	 * @return Whether the message was handled
+	 */
+	public Result sentMessage(MonitorContext mc,
+							Message mesg);
+	
+	/**
+	 * This method attempts to locate a node that can
+	 * process the supplied 'received' message. At any one
+	 * time, within a session, only a single node
+	 * should be able to process the message.
+	 * 
+	 * @param mc The monitor context
+	 * @param mesg The message
+	 * @return Whether the message was handled
+	 */
+	public Result receivedMessage(MonitorContext mc,
+							Message mesg);
+
+	/**
+	 * This method is invoked to handle the supplied event.
+	 * 
+	 * @param mc The monitor context
+	 * @param event The event
+	 * @return Whether the event has handled
+	 */
+	public Result onMonitorEvent(MonitorContext mc, MonitorEvent event);
+	
+	/**
+	 * This method determines whether the session has
+	 * completed.
+	 * 
+	 * @return Whether the session has completed
+	 */
+	public boolean isCompleted();
+	
+	/**
+	 * This method returns the conversation identities associated
+	 * with the session.
+	 * 
+	 * @return The conversation identities
+	 */
+	public java.util.List<ConversationIdentity> getIdentities();
+	
+	/**
+	 * This method determines if the session identity has changed.
+	 * 
+	 * @return Whether the session identity has changed
+	 */
+	public boolean isIdentityChanged();
+	
+	/**
+	 * This method sets whether the identity has changed within
+	 * the session.
+	 * 
+	 * @param changed
+	 */
+	public void setIdentityChanged(boolean changed);
+
+	/**
+	 * This method requests the conversation to notify another conversation instance,
+	 * associated with the supplied type name and identity, when it
+	 * completes.
+	 * 
+	 * @param name The conversation type name
+	 * @param ids The conversation identities
+	 */
+	public void notifyOnCompletion(ConversationTypeName name, java.util.List<ConversationIdentity> ids);
+	
+}

Added: tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/ConversationIdentity.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/ConversationIdentity.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/ConversationIdentity.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,71 @@
+/*
+ * Copyright 2005-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 4 Oct 2008 : Initial version created by gary
+ */
+package org.scribble.monitor;
+
+import java.io.IOException;
+import java.io.ObjectInput;
+import java.io.ObjectOutput;
+
+/**
+ * TEMPORARY IDENTITY IMPLEMENTATION, TO ACT AS PLACEHOLDER
+ * AND SIMPLE MECHANISM TO DISTINGUISH BETWEEN CONVERSATIONS.
+ */
+public class ConversationIdentity implements java.io.Externalizable {
+
+	public ConversationIdentity(String id, ConversationIdentityType type) {
+		m_id = id;
+		m_type = type;
+	}
+	
+	public String getId() {
+		return(m_id);
+	}
+	
+	public ConversationIdentityType getType() {
+		return(m_type);
+	}
+	
+	public int hashCode() {
+		return(m_id.hashCode());
+	}
+	
+	public boolean equals(Object obj) {
+		boolean ret=false;
+		
+		if (obj instanceof ConversationIdentity) {
+			ret = ((ConversationIdentity)obj).getId().equals(m_id);
+		}
+		
+		return(ret);
+	}
+	
+    public void writeExternal(ObjectOutput out) throws IOException {
+    	out.writeUTF(m_id);
+    	out.writeObject(m_type);
+    }
+    
+    public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
+    	m_id = in.readUTF();
+    	m_type = (ConversationIdentityType)in.readObject();
+    }
+
+    private String m_id=null;
+	private ConversationIdentityType m_type=null;
+}

Added: tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/ConversationIdentityType.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/ConversationIdentityType.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/ConversationIdentityType.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,89 @@
+/*
+ * Copyright 2005-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 9 Oct 2008 : Initial version created by gary
+ */
+package org.scribble.monitor;
+
+import java.io.IOException;
+import java.io.ObjectInput;
+import java.io.ObjectOutput;
+
+/**
+ * This class represents the type associated with
+ * a conversation identity.
+ */
+public class ConversationIdentityType implements java.io.Externalizable {
+
+	/**
+	 * This constructor initializes the type with
+	 * a name.
+	 * 
+	 * @param name The type name
+	 */
+	public ConversationIdentityType(String name) {
+		m_typeName = name;
+	}
+
+	/**
+	 * Default constructor.
+	 */
+	public ConversationIdentityType() {
+	}
+	
+	/**
+	 * This method sets the type name.
+	 * 
+	 * @param typeName The type name
+	 */
+	public void setTypeName(String typeName) {
+		m_typeName = typeName;
+	}
+	
+	/**
+	 * This method returns the type name.
+	 * 
+	 * @return The type name
+	 */
+	public String getTypeName() {
+		return(m_typeName);
+	}
+	
+	public int hashCode() {
+		return(m_typeName.hashCode());
+	}
+	
+	public boolean equals(Object obj) {
+		boolean ret=false;
+	
+		if (obj instanceof ConversationIdentityType) {
+			ret = ((ConversationIdentityType)obj).getTypeName().equals(m_typeName);
+		}
+
+		return(ret);
+	}
+	
+    public void writeExternal(ObjectOutput out) throws IOException {
+    	out.writeUTF(m_typeName);
+    }
+    
+    public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
+    	m_typeName = in.readUTF();
+    }
+
+    private String m_typeName=null;
+}

Added: tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/ConversationListener.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/ConversationListener.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/ConversationListener.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,60 @@
+/*
+ * Copyright 2005-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 5 Oct 2008 : Initial version created by gary
+ */
+package org.scribble.monitor;
+
+/**
+ * This interface represents a conversation listener that will
+ * be informed of relevant situations while monitor
+ * a conversation against a stream of messages.
+ */
+public interface ConversationListener {
+
+	/**
+	 * This method indicates the start of a conversation
+	 * instance.
+	 * 
+	 * @param ids The conversation identities
+	 */
+	public void started(ConversationIdentity[] ids);
+	
+	/**
+	 * This method indicates that the supplied 'sent'
+	 * message has been monitored successfully against
+	 * the conversation instance.
+	 * 
+	 * @param mesg The message
+	 */
+	public void sent(Message mesg);
+	
+	public void received(Message mesg);
+	
+	public void sentOutOfSequence(Message mesg);
+	
+	public void receivedOutOfSequence(Message mesg);
+	
+	/**
+	 * This method indicates the end of a conversation
+	 * instance.
+	 * 
+	 * @param ids The conversation identities
+	 */
+	public void finished(ConversationIdentity[] ids);
+	
+}

Added: tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/ConversationManager.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/ConversationManager.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/ConversationManager.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,74 @@
+/*
+ * Copyright 2005-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 5 Oct 2008 : Initial version created by gary
+ */
+package org.scribble.monitor;
+
+import org.scribble.monitor.model.ConversationType;
+
+/**
+ * This interface represents the manager of the conversation instances
+ * being monitored.
+ *
+ */
+public interface ConversationManager {
+
+	/**
+	 * This method creates a new conversation instance,
+	 * and registers the supplied description as the top 
+	 * level node to be monitored.
+	 * 
+	 * @param description The top level description node
+	 * @return The newly created conversation
+	 */
+	public Conversation createConversation(ConversationType description);
+	
+	/**
+	 * This method returns the conversation instances
+	 * associated with the supplied conversation identities.
+	 * 
+	 * @param ids The conversation identities
+	 * @return The list of conversation instances
+	 */
+	public java.util.List<Conversation> getConversations(ConversationIdentity[] ids);
+	
+	/**
+	 * This method returns the conversation instance associated with
+	 * the supplied conversation type name and identities.
+	 * 
+	 * @param name The conversation type name
+	 * @param ids The identities
+	 * @return The conversation instance, or null if not found
+	 */
+	public Conversation getConversation(ConversationTypeName name, ConversationIdentity[] ids);
+	
+	/**
+	 * This method updates the supplied conversation.
+	 *  
+	 * @param conversation The conversation
+	 */
+	public void updateConversation(Conversation conversation);
+	
+	/**
+	 * This method removes the supplied conversation.
+	 *  
+	 * @param conversation The conversation
+	 */
+	public void removeConversation(Conversation conversation);
+	
+}

Added: tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/ConversationTypeName.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/ConversationTypeName.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/ConversationTypeName.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,80 @@
+/*
+ * Copyright 2005-9 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 17 May 2009 : Initial version created by gary
+ */
+package org.scribble.monitor;
+
+import java.io.IOException;
+import java.io.ObjectInput;
+import java.io.ObjectOutput;
+
+/**
+ * This class defines the name of the conversation type.
+ *
+ */
+public class ConversationTypeName implements java.io.Externalizable {
+
+	/**
+	 * The default constructor.
+	 */
+	public ConversationTypeName() {
+	}
+	
+	/**
+	 * This method sets the name of the conversation type.
+	 * 
+	 * @param name The name
+	 */
+	public void setName(String name) {
+		m_name = name;
+	}
+	
+	/**
+	 * This method returns the name of the conversation type.
+	 * 
+	 * @return The name
+	 */
+	public String getName() {
+		return(m_name);
+	}
+	
+	public int hashCode() {
+		return(m_name.hashCode());
+	}
+	
+	public boolean equals(Object obj) {
+		boolean ret=false;
+		
+		if (obj instanceof ConversationTypeName &&
+				((ConversationTypeName)obj).getName().equals(getName())) {
+			ret = true;
+		}
+		
+		return(ret);
+	}
+	
+    public void writeExternal(ObjectOutput out) throws IOException {    	
+    	out.writeUTF(m_name);
+    }
+    
+    public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {   	
+    	m_name = in.readUTF();
+    }
+
+    private String m_name=null;
+}

Added: tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/ConversationTypeRepository.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/ConversationTypeRepository.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/ConversationTypeRepository.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,57 @@
+/*
+ * Copyright 2005-9 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 17 May 2009 : Initial version created by gary
+ */
+package org.scribble.monitor;
+
+import org.scribble.monitor.model.ConversationType;
+
+/**
+ * This interface represents the repository of conversation types.
+ *
+ */
+public interface ConversationTypeRepository {
+
+	/**
+	 * This method adds the conversation type to the repository.
+	 * 
+	 * @param convType The conversation type
+	 * @throws MonitorException Failed to add conversation type
+	 */
+	public void addConversationType(ConversationType convType)
+						throws MonitorException;
+	
+	/**
+	 * This method removes the conversation type associated with
+	 * the supplied name, from the repository.
+	 * 
+	 * @param name The name
+	 */
+	public void removeConversationType(ConversationTypeName name)
+						throws MonitorException;
+	
+	/**
+	 * This method returns the conversation type associated with the
+	 * supplied name.
+	 * 
+	 * @param name The conversation type name
+	 * @return The conversation type, or null if not found
+	 */
+	public ConversationType getConversationType(ConversationTypeName name);
+	
+}

Added: tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/InvokedConversationFinishedEvent.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/InvokedConversationFinishedEvent.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/InvokedConversationFinishedEvent.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,57 @@
+/*
+ * Copyright 2005-9 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 17 May 2009 : Initial version created by gary
+ */
+package org.scribble.monitor;
+
+/**
+ * This class provides the base type for monitor based events.
+ *
+ */
+public class InvokedConversationFinishedEvent extends MonitorEvent {
+
+	/**
+	 * The constructor for the invoked conversation finished event.
+	 * 
+	 * @param name The conversation type name
+	 * @param ids The conversation instance identities
+	 * @param invoked The invoked conversation type name
+	 */
+	public InvokedConversationFinishedEvent(ConversationTypeName name, ConversationIdentity[] ids,
+						ConversationTypeName invoked) {
+		super(name, ids);
+		
+		m_invokedConversationTypeName = invoked;
+	}
+
+	/**
+	 * This method indicates whether this is an invoked conversation
+	 * finished event.
+	 * 
+	 * @return Whether this is an invoked conversation finished event
+	 */
+	public boolean isInvokedConversationFinishedEvent() {
+		return(true);
+	}
+	
+	public ConversationTypeName getInvokedConversationTypeName() {
+		return(m_invokedConversationTypeName);
+	}
+	
+	private ConversationTypeName m_invokedConversationTypeName=null;
+}

Added: tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/Message.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/Message.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/Message.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,126 @@
+/*
+ * Copyright 2005-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 4 Oct 2008 : Initial version created by gary
+ */
+package org.scribble.monitor;
+
+/**
+ * This class represents a message being monitored.
+ */
+public class Message {
+
+	/**
+	 * This is the default constructor for the message.
+	 */
+	public Message() {
+	}
+	
+	/**
+	 * This constructor initializes the message signature
+	 * and conversation identity associated with the message.
+	 * 
+	 * @param msig The message signature
+	 * @param ids The conversation identities
+	 */
+	public Message(MessageSignature msig, ConversationIdentity[] ids) {
+		m_signature = msig;
+		m_ids = ids;
+	}
+	
+	/**
+	 * This constructor initializes the message signature
+	 * and conversation identity associated with the message.
+	 * 
+	 * @param msig The message signature
+	 * @param ids The conversation identities
+	 * @param content The message content
+	 */
+	public Message(MessageSignature msig, ConversationIdentity[] ids,
+						Object content) {
+		m_signature = msig;
+		m_ids = ids;
+		m_content = content;
+	}
+	
+	/**
+	 * This method sets the content of the message.
+	 * 
+	 * @param content The content
+	 */
+	public void setContent(Object content) {
+		m_content = content;
+	}
+	
+	/**
+	 * This method returns the optional content of the message.
+	 * Monitoring a message only requires the message content
+	 * if it will subsequently be evaluated as part of monitoring
+	 * the behaviour. Otherwise, the only information required
+	 * is the message signature, and the conversation identity.
+	 * 
+	 * @return The content, or null if not defined
+	 */
+	public Object getContent() {
+		return(m_content);
+	}
+	
+	/**
+	 * This method sets the message signature.
+	 * 
+	 * @param msig The message signature
+	 */
+	public void setSignature(MessageSignature msig) {
+		m_signature = msig;
+	}
+	
+	/**
+	 * This method returns the message signature.
+	 * 
+	 * @return The message signature
+	 */
+	public MessageSignature getSignature() {
+		return(m_signature);
+	}
+	
+	/**
+	 * This method sets the conversation identities.
+	 * 
+	 * @param ids The conversation identities
+	 */
+	public void setIdentities(ConversationIdentity[] ids) {
+		m_ids = ids;
+	}
+	
+	/**
+	 * This method returns the conversation identities.
+	 * 
+	 * @return The conversation identities
+	 */
+	public ConversationIdentity[] getIdentities() {
+		return(m_ids);
+	}
+	
+	public String toString() {
+		String ret="Message [type="+m_signature+"]";
+		return(ret);
+	}
+	
+	private Object m_content=null;
+	private MessageSignature m_signature=null;
+	private ConversationIdentity[] m_ids=null;
+}

Added: tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/MessageSignature.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/MessageSignature.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/MessageSignature.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,172 @@
+/*
+ * Copyright 2005-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 4 Oct 2008 : Initial version created by gary
+ */
+package org.scribble.monitor;
+
+import java.io.IOException;
+import java.io.ObjectInput;
+import java.io.ObjectOutput;
+
+/**
+ * This class represents the message signature.
+ * 
+ * NOTE: When using singleton message signatures, will need to
+ * know whether environment is using operations or not. If
+ * not, then description and messages should use a
+ * signature regardless of the operation name - and
+ * preferrably the operation names should not be set.
+ */
+public class MessageSignature implements java.io.Externalizable {
+
+	/**
+	 * This is the default constructor.
+	 */
+	public MessageSignature() {
+		m_operation = _NULL;
+		m_types = _EMPTY_TYPES;
+	}
+	
+	/**
+	 * This constructor initializes the message signature
+	 * with an optional operation name and array
+	 * of types.
+	 * 
+	 * @param op The optional operation
+	 * @param types The array of types
+	 */
+	public MessageSignature(String op, String[] types) {
+		m_operation = op;
+		
+		if (m_operation == null) {
+			m_operation = _NULL;
+		}
+		
+		if (types != null) {
+			m_types = types;
+		} else {
+			m_types = _EMPTY_TYPES;
+		}
+	}
+	
+	/**
+	 * This constructor initializes the message signature
+	 * with a single type.
+	 * 
+	 * @param type The type
+	 */
+	public MessageSignature(String type) {
+		m_operation = _NULL;
+		m_types = new String[]{type};
+	}
+	
+	/**
+	 * This method returns the optional operation name.
+	 * 
+	 * @return The operation, or null if not defined
+	 */
+	public String getOperation() {
+		return(m_operation);
+	}
+	
+	/**
+	 * This method returns the array of types.
+	 * 
+	 * @return The array of types
+	 */
+	public String[] getTypes() {
+		return(m_types);
+	}
+	
+	public int hashCode() {
+		return(m_operation.hashCode());
+	}
+	
+	public boolean equals(Object obj) {
+		boolean ret=false;
+		
+		if (obj instanceof MessageSignature) {
+			MessageSignature other=(MessageSignature)obj;
+			
+			if (getTypes().length == other.getTypes().length) {
+				ret = other.getOperation().equals(getOperation());
+			
+				for (int i=0; ret && i < getTypes().length; i++) {
+					ret = other.getTypes()[i].equals(getTypes()[i]);
+				}
+			}
+		}
+		
+		return(ret);
+	}
+	
+	public String toString() {
+		String ret=null;
+		
+		if (m_operation != null) {
+			ret = m_operation+"(";
+		}
+		
+		if (m_types != null) {
+			for (int i=0; i < m_types.length; i++) {
+				if (i > 0) {
+					ret += ",";
+				}
+				
+				if (ret == null) {
+					ret = "";
+				}
+				ret += m_types[i];
+			}
+		}
+		
+		if (m_operation != null) {
+			ret += ")";
+		}
+		
+		return(ret);
+	}
+	
+    public void writeExternal(ObjectOutput out) throws IOException {
+    	
+    	out.writeUTF(m_operation);
+    	out.writeInt(m_types.length);
+    	
+    	for (int i=0; i < m_types.length; i++) {
+    		out.writeUTF(m_types[i]);
+    	}
+    }
+    
+    public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
+    	
+    	m_operation = in.readUTF();
+    	int num=in.readInt();
+    	
+    	m_types = new String[num];
+    	
+    	for (int i=0; i < num; i++) {
+    		m_types[i] = in.readUTF();
+    	}
+    }
+
+    private String m_operation=null;
+	private String[] m_types=_EMPTY_TYPES;
+	
+	private static final String _NULL="null";
+	private static final String[] _EMPTY_TYPES=new String[0];
+}

Added: tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/Monitor.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/Monitor.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/Monitor.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,69 @@
+/*
+ * Copyright 2005-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 4 Oct 2008 : Initial version created by gary
+ */
+package org.scribble.monitor;
+
+/**
+ * This interface represents the monitor used to compare
+ * sent and received messages against a description of the
+ * expected behaviour.
+ */
+public interface Monitor {
+
+	/**
+	 * This method adds a conversation type name to the list
+	 * to be observed.
+	 * 
+	 * @param name The conversation type name
+	 * @throws MonitorException Failed to locate conversation type
+	 * 					for supplied name
+	 */
+	public void observe(ConversationTypeName name) throws MonitorException;
+	
+	/**
+	 * This method processes the 'sent' message.
+	 * 
+	 * @param mesg The message
+	 * @return Whether the 'sent' message has been matched
+	 */
+	public boolean sent(Message mesg);
+	
+	/**
+	 * This method processes the 'received' message.
+	 * 
+	 * @param mesg The message
+	 * @return Whether the 'received' message has been matched
+	 */
+	public boolean received(Message mesg);
+
+	/**
+	 * This method sets the conversation listener, to enable
+	 * an interested client to be informed of relevant
+	 * monitoring situations.
+	 * 
+	 * @param l The listener
+	 */
+	public void setConversationListener(ConversationListener l);
+	
+	/**
+	 * This method closes the monitor.
+	 */
+	public void close();
+	
+}

Added: tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/MonitorContext.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/MonitorContext.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/MonitorContext.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,64 @@
+/*
+ * Copyright 2005-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 6 Oct 2008 : Initial version created by gary
+ */
+package org.scribble.monitor;
+
+/**
+ * This interface represents the monitor context.
+ */
+public interface MonitorContext {
+
+	/**
+	 * This method returns the conversation manager.
+	 * 
+	 * @return The conversation manager
+	 */
+	public ConversationManager getConversationManager();
+	
+	/**
+	 * This method returns the conversation type repository.
+	 * 
+	 * @return The conversation type repository
+	 */
+	public ConversationTypeRepository getConversationTypeRepository();
+	
+	/**
+	 * This method dispatches the supplied monitor event to
+	 * the monitor engine.
+	 * 
+	 * @param event The event
+	 * @return Whether the event was handled
+	 */
+	public boolean dispatch(MonitorEvent event);
+	
+	/**
+	 * This method adds a listener for monitor events.
+	 * 
+	 * @param l The listener
+	 */
+	public void addMonitorListener(MonitorListener l);
+	
+	/**
+	 * This method removes a listener for monitor events.
+	 * 
+	 * @param l The listener
+	 */
+	public void removeMonitorListener(MonitorListener l);
+
+}

Added: tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/MonitorEvent.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/MonitorEvent.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/MonitorEvent.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,67 @@
+/*
+ * Copyright 2005-9 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 17 May 2009 : Initial version created by gary
+ */
+package org.scribble.monitor;
+
+/**
+ * This class provides the base type for monitor based events.
+ *
+ */
+public class MonitorEvent {
+
+	/**
+	 * The default constructor.
+	 */
+	public MonitorEvent(ConversationTypeName name, ConversationIdentity[] ids) {
+		m_name = name;
+		m_ids = ids;
+	}
+
+	/**
+	 * This method returns the conversation type name.
+	 * 
+	 * @return The conversation type name
+	 */
+	public ConversationTypeName getName() {
+		return(m_name);
+	}
+	
+	/**
+	 * This method returns the conversation identities associated with
+	 * the monitor event.
+	 * 
+	 * @return The identities
+	 */
+	public ConversationIdentity[] getIdentities() {
+		return(m_ids);
+	}
+
+	/**
+	 * This method indicates whether this is an invoked conversation
+	 * finished event.
+	 * 
+	 * @return Whether this is an invoked conversation finished event
+	 */
+	public boolean isInvokedConversationFinishedEvent() {
+		return(false);
+	}
+
+	private ConversationTypeName m_name=null;
+	private ConversationIdentity[] m_ids=null; 
+}

Added: tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/MonitorException.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/MonitorException.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/MonitorException.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,48 @@
+/*
+ * Copyright 2005-9 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 17 May 2009 : Initial version created by gary
+ */
+package org.scribble.monitor;
+
+/**
+ * General monitor based exceptions.
+ *
+ */
+public class MonitorException extends Exception {
+
+	private static final long serialVersionUID = 1246113653556768226L;
+
+	/**
+	 * This constructor initializes the exception with a message.
+	 * 
+	 * @param mesg The message
+	 */
+	public MonitorException(String mesg) {
+		super(mesg);
+	}
+	
+	/**
+	 * This constructor initializes the exception with a message.
+	 * 
+	 * @param mesg The message
+	 * @param t The associated exception
+	 */
+	public MonitorException(String mesg, Throwable t) {
+		super(mesg, t);
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/MonitorFactory.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/MonitorFactory.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/MonitorFactory.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,64 @@
+/*
+ * Copyright 2005-9 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 10 May 2009 : Initial version created by gary
+ */
+package org.scribble.monitor;
+
+import org.scribble.monitor.impl.DefaultMonitor;
+
+/**
+ * This class provides a factory for creating monitors.
+ */
+public class MonitorFactory implements MonitoringService {
+
+	/**
+	 * This method creates a monitor to be run in the supplied
+	 * context.
+	 * 
+	 * @param context The monitor context
+	 * @return The monitor
+	 * @throws MonitorException Failed to create monitor
+	 */
+	public static Monitor getMonitor(MonitorContext context)
+							throws MonitorException {
+		DefaultMonitor ret=new DefaultMonitor();
+		
+		ret.setMonitorContext(context);
+		
+		if (ret instanceof MonitorListener) {
+			context.addMonitorListener((MonitorListener)ret);
+		}
+		
+		return(ret);
+	}
+	
+	/**
+	 * This method creates a monitor to be run in the supplied
+	 * context.
+	 * 
+	 * @param context The monitor context
+	 * @return The monitor
+	 * @throws MonitorException Failed to
+	 * 					create monitor due to invalid arguments
+	 */
+	public Monitor createMonitor(MonitorContext context)
+						throws MonitorException {
+		return(getMonitor(context));
+	}
+
+}

Added: tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/MonitorListener.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/MonitorListener.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/MonitorListener.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,36 @@
+/*
+ * Copyright 2005-9 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 18 May 2009 : Initial version created by gary
+ */
+package org.scribble.monitor;
+
+/**
+ * This interface represents a listener for monitoring events.
+ *
+ */
+public interface MonitorListener {
+
+	/**
+	 * This method is invoked to handle a monitor event.
+	 * 
+	 * @param me The monitor event
+	 * @return Whether the monitor event was handled
+	 */
+	public boolean onMonitorEvent(MonitorEvent me);
+	
+}

Added: tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/MonitoringService.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/MonitoringService.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/MonitoringService.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,39 @@
+/*
+ * Copyright 2005-9 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 10 May 2009 : Initial version created by gary
+ */
+package org.scribble.monitor;
+
+/**
+ * This interface represents the monitoring service.
+ */
+public interface MonitoringService {
+
+	/**
+	 * This method creates a monitor to be run in the supplied
+	 * context.
+	 * 
+	 * @param context The monitor context
+	 * @return The monitor
+	 * @throws java.lang.IllegalArgumentException Failed to
+	 * 					create monitor due to invalid arguments
+	 */
+	public Monitor createMonitor(MonitorContext context)
+					throws MonitorException;
+	
+}

Added: tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/Result.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/Result.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/Result.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,31 @@
+/*
+ * Copyright 2005-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 5 Oct 2008 : Initial version created by gary
+ */
+package org.scribble.monitor;
+
+/**
+ * This enumeration reflects the possible results that may occur
+ * when processing a message or monitor event against a conversation
+ * instance.
+ */
+public enum Result {
+	Handled,
+	NotHandled,
+	NotRelevant
+}

Added: tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/expression/Expression.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/expression/Expression.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/expression/Expression.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,49 @@
+/*
+ * Copyright 2005-9 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 21 Feb 2009 : Initial version created by gary
+ */
+package org.scribble.monitor.expression;
+
+import org.scribble.monitor.model.ConversationContext;
+
+public interface Expression {
+
+	/**
+	 * This method evaluates the supplied conversation
+	 * context against the expression.
+	 * 
+	 * @param context The conversation context
+	 * @return Whether the expression evaluates to true
+	 * @throws Exception Failed to evaluate expression
+	 */
+	public boolean evaluate(ConversationContext context)
+					throws Exception;
+
+	/**
+	 * This method evaluates the supplied value against
+	 * the expression.
+	 * 
+	 * @param context The conversation context
+	 * @param value The value to be evaluated
+	 * @return The result of the evaluation
+	 * @throws Exception Failed to evaluate expression
+	 */
+	public Object evaluate(ConversationContext context, Object value)
+							throws Exception;
+
+}

Added: tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/expression/ExpressionFactory.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/expression/ExpressionFactory.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/expression/ExpressionFactory.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,42 @@
+/*
+ * Copyright 2005-9 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 22 Feb 2009 : Initial version created by gary
+ */
+package org.scribble.monitor.expression;
+
+import org.scribble.monitor.*;
+
+/**
+ * This interface represents an expression factory responsible
+ * for returning an expression implementation initialised
+ * with the appropriate expression details.
+ */
+public interface ExpressionFactory {
+
+	/**
+	 * This method returns the expression implementation
+	 * to process the supplied argument.
+	 * 
+	 * @param expr The expression details
+	 * @return The expression
+	 * @throws Failed to get the expression
+	 */
+	public Expression getExpression(Object expr)
+					throws Exception;
+	
+}

Added: tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/expression/Function.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/expression/Function.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/expression/Function.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,54 @@
+/*
+ * Copyright 2005-9 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 21 Feb 2009 : Initial version created by gary
+ */
+package org.scribble.monitor.expression;
+
+/**
+ * This interface represents a function.
+ */
+public interface Function {
+
+	/**
+	 * This method returns the optional namespace associated
+	 * with the function.
+	 * 
+	 * @return The optional function namespace
+	 */
+	public String getNamespace();
+	
+	/**
+	 * This method returns the function name.
+	 * 
+	 * @return The optional function namespace
+	 */
+	public String getName();
+	
+	/**
+	 * This method invokes the method on the supplied
+	 * context, using the specified parameters.
+	 * 
+	 * @param context The conversation context
+	 * @param efactory The expression factory
+	 * @param args The function arguments
+	 * @return The return value from the function
+	 */
+	public Object invoke(FunctionContext context,
+						java.util.List<Object> args);
+	
+}

Added: tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/expression/FunctionContext.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/expression/FunctionContext.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/expression/FunctionContext.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,52 @@
+/*
+ * Copyright 2005-9 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 22 Feb 2009 : Initial version created by gary
+ */
+package org.scribble.monitor.expression;
+
+import org.scribble.monitor.*;
+import org.scribble.monitor.model.ConversationContext;
+
+/**
+ * This interface provides the context information required
+ * by the function.
+ */
+public interface FunctionContext {
+
+	/**
+	 * This method returns the conversation context.
+	 * 
+	 * @return The conversation context
+	 */
+	public ConversationContext getConversationContext();
+	
+	/**
+	 * This method returns the expression factory.
+	 * 
+	 * @return The expression factory
+	 */
+	public ExpressionFactory getExpressionFactory();
+	
+	/**
+	 * This method returns the namespace resolver.
+	 * 
+	 * @return The namespace resolver
+	 */
+	public NamespaceResolver getNamespaceResolver();
+	
+}

Added: tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/expression/FunctionRegistry.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/expression/FunctionRegistry.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/expression/FunctionRegistry.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,76 @@
+/*
+ * Copyright 2005-9 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 21 Feb 2009 : Initial version created by gary
+ */
+package org.scribble.monitor.expression;
+
+/**
+ * This class provides the function registry.
+ */
+public class FunctionRegistry {
+
+	/**
+	 * The default constructor.
+	 */
+	protected FunctionRegistry() {
+	}
+	
+	/**
+	 * This method returns the singleton function registry.
+	 * 
+	 * @return The singleton function registry
+	 */
+	public static FunctionRegistry instance() {
+		return(m_instance);
+	}
+	
+	/**
+	 * This method returns the function associated with
+	 * the supplied namespace and local name.
+	 * 
+	 * @param namespace The namespace
+	 * @param localName The local name
+	 * @return The function, or null if not found
+	 */
+	public Function getFunction(String namespace, String localName) {
+		Function ret=null;
+		
+		String key=getKey(namespace, localName);
+		
+		ret = m_functions.get(key);
+		
+		return(ret);
+	}
+
+	/**
+	 * The method derives the key for locating the function
+	 * associated with the supplied namespace and local name.
+	 * 
+	 * @param namespace The namespace
+	 * @param localName The local name
+	 * @return The key
+	 */
+	protected String getKey(String namespace, String localName) {
+		return(namespace+":"+localName);
+	}
+	
+	private static FunctionRegistry m_instance=null;
+	
+	private java.util.Map<String,Function> m_functions=
+				new java.util.HashMap<String,Function>();
+}

Added: tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/expression/NamespaceResolver.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/expression/NamespaceResolver.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/expression/NamespaceResolver.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,70 @@
+/*
+ * Copyright 2005-9 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 22 Feb 2009 : Initial version created by gary
+ */
+package org.scribble.monitor.expression;
+
+import java.io.IOException;
+import java.io.ObjectInput;
+import java.io.ObjectOutput;
+
+/**
+ * This interface provides the prefix namespace resolution
+ * capability.
+ */
+public class NamespaceResolver implements java.io.Externalizable {
+
+	/**
+	 * The default constructor.
+	 */
+	public NamespaceResolver() {
+	}
+	
+	/**
+	 * This method registers the namespace against the
+	 * prefix.
+	 * 
+	 * @param prefix The prefix
+	 * @param namespace The namespace
+	 */
+	public void register(String prefix, String namespace) {
+		m_namespace.put(prefix, namespace);
+	}
+	
+	/**
+	 * This method returns the namespace associated with
+	 * the supplied prefix.
+	 * 
+	 * @param prefix The prefix
+	 * @return The namespace or null if not found
+	 */
+	public String getNamespace(String prefix) {
+		return(m_namespace.get(prefix));
+	}
+	
+    public void writeExternal(ObjectOutput out) throws IOException {
+    	out.writeObject(m_namespace);
+    }
+    
+    public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
+    	m_namespace = (java.util.Map<String, String>)in.readObject();
+    }
+
+	private java.util.Map<String,String> m_namespace=
+		new java.util.HashMap<String, String>();
+}

Added: tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/expression/jaxen/JaxenDOMExpression.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/expression/jaxen/JaxenDOMExpression.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/expression/jaxen/JaxenDOMExpression.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,175 @@
+/*
+ * Copyright 2005-9 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 21 Feb 2009 : Initial version created by gary
+ */
+package org.scribble.monitor.expression.jaxen;
+
+import java.io.IOException;
+import java.io.ObjectInput;
+import java.io.ObjectOutput;
+
+import org.jaxen.*;
+import org.jaxen.dom.*;
+
+import org.scribble.monitor.*;
+import org.scribble.monitor.expression.*;
+import org.scribble.monitor.model.ConversationContext;
+
+public class JaxenDOMExpression implements Expression,
+					ExpressionFactory, java.io.Externalizable {
+
+	/**
+	 * The default constructor.
+	 */
+	public JaxenDOMExpression() {
+	}
+	
+	/**
+	 * This constructor is initialized with the xpath
+	 * expression.
+	 * 
+	 * @param xpath The xpath expression
+	 * @throws Exception Failed to initialize the expression
+	 */
+	public JaxenDOMExpression(String xpath)
+					throws Exception {
+		m_xpath = new DOMXPath(xpath);
+		m_xpath.setVariableContext(m_variableContext);
+		m_xpath.setFunctionContext(m_functionContext);
+
+		m_xpath.setNamespaceContext(new NamespaceContextImpl(m_namespaceResolver));
+	}
+	
+	/**
+	 * This constructor is initialized with the xpath
+	 * expression.
+	 * 
+	 * @param xpath The xpath expression
+	 * @param resolver The namespace resolver
+	 * @throws Exception Failed to initialize the expression
+	 */
+	protected JaxenDOMExpression(String xpath, NamespaceResolver resolver)
+					throws Exception {		
+		m_xpath = new DOMXPath(xpath);
+		m_xpath.setVariableContext(m_variableContext);
+		m_xpath.setFunctionContext(m_functionContext);
+
+		m_namespaceResolver = resolver;
+
+		m_xpath.setNamespaceContext(new NamespaceContextImpl(m_namespaceResolver));
+	}
+
+	/**
+	 * This method returns the namespace resolver.
+	 * 
+	 * @return The namespace resolver
+	 */
+	public NamespaceResolver getNamespaceResolver() {
+		return(m_namespaceResolver);
+	}
+	
+	/**
+	 * This method evaluates the supplied conversation
+	 * context against the expression.
+	 * 
+	 * @param context The conversation context
+	 * @return Whether the expression evaluates to true
+	 * @throws Exception Failed to evaluate expression
+	 */
+	public boolean evaluate(ConversationContext context)
+						throws Exception {
+		boolean ret=false;
+		
+		m_xpath.setFunctionContext(m_functionContext);
+
+		((JaxenDOMVariableContextImpl)m_xpath.getVariableContext()).setConversationContext(context);
+		((JaxenFunctionContextImpl)m_xpath.getFunctionContext()).setConversationContext(context);
+		((JaxenFunctionContextImpl)m_xpath.getFunctionContext()).setExpressionFactory(this);
+		((JaxenFunctionContextImpl)m_xpath.getFunctionContext()).setNamespaceResolver(m_namespaceResolver);
+		
+		Object obj=m_xpath.evaluate(null);
+
+		if (obj instanceof Boolean) {
+			ret = ((Boolean)obj).booleanValue();
+		}
+
+		return(ret);
+	}
+	
+	/**
+	 * This method evaluates the supplied value against
+	 * the expression.
+	 * 
+	 * @param context The conversation context
+	 * @param value The value to be evaluated
+	 * @return The result of the evaluation
+	 * @throws Exception Failed to evaluate expression
+	 */
+	public Object evaluate(ConversationContext context, Object value)
+							throws Exception {
+		Object ret=null;
+				
+		m_xpath.setFunctionContext(m_functionContext);
+
+		((JaxenDOMVariableContextImpl)m_xpath.getVariableContext()).setConversationContext(context);
+		((JaxenFunctionContextImpl)m_xpath.getFunctionContext()).setConversationContext(context);
+		((JaxenFunctionContextImpl)m_xpath.getFunctionContext()).setExpressionFactory(this);
+		((JaxenFunctionContextImpl)m_xpath.getFunctionContext()).setNamespaceResolver(m_namespaceResolver);
+
+		ret = m_xpath.evaluate(value);
+		
+		return(ret);
+	}
+	
+	/**
+	 * This method returns the expression implementation
+	 * to process the supplied argument.
+	 * 
+	 * @param expr The expression details
+	 * @return The expression
+	 * @throws Failed to get the expression
+	 */
+	public Expression getExpression(Object expr)
+					throws Exception {
+		Expression ret=null;
+		
+		if (expr instanceof String) {
+			ret = new JaxenDOMExpression((String)expr, m_namespaceResolver);
+			
+		} else {
+			throw new Exception("Expecting a 'string' expression");
+		}
+		
+		return(ret);
+	}
+
+    public void writeExternal(ObjectOutput out) throws IOException {
+    	out.writeObject(m_xpath);
+    	out.writeObject(m_namespaceResolver);
+    }
+    
+    public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
+    	m_xpath = (XPath)in.readObject();
+    	m_namespaceResolver = (NamespaceResolver)in.readObject();
+    }
+
+    private XPath m_xpath=null;
+	private JaxenDOMVariableContextImpl m_variableContext=new JaxenDOMVariableContextImpl();
+	private transient JaxenFunctionContextImpl m_functionContext=new JaxenFunctionContextImpl();
+	private NamespaceResolver m_namespaceResolver=new NamespaceResolver();
+}

Added: tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/expression/jaxen/JaxenDOMVariableContextImpl.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/expression/jaxen/JaxenDOMVariableContextImpl.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/expression/jaxen/JaxenDOMVariableContextImpl.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,50 @@
+/*
+ * Copyright 2005-9 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 21 Feb 2009 : Initial version created by gary
+ */
+package org.scribble.monitor.expression.jaxen;
+
+import org.jaxen.UnresolvableException;
+import org.jaxen.VariableContext;
+import org.scribble.monitor.model.ConversationContext;
+
+public class JaxenDOMVariableContextImpl implements VariableContext,
+						java.io.Serializable {
+	
+	private static final long serialVersionUID = 1459699128232434000L;
+
+	public JaxenDOMVariableContextImpl() {
+	}
+		
+	public void setConversationContext(ConversationContext context) {
+		m_conversationContext = context;
+	}
+
+	public Object getVariableValue(String namespaceURI, String prefix,
+					String localName) throws UnresolvableException {
+		Object ret=null;
+
+		if (m_conversationContext != null) {
+			ret = m_conversationContext.getVariables().get(localName);
+		}
+		
+		return(ret);
+	}
+	
+	private transient ConversationContext m_conversationContext=null;
+}

Added: tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/expression/jaxen/JaxenFunctionContextImpl.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/expression/jaxen/JaxenFunctionContextImpl.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/expression/jaxen/JaxenFunctionContextImpl.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,121 @@
+/*
+ * Copyright 2005-9 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 22 Feb 2009 : Initial version created by gary
+ */
+package org.scribble.monitor.expression.jaxen;
+
+import java.util.List;
+
+import org.jaxen.*;
+import org.scribble.monitor.expression.ExpressionFactory;
+import org.scribble.monitor.expression.NamespaceResolver;
+import org.scribble.monitor.model.ConversationContext;
+
+public class JaxenFunctionContextImpl extends XPathFunctionContext
+			implements org.scribble.monitor.expression.FunctionContext {
+	
+	public JaxenFunctionContextImpl() {
+		super(true);
+	}
+	
+	public void setConversationContext(ConversationContext context) {
+		m_conversationContext = context;
+	}
+	
+	public void setExpressionFactory(ExpressionFactory efactory) {
+		m_expressionFactory = efactory;
+	}
+	
+	public void setNamespaceResolver(NamespaceResolver resolver) {
+		m_namespaceResolver = resolver;
+	}
+
+	/**
+	 * This method returns the conversation context.
+	 * 
+	 * @return The conversation context
+	 */
+	public ConversationContext getConversationContext() {
+		return(m_conversationContext);
+	}
+	
+	/**
+	 * This method returns the expression factory.
+	 * 
+	 * @return The expression factory
+	 */
+	public ExpressionFactory getExpressionFactory() {
+		return(m_expressionFactory);
+	}
+	
+	/**
+	 * This method returns the namespace resolver.
+	 * 
+	 * @return The namespace resolver
+	 */
+	public NamespaceResolver getNamespaceResolver() {
+		return(m_namespaceResolver);
+	}
+	
+	@Override
+	public Function getFunction(String namespaceURI,
+            String prefix,
+            String localName)
+            throws UnresolvableException {
+		Function ret=super.getFunction(namespaceURI, prefix, localName);
+		
+		if (ret == null) {
+			// Search the function registry
+			org.scribble.monitor.expression.Function function=
+				org.scribble.monitor.expression.FunctionRegistry.instance().getFunction(namespaceURI,
+								localName);
+			
+			if (function != null) {
+				ret = new FunctionProxy(function);
+			}
+			
+		}
+		
+		return(ret);
+	}
+	
+    private transient ConversationContext m_conversationContext=null;
+	private ExpressionFactory m_expressionFactory=null;
+	private NamespaceResolver m_namespaceResolver=null;
+	
+	public class FunctionProxy implements Function {
+		
+		public FunctionProxy(org.scribble.monitor.expression.Function function) {
+			m_function = function;
+		}
+
+		public Object call(Context context, List args)
+				throws FunctionCallException {
+			Object ret=null;
+			
+			if (m_function != null) {
+				ret = m_function.invoke(JaxenFunctionContextImpl.this,
+										args);
+			}
+			
+			return(ret);
+		}
+		
+		private org.scribble.monitor.expression.Function m_function=null;
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/expression/jaxen/JaxenJavaBeanExpression.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/expression/jaxen/JaxenJavaBeanExpression.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/expression/jaxen/JaxenJavaBeanExpression.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,183 @@
+/*
+ * Copyright 2005-9 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 21 Feb 2009 : Initial version created by gary
+ */
+package org.scribble.monitor.expression.jaxen;
+
+import java.io.IOException;
+import java.io.ObjectInput;
+import java.io.ObjectOutput;
+
+import org.jaxen.*;
+import org.jaxen.javabean.*;
+
+import org.scribble.monitor.*;
+import org.scribble.monitor.expression.*;
+import org.scribble.monitor.model.ConversationContext;
+
+/**
+ * This class provides the Jaxen JavaBean expression
+ * implementation.
+ */
+public class JaxenJavaBeanExpression implements Expression,
+							ExpressionFactory, java.io.Externalizable {
+
+	/**
+	 * The default constructor.
+	 */
+	public JaxenJavaBeanExpression() {
+	}
+	
+	/**
+	 * This constructor is initialized with the xpath
+	 * expression.
+	 * 
+	 * @param xpath The xpath expression
+	 * @throws Exception Failed to initialize the expression
+	 */
+	public JaxenJavaBeanExpression(String xpath)
+					throws Exception {
+		m_xpath = new JavaBeanXPath(xpath);
+		m_xpath.setVariableContext(m_variableContext);
+		m_xpath.setFunctionContext(m_functionContext);
+
+		m_xpath.setNamespaceContext(new NamespaceContextImpl(m_namespaceResolver));
+	}
+	
+	/**
+	 * This constructor is initialized with the xpath
+	 * expression.
+	 * 
+	 * @param xpath The xpath expression
+	 * @param resolver The namespace resolver
+	 * @throws Exception Failed to initialize the expression
+	 */
+	protected JaxenJavaBeanExpression(String xpath, NamespaceResolver resolver)
+					throws Exception {
+		m_xpath = new JavaBeanXPath(xpath);
+		m_xpath.setVariableContext(m_variableContext);
+		m_xpath.setFunctionContext(m_functionContext);
+		
+		m_namespaceResolver = resolver;
+
+		m_xpath.setNamespaceContext(new NamespaceContextImpl(m_namespaceResolver));
+	}
+	
+	/**
+	 * This method returns the namespace resolver.
+	 * 
+	 * @return The namespace resolver
+	 */
+	public NamespaceResolver getNamespaceResolver() {
+		return(m_namespaceResolver);
+	}
+
+	/**
+	 * This method evaluates the supplied conversation
+	 * context against the expression.
+	 * 
+	 * @param context The conversation context
+	 * @return Whether the expression evaluates to true
+	 * @throws Exception Failed to evaluate expression
+	 */
+	public boolean evaluate(ConversationContext context)
+						throws Exception {
+		boolean ret=false;
+		
+		m_xpath.setFunctionContext(m_functionContext);
+
+		((JaxenJavaBeanVariableContextImpl)m_xpath.getVariableContext()).setConversationContext(context);
+		((JaxenFunctionContextImpl)m_xpath.getFunctionContext()).setConversationContext(context);
+		((JaxenFunctionContextImpl)m_xpath.getFunctionContext()).setExpressionFactory(this);
+		((JaxenFunctionContextImpl)m_xpath.getFunctionContext()).setNamespaceResolver(m_namespaceResolver);
+		
+		Object obj=m_xpath.evaluate("");
+		
+		if (obj instanceof Boolean) {
+			ret = ((Boolean)obj).booleanValue();
+		}
+
+		return(ret);
+	}
+	
+	/**
+	 * This method evaluates the supplied value against
+	 * the expression.
+	 * 
+	 * @param context The conversation context
+	 * @param value The value to be evaluated
+	 * @return The result of the evaluation
+	 * @throws Exception Failed to evaluate expression
+	 */
+	public Object evaluate(ConversationContext context, Object value)
+							throws Exception {
+		Object ret=null;
+		
+		m_xpath.setFunctionContext(m_functionContext);
+
+		((JaxenJavaBeanVariableContextImpl)m_xpath.getVariableContext()).setConversationContext(context);
+		((JaxenFunctionContextImpl)m_xpath.getFunctionContext()).setConversationContext(context);
+		((JaxenFunctionContextImpl)m_xpath.getFunctionContext()).setExpressionFactory(this);
+		((JaxenFunctionContextImpl)m_xpath.getFunctionContext()).setNamespaceResolver(m_namespaceResolver);
+		
+		ret = m_xpath.evaluate(value);
+		
+		return(ret);
+	}
+	
+	/**
+	 * This method returns the expression implementation
+	 * to process the supplied argument.
+	 * 
+	 * @param expr The expression details
+	 * @return The expression
+	 * @throws Failed to get the expression
+	 */
+	public Expression getExpression(Object expr)
+					throws Exception {
+		Expression ret=null;
+		
+		if (expr instanceof String) {
+			ret = new JaxenJavaBeanExpression((String)expr, m_namespaceResolver);
+			
+		} else {
+			throw new Exception("Expecting a 'string' expression");
+		}
+		
+		return(ret);
+	}
+
+    public void writeExternal(ObjectOutput out) throws IOException {
+    	out.writeObject(m_xpath);
+    	out.writeObject(m_variableContext);
+    	out.writeObject(m_functionContext);
+    	out.writeObject(m_namespaceResolver);
+    }
+    
+    public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
+    	m_xpath = (XPath)in.readObject();
+    	m_variableContext = (JaxenJavaBeanVariableContextImpl)in.readObject();
+    	m_functionContext = (JaxenFunctionContextImpl)in.readObject();
+    	m_namespaceResolver = (NamespaceResolver)in.readObject();
+    }
+
+	private XPath m_xpath=null;
+	private JaxenJavaBeanVariableContextImpl m_variableContext=new JaxenJavaBeanVariableContextImpl();
+	private JaxenFunctionContextImpl m_functionContext=new JaxenFunctionContextImpl();
+	private NamespaceResolver m_namespaceResolver=new NamespaceResolver();
+}

Added: tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/expression/jaxen/JaxenJavaBeanVariableContextImpl.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/expression/jaxen/JaxenJavaBeanVariableContextImpl.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/expression/jaxen/JaxenJavaBeanVariableContextImpl.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,54 @@
+/*
+ * Copyright 2005-9 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 21 Feb 2009 : Initial version created by gary
+ */
+package org.scribble.monitor.expression.jaxen;
+
+import org.jaxen.UnresolvableException;
+import org.jaxen.VariableContext;
+import org.scribble.monitor.model.ConversationContext;
+
+public class JaxenJavaBeanVariableContextImpl implements VariableContext,
+						java.io.Serializable {
+	
+	private static final long serialVersionUID = 1459699128232434000L;
+
+	public JaxenJavaBeanVariableContextImpl() {
+	}
+		
+	public void setConversationContext(ConversationContext context) {
+		m_conversationContext = context;
+	}
+
+	public Object getVariableValue(String namespaceURI, String prefix,
+					String localName) throws UnresolvableException {
+		Object ret=null;
+
+		if (m_conversationContext != null) {
+			ret = m_conversationContext.getVariables().get(localName);
+			
+			if (ret != null) {
+				ret = new org.jaxen.javabean.Element(null, localName, ret);
+			}
+		}
+		
+		return(ret);
+	}
+	
+	private ConversationContext m_conversationContext=null;
+}

Added: tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/expression/jaxen/NamespaceContextImpl.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/expression/jaxen/NamespaceContextImpl.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/expression/jaxen/NamespaceContextImpl.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,76 @@
+/*
+ * Copyright 2005-9 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 22 Feb 2009 : Initial version created by gary
+ */
+package org.scribble.monitor.expression.jaxen;
+
+import java.io.IOException;
+import java.io.ObjectInput;
+import java.io.ObjectOutput;
+
+import org.scribble.monitor.expression.*;
+
+/**
+ * This class provides the mapping between the jaxen
+ * namespace context, and the namespace resolver.
+ */
+public class NamespaceContextImpl implements org.jaxen.NamespaceContext,
+						java.io.Externalizable {
+
+	/**
+	 * This is the default constructor.
+	 */
+	public NamespaceContextImpl() {
+	}
+	
+	/**
+	 * The constructor initialised with the namespace
+	 * resolver.
+	 * 
+	 * @param resolver The namespace resolver
+	 */
+	public NamespaceContextImpl(NamespaceResolver resolver) {
+		m_namespaceResolver = resolver;
+	}
+
+	/**
+	 * Translate the prefix to a namespace.
+	 * 
+	 * @param prefix The prefix
+	 * @return The namespace
+	 */
+	public String translateNamespacePrefixToUri(String prefix) {
+		String ret=null;
+		
+		if (m_namespaceResolver != null) {
+			ret = m_namespaceResolver.getNamespace(prefix);
+		}
+		
+		return(ret);
+	}
+	
+    public void writeExternal(ObjectOutput out) throws IOException {
+    	out.writeObject(m_namespaceResolver);
+    }
+    
+    public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
+    	m_namespaceResolver = (NamespaceResolver)in.readObject();
+    }
+
+    private NamespaceResolver m_namespaceResolver=null;
+}

Added: tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/expression/xalan/XalanDOMExpression.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/expression/xalan/XalanDOMExpression.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/expression/xalan/XalanDOMExpression.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,80 @@
+/*
+ * Copyright 2005-9 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 22 Feb 2009 : Initial version created by gary
+ */
+package org.scribble.monitor.expression.xalan;
+
+import java.io.IOException;
+import java.io.ObjectInput;
+import java.io.ObjectOutput;
+
+import org.scribble.monitor.expression.Expression;
+import org.scribble.monitor.expression.ExpressionFactory;
+import org.scribble.monitor.model.ConversationContext;
+
+/**
+ * This class provides the Xalan implementation of the
+ * expression.
+ */
+public class XalanDOMExpression implements Expression,
+				ExpressionFactory, java.io.Externalizable {
+	
+	/**
+	 * The default constructor.
+	 */
+	public XalanDOMExpression() {
+	}
+	
+	/**
+	 * This constructor is initialized with the xpath
+	 * expression.
+	 * 
+	 * @param xpath The xpath expression
+	 * @throws Exception Failed to initialize the expression
+	 */
+	public XalanDOMExpression(String xpath)
+					throws Exception {
+	}
+
+	public boolean evaluate(ConversationContext context) throws Exception {
+		// TODO Auto-generated method stub
+		return false;
+	}
+
+	public Object evaluate(ConversationContext context, Object value)
+			throws Exception {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	public Expression getExpression(Object expr) throws Exception {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	public void readExternal(ObjectInput in) throws IOException,
+			ClassNotFoundException {
+		// TODO Auto-generated method stub
+		
+	}
+
+	public void writeExternal(ObjectOutput out) throws IOException {
+		// TODO Auto-generated method stub
+		
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/impl/ConversationImpl.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/impl/ConversationImpl.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/impl/ConversationImpl.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,192 @@
+/*
+ * Copyright 2005-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 4 Oct 2008 : Initial version created by gary
+ */
+package org.scribble.monitor.impl;
+
+import java.io.IOException;
+import java.io.ObjectInput;
+import java.io.ObjectOutput;
+
+import org.scribble.monitor.Conversation;
+import org.scribble.monitor.ConversationIdentity;
+import org.scribble.monitor.ConversationTypeName;
+import org.scribble.monitor.Message;
+import org.scribble.monitor.MonitorEvent;
+import org.scribble.monitor.Result;
+import org.scribble.monitor.MonitorContext;
+import org.scribble.monitor.model.MonitorNode;
+
+/**
+ * This class represents an endpoint session associated with
+ * a conversation instance. 
+ */
+public class ConversationImpl implements Conversation, java.io.Externalizable {
+
+	/**
+	 * The default constructor for the session.
+	 */
+	public ConversationImpl() {	
+	}
+	
+	/**
+	 * This constructor is initialized with a scope.
+	 * 
+	 * @param scope The scope
+	 */
+	protected ConversationImpl(Scope scope) {
+		m_scope = scope;
+	}
+	
+	/**
+	 * This method returns the conversation type name associated with
+	 * this conversation.
+	 * 
+	 * @return The conversation type name
+	 */
+	public ConversationTypeName getName() {
+		ConversationTypeName ret=null;
+		
+		if (m_scope != null) {
+			ret = m_scope.getName();
+		}
+		
+		return(ret);
+	}
+	
+	/**
+	 * This method sets the scope.
+	 * 
+	 * @param scope The session scope
+	 */
+	protected void setScope(Scope scope) {
+		m_scope = scope;
+	}
+	
+	/**
+	 * This method registers the supplied node for
+	 * subsequent processing.
+	 * 
+	 * @param node The node
+	 */
+	public void register(MonitorNode node) {
+		m_scope.register(node);
+	}
+	
+	/**
+	 * This method attempts to locate a node that can
+	 * process the supplied 'sent' message. At any one
+	 * time, within a session, only a single node
+	 * should be able to process the message.
+	 * 
+	 * @param mc The monitor context
+	 * @param mesg The message
+	 * @return Whether the message was handled
+	 */
+	public Result sentMessage(MonitorContext mc,
+							Message mesg) {
+		return(m_scope.sentMessage(mc, mesg));
+	}
+	
+	/**
+	 * This method attempts to locate a node that can
+	 * process the supplied 'received' message. At any one
+	 * time, within a session, only a single node
+	 * should be able to process the message.
+	 * 
+	 * @param mc The monitor context
+	 * @param mesg The message
+	 * @return Whether the message was handled
+	 */
+	public Result receivedMessage(MonitorContext mc,
+							Message mesg) {
+		return(m_scope.receivedMessage(mc, mesg));
+	}
+	
+	/**
+	 * This method is invoked to handle the supplied event.
+	 * 
+	 * @param mc The monitor context
+	 * @param event The event
+	 * @return Whether the event has handled
+	 */
+	public Result onMonitorEvent(MonitorContext mc, MonitorEvent event) {
+		return(m_scope.onMonitorEvent(mc, event));
+	}
+	
+	/**
+	 * This method determines whether the session has
+	 * completed.
+	 * 
+	 * @return Whether the session has completed
+	 */
+	public boolean isCompleted() {
+		return(m_scope.isCompleted());
+	}
+	
+	/**
+	 * This method returns the conversation identities associated
+	 * with the session.
+	 * 
+	 * @return The conversation identities
+	 */
+	public java.util.List<ConversationIdentity> getIdentities() {
+		return(m_scope.getIdentities());
+	}
+	
+	/**
+	 * This method determines if the session identity has changed.
+	 * 
+	 * @return Whether the session identity has changed
+	 */
+	public boolean isIdentityChanged() {
+		return(m_scope.isIdentityChanged());
+	}
+	
+	/**
+	 * This method sets whether the identity has changed within
+	 * the session.
+	 * 
+	 * @param changed
+	 */
+	public void setIdentityChanged(boolean changed) {
+		m_scope.setIdentityChanged(changed);
+	}
+
+	/**
+	 * This method requests the conversation to notify another conversation instance,
+	 * associated with the supplied type name and identity, when it
+	 * completes.
+	 * 
+	 * @param name The conversation type name
+	 * @param ids The conversation identities
+	 */
+	public void notifyOnCompletion(ConversationTypeName name, java.util.List<ConversationIdentity> ids) {
+		m_scope.notifyOnCompletion(name, ids);
+	}
+	
+    public void writeExternal(ObjectOutput out) throws IOException {
+    	out.writeObject(m_scope);
+    }
+    
+    public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
+    	m_scope = (Scope)in.readObject();
+    }
+
+	private Scope m_scope=new Scope();
+}

Added: tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/impl/ConversationInstanceRef.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/impl/ConversationInstanceRef.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/impl/ConversationInstanceRef.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,73 @@
+/*
+ * Copyright 2005-9 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 17 May 2009 : Initial version created by gary
+ */
+package org.scribble.monitor.impl;
+
+import java.io.IOException;
+import java.io.ObjectInput;
+import java.io.ObjectOutput;
+
+import org.scribble.monitor.ConversationIdentity;
+import org.scribble.monitor.ConversationTypeName;
+
+/**
+ * This class represents the information required to locate a conversation
+ * instance.
+ *
+ */
+public class ConversationInstanceRef implements java.io.Externalizable {
+
+	public ConversationInstanceRef(ConversationTypeName name, ConversationIdentity[] ids) {
+		m_name = name;
+		m_ids = ids;
+	}
+
+	public ConversationTypeName getName() {
+		return(m_name);
+	}
+	
+	public ConversationIdentity[] getIdentities() {
+		return(m_ids);
+	}
+	
+    public void writeExternal(ObjectOutput out) throws IOException {    	
+    	out.writeObject(m_name);
+    	
+    	out.writeInt(m_ids.length);
+    	
+    	for (int i=0; i < m_ids.length; i++) {
+        	out.writeObject(m_ids[i]);    		
+    	}
+    }
+    
+    public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {   	
+    	m_name = (ConversationTypeName)in.readObject();
+    	
+    	int num=in.readInt();
+    	
+    	m_ids = new ConversationIdentity[num];
+    	
+    	for (int i=0; i < num; i++) {
+    		m_ids[i] = (ConversationIdentity)in.readObject();
+    	}
+    }
+
+	private ConversationTypeName m_name=null;
+	private ConversationIdentity[] m_ids=null; 
+}

Added: tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/impl/DefaultConversationManager.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/impl/DefaultConversationManager.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/impl/DefaultConversationManager.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,143 @@
+/*
+ * Copyright 2005-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 5 Oct 2008 : Initial version created by gary
+ */
+package org.scribble.monitor.impl;
+
+import org.scribble.monitor.ConversationIdentity;
+import org.scribble.monitor.ConversationManager;
+import org.scribble.monitor.Conversation;
+import org.scribble.monitor.ConversationTypeName;
+import org.scribble.monitor.model.ConversationType;
+
+/**
+ * This class provides the default implementation for
+ * the conversation manager interface.
+ */
+public class DefaultConversationManager implements ConversationManager {
+
+	/**
+	 * This method creates a new conversation instance,
+	 * and registers the supplied description as the
+	 * top level node to be monitored.
+	 * 
+	 * @param description The top level description node
+	 * @return The newly created conversation instance
+	 */
+	public Conversation createConversation(ConversationType description) {
+		Conversation ret=new ConversationImpl();
+		
+		ret.register(description);
+			
+		return(ret);
+	}
+	
+	/**
+	 * This method returns the conversation instances
+	 * associated with the supplied conversation identities.
+	 * 
+	 * @param ids The conversation identities
+	 * @return The list of conversation instances
+	 */
+	public java.util.List<Conversation> getConversations(ConversationIdentity[] ids) {
+		java.util.ArrayList<Conversation> workingSet=new java.util.ArrayList<Conversation>();
+		
+		for (int j=0; j < ids.length; j++) {
+			java.util.List<Conversation> convinsts=
+				m_conversations.get(ids[j]);
+	
+			if (convinsts != null && convinsts.size() > 0) {
+				workingSet.addAll(convinsts);
+			}
+		}
+		
+		return(workingSet);
+	}
+	
+	/**
+	 * This method returns the conversation instance associated with
+	 * the supplied conversation type name and identities.
+	 * 
+	 * @param name The conversation type name
+	 * @param ids The identities
+	 * @return The conversation instance, or null if not found
+	 */
+	public Conversation getConversation(ConversationTypeName name, ConversationIdentity[] ids) {
+		Conversation ret=null;
+		
+		java.util.List<Conversation> convs=getConversations(ids);
+		
+		for (int i=0; ret == null && i < convs.size(); i++) {
+			if (convs.get(i).getName().equals(name)) {
+				ret = convs.get(i);
+			}
+		}
+		
+		return(ret);
+	}
+	
+	/**
+	 * This method updates the supplied conversation instance.
+	 *  
+	 * @param conv The conversation instance
+	 */
+	public void updateConversation(Conversation conv) {
+
+		if (conv.isIdentityChanged()) {
+			for (int i=0; i < conv.getIdentities().size(); i++) {
+				
+				ConversationIdentity id=conv.getIdentities().get(i);
+				
+				java.util.List<Conversation> instances=m_conversations.get(id);
+				
+				if (instances == null) {
+					instances = new java.util.Vector<Conversation>();
+					m_conversations.put(id, instances);
+					
+					instances.add(conv);
+				} else if (instances.contains(conv) == false) {
+					instances.add(conv);
+				}
+			}
+			
+			conv.setIdentityChanged(false);
+		}
+	}
+	
+	/**
+	 * This method removes the supplied conversation instance.
+	 *  
+	 * @param conv The conversation instance
+	 */
+	public void removeConversation(Conversation conv) {
+		for (int i=0; i < conv.getIdentities().size(); i++) {
+			java.util.List<Conversation> convs=m_conversations.get(conv.getIdentities().get(i));
+			
+			if (convs != null) {
+				convs.remove(conv);
+				
+				if (convs.size() == 0) {
+					m_conversations.remove(conv.getIdentities().get(i));
+				}
+			}
+		}
+	}
+	
+	private java.util.Map<ConversationIdentity,java.util.List<Conversation>> m_conversations=
+		new java.util.HashMap<ConversationIdentity,java.util.List<Conversation>>();
+}

Added: tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/impl/DefaultConversationTypeRepository.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/impl/DefaultConversationTypeRepository.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/impl/DefaultConversationTypeRepository.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,77 @@
+/*
+ * Copyright 2005-9 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 17 May 2009 : Initial version created by gary
+ */
+package org.scribble.monitor.impl;
+
+import org.scribble.monitor.ConversationTypeName;
+import org.scribble.monitor.ConversationTypeRepository;
+import org.scribble.monitor.MonitorException;
+import org.scribble.monitor.model.ConversationType;
+
+/**
+ * This is the default implementation of the repository of conversation types.
+ *
+ */
+public class DefaultConversationTypeRepository implements ConversationTypeRepository,
+						java.io.Serializable {
+
+	private static final long serialVersionUID = -1368342448719639665L;
+
+	/**
+	 * This is the default constructor.
+	 */
+	public DefaultConversationTypeRepository() {
+	}
+	
+	/**
+	 * This method adds the conversation type to the repository.
+	 * 
+	 * @param convType The conversation type
+	 * @throws MonitorException Failed to add conversation type
+	 */
+	public void addConversationType(ConversationType convType)
+						throws MonitorException {
+		m_conversationTypes.put(convType.getName(), convType);
+	}
+	
+	/**
+	 * This method removes the conversation type associated with
+	 * the supplied name, from the repository.
+	 * 
+	 * @param name The name
+	 */
+	public void removeConversationType(ConversationTypeName name)
+						throws MonitorException {
+		m_conversationTypes.remove(name);
+	}
+	
+	/**
+	 * This method returns the conversation type associated with the
+	 * supplied name.
+	 * 
+	 * @param name The conversation type name
+	 * @return The conversation type, or null if not found
+	 */
+	public ConversationType getConversationType(ConversationTypeName name) {
+		return(m_conversationTypes.get(name));
+	}
+	
+	private java.util.Map<ConversationTypeName, ConversationType> m_conversationTypes=
+			new java.util.HashMap<ConversationTypeName, ConversationType>();
+}

Added: tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/impl/DefaultMonitor.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/impl/DefaultMonitor.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/impl/DefaultMonitor.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,234 @@
+/*
+ * Copyright 2005-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 4 Oct 2008 : Initial version created by gary
+ */
+package org.scribble.monitor.impl;
+
+import org.scribble.monitor.Conversation;
+import org.scribble.monitor.ConversationListener;
+import org.scribble.monitor.ConversationTypeName;
+import org.scribble.monitor.Message;
+import org.scribble.monitor.Result;
+import org.scribble.monitor.Monitor;
+import org.scribble.monitor.MonitorContext;
+import org.scribble.monitor.MonitorEvent;
+import org.scribble.monitor.MonitorException;
+import org.scribble.monitor.MonitorListener;
+import org.scribble.monitor.model.ConversationType;
+
+/**
+ * This class represents a default implementation of the
+ * Monitor interface.
+ */
+public class DefaultMonitor implements Monitor, MonitorListener {
+
+	/**
+	 * The default constructor for the Monitor.
+	 */
+	public DefaultMonitor() {
+	}
+	
+	/**
+	 * This method sets the monitor context.
+	 * 
+	 * @param context The context
+	 */
+	public void setMonitorContext(MonitorContext context) {
+		m_context = context;
+	}
+	
+	/**
+	 * This method adds a conversation type name to the list
+	 * to be observed.
+	 * 
+	 * @param name The conversation type name
+	 * @throws MonitorException Failed to locate conversation type
+	 * 					for supplied name
+	 */
+	public void observe(ConversationTypeName name) throws MonitorException {
+		
+		if (m_context == null) {
+			throw new MonitorException("Monitor context has not been initialized");
+		}
+		
+		ConversationType ctype=m_context.getConversationTypeRepository().getConversationType(name);
+		
+		if (ctype == null) {
+			throw new MonitorException("Conversation Type not found for '"+name+"'");
+		}
+		
+		m_observationList.add(ctype);
+	}
+	
+	/**
+	 * This method processes the 'received' message.
+	 * 
+	 * @param mesg The message
+	 * @return Whether the 'received' message has been matched
+	 */
+	public boolean received(Message mesg) {
+		Result ret=Result.NotRelevant;
+
+		java.util.List<Conversation> convs=m_context.getConversationManager().getConversations(mesg.getIdentities());
+		
+		for (int i=0; ret == Result.NotRelevant && i < convs.size(); i++) {
+			ret = receivedInConversation(convs.get(i), mesg);
+		}
+
+		if (ret == Result.NotRelevant) {
+			
+			for (int i=0; ret != Result.Handled && i < m_observationList.size(); i++) {
+				if (m_observationList.get(i).canProcessReceivedMessage(null, null, mesg)) {
+					ret = receivedInConversation(m_context.getConversationManager().createConversation(m_observationList.get(i)), mesg);
+			
+					if (m_listener != null) {
+						m_listener.started(mesg.getIdentities());
+					}
+				}
+			}
+		}		
+
+		return(ret == Result.Handled);
+	}
+	
+	protected Result receivedInConversation(Conversation conversation, Message mesg) {
+		Result ret = conversation.receivedMessage(m_context, mesg);
+
+		if (ret != Result.NotRelevant) {
+			if (m_listener != null) {
+				if (ret == Result.Handled) {
+					m_listener.received(mesg);
+				} else {
+					m_listener.receivedOutOfSequence(mesg);
+				}
+			}
+		
+			if (conversation.isCompleted()) {
+				m_context.getConversationManager().removeConversation(conversation);
+		
+				if (m_listener != null) {
+					// TODO: May need to check if other sub-sessions
+					// for conversation identity still exist
+					m_listener.finished(mesg.getIdentities());
+				}
+			} else {
+				m_context.getConversationManager().updateConversation(conversation);
+			}
+		}
+		
+		return(ret);
+	}
+
+	/**
+	 * This method processes the 'sent' message.
+	 * 
+	 * @param mesg The message
+	 * @return Whether the 'sent' message has been matched
+	 */
+	public boolean sent(Message mesg) {
+		Result ret=Result.NotRelevant;
+
+		java.util.List<Conversation> convs=m_context.getConversationManager().getConversations(mesg.getIdentities());
+		
+		for (int i=0; ret == Result.NotRelevant && i < convs.size(); i++) {
+			ret = sentInConversation(convs.get(i), mesg);
+		}
+
+		if (ret == Result.NotRelevant) {
+
+			for (int i=0; ret == null && i < m_observationList.size(); i++) {
+				if (m_observationList.get(i).canProcessSentMessage(null, null, mesg)) {
+					ret = sentInConversation(m_context.getConversationManager().createConversation(m_observationList.get(i)), mesg);
+			
+					if (m_listener != null) {
+						m_listener.started(mesg.getIdentities());
+					}
+				}
+			}
+		}		
+
+		return(ret == Result.Handled);
+	}
+
+	protected Result sentInConversation(Conversation conv, Message mesg) {
+		Result ret = conv.sentMessage(m_context, mesg);
+
+		if (ret != Result.NotRelevant) {
+			if (m_listener != null) {
+				if (ret == Result.Handled) {
+					m_listener.sent(mesg);
+				} else {
+					m_listener.sentOutOfSequence(mesg);
+				}
+			}
+		
+			if (conv.isCompleted()) {
+				m_context.getConversationManager().removeConversation(conv);
+		
+				if (m_listener != null) {
+					// TODO: May need to check if other sub-sessions
+					// for conversation identity still exist
+					m_listener.finished(mesg.getIdentities());
+				}
+			} else {
+				m_context.getConversationManager().updateConversation(conv);
+			}
+		}
+		
+		return(ret);
+	}
+
+	/**
+	 * This method sets the conversation listener, to enable
+	 * an interested client to be informed of relevant
+	 * monitoring situations.
+	 * 
+	 * @param l The listener
+	 */
+	public void setConversationListener(ConversationListener l) {
+		m_listener = l;
+	}
+	
+	/**
+	 * This method is invoked to handle a monitor event.
+	 * 
+	 * @param me The monitor event
+	 * @return Whether the event was handled
+	 */
+	public boolean onMonitorEvent(MonitorEvent me) {
+		Result ret=Result.NotRelevant;
+		Conversation conv=m_context.getConversationManager().getConversation(me.getName(), me.getIdentities());
+		
+		if (conv != null) {
+			ret = conv.onMonitorEvent(m_context, me);
+		}
+		
+		return(ret == Result.Handled);
+	}
+
+	/**
+	 * This method closes the monitor.
+	 */
+	public void close() {
+	}
+	
+	private MonitorContext m_context=null;
+	private ConversationListener m_listener=null;
+	private java.util.List<ConversationType> m_observationList=
+					new java.util.Vector<ConversationType>();
+}

Added: tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/impl/DefaultMonitorContext.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/impl/DefaultMonitorContext.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/impl/DefaultMonitorContext.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,123 @@
+/*
+ * Copyright 2005-9 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 10 May 2009 : Initial version created by gary
+ */
+package org.scribble.monitor.impl;
+
+import org.scribble.monitor.ConversationManager;
+import org.scribble.monitor.ConversationTypeRepository;
+import org.scribble.monitor.MonitorContext;
+import org.scribble.monitor.MonitorEvent;
+import org.scribble.monitor.MonitorListener;
+
+/**
+ * This class provides the default implementation of the
+ * monitor context.
+ */
+public class DefaultMonitorContext implements MonitorContext {
+
+	/**
+	 * The default constructor.
+	 */
+	public DefaultMonitorContext() {
+	}
+	
+	/**
+	 * This method sets the conversation manager.
+	 * 
+	 * @param cm The conversation manager
+	 */
+	public void setConversationManager(ConversationManager cm) {
+		m_conversationManager = cm;
+	}
+	
+	/**
+	 * This method returns the conversation manager.
+	 * 
+	 * @return The conversation manager
+	 */
+	public ConversationManager getConversationManager() {
+		return(m_conversationManager);
+	}
+	
+	/**
+	 * This method sets the conversation type repository.
+	 * 
+	 * @param rep The conversation type repository
+	 */
+	public void setConversationTypeRepository(ConversationTypeRepository rep) {
+		m_conversationTypeRepository = rep;
+	}
+	
+	/**
+	 * This method returns the conversation type repository.
+	 * 
+	 * @return The conversation type repository
+	 */
+	public ConversationTypeRepository getConversationTypeRepository() {
+		return(m_conversationTypeRepository);
+	}
+	
+	/**
+	 * This method dispatches the supplied monitor event to
+	 * the monitor engine.
+	 * 
+	 * @param event The event
+	 * @return Whether the event was handled
+	 */
+	public boolean dispatch(MonitorEvent event) {
+		boolean ret=false;
+		
+		synchronized(m_listeners) {
+			for (int i=m_listeners.size()-1; i >= 0; i--) {
+				m_listeners.get(i).onMonitorEvent(event);
+			}
+		}
+		
+		return(ret);
+	}
+	
+	/**
+	 * This method adds a listener for monitor events.
+	 * 
+	 * @param l The listener
+	 */
+	public void addMonitorListener(MonitorListener l) {
+		synchronized(m_listeners) {
+			m_listeners.add(l);
+		}
+	}
+	
+	/**
+	 * This method removes a listener for monitor events.
+	 * 
+	 * @param l The listener
+	 */
+	public void removeMonitorListener(MonitorListener l) {
+		synchronized(m_listeners) {
+			m_listeners.remove(l);
+		}
+	}
+	
+	private ConversationManager m_conversationManager=
+				new DefaultConversationManager();
+	private ConversationTypeRepository m_conversationTypeRepository=
+				new DefaultConversationTypeRepository();
+	private java.util.List<MonitorListener> m_listeners=
+					new java.util.Vector<MonitorListener>();
+}

Added: tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/impl/Scope.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/impl/Scope.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/impl/Scope.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,566 @@
+/*
+ * Copyright 2005-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 5 Oct 2008 : Initial version created by gary
+ */
+package org.scribble.monitor.impl;
+
+import java.io.IOException;
+import java.io.ObjectInput;
+import java.io.ObjectOutput;
+
+import org.scribble.monitor.ConversationIdentity;
+import org.scribble.monitor.ConversationTypeName;
+import org.scribble.monitor.InvokedConversationFinishedEvent;
+import org.scribble.monitor.Message;
+import org.scribble.monitor.MonitorEvent;
+import org.scribble.monitor.Result;
+import org.scribble.monitor.MonitorContext;
+import org.scribble.monitor.model.ConversationContext;
+import org.scribble.monitor.model.ConversationType;
+import org.scribble.monitor.model.MonitorNode;
+
+/**
+ * This class represents a scope within a session.
+ */
+public class Scope implements ConversationContext, java.io.Externalizable {
+
+	/**
+	 * The default constructor for the top level session scope.
+	 * 
+	 */
+	protected Scope() {
+		m_identities = new java.util.Vector<ConversationIdentity>();
+		m_variables = new java.util.HashMap<String,Object>();
+		m_sessionScope = true;
+	}
+	
+	/**
+	 * This constructor initializes the session scope with its
+	 * parent and the node associated with the scope. When the
+	 * scope completes, it should 'complete' this node within
+	 * the parent scope, causing the subsequent activity to be
+	 * initiated.
+	 * 
+	 * @param parent The parent scope
+	 * @param node The node
+	 */
+	protected Scope(Scope parent, MonitorNode node) {
+		m_parent = parent;
+		m_node = node;
+	}
+	
+	/**
+	 * This constructor initializes the session scope with its
+	 * parent and the node associated with the scope. When the
+	 * scope completes, it should 'complete' this node within
+	 * the parent scope, causing the subsequent activity to be
+	 * initiated.
+	 * 
+	 * @param parent The parent scope
+	 * @param node The node
+	 * @param bindings The optional variable bindings
+	 */
+	protected Scope(Scope parent, MonitorNode node,
+				java.util.Map<String,String> bindings) {
+		m_parent = parent;
+		m_node = node;
+		m_bindings = bindings;
+		m_sessionScope = true;
+		m_variables = new java.util.HashMap<String,Object>();
+	}
+	
+	/**
+	 * This method returns the conversation type name associated with
+	 * this context.
+	 * 
+	 * @return The conversation type name
+	 */
+	public ConversationTypeName getName() {
+		if (m_parent != null) {
+			return(m_parent.getName());
+		}
+		return(m_name);
+	}
+
+	/**
+	 * This method registers the supplied node for
+	 * subsequent processing.
+	 * 
+	 * @param node The node
+	 */
+	public void register(MonitorNode node) {
+		m_nodes.add(node);
+		
+		if (m_parent == null && m_name == null &&
+				node instanceof ConversationType) {
+			m_name = ((ConversationType)node).getName();
+		}
+	}
+		
+	/**
+	 * This method indicates that the supplied node
+	 * is pending an event.
+	 * 
+	 * @param node The node
+	 */
+	public void pendingEvent(MonitorNode node) {
+		m_pendingEventNodes.add(node);
+	}
+	
+	/**
+	 * This method requests the conversation to notify another conversation instance,
+	 * associated with the supplied type name and identity, when it
+	 * completes.
+	 * 
+	 * @param name The conversation type name
+	 * @param ids The conversation identities
+	 */
+	public void notifyOnCompletion(ConversationTypeName name, java.util.List<ConversationIdentity> ids) {
+		ConversationIdentity[] cids=new ConversationIdentity[ids.size()];
+		
+		for (int i=0; i < ids.size(); i++) {
+			cids[i] = ids.get(i);
+		}
+		
+		m_conversationInstances.add(new ConversationInstanceRef(name, cids));
+	}
+	
+	/**
+	 * This method creates a sub-context, owned by this
+	 * monitor context, and associated with the supplied
+	 * node.<p>
+	 * <p>
+	 * If no node is supplied, then the context is
+	 * spawned asynchronously, and not directly attached
+	 * to this context.
+	 * 
+	 * TODO: Should the new context be attached to the
+	 * top level context, so that it does not prevent
+	 * intermediate sessions from completing, but at
+	 * the same time does not allow the overall session
+	 * to complete?
+	 * 
+	 * @param mc The monitor context
+	 * @param node The optional node
+	 * @return The sub-context
+	 */
+	public ConversationContext createSubScope(MonitorContext mc,
+						MonitorNode node) {
+		Scope ret=new Scope(this, node);
+		
+		m_scopes.add(ret);
+		
+		return(ret);
+	}
+	
+	/**
+	 * This method removes the specified scope from
+	 * the list of contained scopes.
+	 * 
+	 * @param scope The scope to be removed
+	 */
+	protected void removeScope(Scope scope) {
+		m_scopes.remove(scope);
+	}
+
+	/**
+	 * This method attempts to process the 'sent' message
+	 * against the context. This should only be used
+	 * when the invoker has just created the context,
+	 * as a means of propagating the 'sent' message.
+	 * 
+	 * @param mc The monitor context
+	 * @param mesg The message
+	 * @return Whether the message was handled
+	 */
+	public boolean sent(MonitorContext mc, Message mesg) {
+		return(sentMessage(mc, mesg) == Result.Handled);
+	}
+	
+	/**
+	 * This method processes the supplied message against
+	 * the nodes and sub-scopes within this session scope.
+	 * It attempts to determine if the 'sent' message
+	 * can be handled.
+	 * 
+	 * @param mc The monitor context
+	 * @param mesg The message
+	 * @return The result
+	 */
+	protected Result sentMessage(MonitorContext mc, Message mesg) {
+		Result ret=Result.NotRelevant;
+		
+		for (int i=0; ret == Result.NotRelevant &&
+						i < m_nodes.size(); i++) {
+			if (m_nodes.get(i).canProcessSentMessage(mc, this, mesg)) {
+				MonitorNode node = m_nodes.get(i);
+				m_nodes.remove(i);
+				
+				if (node.sent(mc, this, mesg)) {
+					ret = Result.Handled;
+				} else {
+					ret = Result.NotHandled;
+				}
+
+				if (isCompleted()) {
+					
+					if (m_parent != null) {
+						// Remove from parent
+						m_parent.removeScope(this);
+						
+						if (m_node != null) {
+							m_node.getParent().processedNodeWithSentMessage(mc, m_parent,
+									m_node, (ret == Result.Handled)?null:mesg);
+						}
+					} else {
+						// Notify interested 'invoking' conversation instances
+						for (int j=0; j < m_conversationInstances.size(); j++) {
+							ConversationInstanceRef cir=m_conversationInstances.get(j);
+							
+							mc.dispatch(new InvokedConversationFinishedEvent(cir.getName(),
+											cir.getIdentities(), getName()));
+						}
+					}
+				}
+			}
+		}
+		
+		for (int i=0; ret == Result.NotRelevant &&
+						i < m_scopes.size(); i++) {
+			ret = m_scopes.get(i).sentMessage(mc, mesg);
+		}
+		
+		return(ret);
+	}
+	
+	/**
+	 * This method attempts to process the 'received' message
+	 * against the context. This should only be used
+	 * when the invoker has just created the context,
+	 * as a means of propagating the 'received' message.
+	 * 
+	 * @param mc The monitor context
+	 * @param mesg The message
+	 * @return Whether the message was handled
+	 */
+	public boolean received(MonitorContext mc, Message mesg) {
+		return(receivedMessage(mc, mesg) == Result.Handled);
+	}
+	
+	/**
+	 * This method processes the supplied message against
+	 * the nodes and sub-scopes within this session scope.
+	 * It attempts to determine if the 'received' message
+	 * can be handled.
+	 * 
+	 * @param mc The monitor context
+	 * @param mesg The message
+	 * @return The result
+	 */
+	protected Result receivedMessage(MonitorContext mc, Message mesg) {
+		Result ret=Result.NotRelevant;
+		
+		for (int i=0; ret == Result.NotRelevant &&
+						i < m_nodes.size(); i++) {
+			if (m_nodes.get(i).canProcessReceivedMessage(mc,
+									this, mesg)) {
+				MonitorNode node = m_nodes.get(i);
+				m_nodes.remove(i);
+				
+				if (node.received(mc, this, mesg)) {
+					ret = Result.Handled;
+				} else {
+					ret = Result.NotHandled;
+				}
+
+				if (isCompleted()) {
+					
+					if (m_parent != null) {
+						// Remove from parent
+						m_parent.removeScope(this);
+						
+						if (m_node != null) {
+							m_node.getParent().processedNodeWithReceivedMessage(mc, m_parent,
+									m_node, (ret == Result.Handled)?null:mesg);
+						}
+					} else {
+						// Notify interested 'invoking' conversation instances
+						for (int j=0; j < m_conversationInstances.size(); j++) {
+							ConversationInstanceRef cir=m_conversationInstances.get(j);
+							
+							mc.dispatch(new InvokedConversationFinishedEvent(cir.getName(),
+											cir.getIdentities(), getName()));
+						}
+					}
+				}
+			}
+		}
+		
+		for (int i=0; ret == Result.NotRelevant &&
+						i < m_scopes.size(); i++) {
+			ret = m_scopes.get(i).receivedMessage(mc, mesg);
+		}
+		
+		return(ret);
+	}
+
+	/**
+	 * This method is invoked to handle the supplied event.
+	 * 
+	 * @param mc The monitor context
+	 * @param event The event
+	 * @return Whether the event has handled
+	 */
+	public Result onMonitorEvent(MonitorContext mc, MonitorEvent event) {
+		Result ret=Result.NotRelevant;
+		
+		for (int i=0; ret == Result.NotRelevant &&
+						i < m_pendingEventNodes.size(); i++) {
+			if (m_pendingEventNodes.get(i).canHandleEvent(mc,
+									this, event)) {
+				MonitorNode node = m_pendingEventNodes.get(i);
+
+				// TODO: Not sure whether handling events should
+				// work in the same way as messages - where the
+				// indication that the message can be handled effectively
+				// stops the processing. Events - might be doing more
+				// detailed check in the onMonitorEvent method?
+				m_pendingEventNodes.remove(i);
+				
+				if (node.onMonitorEvent(mc, this, event)) {
+					ret = Result.Handled;
+				} else {
+					ret = Result.NotHandled;
+				}
+			}
+		}
+
+		for (int i=0; ret == Result.NotRelevant &&
+						i < m_scopes.size(); i++) {
+			ret = m_scopes.get(i).onMonitorEvent(mc, event);
+		}
+
+		return(ret);
+	}
+	
+	/**
+	 * This method assesses the supplied conversation identity
+	 * against the current session.
+	 * 
+	 * @param id The conversation identity
+	 * @return Whether the identity is valid for this session
+	 */
+	public boolean assessIdentity(ConversationIdentity id) {
+		boolean ret=true;
+		
+		if (m_parent != null) {
+			ret = m_parent.assessIdentity(id);
+		} else {
+			if (m_identities.contains(id) == false) {
+				m_identities.add(id);
+				
+				setIdentityChanged(true);
+			}
+		}
+			
+		return(ret);
+	}
+	
+	/**
+	 * This method determines whether the session has
+	 * completed.
+	 * 
+	 * @return Whether the scope has completed
+	 */
+	protected boolean isCompleted() {
+		return(m_nodes.size() == 0 &&
+				m_pendingEventNodes.size() == 0 &&
+				m_scopes.size() == 0);
+	}
+	
+	/**
+	 * This method indicates whether the scope is associated
+	 * with a sub-session.
+	 * 
+	 * @return Whether the scope is a sub-session
+	 */
+	protected boolean isSessionScope() {
+		return(m_sessionScope);
+	}
+	
+	/**
+	 * This method determines if the session identity has changed.
+	 * This will be recorded against the top level scope within
+	 * the session.
+	 * 
+	 * @return Whether the session identity has changed
+	 */
+	protected boolean isIdentityChanged() {
+		if (m_parent != null) {
+			return(m_parent.isIdentityChanged());
+		}
+		return(m_identityChanged);
+	}
+	
+	/**
+	 * This method sets whether the identity has changed within
+	 * the session.
+	 * 
+	 * @param changed
+	 */
+	protected void setIdentityChanged(boolean changed) {
+		if (m_parent != null) {
+			m_parent.setIdentityChanged(changed);
+		} else {
+			m_identityChanged = changed;
+		}
+	}
+	
+	/**
+	 * This method returns the conversation identities associated
+	 * with the conversation.
+	 * 
+	 * @return The conversation identities
+	 */
+	public java.util.List<ConversationIdentity> getIdentities() {
+		if (m_parent != null) {
+			return(m_parent.getIdentities());
+		}
+		return(m_identities);
+	}
+	
+	/**
+	 * This method returns the variables in the scope of
+	 * the conversation.
+	 * 
+	 * @return The variables
+	 */
+	public java.util.Map<String, Object> getVariables() {
+		java.util.Map<String,Object> ret=null;
+		
+		// TODO: Need to take into account bindings,
+		// and propagate to parent until description node
+		// is reached
+
+		if (isSessionScope()) {
+			ret = m_variables;
+			
+		} else if (m_parent != null) {
+			ret = m_parent.getVariables();
+		}
+		
+		return(ret);
+	}
+	
+    public void writeExternal(ObjectOutput out) throws IOException {
+    	
+    	out.writeObject(m_name);
+    	
+    	out.writeInt(m_nodes.size());
+    	for (int i=0; i < m_nodes.size(); i++) {
+    		out.writeObject(m_nodes.get(i));
+    	}
+    	
+    	out.writeInt(m_pendingEventNodes.size());
+    	for (int i=0; i < m_pendingEventNodes.size(); i++) {
+    		out.writeObject(m_pendingEventNodes.get(i));
+    	}
+    	
+    	out.writeInt(m_scopes.size());
+    	for (int i=0; i < m_scopes.size(); i++) {
+    		out.writeObject(m_scopes.get(i));
+    	}
+    	
+    	if (m_identities == null) {
+    		out.writeInt(0);
+    	} else {
+        	out.writeInt(m_identities.size());
+        	for (int i=0; i < m_identities.size(); i++) {
+        		out.writeObject(m_identities.get(i));
+        	}        	
+    	}
+    	
+    	out.writeObject(m_variables);
+    	out.writeObject(m_bindings);
+    	out.writeObject(m_parent);
+    	out.writeObject(m_node);
+    	out.writeBoolean(m_sessionScope);
+    	
+    	out.writeInt(m_conversationInstances.size());
+    	
+    	for (int i=0; i < m_conversationInstances.size(); i++) {
+    		out.writeObject(m_conversationInstances.get(i));
+    	}
+    }
+    
+    public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
+    	
+    	m_name = (ConversationTypeName)in.readObject();
+    	
+    	int len=in.readInt();
+    	for (int i=0; i < len; i++) {
+    		m_nodes.add((MonitorNode)in.readObject());
+    	}
+    	
+    	len=in.readInt();
+    	for (int i=0; i < len; i++) {
+    		m_pendingEventNodes.add((MonitorNode)in.readObject());
+    	}
+    	
+    	len = in.readInt();
+    	for (int i=0; i < len; i++) {
+    		m_scopes.add((Scope)in.readObject());
+    	}
+    	
+    	len = in.readInt();
+    	
+    	if (len > 0) {
+    		m_identities = new java.util.Vector<ConversationIdentity>();
+    		
+        	for (int i=0; i < len; i++) {
+        		m_identities.add((ConversationIdentity)in.readObject());
+        	}        	
+    	}
+    	
+    	m_variables = (java.util.Map<String,Object>)in.readObject();
+    	m_bindings = (java.util.Map<String,String>)in.readObject();
+    	m_parent = (Scope)in.readObject();
+    	m_node = (MonitorNode)in.readObject();
+    	m_sessionScope = in.readBoolean();
+    	
+    	len = in.readInt();
+    	
+    	for (int i=0; i < len; i++) {
+    		m_conversationInstances.add((ConversationInstanceRef)in.readObject());
+    	}
+    }
+	
+    private ConversationTypeName m_name=null;
+	private java.util.List<MonitorNode> m_nodes=new java.util.Vector<MonitorNode>();
+	private java.util.List<MonitorNode> m_pendingEventNodes=new java.util.Vector<MonitorNode>();
+	private java.util.List<Scope> m_scopes=new java.util.Vector<Scope>();
+	private java.util.List<ConversationIdentity> m_identities=null;
+	private java.util.Map<String,Object> m_variables=null;
+	private java.util.Map<String,String> m_bindings=null;
+	private Scope m_parent=null;
+	private MonitorNode m_node=null;
+	private boolean m_sessionScope=false;
+	private transient boolean m_identityChanged=false;
+	private java.util.List<ConversationInstanceRef> m_conversationInstances=
+					new java.util.Vector<ConversationInstanceRef>();
+}

Added: tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/model/ChoiceNode.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/model/ChoiceNode.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/model/ChoiceNode.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,113 @@
+/*
+ * Copyright 2005-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 4 Oct 2008 : Initial version created by gary
+ */
+package org.scribble.monitor.model;
+
+import java.io.IOException;
+import java.io.ObjectInput;
+import java.io.ObjectOutput;
+
+import org.scribble.monitor.Message;
+import org.scribble.monitor.MonitorContext;
+
+/**
+ * This class represents the 'choice' construct, where a set
+ * of mutually exclusive paths will be evaluated to determine
+ * which one should be selected.
+ */
+public class ChoiceNode extends MonitorNode implements java.io.Externalizable {
+
+	/**
+	 * This method processes the 'sent' message.
+	 * 
+	 * @param mc The monitor context
+	 * @param context The conversation context
+	 * @param mesg The message
+	 * @return Whether the 'sent' message has been handled
+	 */
+	@Override
+	public boolean sent(MonitorContext mc,
+			ConversationContext context, Message mesg) {
+		boolean ret=false;
+		int num=0;
+		
+		if (mesg == null) {
+			context.register(this);
+			
+		} else if ((num=getChildren().length) > 0) {
+			MonitorNode choice=null;
+			
+			for (int i=0; choice == null && i < num; i++) {
+				if ((choice=getChildren()[i]).canProcessSentMessage(mc,
+						context, mesg) == false) {
+					choice = null;
+				}
+			}
+			
+			if (choice != null) {
+				ret = choice.sent(mc, context, mesg);
+			}
+		}
+
+		return(ret);
+	}
+
+	/**
+	 * This method processes the 'received' message.
+	 * 
+	 * @param mc The monitor context
+	 * @param context The conversation context
+	 * @param mesg The message
+	 * @return Whether the 'received' message has been handled
+	 */
+	@Override
+	public boolean received(MonitorContext mc,
+			ConversationContext context, Message mesg) {
+		boolean ret=false;
+		int num=0;
+		
+		if (mesg == null) {
+			context.register(this);
+			
+		} else if ((num=getChildren().length) > 0) {
+			MonitorNode choice=null;
+			
+			for (int i=0; choice == null && i < num; i++) {
+				if ((choice=getChildren()[i]).canProcessReceivedMessage(mc,
+							context, mesg) == false) {
+					choice = null;
+				}
+			}
+			
+			if (choice != null) {
+				ret = choice.received(mc, context, mesg);
+			}
+		}
+
+		return(ret);
+	}
+
+    public void writeExternal(ObjectOutput out) throws IOException {
+    	super.writeExternal(out);
+    }
+    
+    public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
+    	super.readExternal(in);
+    }
+}

Added: tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/model/ConditionalNode.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/model/ConditionalNode.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/model/ConditionalNode.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,124 @@
+/*
+ * Copyright 2005-9 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 21 Feb 2009 : Initial version created by gary
+ */
+package org.scribble.monitor.model;
+
+import java.io.IOException;
+import java.io.ObjectInput;
+import java.io.ObjectOutput;
+
+import org.scribble.monitor.Message;
+import org.scribble.monitor.MonitorContext;
+import org.scribble.monitor.expression.Expression;
+
+/**
+ * This class represents a conditional grouping construct. This
+ * construct can either be used on its own, or as part of a
+ * 'if' or 'when' construct.
+ */
+public class ConditionalNode extends SequenceNode implements java.io.Externalizable {
+
+	/**
+	 * This method sets the expression associated with the
+	 * conditional node.
+	 * 
+	 * @param expr The boolean expression
+	 */
+	public void setExpression(Expression expr) {
+		m_expression = expr;
+	}
+	
+	/**
+	 * This method determines whether the node is capable of
+	 * dealing with the supplied 'sent' message. This method
+	 * should be called before initiating processing of the
+	 * message using the 'sent' method.
+	 * 
+	 * @param mc The monitor context
+	 * @param context The conversation context
+	 * @param mesg The message
+	 * @return Whether the node can handle the message
+	 */
+	@Override
+	public boolean canProcessSentMessage(MonitorContext mc,
+			ConversationContext context, Message mesg) {
+		boolean ret=false;
+		
+		if (m_expression == null) {
+			// Non-observable, so use the message lookahead
+			ret = super.canProcessSentMessage(mc, context, mesg);
+		} else {
+			try {
+				ret = m_expression.evaluate(context);
+			} catch(Exception e) {
+				// TODO: HANDLE ERROR
+				e.printStackTrace();
+			}
+		}
+		
+		return(ret);
+	}
+
+	/**
+	 * This method determines whether the node is capable of
+	 * dealing with the supplied 'received' message. This method
+	 * should be called before initiating processing of the
+	 * message using the 'received' method.
+	 * 
+	 * @param mc The monitor context
+	 * @param context The conversation context
+	 * @param mesg The message
+	 * @return Whether the node can handle the message
+	 */
+	@Override
+	public boolean canProcessReceivedMessage(MonitorContext mc,
+			ConversationContext context, Message mesg) {
+		boolean ret=false;
+		
+		if (m_expression == null) {
+			// Non-observable, so use the message lookahead
+			ret = super.canProcessSentMessage(mc, context, mesg);
+		} else {
+			try {
+				ret = m_expression.evaluate(context);
+			} catch(Exception e) {
+				// TODO: HANDLE ERROR
+				e.printStackTrace();
+			}
+		}
+		
+		return(ret);
+	}
+
+	public void writeExternal(ObjectOutput out) throws IOException {
+		
+		out.writeObject(m_expression);
+		
+		super.writeExternal(out);
+    }
+    
+    public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
+    	
+    	m_expression = (Expression)in.readObject();
+    	
+    	super.readExternal(in);
+    }
+    
+    private Expression m_expression=null;
+}

Added: tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/model/ConversationContext.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/model/ConversationContext.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/model/ConversationContext.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,128 @@
+/*
+ * Copyright 2005-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 4 Oct 2008 : Initial version created by gary
+ */
+package org.scribble.monitor.model;
+
+import org.scribble.monitor.ConversationIdentity;
+import org.scribble.monitor.ConversationTypeName;
+import org.scribble.monitor.Message;
+import org.scribble.monitor.MonitorContext;
+
+/**
+ * This interface represents the context made available to
+ * the nodes when processing events.
+ */
+public interface ConversationContext {
+
+	/**
+	 * This method returns the conversation type name associated with
+	 * this context.
+	 * 
+	 * @return The conversation type name
+	 */
+	public ConversationTypeName getName();
+	
+	/**
+	 * This method registers the supplied node for
+	 * subsequent processing.
+	 * 
+	 * @param node The node
+	 */
+	public void register(MonitorNode node);
+	
+	/**
+	 * This method indicates that the supplied node
+	 * is pending an event.
+	 * 
+	 * @param node The node
+	 */
+	public void pendingEvent(MonitorNode node);
+	
+	/**
+	 * This method creates a sub-context, owned by this
+	 * monitor context, and associated with the supplied
+	 * node.<p>
+	 * <p>
+	 * If no node is supplied, then the context is
+	 * spawned asynchronously, and not directly attached
+	 * to this context.
+	 * 
+	 * TODO: Should the new context be attached to the
+	 * top level context, so that it does not prevent
+	 * intermediate sessions from completing, but at
+	 * the same time does not allow the overall session
+	 * to complete?
+	 * 
+	 * @param mc The monitor context
+	 * @param node The optional node
+	 * @return The sub-context
+	 */
+	public ConversationContext createSubScope(MonitorContext mc,
+						MonitorNode node);
+	
+	/**
+	 * This method attempts to process the 'sent' message
+	 * against the context. This should only be used
+	 * when the invoker has just created the context,
+	 * as a means of propagating the 'sent' message.
+	 * 
+	 * @param mc The monitor context
+	 * @param mesg The message
+	 * @return Whether the message was handled
+	 */
+	public boolean sent(MonitorContext mc, Message mesg);
+	
+	/**
+	 * This method attempts to process the 'received' message
+	 * against the context. This should only be used
+	 * when the invoker has just created the context,
+	 * as a means of propagating the 'received' message.
+	 * 
+	 * @param mc The monitor context
+	 * @param mesg The message
+	 * @return Whether the message was handled
+	 */
+	public boolean received(MonitorContext mc, Message mesg);
+
+	/**
+	 * This method assesses the supplied conversation identity
+	 * against the current session.
+	 * 
+	 * @param id The conversation identity
+	 * @return Whether the identity is valid for this session
+	 */
+	public boolean assessIdentity(ConversationIdentity id);
+
+	/**
+	 * This method returns the conversation identities associated
+	 * with the conversation.
+	 * 
+	 * @return The conversation identities
+	 */
+	public java.util.List<ConversationIdentity> getIdentities();
+	
+	/**
+	 * This method returns the variables in the scope of
+	 * the conversation.
+	 * 
+	 * @return The variables
+	 */
+	public java.util.Map<String, Object> getVariables();
+	
+}

Added: tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/model/ConversationType.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/model/ConversationType.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/model/ConversationType.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,107 @@
+/*
+ * Copyright 2005-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 4 Oct 2008 : Initial version created by gary
+ */
+package org.scribble.monitor.model;
+
+import java.io.IOException;
+import java.io.ObjectInput;
+import java.io.ObjectOutput;
+
+import org.scribble.monitor.ConversationTypeName;
+
+/**
+ * This class represents a description of expected endpoint
+ * behaviour associated with either a top level
+ * conversation or a sub-conversation.
+ */
+public class ConversationType extends SequenceNode implements java.io.Externalizable {
+
+	/**
+	 * This method returns the name of the description.
+	 * 
+	 * @return The name
+	 */
+	public ConversationTypeName getName() {
+		return(m_name);
+	}
+	
+	/**
+	 * This method sets the name of the description.
+	 * 
+	 * @param name The name
+	 */
+	public void setName(ConversationTypeName name) {
+		m_name = name;
+	}
+	
+	/**
+	 * This method returns the optional list of sub-conversations
+	 * contained within this description.
+	 * 
+	 * @return The array of descriptions, or null if no
+	 * 				sub-conversations are defined
+	 */
+	public ConversationType[] getDescriptions() {
+		return(m_descriptions);
+	}
+	
+	/**
+	 * This method sets the list of sub-conversations.
+	 * 
+	 * @param descs The descriptions
+	 */
+	public void setDescriptions(ConversationType[] descs) {
+		m_descriptions = descs;
+	}
+	
+    public void writeExternal(ObjectOutput out) throws IOException {
+    	out.writeObject(m_name);
+    	
+    	if (m_descriptions == null) {
+    		out.writeInt(0);
+    	} else {
+    		out.writeInt(m_descriptions.length);
+    		
+    		for (int i=0; i < m_descriptions.length; i++) {
+    			out.writeObject(m_descriptions[i]);
+    		}
+    	}
+    	
+    	super.writeExternal(out);
+    }
+    
+    public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
+    	m_name = (ConversationTypeName)in.readObject();
+    	
+    	int num=in.readInt();
+    	
+    	if (num > 0) {
+    		m_descriptions = new ConversationType[num];
+    		
+    		for (int i=0; i < num; i++) {
+    			m_descriptions[i] = (ConversationType)in.readObject();
+    		}
+    	}
+    	
+    	super.readExternal(in);
+    }
+    
+	private ConversationTypeName m_name=null;
+	private ConversationType[] m_descriptions=null;
+}

Added: tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/model/MessageBasedNode.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/model/MessageBasedNode.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/model/MessageBasedNode.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,96 @@
+/*
+ * Copyright 2005-9 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 21 Feb 2009 : Initial version created by gary
+ */
+package org.scribble.monitor.model;
+
+import java.io.IOException;
+import java.io.ObjectInput;
+import java.io.ObjectOutput;
+
+import org.scribble.monitor.Message;
+import org.scribble.monitor.MonitorContext;
+
+/**
+ * This class represents a message based activity.
+ */
+public abstract class MessageBasedNode extends MonitorNode
+					implements java.io.Externalizable {
+
+	/**
+	 * This method sets the record activities to be invoked
+	 * when the message has been successfully handled.
+	 * 
+	 * @param acts The record activities
+	 */
+	public void setRecordActivities(RecordActivity[] acts) {
+		m_recordActivities = acts;
+	}
+	
+	/**
+	 * This method dispatches the 'record' request to the
+	 * configured record activities.
+	 * 
+	 * @param mc The monitor context 
+	 * @param context The conversation context
+	 * @param mesg The message to be recorded
+	 */
+	protected void record(MonitorContext mc, ConversationContext context,
+						Message mesg) {
+	
+		if (m_recordActivities != null) {
+			for (int i=0; i < m_recordActivities.length; i++) {
+				m_recordActivities[i].record(mc, context, mesg);
+			}
+		}
+	}
+	
+    public void writeExternal(ObjectOutput out) throws IOException {
+    	
+    	if (m_recordActivities == null ||
+    			m_recordActivities.length == 0) {
+    		out.writeInt(0);
+    	} else {
+    		out.writeInt(m_recordActivities.length);
+    		
+    		for (int i=0; i < m_recordActivities.length; i++) {
+    			out.writeObject(m_recordActivities[i]);
+    		}
+    	}
+    	
+    	super.writeExternal(out);
+    }
+    
+    public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
+    	
+    	int len=in.readInt();
+    	
+    	if (len > 0) {
+    		m_recordActivities = new RecordActivity[len];
+    		
+    		for (int i=0; i < len; i++) {
+    			m_recordActivities[i] =
+    					(RecordActivity)in.readObject();
+    		}
+    	}
+    	
+    	super.readExternal(in);
+    }
+	
+	private RecordActivity[] m_recordActivities=null;
+}

Added: tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/model/MonitorNode.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/model/MonitorNode.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/model/MonitorNode.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,350 @@
+/*
+ * Copyright 2005-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 4 Oct 2008 : Initial version created by gary
+ */
+package org.scribble.monitor.model;
+
+import java.io.IOException;
+import java.io.ObjectInput;
+import java.io.ObjectOutput;
+
+import org.scribble.monitor.Message;
+import org.scribble.monitor.MessageSignature;
+import org.scribble.monitor.MonitorContext;
+import org.scribble.monitor.MonitorEvent;
+
+/**
+ * This class represents the abstract top level monitoring
+ * node.
+ */
+public abstract class MonitorNode implements java.io.Externalizable {
+
+	/**
+	 * This is the default constructor for the Monitor Node.
+	 */
+	public MonitorNode() {
+	}
+			
+	/**
+	 * This method returns the parent associated with the
+	 * monitoring node.
+	 * 
+	 * @return The parent
+	 */
+	public MonitorNode getParent() {
+		return(m_parent);
+	}
+	
+	/**
+	 * This method sets the parent for the monitoring
+	 * node.
+	 * 
+	 * @param parent The parent
+	 */
+	public void setParent(MonitorNode parent) {
+		m_parent = parent;
+	}
+	
+	/**
+	 * This method sets the child position when this
+	 * node is contained within a collection associated
+	 * with the parent node.
+	 * 
+	 * @return The child position, or -1 if not relevant
+	 */
+	public int getChildPosition() {
+		return(m_childPosition);
+	}
+	
+	/**
+	 * This method sets the child position of this
+	 * monitoring node within a parent collection.
+	 * 
+	 * @param pos The child position
+	 */
+	public void setChildPosition(int pos) {
+		m_childPosition = pos;
+	}
+	
+	/**
+	 * This method returns the array of monitoring
+	 * node children associated with this node.
+	 * 
+	 * @return The array of child monitor nodes
+	 */
+	public MonitorNode[] getChildren() {
+		return(m_children);
+	}
+	
+	/**
+	 * This method sets the array of monitoring
+	 * node children associated with this node.
+	 * 
+	 * @param children The array of child monitor nodes
+	 */
+	public void setChildren(MonitorNode[] children) {
+		m_children = children;
+	}
+	
+	/**
+	 * This method sets the array of message signatures
+	 * that should be used to guard this node when
+	 * processing a 'sent' message.
+	 * 
+	 * @param guards The array of message signatures
+	 */
+	public void setSentGuards(MessageSignature[] guards) {
+		m_sentGuards = guards;
+	}
+	
+	/**
+	 * This method sets the array of message signatures
+	 * that should be used to guard this node when
+	 * processing a 'receive' message.
+	 * 
+	 * @param guards The array of message signatures
+	 */
+	public void setReceiveGuards(MessageSignature[] guards) {
+		m_recvdGuards = guards;
+	}
+	
+	/**
+	 * This method is invoked by a child node to indicated
+	 * that it has performed any necessary tasks associated
+	 * with the receipt of a 'sent' message event, and that
+	 * the parent should now trigger the next appropriate
+	 * step.
+	 * 
+	 * @param mc The monitor context
+	 * @param context The conversation context
+	 * @param node The child node that has completed its processing
+	 * @param mesg The message
+	 * @return Whether the 'sent' message has been matched
+	 */
+	public boolean processedNodeWithSentMessage(MonitorContext mc,
+			ConversationContext context, MonitorNode node, Message mesg) {
+		boolean ret=false;
+		
+		if (getParent() != null) {
+			getParent().processedNodeWithSentMessage(mc, context, this, mesg);
+		}
+		
+		return(ret);
+	}
+	
+	/**
+	 * This method is invoked by a child node to indicated
+	 * that it has performed any necessary tasks associated
+	 * with the receipt of a 'received' message event, and that
+	 * the parent should now trigger the next appropriate
+	 * step.
+	 * 
+	 * @param mc The monitor context
+	 * @param context The conversation context
+	 * @param node The child node that has completed its processing
+	 * @param mesg The message
+	 * @return Whether the 'received' message has been matched
+	 */
+	public boolean processedNodeWithReceivedMessage(MonitorContext mc,
+			ConversationContext context, MonitorNode node, Message mesg) {
+		boolean ret=false;
+
+		if (getParent() != null) {
+			getParent().processedNodeWithReceivedMessage(mc, context, this, mesg);
+		}
+
+		return(ret);
+	}
+
+	/**
+	 * This method determines whether the node is capable of
+	 * dealing with the supplied 'sent' message. This method
+	 * should be called before initiating processing of the
+	 * message using the 'sent' method.
+	 * 
+	 * @param mc The monitor context
+	 * @param context The conversation context
+	 * @param mesg The message
+	 * @return Whether the node can handle the message
+	 */
+	public boolean canProcessSentMessage(MonitorContext mc,
+			ConversationContext context, Message mesg) {
+		boolean ret=false;
+		
+		if (m_sentGuards != null && mesg != null) {
+			for (int i=0; ret == false && i < m_sentGuards.length; i++) {
+				ret = m_sentGuards[i].equals(mesg.getSignature());
+			}
+		}
+		
+		return(ret);
+	}
+	
+	/**
+	 * This method processes the 'sent' message.
+	 * 
+	 * @param mc The monitor context
+	 * @param context The conversation context
+	 * @param mesg The message
+	 * @return Whether the 'sent' message has been handled
+	 */
+	public boolean sent(MonitorContext mc,
+				ConversationContext context, Message mesg) {
+		return(false);
+	}
+	
+	/**
+	 * This method determines whether the node is capable of
+	 * dealing with the supplied 'received' message. This method
+	 * should be called before initiating processing of the
+	 * message using the 'received' method.
+	 * 
+	 * @param mc The monitor context
+	 * @param context The conversation context
+	 * @param mesg The message
+	 * @return Whether the node can handle the message
+	 */
+	public boolean canProcessReceivedMessage(MonitorContext mc,
+			ConversationContext context, Message mesg) {
+		boolean ret=false;
+		
+		if (m_recvdGuards != null && mesg != null) {
+			for (int i=0; ret == false && i < m_recvdGuards.length; i++) {
+				ret = m_recvdGuards[i].equals(mesg.getSignature());
+			}
+		}
+		
+		return(ret);
+	}
+	
+	/**
+	 * This method processes the 'received' message.
+	 * 
+	 * @param mc The monitor context
+	 * @param context The conversation context
+	 * @param mesg The message
+	 * @return Whether the 'received' message has been handled
+	 */
+	public boolean received(MonitorContext mc,
+			ConversationContext context, Message mesg) {
+		return(false);
+	}
+	
+	/**
+	 * This method indicates whether the supplied event
+	 * can be handled by this monitor node.
+	 * 
+	 * @param mc The monitor context
+	 * @param context The conversation context
+	 * @param event
+	 */
+	public boolean canHandleEvent(MonitorContext mc,
+			ConversationContext context, MonitorEvent event) {
+		return(false);
+	}
+	
+	/**
+	 * This method processes the supplied event.
+	 * 
+	 * @param mc The monitor context
+	 * @param context The conversation context
+	 * @param event
+	 * @return Whether the event was handled
+	 */
+	public boolean onMonitorEvent(MonitorContext mc,
+			ConversationContext context, MonitorEvent event) {
+		return(false);
+	}
+	
+    public void writeExternal(ObjectOutput out) throws IOException {
+    	
+    	out.writeObject(m_parent);
+    	out.writeInt(m_childPosition);
+    	
+    	if (m_sentGuards == null) {
+    	   	out.writeInt(0);
+    	} else {
+    	   	out.writeInt(m_sentGuards.length);
+   		
+    	   	for (int i=0; i < m_sentGuards.length; i++) {
+    	   		out.writeObject(m_sentGuards[i]);
+    	   	}
+    	}
+     	
+    	if (m_recvdGuards == null) {
+    	   	out.writeInt(0);
+    	} else {
+    	   	out.writeInt(m_recvdGuards.length);
+   		
+    	   	for (int i=0; i < m_recvdGuards.length; i++) {
+    	   		out.writeObject(m_recvdGuards[i]);    	   		
+    	   	}
+    	}
+    	
+    	if (m_children == null) {
+    		out.writeInt(0);
+    	} else {
+    		out.writeInt(m_children.length);
+    		
+    		for (int i=0; i < m_children.length; i++) {
+    			out.writeObject(m_children[i]);
+    		}
+    	}
+    }
+    
+    public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
+    	m_parent = (MonitorNode)in.readObject();
+    	m_childPosition = in.readInt();
+    	
+    	int sent=in.readInt();
+
+    	if (sent > 0) {
+    		m_sentGuards = new MessageSignature[sent];
+    		
+    		for (int i=0; i < sent; i++) {
+    			m_sentGuards[i] = (MessageSignature)in.readObject();
+    	   	}
+    	}
+     	
+    	int recvd=in.readInt();
+
+    	if (recvd > 0) {
+    		m_recvdGuards = new MessageSignature[recvd];
+    		
+    		for (int i=0; i < recvd; i++) {
+    			m_recvdGuards[i] = (MessageSignature)in.readObject();
+    	   	}
+    	}  	
+    	
+    	int num=in.readInt();
+    	
+    	if (num > 0) {
+    		m_children = new MonitorNode[num];
+    		
+    		for (int i=0; i < num; i++) {
+    			m_children[i] = (MonitorNode)in.readObject();
+    		}
+    	}
+    }
+    
+	private MonitorNode m_parent=null;
+	private int m_childPosition=-1;
+	private MessageSignature[] m_sentGuards=null;
+	private MessageSignature[] m_recvdGuards=null;
+	private MonitorNode[] m_children=null;
+}

Added: tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/model/ParallelNode.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/model/ParallelNode.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/model/ParallelNode.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,138 @@
+/*
+ * Copyright 2005-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 5 Oct 2008 : Initial version created by gary
+ */
+package org.scribble.monitor.model;
+
+import java.io.IOException;
+import java.io.ObjectInput;
+import java.io.ObjectOutput;
+
+import org.scribble.monitor.Message;
+import org.scribble.monitor.MonitorContext;
+
+/**
+ * This class represents the 'parallel' construct, where a set
+ * of concurrent paths will be evaluated.
+ */
+public class ParallelNode extends MonitorNode implements java.io.Externalizable {
+
+	/**
+	 * This method processes the 'sent' message.
+	 * 
+	 * @param mc The monitor context
+	 * @param context The conversation context
+	 * @param mesg The message
+	 * @return Whether the 'sent' message has been handled
+	 */
+	@Override
+	public boolean sent(MonitorContext mc,
+			ConversationContext context, Message mesg) {
+		boolean ret=false;
+
+		// Create sub-context
+		ConversationContext subContext=context.createSubScope(mc, this);
+		
+		// Register each path with the sub-context
+		for (int i=0; i < getChildren().length; i++) {
+			subContext.register(getChildren()[i]);
+		}
+		
+		// Delegate the 'sent' message to the sub-context
+		ret = subContext.sent(mc, mesg);
+		
+		return(ret);
+	}
+
+	/**
+	 * This method processes the 'received' message.
+	 * 
+	 * @param mc The monitor context
+	 * @param context The conversation context
+	 * @param mesg The message
+	 * @return Whether the 'received' message has been handled
+	 */
+	@Override
+	public boolean received(MonitorContext mc,
+			ConversationContext context, Message mesg) {
+		boolean ret=false;
+
+		// Create sub-context
+		ConversationContext subContext=context.createSubScope(mc, this);
+		
+		// Register each path with the sub-context
+		for (int i=0; i < getChildren().length; i++) {
+			subContext.register(getChildren()[i]);
+		}
+		
+		// Delegate the 'received' message to the sub-context
+		ret = subContext.received(mc, mesg);
+		
+		return(ret);
+	}
+	
+	/**
+	 * This method is invoked by a child node to indicated
+	 * that it has performed any necessary tasks associated
+	 * with the receipt of a 'sent' message event, and that
+	 * the parent should now trigger the next appropriate
+	 * step.
+	 * 
+	 * @param mc The monitor context
+	 * @param context The conversation context
+	 * @param node The child node that has completed its processing
+	 * @param mesg The message
+	 * @return Whether the 'sent' message has been matched
+	 */
+	@Override
+	public boolean processedNodeWithSentMessage(MonitorContext mc,
+			ConversationContext context, MonitorNode node, Message mesg) {
+		boolean ret=false;
+		
+		return(ret);
+	}
+	
+	/**
+	 * This method is invoked by a child node to indicated
+	 * that it has performed any necessary tasks associated
+	 * with the receipt of a 'received' message event, and that
+	 * the parent should now trigger the next appropriate
+	 * step.
+	 * 
+	 * @param mc The monitor context
+	 * @param context The conversation context
+	 * @param node The child node that has completed its processing
+	 * @param mesg The message
+	 * @return Whether the 'received' message has been matched
+	 */
+	@Override
+	public boolean processedNodeWithReceivedMessage(MonitorContext mc,
+			ConversationContext context, MonitorNode node, Message mesg) {
+		boolean ret=false;
+
+		return(ret);
+	}
+
+    public void writeExternal(ObjectOutput out) throws IOException {
+    	super.writeExternal(out);
+    }
+    
+    public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
+    	super.readExternal(in);
+    }
+}

Added: tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/model/ReceiveNode.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/model/ReceiveNode.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/model/ReceiveNode.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,143 @@
+/*
+ * Copyright 2005-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 4 Oct 2008 : Initial version created by gary
+ */
+package org.scribble.monitor.model;
+
+import java.io.IOException;
+import java.io.ObjectInput;
+import java.io.ObjectOutput;
+
+import org.scribble.monitor.ConversationIdentityType;
+import org.scribble.monitor.Message;
+import org.scribble.monitor.MonitorContext;
+
+/**
+ * This class represents the 'receive' activity.
+ */
+public class ReceiveNode extends MessageBasedNode implements java.io.Externalizable {
+
+	/**
+	 * This method processes the 'sent' message.
+	 * 
+	 * @param mc The monitor context
+	 * @param context The conversation context
+	 * @param mesg The message
+	 * @return Whether the 'sent' message has been handled
+	 */
+	@Override
+	public boolean sent(MonitorContext mc,
+			ConversationContext context, Message mesg) {
+		
+		if (mesg == null) {
+			// If message previously handled, then just register
+			// the node
+			context.register(this);
+		}
+		
+		return(false);
+	}	
+	
+	/**
+	 * This method processes the 'received' message.
+	 * 
+	 * @param mc The monitor context
+	 * @param context The conversation context
+	 * @param mesg The message
+	 * @return Whether the 'received' message has been handled
+	 */
+	@Override
+	public boolean received(MonitorContext mc,
+			ConversationContext context, Message mesg) {
+		boolean ret=canProcessReceivedMessage(mc,
+				context, mesg);
+		
+		// Check identity
+		if (ret && m_types != null) {
+			for (int i=0; ret &&
+					i < mesg.getIdentities().length; i++) {
+				for (int j=0; ret &&
+							j < m_types.length; j++) {
+					
+					if (mesg.getIdentities()[i].getType().equals(
+									m_types[j])) {
+						ret = context.assessIdentity(
+								mesg.getIdentities()[i]);
+					}
+				}
+			}
+		}
+		
+		if (ret == false) {
+			// Wait at this node until the required message
+			// signature is received
+			context.register(this);
+			
+		} else if (getParent() != null) {
+
+			record(mc, context, mesg);
+			
+			// Continue processing until get to next wait state,
+			// but don't pass on message, as it has been handled
+			getParent().processedNodeWithReceivedMessage(mc, context,
+								this, null);
+		}
+		
+		return(ret);
+	}
+
+	/**
+	 * This method defines the identity types that are of
+	 * interest to this 'receive' node.
+	 * 
+	 * @param types The conversation identity types
+	 */
+	public void setIdentityTypes(ConversationIdentityType[] types) {
+		m_types = types;
+	}
+
+    public void writeExternal(ObjectOutput out) throws IOException {
+    	if (m_types == null) {
+    		out.writeInt(0);
+    	} else {
+    		out.writeInt(m_types.length);
+    
+    		for (int i=0; i < m_types.length; i++) {
+    			out.writeObject(m_types[i]);
+    		}
+    	}
+    	
+    	super.writeExternal(out);
+    }
+    
+    public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {    	
+    	int num=in.readInt();
+    	
+    	if (num > 0) {
+    		m_types = new ConversationIdentityType[num];
+    		
+    		for (int i=0; i < num; i++) {
+    			m_types[i] = (ConversationIdentityType)in.readObject();
+    		}
+    	}
+    	
+    	super.readExternal(in);
+    }
+	
+	private ConversationIdentityType[] m_types=null;
+}

Added: tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/model/RecordActivity.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/model/RecordActivity.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/model/RecordActivity.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,117 @@
+/*
+ * Copyright 2005-9 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 21 Feb 2009 : Initial version created by gary
+ */
+package org.scribble.monitor.model;
+
+import java.io.IOException;
+import java.io.ObjectInput;
+import java.io.ObjectOutput;
+
+import org.scribble.monitor.Message;
+import org.scribble.monitor.MonitorContext;
+import org.scribble.monitor.expression.Expression;
+
+/**
+ * This class records information related to a received message,
+ * and an optional expression, in the conversation state.
+ */
+public class RecordActivity implements java.io.Externalizable {
+
+	/**
+	 * This is the default constructor for the record activity.
+	 */
+	public RecordActivity() {
+	}
+	
+	/**
+	 * This is the constructor for the record activity.
+	 * 
+	 * @param varName The variable name
+	 * @param expr The expression
+	 */
+	public RecordActivity(String varName, Expression expr) {
+		m_variableName = varName;
+		m_expression = expr;
+	}
+	
+	/**
+	 * This method dispatches the 'record' request to the
+	 * configured record activities.
+	 * 
+	 * @param mc The monitor context 
+	 * @param context The conversation context
+	 * @param mesg The message to be recorded
+	 */
+	public void record(MonitorContext mc, ConversationContext context,
+						Message mesg) {
+		Object val=null;
+		
+		if (mesg != null) {
+			val = mesg.getContent();
+		}
+		
+		if (m_expression != null) {
+			try {
+				val = m_expression.evaluate(context, val);
+			} catch(Exception e) {
+				// TODO: HANDLE ERROR
+				e.printStackTrace();
+			}
+		}
+		
+		if (val == null) {
+			context.getVariables().remove(m_variableName);
+		} else {
+			context.getVariables().put(m_variableName, val);
+		}
+	}
+	
+	/**
+	 * This method sets the variable name to be recorded.
+	 * 
+	 * @param name The variable name
+	 */
+	public void setVariableName(String name) {
+		m_variableName = name;
+	}
+	
+	/**
+	 * This method sets the optional expression to be
+	 * applied to the message to obtain the information
+	 * to be recorded.
+	 * 
+	 * @param expr The optional expression
+	 */
+	public void setExpression(Expression expr) {
+		m_expression = expr;
+	}
+	
+    public void writeExternal(ObjectOutput out) throws IOException {
+    	out.writeUTF(m_variableName);
+    	out.writeObject(m_expression);
+    }
+    
+    public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
+    	m_variableName = in.readUTF();
+    	m_expression = (Expression)in.readObject();
+    }
+	
+	private String m_variableName=null;
+	private Expression m_expression=null;
+}

Added: tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/model/RunNode.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/model/RunNode.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/model/RunNode.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,214 @@
+/*
+ * Copyright 2005-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 6 Oct 2008 : Initial version created by gary
+ */
+package org.scribble.monitor.model;
+
+import java.io.IOException;
+import java.io.ObjectInput;
+import java.io.ObjectOutput;
+
+import org.scribble.monitor.Conversation;
+import org.scribble.monitor.Message;
+import org.scribble.monitor.ConversationTypeName;
+import org.scribble.monitor.Result;
+import org.scribble.monitor.MonitorContext;
+import org.scribble.monitor.MonitorEvent;
+import org.scribble.monitor.InvokedConversationFinishedEvent;
+
+/**
+ * This class represents the 'run' construct.
+ */
+public class RunNode extends MonitorNode implements java.io.Externalizable {
+
+	/**
+	 * This method processes the 'sent' message.
+	 * 
+	 * @param mc The monitor context
+	 * @param context The conversation context
+	 * @param mesg The message
+	 * @return Whether the 'sent' message has been handled
+	 */
+	@Override
+	public boolean sent(MonitorContext mc,
+			ConversationContext context, Message mesg) {
+		boolean ret=false;
+
+		if (mesg != null) {
+			ConversationType convType=
+					mc.getConversationTypeRepository().
+						getConversationType(m_conversationTypeName);
+			
+			/*
+			// Create sub-context
+			ConversationContext subContext=context.createSession(mc,
+							this, convType, false);
+			
+			// Delegate the 'sent' message to the sub-context
+			ret = subContext.sent(mc, mesg);
+			*/
+			
+			Conversation sub=mc.getConversationManager().createConversation(convType);
+			
+			sub.notifyOnCompletion(context.getName(), context.getIdentities());
+			
+			if (sub.sentMessage(mc, mesg) == Result.Handled) {
+				ret = true;
+				
+				if (sub.isCompleted()) {
+					mc.getConversationManager().removeConversation(sub);
+				} else {
+					mc.getConversationManager().updateConversation(sub);
+				}
+				
+				// TODO: How will the start of this conversation be reported
+				// - maybe the conversation manager should report start/stop events
+
+				// Register to receive completion event
+				context.pendingEvent(this);
+			} else {
+				// TODO: Decide how to handle the situation where
+				// the sub-conversation does not handle the message
+			}
+			
+		} else {
+			context.register(this);
+		}
+		
+		return(ret);
+	}
+
+	/**
+	 * This method processes the 'received' message.
+	 * 
+	 * @param mc The monitor context
+	 * @param context The conversation context
+	 * @param mesg The message
+	 * @return Whether the 'received' message has been handled
+	 */
+	@Override
+	public boolean received(MonitorContext mc,
+			ConversationContext context, Message mesg) {
+		boolean ret=false;
+
+		if (mesg != null) {
+			ConversationType convType=
+				mc.getConversationTypeRepository().
+					getConversationType(m_conversationTypeName);
+		
+			/*
+			// Create sub-context
+			ConversationContext subContext=context.createSession(mc,
+							this, convType, false);
+			
+			// Delegate the 'received' message to the sub-context
+			ret = subContext.received(mc, mesg);
+			*/
+			
+			Conversation sub=mc.getConversationManager().createConversation(convType);
+			
+			sub.notifyOnCompletion(context.getName(), context.getIdentities());
+			
+			if (sub.receivedMessage(mc, mesg) == Result.Handled) {
+				ret = true;
+				
+				if (sub.isCompleted()) {
+					mc.getConversationManager().removeConversation(sub);
+				} else {
+					mc.getConversationManager().updateConversation(sub);
+				}
+				
+				// TODO: How will the start of this conversation be reported
+				// - maybe the conversation manager should report start/stop events
+			}
+			
+		} else {
+			context.register(this);
+		}
+		
+		return(ret);
+	}
+	
+	/**
+	 * This method indicates whether the supplied event
+	 * can be handled by this monitor node.
+	 * 
+	 * @param mc The monitor context
+	 * @param context The conversation context
+	 * @param event
+	 */
+	public boolean canHandleEvent(MonitorContext mc,
+			ConversationContext context, MonitorEvent event) {
+		
+		// TODO: Needs to more precisely determine if this event
+		// is for this node
+		
+		return(event.isInvokedConversationFinishedEvent() &&
+				((InvokedConversationFinishedEvent)event).
+				getInvokedConversationTypeName().equals(m_conversationTypeName));
+	}
+	
+	/**
+	 * This method processes the supplied event.
+	 * 
+	 * @param mc The monitor context
+	 * @param context The conversation context
+	 * @param event The event
+	 * @return Whether the event was handled
+	 */
+	public boolean onMonitorEvent(MonitorContext mc,
+			ConversationContext context, MonitorEvent event) {
+		boolean ret=false;
+		//InvokedConversationFinishedEvent ssfe=(InvokedConversationFinishedEvent)event;
+		
+		// Continue processing until get to next wait state,
+		// but don't pass on message, as this node has been
+		// triggered by an event. Does not matter if the
+		// 'sent' or 'received' message method is used, as
+		// no message is supplied.
+		getParent().processedNodeWithSentMessage(mc, context,
+							this, null);
+		
+		ret = true;
+		
+		return(ret);
+	}
+
+	/**
+	 * This method sets the conversation type name to be 'run'.
+	 * 
+	 * @param name The conversation type name
+	 */
+	public void setConversationTypeName(ConversationTypeName name) {
+		m_conversationTypeName = name;
+	}
+
+    public void writeExternal(ObjectOutput out) throws IOException {
+    	out.writeObject(m_conversationTypeName);
+    	
+    	super.writeExternal(out);
+    }
+    
+    public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
+    	m_conversationTypeName = (ConversationTypeName)in.readObject();
+    	
+    	super.readExternal(in);
+    }
+	
+	private ConversationTypeName m_conversationTypeName=null;
+}

Added: tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/model/SendNode.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/model/SendNode.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/model/SendNode.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,143 @@
+/*
+ * Copyright 2005-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 4 Oct 2008 : Initial version created by gary
+ */
+package org.scribble.monitor.model;
+
+import java.io.IOException;
+import java.io.ObjectInput;
+import java.io.ObjectOutput;
+
+import org.scribble.monitor.ConversationIdentityType;
+import org.scribble.monitor.Message;
+import org.scribble.monitor.MonitorContext;
+
+/**
+ * This class represents a message being 'sent'.
+ */
+public class SendNode extends MessageBasedNode implements java.io.Externalizable {
+
+	/**
+	 * This method processes the 'sent' message.
+	 * 
+	 * @param mc The monitor context
+	 * @param context The conversation context
+	 * @param mesg The message
+	 * @return Whether the 'sent' message has been handled
+	 */
+	@Override
+	public boolean sent(MonitorContext mc,
+			ConversationContext context, Message mesg) {
+		boolean ret=canProcessSentMessage(mc,
+				context, mesg);
+		
+		// Check identity
+		if (ret && m_types != null) {
+			for (int i=0; ret &&
+					i < mesg.getIdentities().length; i++) {
+				for (int j=0; ret &&
+							j < m_types.length; j++) {
+					
+					if (mesg.getIdentities()[i].getType().equals(
+									m_types[j])) {
+						ret = context.assessIdentity(
+								mesg.getIdentities()[i]);
+					}
+				}
+			}
+		}
+		
+		if (ret == false) {
+			// Wait at this node until the required message
+			// signature is sent
+			context.register(this);
+			
+		} else if (getParent() != null) {
+			
+			record(mc, context, mesg);
+			
+			// Continue processing until get to next wait state,
+			// but don't pass on message, as it has been handled
+			getParent().processedNodeWithSentMessage(mc, context,
+								this, null);
+		}
+
+		return(ret);
+	}
+	
+	/**
+	 * This method processes the 'received' message.
+	 * 
+	 * @param mc The monitor context
+	 * @param context The conversation context
+	 * @param mesg The message
+	 * @return Whether the 'received' message has been handled
+	 */
+	@Override
+	public boolean received(MonitorContext mc,
+			ConversationContext context, Message mesg) {
+		
+		if (mesg == null) {
+			// If message previously handled, then just register
+			// the node
+			context.register(this);
+		}
+		
+		return(false);
+	}
+
+	/**
+	 * This method defines the identity types that are of
+	 * interest to this 'send' node.
+	 * 
+	 * @param types The conversation identity types
+	 */
+	public void setIdentityTypes(ConversationIdentityType[] types) {
+		m_types = types;
+	}
+
+    public void writeExternal(ObjectOutput out) throws IOException {
+    	if (m_types == null) {
+    		out.writeInt(0);
+    	} else {
+    		out.writeInt(m_types.length);
+    
+    		for (int i=0; i < m_types.length; i++) {
+    			out.writeObject(m_types[i]);
+    		}
+    	}
+    	
+    	super.writeExternal(out);
+    }
+    
+    public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
+    	int num=in.readInt();
+    	
+    	if (num > 0) {
+    		m_types = new ConversationIdentityType[num];
+    		
+    		for (int i=0; i < num; i++) {
+    			m_types[i] = (ConversationIdentityType)in.readObject();
+    		}
+    	}
+    	
+    	super.readExternal(in);
+    }
+	
+	private ConversationIdentityType[] m_types=null;
+}

Added: tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/model/SequenceNode.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/model/SequenceNode.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/model/SequenceNode.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,156 @@
+/*
+ * Copyright 2005-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 4 Oct 2008 : Initial version created by gary
+ */
+package org.scribble.monitor.model;
+
+import java.io.IOException;
+import java.io.ObjectInput;
+import java.io.ObjectOutput;
+
+import org.scribble.monitor.Message;
+import org.scribble.monitor.MonitorContext;
+
+/**
+ * This class represents a sequence of activities.
+ */
+public class SequenceNode extends MonitorNode implements java.io.Externalizable {
+
+	/**
+	 * This method processes the 'sent' message.
+	 * 
+	 * @param mc The monitor context
+	 * @param context The conversation context
+	 * @param mesg The message
+	 * @return Whether the 'sent' message has been handled
+	 */
+	@Override
+	public boolean sent(MonitorContext mc,
+				ConversationContext context, Message mesg) {
+		boolean ret=false;
+		
+		if (getChildren().length > 0) {
+			ret = getChildren()[0].sent(mc, context, mesg);
+		} else if (getParent() != null) {
+			ret = getParent().processedNodeWithSentMessage(mc,
+							context, this, mesg);
+		}
+
+		return(ret);
+	}
+
+	/**
+	 * This method processes the 'received' message.
+	 * 
+	 * @param mc The monitor context
+	 * @param context The conversation context
+	 * @param mesg The message
+	 * @return Whether the 'received' message has been handled
+	 */
+	@Override
+	public boolean received(MonitorContext mc,
+			ConversationContext context, Message mesg) {
+		boolean ret=false;
+		
+		if (getChildren().length > 0) {
+			ret = getChildren()[0].received(mc, context, mesg);
+		} else if (getParent() != null) {
+			ret = getParent().processedNodeWithReceivedMessage(mc,
+						context, this, mesg);
+		}
+		
+		return(ret);
+	}
+
+	/**
+	 * This method is invoked by a child node to indicated
+	 * that it has performed any necessary tasks associated
+	 * with the receipt of a 'sent' message event, and that
+	 * the parent should now trigger the next appropriate
+	 * step.
+	 * 
+	 * @param mc The monitor context
+	 * @param context The conversation context
+	 * @param node The child node that has completed its processing
+	 * @param mesg The message
+	 * @return Whether the 'sent' message has been matched
+	 */
+	@Override
+	public boolean processedNodeWithSentMessage(MonitorContext mc,
+			ConversationContext context, MonitorNode node, Message mesg) {
+		boolean ret=false;
+		MonitorNode next=null;
+		int pos=node.getChildPosition();
+		
+		if (pos != -1 && pos < getChildren().length-1) {
+			next = getChildren()[pos+1];
+		}
+		
+		if (next != null) {
+			ret = next.sent(mc, context, mesg);
+		} else if (getParent() != null) {
+			ret = getParent().processedNodeWithSentMessage(mc,
+						context, this, mesg);
+		}
+		
+		return(ret);
+	}
+
+
+	/**
+	 * This method is invoked by a child node to indicated
+	 * that it has performed any necessary tasks associated
+	 * with the receipt of a 'received' message event, and that
+	 * the parent should now trigger the next appropriate
+	 * step.
+	 * 
+	 * @param mc The monitor context
+	 * @param context The conversation context
+	 * @param node The child node that has completed its processing
+	 * @param mesg The message
+	 * @return Whether the 'received' message has been matched
+	 */
+	@Override
+	public boolean processedNodeWithReceivedMessage(MonitorContext mc,
+			ConversationContext context, MonitorNode node, Message mesg) {
+		boolean ret=false;
+		MonitorNode next=null;
+		int pos=node.getChildPosition();
+		
+		if (pos != -1 && pos < getChildren().length-1) {
+			next = getChildren()[pos+1];
+		}
+		
+		if (next != null) {
+			ret = next.received(mc, context, mesg);
+		} else if (getParent() != null) {
+			ret = getParent().processedNodeWithReceivedMessage(mc,
+							context, this, mesg);
+		}
+		
+		return(ret);
+	}
+
+    public void writeExternal(ObjectOutput out) throws IOException {
+    	super.writeExternal(out);
+    }
+    
+    public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
+    	super.readExternal(in);
+    }
+}

Added: tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/model/SpawnNode.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/model/SpawnNode.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/model/SpawnNode.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,179 @@
+/*
+ * Copyright 2005-9 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 22 Feb 2009 : Initial version created by gary
+ */
+package org.scribble.monitor.model;
+
+import java.io.IOException;
+import java.io.ObjectInput;
+import java.io.ObjectOutput;
+
+import org.scribble.monitor.Conversation;
+import org.scribble.monitor.Message;
+import org.scribble.monitor.ConversationTypeName;
+import org.scribble.monitor.Result;
+import org.scribble.monitor.MonitorContext;
+
+/**
+ * This class represents the 'spawn' construct.
+ */
+public class SpawnNode extends MonitorNode implements java.io.Externalizable {
+
+	/**
+	 * This method processes the 'sent' message.
+	 * 
+	 * @param mc The monitor context
+	 * @param context The conversation context
+	 * @param mesg The message
+	 * @return Whether the 'sent' message has been handled
+	 */
+	@Override
+	public boolean sent(MonitorContext mc,
+			ConversationContext context, Message mesg) {
+		boolean ret=false;
+
+		if (mesg != null) {
+			ConversationType convType=
+				mc.getConversationTypeRepository().
+					getConversationType(m_conversationTypeName);
+			
+			/*
+			// Create sub-context
+			ConversationContext subContext=context.createSession(mc,
+							this, convType, true);
+			
+			// TODO: Issue - what happens if the message
+			// relates to an activity following the spawn,
+			// as opposed to within the spawned description?
+			// Normally the message passed to the spawned
+			// process should be initialising the sub-scope's
+			// identity. Need to consider this case more
+			// carefully.
+			
+			// Delegate the 'sent' message to the sub-context
+			ret = subContext.sent(mc, mesg);
+			*/
+			
+			Conversation sub=mc.getConversationManager().createConversation(convType);
+			
+			if (sub.sentMessage(mc, mesg) == Result.Handled) {
+				ret = true;
+				
+				if (sub.isCompleted()) {
+					mc.getConversationManager().removeConversation(sub);
+				} else {
+					mc.getConversationManager().updateConversation(sub);
+				}
+				
+				// TODO: How will the start of this conversation be reported
+				// - maybe the conversation manager should report start/stop events
+			}
+			
+			// Continue processing
+			if (getParent() != null) {
+				getParent().processedNodeWithSentMessage(mc,
+						context, this, ret?null:mesg);
+			}
+		} else {
+			context.register(this);
+		}
+		
+		return(ret);
+	}
+
+	/**
+	 * This method processes the 'received' message.
+	 * 
+	 * @param mc The monitor context
+	 * @param context The conversation context
+	 * @param mesg The message
+	 * @return Whether the 'received' message has been handled
+	 */
+	@Override
+	public boolean received(MonitorContext mc,
+			ConversationContext context, Message mesg) {
+		boolean ret=false;
+
+		if (mesg != null) {
+			ConversationType convType=
+				mc.getConversationTypeRepository().
+					getConversationType(m_conversationTypeName);
+			
+			/*
+			// Create sub-context
+			ConversationContext subContext=context.createSession(mc,
+							this, convType, true);
+			
+			// TODO: Issue - what happens if the message
+			// relates to an activity following the spawn,
+			// as opposed to within the spawned description?
+			// Normally the message passed to the spawned
+			// process should be initialising the sub-scope's
+			// identity. Need to consider this case more
+			// carefully.
+			
+			// Delegate the 'received' message to the sub-context
+			ret = subContext.received(mc, mesg);
+			*/
+			
+			Conversation sub=mc.getConversationManager().createConversation(convType);
+			
+			if (sub.receivedMessage(mc, mesg) == Result.Handled) {
+				ret = true;
+				
+				if (sub.isCompleted()) {
+					mc.getConversationManager().removeConversation(sub);
+				} else {
+					mc.getConversationManager().updateConversation(sub);
+				}
+				
+				// TODO: How will the start of this conversation be reported
+				// - maybe the conversation manager should report start/stop events
+			}
+			
+			// Continue processing
+			if (getParent() != null) {
+				getParent().processedNodeWithReceivedMessage(mc,
+						context, this, ret?null:mesg);
+			}
+		} else {
+			context.register(this);
+		}
+		
+		return(ret);
+	}
+	
+	/**
+	 * This method sets the conversation type name to be 'run'.
+	 * 
+	 * @param name The conversation type name
+	 */
+	public void setConversationTypeName(ConversationTypeName name) {
+		m_conversationTypeName = name;
+	}
+
+    public void writeExternal(ObjectOutput out) throws IOException {
+    	out.writeObject(m_conversationTypeName);
+    }
+    
+    public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
+    	m_conversationTypeName = (ConversationTypeName)in.readObject();
+    }
+	
+	private ConversationTypeName m_conversationTypeName=null;
+}

Added: tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/osgi/Activator.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/osgi/Activator.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.monitor/src/java/org/scribble/monitor/osgi/Activator.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,70 @@
+/*
+ * Copyright 2005-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 4 Oct 2008 : Initial version created by gary
+ */
+package org.scribble.monitor.osgi;
+
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class Activator implements BundleActivator {
+
+	// The plug-in ID
+	public static final String PLUGIN_ID = "org.scribble.monitor";
+
+	// The shared instance
+	private static Activator plugin;
+	
+	/**
+	 * The constructor
+	 */
+	public Activator() {
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+	 */
+	public void start(BundleContext context) throws Exception {
+		plugin = this;
+		
+		context.registerService(org.scribble.monitor.MonitoringService.class.getName(),
+						new org.scribble.monitor.MonitorFactory(), null);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+	 */
+	public void stop(BundleContext context) throws Exception {
+		plugin = null;
+	}
+
+	/**
+	 * Returns the shared instance
+	 *
+	 * @return the shared instance
+	 */
+	public static Activator getDefault() {
+		return plugin;
+	}
+
+}

Added: tools/eclipse/trunk/plugins/org.scribble.monitor/src/lib/jaxen-1.1.1.jar
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.monitor/src/lib/jaxen-1.1.1.jar
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.monitor/src/perftest/performance/PerformanceTests.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.monitor/src/perftest/performance/PerformanceTests.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.monitor/src/perftest/performance/PerformanceTests.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,90 @@
+/*
+ * Copyright 2005-9 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 10 May 2009 : Initial version created by gary
+ */
+package performance;
+
+import performance.expressions.JaxenExpressionTest;
+import performance.monitor.DynaTest;
+import performance.monitor.MonitorTestCase1;
+import performance.monitor.MonitorTestCase2;
+import performance.monitor.MonitorTestCase3;
+import performance.monitor.MonitorTestCase4;
+import performance.monitor.MonitorTestCase5;
+import performance.monitor.MonitorTestCase6;
+import performance.monitor.TestMonitor;
+import junit.framework.TestCase;
+import junit.framework.TestResult;
+import junit.framework.TestSuite;
+
+public class PerformanceTests extends TestCase {
+
+    public static TestSuite suite() {
+        TestSuite suite = new TestSuite("Performance Tests");
+
+        suite.addTest(new PerformanceTestCase("Case1", new TestMonitor(new MonitorTestCase1())));
+        suite.addTest(new PerformanceTestCase("Case2", new TestMonitor(new MonitorTestCase2())));
+        suite.addTest(new PerformanceTestCase("Case3", new TestMonitor(new MonitorTestCase3())));
+        suite.addTest(new PerformanceTestCase("Case4", new TestMonitor(new MonitorTestCase4())));
+        suite.addTest(new PerformanceTestCase("Case5", new TestMonitor(new MonitorTestCase5())));
+        suite.addTest(new PerformanceTestCase("Case6", new TestMonitor(new MonitorTestCase6())));
+        suite.addTest(new PerformanceTestCase("DynamicInvocation", new DynaTest()));
+        suite.addTest(new PerformanceTestCase("JaxenExpression", new JaxenExpressionTest()));
+
+        return(suite);
+    }
+    
+    /**
+     * The test case for running the performance tests.
+     */
+	protected static class PerformanceTestCase extends TestCase {
+
+		/**
+		 * This constructor is initialized with the test
+		 * name.
+		 * 
+		 * @param name The test name
+		 */
+		public PerformanceTestCase(String name, Runnable test) {
+			super(name);
+			m_name = name;
+			m_test = test;
+		}
+		
+		/**
+		 * This method runs the test.
+		 * 
+		 * @param result The test result
+		 */
+		public void run(TestResult result) {
+			result.startTest(this);
+			
+			System.out.println("----------------------------------");
+			System.out.println("PERFORMANCE TEST: "+m_name);
+			
+			m_test.run();
+			
+			System.out.println("==================================");
+			
+			result.endTest(this);
+		}
+		
+		private String m_name=null;
+		private Runnable m_test=null;
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.monitor/src/perftest/performance/expressions/JaxenExpressionTest.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.monitor/src/perftest/performance/expressions/JaxenExpressionTest.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.monitor/src/perftest/performance/expressions/JaxenExpressionTest.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,151 @@
+/*
+ * Copyright 2005-9 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 21 Feb 2009 : Initial version created by gary
+ */
+package performance.expressions;
+
+import org.jaxen.*;
+import org.jaxen.javabean.*;
+import org.jaxen.dom.*;
+
+public class JaxenExpressionTest implements Runnable {
+
+	private static final int ITERATIONS = 1000;
+
+	public static void main(String[] args) {
+		JaxenExpressionTest expr=new JaxenExpressionTest();
+		
+		expr.run();
+	}
+	
+	public JaxenExpressionTest() {
+	}
+	
+	public void run() {
+		run1();
+		run2();
+	}
+	
+	public void run1() {
+		Main main=new Main();
+		Sub sub=new Sub();
+		sub.setValue("hello");
+		
+		main.setSub(sub);
+		
+		int matched=0;
+		
+		try {
+			long start=System.currentTimeMillis();
+			
+			for (int i=0; i < ITERATIONS; i++) {
+				XPath path = new JavaBeanXPath("sub/value");
+				
+				Object obj=path.evaluate(main);
+	
+				if (obj instanceof java.util.List) {
+					java.util.List<Object> l=
+								(java.util.List<Object>)obj;
+					
+					if (l.get(0)==sub.getValue()) {
+						matched++;
+					}
+				}
+			}
+			
+			System.out.println("Time="+(System.currentTimeMillis()-
+					start)+" for "+ITERATIONS+" iterations");
+			
+		} catch(Exception e) {
+			e.printStackTrace();
+		}
+	}
+	
+	public void run2() {
+		int matched=0;
+		
+		try {
+			org.w3c.dom.Document doc=
+				javax.xml.parsers.DocumentBuilderFactory.newInstance().newDocumentBuilder().newDocument();
+			
+			org.w3c.dom.Element sub=doc.createElement("sub");
+			doc.appendChild(sub);
+			
+			org.w3c.dom.Element value=doc.createElement("value");
+			sub.appendChild(value);
+			
+			org.w3c.dom.Text text=doc.createTextNode("hello");
+			value.appendChild(text);
+			
+			long start=System.currentTimeMillis();
+			
+			for (int i=0; i < ITERATIONS; i++) {
+				XPath path = new DOMXPath("/sub/value/text()");
+				
+				Object obj=path.evaluate(doc);
+	//System.out.println("Obj="+obj);
+				if (obj instanceof java.util.List) {
+					java.util.List<Object> l=
+								(java.util.List<Object>)obj;
+					
+					if (l.get(0)==text) {
+						matched++;
+					}
+				}
+			}
+			
+			System.out.println("Time="+(System.currentTimeMillis()-
+					start)+" for "+ITERATIONS+" iterations");
+			
+		} catch(Exception e) {
+			e.printStackTrace();
+		}
+	}
+	
+	public static class Main {
+		
+		public Main() {
+		}
+		
+		public Sub getSub() {
+			return(m_sub);
+		}
+		
+		public void setSub(Sub s) {
+			m_sub = s;
+		}
+		
+		private Sub m_sub=null;
+	}
+	
+	public static class Sub {
+		
+		public Sub() {
+		}
+		
+		public String getValue() {
+			return(m_value);
+		}
+		
+		public void setValue(String val) {
+			m_value = val;
+		}
+		
+		private String m_value=null;
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.monitor/src/perftest/performance/monitor/DynaTest.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.monitor/src/perftest/performance/monitor/DynaTest.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.monitor/src/perftest/performance/monitor/DynaTest.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,652 @@
+/*
+ * Copyright 2005-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 9 Oct 2008 : Initial version created by gary
+ */
+package performance.monitor;
+
+import java.lang.reflect.Method;
+
+import org.scribble.monitor.*;
+import org.scribble.monitor.impl.DefaultMonitorContext;
+import org.scribble.monitor.model.ChoiceNode;
+import org.scribble.monitor.model.ConversationType;
+import org.scribble.monitor.model.MonitorNode;
+import org.scribble.monitor.model.ReceiveNode;
+import org.scribble.monitor.model.SendNode;
+import org.scribble.monitor.model.SequenceNode;
+
+public class DynaTest implements Runnable {
+
+	public static void main(String[] args) {
+		DynaTest app=new DynaTest();
+		
+		app.run();
+	}
+
+	public void run() {
+		
+		if (debug) {
+			runIteration();
+		} else {
+			
+			long startTime=System.currentTimeMillis();
+			
+			useProxy1 = false;
+			
+			for (int i=0; i < 1000000; i++) {
+				runIteration();
+			}
+			
+			long midTime=System.currentTimeMillis();
+			
+			useProxy1 = true;
+			useProxy2 = false;
+			
+			for (int i=0; i < 1000000; i++) {
+				runIteration();
+			}
+			
+			long endTime1=System.currentTimeMillis();
+			
+			useProxy2 = true;
+			useProxy1 = false;
+			
+			for (int i=0; i < 1000000; i++) {
+				runIteration();
+			}
+			
+			long endTime2=System.currentTimeMillis();
+			
+			System.out.println("Normal Time="+(midTime-startTime));
+			System.out.println("Proxy1 Time="+(endTime1-midTime));
+			System.out.println("Proxy2 Time="+(endTime2-endTime1));
+			System.out.println("Additional 1="+((endTime1-midTime)-(midTime-startTime)));
+			System.out.println("Factor 1="+((endTime1-midTime)/(midTime-startTime)));
+			System.out.println("Additional 2="+((endTime2-endTime1)-(midTime-startTime)));
+			System.out.println("Factor 2="+((endTime2-endTime1)/(midTime-startTime)));
+		}
+	}
+	
+	protected void runIteration() {
+		try {
+			MonitorContext context=new DefaultMonitorContext();
+			Monitor monitor=MonitorFactory.getMonitor(context);
+				
+			ConversationType ct=getDescription();
+			
+			context.getConversationTypeRepository().addConversationType(ct);
+			
+			monitor.observe(ct.getName());
+					
+			Supplier s=new SupplierImpl();
+			CreditAgency ca=new CreditAgencyImpl();
+			Broker b=new BrokerImpl();
+			
+			if (useProxy1) {
+				b = (Broker)java.lang.reflect.Proxy.newProxyInstance(
+					    s.getClass().getClassLoader(),
+					    new Class[]{Broker.class},
+					    new InboundMonitorProxy(b, monitor, m_identities));
+				
+				ca = (CreditAgency)java.lang.reflect.Proxy.newProxyInstance(
+					    s.getClass().getClassLoader(),
+					    new Class[]{CreditAgency.class},
+					    new OutboundMonitorProxy(ca, monitor, m_identities));
+				
+				s = (Supplier)java.lang.reflect.Proxy.newProxyInstance(
+					    s.getClass().getClassLoader(),
+					    new Class[]{Supplier.class},
+					    new OutboundMonitorProxy(s, monitor, m_identities));
+			}
+			
+			if (useProxy2) {
+				b = new BrokerProxy(b, monitor, m_identities);
+			}
+			
+			b.setCreditAgency(ca);
+			b.setSupplier(s);
+			
+			//ca.fail();
+			//s.fail();
+			
+			try {
+				BuyConfirmed bc=b.buy(new BuyRequest());
+				
+				if (debug) System.out.println("BUY CONFIRMED: "+bc);
+			} catch(BuyFailed bf) {
+				if (debug) System.out.println("BUY FAILED: "+bf);
+			}
+		} catch(Exception e) {
+			e.printStackTrace();
+		}
+	}
+	
+	private ConversationIdentity[] m_identities=
+			new ConversationIdentity[]{new ConversationIdentity(""+this.hashCode(),trade)};
+	
+	public ConversationType getDescription() {
+		ConversationType ret=new ConversationType();
+		ConversationTypeName name=new ConversationTypeName();
+		name.setName("DynaTest");
+		ret.setName(name);
+		
+		ret.setReceiveGuards(new MessageSignature[]{buy});
+		
+		ReceiveNode buyNode=new ReceiveNode();
+		buyNode.setReceiveGuards(new MessageSignature[]{buy});
+		buyNode.setParent(ret);
+		buyNode.setChildPosition(0);
+		buyNode.setIdentityTypes(new ConversationIdentityType[]{trade});
+		
+		SendNode creditCheckNode=new SendNode();
+		creditCheckNode.setSentGuards(new MessageSignature[]{creditCheck});
+		creditCheckNode.setParent(ret);
+		creditCheckNode.setChildPosition(1);
+		creditCheckNode.setIdentityTypes(new ConversationIdentityType[]{trade});
+		
+		ChoiceNode choiceOnCredit=new ChoiceNode();
+		choiceOnCredit.setReceiveGuards(new MessageSignature[]{creditValid,creditInvalid});
+		choiceOnCredit.setParent(ret);
+		choiceOnCredit.setChildPosition(2);
+		
+		SequenceNode creditOkSeq=new SequenceNode();
+		creditOkSeq.setReceiveGuards(new MessageSignature[]{creditValid});
+		creditOkSeq.setParent(choiceOnCredit);
+		creditOkSeq.setChildPosition(0);
+		
+		ReceiveNode creditValidNode=new ReceiveNode();
+		creditValidNode.setReceiveGuards(new MessageSignature[]{creditValid});
+		creditValidNode.setParent(creditOkSeq);
+		creditValidNode.setChildPosition(0);
+		creditValidNode.setIdentityTypes(new ConversationIdentityType[]{trade});
+		
+		SendNode orderNode=new SendNode();
+		orderNode.setSentGuards(new MessageSignature[]{order});
+		orderNode.setParent(creditOkSeq);
+		orderNode.setChildPosition(1);
+		orderNode.setIdentityTypes(new ConversationIdentityType[]{trade});
+		
+		ChoiceNode orderChoiceNode=new ChoiceNode();
+		orderChoiceNode.setReceiveGuards(new MessageSignature[]{orderConfirmed,outOfStock});
+		orderChoiceNode.setParent(creditOkSeq);
+		orderChoiceNode.setChildPosition(2);
+		
+		SequenceNode orderOkSeq=new SequenceNode();
+		orderOkSeq.setReceiveGuards(new MessageSignature[]{orderConfirmed});
+		orderOkSeq.setParent(orderChoiceNode);
+		orderOkSeq.setChildPosition(0);
+		
+		ReceiveNode orderConfirmedNode=new ReceiveNode();
+		orderConfirmedNode.setReceiveGuards(new MessageSignature[]{orderConfirmed});
+		orderConfirmedNode.setParent(orderOkSeq);
+		orderConfirmedNode.setChildPosition(0);
+		orderConfirmedNode.setIdentityTypes(new ConversationIdentityType[]{trade});
+		
+		SendNode buyConfirmedNode2=new SendNode();
+		buyConfirmedNode2.setSentGuards(new MessageSignature[]{buyConfirmed});
+		buyConfirmedNode2.setParent(orderOkSeq);
+		buyConfirmedNode2.setChildPosition(1);
+		buyConfirmedNode2.setIdentityTypes(new ConversationIdentityType[]{trade});
+		
+		orderOkSeq.setChildren(new MonitorNode[]{orderConfirmedNode,buyConfirmedNode2});
+		
+		
+		SequenceNode orderNotOkSeq=new SequenceNode();
+		orderNotOkSeq.setReceiveGuards(new MessageSignature[]{outOfStock});
+		orderNotOkSeq.setParent(orderChoiceNode);
+		orderNotOkSeq.setChildPosition(1);
+
+		ReceiveNode outOfStockNode=new ReceiveNode();
+		outOfStockNode.setReceiveGuards(new MessageSignature[]{outOfStock});
+		outOfStockNode.setParent(orderNotOkSeq);
+		outOfStockNode.setChildPosition(0);
+		outOfStockNode.setIdentityTypes(new ConversationIdentityType[]{trade});
+
+		SendNode buyFailedNode2=new SendNode();
+		buyFailedNode2.setSentGuards(new MessageSignature[]{buyFailed});
+		buyFailedNode2.setParent(orderNotOkSeq);
+		buyFailedNode2.setChildPosition(1);
+		buyFailedNode2.setIdentityTypes(new ConversationIdentityType[]{trade});
+		
+		orderNotOkSeq.setChildren(new MonitorNode[]{outOfStockNode,buyFailedNode2});
+		
+		orderChoiceNode.setChildren(new MonitorNode[]{orderOkSeq,orderNotOkSeq});
+		
+		creditOkSeq.setChildren(new MonitorNode[]{creditValidNode,orderNode,orderChoiceNode});
+		
+		
+		SequenceNode creditNotOkSeq=new SequenceNode();
+		creditNotOkSeq.setReceiveGuards(new MessageSignature[]{creditInvalid});
+		creditNotOkSeq.setParent(choiceOnCredit);
+		creditNotOkSeq.setChildPosition(1);
+		
+		ReceiveNode creditInvalidNode=new ReceiveNode();
+		creditInvalidNode.setReceiveGuards(new MessageSignature[]{creditInvalid});
+		creditInvalidNode.setParent(creditNotOkSeq);
+		creditInvalidNode.setChildPosition(0);
+		creditInvalidNode.setIdentityTypes(new ConversationIdentityType[]{trade});
+		
+		SendNode buyFailedNode=new SendNode();
+		buyFailedNode.setSentGuards(new MessageSignature[]{buyFailed});
+		buyFailedNode.setParent(creditNotOkSeq);
+		buyFailedNode.setChildPosition(1);
+		buyFailedNode.setIdentityTypes(new ConversationIdentityType[]{trade});
+
+		creditNotOkSeq.setChildren(new MonitorNode[]{creditInvalidNode,buyFailedNode});
+		
+
+		choiceOnCredit.setChildren(new MonitorNode[]{creditOkSeq,creditNotOkSeq});
+		
+		ret.setChildren(new MonitorNode[]{buyNode,creditCheckNode,choiceOnCredit});
+		
+		return(ret);
+	}
+
+	private static final MessageSignature buy=new MessageSignature("buy",new String[]{BuyRequest.class.getName()});
+	private static final MessageSignature buyFailed=new MessageSignature("buy",new String[]{BuyFailed.class.getName()});
+	private static final MessageSignature buyConfirmed=new MessageSignature("buy",new String[]{BuyConfirmed.class.getName()});
+	private static final MessageSignature creditCheck=new MessageSignature("creditCheck",new String[]{CreditCheck.class.getName()});
+	private static final MessageSignature creditValid=new MessageSignature("creditCheck",new String[]{CreditValid.class.getName()});
+	private static final MessageSignature creditInvalid=new MessageSignature("creditCheck",new String[]{CreditInvalid.class.getName()});
+	private static final MessageSignature order=new MessageSignature("order",new String[]{OrderRequest.class.getName()});
+	private static final MessageSignature orderConfirmed=new MessageSignature("order",new String[]{OrderConfirmed.class.getName()});
+	private static final MessageSignature outOfStock=new MessageSignature("order",new String[]{OutOfStock.class.getName()});
+
+	private static final ConversationIdentityType trade=new ConversationIdentityType("trade");
+	
+	private final boolean debug=false;
+	private boolean useProxy1=false;
+	private boolean useProxy2=true;
+	
+	public class InboundMonitorProxy implements java.lang.reflect.InvocationHandler {
+
+		public InboundMonitorProxy(Object obj, Monitor monitor,
+						ConversationIdentity[] ids) {
+			m_object = obj;
+			m_monitor = monitor;
+			m_ids = ids;
+		}
+		
+		public Object invoke(Object proxy, Method method, Object[] args)
+				throws Throwable {
+			MessageSignature sig=new MessageSignature(method.getName(),
+					getTypes(method.getParameterTypes()));
+			Message m=new Message(sig,m_ids);
+			
+			if (m_monitor.received(m)) {
+				if (debug) System.out.println("RECEIVED: "+m);
+			} else {
+				if (debug) System.out.println("RECEIVED OOS: "+m);
+			}
+			
+			// TODO: Deal with exceptions
+			Object ret=method.invoke(m_object, args);
+			
+			if (method.getReturnType() != void.class) {
+				sig = new MessageSignature(method.getName(),
+						getTypes(new Class[]{method.getReturnType()}));
+				m = new Message(sig,m_ids);
+				
+				if (m_monitor.sent(m)) {
+					if (debug) System.out.println("SENT RESP: "+m);
+				} else {
+					if (debug) System.out.println("SENT RESP OOS: "+m);
+				}	
+			}
+			
+			return(ret);
+		}
+		
+		public String[] getTypes(Class<?>[] classes) {
+			String[] ret=new String[classes.length];
+			
+			for (int i=0; i < classes.length; i++) {
+				ret[i] = classes[i].getName();
+				/*
+				int pos=0;
+				if ((pos=ret[i].lastIndexOf('.')) != -1) {
+					ret[i] = ret[i].substring(pos+1);
+				}
+				if ((pos=ret[i].lastIndexOf('$')) != -1) {
+					ret[i] = ret[i].substring(pos+1);
+				}
+				*/
+			}
+			
+			return(ret);
+		}
+		
+		private Object m_object=null;
+		private Monitor m_monitor=null;
+		private ConversationIdentity[] m_ids=null;
+	}
+	
+	public class OutboundMonitorProxy implements java.lang.reflect.InvocationHandler {
+
+		public OutboundMonitorProxy(Object obj, Monitor monitor,
+						ConversationIdentity[] ids) {
+			m_object = obj;
+			m_monitor = monitor;
+			m_ids = ids;
+		}
+		
+		public Object invoke(Object proxy, Method method, Object[] args)
+				throws Throwable {
+			MessageSignature sig=new MessageSignature(method.getName(),
+					getTypes(method.getParameterTypes()));
+			Message m=new Message(sig,m_ids);
+			
+			if (m_monitor.sent(m)) {
+				if (debug) System.out.println("SENT: "+m);
+			} else {
+				if (debug) System.out.println("SENT OOS: "+m);
+			}
+			
+			// TODO: Deal with exceptions
+			Object ret=method.invoke(m_object, args);
+			
+			if (method.getReturnType() != void.class) {
+				sig = new MessageSignature(method.getName(),
+						getTypes(new Class[]{method.getReturnType()}));
+				m = new Message(sig,m_ids);
+				
+				if (m_monitor.received(m)) {
+					if (debug) System.out.println("RECVD RESP: "+m);
+				} else {
+					if (debug) System.out.println("RECVD RESP OOS: "+m);
+				}	
+			}
+			
+			return(ret);
+		}
+		
+		public String[] getTypes(Class<?>[] classes) {
+			String[] ret=new String[classes.length];
+			
+			for (int i=0; i < classes.length; i++) {
+				ret[i] = classes[i].getName();
+			}
+			
+			return(ret);
+		}
+		
+		private Object m_object=null;
+		private Monitor m_monitor=null;
+		private ConversationIdentity[] m_ids=null;
+	}
+	
+	public class BuyConfirmed {
+	}
+	
+	public class BuyRequest {
+	}
+	
+	public class BuyFailed extends Exception {
+		public BuyFailed(String mesg) {
+			super(mesg);
+		}
+	}
+	
+	public class CreditValid {
+	}
+	
+	public class CreditInvalid extends Exception {
+		private static final long serialVersionUID = -5897271378452279394L;
+	}
+	
+	public class CreditCheck {
+	}
+	
+	public class OrderRequest {
+	}
+	
+	public class OrderConfirmed {
+	}
+	
+	public class OutOfStock extends Exception {
+		private static final long serialVersionUID = 3860608891701015246L;
+	}
+	
+	public interface Broker {
+		
+		public BuyConfirmed buy(BuyRequest req) throws BuyFailed;
+		
+		public void setCreditAgency(CreditAgency ca);
+		
+		public void setSupplier(Supplier s);
+	}
+	
+	public class BrokerImpl implements Broker {
+		public BrokerImpl() {
+		}
+		
+		public BuyConfirmed buy(BuyRequest req) throws BuyFailed {
+			BuyConfirmed ret=null;
+
+			try {
+				CreditValid cv=m_creditAgency.creditCheck(new CreditCheck());
+				
+				try {
+					OrderConfirmed oc=m_supplier.order(new OrderRequest());
+					
+					ret = new BuyConfirmed();
+				} catch(OutOfStock oos) {
+					throw new BuyFailed("Out Of Stock");
+				}
+				
+			} catch(CreditInvalid ci) {
+				throw new BuyFailed("Credit Invalid");
+			}
+			
+			return(ret);
+		}
+		
+		public void setCreditAgency(CreditAgency ca) {
+			m_creditAgency = ca;
+		}
+		
+		public void setSupplier(Supplier s) {
+			m_supplier = s;
+		}
+		
+		private CreditAgency m_creditAgency=null;
+		private Supplier m_supplier=null;
+	}
+	
+	public interface CreditAgency {
+		
+		public CreditValid creditCheck(CreditCheck req) throws CreditInvalid;
+
+	}
+	
+	public class CreditAgencyImpl implements CreditAgency {
+		public CreditAgencyImpl() {
+		}
+		
+		public CreditValid creditCheck(CreditCheck req) throws CreditInvalid {
+			if (m_failed) {
+				throw new CreditInvalid();
+			}
+			
+			return(new CreditValid());
+		}
+
+		public void fail() {
+			m_failed = true;
+		}
+		
+		private boolean m_failed=false;
+	}
+	
+	public interface Supplier {
+		
+		public OrderConfirmed order(OrderRequest req) throws OutOfStock;			
+
+	}
+	
+	public class SupplierImpl implements Supplier {
+		public SupplierImpl() {
+		}
+		
+		public OrderConfirmed order(OrderRequest req) throws OutOfStock {			
+			if (m_failed) {
+				throw new OutOfStock();
+			}
+			
+			return(new OrderConfirmed());
+		}
+		
+		public void fail() {
+			m_failed = true;
+		}
+		
+		private boolean m_failed=false;
+	}
+	
+	public class BrokerProxy implements Broker {
+
+		public BrokerProxy(Broker b, Monitor monitor,
+						ConversationIdentity[] ids) {
+			m_broker = b;
+			m_monitor = monitor;
+			m_ids = ids;
+		}
+		
+		public BuyConfirmed buy(BuyRequest req) throws BuyFailed {
+			MessageSignature sig=new MessageSignature("buy",
+						new String[]{BuyRequest.class.getName()});
+			Message m=new Message(sig,m_ids);
+			
+			if (m_monitor.received(m)) {
+				if (debug) System.out.println("PX RECEIVED: "+m);
+			} else {
+				if (debug) System.out.println("PX RECEIVED OOS: "+m);
+			}
+			
+			BuyConfirmed ret=m_broker.buy(req);
+			
+			sig = new MessageSignature("buy",
+					new String[]{BuyConfirmed.class.getName()});
+			m = new Message(sig,m_ids);
+			
+			if (m_monitor.sent(m)) {
+				if (debug) System.out.println("PX SENT RESP: "+m);
+			} else {
+				if (debug) System.out.println("PX SENT RESP OOS: "+m);
+			}	
+
+			return(ret);
+		}
+
+		public void setCreditAgency(CreditAgency ca) {
+			m_broker.setCreditAgency(new CreditAgencyProxy(ca, m_monitor, m_ids));
+		}
+
+		public void setSupplier(Supplier s) {
+			m_broker.setSupplier(new SupplierProxy(s, m_monitor, m_ids));
+		}
+		
+		private Broker m_broker=null;
+		private Monitor m_monitor=null;
+		private ConversationIdentity[] m_ids=null;
+	}
+	
+	public class CreditAgencyProxy implements CreditAgency {
+
+		public CreditAgencyProxy(CreditAgency ca, Monitor monitor,
+				ConversationIdentity[] ids) {
+			m_creditAgency = ca;
+			m_monitor = monitor;
+			m_ids = ids;
+		}
+		
+		public CreditValid creditCheck(CreditCheck req) throws CreditInvalid {
+			CreditValid ret=null;
+			
+			MessageSignature sig=new MessageSignature("creditCheck",
+					new String[]{CreditCheck.class.getName()});
+			Message m=new Message(sig,m_ids);
+			
+			if (m_monitor.sent(m)) {
+				if (debug) System.out.println("PX SENT: "+m);
+			} else {
+				if (debug) System.out.println("PX SENT OOS: "+m);
+			}
+		
+			ret = m_creditAgency.creditCheck(req);
+			
+			sig = new MessageSignature("creditCheck",
+					new String[]{CreditValid.class.getName()});
+			m = new Message(sig,m_ids);
+			
+			if (m_monitor.received(m)) {
+				if (debug) System.out.println("PX RECVD RESP: "+m);
+			} else {
+				if (debug) System.out.println("PX RECVD RESP OOS: "+m);
+			}	
+
+			return(ret);
+		}
+		
+		private CreditAgency m_creditAgency=null;
+		private Monitor m_monitor=null;
+		private ConversationIdentity[] m_ids=null;
+	}
+	
+	public class SupplierProxy implements Supplier {
+
+		public SupplierProxy(Supplier s, Monitor monitor,
+				ConversationIdentity[] ids) {
+			m_supplier = s;
+			m_monitor = monitor;
+			m_ids = ids;
+		}
+		
+		public OrderConfirmed order(OrderRequest req) throws OutOfStock {
+			OrderConfirmed ret=null;
+			
+			MessageSignature sig=new MessageSignature("order",
+					new String[]{OrderRequest.class.getName()});
+			Message m=new Message(sig,m_ids);
+			
+			if (m_monitor.sent(m)) {
+				if (debug) System.out.println("PX SENT: "+m);
+			} else {
+				if (debug) System.out.println("PX SENT OOS: "+m);
+			}
+		
+			ret = m_supplier.order(req);
+			
+			sig = new MessageSignature("order",
+					new String[]{OrderConfirmed.class.getName()});
+			m = new Message(sig,m_ids);
+			
+			if (m_monitor.received(m)) {
+				if (debug) System.out.println("PX RECVD RESP: "+m);
+			} else {
+				if (debug) System.out.println("PX RECVD RESP OOS: "+m);
+			}	
+
+			return(ret);
+		}
+		
+		private Supplier m_supplier=null;
+		private Monitor m_monitor=null;
+		private ConversationIdentity[] m_ids=null;		
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.monitor/src/perftest/performance/monitor/MonitorTestCase.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.monitor/src/perftest/performance/monitor/MonitorTestCase.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.monitor/src/perftest/performance/monitor/MonitorTestCase.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,34 @@
+/*
+ * Copyright 2005-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 5 Oct 2008 : Initial version created by gary
+ */
+package performance.monitor;
+
+import org.scribble.monitor.ConversationTypeName;
+import org.scribble.monitor.ConversationTypeRepository;
+import org.scribble.monitor.MonitorException;
+
+public interface MonitorTestCase {
+
+	public ConversationTypeRepository getConversationTypeRepository() throws MonitorException;
+	
+	public ConversationTypeName[] getObservationNames();
+	
+	public TestData[] getTestData();
+	
+}

Added: tools/eclipse/trunk/plugins/org.scribble.monitor/src/perftest/performance/monitor/MonitorTestCase1.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.monitor/src/perftest/performance/monitor/MonitorTestCase1.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.monitor/src/perftest/performance/monitor/MonitorTestCase1.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,208 @@
+/*
+ * Copyright 2005-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 5 Oct 2008 : Initial version created by gary
+ */
+package performance.monitor;
+
+import org.scribble.monitor.*;
+import org.scribble.monitor.impl.*;
+import org.scribble.monitor.model.ChoiceNode;
+import org.scribble.monitor.model.ConversationType;
+import org.scribble.monitor.model.MonitorNode;
+import org.scribble.monitor.model.ReceiveNode;
+import org.scribble.monitor.model.SendNode;
+import org.scribble.monitor.model.SequenceNode;
+
+public class MonitorTestCase1 implements MonitorTestCase {
+
+	public ConversationTypeRepository getConversationTypeRepository() throws MonitorException {
+		DefaultConversationTypeRepository ret=new DefaultConversationTypeRepository();
+		
+		ret.addConversationType(getDescription());
+		
+		return(ret);
+	}
+	
+	public ConversationTypeName[] getObservationNames() {
+		ConversationTypeName[] ret=new ConversationTypeName[1];
+		
+		ConversationTypeName mainname=new ConversationTypeName();
+		mainname.setName("MainName");
+		ret[0] = mainname;
+		
+		return(ret);
+	}
+	
+	public ConversationType getDescription() {
+		ConversationType ret=new ConversationType();
+		
+		ConversationTypeName mainname=new ConversationTypeName();
+		mainname.setName("MainName");
+		ret.setName(mainname);
+
+		ret.setReceiveGuards(new MessageSignature[]{buy});
+		
+		ReceiveNode buyNode=new ReceiveNode();
+		buyNode.setReceiveGuards(new MessageSignature[]{buy});
+		buyNode.setParent(ret);
+		buyNode.setChildPosition(0);
+		buyNode.setIdentityTypes(new ConversationIdentityType[]{trade});
+		
+		SendNode creditCheckNode=new SendNode();
+		creditCheckNode.setSentGuards(new MessageSignature[]{creditCheck});
+		creditCheckNode.setParent(ret);
+		creditCheckNode.setChildPosition(1);
+		creditCheckNode.setIdentityTypes(new ConversationIdentityType[]{trade});
+		
+		ChoiceNode choiceOnCredit=new ChoiceNode();
+		choiceOnCredit.setReceiveGuards(new MessageSignature[]{creditValid,creditInvalid});
+		choiceOnCredit.setParent(ret);
+		choiceOnCredit.setChildPosition(2);
+		
+		SequenceNode creditOkSeq=new SequenceNode();
+		creditOkSeq.setReceiveGuards(new MessageSignature[]{creditValid});
+		creditOkSeq.setParent(choiceOnCredit);
+		creditOkSeq.setChildPosition(0);
+		
+		ReceiveNode creditValidNode=new ReceiveNode();
+		creditValidNode.setReceiveGuards(new MessageSignature[]{creditValid});
+		creditValidNode.setParent(creditOkSeq);
+		creditValidNode.setChildPosition(0);
+		creditValidNode.setIdentityTypes(new ConversationIdentityType[]{trade});
+		
+		SendNode orderNode=new SendNode();
+		orderNode.setSentGuards(new MessageSignature[]{order});
+		orderNode.setParent(creditOkSeq);
+		orderNode.setChildPosition(1);
+		orderNode.setIdentityTypes(new ConversationIdentityType[]{trade});
+		
+		ChoiceNode orderChoiceNode=new ChoiceNode();
+		orderChoiceNode.setReceiveGuards(new MessageSignature[]{orderConfirmed,outOfStock});
+		orderChoiceNode.setParent(creditOkSeq);
+		orderChoiceNode.setChildPosition(2);
+		
+		SequenceNode orderOkSeq=new SequenceNode();
+		orderOkSeq.setReceiveGuards(new MessageSignature[]{orderConfirmed});
+		orderOkSeq.setParent(orderChoiceNode);
+		orderOkSeq.setChildPosition(0);
+		
+		ReceiveNode orderConfirmedNode=new ReceiveNode();
+		orderConfirmedNode.setReceiveGuards(new MessageSignature[]{orderConfirmed});
+		orderConfirmedNode.setParent(orderOkSeq);
+		orderConfirmedNode.setChildPosition(0);
+		orderConfirmedNode.setIdentityTypes(new ConversationIdentityType[]{trade});
+		
+		SendNode buyConfirmedNode2=new SendNode();
+		buyConfirmedNode2.setSentGuards(new MessageSignature[]{buyConfirmed});
+		buyConfirmedNode2.setParent(orderOkSeq);
+		buyConfirmedNode2.setChildPosition(1);
+		buyConfirmedNode2.setIdentityTypes(new ConversationIdentityType[]{trade});
+		
+		orderOkSeq.setChildren(new MonitorNode[]{orderConfirmedNode,buyConfirmedNode2});
+		
+		
+		SequenceNode orderNotOkSeq=new SequenceNode();
+		orderNotOkSeq.setReceiveGuards(new MessageSignature[]{outOfStock});
+		orderNotOkSeq.setParent(orderChoiceNode);
+		orderNotOkSeq.setChildPosition(1);
+
+		ReceiveNode outOfStockNode=new ReceiveNode();
+		outOfStockNode.setReceiveGuards(new MessageSignature[]{outOfStock});
+		outOfStockNode.setParent(orderNotOkSeq);
+		outOfStockNode.setChildPosition(0);
+		outOfStockNode.setIdentityTypes(new ConversationIdentityType[]{trade});
+
+		SendNode buyFailedNode2=new SendNode();
+		buyFailedNode2.setSentGuards(new MessageSignature[]{buyFailed});
+		buyFailedNode2.setParent(orderNotOkSeq);
+		buyFailedNode2.setChildPosition(1);
+		buyFailedNode2.setIdentityTypes(new ConversationIdentityType[]{trade});
+		
+		orderNotOkSeq.setChildren(new MonitorNode[]{outOfStockNode,buyFailedNode2});
+		
+		orderChoiceNode.setChildren(new MonitorNode[]{orderOkSeq,orderNotOkSeq});
+		
+		creditOkSeq.setChildren(new MonitorNode[]{creditValidNode,orderNode,orderChoiceNode});
+		
+		
+		SequenceNode creditNotOkSeq=new SequenceNode();
+		creditNotOkSeq.setReceiveGuards(new MessageSignature[]{creditInvalid});
+		creditNotOkSeq.setParent(choiceOnCredit);
+		creditNotOkSeq.setChildPosition(1);
+		
+		ReceiveNode creditInvalidNode=new ReceiveNode();
+		creditInvalidNode.setReceiveGuards(new MessageSignature[]{creditInvalid});
+		creditInvalidNode.setParent(creditNotOkSeq);
+		creditInvalidNode.setChildPosition(0);
+		creditInvalidNode.setIdentityTypes(new ConversationIdentityType[]{trade});
+		
+		SendNode buyFailedNode=new SendNode();
+		buyFailedNode.setSentGuards(new MessageSignature[]{buyFailed});
+		buyFailedNode.setParent(creditNotOkSeq);
+		buyFailedNode.setChildPosition(1);
+		buyFailedNode.setIdentityTypes(new ConversationIdentityType[]{trade});
+
+		creditNotOkSeq.setChildren(new MonitorNode[]{creditInvalidNode,buyFailedNode});
+		
+
+		choiceOnCredit.setChildren(new MonitorNode[]{creditOkSeq,creditNotOkSeq});
+		
+		ret.setChildren(new MonitorNode[]{buyNode,creditCheckNode,choiceOnCredit});
+		
+		return(ret);
+	}
+		
+	public TestData[] getTestData() {
+		return(m_testData);
+	}
+	
+	private static final MessageSignature buy=new MessageSignature("buy", null);
+	private static final MessageSignature buyFailed=new MessageSignature("buyFailed", null);
+	private static final MessageSignature buyConfirmed=new MessageSignature("buyConfirmed", null);
+	private static final MessageSignature creditCheck=new MessageSignature("creditCheck", null);
+	private static final MessageSignature creditValid=new MessageSignature("creditValid", null);
+	private static final MessageSignature creditInvalid=new MessageSignature("creditInvalid", null);
+	private static final MessageSignature order=new MessageSignature("order", null);
+	private static final MessageSignature orderConfirmed=new MessageSignature("orderConfirmed", null);
+	private static final MessageSignature outOfStock=new MessageSignature("outOfStock", null);
+	
+	private static final ConversationIdentityType trade=new ConversationIdentityType("trade");
+	
+	private static final ConversationIdentity[] id1=new ConversationIdentity[]{new ConversationIdentity("1",trade)};
+	private static final ConversationIdentity[] id2=new ConversationIdentity[]{new ConversationIdentity("2",trade)};
+	private static final ConversationIdentity[] id3=new ConversationIdentity[]{new ConversationIdentity("3",trade)};
+	
+	private TestData[] m_testData={
+			new TestData(new Message(buy, id1),false),
+			new TestData(new Message(creditCheck, id1),true),
+			new TestData(new Message(creditValid, id1),false),
+			new TestData(new Message(order, id1),true),
+			new TestData(new Message(orderConfirmed, id1),false),
+			new TestData(new Message(buyConfirmed, id1),true),
+			new TestData(new Message(buy, id2),false),
+			new TestData(new Message(creditCheck, id2),true),
+			new TestData(new Message(creditInvalid, id2),false),
+			new TestData(new Message(buyFailed, id2),true),
+			new TestData(new Message(buy, id3),false),
+			new TestData(new Message(creditCheck, id3),true),
+			new TestData(new Message(creditValid, id3),false),
+			new TestData(new Message(order, id3),true),
+			new TestData(new Message(outOfStock, id3),false),
+			new TestData(new Message(buyFailed, id3),true)
+	};
+}

Added: tools/eclipse/trunk/plugins/org.scribble.monitor/src/perftest/performance/monitor/MonitorTestCase2.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.monitor/src/perftest/performance/monitor/MonitorTestCase2.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.monitor/src/perftest/performance/monitor/MonitorTestCase2.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,160 @@
+/*
+ * Copyright 2005-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 5 Oct 2008 : Initial version created by gary
+ */
+package performance.monitor;
+
+import org.scribble.monitor.*;
+import org.scribble.monitor.impl.DefaultConversationTypeRepository;
+import org.scribble.monitor.model.ConversationType;
+import org.scribble.monitor.model.MonitorNode;
+import org.scribble.monitor.model.ParallelNode;
+import org.scribble.monitor.model.ReceiveNode;
+import org.scribble.monitor.model.SendNode;
+import org.scribble.monitor.model.SequenceNode;
+
+public class MonitorTestCase2 implements MonitorTestCase {
+
+	public ConversationTypeRepository getConversationTypeRepository() throws MonitorException {
+		DefaultConversationTypeRepository ret=new DefaultConversationTypeRepository();
+		
+		ret.addConversationType(getDescription());
+		
+		return(ret);
+	}
+	
+	public ConversationTypeName[] getObservationNames() {
+		ConversationTypeName[] ret=new ConversationTypeName[1];
+		
+		ConversationTypeName mainname=new ConversationTypeName();
+		mainname.setName("MainName");
+		ret[0] = mainname;
+		
+		return(ret);
+	}
+	
+	public ConversationType getDescription() {
+		ConversationType ret=new ConversationType();
+
+		ConversationTypeName mainname=new ConversationTypeName();
+		mainname.setName("MainName");
+		ret.setName(mainname);
+
+		ret.setReceiveGuards(new MessageSignature[]{buy});
+		
+		ReceiveNode buyNode=new ReceiveNode();
+		buyNode.setReceiveGuards(new MessageSignature[]{buy});
+		buyNode.setParent(ret);
+		buyNode.setChildPosition(0);
+		buyNode.setIdentityTypes(
+				new ConversationIdentityType[]{trade});
+		
+		ParallelNode parNode=new ParallelNode();
+		parNode.setParent(ret);
+		parNode.setChildPosition(1);
+		
+		SequenceNode seq1Node=new SequenceNode();
+		seq1Node.setSentGuards(new MessageSignature[]{creditCheck});
+		seq1Node.setParent(parNode);
+		seq1Node.setChildPosition(0);
+		
+		SendNode creditCheckNode=new SendNode();
+		creditCheckNode.setSentGuards(new MessageSignature[]{creditCheck});
+		creditCheckNode.setParent(seq1Node);
+		creditCheckNode.setChildPosition(0);
+		creditCheckNode.setIdentityTypes(
+				new ConversationIdentityType[]{trade});
+		
+		ReceiveNode creditValidNode=new ReceiveNode();
+		creditValidNode.setReceiveGuards(new MessageSignature[]{creditValid});
+		creditValidNode.setParent(seq1Node);
+		creditValidNode.setChildPosition(1);
+		creditValidNode.setIdentityTypes(
+				new ConversationIdentityType[]{trade});
+		
+		seq1Node.setChildren(new MonitorNode[]{creditCheckNode,creditValidNode});
+
+		
+		SequenceNode seq2Node=new SequenceNode();
+		seq2Node.setSentGuards(new MessageSignature[]{order});
+		seq2Node.setParent(parNode);
+		seq2Node.setChildPosition(1);
+
+		SendNode orderNode=new SendNode();
+		orderNode.setSentGuards(new MessageSignature[]{order});
+		orderNode.setParent(seq2Node);
+		orderNode.setChildPosition(0);
+		orderNode.setIdentityTypes(
+				new ConversationIdentityType[]{trade});
+		
+		ReceiveNode orderConfirmedNode=new ReceiveNode();
+		orderConfirmedNode.setReceiveGuards(new MessageSignature[]{orderConfirmed});
+		orderConfirmedNode.setParent(seq2Node);
+		orderConfirmedNode.setChildPosition(1);
+		orderConfirmedNode.setIdentityTypes(
+				new ConversationIdentityType[]{trade});
+		
+		seq2Node.setChildren(new MonitorNode[]{orderNode,orderConfirmedNode});
+
+		
+		SendNode buyConfirmedNode=new SendNode();
+		buyConfirmedNode.setSentGuards(new MessageSignature[]{buyConfirmed});
+		buyConfirmedNode.setParent(ret);
+		buyConfirmedNode.setChildPosition(2);
+		buyConfirmedNode.setIdentityTypes(
+				new ConversationIdentityType[]{trade});
+		
+		parNode.setChildren(new MonitorNode[]{seq1Node,seq2Node});
+		
+		ret.setChildren(new MonitorNode[]{buyNode,parNode,buyConfirmedNode});
+		
+		
+		return(ret);
+	}
+		
+	public TestData[] getTestData() {
+		return(m_testData);
+	}
+	
+	private static final MessageSignature buy=new MessageSignature("buy", null);
+	private static final MessageSignature buyConfirmed=new MessageSignature("buyConfirmed", null);
+	private static final MessageSignature creditCheck=new MessageSignature("creditCheck", null);
+	private static final MessageSignature creditValid=new MessageSignature("creditValid", null);
+	private static final MessageSignature order=new MessageSignature("order", null);
+	private static final MessageSignature orderConfirmed=new MessageSignature("orderConfirmed", null);
+	
+	private static final ConversationIdentityType trade=new ConversationIdentityType("trade");
+	
+	private static final ConversationIdentity[] id1=new ConversationIdentity[]{new ConversationIdentity("1",trade)};
+	private static final ConversationIdentity[] id2=new ConversationIdentity[]{new ConversationIdentity("2",trade)};
+	
+	private TestData[] m_testData={
+			new TestData(new Message(buy, id1),false),
+			new TestData(new Message(creditCheck, id1),true),
+			new TestData(new Message(creditValid, id1),false),
+			new TestData(new Message(order, id1),true),
+			new TestData(new Message(orderConfirmed, id1),false),
+			new TestData(new Message(buyConfirmed, id1),true),
+			new TestData(new Message(buy, id2),false),
+			new TestData(new Message(creditCheck, id2),true),
+			new TestData(new Message(order, id2),true),
+			new TestData(new Message(orderConfirmed, id2),false),
+			new TestData(new Message(creditValid, id2),false),
+			new TestData(new Message(buyConfirmed, id2),true)
+	};
+}

Added: tools/eclipse/trunk/plugins/org.scribble.monitor/src/perftest/performance/monitor/MonitorTestCase3.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.monitor/src/perftest/performance/monitor/MonitorTestCase3.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.monitor/src/perftest/performance/monitor/MonitorTestCase3.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,140 @@
+/*
+ * Copyright 2005-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 6 Oct 2008 : Initial version created by gary
+ */
+package performance.monitor;
+
+import org.scribble.monitor.*;
+import org.scribble.monitor.impl.DefaultConversationTypeRepository;
+import org.scribble.monitor.model.ConversationType;
+import org.scribble.monitor.model.MonitorNode;
+import org.scribble.monitor.model.ReceiveNode;
+import org.scribble.monitor.model.RunNode;
+import org.scribble.monitor.model.SendNode;
+
+public class MonitorTestCase3 implements MonitorTestCase {
+
+	public ConversationTypeRepository getConversationTypeRepository() throws MonitorException {
+		DefaultConversationTypeRepository ret=new DefaultConversationTypeRepository();
+		
+		ConversationType[] cts=getDescription();
+		
+		ret.addConversationType(cts[0]);
+		ret.addConversationType(cts[1]);
+		
+		return(ret);
+	}
+	
+	public ConversationTypeName[] getObservationNames() {
+		ConversationTypeName[] ret=new ConversationTypeName[1];
+		
+		ConversationTypeName mainname=new ConversationTypeName();
+		mainname.setName("MainName");
+		ret[0] = mainname;
+		
+		return(ret);
+	}
+	
+	public ConversationType[] getDescription() {
+		ConversationType[] ret=new ConversationType[2];
+		
+		ret[0]=new ConversationType();
+		
+		ConversationTypeName mainname=new ConversationTypeName();
+		mainname.setName("MainName");
+		ret[0].setName(mainname);
+
+		ret[0].setReceiveGuards(new MessageSignature[]{buy});
+		
+		ReceiveNode buyNode=new ReceiveNode();
+		buyNode.setReceiveGuards(new MessageSignature[]{buy});
+		buyNode.setParent(ret[0]);
+		buyNode.setChildPosition(0);
+		buyNode.setIdentityTypes(
+				new ConversationIdentityType[]{trade});
+		
+		
+		ConversationType subDesc=new ConversationType();
+		ret[1] = subDesc;
+		
+		ConversationTypeName sdname=new ConversationTypeName();
+		sdname.setName("SubDescName");
+		
+		subDesc.setName(sdname);
+		subDesc.setSentGuards(new MessageSignature[]{creditCheck});
+		
+		RunNode runNode=new RunNode();
+		runNode.setParent(ret[0]);
+		runNode.setChildPosition(1);
+		runNode.setConversationTypeName(sdname);
+		runNode.setSentGuards(new MessageSignature[]{creditCheck});
+		
+		SendNode creditCheckNode=new SendNode();
+		creditCheckNode.setSentGuards(new MessageSignature[]{creditCheck});
+		creditCheckNode.setParent(subDesc);
+		creditCheckNode.setChildPosition(0);
+		creditCheckNode.setIdentityTypes(
+				new ConversationIdentityType[]{trade});
+		
+		ReceiveNode creditValidNode=new ReceiveNode();
+		creditValidNode.setReceiveGuards(new MessageSignature[]{creditValid});
+		creditValidNode.setParent(subDesc);
+		creditValidNode.setChildPosition(1);
+		creditValidNode.setIdentityTypes(
+				new ConversationIdentityType[]{trade});
+		
+		subDesc.setChildren(new MonitorNode[]{creditCheckNode,creditValidNode});
+
+		
+		SendNode buyConfirmedNode=new SendNode();
+		buyConfirmedNode.setSentGuards(new MessageSignature[]{buyConfirmed});
+		buyConfirmedNode.setParent(ret[0]);
+		buyConfirmedNode.setChildPosition(2);
+		buyConfirmedNode.setIdentityTypes(
+				new ConversationIdentityType[]{trade});
+		
+		ret[0].setChildren(new MonitorNode[]{buyNode,runNode,buyConfirmedNode});
+		
+		return(ret);
+	}
+		
+	public TestData[] getTestData() {
+		return(m_testData);
+	}
+	
+	private static final MessageSignature buy=new MessageSignature("buy", null);
+	private static final MessageSignature buyConfirmed=new MessageSignature("buyConfirmed", null);
+	private static final MessageSignature creditCheck=new MessageSignature("creditCheck", null);
+	private static final MessageSignature creditValid=new MessageSignature("creditValid", null);
+	
+	private static final ConversationIdentityType trade=new ConversationIdentityType("trade");
+	
+	private static final ConversationIdentity[] id1=new ConversationIdentity[]{new ConversationIdentity("1",trade)};
+	private static final ConversationIdentity[] id2=new ConversationIdentity[]{new ConversationIdentity("2",trade)};
+	
+	private TestData[] m_testData={
+			new TestData(new Message(buy, id1),false),
+			new TestData(new Message(creditCheck, id1),true),
+			new TestData(new Message(creditValid, id1),false),
+			new TestData(new Message(buyConfirmed, id1),true),
+			new TestData(new Message(buy, id2),false),
+			new TestData(new Message(creditCheck, id2),true),
+			new TestData(new Message(creditValid, id2),false),
+			new TestData(new Message(buyConfirmed, id2),true)
+	};
+}

Added: tools/eclipse/trunk/plugins/org.scribble.monitor/src/perftest/performance/monitor/MonitorTestCase4.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.monitor/src/perftest/performance/monitor/MonitorTestCase4.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.monitor/src/perftest/performance/monitor/MonitorTestCase4.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,148 @@
+/*
+ * Copyright 2005-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 6 Oct 2008 : Initial version created by gary
+ */
+package performance.monitor;
+
+import org.scribble.monitor.*;
+import org.scribble.monitor.impl.DefaultConversationTypeRepository;
+import org.scribble.monitor.model.ConversationType;
+import org.scribble.monitor.model.MonitorNode;
+import org.scribble.monitor.model.ReceiveNode;
+import org.scribble.monitor.model.RunNode;
+import org.scribble.monitor.model.SendNode;
+
+public class MonitorTestCase4 implements MonitorTestCase {
+
+	public ConversationTypeRepository getConversationTypeRepository() throws MonitorException {
+		DefaultConversationTypeRepository ret=new DefaultConversationTypeRepository();
+		
+		ConversationType[] cts=getDescription();
+		
+		ret.addConversationType(cts[0]);
+		ret.addConversationType(cts[1]);
+		
+		return(ret);
+	}
+	
+	public ConversationTypeName[] getObservationNames() {
+		ConversationTypeName[] ret=new ConversationTypeName[1];
+		
+		ConversationTypeName mainname=new ConversationTypeName();
+		mainname.setName("MainName");
+		ret[0] = mainname;
+		
+		return(ret);
+	}
+	
+	public ConversationType[] getDescription() {
+		ConversationType[] ret=new ConversationType[2];
+		
+		ret[0]=new ConversationType();
+		
+		ConversationTypeName mainname=new ConversationTypeName();
+		mainname.setName("MainName");
+		ret[0].setName(mainname);
+
+		ret[0].setReceiveGuards(new MessageSignature[]{buy});
+		
+		ReceiveNode buyNode=new ReceiveNode();
+		buyNode.setReceiveGuards(new MessageSignature[]{buy});
+		buyNode.setParent(ret[0]);
+		buyNode.setChildPosition(0);
+		buyNode.setIdentityTypes(
+				new ConversationIdentityType[]{trade});
+		
+		
+		ConversationType subDesc=new ConversationType();
+		ret[1] = subDesc;
+		
+		ConversationTypeName sdname=new ConversationTypeName();
+		sdname.setName("SubDescName");
+		
+		subDesc.setName(sdname);
+		subDesc.setSentGuards(new MessageSignature[]{creditCheck});
+		
+		RunNode runNode=new RunNode();
+		runNode.setParent(ret[0]);
+		runNode.setChildPosition(1);
+		runNode.setConversationTypeName(sdname);
+		runNode.setSentGuards(new MessageSignature[]{creditCheck});
+		
+		SendNode creditCheckNode=new SendNode();
+		creditCheckNode.setSentGuards(new MessageSignature[]{creditCheck});
+		creditCheckNode.setParent(subDesc);
+		creditCheckNode.setChildPosition(0);
+		creditCheckNode.setIdentityTypes(
+				new ConversationIdentityType[]{tradeSupplier});
+		
+		ReceiveNode creditValidNode=new ReceiveNode();
+		creditValidNode.setReceiveGuards(new MessageSignature[]{creditValid});
+		creditValidNode.setParent(subDesc);
+		creditValidNode.setChildPosition(1);
+		creditValidNode.setIdentityTypes(
+				new ConversationIdentityType[]{tradeSupplier});
+		
+		subDesc.setChildren(new MonitorNode[]{creditCheckNode,creditValidNode});
+
+		
+		SendNode buyConfirmedNode=new SendNode();
+		buyConfirmedNode.setSentGuards(new MessageSignature[]{buyConfirmed});
+		buyConfirmedNode.setParent(ret[0]);
+		buyConfirmedNode.setChildPosition(2);
+		buyConfirmedNode.setIdentityTypes(
+				new ConversationIdentityType[]{trade});
+		
+		ret[0].setChildren(new MonitorNode[]{buyNode,runNode,buyConfirmedNode});
+		
+		return(ret);
+	}
+		
+	public TestData[] getTestData() {
+		return(m_testData);
+	}
+	
+	private static final MessageSignature buy=new MessageSignature("buy", null);
+	private static final MessageSignature buyConfirmed=new MessageSignature("buyConfirmed", null);
+	private static final MessageSignature creditCheck=new MessageSignature("creditCheck", null);
+	private static final MessageSignature creditValid=new MessageSignature("creditValid", null);
+	
+	private static final ConversationIdentityType trade=
+					new ConversationIdentityType("Trade");
+	private static final ConversationIdentityType tradeSupplier=
+					new ConversationIdentityType("TradeSupplier");
+
+	private static final ConversationIdentity[] id1=new ConversationIdentity[]{new ConversationIdentity("1",trade)};
+	//private static final ConversationIdentity[] id1sub=new ConversationIdentity[]{id1[0],
+	private static final ConversationIdentity[] id1sub=new ConversationIdentity[]{new ConversationIdentity("1",trade),
+						new ConversationIdentity("1-1",tradeSupplier)};
+	private static final ConversationIdentity[] id2=new ConversationIdentity[]{new ConversationIdentity("2",trade)};
+	private static final ConversationIdentity[] id2sub=new ConversationIdentity[]{id2[0],
+						new ConversationIdentity("2-1",tradeSupplier)};
+	
+	private TestData[] m_testData={
+			new TestData(new Message(buy, id1),false),
+			new TestData(new Message(creditCheck, id1sub),true),
+			new TestData(new Message(creditValid, id1sub),false),
+			new TestData(new Message(buyConfirmed, id1),true),
+			new TestData(new Message(buy, id2),false),
+			new TestData(new Message(creditCheck, id2sub),true),
+			new TestData(new Message(creditValid, id2sub),false),
+			new TestData(new Message(buyConfirmed, id2),true)
+	};
+}

Added: tools/eclipse/trunk/plugins/org.scribble.monitor/src/perftest/performance/monitor/MonitorTestCase5.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.monitor/src/perftest/performance/monitor/MonitorTestCase5.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.monitor/src/perftest/performance/monitor/MonitorTestCase5.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,139 @@
+/*
+ * Copyright 2005-9 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 21 Feb 2009 : Initial version created by gary
+ */
+package performance.monitor;
+
+import org.scribble.monitor.*;
+import org.scribble.monitor.impl.DefaultConversationTypeRepository;
+import org.scribble.monitor.model.ChoiceNode;
+import org.scribble.monitor.model.ConversationType;
+import org.scribble.monitor.model.MonitorNode;
+import org.scribble.monitor.model.ReceiveNode;
+import org.scribble.monitor.model.SendNode;
+import org.scribble.monitor.model.SequenceNode;
+
+/**
+ *  MonitorTestCase6:
+ *  
+ *  CreditAgency - non-observable decision regarding whether
+ *  the credit is ok or not.
+ *  						
+ */
+public class MonitorTestCase5 implements MonitorTestCase {
+
+	public ConversationTypeRepository getConversationTypeRepository() throws MonitorException {
+		DefaultConversationTypeRepository ret=new DefaultConversationTypeRepository();
+		
+		ret.addConversationType(getDescription());
+		
+		return(ret);
+	}
+	
+	public ConversationTypeName[] getObservationNames() {
+		ConversationTypeName[] ret=new ConversationTypeName[1];
+		
+		ConversationTypeName mainname=new ConversationTypeName();
+		mainname.setName("MainName");
+		ret[0] = mainname;
+		
+		return(ret);
+	}
+	
+	public ConversationType getDescription() {
+		ConversationType ret=new ConversationType();
+
+		ConversationTypeName mainname=new ConversationTypeName();
+		mainname.setName("MainName");
+		ret.setName(mainname);
+
+		ret.setReceiveGuards(new MessageSignature[]{creditCheck});
+		
+		ReceiveNode creditCheckNode=new ReceiveNode();
+		creditCheckNode.setReceiveGuards(new MessageSignature[]{creditCheck});
+		creditCheckNode.setParent(ret);
+		creditCheckNode.setChildPosition(0);
+		creditCheckNode.setIdentityTypes(new ConversationIdentityType[]{trade});
+		
+		ChoiceNode choiceOnCredit=new ChoiceNode();
+		choiceOnCredit.setSentGuards(new MessageSignature[]{creditValid,creditInvalid});
+		choiceOnCredit.setParent(ret);
+		choiceOnCredit.setChildPosition(1);
+		
+		SequenceNode creditOkSeq=new SequenceNode();
+		creditOkSeq.setSentGuards(new MessageSignature[]{creditValid});
+		creditOkSeq.setParent(choiceOnCredit);
+		creditOkSeq.setChildPosition(0);
+		
+		SendNode creditValidNode=new SendNode();
+		creditValidNode.setSentGuards(new MessageSignature[]{creditValid});
+		creditValidNode.setParent(creditOkSeq);
+		creditValidNode.setChildPosition(0);
+		creditValidNode.setIdentityTypes(new ConversationIdentityType[]{trade});
+						
+		creditOkSeq.setChildren(new MonitorNode[]{creditValidNode});
+		
+		
+		SequenceNode creditNotOkSeq=new SequenceNode();
+		creditNotOkSeq.setSentGuards(new MessageSignature[]{creditInvalid});
+		creditNotOkSeq.setParent(choiceOnCredit);
+		creditNotOkSeq.setChildPosition(1);
+		
+		SendNode creditInvalidNode=new SendNode();
+		creditInvalidNode.setSentGuards(new MessageSignature[]{creditInvalid});
+		creditInvalidNode.setParent(creditNotOkSeq);
+		creditInvalidNode.setChildPosition(0);
+		creditInvalidNode.setIdentityTypes(new ConversationIdentityType[]{trade});
+		
+		creditNotOkSeq.setChildren(new MonitorNode[]{creditInvalidNode});
+		
+
+		choiceOnCredit.setChildren(new MonitorNode[]{creditOkSeq,creditNotOkSeq});
+		
+		ret.setChildren(new MonitorNode[]{creditCheckNode,choiceOnCredit});
+		
+		return(ret);
+	}
+		
+	public TestData[] getTestData() {
+		return(m_testData);
+	}
+	
+	private static final MessageSignature buy=new MessageSignature("buy", null);
+	private static final MessageSignature buyFailed=new MessageSignature("buyFailed", null);
+	private static final MessageSignature buyConfirmed=new MessageSignature("buyConfirmed", null);
+	private static final MessageSignature creditCheck=new MessageSignature("creditCheck", null);
+	private static final MessageSignature creditValid=new MessageSignature("creditValid", null);
+	private static final MessageSignature creditInvalid=new MessageSignature("creditInvalid", null);
+	private static final MessageSignature order=new MessageSignature("order", null);
+	private static final MessageSignature orderConfirmed=new MessageSignature("orderConfirmed", null);
+	private static final MessageSignature outOfStock=new MessageSignature("outOfStock", null);
+	
+	private static final ConversationIdentityType trade=new ConversationIdentityType("trade");
+	
+	private static final ConversationIdentity[] id1=new ConversationIdentity[]{new ConversationIdentity("1",trade)};
+	private static final ConversationIdentity[] id2=new ConversationIdentity[]{new ConversationIdentity("2",trade)};
+	private static final ConversationIdentity[] id3=new ConversationIdentity[]{new ConversationIdentity("3",trade)};
+	
+	private TestData[] m_testData={
+			new TestData(new Message(creditCheck, id1),false),
+			new TestData(new Message(creditValid, id1),true),
+			new TestData(new Message(creditCheck, id2),false),
+			new TestData(new Message(creditInvalid, id2),true)
+	};
+}

Added: tools/eclipse/trunk/plugins/org.scribble.monitor/src/perftest/performance/monitor/MonitorTestCase6.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.monitor/src/perftest/performance/monitor/MonitorTestCase6.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.monitor/src/perftest/performance/monitor/MonitorTestCase6.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,157 @@
+/*
+ * Copyright 2005-9 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 21 Feb 2009 : Initial version created by gary
+ */
+package performance.monitor;
+
+import org.scribble.monitor.*;
+import org.scribble.monitor.impl.DefaultConversationTypeRepository;
+import org.scribble.monitor.model.ChoiceNode;
+import org.scribble.monitor.model.ConditionalNode;
+import org.scribble.monitor.model.ConversationType;
+import org.scribble.monitor.model.MonitorNode;
+import org.scribble.monitor.model.ReceiveNode;
+import org.scribble.monitor.model.RecordActivity;
+import org.scribble.monitor.model.SendNode;
+
+/**
+ *  MonitorTestCase6:
+ *  
+ *  CreditAgency - observable decision regarding whether
+ *  the credit is ok or not.
+ *  						
+ */
+public class MonitorTestCase6 implements MonitorTestCase {
+
+	public ConversationTypeRepository getConversationTypeRepository() throws MonitorException {
+		DefaultConversationTypeRepository ret=new DefaultConversationTypeRepository();
+		
+		ret.addConversationType(getDescription());
+		
+		return(ret);
+	}
+	
+	public ConversationTypeName[] getObservationNames() {
+		ConversationTypeName[] ret=new ConversationTypeName[1];
+		
+		ConversationTypeName mainname=new ConversationTypeName();
+		mainname.setName("MainName");
+		ret[0] = mainname;
+		
+		return(ret);
+	}
+	
+	public ConversationType getDescription() {
+		ConversationType ret=new ConversationType();
+
+		ConversationTypeName mainname=new ConversationTypeName();
+		mainname.setName("MainName");
+		ret.setName(mainname);
+
+		ret.setReceiveGuards(new MessageSignature[]{creditCheck});
+		
+		ReceiveNode creditCheckNode=new ReceiveNode();
+		creditCheckNode.setReceiveGuards(new MessageSignature[]{creditCheck});
+		creditCheckNode.setParent(ret);
+		creditCheckNode.setChildPosition(0);
+		creditCheckNode.setIdentityTypes(new ConversationIdentityType[]{trade});
+		creditCheckNode.setRecordActivities(new RecordActivity[]{
+				new RecordActivity("check",null)
+		});
+		
+		ChoiceNode choiceOnCredit=new ChoiceNode();
+		choiceOnCredit.setSentGuards(new MessageSignature[]{creditValid,creditInvalid});
+		choiceOnCredit.setParent(ret);
+		choiceOnCredit.setChildPosition(1);
+		
+		ConditionalNode creditOkSeq=new ConditionalNode();
+		creditOkSeq.setSentGuards(new MessageSignature[]{creditValid});
+		creditOkSeq.setParent(choiceOnCredit);
+		creditOkSeq.setChildPosition(0);
+		
+		try {
+			creditOkSeq.setExpression(
+					new org.scribble.monitor.expression.jaxen.JaxenDOMExpression("$check = 'ok'"));
+		} catch(Exception e) {
+			e.printStackTrace();
+		}
+		
+		SendNode creditValidNode=new SendNode();
+		creditValidNode.setSentGuards(new MessageSignature[]{creditValid});
+		creditValidNode.setParent(creditOkSeq);
+		creditValidNode.setChildPosition(0);
+		creditValidNode.setIdentityTypes(new ConversationIdentityType[]{trade});
+						
+		creditOkSeq.setChildren(new MonitorNode[]{creditValidNode});
+		
+		
+		ConditionalNode creditNotOkSeq=new ConditionalNode();
+		creditNotOkSeq.setSentGuards(new MessageSignature[]{creditInvalid});
+		creditNotOkSeq.setParent(choiceOnCredit);
+		creditNotOkSeq.setChildPosition(1);
+		
+		try {
+			creditNotOkSeq.setExpression(
+					new org.scribble.monitor.expression.jaxen.JaxenDOMExpression("$check = 'notok'"));
+		} catch(Exception e) {
+			e.printStackTrace();
+		}
+		
+		SendNode creditInvalidNode=new SendNode();
+		creditInvalidNode.setSentGuards(new MessageSignature[]{creditInvalid});
+		creditInvalidNode.setParent(creditNotOkSeq);
+		creditInvalidNode.setChildPosition(0);
+		creditInvalidNode.setIdentityTypes(new ConversationIdentityType[]{trade});
+		
+		creditNotOkSeq.setChildren(new MonitorNode[]{creditInvalidNode});
+		
+
+		choiceOnCredit.setChildren(new MonitorNode[]{creditOkSeq,creditNotOkSeq});
+		
+		ret.setChildren(new MonitorNode[]{creditCheckNode,choiceOnCredit});
+		
+		return(ret);
+	}
+		
+	public TestData[] getTestData() {
+		return(m_testData);
+	}
+	
+	private static final MessageSignature buy=new MessageSignature("buy", null);
+	private static final MessageSignature buyFailed=new MessageSignature("buyFailed", null);
+	private static final MessageSignature buyConfirmed=new MessageSignature("buyConfirmed", null);
+	private static final MessageSignature creditCheck=new MessageSignature("creditCheck", null);
+	private static final MessageSignature creditValid=new MessageSignature("creditValid", null);
+	private static final MessageSignature creditInvalid=new MessageSignature("creditInvalid", null);
+	private static final MessageSignature order=new MessageSignature("order", null);
+	private static final MessageSignature orderConfirmed=new MessageSignature("orderConfirmed", null);
+	private static final MessageSignature outOfStock=new MessageSignature("outOfStock", null);
+	
+	private static final ConversationIdentityType trade=new ConversationIdentityType("trade");
+	
+	private static final ConversationIdentity[] id1=new ConversationIdentity[]{new ConversationIdentity("1",trade)};
+	private static final ConversationIdentity[] id2=new ConversationIdentity[]{new ConversationIdentity("2",trade)};
+	private static final ConversationIdentity[] id3=new ConversationIdentity[]{new ConversationIdentity("3",trade)};
+	
+	private TestData[] m_testData={
+			new TestData(new Message(creditCheck, id1, "ok"),false),
+			new TestData(new Message(creditValid, id1),true),
+			new TestData(new Message(creditCheck, id2, "notok"),false),
+			new TestData(new Message(creditInvalid, id2),true)
+	};
+}

Added: tools/eclipse/trunk/plugins/org.scribble.monitor/src/perftest/performance/monitor/TestData.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.monitor/src/perftest/performance/monitor/TestData.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.monitor/src/perftest/performance/monitor/TestData.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,61 @@
+/*
+ * Copyright 2005-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 5 Oct 2008 : Initial version created by gary
+ */
+package performance.monitor;
+
+import org.scribble.monitor.Message;
+
+public class TestData {
+	public TestData(Message m, boolean send) {
+		m_message = m;
+		m_send = send;
+	}
+	
+	public Message getMessage() {
+		return(m_message);
+	}
+	
+	public boolean isSend() {
+		return(m_send);
+	}
+	
+	public String toString() {
+		String ret=null;
+		
+		if (isSend()) {
+			ret = "Send ";
+		} else {
+			ret = "Receive ";
+		}
+		
+		if (m_message != null) {
+			for (int i=0; i < m_message.getSignature().getTypes().length; i++) {
+				if (i > 0) {
+					ret += ",";
+				}
+				ret += m_message.getSignature().getTypes()[i];
+			}
+		}
+		
+		return(ret);
+	}
+	
+	private Message m_message=null;
+	private boolean m_send=false;
+}
\ No newline at end of file

Added: tools/eclipse/trunk/plugins/org.scribble.monitor/src/perftest/performance/monitor/TestMonitor.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.monitor/src/perftest/performance/monitor/TestMonitor.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.monitor/src/perftest/performance/monitor/TestMonitor.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,228 @@
+/*
+ * Copyright 2005-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 4 Oct 2008 : Initial version created by gary
+ */
+package performance.monitor;
+
+import org.scribble.monitor.*;
+import org.scribble.monitor.impl.DefaultMonitorContext;
+import org.scribble.monitor.model.ConversationType;
+
+
+public class TestMonitor implements Runnable {
+
+	private static final int NUMBER_OF_SERIALIZATIONS = 1000;
+	private static final int NUMBER_OF_ITERATIONS = 1000000;
+
+	public static void main(String[] args) {
+		TestMonitor app=new TestMonitor(new MonitorTestCase6());
+		
+		app.run();
+	}
+	
+	public TestMonitor(MonitorTestCase mtc) {
+		m_monitorTestCase = mtc;
+	}
+	
+	public void run() {
+		try {
+			ConversationTypeRepository sm=m_monitorTestCase.getConversationTypeRepository();
+			
+			int len=0;
+			
+			long serstarttime=System.currentTimeMillis();
+			
+			for (int i=0; i < NUMBER_OF_SERIALIZATIONS; i++) {
+				try {
+					java.io.ByteArrayOutputStream baos=new java.io.ByteArrayOutputStream();
+					java.io.ObjectOutputStream oos=new java.io.ObjectOutputStream(baos);
+					oos.writeObject(sm);
+					
+					byte[] b=baos.toByteArray();
+					
+					len = b.length;
+					
+					baos.close();
+					
+					java.io.ByteArrayInputStream bias=new java.io.ByteArrayInputStream(b);
+					java.io.ObjectInputStream ois=new java.io.ObjectInputStream(bias);
+					
+					Object obj=ois.readObject();
+					
+					bias.close();
+					
+				} catch(Exception e) {
+					e.printStackTrace();
+				}
+			}
+			
+			if (m_serializeBeforeUse) {
+				try {
+					java.io.ByteArrayOutputStream baos=new java.io.ByteArrayOutputStream();
+					java.io.ObjectOutputStream oos=new java.io.ObjectOutputStream(baos);
+					oos.writeObject(sm);
+					
+					byte[] b=baos.toByteArray();
+					
+					len = b.length;
+					
+					java.io.ByteArrayInputStream bais=
+						new java.io.ByteArrayInputStream(b);
+					java.io.ObjectInputStream ois=
+						new java.io.ObjectInputStream(bais);
+					
+					sm = (ConversationTypeRepository)ois.readObject();
+					
+					System.out.println("Deserialized");
+					
+					ois.close();
+				} catch(Exception e) {
+					e.printStackTrace();
+				}
+			}
+			
+			System.out.println("Serialization time="+((double)(System.currentTimeMillis()-serstarttime)/NUMBER_OF_SERIALIZATIONS)+" ms");
+			
+			System.out.println("Description length is "+len);
+	
+			DefaultMonitorContext context=new DefaultMonitorContext();
+			context.setConversationTypeRepository(sm);
+		
+			Monitor monitor=MonitorFactory.getMonitor(context);
+			
+			ConversationTypeName[] names=m_monitorTestCase.getObservationNames();
+			
+			for (int i=0; i < names.length; i++) {
+				monitor.observe(names[i]);
+			}
+			
+			if (m_debug) {
+				monitor.setConversationListener(new ConversationListener() {
+	
+					public void finished(ConversationIdentity[] ids) {
+						System.out.println("FINISHED: "+ids);
+					}
+	
+					public void received(Message mesg) {
+						System.out.println("RECEIVED: "+mesg.getSignature());
+					}
+	
+					public void receivedOutOfSequence(Message mesg) {
+						System.out.println("RECEIVED OOS: "+mesg.getSignature());
+					}
+	
+					public void sent(Message mesg) {
+						System.out.println("SENT: "+mesg.getSignature());
+					}
+	
+					public void sentOutOfSequence(Message mesg) {
+						System.out.println("SENT OOS: "+mesg.getSignature());
+					}
+	
+					public void started(ConversationIdentity[] ids) {
+						System.out.println("STARTED: "+ids);
+					}
+					
+				});
+				
+				System.out.println("-----(first iter)--------");
+				runTestIteration(monitor, m_monitorTestCase);
+				System.out.println("-----(second iter)--------");
+				runTestIteration(monitor, m_monitorTestCase);
+			} else {
+				long time1=runTests(monitor, m_monitorTestCase);
+				
+				Monitor monitor2 = new DummyMonitor();
+				
+				long time2=runTests(monitor2, m_monitorTestCase);
+						
+				System.out.println("Test Results:");
+				System.out.println("Monitored = "+time1);
+				System.out.println("Dummy     = "+time2);
+				
+				System.out.println("--------------------");
+				
+				System.out.println("Difference= "+(time1-time2));
+				System.out.println("Factor= "+((double)(time1-time2)/(double)time2));
+				
+				System.out.println("--------------------");
+				
+				System.out.println("Monitored/Iterations = "+((double)time1/NUMBER_OF_ITERATIONS)+" ms");
+			}
+		} catch(Exception e) {
+			e.printStackTrace();
+		}
+	}
+	
+	public long runTests(Monitor monitor, MonitorTestCase mtc) {
+		long startTime=System.currentTimeMillis();
+
+		for (int i=0; i < NUMBER_OF_ITERATIONS; i++) {
+			runTestIteration(monitor, mtc);
+		}
+		
+		return(System.currentTimeMillis()-startTime);
+	}
+	
+	protected void runTestIteration(Monitor monitor, MonitorTestCase mtc) {
+		
+		for (int i=0; i < mtc.getTestData().length; i++) {
+			TestData td=mtc.getTestData()[i];
+			boolean res=false;
+			
+			if (td.isSend()) {
+				res = monitor.sent(td.getMessage());
+			} else {
+				res = monitor.received(td.getMessage());
+			}
+			
+			if (m_debug) System.out.println("TEST: "+td+" Result="+res);
+		}
+	}
+	
+	public void setDebug(boolean d) {
+		m_debug = d;
+	}
+	
+	private boolean m_debug=false;
+	private boolean m_serializeBeforeUse=true;
+	private MonitorTestCase m_monitorTestCase=null;
+
+	public static class DummyMonitor implements Monitor {
+
+		public void observe(ConversationTypeName name) throws MonitorException {
+		}
+
+		public boolean received(Message mesg) {
+			return true;
+		}
+
+		public boolean sent(Message mesg) {
+			return true;
+		}
+
+		public void setDescription(ConversationType description) {
+		}
+		
+		public void setConversationListener(ConversationListener l) {
+		}
+
+		public void close() {
+		}
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.monitor/src/test/org/scribble/monitor/expression/jaxen/JaxenDOMExpressionTest.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.monitor/src/test/org/scribble/monitor/expression/jaxen/JaxenDOMExpressionTest.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.monitor/src/test/org/scribble/monitor/expression/jaxen/JaxenDOMExpressionTest.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,65 @@
+/*
+ * Copyright 2005-9 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 21 Feb 2009 : Initial version created by gary
+ */
+package org.scribble.monitor.expression.jaxen;
+
+import org.scribble.monitor.*;
+import org.scribble.monitor.expression.jaxen.JaxenDOMExpression;
+import org.scribble.monitor.impl.Scope;
+import org.scribble.monitor.model.ConversationContext;
+
+import junit.framework.TestCase;
+
+public class JaxenDOMExpressionTest extends TestCase {
+
+	public void testEvaluateMessage() {
+		
+		try {
+			JaxenDOMExpression expr=
+					new JaxenDOMExpression("$doc/sub/value/text() = 'hello'");
+	
+			org.w3c.dom.Document doc=
+				javax.xml.parsers.DocumentBuilderFactory.newInstance().newDocumentBuilder().newDocument();
+			
+			org.w3c.dom.Element sub=doc.createElement("sub");
+			doc.appendChild(sub);
+			
+			org.w3c.dom.Element value=doc.createElement("value");
+			sub.appendChild(value);
+			
+			org.w3c.dom.Text text=doc.createTextNode("hello");
+			value.appendChild(text);
+
+			Message mesg=new Message();
+			mesg.setContent(doc);
+			
+			ConversationContext context=new Scope() {};
+			context.getVariables().put("doc", doc);
+			
+			boolean result=expr.evaluate(context);
+			
+			if (result == false) {
+				fail("Expecting 'true' result");
+			}
+		} catch(Exception e) {
+			e.printStackTrace();
+			fail("Failed to evaluate: "+e);
+		}
+	}	
+}

Added: tools/eclipse/trunk/plugins/org.scribble.monitor/src/test/org/scribble/monitor/expression/jaxen/JaxenJavaBeanExpressionTest.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.monitor/src/test/org/scribble/monitor/expression/jaxen/JaxenJavaBeanExpressionTest.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.monitor/src/test/org/scribble/monitor/expression/jaxen/JaxenJavaBeanExpressionTest.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,91 @@
+/*
+ * Copyright 2005-9 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 21 Feb 2009 : Initial version created by gary
+ */
+package org.scribble.monitor.expression.jaxen;
+
+import org.scribble.monitor.Message;
+import org.scribble.monitor.expression.jaxen.JaxenJavaBeanExpression;
+import org.scribble.monitor.impl.Scope;
+import org.scribble.monitor.model.ConversationContext;
+
+import junit.framework.TestCase;
+
+public class JaxenJavaBeanExpressionTest extends TestCase {
+
+	public void testEvaluate() {
+		
+		try {
+			JaxenJavaBeanExpression expr=
+					new JaxenJavaBeanExpression("$var/sub/value = 'hello'");
+	
+			Main main=new Main();
+			Sub sub=new Sub();
+			sub.setValue("hello");
+			
+			main.setSub(sub);
+			
+			Message mesg=new Message();
+			mesg.setContent(main);
+			
+			ConversationContext context=new Scope() {};
+			context.getVariables().put("var", main);
+
+			boolean result=expr.evaluate(context);
+			
+			if (result == false) {
+				fail("Expecting 'true' result");
+			}
+		} catch(Exception e) {
+			e.printStackTrace();
+			fail("Failed to evaluate: "+e);
+		}
+	}
+	
+	public static class Main {
+		
+		public Main() {
+		}
+		
+		public Sub getSub() {
+			return(m_sub);
+		}
+		
+		public void setSub(Sub s) {
+			m_sub = s;
+		}
+		
+		private Sub m_sub=null;
+	}
+	
+	public static class Sub {
+		
+		public Sub() {
+		}
+		
+		public String getValue() {
+			return(m_value);
+		}
+		
+		public void setValue(String val) {
+			m_value = val;
+		}
+		
+		private String m_value=null;
+	}	
+}

Added: tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/.classpath
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/.classpath	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/.classpath	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+	<classpathentry kind="src" path="src/java"/>
+	<classpathentry kind="output" path="classes"/>
+</classpath>

Added: tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/.project
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/.project	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/.project	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>org.scribble.pi4soa.cdm</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.ManifestBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.SchemaBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.pde.PluginNature</nature>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+	</natures>
+</projectDescription>

Added: tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/META-INF/MANIFEST.MF
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/META-INF/MANIFEST.MF	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/META-INF/MANIFEST.MF	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,29 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Scribble pi4soa CDM
+Bundle-SymbolicName: org.scribble.pi4soa.cdm
+Bundle-Version: 0.1.0.qualifier
+Bundle-Activator: org.scribble.pi4soa.cdm.osgi.Activator
+Bundle-Vendor: www.scribble.org
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Import-Package: org.osgi.framework;version="1.3.0"
+Require-Bundle: org.pi4soa.cdl,
+ org.pi4soa.common,
+ org.scribble.core,
+ org.scribble.conversation.model,
+ org.scribble.conversation.parser,
+ org.eclipse.ui;resolution:=optional,
+ org.eclipse.core.resources;resolution:=optional,
+ org.eclipse.core.runtime;resolution:=optional,
+ org.pi4soa.designer;resolution:=optional,
+ org.eclipse.ui.views.properties.tabbed;resolution:=optional,
+ org.scribble.expression.xpath,
+ org.scribble.eclipse;resolution:=optional,
+ org.scribble.contract.model;bundle-version="0.1.0"
+Scribble-Extensions: org.scribble.pi4soa.cdm.parser.CDMTokenizer,
+  org.scribble.pi4soa.cdm.parser.CDMModelParserRule,
+  org.scribble.pi4soa.cdm.model.CDMNotation,
+  org.scribble.pi4soa.cdm.validation.TypeReferenceValidationRule,
+  org.scribble.pi4soa.cdm.editor.CDMEditorManager
+Export-Package: org.scribble.pi4soa.cdm.model,
+ org.scribble.pi4soa.cdm.parser

Added: tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/build.properties
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/build.properties	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/build.properties	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,4 @@
+source.. = src/java/
+output.. = classes/
+bin.includes = META-INF/,\
+               .

Added: tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/classes/org/scribble/pi4soa/cdm/CDMDefinitions.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/classes/org/scribble/pi4soa/cdm/CDMDefinitions.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/classes/org/scribble/pi4soa/cdm/editor/CDMEditorManager.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/classes/org/scribble/pi4soa/cdm/editor/CDMEditorManager.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/classes/org/scribble/pi4soa/cdm/model/CDMNotation.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/classes/org/scribble/pi4soa/cdm/model/CDMNotation.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/classes/org/scribble/pi4soa/cdm/osgi/Activator.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/classes/org/scribble/pi4soa/cdm/osgi/Activator.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/classes/org/scribble/pi4soa/cdm/parser/CDMModelParserRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/classes/org/scribble/pi4soa/cdm/parser/CDMModelParserRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/classes/org/scribble/pi4soa/cdm/parser/CDMTokenizer.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/classes/org/scribble/pi4soa/cdm/parser/CDMTokenizer.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/classes/org/scribble/pi4soa/cdm/parser/rules/AssignConverterRuleImpl.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/classes/org/scribble/pi4soa/cdm/parser/rules/AssignConverterRuleImpl.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/classes/org/scribble/pi4soa/cdm/parser/rules/ConversationConverterRuleImpl$1.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/classes/org/scribble/pi4soa/cdm/parser/rules/ConversationConverterRuleImpl$1.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/classes/org/scribble/pi4soa/cdm/parser/rules/ConversationConverterRuleImpl$InterfaceVisitorImpl.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/classes/org/scribble/pi4soa/cdm/parser/rules/ConversationConverterRuleImpl$InterfaceVisitorImpl.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/classes/org/scribble/pi4soa/cdm/parser/rules/ConversationConverterRuleImpl.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/classes/org/scribble/pi4soa/cdm/parser/rules/ConversationConverterRuleImpl.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/classes/org/scribble/pi4soa/cdm/parser/rules/ConversationInteractionConverterRuleImpl.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/classes/org/scribble/pi4soa/cdm/parser/rules/ConversationInteractionConverterRuleImpl.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/classes/org/scribble/pi4soa/cdm/parser/rules/ConversationModelConverterRuleImpl.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/classes/org/scribble/pi4soa/cdm/parser/rules/ConversationModelConverterRuleImpl.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/classes/org/scribble/pi4soa/cdm/parser/rules/ConverterContext.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/classes/org/scribble/pi4soa/cdm/parser/rules/ConverterContext.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/classes/org/scribble/pi4soa/cdm/parser/rules/ConverterRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/classes/org/scribble/pi4soa/cdm/parser/rules/ConverterRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/classes/org/scribble/pi4soa/cdm/parser/rules/ConverterRuleFactory.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/classes/org/scribble/pi4soa/cdm/parser/rules/ConverterRuleFactory.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/classes/org/scribble/pi4soa/cdm/parser/rules/ConverterUtil.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/classes/org/scribble/pi4soa/cdm/parser/rules/ConverterUtil.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/classes/org/scribble/pi4soa/cdm/parser/rules/DefaultConverterContext.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/classes/org/scribble/pi4soa/cdm/parser/rules/DefaultConverterContext.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/classes/org/scribble/pi4soa/cdm/parser/rules/FinalizeConverterRuleImpl.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/classes/org/scribble/pi4soa/cdm/parser/rules/FinalizeConverterRuleImpl.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/classes/org/scribble/pi4soa/cdm/parser/rules/FinalizerHandlerConverterRuleImpl$1.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/classes/org/scribble/pi4soa/cdm/parser/rules/FinalizerHandlerConverterRuleImpl$1.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/classes/org/scribble/pi4soa/cdm/parser/rules/FinalizerHandlerConverterRuleImpl.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/classes/org/scribble/pi4soa/cdm/parser/rules/FinalizerHandlerConverterRuleImpl.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/classes/org/scribble/pi4soa/cdm/parser/rules/IfConverterRuleImpl.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/classes/org/scribble/pi4soa/cdm/parser/rules/IfConverterRuleImpl.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/classes/org/scribble/pi4soa/cdm/parser/rules/IfOrWhenConverterRuleImpl.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/classes/org/scribble/pi4soa/cdm/parser/rules/IfOrWhenConverterRuleImpl.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/classes/org/scribble/pi4soa/cdm/parser/rules/ParallelConverterRuleImpl.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/classes/org/scribble/pi4soa/cdm/parser/rules/ParallelConverterRuleImpl.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/classes/org/scribble/pi4soa/cdm/parser/rules/PerformConverterRuleImpl.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/classes/org/scribble/pi4soa/cdm/parser/rules/PerformConverterRuleImpl.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/classes/org/scribble/pi4soa/cdm/parser/rules/SequenceConverterRuleImpl.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/classes/org/scribble/pi4soa/cdm/parser/rules/SequenceConverterRuleImpl.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/classes/org/scribble/pi4soa/cdm/parser/rules/WhenConverterRuleImpl.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/classes/org/scribble/pi4soa/cdm/parser/rules/WhenConverterRuleImpl.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/classes/org/scribble/pi4soa/cdm/parser/rules/WhileConverterRuleImpl.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/classes/org/scribble/pi4soa/cdm/parser/rules/WhileConverterRuleImpl.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/classes/org/scribble/pi4soa/cdm/validation/TypeReferenceValidationRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/classes/org/scribble/pi4soa/cdm/validation/TypeReferenceValidationRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/src/java/org/scribble/pi4soa/cdm/CDMDefinitions.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/src/java/org/scribble/pi4soa/cdm/CDMDefinitions.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/src/java/org/scribble/pi4soa/cdm/CDMDefinitions.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,30 @@
+/*
+ * Copyright 2005-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 17 Jun 2008 : Initial version created by gary
+ */
+package org.scribble.pi4soa.cdm;
+
+/**
+ * This class provides common definitions used in the Scribble
+ * transformation of the CDM file.
+ */
+public class CDMDefinitions {
+
+	public static final String CDM_NOTATION="cdm";
+	
+}

Added: tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/src/java/org/scribble/pi4soa/cdm/editor/CDMEditorManager.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/src/java/org/scribble/pi4soa/cdm/editor/CDMEditorManager.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/src/java/org/scribble/pi4soa/cdm/editor/CDMEditorManager.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,112 @@
+/*
+ * Copyright 2005-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 19 Jun 2008 : Initial version created by gary
+ */
+package org.scribble.pi4soa.cdm.editor;
+
+import org.eclipse.emf.ecore.EValidator;
+import org.scribble.pi4soa.cdm.model.*;
+import org.scribble.extensions.RegistryInfo;
+import org.scribble.model.ModelReference;
+import org.scribble.model.SourceRef;
+import org.scribble.model.admin.ModelIssue;
+import org.scribble.editor.*;
+
+/**
+ * This is the CDM designer's implementation of the EditorManager
+ * interface.
+ */
+ at RegistryInfo(extension=EditorManager.class,notation=CDMNotation.NOTATION_CODE) //preference=10,
+public class CDMEditorManager extends AbstractEditorManager {
+
+	/**
+	 * This method focuses the editor on the specified source,
+	 * identified by the model reference and source reference.
+	 * 
+	 * @param mref The model reference
+	 * @param sref The component source reference
+	 * @param prop Additional properties
+	 */
+	public void focus(ModelReference mref, SourceRef sref,
+					java.util.Map<String,Object> props) {
+		String uri=null;
+		org.eclipse.core.resources.IFile file=
+			org.scribble.eclipse.model.admin.OSGIModelRepository.getFile(mref);
+	
+		if (file == null || file.exists() == false) {
+			file = org.scribble.eclipse.model.admin.OSGIModelRepository.getGlobalFile(mref);
+		}
+	
+		if (file != null && file.exists()) {
+			uri = file.getFullPath().toPortableString();
+		}
+		
+		if (uri != null) {
+			org.eclipse.ui.IWorkbenchPage page=
+						org.eclipse.ui.PlatformUI.getWorkbench().
+							getActiveWorkbenchWindow().getActivePage();
+			
+			org.eclipse.core.resources.IResource res=
+				org.eclipse.core.resources.ResourcesPlugin.getWorkspace().getRoot().findMember(uri);
+			
+			if (res instanceof org.eclipse.core.resources.IFile) {
+				org.eclipse.ui.part.FileEditorInput input=
+						new org.eclipse.ui.part.FileEditorInput(
+								(org.eclipse.core.resources.IFile)res);
+			
+				try {
+					org.eclipse.ui.IEditorPart part=page.openEditor(input,
+								"org.pi4soa.designer.Pi4SOADesignerID");
+					
+					if (part instanceof org.pi4soa.designer.editor.ChoreographyDescriptionEditor) {
+						org.pi4soa.designer.editor.ChoreographyDescriptionEditor editor=
+							(org.pi4soa.designer.editor.ChoreographyDescriptionEditor)part;
+						
+						/* Other approach using marker - can be used if editor does not
+						 * provide alternative way to focus on component.
+						org.eclipse.core.resources.IMarker marker=res.createMarker(EValidator.MARKER);
+						marker.setAttribute(EValidator.URI_ATTRIBUTE, ref.getComponentURI());
+						editor.gotoMarker(marker);
+						marker.delete();
+						*/
+						
+						editor.showComponent(sref.getComponentURI());
+					}
+					
+				} catch(Exception e) {
+					e.printStackTrace();
+				}
+			}
+		}
+	}
+	
+	/**
+	 * This method enriches the set of properties required
+	 * by the editor, using the properties associated with
+	 * the model issue.
+	 * 
+	 * @param issue The model issue
+	 */
+	@Override
+	public void enrich(ModelIssue issue) {
+		
+		// Set the EMF URI attribute
+		issue.getProperties().put(EValidator.URI_ATTRIBUTE,
+				issue.getModelObject().getSource().getComponentURI());
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/src/java/org/scribble/pi4soa/cdm/model/CDMNotation.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/src/java/org/scribble/pi4soa/cdm/model/CDMNotation.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/src/java/org/scribble/pi4soa/cdm/model/CDMNotation.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,67 @@
+/*
+ * Copyright 2005-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 17 Jun 2008 : Initial version created by gary
+ */
+package org.scribble.pi4soa.cdm.model;
+
+import org.scribble.extensions.*;
+import org.scribble.model.ModelReference;
+import org.scribble.model.Notation;
+
+/**
+ * This class represents the CDM notation implementation.
+ */
+ at RegistryInfo(extension=org.scribble.model.Notation.class)
+public class CDMNotation extends org.scribble.model.AbstractNotation {
+
+	public static final String NOTATION_CODE="cdm";
+	
+	/**
+	 * This is the constructor for the CDM notation.
+	 */
+	public CDMNotation() {
+		super(NOTATION_CODE, "CDM", false);
+	}
+	
+	/**
+	 * This method returns the initial description associated
+	 * with the supplied reference.
+	 * 
+	 * @param ref The reference
+	 * @return The initial description, or null if no description
+	 */
+	public String getInitialDescription(ModelReference ref) {
+		StringBuffer buf=new StringBuffer();
+				
+		return(buf.toString());
+	}
+
+	/**
+	 * This method returns the optional 'super' notation.
+	 * If defined, then this notation is a derived notation
+	 * from the 'super' notation.
+	 * 
+	 * @return The optional 'super' notation
+	 */
+	@Override
+	public Notation getSuperNotation() {
+		return(m_superNotation);
+	}
+
+	private Notation m_superNotation=new org.scribble.conversation.model.ConversationNotation();
+}

Added: tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/src/java/org/scribble/pi4soa/cdm/osgi/Activator.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/src/java/org/scribble/pi4soa/cdm/osgi/Activator.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/src/java/org/scribble/pi4soa/cdm/osgi/Activator.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,22 @@
+package org.scribble.pi4soa.cdm.osgi;
+
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+
+public class Activator implements BundleActivator {
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext)
+	 */
+	public void start(BundleContext context) throws Exception {
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext)
+	 */
+	public void stop(BundleContext context) throws Exception {
+	}
+
+}

Added: tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/src/java/org/scribble/pi4soa/cdm/parser/CDMModelParserRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/src/java/org/scribble/pi4soa/cdm/parser/CDMModelParserRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/src/java/org/scribble/pi4soa/cdm/parser/CDMModelParserRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,133 @@
+/*
+ * Copyright 2007-9 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 6 May 2009 : Initial version created by gary
+ */
+package org.scribble.pi4soa.cdm.parser;
+
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+import org.scribble.conversation.model.ConversationModel;
+import org.scribble.extensions.RegistryFactory;
+import org.scribble.extensions.RegistryInfo;
+import org.scribble.model.Model;
+import org.scribble.model.admin.ModelListener;
+import org.scribble.parser.ParserContext;
+import org.scribble.parser.ParserRule;
+import org.scribble.parser.Token;
+import org.scribble.pi4soa.cdm.model.CDMNotation;
+import org.scribble.pi4soa.cdm.parser.rules.ConverterContext;
+import org.scribble.pi4soa.cdm.parser.rules.ConverterRule;
+import org.scribble.pi4soa.cdm.parser.rules.ConverterRuleFactory;
+import org.scribble.pi4soa.cdm.parser.rules.DefaultConverterContext;
+
+/**
+ * This class provides the model parser for the CDM notation.
+ * 
+ */
+ at RegistryInfo(extension=ParserRule.class,notation=CDMNotation.NOTATION_CODE)
+public class CDMModelParserRule extends org.scribble.conversation.parser.ConversationModelParserRule {
+
+	/**
+	 * The default constructor.
+	 */
+	public CDMModelParserRule() {
+		//super(ParserRuleType.File);
+	}
+	
+	/**
+	 * This method determines whether the parser rules is
+	 * appropriate to return a model object of the required
+	 * type.
+	 * 
+	 * @param type The required type
+	 * @return Whether the parser rule returns a
+	 * 				model object of the required type
+	 */
+	public boolean isSupported(Class<?> type) {
+		return(type.isAssignableFrom(Model.class));
+	}
+	
+	/**
+	 * This method parses the description to obtain
+	 * a model object of the appropriate type.
+	 * 
+	 * @param context The context
+	 * @param l The listener
+	 * @return The model object
+	 */
+	public Object parse(ParserContext context, ModelListener l) {
+		ConversationModel ret=null;
+		
+		Token t=context.nextToken();
+		
+		if (t != null && t.getObject() instanceof org.pi4soa.cdl.Package) {
+			try {						
+				org.pi4soa.cdl.Package cdlpack=
+					(org.pi4soa.cdl.Package)t.getObject();
+			
+				ConverterRule rule=ConverterRuleFactory.getConverter(ConversationModel.class,
+									cdlpack);
+			
+				if (rule != null) {
+					ConverterContext cctxt=
+						new DefaultConverterContext(context.getSource());
+					
+					ret = (ConversationModel)rule.convert(cctxt,
+							ConversationModel.class, cdlpack);
+				}
+			
+			} catch(Exception e) {
+				logger.log(Level.SEVERE,
+						"Failed to load model", e);
+			}
+		
+			if (logger.isLoggable(java.util.logging.Level.FINEST)) {
+				
+				org.scribble.export.Exporter exporter=
+					(org.scribble.export.Exporter)
+					RegistryFactory.getRegistry().getExtension(
+							org.scribble.export.Exporter.class, null);
+				
+				try {
+					org.scribble.export.text.TextFormatter formatter=
+						new org.scribble.export.text.TextFormatter();
+					
+					java.io.ByteArrayOutputStream os=
+						new java.io.ByteArrayOutputStream();
+					
+					formatter.setOutputStream(os);
+					
+					exporter.export(context.getSource(), ret, formatter);
+					
+					String str=new String(os.toByteArray());
+					
+					System.out.println("EXPORTED CDM TEXT:");
+					System.out.println(str);
+					
+				} catch(Exception e) {
+					e.printStackTrace();
+				}
+			}
+		}
+
+		return(ret);
+	}
+
+	private static Logger logger = Logger.getLogger("org.pi4soa.scribble.cdm.parser");
+}

Added: tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/src/java/org/scribble/pi4soa/cdm/parser/CDMTokenizer.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/src/java/org/scribble/pi4soa/cdm/parser/CDMTokenizer.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/src/java/org/scribble/pi4soa/cdm/parser/CDMTokenizer.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,63 @@
+/*
+ * Copyright 2005-9 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 6 May 2009 : Initial version created by gary
+ */
+package org.scribble.pi4soa.cdm.parser;
+
+import org.scribble.pi4soa.cdm.model.CDMNotation;
+import org.scribble.extensions.RegistryInfo;
+import org.scribble.model.ModelReference;
+import org.scribble.parser.*;
+
+/**
+ * This is the CDM based implementation of the tokenizer
+ * interface.
+ */
+ at RegistryInfo(extension=Tokenizer.class,notation=CDMNotation.NOTATION_CODE)
+public class CDMTokenizer extends DefaultTokenizer {
+
+	/**
+	 * The default constructor.
+	 */
+	public CDMTokenizer() {
+	}
+	
+	/**
+	 * This method obtains a list of tokens based on the
+	 * contents of the input stream.
+	 * 
+	 * @param ref The model reference for the input source
+	 * @param is The input stream
+	 * @return The list of tokens
+	 * @throws java.io.IOException Failed to derive 
+	 */
+	public java.util.List<Token> getTokens(ModelReference ref,
+			java.io.InputStream is)	throws java.io.IOException {
+		java.util.List<Token> ret=new java.util.Vector<Token>();
+		
+		org.pi4soa.cdl.Package cdlpack=
+					org.pi4soa.cdl.CDLManager.load(is);
+		
+		if (cdlpack != null) {
+			Token t=new Token(cdlpack);
+			ret.add(t);
+		}			
+
+		return(ret);
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/src/java/org/scribble/pi4soa/cdm/parser/rules/AssignConverterRuleImpl.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/src/java/org/scribble/pi4soa/cdm/parser/rules/AssignConverterRuleImpl.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/src/java/org/scribble/pi4soa/cdm/parser/rules/AssignConverterRuleImpl.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,134 @@
+/*
+ * Copyright 2005-9 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 3 Jun 2009 : Initial version created by gary
+ */
+package org.scribble.pi4soa.cdm.parser.rules;
+
+import org.pi4soa.cdl.*;
+import org.pi4soa.cdl.util.CDLTypeUtil;
+import org.pi4soa.cdl.util.PackageUtil;
+import org.pi4soa.common.xml.XMLUtils;
+import org.scribble.model.*;
+import org.scribble.conversation.model.*;
+
+public class AssignConverterRuleImpl implements ConverterRule {
+
+	/**
+	 * This method determines whether the rule can be applied
+	 * to the supplied CDL type.
+	 * 
+	 * @param scribbleType The Scribble target type
+	 * @param cdlType The CDL type
+	 * @return Whether the rule is appropriate to convert
+	 * 					the CDL type
+	 */
+	public boolean isSupported(Class<?> scribbleType,
+						CDLType cdlType) {
+		return(scribbleType == org.scribble.model.Activity.class &&
+				cdlType instanceof org.pi4soa.cdl.Assign);
+	}
+	
+	/**
+	 * This method converts the supplied CDL type into a
+	 * Scribble model object.
+	 * 
+	 * @param context The converters context
+	 * @param scribbleType The Scribble target type
+	 * @param cdlType The CDL type to be converted
+	 * @return The converted Scribble model object
+	 */
+	public ModelObject convert(ConverterContext context,
+			Class<?> scribbleType, CDLType cdlType) {
+		org.scribble.model.Block ret=
+					new org.scribble.model.Block();
+		org.pi4soa.cdl.Assign cdl=(org.pi4soa.cdl.Assign)cdlType;
+		java.util.List<Raise> exceptions=new java.util.Vector<Raise>();
+		
+		for (int i=0; i < cdl.getCopyDetails().size(); i++) {
+			org.pi4soa.cdl.CopyDetails details=cdl.getCopyDetails().get(i);
+			
+			Assignment assign=new Assignment();
+			
+			assign.getSource().setComponentURI(
+					CDLTypeUtil.getURIFragment(details));
+			
+			// Set role
+			Role role=new Role();
+			
+			if (cdl.getParticipant() != null) {
+				role.setName(cdl.getParticipant().getName());
+			} else if (cdl.getRoleType() != null) {
+				org.pi4soa.cdl.ParticipantType ptype=
+					PackageUtil.getParticipantForRoleType(cdl.getRoleType());
+				
+				if (ptype != null) {
+					role.setName(ptype.getName());
+				}
+			}
+			
+			assign.getRoles().add(role);
+			
+			// Set variable
+			org.scribble.conversation.model.Variable var=
+					new org.scribble.conversation.model.Variable();
+			var.setName(details.getTargetVariable().getName());
+			
+			assign.setVariable(var);
+			
+			org.scribble.expression.xpath.model.XPathExpression expr=
+				new org.scribble.expression.xpath.model.XPathExpression();
+			
+			if (details.getSourceExpression() != null) {
+				expr.setQuery(details.getSourceExpression());
+			} else if (details.getSourceVariable() != null) {
+				expr.setQuery("cdl:getVariable('"+details.getSourceVariable().getName()+"','','')");
+			}
+			
+			assign.setExpression(expr);
+			
+			ret.getContents().add(assign);
+			
+			if (details.getCauseException() != null &&
+					details.getCauseException().trim().length() > 0) {
+				Raise raise=new Raise();
+				
+				Role raiseRole=new Role();
+				raiseRole.setName(role.getName());
+				raise.getRoles().add(raiseRole);
+				
+				TypeReference tref=new TypeReference();
+				tref.setLocalpart(XMLUtils.getLocalname(details.getCauseException()));
+				raise.setType(tref);
+				
+				exceptions.add(raise);
+			}
+		}
+		
+		if (exceptions.size() > 0) {
+			ret.getContents().addAll(exceptions);
+		}
+
+		if (ret.getContents().size() > 1) {
+			return(ret);
+		} else if (ret.getContents().size() == 1) {
+			return(ret.getContents().get(0));
+		} else {
+			return(null);
+		}
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/src/java/org/scribble/pi4soa/cdm/parser/rules/ConversationConverterRuleImpl.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/src/java/org/scribble/pi4soa/cdm/parser/rules/ConversationConverterRuleImpl.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/src/java/org/scribble/pi4soa/cdm/parser/rules/ConversationConverterRuleImpl.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,763 @@
+/*
+ * Copyright 2005-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 6 Jun 2008 : Initial version created by gary
+ */
+package org.scribble.pi4soa.cdm.parser.rules;
+
+import java.util.logging.Logger;
+
+import org.pi4soa.cdl.*;
+import org.pi4soa.cdl.Interaction;
+import org.pi4soa.cdl.interfaces.InterfaceDefinition;
+import org.pi4soa.cdl.interfaces.InterfaceVisitor;
+import org.pi4soa.cdl.interfaces.MessageDefinition;
+import org.pi4soa.cdl.interfaces.OperationDefinition;
+import org.pi4soa.cdl.interfaces.RoleTypeDefinition;
+import org.pi4soa.cdl.util.CDLTypeUtil;
+import org.pi4soa.common.util.NamesUtil;
+import org.pi4soa.common.xml.XMLUtils;
+import org.scribble.model.*;
+import org.scribble.model.admin.DependencyType;
+import org.scribble.contract.model.*;
+import org.scribble.conversation.model.*;
+import org.scribble.expression.xpath.model.*;
+
+public class ConversationConverterRuleImpl implements ConverterRule {
+
+	private static final String CONVERSATION_TYPE = "conversationType";
+
+	/**
+	 * This method determines whether the rule can be applied
+	 * to the supplied CDL type.
+	 * 
+	 * @param scribbleType The Scribble target type
+	 * @param cdlType The CDL type
+	 * @return Whether the rule is appropriate to convert
+	 * 					the CDL type
+	 */
+	public boolean isSupported(Class<?> scribbleType,
+						CDLType cdlType) {
+		return(scribbleType == Conversation.class &&
+				cdlType instanceof Choreography);
+	}
+	
+	/**
+	 * This method converts the supplied CDL type into a
+	 * Scribble model object.
+	 * 
+	 * @param context The converters context
+	 * @param scribbleType The Scribble target type
+	 * @param cdlType The CDL type to be converted
+	 * @return The converted Scribble model object
+	 */
+	public ModelObject convert(ConverterContext context,
+			Class<?> scribbleType, CDLType cdlType) {
+		Conversation ret=new Conversation();
+		Choreography choreo=(Choreography)cdlType;
+		
+		ret.getSource().setComponentURI(
+				CDLTypeUtil.getURIFragment(choreo));
+			
+		context.pushScope();
+		
+		LocatedName modelName=new LocatedName();
+		modelName.setName(choreo.getName());
+		
+		ret.setLocatedName(modelName);
+		
+		// Define roles
+		defineRoles(context, choreo, ret);
+		
+		// Check if root, then need to project other sibling choreos
+		if (choreo.getRoot() == Boolean.TRUE) {
+			
+			java.util.Iterator<Choreography> citer=
+				choreo.getPackage().getChoreographies().iterator();
+	
+			while (citer.hasNext()) {
+				Choreography subchoreo=citer.next();
+				
+				if (subchoreo != choreo) {
+					Conversation subconv=(Conversation)
+							convert(context, Conversation.class, subchoreo);
+					
+					ret.getBlock().getContents().add(subconv);
+					
+					context.addConversation(subconv);
+				}
+				
+				for (int i=0; i < subchoreo.getFinalizers().size(); i++) {
+					FinalizerHandler finalizer=subchoreo.getFinalizers().get(i);
+					
+					ConverterRule rule=ConverterRuleFactory.getConverter(
+							Conversation.class, finalizer);
+					
+					if (rule != null) {
+						
+						Conversation subconv=(Conversation)
+							rule.convert(context, Conversation.class, finalizer);
+					
+						ret.getBlock().getContents().add(subconv);
+					
+						context.addConversation(subconv);
+					}
+				}
+			}
+		}
+		
+		// Process any sub-choreographies	
+		java.util.Iterator<Choreography> citer=
+					choreo.getEnclosedChoreographies().iterator();
+		
+		while (citer.hasNext()) {
+			Choreography subchoreo=citer.next();
+
+			Conversation subconv=(Conversation)
+					convert(context, Conversation.class, subchoreo);
+			
+			ret.getBlock().getContents().add(subconv);
+			
+			context.addConversation(subconv);
+			
+			for (int i=0; i < subchoreo.getFinalizers().size(); i++) {
+				FinalizerHandler finalizer=subchoreo.getFinalizers().get(i);
+				
+				ConverterRule rule=ConverterRuleFactory.getConverter(
+						Conversation.class, finalizer);
+				
+				if (rule != null) {
+					
+					subconv = (Conversation)
+						rule.convert(context, Conversation.class, finalizer);
+				
+					ret.getBlock().getContents().add(subconv);
+				
+					context.addConversation(subconv);
+				}
+			}
+		}
+		
+		// Convert variables
+		convertVariables(context, choreo, ret.getBlock());
+		
+		// Define identities
+		convertIdentities(context, choreo, ret);
+		
+		// Check if exception handlers have been defined
+		// and/or completion condition
+		if (NamesUtil.isSet(choreo.getCompletionCondition()) ||
+			(choreo.getExceptionHandler() != null &&
+					choreo.getExceptionHandler().getExceptionWorkUnits().size() > 0)) {
+			
+			TryEscape te=new TryEscape();
+			ret.getBlock().getContents().add(te);
+			
+			// Process all of the activities within the
+			// choreography
+			convertActivities(context, choreo.getActivities(),
+						te.getBlock());
+			
+			for (int i=0; choreo.getExceptionHandler() != null &&
+						i < choreo.getExceptionHandler().
+						getExceptionWorkUnits().size(); i++) {
+				ExceptionWorkUnit ewu=choreo.getExceptionHandler().
+					getExceptionWorkUnits().get(i);
+				
+				CatchBlock catchPath=new CatchBlock();
+
+				if (NamesUtil.isSet(ewu.getExceptionType())) {
+					TypeReference ref=new TypeReference();
+					ref.setLocalpart(XMLUtils.getLocalname(ewu.getExceptionType()));
+					ref.setNamespace(CDLTypeUtil.getNamespace(
+							ewu.getExceptionType(), choreo));
+					
+					catchPath.setType(ref);					
+				}
+				
+				te.getEscapeBlocks().add(catchPath);
+				
+				convertActivities(context, ewu.getActivities(),
+								catchPath);
+			}
+			
+			if (NamesUtil.isSet(choreo.getCompletionCondition())) {
+				InterruptBlock interrupt=new InterruptBlock();
+				
+				te.getEscapeBlocks().add(interrupt);
+				
+				// Set expression from completion condition
+				// using xpath
+				XPathExpression exp=new XPathExpression();
+				
+				exp.setQuery(choreo.getCompletionCondition());
+				
+				interrupt.setExpression(exp);
+
+				// No activities
+			}
+		} else {
+		
+			// Process all of the activities within the
+			// choreography
+			convertActivities(context, choreo.getActivities(), ret.getBlock());
+		}
+		
+		// Transfer sub-conversations to end of block
+		if (ret.getBlock().getContents().size() > 0) {
+			org.scribble.model.Activity lastAct=
+				ret.getBlock().getContents().get(ret.getBlock().getContents().size()-1);
+			int pos=0;
+			while (ret.getBlock().getContents().get(pos) != lastAct) {
+				if (ret.getBlock().getContents().get(pos) instanceof Conversation) {
+					Conversation c=(Conversation)ret.getBlock().getContents().get(pos);
+	
+					ret.getBlock().getContents().remove(pos);
+					ret.getBlock().getContents().add(c);
+					
+					context.removeConversation(c);
+				} else {
+					pos++;
+				}
+			}
+		}
+		
+		context.popScope();
+		
+		return(ret);
+	}
+
+	
+	protected void defineRoles(ConverterContext context,
+			final Choreography choreo, Conversation conv) {
+	
+		org.scribble.model.admin.DependencyManager dm=(org.scribble.model.admin.DependencyManager)
+				org.scribble.extensions.RegistryFactory.getRegistry().getExtension(
+						org.scribble.model.admin.DependencyManager.class, null);
+		
+		org.pi4soa.cdl.interfaces.InterfaceDeriver intfDeriver=
+					org.pi4soa.cdl.interfaces.InterfaceFactory.getInterfaceDeriver();
+		
+		final java.util.List<ParticipantType> partTypes=new java.util.Vector<ParticipantType>();
+		final java.util.List<Participant> partInstances=new java.util.Vector<Participant>();
+		
+		choreo.visit(new DefaultCDLVisitor() {
+			
+			public void interaction(Interaction interaction) {
+				
+				if (interaction.getEnclosingChoreography() != choreo) {
+					return;
+				}
+				
+				if (interaction.getFromParticipant() != null) {
+					if (partInstances.contains(interaction.getFromParticipant()) == false) {
+						partInstances.add(interaction.getFromParticipant());
+					}
+				} else {
+					ParticipantType ptype=
+						org.pi4soa.cdl.util.PackageUtil.getParticipantForRoleType(
+								interaction.getFromRoleType());
+					
+					if (ptype != null &&
+							partTypes.contains(ptype) == false) {
+						partTypes.add(ptype);
+					}
+				}
+				
+				if (interaction.getToParticipant() != null) {
+					if (partInstances.contains(interaction.getToParticipant()) == false) {
+						partInstances.add(interaction.getToParticipant());
+					}
+				} else {
+					ParticipantType ptype=
+						org.pi4soa.cdl.util.PackageUtil.getParticipantForRoleType(
+								interaction.getToRoleType());
+					
+					if (ptype != null &&
+							partTypes.contains(ptype) == false) {
+						partTypes.add(ptype);
+					}
+				}
+			}
+		});
+		
+		// Define roles
+		java.util.Iterator<Participant> piter=partInstances.iterator();
+		
+		RoleList roleList=null;
+		
+		while (piter.hasNext()) {
+			Role role=new Role();
+			Participant pinst=piter.next();
+			role.setName(pinst.getName());
+			
+			if (roleList == null) {
+				roleList = new RoleList();
+				conv.getBlock().getContents().add(roleList);
+			}
+			
+			roleList.getRoles().add(role);
+			
+			context.setState(role.getName(), role);
+
+			registerRole(context, dm, choreo, conv, roleList, role, pinst);
+			
+			// Setup interfaces
+			for (int i=0; i < pinst.getRoleTypes().size(); i++) {
+				Contract contract=null;
+				
+				if (role.getAnnotations().containsKey(org.scribble.contract.model.Contract.class.getName())) {
+					contract = (Contract)role.getAnnotations().get(
+								org.scribble.contract.model.Contract.class.getName());
+				} else {
+					contract = new Contract();
+					
+					contract.setName(XMLUtils.getLocalname(pinst.getName()));
+					contract.setNamespace(CDLTypeUtil.getNamespace(pinst.getName(), pinst));
+					
+					// Setup namespace to prefix mappings
+					java.util.List<NameSpace> nspaces=pinst.getPackage().getTypeDefinitions().getNameSpaces();
+					
+					for (int j=0; j < nspaces.size(); j++) {
+						org.scribble.contract.model.Namespace ns=
+									new org.scribble.contract.model.Namespace();
+						
+						ns.setPrefix(nspaces.get(j).getPrefix());
+						ns.setURI(nspaces.get(j).getURI());
+						ns.setSchemaLocation(nspaces.get(j).getSchemaLocation());
+						
+						contract.getNamespaces().add(ns);
+					}
+					
+					role.getAnnotations().put(org.scribble.contract.model.Contract.class.getName(),
+												contract);
+				}
+				
+				setupInterfaces((org.pi4soa.cdl.RoleType)pinst.getRoleTypes().get(i),
+								contract, intfDeriver);
+			}
+		}
+
+		java.util.Iterator<ParticipantType> ptiter=partTypes.iterator();
+
+		if (choreo.getRoot() != Boolean.TRUE) {
+			roleList = null;
+		} else {
+			ptiter = choreo.getPackage().getTypeDefinitions().getParticipantTypes().iterator();
+		}
+	
+		while (ptiter.hasNext()) {
+			Role role=new Role();
+			ParticipantType ptype=ptiter.next();
+			role.setName(XMLUtils.getLocalname(ptype.getName()));
+			
+			if (roleList == null) {
+				roleList = new RoleList();
+				
+				roleList.setOpen(choreo.getRoot() != Boolean.TRUE);
+				
+				conv.getBlock().getContents().add(roleList);
+			}
+			
+			roleList.getRoles().add(role);
+			
+			context.setState(role.getName(), role);
+
+			if (choreo.getRoot() == Boolean.TRUE) {
+				registerRole(context, dm, choreo, conv, roleList, role, ptype);
+				
+				// Setup interfaces
+				for (int i=0; i < ptype.getRoleTypes().size(); i++) {
+					Contract contract=null;
+					
+					if (role.getAnnotations().containsKey(org.scribble.contract.model.Contract.class.getName())) {
+						contract = (Contract)role.getAnnotations().get(
+									org.scribble.contract.model.Contract.class.getName());
+					} else {
+						contract = new Contract();
+						
+						contract.setName(XMLUtils.getLocalname(ptype.getName()));
+						contract.setNamespace(CDLTypeUtil.getNamespace(ptype.getName(), ptype, true));
+						
+						// Setup namespace to prefix mappings
+						java.util.List<NameSpace> nspaces=ptype.getPackage().getTypeDefinitions().getNameSpaces();
+						
+						for (int j=0; j < nspaces.size(); j++) {
+							org.scribble.contract.model.Namespace ns=
+										new org.scribble.contract.model.Namespace();
+							
+							ns.setPrefix(nspaces.get(j).getPrefix());
+							ns.setURI(nspaces.get(j).getURI());
+							ns.setSchemaLocation(nspaces.get(j).getSchemaLocation());
+							
+							contract.getNamespaces().add(ns);
+						}
+						
+						role.getAnnotations().put(org.scribble.contract.model.Contract.class.getName(),
+													contract);
+					}
+
+					setupInterfaces((org.pi4soa.cdl.RoleType)ptype.getRoleTypes().get(i),
+									contract, intfDeriver);
+				}
+			}
+		}
+	}
+	
+	protected void setupInterfaces(org.pi4soa.cdl.RoleType roleType, Contract contract,
+					org.pi4soa.cdl.interfaces.InterfaceDeriver intfDeriver) {
+		
+		org.pi4soa.cdl.interfaces.RoleTypeDefinition rtd=
+						intfDeriver.getRoleTypeDefinition(roleType);
+				
+		InterfaceVisitorImpl iv=new InterfaceVisitorImpl(contract);
+		
+		rtd.visit(iv);
+	}
+	
+	protected void convertVariables(ConverterContext context,
+			Choreography choreo, Block block) {
+		
+		java.util.List<org.pi4soa.cdl.Variable> vars=
+					choreo.getVariableDefinitions();
+		
+		for (int i=0; i < vars.size(); i++) {
+			org.pi4soa.cdl.Variable var=(org.pi4soa.cdl.Variable)vars.get(i);
+			
+			if (var.getType() instanceof InformationType) {				
+				java.util.List<RoleType> roleTypes=var.getRoleTypes();
+				
+				if (roleTypes.size() == 0) {
+					roleTypes = choreo.getPackage().getTypeDefinitions().getRoleTypes();
+				}
+				
+				VariableList vlist=new VariableList();
+				TypeReference ref=new TypeReference();
+				
+				String qname=((InformationType)var.getType()).getElementName();
+				
+				if (NamesUtil.isSet(qname)==false) {
+					qname=((InformationType)var.getType()).getTypeName();
+				}
+				
+				ref.setNamespace(CDLTypeUtil.getNamespace(qname, var));
+				ref.setLocalpart(XMLUtils.getLocalname(qname));
+				
+				vlist.setType(ref);
+				
+				/* TODO: See if variables should be located?
+				for (int j=0; j < roleTypes.size(); j++) {
+					org.scribble.conversation.model.Variable newVar=
+						new org.scribble.conversation.model.Variable();
+					
+					newVar.setName(var.getName());
+				}
+				*/
+				
+				org.scribble.conversation.model.Variable newVar=
+					new org.scribble.conversation.model.Variable();
+				
+				newVar.setName(var.getName());
+				
+				vlist.getVariables().add(newVar);
+				
+				block.getContents().add(vlist);
+				
+			} else if (var.getType() instanceof ChannelType) {	
+				
+				// TODO: Only convert if channel is explicitly defined
+				
+
+			}
+		}
+	}
+	
+	protected void convertActivities(ConverterContext context,
+				java.util.List<org.pi4soa.cdl.Activity> acts, Block block) {
+		
+		java.util.Iterator<org.pi4soa.cdl.Activity> actiter=
+						acts.iterator();
+		
+		while (actiter.hasNext()) {
+			org.pi4soa.cdl.Activity act=actiter.next();
+			
+			ConverterRule rule=ConverterRuleFactory.getConverter(
+					org.scribble.model.Activity.class, act);
+			
+			if (rule != null) {
+				org.scribble.model.Activity activity=
+					(org.scribble.model.Activity)
+					rule.convert(context,
+							org.scribble.model.Activity.class, act);
+				
+				if (activity != null) {
+					
+					if (activity instanceof Block) {
+						block.getContents().addAll(((Block)activity).getContents());
+					} else {
+						block.getContents().add(activity);
+					}
+				}
+			}
+		}
+	}
+	
+	protected void convertIdentities(ConverterContext context,
+					Choreography choreo, Conversation conv) {
+		
+		// Define identities
+		java.util.List<org.pi4soa.cdl.Variable> vars=
+					choreo.getVariableDefinitions();
+		java.util.List<org.scribble.conversation.model.Identity> ids=
+			new java.util.Vector<org.scribble.conversation.model.Identity>();
+
+		for (int i=0; i < vars.size(); i++) {
+			if (vars.get(i).getType() instanceof org.pi4soa.cdl.ChannelType) {
+				org.pi4soa.cdl.ChannelType ctype=
+						(org.pi4soa.cdl.ChannelType)vars.get(i).getType();
+				
+				java.util.Iterator<org.pi4soa.cdl.Identity> cids=
+						ctype.getIdentities().iterator();
+				
+				while (cids.hasNext()) {
+					org.pi4soa.cdl.Identity cid=cids.next();
+					org.scribble.conversation.model.Identity id=
+						new org.scribble.conversation.model.Identity();
+					
+					if (cid.getType() == KeyType.ASSOCIATION) {
+						id.setIdentityType(IdentityType.Association);
+					} else if (cid.getType() == KeyType.DERIVED) {
+						id.setIdentityType(IdentityType.Derived);
+					} else {
+						id.setIdentityType(IdentityType.Primary);
+					}
+					
+					for (int j=0; j < cid.getTokens().size(); j++) {
+						id.getNames().add(cid.getTokens().get(j).getName());
+					}
+					
+					if (ids.contains(id) == false) {
+						ids.add(id);
+					}
+				}
+			}
+		}
+		
+		conv.getIdentities().addAll(ids);		
+	}
+	
+	private void registerRole(ConverterContext context,
+			org.scribble.model.admin.DependencyManager dm,
+			Choreography choreo,
+			Conversation conv, RoleList roleList,
+				Role role, CDLType cdlType) {
+		
+		if (dm != null && cdlType.getSemanticAnnotations().size() > 0) {
+			java.util.Iterator<SemanticAnnotation> iter=
+					cdlType.getSemanticAnnotations().iterator();
+			
+			while (iter.hasNext()) {
+				SemanticAnnotation annotation=iter.next();
+				
+				if (annotation.getName() != null &&
+						annotation.getName().equals(CONVERSATION_TYPE)) {
+					String convType=annotation.getAnnotation();
+					
+					if (convType != null) {
+						int index=convType.indexOf('@');
+					
+						if (index != -1) {
+							ConformanceReference ref=
+								new ConformanceReference(ConversationNotation.NOTATION_CODE);
+						
+							ref.setLocatedRole(convType.substring(index+1));
+							
+							String mainpart=convType.substring(0, index);
+							
+							index = mainpart.lastIndexOf(".");
+							
+							String namespace="";
+							String localpart=mainpart;
+							
+							if (index != -1) {
+								namespace=mainpart.substring(0, index);								
+								localpart=mainpart.substring(index+1);
+							}
+							
+							String[] elems=localpart.split("\\$");
+							if (elems.length > 1) {
+								localpart = elems[0];
+								
+								for (int i=1; i < elems.length; i++) {
+									ref.getSubDefinitionPath().addPathElement(elems[i]);
+								}
+							}
+							
+							ref.setNamespace(namespace);
+							ref.setLocalpart(localpart);
+							
+							ref.setFullyQualified(true);
+							
+							conv.getConformsTo().add(ref);
+							
+							ModelReference sref=context.getSource();
+							
+							// If not the root choreography, then
+							// identify the sub definition path
+							// in the source reference
+							if (choreo.getRoot() != Boolean.TRUE) {
+								sref = new ModelReference(sref);
+								Choreography sub=choreo;
+								
+								while (sub != null && sub.getRoot() != Boolean.TRUE) {
+									sref.getSubDefinitionPath().addPathElement(0, sub.getName());
+									
+									sub = sub.getParent().getEnclosingChoreography();
+								}
+							}
+							
+							// Establish 'conforms to' dependency
+							// between source (which could be a
+							// sub definition) and the identified
+							// conversation type
+							
+							dm.recordDependency(sref, ref,
+									DependencyType.ConformsTo);
+
+						} else {
+							logger.warning("Conversation type '"+
+									convType+"' does not " +
+									"contain '@' located role separator");
+						}
+					}
+					
+				}
+			}
+		}
+	}
+
+	private static Logger logger = Logger.getLogger("org.pi4soa.scribble.cdm.parser.rules");
+	
+	public static class InterfaceVisitorImpl implements InterfaceVisitor,
+							java.io.Serializable {
+		
+		private static final long serialVersionUID = 4068744630125720449L;
+		
+		private org.scribble.contract.model.Contract m_contract=null;
+		private org.scribble.contract.model.Interface m_currentInterface=null;
+		private org.scribble.contract.model.MessageExchangePattern m_currentMEP=null;
+
+		public InterfaceVisitorImpl(Contract contract) {
+			m_contract = contract;
+		}
+		
+		public Contract getContract() {
+			return(m_contract);
+		}
+		
+		public void interfaceEnd(InterfaceDefinition defn) {
+			m_currentInterface = null;
+		}
+
+		public void interfaceStart(InterfaceDefinition defn) {
+			m_currentInterface = new org.scribble.contract.model.Interface();
+			
+			m_currentInterface.setNamespace(defn.getNamespace());
+
+			if (defn.getInterfaceName() != null &&
+					defn.getInterfaceName().trim().length() > 0) {
+				m_currentInterface.setName(defn.getInterfaceName());
+			} else {
+				m_currentInterface.setName(defn.getBehaviorName());
+			}
+			
+			m_contract.getInterfaces().add(m_currentInterface);
+		}
+
+		public void message(MessageDefinition defn) {
+			
+			if (defn.getClassification() == MessageDefinition.INPUT) {
+				m_currentMEP.getTypes().add(createTypeReference(defn));
+				
+			} else if (m_currentMEP instanceof RequestResponseMEP) {
+				RequestResponseMEP mep=(RequestResponseMEP)m_currentMEP;
+				
+				if (defn.getClassification() == MessageDefinition.OUTPUT) {
+					mep.getResponseTypes().add(createTypeReference(defn));
+					
+				} else if (defn.getClassification() == MessageDefinition.OUTFAULT) {
+					FaultDetails fault=new FaultDetails();
+					
+					fault.setName(defn.getFaultName());
+					fault.setNamespace(defn.getFaultNamespace());
+					
+					fault.getTypes().add(createTypeReference(defn));
+					
+					mep.getFaultDetails().add(fault);
+				}
+			}
+		}
+		
+		protected TypeReference createTypeReference(MessageDefinition defn) {
+			TypeReference ret=new TypeReference();
+			
+			if (defn.getElement() != null && defn.getElement().trim().length() > 0) {
+				ret.setLocalpart(defn.getElement());
+				
+				if (defn.getElementNamespace() != null) {
+					ret.setNamespace(defn.getElementNamespace());
+				}
+			} else if (defn.getType() != null && defn.getType().trim().length() > 0) {
+				ret.setLocalpart(defn.getType());
+				
+				if (defn.getTypeNamespace() != null) {
+					ret.setNamespace(defn.getTypeNamespace());
+				}
+			}
+			
+			return(ret);
+		}
+
+		public void operationEnd(OperationDefinition defn) {
+			m_currentMEP = null;
+		}
+
+		public void operationStart(OperationDefinition defn) {
+			if (defn.getMessages().size() == 1 &&
+					((MessageDefinition)defn.getMessages().get(0)).getClassification()
+							== MessageDefinition.INPUT) {
+				m_currentMEP = new OneWayRequestMEP();
+			} else {
+				m_currentMEP = new RequestResponseMEP();
+			}
+			
+			m_currentMEP.setOperation(defn.getOperationName());
+			
+			m_currentInterface.getMessageExchangePatterns().add(m_currentMEP);
+		}
+
+		public void roleTypeEnd(RoleTypeDefinition defn) {
+			// TODO Auto-generated method stub
+			
+		}
+
+		public void roleTypeStart(RoleTypeDefinition defn) {
+			// TODO Auto-generated method stub
+			
+		}	
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/src/java/org/scribble/pi4soa/cdm/parser/rules/ConversationInteractionConverterRuleImpl.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/src/java/org/scribble/pi4soa/cdm/parser/rules/ConversationInteractionConverterRuleImpl.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/src/java/org/scribble/pi4soa/cdm/parser/rules/ConversationInteractionConverterRuleImpl.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,625 @@
+/*
+ * Copyright 2005-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 6 Jun 2008 : Initial version created by gary
+ */
+package org.scribble.pi4soa.cdm.parser.rules;
+
+import java.util.logging.Logger;
+
+import org.pi4soa.cdl.*;
+import org.scribble.model.*;
+import org.scribble.conversation.model.*;
+import org.scribble.expression.xpath.model.XPathExpression;
+import org.pi4soa.cdl.util.*;
+import org.pi4soa.common.util.NamesUtil;
+import org.pi4soa.common.xml.XMLUtils;
+
+public class ConversationInteractionConverterRuleImpl implements ConverterRule {
+
+	private static final String FAULT_NAME = "faultName";
+	private static final String MESSAGE_TYPE_LOCALPART = "messageTypeLocalPart";
+	private static final String MESSAGE_TYPE_NAMESPACE = "messageTypeNameSpace";
+
+	/**
+	 * This method determines whether the rule can be applied
+	 * to the supplied CDL type.
+	 * 
+	 * @param scribbleType The Scribble target type
+	 * @param cdlType The CDL type
+	 * @return Whether the rule is appropriate to convert
+	 * 					the CDL type
+	 */
+	public boolean isSupported(Class<?> scribbleType,
+						CDLType cdlType) {
+		return(scribbleType == org.scribble.model.Activity.class &&
+				cdlType instanceof org.pi4soa.cdl.Interaction);
+	}
+	
+	/**
+	 * This method converts the supplied CDL type into a
+	 * Scribble model object.
+	 * 
+	 * @param context The converters context
+	 * @param scribbleType The Scribble target type
+	 * @param cdlType The CDL type to be converted
+	 * @return The converted Scribble model object
+	 */
+	public ModelObject convert(ConverterContext context,
+			Class<?> scribbleType, CDLType cdlType) {
+		org.scribble.model.Block ret=new org.scribble.model.Block();
+		org.pi4soa.cdl.Interaction cdl=
+				(org.pi4soa.cdl.Interaction)cdlType;
+		Role fromRole=null;
+		Role toRole=null;
+		
+		if (cdl.getFromParticipant() != null) {
+			fromRole = (Role)
+				context.getState(XMLUtils.getLocalname(cdl.getFromParticipant().getName()));
+			
+			if (fromRole == null) {
+				logger.severe("Failed to get 'from' role '"+XMLUtils.getLocalname(cdl.getFromParticipant().getName())+"'");
+			}
+		} else if (cdl.getFromRoleType() != null) {			
+			ParticipantType ptype=
+				PackageUtil.getParticipantForRoleType(cdl.getFromRoleType());
+			
+			fromRole = (Role)
+				context.getState(XMLUtils.getLocalname(ptype.getName()));
+			
+			if (fromRole == null) {
+				logger.severe("Failed to get 'from' role '"+XMLUtils.getLocalname(ptype.getName())+"'");
+			}
+		}
+		
+		if (cdl.getToParticipant() != null) {
+			toRole = (Role)
+				context.getState(XMLUtils.getLocalname(cdl.getToParticipant().getName()));
+
+			if (toRole == null) {
+				logger.severe("Failed to get 'to' role '"+XMLUtils.getLocalname(cdl.getFromParticipant().getName())+"'");
+			}
+		} else if (cdl.getToRoleType() != null) {
+			ParticipantType ptype=
+				PackageUtil.getParticipantForRoleType(cdl.getToRoleType());
+			
+			toRole = (Role)
+				context.getState(XMLUtils.getLocalname(ptype.getName()));
+			
+			if (toRole == null) {
+				logger.severe("Failed to get 'to' role '"+XMLUtils.getLocalname(ptype.getName())+"'");
+			}
+		}
+		
+		// Determine if interaction may result in
+		// a timeout
+		Block block=ret;
+		
+		if (NamesUtil.isSet(cdl.getTimeToComplete())) {
+			TryEscape te=new TryEscape();
+			
+			ret.getContents().add(te);
+			
+			block = te.getBlock();
+			
+			InterruptBlock interrupt=new InterruptBlock();
+			
+			te.getEscapeBlocks().add(interrupt);
+			
+			// Set expression from 'time to complete'
+			// using xpath
+			XPathExpression exp=new XPathExpression();
+			
+			exp.setQuery("cdl:hasDurationPassed('"+
+					cdl.getTimeToComplete()+"')");
+			
+			interrupt.setExpression(exp);
+			
+			// Perform assignments associated with timeout
+			for (int i=0; i < cdl.getRecordDetails().size(); i++) {
+				org.pi4soa.cdl.RecordDetails rd=
+							cdl.getRecordDetails().get(i);
+				
+				if (rd.getWhen() == WhenType.TIMEOUT) {
+					
+					// TODO: Record variable - but which role??? May need to
+					// be part of the following conditions, so depends on
+					// whether the record details are in the from/to timeout record details
+				
+					if (cdl.getTimeoutFromRoleTypeRecordDetails().contains(rd)) {
+						
+						if (rd.getCauseException() != null &&
+								rd.getCauseException().trim().length() > 0) {
+							Raise raise=new Raise();
+							raise.getRoles().add(new Role(fromRole.getName()));
+							
+							TypeReference tref=new TypeReference();
+							tref.setLocalpart(XMLUtils.getLocalname(rd.getCauseException()));
+							raise.setType(tref);
+							
+							interrupt.getContents().add(raise);
+						}
+					}
+					
+					if (cdl.getTimeoutToRoleTypeRecordDetails().contains(rd)) {
+						
+						if (rd.getCauseException() != null &&
+								rd.getCauseException().trim().length() > 0) {
+							Raise raise=new Raise();
+							raise.getRoles().add(new Role(toRole.getName()));
+							
+							TypeReference tref=new TypeReference();
+							tref.setLocalpart(XMLUtils.getLocalname(rd.getCauseException()));
+							raise.setType(tref);
+							
+							interrupt.getContents().add(raise);
+						}
+					}
+				}
+			}
+		}
+		
+		java.util.Iterator<ExchangeDetails> iter=
+					cdl.getExchangeDetails().iterator();
+		java.util.List<ConditionalBlock> cbs=
+					new java.util.Vector<ConditionalBlock>();
+				
+		while (iter.hasNext()) {
+			ExchangeDetails details=iter.next();
+			ConditionalBlock cb=new ConditionalBlock();
+			
+			// Convert 'before' send and receive record details
+			for (int i=0; i < details.getSendRecordDetails().size(); i++) {
+				RecordDetails rd=details.getSendRecordDetails().get(i);
+				
+				if (rd.getWhen() == WhenType.BEFORE) {
+					String fromRoleName=(details.getAction() == ExchangeActionType.REQUEST?
+							fromRole.getName():toRole.getName());
+					
+					// Define record expression
+					Assignment assign=new Assignment();
+					
+					assign.getSource().setComponentURI(
+							CDLTypeUtil.getURIFragment(rd));
+					
+					// Set role
+					Role role=new Role(fromRoleName);
+					
+					assign.getRoles().add(role);
+					
+					// Set variable
+					org.scribble.conversation.model.Variable var=
+							new org.scribble.conversation.model.Variable();
+					var.setName(rd.getTargetVariable().getName());
+					
+					assign.setVariable(var);
+					
+					org.scribble.expression.xpath.model.XPathExpression expr=
+						new org.scribble.expression.xpath.model.XPathExpression();
+					
+					if (rd.getSourceExpression() != null) {
+						expr.setQuery(rd.getSourceExpression());
+					} else if (rd.getSourceVariable() != null) {
+						expr.setQuery("cdl:getVariable('"+rd.getSourceVariable().getName()+"','','')");
+					}
+					
+					assign.setExpression(expr);
+					
+					cb.getContents().add(assign);
+										
+					// Check for cause exception
+					if (rd.getCauseException() != null &&
+							rd.getCauseException().trim().length() > 0) {
+						
+						Raise raise=new Raise();
+						raise.getRoles().add(new Role(fromRoleName));
+						
+						TypeReference tref=new TypeReference();
+						tref.setLocalpart(XMLUtils.getLocalname(rd.getCauseException()));
+						raise.setType(tref);
+						
+						cb.getContents().add(raise);
+					}
+				}
+			}
+			
+			for (int i=0; i < details.getReceiveRecordDetails().size(); i++) {
+				RecordDetails rd=details.getReceiveRecordDetails().get(i);
+				
+				if (rd.getWhen() == WhenType.BEFORE) {
+					String toRoleName=(details.getAction() == ExchangeActionType.REQUEST?
+							toRole.getName():fromRole.getName());
+					
+					// Define record expression
+					Assignment assign=new Assignment();
+					
+					assign.getSource().setComponentURI(
+							CDLTypeUtil.getURIFragment(rd));
+					
+					// Set role
+					Role role=new Role(toRoleName);
+					
+					assign.getRoles().add(role);
+					
+					// Set variable
+					org.scribble.conversation.model.Variable var=
+							new org.scribble.conversation.model.Variable();
+					var.setName(rd.getTargetVariable().getName());
+					
+					assign.setVariable(var);
+					
+					org.scribble.expression.xpath.model.XPathExpression expr=
+						new org.scribble.expression.xpath.model.XPathExpression();
+					
+					if (rd.getSourceExpression() != null) {
+						expr.setQuery(rd.getSourceExpression());
+					} else if (rd.getSourceVariable() != null) {
+						expr.setQuery("cdl:getVariable('"+rd.getSourceVariable().getName()+"','','')");
+					}
+					
+					assign.setExpression(expr);
+					
+					cb.getContents().add(assign);
+										
+					// Check for cause exception
+					if (rd.getCauseException() != null &&
+							rd.getCauseException().trim().length() > 0) {
+						
+						Raise raise=new Raise();
+						raise.getRoles().add(new Role(toRoleName));
+						
+						TypeReference tref=new TypeReference();
+						tref.setLocalpart(XMLUtils.getLocalname(rd.getCauseException()));
+						raise.setType(tref);
+						
+						cb.getContents().add(raise);
+					}
+				}
+			}
+
+			// Convert the interaction
+			ConversationInteraction interaction=
+					new ConversationInteraction();
+			
+			interaction.getSource().setComponentURI(
+						CDLTypeUtil.getURIFragment(details));
+			
+			// Check if interaction's channel has been explicitly defined
+			Object ch=context.getState(cdl.getChannelVariable().getName());
+			
+			if (ch instanceof Channel) {
+				interaction.setChannel((Channel)ch);
+			}
+			
+			// Define message signature
+			MessageSignature ms=new MessageSignature();
+			ms.setOperation(cdl.getOperation());
+			
+			if (NamesUtil.isSet(details.getFaultName())) {
+				ms.getAnnotations().put(FAULT_NAME,
+						details.getFaultName());
+			}
+
+			interaction.setMessageSignature(ms);
+			
+			// Define interaction message type
+			if (details.getType() instanceof InformationType) {
+				InformationType itype=(InformationType)details.getType();
+				
+				TypeReference ref=ConverterUtil.getTypeReference(itype);
+				
+				ms.getTypes().add(ref);
+				
+				if (NamesUtil.isSet(itype.getTypeName())) {
+					String ns=CDLTypeUtil.getNamespace(itype.getTypeName(),
+									cdl);
+					String lp=XMLUtils.getLocalname(itype.getTypeName());
+					
+					if (lp != null) {
+						ms.getAnnotations().put(MESSAGE_TYPE_LOCALPART,
+										lp);
+					}
+					if (ns != null) {
+						ms.getAnnotations().put(MESSAGE_TYPE_NAMESPACE,
+										ns);
+					}
+				} else if (NamesUtil.isSet(itype.getElementName())) {
+					String ns=CDLTypeUtil.getNamespace(itype.getElementName(),
+							cdl);
+					String lp=XMLUtils.getLocalname(itype.getElementName());
+			
+					if (lp != null) {
+						ms.getAnnotations().put(MESSAGE_TYPE_LOCALPART,
+										lp);
+					}
+					if (ns != null) {
+						ms.getAnnotations().put(MESSAGE_TYPE_NAMESPACE,
+										ns);
+					}
+				}
+			}
+			
+			cb.getContents().add(interaction);
+
+			if (details.getAction() == ExchangeActionType.REQUEST) {
+				interaction.setFromRole(fromRole);
+				interaction.setToRole(toRole);
+				
+				if (details.getSendVariable() != null) {
+					org.scribble.conversation.model.Variable var=
+							new org.scribble.conversation.model.Variable();
+					var.setName(details.getSendVariable().getName());
+					interaction.setFromVariable(var);
+				}
+				
+				if (details.getReceiveVariable() != null) {
+					org.scribble.conversation.model.Variable var=
+							new org.scribble.conversation.model.Variable();
+					var.setName(details.getReceiveVariable().getName());
+					interaction.setToVariable(var);
+				}
+				
+				// Check if request has response/fault exchanges
+				java.util.List<ExchangeDetails> resps=
+						InteractionUtil.getResponseExchangeDetails(details);
+				
+				if (resps != null && resps.size() > 0) {
+					interaction.setRequestLabel(getLabel(details));
+				}
+				
+				// Check if fault thrown
+				if (details.getSendCauseException() != null &&
+						details.getSendCauseException().trim().length() > 0) {
+					Raise raise=new Raise();
+					raise.getRoles().add(new Role(fromRole.getName()));
+					
+					TypeReference tref=new TypeReference();
+					tref.setLocalpart(XMLUtils.getLocalname(details.getSendCauseException()));
+					raise.setType(tref);
+					
+					cb.getContents().add(raise);
+				}
+				
+				if (details.getReceiveCauseException() != null &&
+						details.getReceiveCauseException().trim().length() > 0) {
+					Raise raise=new Raise();
+					raise.getRoles().add(new Role(toRole.getName()));
+					
+					TypeReference tref=new TypeReference();
+					tref.setLocalpart(XMLUtils.getLocalname(details.getReceiveCauseException()));
+					raise.setType(tref);
+					
+					cb.getContents().add(raise);
+				}
+			} else {
+				interaction.setFromRole(toRole);
+				interaction.setToRole(fromRole);
+				
+				if (details.getReceiveVariable() != null) {
+					org.scribble.conversation.model.Variable var=
+							new org.scribble.conversation.model.Variable();
+					var.setName(details.getReceiveVariable().getName());
+					interaction.setFromVariable(var);
+				}
+				
+				if (details.getSendVariable() != null) {
+					org.scribble.conversation.model.Variable var=
+							new org.scribble.conversation.model.Variable();
+					var.setName(details.getSendVariable().getName());
+					interaction.setToVariable(var);
+				}
+				
+				if (details.getAction() == ExchangeActionType.RESPOND) {
+					interaction.setReplyToLabel(getLabel(details));
+				}
+
+				// Check if fault thrown
+				if (details.getSendCauseException() != null &&
+						details.getSendCauseException().trim().length() > 0) {
+					Raise raise=new Raise();
+					raise.getRoles().add(new Role(toRole.getName()));
+					
+					TypeReference tref=new TypeReference();
+					tref.setLocalpart(XMLUtils.getLocalname(details.getSendCauseException()));
+					raise.setType(tref);
+					
+					cb.getContents().add(raise);
+				}
+				
+				if (details.getReceiveCauseException() != null &&
+						details.getReceiveCauseException().trim().length() > 0) {
+					Raise raise=new Raise();
+					raise.getRoles().add(new Role(fromRole.getName()));
+					
+					TypeReference tref=new TypeReference();
+					tref.setLocalpart(XMLUtils.getLocalname(details.getReceiveCauseException()));
+					raise.setType(tref);
+					
+					cb.getContents().add(raise);
+				}
+			}
+			
+			// Convert 'after' send and receive record details
+			for (int i=0; i < details.getSendRecordDetails().size(); i++) {
+				RecordDetails rd=details.getSendRecordDetails().get(i);
+				
+				if (rd.getWhen() == WhenType.AFTER) {
+					String fromRoleName=(details.getAction() == ExchangeActionType.REQUEST?
+							fromRole.getName():toRole.getName());
+					
+					// Define record expression
+					Assignment assign=new Assignment();
+					
+					assign.getSource().setComponentURI(
+							CDLTypeUtil.getURIFragment(rd));
+					
+					// Set role
+					Role role=new Role(fromRoleName);
+					
+					assign.getRoles().add(role);
+					
+					// Set variable
+					org.scribble.conversation.model.Variable var=
+							new org.scribble.conversation.model.Variable();
+					var.setName(rd.getTargetVariable().getName());
+					
+					assign.setVariable(var);
+					
+					org.scribble.expression.xpath.model.XPathExpression expr=
+						new org.scribble.expression.xpath.model.XPathExpression();
+					
+					if (rd.getSourceExpression() != null) {
+						expr.setQuery(rd.getSourceExpression());
+					} else if (rd.getSourceVariable() != null) {
+						expr.setQuery("cdl:getVariable('"+rd.getSourceVariable().getName()+"','','')");
+					}
+					
+					assign.setExpression(expr);
+					
+					cb.getContents().add(assign);
+										
+					// Check for cause exception
+					if (rd.getCauseException() != null &&
+							rd.getCauseException().trim().length() > 0) {
+						
+						Raise raise=new Raise();
+						raise.getRoles().add(new Role(fromRoleName));
+						
+						TypeReference tref=new TypeReference();
+						tref.setLocalpart(XMLUtils.getLocalname(rd.getCauseException()));
+						raise.setType(tref);
+						
+						cb.getContents().add(raise);
+					}
+				}
+			}
+			
+			for (int i=0; i < details.getReceiveRecordDetails().size(); i++) {
+				RecordDetails rd=details.getReceiveRecordDetails().get(i);
+				
+				if (rd.getWhen() == WhenType.AFTER) {
+					String toRoleName=(details.getAction() == ExchangeActionType.REQUEST?
+							toRole.getName():fromRole.getName());
+					
+					// Define record expression
+					Assignment assign=new Assignment();
+					
+					assign.getSource().setComponentURI(
+							CDLTypeUtil.getURIFragment(rd));
+					
+					// Set role
+					Role role=new Role(toRoleName);
+					
+					assign.getRoles().add(role);
+					
+					// Set variable
+					org.scribble.conversation.model.Variable var=
+							new org.scribble.conversation.model.Variable();
+					var.setName(rd.getTargetVariable().getName());
+					
+					assign.setVariable(var);
+					
+					// If target variable is a channel, then make explicit
+					if (rd.getTargetVariable().getType() instanceof ChannelType) {
+						Object state=context.getState(rd.getTargetVariable().getName());
+						
+						if (state == null) {
+							Channel newch=new Channel();
+							newch.setName(rd.getTargetVariable().getName());
+							
+							context.setState(newch.getName(), newch);
+							
+							//
+						}
+					}
+					
+					// Convert source expression
+					org.scribble.expression.xpath.model.XPathExpression expr=
+						new org.scribble.expression.xpath.model.XPathExpression();
+					
+					if (rd.getSourceExpression() != null) {
+						expr.setQuery(rd.getSourceExpression());
+					} else if (rd.getSourceVariable() != null) {
+						expr.setQuery("cdl:getVariable('"+rd.getSourceVariable().getName()+"','','')");
+					}
+					
+					assign.setExpression(expr);
+					
+					cb.getContents().add(assign);
+					
+					// Check for cause exception
+					if (rd.getCauseException() != null &&
+							rd.getCauseException().trim().length() > 0) {
+						
+						Raise raise=new Raise();
+						raise.getRoles().add(new Role(toRoleName));
+						
+						TypeReference tref=new TypeReference();
+						tref.setLocalpart(XMLUtils.getLocalname(rd.getCauseException()));
+						raise.setType(tref);
+						
+						cb.getContents().add(raise);
+					}
+				}
+			}
+
+			cbs.add(cb);
+		}
+		
+		if (cbs.size() > 2) {
+			block.getContents().addAll(cbs.remove(0).getContents());
+			
+			If choice=new If();
+			
+			choice.getRoles().add(new Role(toRole.getName()));
+			
+			for (int i=0; i < cbs.size(); i++) {
+				ConditionalBlock cb=cbs.get(i);
+				
+				choice.getConditionalBlocks().add(cb);
+			}
+			
+			block.getContents().add(choice);			
+		} else {
+			for (int i=0; i < cbs.size(); i++) {
+				ConditionalBlock cb=cbs.get(i);
+				block.getContents().addAll(cb.getContents());
+			}
+		}
+
+		return(ret);
+	}
+	
+	/**
+	 * This method creates a label appropriate for the request
+	 * response correlation associated with the supplied exchange.
+	 * 
+	 * @param details The exchange
+	 * @return The label
+	 */
+	protected String getLabel(ExchangeDetails details) {
+		String ret=null;
+		
+		if (details.getInteraction() != null) {
+			ret = details.getInteraction().getOperation();
+		}
+		
+		return(ret);
+	}
+	
+	private static Logger logger = Logger.getLogger("org.pi4soa.scribble.cdm.parser.rules");
+}

Added: tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/src/java/org/scribble/pi4soa/cdm/parser/rules/ConversationModelConverterRuleImpl.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/src/java/org/scribble/pi4soa/cdm/parser/rules/ConversationModelConverterRuleImpl.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/src/java/org/scribble/pi4soa/cdm/parser/rules/ConversationModelConverterRuleImpl.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,177 @@
+/*
+ * Copyright 2005-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 31 Jul 2008 : Initial version created by gary
+ */
+package org.scribble.pi4soa.cdm.parser.rules;
+
+import java.util.logging.Logger;
+
+import org.pi4soa.cdl.*;
+import org.pi4soa.cdl.util.CDLTypeUtil;
+import org.scribble.model.*;
+import org.scribble.conversation.model.*;
+
+public class ConversationModelConverterRuleImpl implements ConverterRule {
+
+	/**
+	 * This method determines whether the rule can be applied
+	 * to the supplied CDL type.
+	 * 
+	 * @param scribbleType The Scribble target type
+	 * @param cdlType The CDL type
+	 * @return Whether the rule is appropriate to convert
+	 * 					the CDL type
+	 */
+	public boolean isSupported(Class<?> scribbleType,
+						CDLType cdlType) {
+		return(scribbleType == ConversationModel.class &&
+				cdlType instanceof org.pi4soa.cdl.Package);
+	}
+	
+	/**
+	 * This method converts the supplied CDL type into a
+	 * Scribble model object.
+	 * 
+	 * @param context The converters context
+	 * @param scribbleType The Scribble target type
+	 * @param cdlType The CDL type to be converted
+	 * @return The converted Scribble model object
+	 */
+	public ModelObject convert(ConverterContext context,
+			Class<?> scribbleType, CDLType cdlType) {
+		ConversationModel ret=new ConversationModel();
+		org.pi4soa.cdl.Package cdlpack=(org.pi4soa.cdl.Package)cdlType;
+		
+		ret.getSource().setComponentURI(
+				CDLTypeUtil.getURIFragment(cdlpack));
+			
+		ret.setNamespace(getNamespace(cdlpack));
+		
+		// Convert token locators
+		java.util.Iterator<TokenLocator> locators=
+				cdlpack.getTypeDefinitions().getTokenLocators().iterator();
+		
+		while (locators.hasNext()) {
+			TokenLocator locator=locators.next();
+			
+			IdentityLocator idLocator=new IdentityLocator();
+			idLocator.setLocator(locator.getToken().getName(),
+						locator.getQuery());
+			
+			TypeReference typeRef=ConverterUtil.getTypeReference(locator.getInformationType());
+			idLocator.setType(typeRef);
+			
+			ret.getIdentityLocators().add(idLocator);
+		}
+		
+		// Convert root choreography
+		java.util.Iterator<org.pi4soa.cdl.Choreography> iter=
+					cdlpack.getChoreographies().iterator();
+		org.pi4soa.cdl.Choreography choreo=null;
+	
+		while (choreo == null && iter.hasNext()) {
+			choreo = iter.next();
+			
+			if (choreo.getRoot() != Boolean.TRUE) {
+				choreo = null;
+			}
+		}
+			
+		ConverterRule rule=ConverterRuleFactory.getConverter(Conversation.class,
+					choreo);
+		
+		if (rule != null) {
+			ret.setConversation((Conversation)rule.convert(context,
+					Conversation.class, choreo));
+		} else {
+			logger.severe("Failed to find conversation conversion rule");
+		}
+		
+		// Clear the inner definition for any Compose activities
+		// The inner definitions are temporarily established to
+		// help internal analysis, e.g. to determine initiator
+		// roles
+		for (int i=0; i < context.getComposeActivities().size(); i++) {
+			// Save parent
+			Definition defn=context.getComposeActivities().get(i).getInlineDefinition();
+			ModelObject parent=defn.getParent();
+			
+			context.getComposeActivities().get(i).setInlineDefinition(null);
+			
+			// Re-establish parent
+			defn.setParent(parent);
+		}
+		
+		return(ret);
+	}
+
+
+	/**
+	 * This method generates a namespace associated with
+	 * the supplied CDL package.
+	 * 
+	 * @param cdlpack The choreography package
+	 * @return The namespace
+	 */
+	protected static org.scribble.model.Namespace getNamespace(
+							org.pi4soa.cdl.Package cdlpack) {
+		org.scribble.model.Namespace ret=new org.scribble.model.Namespace();
+		
+		String ns=cdlpack.getTargetNamespace()+"/"+cdlpack.getName();
+		
+		if (ns.startsWith("http://")) {
+			ns = ns.substring(7);
+		}
+		
+		if (ns.startsWith("www.")) {
+			ns = ns.substring(4);
+		}
+		
+		java.util.StringTokenizer st=new java.util.StringTokenizer(ns, "/");
+		boolean f_first=true;
+		String namespace=null;
+		
+		while (st.hasMoreTokens()) {
+			String token=st.nextToken();
+			
+			if (f_first) {
+				java.util.StringTokenizer innerst=
+						new java.util.StringTokenizer(token, ".");
+				while (innerst.hasMoreTokens()) {
+					if (namespace == null) {
+						namespace = innerst.nextToken();
+					} else {
+						namespace = innerst.nextToken()+"."+namespace;
+					}
+				}
+				
+				f_first = false;
+			} else {
+				namespace += "."+token;
+			}
+		}
+		
+		if (namespace != null) {
+			ret.setName(namespace.toLowerCase());
+		}
+		
+		return(ret);
+	}
+
+	private static Logger logger = Logger.getLogger("org.pi4soa.scribble.cdm.parser.rules");
+}

Added: tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/src/java/org/scribble/pi4soa/cdm/parser/rules/ConverterContext.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/src/java/org/scribble/pi4soa/cdm/parser/rules/ConverterContext.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/src/java/org/scribble/pi4soa/cdm/parser/rules/ConverterContext.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,113 @@
+/*
+ * Copyright 2005-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 6 Jun 2008 : Initial version created by gary
+ */
+package org.scribble.pi4soa.cdm.parser.rules;
+
+import org.scribble.model.*;
+import org.scribble.conversation.model.*;
+
+public interface ConverterContext {
+
+	/**
+	 * This method returns the source model reference.
+	 * 
+	 * @return The source model reference
+	 */
+	public ModelReference getSource();
+	
+	/**
+	 * This method returns the declaration associated
+	 * with the supplied name.
+	 * 
+	 * @param name The name
+	 * @return The declaration, or null if not found
+	 */
+	public Object getState(String name);
+	
+	/**
+	 * This method sets the declaration associated with
+	 * the supplied name.
+	 * 
+	 * @param name The name
+	 * @param decl The declaration
+	 */
+	public void setState(String name, Object decl);
+	
+	/**
+	 * This method pushes the scope, to clear the current
+	 * state associated with a parent scope.
+	 */
+	public void pushScope();
+	
+	/**
+	 * This method pops the scope associated with a parent
+	 * conversation.
+	 * 
+	 */
+	public void popScope();
+	
+	/**
+	 * This method pushes the current state onto a stack,
+	 * to create a local scope where further roles or
+	 * variables may be declared.
+	 */
+	public void pushState();
+	
+	/**
+	 * This method pops a previous state from the stack
+	 * to clear any local declarations made within a
+	 * local scope as part of a conversation definition.
+	 */
+	public void popState();
+	
+	/**
+	 * This method adds a conversation to the context,
+	 * for use when processing activities within its
+	 * scope.
+	 * 
+	 * @param conv The conversation
+	 */
+	public void addConversation(Conversation conv);
+	
+	/**
+	 * This method removes the conversation from the
+	 * context.
+	 * 
+	 * @param conv The conversation
+	 */
+	public void removeConversation(Conversation conv);
+	
+	/**
+	 * This method retrieves the conversation associated
+	 * with the supplied model reference.
+	 * 
+	 * @param ref The model reference
+	 * @return The conversation
+	 */
+	public Conversation getConversation(ModelReference ref);
+
+	/**
+	 * This method returns the list of Compose activities
+	 * within the model.
+	 * 
+	 * @return The list of compose activities
+	 */
+	public java.util.List<Compose> getComposeActivities();
+	
+}

Added: tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/src/java/org/scribble/pi4soa/cdm/parser/rules/ConverterRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/src/java/org/scribble/pi4soa/cdm/parser/rules/ConverterRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/src/java/org/scribble/pi4soa/cdm/parser/rules/ConverterRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,52 @@
+/*
+ * Copyright 2005-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 6 Jun 2008 : Initial version created by gary
+ */
+package org.scribble.pi4soa.cdm.parser.rules;
+
+/**
+ * This interface represents a CDM to Scribble conversation
+ * rule.
+ */
+public interface ConverterRule {
+
+	/**
+	 * This method determines whether the rule can be applied
+	 * to the supplied CDL type.
+	 * 
+	 * @param scribbleType The Scribble target type
+	 * @param cdlType The CDL type
+	 * @return Whether the rule is appropriate to convert
+	 * 					the CDL type
+	 */
+	public boolean isSupported(Class<?> scribbleType,
+						org.pi4soa.cdl.CDLType cdlType);
+	
+	/**
+	 * This method converts the supplied CDL type into a
+	 * Scribble model object.
+	 * 
+	 * @param context The converters context
+	 * @param scribbleType The Scribble target type
+	 * @param cdlType The CDL type to be converted
+	 * @return The converted Scribble model object
+	 */
+	public org.scribble.model.ModelObject convert(ConverterContext context,
+			Class<?> scribbleType, org.pi4soa.cdl.CDLType cdlType);
+	
+}

Added: tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/src/java/org/scribble/pi4soa/cdm/parser/rules/ConverterRuleFactory.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/src/java/org/scribble/pi4soa/cdm/parser/rules/ConverterRuleFactory.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/src/java/org/scribble/pi4soa/cdm/parser/rules/ConverterRuleFactory.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,63 @@
+/*
+ * Copyright 2005-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 6 Jun 2008 : Initial version created by gary
+ */
+package org.scribble.pi4soa.cdm.parser.rules;
+
+/**
+ * This class represents a factory for converter rules.
+ */
+public class ConverterRuleFactory {
+
+	/**
+	 * This method converts the supplied CDL type into a
+	 * Scribble model object.
+	 * 
+	 * @param scribbleType The Scribble target type
+	 * @param cdlType The CDL type to be converted
+	 * @return The converter rule, or null if not found
+	 */
+	public static ConverterRule getConverter(Class<?> scribbleType,
+						org.pi4soa.cdl.CDLType cdlType) {
+		ConverterRule ret=null;
+		
+		for (int i=0; ret == null && i < m_rules.length; i++) {
+			if (m_rules[i].isSupported(scribbleType, cdlType)) {
+				ret = m_rules[i];
+			}
+		}
+		
+		return(ret);
+	}
+	
+	private static ConverterRule[] m_rules={
+		new ConversationModelConverterRuleImpl(),
+		new ConversationConverterRuleImpl(),
+		new ParallelConverterRuleImpl(),
+		new IfOrWhenConverterRuleImpl(),
+		new IfConverterRuleImpl(),
+		new WhenConverterRuleImpl(),
+		new WhileConverterRuleImpl(),
+		new ConversationInteractionConverterRuleImpl(),
+		new FinalizeConverterRuleImpl(),
+		new FinalizerHandlerConverterRuleImpl(),
+		new AssignConverterRuleImpl(),
+		new SequenceConverterRuleImpl(),
+		new PerformConverterRuleImpl()
+	};
+}

Added: tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/src/java/org/scribble/pi4soa/cdm/parser/rules/ConverterUtil.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/src/java/org/scribble/pi4soa/cdm/parser/rules/ConverterUtil.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/src/java/org/scribble/pi4soa/cdm/parser/rules/ConverterUtil.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,63 @@
+/*
+ * Copyright 2005-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 31 Jul 2008 : Initial version created by gary
+ */
+package org.scribble.pi4soa.cdm.parser.rules;
+
+import org.scribble.model.*;
+
+/**
+ * This class defines some converter utility functions.
+ */
+public class ConverterUtil {
+
+	/**
+	 * This method converts the supplied information type into a
+	 * type reference.
+	 * 
+	 * @param infoType The information type
+	 * @return The type reference
+	 */
+	public static TypeReference getTypeReference(org.pi4soa.cdl.InformationType infoType) {
+		TypeReference ret=new TypeReference();
+		
+		// TODO: Establish 'implements' dependency between
+		// XML type and an abstract type derived from the
+		// XML namespace and localpart.
+		
+		org.pi4soa.common.xml.XMLPrefixResolver resolver=
+			org.pi4soa.cdl.util.CDLTypeUtil.getPrefixResolver(infoType.getPackage());
+		String typeName=null;
+		
+		// TODO: Need to have general way to convert
+		// namespace scoped type into a type reference
+		
+		if (org.pi4soa.common.util.NamesUtil.isSet(infoType.getTypeName())) {
+			typeName = infoType.getTypeName();
+		} else if (org.pi4soa.common.util.NamesUtil.isSet(infoType.getElementName())) {
+			typeName = infoType.getElementName();
+		}
+		
+		if (typeName != null) {
+			ret.setLocalpart(org.pi4soa.common.xml.XMLUtils.getLocalname(typeName));
+			ret.setNamespace(org.pi4soa.common.xml.XMLUtils.getNamespace(typeName, resolver, null));
+		}
+		
+		return(ret);
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/src/java/org/scribble/pi4soa/cdm/parser/rules/DefaultConverterContext.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/src/java/org/scribble/pi4soa/cdm/parser/rules/DefaultConverterContext.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/src/java/org/scribble/pi4soa/cdm/parser/rules/DefaultConverterContext.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,184 @@
+/*
+ * Copyright 2005-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 6 Jun 2008 : Initial version created by gary
+ */
+package org.scribble.pi4soa.cdm.parser.rules;
+
+import java.util.logging.Logger;
+import org.scribble.util.Scope;
+
+import org.scribble.conversation.model.Compose;
+import org.scribble.conversation.model.Conversation;
+import org.scribble.model.*;
+
+/**
+ * The default implementation of the converter context.
+ */
+public class DefaultConverterContext implements ConverterContext {
+
+	/**
+	 * Default constructor.
+	 */
+	public DefaultConverterContext() {
+	}
+	
+	/**
+	 * This is the constructor for the converter context, initialized
+	 * with the source reference.
+	 * 
+	 * @param ref The source model reference
+	 */
+	public DefaultConverterContext(ModelReference ref) {
+		m_source = ref;
+	}
+	
+	/**
+	 * This method returns the source model reference.
+	 * 
+	 * @return The source model reference
+	 */
+	public ModelReference getSource() {
+		return(m_source);
+	}
+	
+	/**
+	 * This method returns the declaration associated
+	 * with the supplied name.
+	 * 
+	 * @param name The name
+	 * @return The declaration, or null if not found
+	 */
+	public Object getState(String name) {
+		return(m_scope.getState(name));
+	}
+	
+	/**
+	 * This method sets the declaration associated with
+	 * the supplied name.
+	 * 
+	 * @param name The name
+	 * @param decl The declaration
+	 */
+	public void setState(String name, Object decl) {
+		m_scope.setState(name, decl);
+	}
+	
+	/**
+	 * This method pushes the current state onto a stack.
+	 */
+	public void pushState() {
+		m_scope.pushState();
+	}
+	
+	/**
+	 * This method pops the current state from the stack.
+	 */
+	public void popState() {
+		m_scope.popState();
+	}
+		
+	/**
+	 * This method pushes the current scope onto a stack.
+	 */
+	public void pushScope() {
+		m_scopeStack.add(0, m_scope);
+		m_scope = new Scope();
+	}
+	
+	/**
+	 * This method pops the current scope from the stack.
+	 */
+	public void popScope() {
+		if (m_scopeStack.size() > 0) {
+			m_scope = m_scopeStack.remove(0);
+		} else {
+			logger.severe("No state entry to pop from stack");
+		}
+	}
+	
+	/**
+	 * This method adds a conversation to the context,
+	 * for use when processing activities within its
+	 * scope.
+	 * 
+	 * @param conv The conversation
+	 */
+	public void addConversation(Conversation conv) {
+		m_conversations.add(conv);
+	}
+	
+	/**
+	 * This method removes the conversation from the
+	 * context.
+	 * 
+	 * @param conv The conversation
+	 */
+	public void removeConversation(Conversation conv) {
+		m_conversations.remove(conv);
+	}
+	
+	/**
+	 * This method retrieves the conversation associated
+	 * with the supplied model reference.
+	 * 
+	 * @param ref The model reference
+	 * @return The conversation
+	 */
+	public Conversation getConversation(ModelReference ref) {
+		Conversation ret=null;
+		
+		for (int i=0; ret == null && i < m_conversations.size(); i++) {
+			Conversation subconv=(Conversation)
+							m_conversations.get(i);
+
+			if (subconv.getLocatedName() != null &&
+					subconv.getLocatedName().getName() != null &&
+						ref.getAlias().equals(
+					subconv.getLocatedName().getName()) &&
+						((ref.getLocatedRole() == null &&
+					subconv.getLocatedName().getRole() == null) ||
+						((ref.getLocatedRole() != null &&
+					subconv.getLocatedName().getRole() != null &&
+						ref.getLocatedRole().equals(
+					subconv.getLocatedName().getRole().getName()))))) {
+			
+				ret = subconv;
+			}
+		}
+
+		return(ret);
+	}
+
+	/**
+	 * This method returns the list of Compose activities
+	 * within the model.
+	 * 
+	 * @return The list of compose activities
+	 */
+	public java.util.List<Compose> getComposeActivities() {
+		return(m_composeActivities);
+	}
+	
+	private static Logger logger = Logger.getLogger("org.pi4soa.scribble.cdm.parser.rules");
+
+	private ModelReference m_source=null;
+	private Scope m_scope=new Scope();
+	private java.util.List<Scope> m_scopeStack=new java.util.Vector<Scope>();
+	private java.util.List<Compose> m_composeActivities=new java.util.Vector<Compose>();
+	private java.util.List<Conversation> m_conversations=new java.util.Vector<Conversation>();
+}

Added: tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/src/java/org/scribble/pi4soa/cdm/parser/rules/FinalizeConverterRuleImpl.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/src/java/org/scribble/pi4soa/cdm/parser/rules/FinalizeConverterRuleImpl.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/src/java/org/scribble/pi4soa/cdm/parser/rules/FinalizeConverterRuleImpl.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,95 @@
+/*
+ * Copyright 2005-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 1 Jun 2009 : Initial version created by gary
+ */
+package org.scribble.pi4soa.cdm.parser.rules;
+
+import org.pi4soa.cdl.*;
+import org.pi4soa.cdl.util.CDLTypeUtil;
+import org.scribble.model.*;
+import org.scribble.conversation.model.*;
+
+public class FinalizeConverterRuleImpl implements ConverterRule {
+
+	/**
+	 * This method determines whether the rule can be applied
+	 * to the supplied CDL type.
+	 * 
+	 * @param scribbleType The Scribble target type
+	 * @param cdlType The CDL type
+	 * @return Whether the rule is appropriate to convert
+	 * 					the CDL type
+	 */
+	public boolean isSupported(Class<?> scribbleType,
+						CDLType cdlType) {
+		return(scribbleType == org.scribble.model.Activity.class &&
+				cdlType instanceof org.pi4soa.cdl.Finalize);
+	}
+	
+	/**
+	 * This method converts the supplied CDL type into a
+	 * Scribble model object.
+	 * 
+	 * @param context The converters context
+	 * @param scribbleType The Scribble target type
+	 * @param cdlType The CDL type to be converted
+	 * @return The converted Scribble model object
+	 */
+	public ModelObject convert(ConverterContext context,
+			Class<?> scribbleType, CDLType cdlType) {
+		org.scribble.conversation.model.Run ret=
+					new org.scribble.conversation.model.Run();
+		org.pi4soa.cdl.Finalize cdl=(org.pi4soa.cdl.Finalize)cdlType;
+		
+		ret.getSource().setComponentURI(
+				CDLTypeUtil.getURIFragment(cdl));
+
+		ConversationReference ref=new ConversationReference();
+		ref.setLocalpart(cdl.getChoreography().getName()+"_"+cdl.getFinalizer().getName());
+		ref.setInner(true);
+		
+		ret.setReference(ref);
+		
+		// Find conversation related to reference, and use
+		// as inner definition initially - to help with
+		// subsequent processing (e.g. locating initiator
+		// roles). The inner definition will be cleared when
+		// the model is fully converted.
+		Conversation conv=context.getConversation(ref);
+		
+		if (conv != null) {
+			ret.setInlineDefinition(conv);
+			context.getComposeActivities().add(ret);
+		
+			// Bind roles
+			java.util.List<Role> roles=conv.getRoles();
+			
+			for (int i=0; i < roles.size(); i++) {
+				Role role=roles.get(i);
+				
+				Object decl=context.getState(role.getName());
+				
+				if (decl instanceof Declaration) {
+					ret.getBindings().add(new DeclarationBinding((Declaration)decl, role.getName()));
+				}
+			}
+		}
+				
+		return(ret);
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/src/java/org/scribble/pi4soa/cdm/parser/rules/FinalizerHandlerConverterRuleImpl.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/src/java/org/scribble/pi4soa/cdm/parser/rules/FinalizerHandlerConverterRuleImpl.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/src/java/org/scribble/pi4soa/cdm/parser/rules/FinalizerHandlerConverterRuleImpl.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,321 @@
+/*
+ * Copyright 2005-9 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 1 Jun 2009 : Initial version created by gary
+ */
+package org.scribble.pi4soa.cdm.parser.rules;
+
+import java.util.logging.Logger;
+
+import org.pi4soa.cdl.*;
+import org.pi4soa.cdl.Interaction;
+import org.pi4soa.cdl.util.CDLTypeUtil;
+import org.pi4soa.common.util.NamesUtil;
+import org.pi4soa.common.xml.XMLUtils;
+import org.scribble.model.*;
+import org.scribble.model.admin.DependencyType;
+import org.scribble.conversation.model.*;
+import org.scribble.expression.xpath.model.*;
+
+public class FinalizerHandlerConverterRuleImpl implements ConverterRule {
+
+	private static final String CONVERSATION_TYPE = "conversationType";
+
+	/**
+	 * This method determines whether the rule can be applied
+	 * to the supplied CDL type.
+	 * 
+	 * @param scribbleType The Scribble target type
+	 * @param cdlType The CDL type
+	 * @return Whether the rule is appropriate to convert
+	 * 					the CDL type
+	 */
+	public boolean isSupported(Class<?> scribbleType,
+						CDLType cdlType) {
+		return(scribbleType == Conversation.class &&
+				cdlType instanceof FinalizerHandler);
+	}
+	
+	/**
+	 * This method converts the supplied CDL type into a
+	 * Scribble model object.
+	 * 
+	 * @param context The converters context
+	 * @param scribbleType The Scribble target type
+	 * @param cdlType The CDL type to be converted
+	 * @return The converted Scribble model object
+	 */
+	public ModelObject convert(ConverterContext context,
+			Class<?> scribbleType, CDLType cdlType) {
+		Conversation ret=new Conversation();
+		FinalizerHandler choreo=(FinalizerHandler)cdlType;
+		
+		ret.getSource().setComponentURI(
+				CDLTypeUtil.getURIFragment(choreo));
+			
+		context.pushScope();
+		
+		LocatedName modelName=new LocatedName();
+		modelName.setName(choreo.getEnclosingChoreography().getName()+"_"+choreo.getName());
+		
+		ret.setLocatedName(modelName);
+		
+		// Define roles
+		defineRoles(context, choreo, ret);
+		
+		// Convert variables
+		convertVariables(context, choreo, ret.getBlock());
+		
+		// Define identities
+		convertIdentities(context, choreo, ret);
+		
+		// Process all of the activities within the
+		// choreography
+		convertActivities(context, choreo.getActivities(), ret.getBlock());
+
+		context.popScope();
+		
+		return(ret);
+	}
+
+	
+	protected void defineRoles(ConverterContext context,
+			final FinalizerHandler choreo, Conversation conv) {
+	
+		org.scribble.model.admin.DependencyManager dm=(org.scribble.model.admin.DependencyManager)
+				org.scribble.extensions.RegistryFactory.getRegistry().getExtension(
+						org.scribble.model.admin.DependencyManager.class, null);
+		
+		final java.util.List<ParticipantType> partTypes=new java.util.Vector<ParticipantType>();
+		final java.util.List<Participant> partInstances=new java.util.Vector<Participant>();
+		
+		choreo.visit(new DefaultCDLVisitor() {
+			
+			public void interaction(Interaction interaction) {
+				
+				if (interaction.getEnclosingChoreography() != choreo.getEnclosingChoreography()) {
+					return;
+				}
+				
+				if (interaction.getFromParticipant() != null) {
+					if (partInstances.contains(interaction.getFromParticipant()) == false) {
+						partInstances.add(interaction.getFromParticipant());
+					}
+				} else {
+					ParticipantType ptype=
+						org.pi4soa.cdl.util.PackageUtil.getParticipantForRoleType(
+								interaction.getFromRoleType());
+					
+					if (ptype != null &&
+							partTypes.contains(ptype) == false) {
+						partTypes.add(ptype);
+					}
+				}
+				
+				if (interaction.getToParticipant() != null) {
+					if (partInstances.contains(interaction.getToParticipant()) == false) {
+						partInstances.add(interaction.getToParticipant());
+					}
+				} else {
+					ParticipantType ptype=
+						org.pi4soa.cdl.util.PackageUtil.getParticipantForRoleType(
+								interaction.getToRoleType());
+					
+					if (ptype != null &&
+							partTypes.contains(ptype) == false) {
+						partTypes.add(ptype);
+					}
+				}
+			}
+		});
+		
+		// Define roles
+		java.util.Iterator<Participant> piter=partInstances.iterator();
+		
+		RoleList roleList=null;
+		
+		while (piter.hasNext()) {
+			Role role=new Role();
+			Participant pinst=piter.next();
+			role.setName(pinst.getName());
+			
+			if (roleList == null) {
+				roleList = new RoleList();
+				conv.getBlock().getContents().add(roleList);
+			}
+			
+			roleList.getRoles().add(role);
+			
+			context.setState(role.getName(), role);
+		}
+
+		java.util.Iterator<ParticipantType> ptiter=partTypes.iterator();
+
+		/*
+		if (choreo.getRoot() != Boolean.TRUE) {
+			roleList = null;
+		} else {
+			ptiter = choreo.getPackage().getTypeDefinitions().getParticipantTypes().iterator();
+		}
+		*/
+	
+		while (ptiter.hasNext()) {
+			Role role=new Role();
+			ParticipantType ptype=ptiter.next();
+			role.setName(ptype.getName());
+			
+			if (roleList == null) {
+				roleList = new RoleList();
+				
+				roleList.setOpen(choreo.getEnclosingChoreography().getRoot() != Boolean.TRUE);
+				
+				conv.getBlock().getContents().add(roleList);
+			}
+			
+			roleList.getRoles().add(role);
+			
+			context.setState(role.getName(), role);
+		}
+	}
+	
+	protected void convertVariables(ConverterContext context,
+			FinalizerHandler choreo, Block block) {
+		
+		java.util.List<org.pi4soa.cdl.Variable> vars=
+					choreo.getEnclosingChoreography().getVariableDefinitions();
+		
+		for (int i=0; i < vars.size(); i++) {
+			org.pi4soa.cdl.Variable var=(org.pi4soa.cdl.Variable)vars.get(i);
+			
+			if (var.getType() instanceof InformationType) {				
+				java.util.List<RoleType> roleTypes=var.getRoleTypes();
+				
+				if (roleTypes.size() == 0) {
+					roleTypes = choreo.getPackage().getTypeDefinitions().getRoleTypes();
+				}
+				
+				VariableList vlist=new VariableList();
+				TypeReference ref=new TypeReference();
+				
+				String qname=((InformationType)var.getType()).getElementName();
+				
+				if (NamesUtil.isSet(qname)==false) {
+					qname=((InformationType)var.getType()).getTypeName();
+				}
+				
+				ref.setNamespace(CDLTypeUtil.getNamespace(qname, var));
+				ref.setLocalpart(XMLUtils.getLocalname(qname));
+				
+				vlist.setType(ref);
+				
+				/* TODO: See if variables should be located?
+				for (int j=0; j < roleTypes.size(); j++) {
+					org.scribble.conversation.model.Variable newVar=
+						new org.scribble.conversation.model.Variable();
+					
+					newVar.setName(var.getName());
+				}
+				*/
+				
+				org.scribble.conversation.model.Variable newVar=
+					new org.scribble.conversation.model.Variable();
+				
+				newVar.setName(var.getName());
+				
+				vlist.getVariables().add(newVar);
+				
+				block.getContents().add(vlist);
+			}
+		}
+	}
+	
+	protected void convertActivities(ConverterContext context,
+				java.util.List<org.pi4soa.cdl.Activity> acts, Block block) {
+		
+		java.util.Iterator<org.pi4soa.cdl.Activity> actiter=
+						acts.iterator();
+		
+		while (actiter.hasNext()) {
+			org.pi4soa.cdl.Activity act=actiter.next();
+			
+			ConverterRule rule=ConverterRuleFactory.getConverter(
+					org.scribble.model.Activity.class, act);
+			
+			if (rule != null) {
+				org.scribble.model.Activity activity=
+					(org.scribble.model.Activity)
+					rule.convert(context,
+							org.scribble.model.Activity.class, act);
+				
+				if (activity != null) {
+					
+					if (activity instanceof Block) {
+						block.getContents().addAll(((Block)activity).getContents());
+					} else {
+						block.getContents().add(activity);
+					}
+				}
+			}
+		}
+	}
+	
+	protected void convertIdentities(ConverterContext context,
+			FinalizerHandler choreo, Conversation conv) {
+		
+		// Define identities
+		java.util.List<org.pi4soa.cdl.Variable> vars=
+					choreo.getEnclosingChoreography().getVariableDefinitions();
+		java.util.List<org.scribble.conversation.model.Identity> ids=
+			new java.util.Vector<org.scribble.conversation.model.Identity>();
+
+		for (int i=0; i < vars.size(); i++) {
+			if (vars.get(i).getType() instanceof org.pi4soa.cdl.ChannelType) {
+				org.pi4soa.cdl.ChannelType ctype=
+						(org.pi4soa.cdl.ChannelType)vars.get(i).getType();
+				
+				java.util.Iterator<org.pi4soa.cdl.Identity> cids=
+						ctype.getIdentities().iterator();
+				
+				while (cids.hasNext()) {
+					org.pi4soa.cdl.Identity cid=cids.next();
+					org.scribble.conversation.model.Identity id=
+						new org.scribble.conversation.model.Identity();
+					
+					if (cid.getType() == KeyType.ASSOCIATION) {
+						id.setIdentityType(IdentityType.Association);
+					} else if (cid.getType() == KeyType.DERIVED) {
+						id.setIdentityType(IdentityType.Derived);
+					} else {
+						id.setIdentityType(IdentityType.Primary);
+					}
+					
+					for (int j=0; j < cid.getTokens().size(); j++) {
+						id.getNames().add(cid.getTokens().get(j).getName());
+					}
+					
+					if (ids.contains(id) == false) {
+						ids.add(id);
+					}
+				}
+			}
+		}
+		
+		conv.getIdentities().addAll(ids);		
+	}
+
+	private static Logger logger = Logger.getLogger("org.pi4soa.scribble.cdm.parser.rules");
+}

Added: tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/src/java/org/scribble/pi4soa/cdm/parser/rules/IfConverterRuleImpl.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/src/java/org/scribble/pi4soa/cdm/parser/rules/IfConverterRuleImpl.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/src/java/org/scribble/pi4soa/cdm/parser/rules/IfConverterRuleImpl.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,111 @@
+/*
+ * Copyright 2005-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 6 Jun 2008 : Initial version created by gary
+ */
+package org.scribble.pi4soa.cdm.parser.rules;
+
+import org.pi4soa.cdl.*;
+import org.pi4soa.cdl.util.CDLTypeUtil;
+import org.scribble.model.*;
+import org.scribble.conversation.model.*;
+import org.scribble.expression.xpath.model.XPathExpression;
+
+public class IfConverterRuleImpl implements ConverterRule {
+
+	/**
+	 * This method determines whether the rule can be applied
+	 * to the supplied CDL type.
+	 * 
+	 * @param scribbleType The Scribble target type
+	 * @param cdlType The CDL type
+	 * @return Whether the rule is appropriate to convert
+	 * 					the CDL type
+	 */
+	public boolean isSupported(Class<?> scribbleType,
+						CDLType cdlType) {
+		return(scribbleType == org.scribble.model.Activity.class &&
+				cdlType instanceof org.pi4soa.cdl.Conditional);
+	}
+	
+	/**
+	 * This method converts the supplied CDL type into a
+	 * Scribble model object.
+	 * 
+	 * @param context The converters context
+	 * @param scribbleType The Scribble target type
+	 * @param cdlType The CDL type to be converted
+	 * @return The converted Scribble model object
+	 */
+	public ModelObject convert(ConverterContext context,
+			Class<?> scribbleType, CDLType cdlType) {
+		org.scribble.conversation.model.If ret=
+				new org.scribble.conversation.model.If();
+		org.pi4soa.cdl.Conditional cdl=(org.pi4soa.cdl.Conditional)cdlType;
+		
+		ret.getSource().setComponentURI(
+				CDLTypeUtil.getURIFragment(cdl));
+	
+		ConditionalBlock block=new ConditionalBlock();
+		ret.getConditionalBlocks().add(block);
+		
+		context.pushState();
+		
+		// Set the expression if defined in the 'conditional'
+		if (cdl.getExpression() != null) {
+			XPathExpression exp=new XPathExpression();
+		
+			exp.setQuery(cdl.getExpression());
+		
+			block.setExpression(exp);
+		}
+		
+		// Process all of the activities within the
+		// choreography
+		java.util.Iterator<org.pi4soa.cdl.Activity> actiter=
+					cdl.getActivities().iterator();
+		while (actiter.hasNext()) {
+			org.pi4soa.cdl.Activity act=actiter.next();
+			
+			ConverterRule rule=ConverterRuleFactory.getConverter(
+					org.scribble.model.Activity.class, act);
+		
+			if (rule != null) {
+				org.scribble.model.Activity activity=
+					(org.scribble.model.Activity)
+					rule.convert(context,
+							org.scribble.model.Activity.class, act);
+				
+				if (activity != null) {
+					if (activity instanceof Block) {
+						block.getContents().addAll(((Block)activity).getContents());
+					} else {
+						block.getContents().add(activity);
+					}
+				}
+			}
+		}
+		
+		// Get initiator role(s) for first activity in body and
+		// associated with If
+		ret.getRoles().addAll(block.getInitiatorRoles());
+		
+		context.popState();
+		
+		return(ret);
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/src/java/org/scribble/pi4soa/cdm/parser/rules/IfOrWhenConverterRuleImpl.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/src/java/org/scribble/pi4soa/cdm/parser/rules/IfOrWhenConverterRuleImpl.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/src/java/org/scribble/pi4soa/cdm/parser/rules/IfOrWhenConverterRuleImpl.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,152 @@
+/*
+ * Copyright 2005-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 6 Jun 2008 : Initial version created by gary
+ */
+package org.scribble.pi4soa.cdm.parser.rules;
+
+import org.pi4soa.cdl.*;
+import org.pi4soa.cdl.util.CDLTypeUtil;
+import org.scribble.model.*;
+import org.scribble.conversation.model.*;
+
+public class IfOrWhenConverterRuleImpl implements ConverterRule {
+
+	/**
+	 * This method determines whether the rule can be applied
+	 * to the supplied CDL type.
+	 * 
+	 * @param scribbleType The Scribble target type
+	 * @param cdlType The CDL type
+	 * @return Whether the rule is appropriate to convert
+	 * 					the CDL type
+	 */
+	public boolean isSupported(Class<?> scribbleType,
+						CDLType cdlType) {
+		return(scribbleType == org.scribble.model.Activity.class &&
+				cdlType instanceof org.pi4soa.cdl.Choice);
+	}
+	
+	/**
+	 * This method converts the supplied CDL type into a
+	 * Scribble model object.
+	 * 
+	 * @param context The converters context
+	 * @param scribbleType The Scribble target type
+	 * @param cdlType The CDL type to be converted
+	 * @return The converted Scribble model object
+	 */
+	public ModelObject convert(ConverterContext context,
+			Class<?> scribbleType, CDLType cdlType) {
+		org.scribble.model.Activity ret=null;
+		org.pi4soa.cdl.Choice cdl=(org.pi4soa.cdl.Choice)cdlType;
+		java.util.List<ConditionalBlock> blocks=new java.util.Vector<ConditionalBlock>();
+		boolean f_when=false;
+		
+		// Process all of the activities within the
+		// choreography
+		java.util.Iterator<org.pi4soa.cdl.Activity> actiter=
+					cdl.getActivities().iterator();
+		while (actiter.hasNext()) {
+			org.pi4soa.cdl.Activity act=actiter.next();
+			
+			ConverterRule rule=ConverterRuleFactory.getConverter(
+					org.scribble.model.Activity.class, act);
+		
+			if (rule != null) {
+				
+				context.pushState();
+				
+				org.scribble.model.Activity activity=
+					(org.scribble.model.Activity)
+					rule.convert(context,
+							org.scribble.model.Activity.class, act);
+				
+				if (activity != null) {
+					if (activity instanceof If) {
+						blocks.addAll(((If)activity).getConditionalBlocks());
+					} else if (activity instanceof 
+								org.scribble.conversation.model.When) {
+						blocks.addAll(((org.scribble.conversation.model.When)activity).getConditionalBlocks());
+						f_when = true;
+					} else {
+						ConditionalBlock block=new ConditionalBlock();
+						
+						if (activity instanceof Block) {
+							block.getContents().addAll(((Block)activity).getContents());
+						} else {
+							block.getContents().add(activity);							
+						}
+						
+						blocks.add(block);
+					}
+				}
+				
+				context.popState();
+			}
+		}
+		
+		// Build up initiator role list
+		java.util.List<Role> roles=null;
+		
+		for (int i=0; i < blocks.size(); i++) {
+			Block b=blocks.get(i);
+			
+			java.util.List<Role> blockRoles=
+					b.getInitiatorRoles();
+				
+			if (blockRoles != null) {
+				if (roles == null) {
+					roles = blockRoles;
+				} else {
+					for (int j=0; j < blockRoles.size(); j++) {
+						if (roles.contains(blockRoles.get(j)) == false) {
+							roles.add(blockRoles.get(j));
+						}
+					}
+				}
+			}
+		}
+		
+		if (f_when) {
+			ret = new org.scribble.conversation.model.When();
+			((org.scribble.conversation.model.When)ret).
+					getConditionalBlocks().addAll(blocks);
+			
+			if (roles != null) {
+				((org.scribble.conversation.model.When)ret).
+						getRoles().addAll(roles);
+			}
+		} else {
+			ret = new org.scribble.conversation.model.If();
+			((org.scribble.conversation.model.If)ret).
+					getConditionalBlocks().addAll(blocks);
+			
+			if (roles != null) {
+				((org.scribble.conversation.model.If)ret).
+						getRoles().addAll(roles);
+			}
+		}
+		
+		if (ret != null) {
+			ret.getSource().setComponentURI(
+					CDLTypeUtil.getURIFragment(cdl));
+		}
+		
+		return(ret);
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/src/java/org/scribble/pi4soa/cdm/parser/rules/ParallelConverterRuleImpl.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/src/java/org/scribble/pi4soa/cdm/parser/rules/ParallelConverterRuleImpl.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/src/java/org/scribble/pi4soa/cdm/parser/rules/ParallelConverterRuleImpl.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,96 @@
+/*
+ * Copyright 2005-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 6 Jun 2008 : Initial version created by gary
+ */
+package org.scribble.pi4soa.cdm.parser.rules;
+
+import org.pi4soa.cdl.*;
+import org.pi4soa.cdl.util.CDLTypeUtil;
+import org.scribble.model.*;
+
+public class ParallelConverterRuleImpl implements ConverterRule {
+
+	/**
+	 * This method determines whether the rule can be applied
+	 * to the supplied CDL type.
+	 * 
+	 * @param scribbleType The Scribble target type
+	 * @param cdlType The CDL type
+	 * @return Whether the rule is appropriate to convert
+	 * 					the CDL type
+	 */
+	public boolean isSupported(Class<?> scribbleType,
+						CDLType cdlType) {
+		return(scribbleType == org.scribble.model.Activity.class &&
+				cdlType instanceof org.pi4soa.cdl.Parallel);
+	}
+	
+	/**
+	 * This method converts the supplied CDL type into a
+	 * Scribble model object.
+	 * 
+	 * @param context The converters context
+	 * @param scribbleType The Scribble target type
+	 * @param cdlType The CDL type to be converted
+	 * @return The converted Scribble model object
+	 */
+	public ModelObject convert(ConverterContext context,
+			Class<?> scribbleType, CDLType cdlType) {
+		org.scribble.conversation.model.Parallel ret=
+				new org.scribble.conversation.model.Parallel();
+		org.pi4soa.cdl.Parallel cdl=(org.pi4soa.cdl.Parallel)cdlType;
+		
+		ret.getSource().setComponentURI(
+				CDLTypeUtil.getURIFragment(cdl));
+
+		// Process all of the activities within the
+		// choreography
+		java.util.Iterator<org.pi4soa.cdl.Activity> actiter=
+					cdl.getActivities().iterator();
+		while (actiter.hasNext()) {
+			org.pi4soa.cdl.Activity act=actiter.next();
+			
+			ConverterRule rule=ConverterRuleFactory.getConverter(
+					org.scribble.model.Activity.class, act);
+		
+			if (rule != null) {
+				
+				context.pushState();
+				
+				org.scribble.model.Activity activity=
+					(org.scribble.model.Activity)
+					rule.convert(context,
+							org.scribble.model.Activity.class, act);
+				
+				if (activity != null) {
+					if (activity instanceof Block) {
+						ret.getBlocks().add((Block)activity);
+					} else {
+						Block block=new Block();
+						block.getContents().add(activity);
+						ret.getBlocks().add(block);
+					}
+				}
+				
+				context.popState();
+			}
+		}
+		
+		return(ret);
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/src/java/org/scribble/pi4soa/cdm/parser/rules/PerformConverterRuleImpl.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/src/java/org/scribble/pi4soa/cdm/parser/rules/PerformConverterRuleImpl.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/src/java/org/scribble/pi4soa/cdm/parser/rules/PerformConverterRuleImpl.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,127 @@
+/*
+ * Copyright 2005-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 27 Jun 2008 : Initial version created by gary
+ */
+package org.scribble.pi4soa.cdm.parser.rules;
+
+import java.util.logging.Logger;
+
+import org.pi4soa.cdl.*;
+import org.pi4soa.cdl.util.CDLTypeUtil;
+import org.scribble.model.*;
+import org.scribble.conversation.model.*;
+
+public class PerformConverterRuleImpl implements ConverterRule {
+
+	/**
+	 * This method determines whether the rule can be applied
+	 * to the supplied CDL type.
+	 * 
+	 * @param scribbleType The Scribble target type
+	 * @param cdlType The CDL type
+	 * @return Whether the rule is appropriate to convert
+	 * 					the CDL type
+	 */
+	public boolean isSupported(Class<?> scribbleType,
+						CDLType cdlType) {
+		return(scribbleType == org.scribble.model.Activity.class &&
+				cdlType instanceof org.pi4soa.cdl.Perform);
+	}
+	
+	/**
+	 * This method converts the supplied CDL type into a
+	 * Scribble model object.
+	 * 
+	 * @param context The converters context
+	 * @param scribbleType The Scribble target type
+	 * @param cdlType The CDL type to be converted
+	 * @return The converted Scribble model object
+	 */
+	public ModelObject convert(ConverterContext context,
+			Class<?> scribbleType, CDLType cdlType) {
+		org.scribble.conversation.model.Compose ret=null;
+		org.pi4soa.cdl.Perform cdl=(org.pi4soa.cdl.Perform)cdlType;
+		
+		if (cdl.getWaitForCompletion() == Boolean.TRUE) {
+			ret = new org.scribble.conversation.model.Run();
+		} else {
+			ret = new org.scribble.conversation.model.Spawn();
+		}
+		
+		ret.getSource().setComponentURI(
+				CDLTypeUtil.getURIFragment(cdl));
+
+		ConversationReference ref=new ConversationReference();
+		ref.setLocalpart(cdl.getChoreography().getName());
+		ref.setInner(true);
+		
+		ret.setReference(ref);
+		
+		// Find conversation related to reference, and use
+		// as inner definition initially - to help with
+		// subsequent processing (e.g. locating initiator
+		// roles). The inner definition will be cleared when
+		// the model is fully converted.
+		Conversation conv=context.getConversation(ref);
+		
+		if (conv != null) {
+			ret.setInlineDefinition(conv);
+			context.getComposeActivities().add(ret);
+		
+			// Bind roles
+			java.util.List<Role> roles=conv.getRoles();
+			
+			for (int i=0; i < roles.size(); i++) {
+				Role role=roles.get(i);
+				
+				Object decl=context.getState(role.getName());
+				
+				if (decl instanceof Declaration) {
+					ret.getBindings().add(new DeclarationBinding((Declaration)decl, role.getName()));
+				}
+			}
+		}
+		
+		// Convert binding parameters
+		java.util.List<BindDetails> bds=cdl.getBindDetails();
+		
+		for (int i=0; i < bds.size(); i++) {
+			
+			// Only convert if a variable, not a channel
+			// TODO: Need to also convert explicit channels
+			if (bds.get(i).getThisVariable() instanceof org.pi4soa.cdl.Variable) {
+				DeclarationBinding db=new DeclarationBinding();
+				
+				Object state=context.getState(bds.get(i).getThisVariable().getName());
+				
+				if (state instanceof Declaration) {
+					db.setDeclaration((Declaration)state);
+					db.setBoundName(bds.get(i).getFreeVariable().getName());
+				
+					ret.getBindings().add(db);
+				} else {
+					logger.finer("State not found for '"+bds.get(i).getThisVariable().getName()+"'");
+				}
+			}
+		}
+				
+		return(ret);
+	}
+	
+	private static Logger logger = Logger.getLogger("org.pi4soa.scribble.cdm.parser.rules");
+}

Added: tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/src/java/org/scribble/pi4soa/cdm/parser/rules/SequenceConverterRuleImpl.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/src/java/org/scribble/pi4soa/cdm/parser/rules/SequenceConverterRuleImpl.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/src/java/org/scribble/pi4soa/cdm/parser/rules/SequenceConverterRuleImpl.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,94 @@
+/*
+ * Copyright 2005-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 6 Jun 2008 : Initial version created by gary
+ */
+package org.scribble.pi4soa.cdm.parser.rules;
+
+import org.pi4soa.cdl.*;
+import org.pi4soa.cdl.util.CDLTypeUtil;
+import org.scribble.model.*;
+
+public class SequenceConverterRuleImpl implements ConverterRule {
+
+	/**
+	 * This method determines whether the rule can be applied
+	 * to the supplied CDL type.
+	 * 
+	 * @param scribbleType The Scribble target type
+	 * @param cdlType The CDL type
+	 * @return Whether the rule is appropriate to convert
+	 * 					the CDL type
+	 */
+	public boolean isSupported(Class<?> scribbleType,
+						CDLType cdlType) {
+		return(scribbleType == org.scribble.model.Activity.class &&
+				cdlType instanceof org.pi4soa.cdl.Sequence);
+	}
+	
+	/**
+	 * This method converts the supplied CDL type into a
+	 * Scribble model object.
+	 * 
+	 * @param context The converters context
+	 * @param scribbleType The Scribble target type
+	 * @param cdlType The CDL type to be converted
+	 * @return The converted Scribble model object
+	 */
+	public ModelObject convert(ConverterContext context,
+			Class<?> scribbleType, CDLType cdlType) {
+		org.scribble.model.Block ret=
+				new org.scribble.model.Block();
+		org.pi4soa.cdl.Sequence cdl=(org.pi4soa.cdl.Sequence)cdlType;
+		
+		ret.getSource().setComponentURI(
+				CDLTypeUtil.getURIFragment(cdl));
+
+		context.pushState();
+		
+		// Process all of the activities within the
+		// choreography
+		java.util.Iterator<org.pi4soa.cdl.Activity> actiter=
+					cdl.getActivities().iterator();
+		while (actiter.hasNext()) {
+			org.pi4soa.cdl.Activity act=actiter.next();
+			
+			ConverterRule rule=ConverterRuleFactory.getConverter(
+					org.scribble.model.Activity.class, act);
+		
+			if (rule != null) {
+				org.scribble.model.Activity activity=
+					(org.scribble.model.Activity)
+					rule.convert(context,
+							org.scribble.model.Activity.class, act);
+				
+				if (activity != null) {
+					if (activity instanceof Block) {
+						ret.getContents().addAll(
+								((Block)activity).getContents());
+					} else {
+						ret.getContents().add(activity);
+					}
+				}
+			}
+		}
+		
+		context.popState();
+		
+		return(ret);
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/src/java/org/scribble/pi4soa/cdm/parser/rules/WhenConverterRuleImpl.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/src/java/org/scribble/pi4soa/cdm/parser/rules/WhenConverterRuleImpl.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/src/java/org/scribble/pi4soa/cdm/parser/rules/WhenConverterRuleImpl.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,111 @@
+/*
+ * Copyright 2005-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 6 Jun 2008 : Initial version created by gary
+ */
+package org.scribble.pi4soa.cdm.parser.rules;
+
+import org.pi4soa.cdl.*;
+import org.pi4soa.cdl.util.CDLTypeUtil;
+import org.scribble.model.*;
+import org.scribble.conversation.model.*;
+import org.scribble.expression.xpath.model.XPathExpression;
+
+public class WhenConverterRuleImpl implements ConverterRule {
+
+	/**
+	 * This method determines whether the rule can be applied
+	 * to the supplied CDL type.
+	 * 
+	 * @param scribbleType The Scribble target type
+	 * @param cdlType The CDL type
+	 * @return Whether the rule is appropriate to convert
+	 * 					the CDL type
+	 */
+	public boolean isSupported(Class<?> scribbleType,
+						CDLType cdlType) {
+		return(scribbleType == org.scribble.model.Activity.class &&
+				cdlType instanceof org.pi4soa.cdl.When);
+	}
+	
+	/**
+	 * This method converts the supplied CDL type into a
+	 * Scribble model object.
+	 * 
+	 * @param context The converters context
+	 * @param scribbleType The Scribble target type
+	 * @param cdlType The CDL type to be converted
+	 * @return The converted Scribble model object
+	 */
+	public ModelObject convert(ConverterContext context,
+			Class<?> scribbleType, CDLType cdlType) {
+		org.scribble.conversation.model.When ret=
+				new org.scribble.conversation.model.When();
+		org.pi4soa.cdl.When cdl=(org.pi4soa.cdl.When)cdlType;
+		
+		ret.getSource().setComponentURI(
+				CDLTypeUtil.getURIFragment(cdl));
+
+		ConditionalBlock block=new ConditionalBlock();
+		ret.getConditionalBlocks().add(block);
+		
+		context.pushState();
+		
+		// Set the expression if defined in the 'when'
+		if (cdl.getExpression() != null) {
+			XPathExpression exp=new XPathExpression();
+		
+			exp.setQuery(cdl.getExpression());
+		
+			block.setExpression(exp);
+		}
+				
+		// Process all of the activities within the
+		// choreography
+		java.util.Iterator<org.pi4soa.cdl.Activity> actiter=
+					cdl.getActivities().iterator();
+		while (actiter.hasNext()) {
+			org.pi4soa.cdl.Activity act=actiter.next();
+			
+			ConverterRule rule=ConverterRuleFactory.getConverter(
+					org.scribble.model.Activity.class, act);
+		
+			if (rule != null) {
+				org.scribble.model.Activity activity=
+					(org.scribble.model.Activity)
+					rule.convert(context,
+							org.scribble.model.Activity.class, act);
+				
+				if (activity != null) {
+					if (activity instanceof Block) {
+						block.getContents().addAll(((Block)activity).getContents());
+					} else {
+						block.getContents().add(activity);
+					}
+				}
+			}
+		}
+		
+		// Get initiator role(s) for first activity in body and
+		// associated with When
+		ret.getRoles().addAll(block.getInitiatorRoles());
+		
+		context.popState();
+				
+		return(ret);
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/src/java/org/scribble/pi4soa/cdm/parser/rules/WhileConverterRuleImpl.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/src/java/org/scribble/pi4soa/cdm/parser/rules/WhileConverterRuleImpl.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/src/java/org/scribble/pi4soa/cdm/parser/rules/WhileConverterRuleImpl.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,108 @@
+/*
+ * Copyright 2005-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 6 Jun 2008 : Initial version created by gary
+ */
+package org.scribble.pi4soa.cdm.parser.rules;
+
+import org.pi4soa.cdl.*;
+import org.pi4soa.cdl.util.CDLTypeUtil;
+import org.scribble.expression.xpath.model.XPathExpression;
+import org.scribble.model.*;
+
+public class WhileConverterRuleImpl implements ConverterRule {
+
+	/**
+	 * This method determines whether the rule can be applied
+	 * to the supplied CDL type.
+	 * 
+	 * @param scribbleType The Scribble target type
+	 * @param cdlType The CDL type
+	 * @return Whether the rule is appropriate to convert
+	 * 					the CDL type
+	 */
+	public boolean isSupported(Class<?> scribbleType,
+						CDLType cdlType) {
+		return(scribbleType == org.scribble.model.Activity.class &&
+				cdlType instanceof org.pi4soa.cdl.While);
+	}
+	
+	/**
+	 * This method converts the supplied CDL type into a
+	 * Scribble model object.
+	 * 
+	 * @param context The converters context
+	 * @param scribbleType The Scribble target type
+	 * @param cdlType The CDL type to be converted
+	 * @return The converted Scribble model object
+	 */
+	public ModelObject convert(ConverterContext context,
+			Class<?> scribbleType, CDLType cdlType) {
+		org.scribble.conversation.model.While ret=
+				new org.scribble.conversation.model.While();
+		org.pi4soa.cdl.While cdl=(org.pi4soa.cdl.While)cdlType;
+		
+		ret.getSource().setComponentURI(
+				CDLTypeUtil.getURIFragment(cdl));
+
+		context.pushState();
+		
+		// Set the expression if defined in the 'while'
+		if (cdl.getExpression() != null &&
+				cdl.getExpression().trim().length() > 0) {
+			XPathExpression exp=new XPathExpression();
+		
+			exp.setQuery(cdl.getExpression());
+		
+			ret.getBlock().setExpression(exp);
+		}
+				
+		// Process all of the activities within the
+		// choreography
+		java.util.Iterator<org.pi4soa.cdl.Activity> actiter=
+					cdl.getActivities().iterator();
+		while (actiter.hasNext()) {
+			org.pi4soa.cdl.Activity act=actiter.next();
+			
+			ConverterRule rule=ConverterRuleFactory.getConverter(
+					org.scribble.model.Activity.class, act);
+		
+			if (rule != null) {
+				org.scribble.model.Activity activity=
+					(org.scribble.model.Activity)
+					rule.convert(context,
+							org.scribble.model.Activity.class, act);
+				
+				if (activity != null) {
+					if (activity instanceof Block) {
+						ret.getBlock().getContents().addAll(((Block)activity).getContents());
+					} else {
+						ret.getBlock().getContents().add(activity);
+					}
+				}
+			}
+		}
+		
+		// Get initiator role(s) for first activity in body and
+		// associated with While
+		ret.getRoles().addAll(ret.getBlock().getInitiatorRoles());
+		
+		context.popState();
+		
+		return(ret);
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/src/java/org/scribble/pi4soa/cdm/validation/TypeReferenceValidationRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/src/java/org/scribble/pi4soa/cdm/validation/TypeReferenceValidationRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.pi4soa.cdm/src/java/org/scribble/pi4soa/cdm/validation/TypeReferenceValidationRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,68 @@
+/*
+ * Copyright 2007 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 2 Nov 2007 : Initial version created by gary
+ */
+package org.scribble.pi4soa.cdm.validation;
+
+import org.scribble.pi4soa.cdm.model.CDMNotation;
+import org.scribble.extensions.*;
+import org.scribble.model.*;
+import org.scribble.model.admin.ModelListener;
+import org.scribble.validation.*;
+
+/**
+ * This class implements the validation rule for the
+ * type reference. This rule overrides the type
+ * reference validation in the core scribble plugin.
+ */
+ at RegistryInfo(extension=ValidationRule.class,notation=CDMNotation.NOTATION_CODE)
+public class TypeReferenceValidationRule extends org.scribble.validation.TypeReferenceValidationRule {
+
+	/**
+	 * This is the default constructor.
+	 */
+	public TypeReferenceValidationRule() {
+	}
+
+	/**
+	 * This method determines whether the rule is appropriate for
+	 * the supplied model object.
+	 * 
+	 * @param obj The model object
+	 * @return Whether the rule is appropriate
+	 */
+	public boolean isSupported(ModelObject obj) {
+		return(obj.getClass() == TypeReference.class);
+	}
+
+	/**
+	 * This method validates the supplied model object.
+	 * 
+	 * @param obj The model object
+	 * @param context The context
+	 * @param l The listener
+	 */
+	public void validate(ModelObject obj, ValidationContext context,
+			ModelListener l) {
+		// Ignore type references - these will be represented
+		// as XML type or elements
+		
+		// TODO: Eventually may want to validate if the XML
+		// schemas are located in the project
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.pi4soa.feature/.project
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.pi4soa.feature/.project	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.pi4soa.feature/.project	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>org.scribble.pi4soa.feature</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.pde.FeatureBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.pde.FeatureNature</nature>
+	</natures>
+</projectDescription>

Added: tools/eclipse/trunk/plugins/org.scribble.pi4soa.feature/LICENSE.txt
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.pi4soa.feature/LICENSE.txt	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.pi4soa.feature/LICENSE.txt	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,201 @@
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.

Added: tools/eclipse/trunk/plugins/org.scribble.pi4soa.feature/build.properties
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.pi4soa.feature/build.properties	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.pi4soa.feature/build.properties	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1 @@
+bin.includes = feature.xml

Added: tools/eclipse/trunk/plugins/org.scribble.pi4soa.feature/feature.xml
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.pi4soa.feature/feature.xml	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.pi4soa.feature/feature.xml	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<feature
+      id="org.scribble.pi4soa.feature"
+      label="Scribble pi4soa Feature"
+      version="0.1.0.qualifier"
+      provider-name="www.scribble.org">
+
+   <description>
+      This feature provides the Scribble pi4soa support.
+   </description>
+
+   <copyright>
+      Copyright 2005-9 Pi4 Technologies Ltd Licensed under the Apache
+License, Version 2.0 (the &quot;License&quot;); you may not use this file
+except in compliance with the License. You may obtain a copy
+of the License at http://www.apache.org/licenses/LICENSE-2.0
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an &quot;AS IS&quot; BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+or implied. See the License for the specific language governing
+permissions and limitations under the License.
+   </copyright>
+
+   <license url="http://www.apache.org/licenses/LICENSE-2.0.html">
+      The scribble tools suite is licensed under the open source Apache License, version 2.0. http://www.apache.org/licenses/LICENSE-2.0.html
+   </license>
+
+   <plugin
+         id="org.scribble.pi4soa.cdm"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.scribble.contract.model"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+</feature>

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.comparator/.classpath
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.protocol.comparator/.classpath	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.protocol.comparator/.classpath	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="src" path="src/java"/>
+	<classpathentry kind="src" path="src/test"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/3"/>
+	<classpathentry kind="output" path="classes"/>
+</classpath>

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.comparator/.project
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.protocol.comparator/.project	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.protocol.comparator/.project	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>org.scribble.protocol.comparator</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.ManifestBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.SchemaBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.pde.PluginNature</nature>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+	</natures>
+</projectDescription>

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.comparator/LICENSE.txt
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.protocol.comparator/LICENSE.txt	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.protocol.comparator/LICENSE.txt	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,201 @@
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.comparator/META-INF/MANIFEST.MF
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.protocol.comparator/META-INF/MANIFEST.MF	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.protocol.comparator/META-INF/MANIFEST.MF	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,20 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Scribble Protocol Comparator Plug-in
+Bundle-SymbolicName: org.scribble.protocol.comparator;singleton:=true
+Bundle-Version: 0.1.0.qualifier
+Bundle-Activator: org.scribble.protocol.comparator.osgi.Activator
+Bundle-Vendor: www.scribble.org
+Import-Package: org.osgi.framework;version="1.3.0"
+Require-Bundle: org.scribble.core,
+ org.scribble.protocol.model,
+ org.scribble.conformance
+Bundle-ActivationPolicy: lazy
+Scribble-Extensions: org.scribble.protocol.comparator.ProtocolComparatorRule,
+  org.scribble.protocol.comparator.SpawnComparatorRule,
+  org.scribble.protocol.comparator.ChoiceComparatorRule,
+  org.scribble.protocol.comparator.TryEscapeComparatorRule,
+  org.scribble.protocol.comparator.InterruptBlockComparatorRule,
+  org.scribble.protocol.comparator.CatchBlockComparatorRule,
+  org.scribble.protocol.comparator.RaiseComparatorRule,
+  org.scribble.protocol.comparator.ParallelComparatorRule

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.comparator/build.properties
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.protocol.comparator/build.properties	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.protocol.comparator/build.properties	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,5 @@
+source.. = src/java/
+output.. = classes/
+bin.includes = META-INF/,\
+               .,\
+               plugin.xml

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.comparator/classes/org/scribble/protocol/comparator/CatchBlockComparatorRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.protocol.comparator/classes/org/scribble/protocol/comparator/CatchBlockComparatorRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.comparator/classes/org/scribble/protocol/comparator/ChoiceComparatorRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.protocol.comparator/classes/org/scribble/protocol/comparator/ChoiceComparatorRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.comparator/classes/org/scribble/protocol/comparator/InterruptBlockComparatorRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.protocol.comparator/classes/org/scribble/protocol/comparator/InterruptBlockComparatorRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.comparator/classes/org/scribble/protocol/comparator/Messages.properties
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.protocol.comparator/classes/org/scribble/protocol/comparator/Messages.properties	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.protocol.comparator/classes/org/scribble/protocol/comparator/Messages.properties	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,20 @@
+# /*
+# * Copyright 2007 Pi4 Technologies Ltd
+# *
+# * Licensed under the Apache License, Version 2.0 (the "License");
+# * you may not use this file except in compliance with the License.
+# * You may obtain a copy of the License at
+# *
+# *     http://www.apache.org/licenses/LICENSE-2.0
+# *
+# * Unless required by applicable law or agreed to in writing, software
+# * distributed under the License is distributed on an "AS IS" BASIS,
+# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# * See the License for the specific language governing permissions and
+# * limitations under the License.
+# *
+# *
+# * Change History:
+# * 24 Nov 2007 : Initial version created by gary
+# */
+

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.comparator/classes/org/scribble/protocol/comparator/ParallelComparatorRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.protocol.comparator/classes/org/scribble/protocol/comparator/ParallelComparatorRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.comparator/classes/org/scribble/protocol/comparator/ProtocolComparatorRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.protocol.comparator/classes/org/scribble/protocol/comparator/ProtocolComparatorRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.comparator/classes/org/scribble/protocol/comparator/ProtocolComparatorRuleTest.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.protocol.comparator/classes/org/scribble/protocol/comparator/ProtocolComparatorRuleTest.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.comparator/classes/org/scribble/protocol/comparator/RaiseComparatorRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.protocol.comparator/classes/org/scribble/protocol/comparator/RaiseComparatorRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.comparator/classes/org/scribble/protocol/comparator/SpawnComparatorRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.protocol.comparator/classes/org/scribble/protocol/comparator/SpawnComparatorRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.comparator/classes/org/scribble/protocol/comparator/TryEscapeComparatorRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.protocol.comparator/classes/org/scribble/protocol/comparator/TryEscapeComparatorRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.comparator/classes/org/scribble/protocol/comparator/osgi/Activator.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.protocol.comparator/classes/org/scribble/protocol/comparator/osgi/Activator.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.comparator/src/java/org/scribble/protocol/comparator/CatchBlockComparatorRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.protocol.comparator/src/java/org/scribble/protocol/comparator/CatchBlockComparatorRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.protocol.comparator/src/java/org/scribble/protocol/comparator/CatchBlockComparatorRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,89 @@
+/*
+ * Copyright 2007-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 10 Nov 2008 : Initial version created by gary
+ */
+package org.scribble.protocol.comparator;
+
+import org.scribble.comparator.*;
+import org.scribble.model.*;
+import org.scribble.protocol.model.*;
+import org.scribble.model.admin.ModelListener;
+import org.scribble.extensions.RegistryInfo;
+
+/**
+ * This class provides the CatchBlock comparator rule.
+ */
+ at RegistryInfo(extension=ComparatorRule.class)
+public class CatchBlockComparatorRule implements ComparatorRule {
+
+	/**
+	 * This method determines whether the comparison rule is
+	 * associated with the supplied type.
+	 * 
+	 * @param obj The object to check
+	 * @return Whether the object is of a type supported by the
+	 * 					comparison rule
+	 */
+	public boolean isTypeSupported(ModelObject obj) {
+		return(obj instanceof CatchBlock);
+	}
+	
+	/**
+	 * This method determines whether the comparison rule is
+	 * appropriate for the supplied model objects.
+	 * 
+	 * @param main The main model object to be compared
+	 * @param ref The reference model object to be compared against
+	 * @return Whether the rule is relevant for the
+	 * 				model objects
+	 */
+	public boolean isComparisonSupported(ModelObject main, ModelObject ref) {
+		return(main instanceof CatchBlock &&
+				ref instanceof CatchBlock);
+	}
+	
+	/**
+	 * This method compares a model object against a reference
+	 * component to determine if they are equal.
+	 * 
+	 * @param context The context
+	 * @param main The main model object
+	 * @param reference The reference model object
+	 * @param l The model listener
+	 * @param deep Perform a deep compare
+	 * @return Whether the model objects are comparable
+	 */
+	public boolean compare(ComparatorContext context, ModelObject main,
+					ModelObject reference, ModelListener l, boolean deep) {
+		boolean ret=false;
+		CatchBlock maincb=(CatchBlock)main;
+		CatchBlock refcb=(CatchBlock)reference;
+
+		if (deep == false) {
+			
+			if (maincb.getType() != null &&
+					refcb.getType() != null) {
+				ret = context.compare(maincb.getType(),
+						refcb.getType(), l, deep);
+			}
+		}
+		
+		return(ret);
+	}
+	
+}

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.comparator/src/java/org/scribble/protocol/comparator/ChoiceComparatorRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.protocol.comparator/src/java/org/scribble/protocol/comparator/ChoiceComparatorRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.protocol.comparator/src/java/org/scribble/protocol/comparator/ChoiceComparatorRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,91 @@
+/*
+ * Copyright 2007 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 30 Nov 2007 : Initial version created by gary
+ */
+package org.scribble.protocol.comparator;
+
+import org.scribble.model.*;
+import org.scribble.model.admin.ModelListener;
+import org.scribble.comparator.*;
+import org.scribble.extensions.RegistryInfo;
+import org.scribble.protocol.model.*;
+
+/**
+ * This class provides the Choice comparator rule.
+ */
+ at RegistryInfo(extension=ComparatorRule.class,notation=ProtocolNotation.NOTATION_CODE)
+public class ChoiceComparatorRule implements ComparatorRule {
+
+	/**
+	 * This method determines whether the comparison rule is
+	 * associated with the supplied type.
+	 * 
+	 * @param obj The object to check
+	 * @return Whether the object is of a type supported by the
+	 * 					comparison rule
+	 */
+	public boolean isTypeSupported(ModelObject obj) {
+		return(obj instanceof Choice);
+	}
+	
+	/**
+	 * This method determines whether the comparison rule is
+	 * appropriate for the supplied model objects.
+	 * 
+	 * @param main The main model object to be compared
+	 * @param ref The reference model object to be compared against
+	 * @return Whether the rule is relevant for the
+	 * 				model objects
+	 */
+	public boolean isComparisonSupported(ModelObject main, ModelObject ref) {
+		return(main instanceof Choice &&
+				ref instanceof Choice);
+	}
+	
+	/**
+	 * This method compares a model object against a reference
+	 * component to determine if they are equal.
+	 * 
+	 * @param context The context
+	 * @param main The main model object
+	 * @param reference The reference model object
+	 * @param l The model listener
+	 * @param deep Perform a deep compare
+	 * @return Whether the model objects are comparable
+	 */
+	public boolean compare(ComparatorContext context, ModelObject main,
+					ModelObject reference, ModelListener l, boolean deep) {
+		boolean ret=false;
+		//Choice mainc=(Choice)main;
+		//Choice refc=(Choice)reference;
+
+		if (deep == false) {
+			// Shallow, so return true as both choice
+			ret = true;
+		} else {
+			
+			// TODO: Decide how children should be dealt with
+			
+			// Check children - however not defined how the comparison
+			// should be done between multi-path
+		}
+		
+		return(ret);
+	}
+	
+}

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.comparator/src/java/org/scribble/protocol/comparator/InterruptBlockComparatorRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.protocol.comparator/src/java/org/scribble/protocol/comparator/InterruptBlockComparatorRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.protocol.comparator/src/java/org/scribble/protocol/comparator/InterruptBlockComparatorRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,82 @@
+/*
+ * Copyright 2007-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 10 Nov 2008 : Initial version created by gary
+ */
+package org.scribble.protocol.comparator;
+
+import org.scribble.comparator.*;
+import org.scribble.model.*;
+import org.scribble.protocol.model.*;
+import org.scribble.model.admin.ModelListener;
+import org.scribble.extensions.RegistryInfo;
+
+/**
+ * This class provides the InterruptBlock comparator rule.
+ */
+ at RegistryInfo(extension=ComparatorRule.class)
+public class InterruptBlockComparatorRule implements ComparatorRule {
+
+	/**
+	 * This method determines whether the comparison rule is
+	 * associated with the supplied type.
+	 * 
+	 * @param obj The object to check
+	 * @return Whether the object is of a type supported by the
+	 * 					comparison rule
+	 */
+	public boolean isTypeSupported(ModelObject obj) {
+		return(obj instanceof InterruptBlock);
+	}
+	
+	/**
+	 * This method determines whether the comparison rule is
+	 * appropriate for the supplied model objects.
+	 * 
+	 * @param main The main model object to be compared
+	 * @param ref The reference model object to be compared against
+	 * @return Whether the rule is relevant for the
+	 * 				model objects
+	 */
+	public boolean isComparisonSupported(ModelObject main, ModelObject ref) {
+		return(main instanceof InterruptBlock &&
+				ref instanceof InterruptBlock);
+	}
+	
+	/**
+	 * This method compares a model object against a reference
+	 * component to determine if they are equal.
+	 * 
+	 * @param context The context
+	 * @param main The main model object
+	 * @param reference The reference model object
+	 * @param l The model listener
+	 * @param deep Perform a deep compare
+	 * @return Whether the model objects are comparable
+	 */
+	public boolean compare(ComparatorContext context, ModelObject main,
+					ModelObject reference, ModelListener l, boolean deep) {
+		boolean ret=false;
+
+		if (deep == false) {
+			ret = true;
+		}
+		
+		return(ret);
+	}
+	
+}

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.comparator/src/java/org/scribble/protocol/comparator/Messages.properties
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.protocol.comparator/src/java/org/scribble/protocol/comparator/Messages.properties	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.protocol.comparator/src/java/org/scribble/protocol/comparator/Messages.properties	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,20 @@
+# /*
+# * Copyright 2007 Pi4 Technologies Ltd
+# *
+# * Licensed under the Apache License, Version 2.0 (the "License");
+# * you may not use this file except in compliance with the License.
+# * You may obtain a copy of the License at
+# *
+# *     http://www.apache.org/licenses/LICENSE-2.0
+# *
+# * Unless required by applicable law or agreed to in writing, software
+# * distributed under the License is distributed on an "AS IS" BASIS,
+# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# * See the License for the specific language governing permissions and
+# * limitations under the License.
+# *
+# *
+# * Change History:
+# * 24 Nov 2007 : Initial version created by gary
+# */
+

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.comparator/src/java/org/scribble/protocol/comparator/ParallelComparatorRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.protocol.comparator/src/java/org/scribble/protocol/comparator/ParallelComparatorRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.protocol.comparator/src/java/org/scribble/protocol/comparator/ParallelComparatorRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,91 @@
+/*
+ * Copyright 2007 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 30 Nov 2007 : Initial version created by gary
+ */
+package org.scribble.protocol.comparator;
+
+import org.scribble.model.*;
+import org.scribble.model.admin.ModelListener;
+import org.scribble.comparator.*;
+import org.scribble.extensions.RegistryInfo;
+import org.scribble.protocol.model.*;
+
+/**
+ * This class provides the Parallel comparator rule.
+ */
+ at RegistryInfo(extension=ComparatorRule.class,notation=ProtocolNotation.NOTATION_CODE)
+public class ParallelComparatorRule implements ComparatorRule {
+
+	/**
+	 * This method determines whether the comparison rule is
+	 * associated with the supplied type.
+	 * 
+	 * @param obj The object to check
+	 * @return Whether the object is of a type supported by the
+	 * 					comparison rule
+	 */
+	public boolean isTypeSupported(ModelObject obj) {
+		return(obj instanceof Parallel);
+	}
+	
+	/**
+	 * This method determines whether the comparison rule is
+	 * appropriate for the supplied model objects.
+	 * 
+	 * @param main The main model object to be compared
+	 * @param ref The reference model object to be compared against
+	 * @return Whether the rule is relevant for the
+	 * 				model objects
+	 */
+	public boolean isComparisonSupported(ModelObject main, ModelObject ref) {
+		return(main instanceof Parallel &&
+				ref instanceof Parallel);
+	}
+	
+	/**
+	 * This method compares a model object against a reference
+	 * component to determine if they are equal.
+	 * 
+	 * @param context The context
+	 * @param main The main model object
+	 * @param reference The reference model object
+	 * @param l The model listener
+	 * @param deep Perform a deep compare
+	 * @return Whether the model objects are comparable
+	 */
+	public boolean compare(ComparatorContext context, ModelObject main,
+					ModelObject reference, ModelListener l, boolean deep) {
+		boolean ret=false;
+		//Parallel mainp=(Parallel)main;
+		//Parallel refp=(Parallel)reference;
+
+		if (deep == false) {
+			// Shallow, so return true as both parallel
+			ret = true;
+		} else {
+			
+			// TODO: Decide how children should be dealt with
+			
+			// Check children - however not defined how the comparison
+			// should be done between multi-path
+		}
+		
+		return(ret);
+	}
+	
+}

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.comparator/src/java/org/scribble/protocol/comparator/ProtocolComparatorRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.protocol.comparator/src/java/org/scribble/protocol/comparator/ProtocolComparatorRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.protocol.comparator/src/java/org/scribble/protocol/comparator/ProtocolComparatorRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,114 @@
+/*
+ * Copyright 2007 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 24 Nov 2007 : Initial version created by gary
+ */
+package org.scribble.protocol.comparator;
+
+import org.scribble.model.*;
+import org.scribble.model.admin.ModelListener;
+import org.scribble.comparator.*;
+import org.scribble.conformance.model.BehaviourList;
+import org.scribble.extensions.RegistryInfo;
+import org.scribble.protocol.model.*;
+
+/**
+ * This class provides the Protocol comparator rule,
+ * for comparing a local Protocol for conformance.
+ */
+ at RegistryInfo(extension=ComparatorRule.class,notation=ProtocolNotation.NOTATION_CODE)
+public class ProtocolComparatorRule implements ComparatorRule {
+
+	/**
+	 * This method determines whether the comparison rule is
+	 * associated with the supplied type.
+	 * 
+	 * @param obj The object to check
+	 * @return Whether the object is of a type supported by the
+	 * 					comparison rule
+	 */
+	public boolean isTypeSupported(ModelObject obj) {
+		return(obj instanceof Protocol);
+	}
+	
+	/**
+	 * This method determines whether the comparison rule is
+	 * appropriate for the supplied model objects.
+	 * 
+	 * @param main The main model object to be compared
+	 * @param ref The reference model object to be compared against
+	 * @return Whether the rule is relevant for the
+	 * 				model objects
+	 */
+	public boolean isComparisonSupported(ModelObject main, ModelObject ref) {
+		// Check both Protocol's and located
+		return(main instanceof Protocol &&
+				ref instanceof Protocol &&
+				((Protocol)main).isStateless() ==
+					((Protocol)ref).isStateless() &&
+				((Protocol)main).getLocatedName() != null &&
+				((Protocol)main).getLocatedName().getRole() != null &&
+				((Protocol)ref).getLocatedName() != null &&
+				((Protocol)ref).getLocatedName().getRole() != null);
+	}
+	
+	/**
+	 * This method compares a model object against a reference
+	 * component to determine if they are equal.
+	 * 
+	 * @param context The context
+	 * @param main The main model object
+	 * @param reference The reference model object
+	 * @param l The model listener
+	 * @param deep Perform a deep compare
+	 * @return Whether the model objects are comparable
+	 */
+	public boolean compare(ComparatorContext context, ModelObject main,
+					ModelObject reference, ModelListener l, boolean deep) {
+		boolean ret=false;
+		Protocol mainp=(Protocol)main;
+		Protocol refp=(Protocol)reference;
+		
+		// Check if roles are comparable, taking into account
+		// mapping information provided by the context
+		if (deep && context.compare(mainp.getLocatedName().getRole(),
+						refp.getLocatedName().getRole(), l, deep)) {
+			ret = true;
+			
+			// TODO:
+			// Analysing comparison between protocols will need to collect
+			// information on the roles and channels to determine mapping
+			// for use with remaining activities
+			
+			// TODO:
+			// Possibly change protocol to use Block instead of list of Act
+			// and then visit the block - so next time the protocol is
+			// visited it can be ignored - but then this may be problem
+			
+			
+			// Check activities
+			
+			// Build list of behaviours
+			BehaviourList mainBehaviourList=BehaviourList.createBehaviourList(mainp.getBlock());
+			BehaviourList refBehaviourList=BehaviourList.createBehaviourList(refp.getBlock());
+			
+			context.compare(mainBehaviourList, refBehaviourList, l, true);
+		}
+		
+		return(ret);
+	}	
+}

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.comparator/src/java/org/scribble/protocol/comparator/RaiseComparatorRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.protocol.comparator/src/java/org/scribble/protocol/comparator/RaiseComparatorRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.protocol.comparator/src/java/org/scribble/protocol/comparator/RaiseComparatorRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,96 @@
+/*
+ * Copyright 2007-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 10 Nov 2008 : Initial version created by gary
+ */
+package org.scribble.protocol.comparator;
+
+import org.scribble.model.*;
+import org.scribble.model.admin.ModelListener;
+import org.scribble.comparator.*;
+import org.scribble.extensions.RegistryInfo;
+import org.scribble.protocol.model.*;
+
+/**
+ * This class provides the Protocol Raise to another
+ * Raise comparator rule.
+ */
+ at RegistryInfo(extension=ComparatorRule.class,notation=ProtocolNotation.NOTATION_CODE)
+public class RaiseComparatorRule implements ComparatorRule {
+
+	/**
+	 * This method determines whether the comparison rule is
+	 * associated with the supplied type.
+	 * 
+	 * @param obj The object to check
+	 * @return Whether the object is of a type supported by the
+	 * 					comparison rule
+	 */
+	public boolean isTypeSupported(ModelObject obj) {
+		return(obj instanceof Raise);
+	}
+	
+	/**
+	 * This method determines whether the comparison rule is
+	 * appropriate for the supplied model objects.
+	 * 
+	 * @param main The main model object to be compared
+	 * @param ref The reference model object to be compared against
+	 * @return Whether the rule is relevant for the
+	 * 				model objects
+	 */
+	public boolean isComparisonSupported(ModelObject main, ModelObject ref) {
+		return(main instanceof Raise &&
+				ref instanceof Raise);
+	}
+	
+	/**
+	 * This method compares a model object against a reference
+	 * component to determine if they are equal.
+	 * 
+	 * @param context The context
+	 * @param main The main model object
+	 * @param reference The reference model object
+	 * @param l The model listener
+	 * @param deep Perform a deep compare
+	 * @return Whether the model objects are comparable
+	 */
+	public boolean compare(ComparatorContext context, ModelObject main,
+					ModelObject reference, ModelListener l, boolean deep) {
+		boolean ret=false;
+		Raise raisem=(Raise)main;
+		Raise raiseref=(Raise)reference;
+		
+		if (deep == false) {
+			
+			if (raisem.getType() != null &&
+					raiseref.getType() != null) {
+				ret = context.compare(raisem.getType(),
+						raiseref.getType(), l, deep);
+				
+				// TODO: Check role is appropriate
+				// May depend whether global or local models
+				// If local models, then only matters whether
+				// projected role is either present or absent
+				// in both lists - if global, then may need
+				// to be matched lists
+			}
+		}
+
+		return(ret);
+	}	
+}

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.comparator/src/java/org/scribble/protocol/comparator/SpawnComparatorRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.protocol.comparator/src/java/org/scribble/protocol/comparator/SpawnComparatorRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.protocol.comparator/src/java/org/scribble/protocol/comparator/SpawnComparatorRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,78 @@
+/*
+ * Copyright 2007-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 20 Aug 2008 : Initial version created by gary
+ */
+package org.scribble.protocol.comparator;
+
+import org.scribble.model.*;
+import org.scribble.model.admin.ModelListener;
+import org.scribble.comparator.*;
+import org.scribble.extensions.RegistryInfo;
+import org.scribble.protocol.model.*;
+
+/**
+ * This class provides the Spawn comparator rule.
+ */
+ at RegistryInfo(extension=ComparatorRule.class,notation=ProtocolNotation.NOTATION_CODE)
+public class SpawnComparatorRule implements ComparatorRule {
+
+	/**
+	 * This method determines whether the comparison rule is
+	 * associated with the supplied type.
+	 * 
+	 * @param obj The object to check
+	 * @return Whether the object is of a type supported by the
+	 * 					comparison rule
+	 */
+	public boolean isTypeSupported(ModelObject obj) {
+		return(obj instanceof Spawn);
+	}
+	
+	/**
+	 * This method determines whether the comparison rule is
+	 * appropriate for the supplied model objects.
+	 * 
+	 * @param main The main model object to be compared
+	 * @param ref The reference model object to be compared against
+	 * @return Whether the rule is relevant for the
+	 * 				model objects
+	 */
+	public boolean isComparisonSupported(ModelObject main, ModelObject ref) {
+		return(main instanceof Spawn &&
+				ref instanceof Spawn);
+	}
+	
+	/**
+	 * This method compares a model object against a reference
+	 * component to determine if they are equal.
+	 * 
+	 * @param context The context
+	 * @param main The main model object
+	 * @param reference The reference model object
+	 * @param l The model listener
+	 * @param deep Perform a deep compare
+	 * @return Whether the model objects are comparable
+	 */
+	public boolean compare(ComparatorContext context, ModelObject main,
+					ModelObject reference, ModelListener l, boolean deep) {
+		boolean ret=true;
+		
+		return(ret);
+	}
+	
+}

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.comparator/src/java/org/scribble/protocol/comparator/TryEscapeComparatorRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.protocol.comparator/src/java/org/scribble/protocol/comparator/TryEscapeComparatorRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.protocol.comparator/src/java/org/scribble/protocol/comparator/TryEscapeComparatorRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,89 @@
+/*
+ * Copyright 2007-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 10 Nov 2008 : Initial version created by gary
+ */
+package org.scribble.protocol.comparator;
+
+import org.scribble.model.*;
+import org.scribble.model.admin.ModelListener;
+import org.scribble.comparator.*;
+import org.scribble.extensions.RegistryInfo;
+import org.scribble.protocol.model.*;
+
+/**
+ * This class provides the TryEscape comparator rule.
+ */
+ at RegistryInfo(extension=ComparatorRule.class,notation=ProtocolNotation.NOTATION_CODE)
+public class TryEscapeComparatorRule implements ComparatorRule {
+
+	/**
+	 * This method determines whether the comparison rule is
+	 * associated with the supplied type.
+	 * 
+	 * @param obj The object to check
+	 * @return Whether the object is of a type supported by the
+	 * 					comparison rule
+	 */
+	public boolean isTypeSupported(ModelObject obj) {
+		return(obj instanceof TryEscape);
+	}
+	
+	/**
+	 * This method determines whether the comparison rule is
+	 * appropriate for the supplied model objects.
+	 * 
+	 * @param main The main model object to be compared
+	 * @param ref The reference model object to be compared against
+	 * @return Whether the rule is relevant for the
+	 * 				model objects
+	 */
+	public boolean isComparisonSupported(ModelObject main, ModelObject ref) {
+		return(main instanceof TryEscape &&
+				ref instanceof TryEscape);
+	}
+	
+	/**
+	 * This method compares a model object against a reference
+	 * component to determine if they are equal.
+	 * 
+	 * @param context The context
+	 * @param main The main model object
+	 * @param reference The reference model object
+	 * @param l The model listener
+	 * @param deep Perform a deep compare
+	 * @return Whether the model objects are comparable
+	 */
+	public boolean compare(ComparatorContext context, ModelObject main,
+					ModelObject reference, ModelListener l, boolean deep) {
+		boolean ret=false;
+
+		if (deep == false) {
+			// Shallow, so return true as both choice
+			ret = true;
+		} else {
+			
+			// TODO: Decide how children should be dealt with
+			
+			// Check children - however not defined how the comparison
+			// should be done between multi-path
+		}
+		
+		return(ret);
+	}
+	
+}

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.comparator/src/java/org/scribble/protocol/comparator/osgi/Activator.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.protocol.comparator/src/java/org/scribble/protocol/comparator/osgi/Activator.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.protocol.comparator/src/java/org/scribble/protocol/comparator/osgi/Activator.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,48 @@
+package org.scribble.protocol.comparator.osgi;
+
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class Activator implements BundleActivator {
+
+	// The plug-in ID
+	public static final String PLUGIN_ID = "org.scribble.experimental.protocol.comparator";
+
+	// The shared instance
+	private static Activator plugin;
+	
+	/**
+	 * The constructor
+	 */
+	public Activator() {
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.eclipse.core.runtime.Plugins#start(org.osgi.framework.BundleContext)
+	 */
+	public void start(BundleContext context) throws Exception {
+		plugin = this;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.eclipse.core.runtime.Plugin#stop(org.osgi.framework.BundleContext)
+	 */
+	public void stop(BundleContext context) throws Exception {
+		plugin = null;
+	}
+
+	/**
+	 * Returns the shared instance
+	 *
+	 * @return the shared instance
+	 */
+	public static Activator getDefault() {
+		return plugin;
+	}
+
+}

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.comparator/src/test/org/scribble/protocol/comparator/ProtocolComparatorRuleTest.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.protocol.comparator/src/test/org/scribble/protocol/comparator/ProtocolComparatorRuleTest.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.protocol.comparator/src/test/org/scribble/protocol/comparator/ProtocolComparatorRuleTest.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,26 @@
+/*
+ * Copyright 2007 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 27 Nov 2007 : Initial version created by gary
+ */
+package org.scribble.protocol.comparator;
+
+import junit.framework.TestCase;
+
+public class ProtocolComparatorRuleTest extends TestCase {
+
+}

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.eclipse/.classpath
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.protocol.eclipse/.classpath	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.protocol.eclipse/.classpath	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+	<classpathentry kind="src" path="src/java"/>
+	<classpathentry kind="output" path="classes"/>
+</classpath>

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.eclipse/.project
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.protocol.eclipse/.project	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.protocol.eclipse/.project	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>org.scribble.protocol.eclipse</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.ManifestBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.SchemaBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.pde.PluginNature</nature>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+	</natures>
+</projectDescription>

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.eclipse/LICENSE.txt
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.protocol.eclipse/LICENSE.txt	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.protocol.eclipse/LICENSE.txt	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,201 @@
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.eclipse/META-INF/MANIFEST.MF
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.protocol.eclipse/META-INF/MANIFEST.MF	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.protocol.eclipse/META-INF/MANIFEST.MF	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,15 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Protocol Eclipse Plug-in
+Bundle-SymbolicName: org.scribble.protocol.eclipse
+Bundle-Version: 0.1.0.qualifier
+Bundle-Activator: org.scribble.protocol.eclipse.Activator
+Bundle-Vendor: www.scribble.org
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Import-Package: org.osgi.framework;version="1.3.0"
+Require-Bundle: org.eclipse.swt,
+ org.eclipse.jface,
+ org.scribble.core,
+ org.scribble.protocol.model,
+ org.scribble.eclipse
+Scribble-Extensions: org.scribble.protocol.eclipse.model.outliner.ProtocolModelOutlinerRule

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.eclipse/build.properties
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.protocol.eclipse/build.properties	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.protocol.eclipse/build.properties	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,4 @@
+source.. = src/java/
+output.. = classes/
+bin.includes = META-INF/,\
+               .

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.eclipse/classes/org/scribble/protocol/eclipse/Activator.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.protocol.eclipse/classes/org/scribble/protocol/eclipse/Activator.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.eclipse/classes/org/scribble/protocol/eclipse/model/images/ScribbleImages.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.protocol.eclipse/classes/org/scribble/protocol/eclipse/model/images/ScribbleImages.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.eclipse/classes/org/scribble/protocol/eclipse/model/images/protocol.png
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.protocol.eclipse/classes/org/scribble/protocol/eclipse/model/images/protocol.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.eclipse/classes/org/scribble/protocol/eclipse/model/outliner/ProtocolModelOutlinerRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.protocol.eclipse/classes/org/scribble/protocol/eclipse/model/outliner/ProtocolModelOutlinerRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.eclipse/src/java/org/scribble/protocol/eclipse/Activator.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.protocol.eclipse/src/java/org/scribble/protocol/eclipse/Activator.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.protocol.eclipse/src/java/org/scribble/protocol/eclipse/Activator.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,22 @@
+package org.scribble.protocol.eclipse;
+
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+
+public class Activator implements BundleActivator {
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext)
+	 */
+	public void start(BundleContext context) throws Exception {
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext)
+	 */
+	public void stop(BundleContext context) throws Exception {
+	}
+
+}

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.eclipse/src/java/org/scribble/protocol/eclipse/model/images/ScribbleImages.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.protocol.eclipse/src/java/org/scribble/protocol/eclipse/model/images/ScribbleImages.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.protocol.eclipse/src/java/org/scribble/protocol/eclipse/model/images/ScribbleImages.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,71 @@
+/*
+ * Copyright 2007-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 21 Feb 2008 : Initial version created by gary
+ */
+package org.scribble.protocol.eclipse.model.images;
+
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.jface.resource.ImageDescriptor;
+
+/**
+ * This class provides access to images configured within the
+ * environment.
+ */
+public class ScribbleImages {
+
+	/**
+     * This method returns the image associated with the
+     * supplied name.
+     * 
+     * @param name The name
+     * @return The image
+     */
+    public static Image getImage(String name) {
+    	Image ret=null;
+    	
+    	// Make sure the image descriptor is registered
+    	getImageDescriptor(name);
+    	
+    	ret = m_registry.get(name);
+    	
+    	return(ret);
+    }
+    
+    /**
+     * This method returns the image descriptor associated with the
+     * supplied name.
+     * 
+     * @param name The name
+     * @return The descriptor
+     */
+    public static ImageDescriptor getImageDescriptor(String name) {
+    	ImageDescriptor ret=null;
+    	
+    	if ((ret = m_registry.getDescriptor(name)) == null) {
+    	    ret = ImageDescriptor.createFromFile(ScribbleImages.class,
+    	    				name);
+    	    
+    	    m_registry.put(name, ret);
+    	}
+    	
+    	return(ret);
+    }
+
+    private static org.eclipse.jface.resource.ImageRegistry m_registry=
+    		new org.eclipse.jface.resource.ImageRegistry();
+}

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.eclipse/src/java/org/scribble/protocol/eclipse/model/images/protocol.png
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.protocol.eclipse/src/java/org/scribble/protocol/eclipse/model/images/protocol.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.eclipse/src/java/org/scribble/protocol/eclipse/model/outliner/ProtocolModelOutlinerRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.protocol.eclipse/src/java/org/scribble/protocol/eclipse/model/outliner/ProtocolModelOutlinerRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.protocol.eclipse/src/java/org/scribble/protocol/eclipse/model/outliner/ProtocolModelOutlinerRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,188 @@
+/*
+ * Copyright 2007-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 21 Feb 2008 : Initial version created by gary
+ */
+package org.scribble.protocol.eclipse.model.outliner;
+
+import org.eclipse.swt.graphics.Image;
+import org.scribble.eclipse.model.outliner.*;
+import org.scribble.extensions.RegistryInfo;
+import org.scribble.protocol.model.*;
+import org.scribble.model.*;
+
+/**
+ * This class provides the model outliner details for the
+ * protocol notation.
+ */
+ at RegistryInfo(extension=OutlinerRule.class,notation=ProtocolNotation.NOTATION_CODE)
+public class ProtocolModelOutlinerRule extends AbstractModelOutlinerRule {
+
+	/**
+	 * This method determines whether the outliner rules is
+	 * appropriate to process the supplied element.
+	 * 
+	 * @param element The element
+	 * @return Whether the outliner rule can process the
+	 * 						supplied element
+	 */
+	public boolean isSupported(Object element) {
+		boolean ret=false;
+		
+		if (element instanceof ProtocolModel ||
+				element instanceof Protocol ||
+				element instanceof RecursionBlock ||
+				element instanceof CatchBlock ||
+				element instanceof InterruptBlock ||
+				element instanceof TryEscape ||
+				element instanceof Parallel ||
+				element instanceof Raise ||
+				element instanceof Run ||
+				element instanceof Spawn ||
+				element instanceof Recur ||
+				element instanceof Repeat) {
+			ret = true;
+		} else {
+			ret = super.isSupported(element);
+		}
+		
+		return(ret);
+	}
+	
+	/**
+	 * This method returns the label to be displayed
+	 * for the supplied object.
+	 * 
+	 * @param obj The object
+	 * @return The label
+	 */
+	public String getLabel(Object obj) {
+		String ret=null;
+		
+		if (obj instanceof Protocol) {
+			ret = ((Protocol)obj).getLocatedName().getName();
+			
+			if (((Protocol)obj).getLocatedName().getRole() != null) {
+				ret += "@"+((Protocol)obj).getLocatedName().getRole().getName();
+			}
+		} else if (obj instanceof Block) {
+		
+			if (((Block)obj).getParent() instanceof Choice) {
+				ret = "or";
+			} else if (((Block)obj).getParent() instanceof Parallel) {
+				ret = "and";
+			}
+		} else if (obj instanceof Choice) {			
+			ret = "Choice";
+			
+		} else if (obj instanceof Parallel) {			
+			ret = "Parallel";
+			
+		} else if (obj instanceof Repeat) {			
+			ret = "Repeat";
+			
+		} else if (obj instanceof Recur) {
+			ret = "Recur ";
+			
+			if (((Recur)obj).getRecursionBlock() != null &&
+					((Recur)obj).getRecursionBlock().getName() != null) {
+				ret += ((Recur)obj).getRecursionBlock().getName();
+			}
+		} else if (obj instanceof Run) {			
+			ret = "Run "+getReferenceDescription(((Run)obj).getReference());
+		} else if (obj instanceof Spawn) {			
+			ret = "Spawn "+getReferenceDescription(((Spawn)obj).getReference());
+		} else {
+			ret = super.getLabel(obj);
+		}
+		
+		return(ret);
+	}
+	
+	/**
+	 * This method returns an optional image associated with
+	 * the supplied object.
+	 * 
+	 * @param obj The object
+	 * @return The image, or null if no image to display
+	 */
+	public org.eclipse.swt.graphics.Image getImage(Object obj) {
+		Image ret=null;
+
+		if (obj instanceof Protocol) {
+			ret = org.scribble.protocol.eclipse.model.images.ScribbleImages.getImage("protocol.png");
+		} else {
+			ret = super.getImage(obj);
+		}
+		
+		return(ret);		
+	}
+	
+	/**
+	 * This method returns the list of children associated
+	 * with the supplied object.
+	 * 
+	 * @param obj The object
+	 * @return The list of child objects
+	 */
+	public java.util.List<Object> getChildren(Object obj) {
+		java.util.List<Object> ret=null;
+		
+		if (obj instanceof ProtocolModel) {
+			ProtocolModel pm=(ProtocolModel)obj;
+			
+			ret = super.getModelChildren(pm);
+
+			if (pm.getProtocol() != null) {
+				ret.add(pm.getProtocol());
+			}
+		} else if (obj instanceof Repeat) {
+			ret = new java.util.Vector<Object>(((Repeat)obj).getBlock().getContents());
+			
+		} else if (obj instanceof RecursionBlock) {
+			ret = new java.util.Vector<Object>(((RecursionBlock)obj).getBlock().getContents());
+		} else {
+			ret = super.getChildren(obj);
+		}
+		
+		return(ret);
+	}
+	
+	/**
+	 * This method determines whether the supplied object has
+	 * children.
+	 * 
+	 * @param obj The object
+	 * @return Whether the object has children
+	 */
+	public boolean hasChildren(Object obj) {
+		boolean ret=false;
+		
+		if (obj instanceof Repeat &&
+				((Repeat)obj).getBlock().getContents().size() > 0) {
+			ret = true;
+		} else if (obj instanceof RecursionBlock &&
+				((RecursionBlock)obj).getBlock().getContents().size() > 0) {
+			ret = true;
+		} else {
+			ret = super.hasChildren(obj);
+		}
+		
+		return(ret);
+	}
+	
+}

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.export.text/.classpath
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.protocol.export.text/.classpath	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.protocol.export.text/.classpath	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="src" path="src/java"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+	<classpathentry kind="output" path="classes"/>
+</classpath>

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.export.text/.project
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.protocol.export.text/.project	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.protocol.export.text/.project	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>org.scribble.protocol.export.text</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.ManifestBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.SchemaBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.pde.PluginNature</nature>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+	</natures>
+</projectDescription>

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.export.text/LICENSE.txt
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.protocol.export.text/LICENSE.txt	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.protocol.export.text/LICENSE.txt	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,201 @@
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.export.text/META-INF/MANIFEST.MF
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.protocol.export.text/META-INF/MANIFEST.MF	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.protocol.export.text/META-INF/MANIFEST.MF	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,23 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Scribble Protocol Export Text Plug-in
+Bundle-SymbolicName: org.scribble.protocol.export.text;singleton:=true
+Bundle-Version: 0.1.0.qualifier
+Bundle-Activator: org.scribble.protocol.export.text.osgi.Activator
+Bundle-Vendor: www.scribble.org
+Import-Package: org.osgi.framework;version="1.3.0"
+Require-Bundle: org.scribble.core,
+ org.scribble.protocol.model
+Bundle-ActivationPolicy: lazy
+Scribble-Extensions: org.scribble.protocol.export.text.ProtocolModelTextExportRule,
+  org.scribble.protocol.export.text.ProtocolTextExportRule,
+  org.scribble.protocol.export.text.ProtocolReferenceTextExportRule,
+  org.scribble.protocol.export.text.RecurTextExportRule,
+  org.scribble.protocol.export.text.RecursionBlockTextExportRule,
+  org.scribble.protocol.export.text.RepeatTextExportRule,
+  org.scribble.protocol.export.text.RunTextExportRule,
+  org.scribble.protocol.export.text.ParallelTextExportRule,
+  org.scribble.protocol.export.text.ChoiceTextExportRule,
+  org.scribble.protocol.export.text.TryEscapeTextExportRule,
+  org.scribble.protocol.export.text.CatchBlockTextExportRule,
+  org.scribble.protocol.export.text.InterruptBlockTextExportRule

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.export.text/build.properties
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.protocol.export.text/build.properties	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.protocol.export.text/build.properties	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,5 @@
+source.. = src/java/
+output.. = classes/
+bin.includes = META-INF/,\
+               .,\
+               plugin.xml

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.export.text/classes/org/scribble/protocol/export/text/CatchBlockTextExportRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.protocol.export.text/classes/org/scribble/protocol/export/text/CatchBlockTextExportRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.export.text/classes/org/scribble/protocol/export/text/ChoiceTextExportRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.protocol.export.text/classes/org/scribble/protocol/export/text/ChoiceTextExportRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.export.text/classes/org/scribble/protocol/export/text/InterruptBlockTextExportRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.protocol.export.text/classes/org/scribble/protocol/export/text/InterruptBlockTextExportRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.export.text/classes/org/scribble/protocol/export/text/ParallelTextExportRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.protocol.export.text/classes/org/scribble/protocol/export/text/ParallelTextExportRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.export.text/classes/org/scribble/protocol/export/text/ProtocolModelTextExportRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.protocol.export.text/classes/org/scribble/protocol/export/text/ProtocolModelTextExportRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.export.text/classes/org/scribble/protocol/export/text/ProtocolReferenceTextExportRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.protocol.export.text/classes/org/scribble/protocol/export/text/ProtocolReferenceTextExportRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.export.text/classes/org/scribble/protocol/export/text/ProtocolTextExportRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.protocol.export.text/classes/org/scribble/protocol/export/text/ProtocolTextExportRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.export.text/classes/org/scribble/protocol/export/text/RaiseTextExportRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.protocol.export.text/classes/org/scribble/protocol/export/text/RaiseTextExportRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.export.text/classes/org/scribble/protocol/export/text/RecurTextExportRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.protocol.export.text/classes/org/scribble/protocol/export/text/RecurTextExportRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.export.text/classes/org/scribble/protocol/export/text/RecursionBlockTextExportRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.protocol.export.text/classes/org/scribble/protocol/export/text/RecursionBlockTextExportRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.export.text/classes/org/scribble/protocol/export/text/RepeatTextExportRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.protocol.export.text/classes/org/scribble/protocol/export/text/RepeatTextExportRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.export.text/classes/org/scribble/protocol/export/text/RunTextExportRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.protocol.export.text/classes/org/scribble/protocol/export/text/RunTextExportRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.export.text/classes/org/scribble/protocol/export/text/TryEscapeTextExportRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.protocol.export.text/classes/org/scribble/protocol/export/text/TryEscapeTextExportRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.export.text/classes/org/scribble/protocol/export/text/osgi/Activator.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.protocol.export.text/classes/org/scribble/protocol/export/text/osgi/Activator.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.export.text/src/java/org/scribble/protocol/export/text/CatchBlockTextExportRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.protocol.export.text/src/java/org/scribble/protocol/export/text/CatchBlockTextExportRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.protocol.export.text/src/java/org/scribble/protocol/export/text/CatchBlockTextExportRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,81 @@
+/*
+ * Copyright 2005-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 19 Oct 2008 : Initial version created by gary
+ */
+package org.scribble.protocol.export.text;
+
+import org.scribble.export.*;
+import org.scribble.export.text.*;
+import org.scribble.extensions.RegistryInfo;
+import org.scribble.model.*;
+import org.scribble.protocol.model.*;
+
+/**
+ * This class implements the text based export rule for the
+ * CatchBlock entity.
+ */
+ at RegistryInfo(extension=ExportRule.class,notation=ProtocolNotation.NOTATION_CODE)
+public class CatchBlockTextExportRule extends AbstractBlockTextExportRule {
+
+	/**
+	 * This method determines whether the exporter rule is appropriate
+	 * for the supplied model object and format.
+	 * 
+	 * @param modelObject The model object
+	 * @param format The format
+	 * @return Whether the rule is appropriate for the model object and
+	 * 						format
+	 */
+	public boolean isSupported(ModelObject modelObject, Formatter format) {
+		return(modelObject.getClass() == CatchBlock.class &&
+				format instanceof TextFormatter);
+	}
+
+	/**
+	 * This method exports the model object.
+	 * 
+	 * @param modelObject The model object
+	 * @param context The context
+	 * @throws IOException Failed to record export information
+	 */
+	public void export(ModelObject modelObject, ExporterContext context)
+							throws java.io.IOException {
+		CatchBlock elem=(CatchBlock)modelObject;
+		TextFormatter formatter=(TextFormatter)context.getFormatter();
+		
+		formatter.record("catch");
+		
+		if (elem.getRoles().size() > 0) {
+			formatter.record(" @ ");
+
+			for (int i=0; i < elem.getRoles().size(); i++) {
+				if (i > 0) {
+					formatter.record(",");
+				}				
+				formatter.record(elem.getRoles().get(i).getName());
+			}
+		}
+		
+		if (elem.getType() != null) {
+			formatter.record(" ");
+			context.export(elem.getType());
+		}
+
+		super.export(elem, context);
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.export.text/src/java/org/scribble/protocol/export/text/ChoiceTextExportRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.protocol.export.text/src/java/org/scribble/protocol/export/text/ChoiceTextExportRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.protocol.export.text/src/java/org/scribble/protocol/export/text/ChoiceTextExportRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,82 @@
+/*
+ * Copyright 2007 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 21 Dec 2007 : Initial version created by gary
+ */
+package org.scribble.protocol.export.text;
+
+import org.scribble.export.*;
+import org.scribble.export.text.*;
+import org.scribble.extensions.RegistryInfo;
+import org.scribble.model.*;
+import org.scribble.protocol.model.*;
+
+/**
+ * This class implements the text based export rule for the
+ * Choice entity.
+ */
+ at RegistryInfo(extension=ExportRule.class,notation=ProtocolNotation.NOTATION_CODE)
+public class ChoiceTextExportRule implements ExportRule {
+
+	/**
+	 * This method determines whether the exporter rule is appropriate
+	 * for the supplied model object and format.
+	 * 
+	 * @param modelObject The model object
+	 * @param format The format
+	 * @return Whether the rule is appropriate for the model object and
+	 * 						format
+	 */
+	public boolean isSupported(ModelObject modelObject, Formatter format) {
+		return(Choice.class.isAssignableFrom(modelObject.getClass()) &&
+				format instanceof TextFormatter);
+	}
+
+	/**
+	 * This method exports the model object.
+	 * 
+	 * @param modelObject The model object
+	 * @param context The context
+	 * @throws IOException Failed to record export information
+	 */
+	public void export(ModelObject modelObject, ExporterContext context)
+							throws java.io.IOException {
+		Choice choice=(Choice)modelObject;
+		TextFormatter formatter=(TextFormatter)context.getFormatter();
+		
+		formatter.record("choice");
+		
+		if (choice.getRoles().size() > 0) {
+			formatter.record(" @ ");
+			for (int i=0; i < choice.getRoles().size(); i++) {
+				if (i > 0) {
+					formatter.record(",");
+				}
+				formatter.record(choice.getRoles().get(i).getName());
+			}
+		}
+		
+		for (int i=0; i < choice.getBlocks().size(); i++) {
+			
+			if (i > 0) {
+				formatter.record(" or");
+			}
+
+			context.export(choice.getBlocks().get(i));
+		}
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.export.text/src/java/org/scribble/protocol/export/text/InterruptBlockTextExportRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.protocol.export.text/src/java/org/scribble/protocol/export/text/InterruptBlockTextExportRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.protocol.export.text/src/java/org/scribble/protocol/export/text/InterruptBlockTextExportRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,76 @@
+/*
+ * Copyright 2005-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 19 Oct 2008 : Initial version created by gary
+ */
+package org.scribble.protocol.export.text;
+
+import org.scribble.export.*;
+import org.scribble.export.text.*;
+import org.scribble.extensions.RegistryInfo;
+import org.scribble.model.*;
+import org.scribble.protocol.model.*;
+
+/**
+ * This class implements the text based export rule for the
+ * InterruptBlock entity.
+ */
+ at RegistryInfo(extension=ExportRule.class,notation=ProtocolNotation.NOTATION_CODE)
+public class InterruptBlockTextExportRule extends AbstractBlockTextExportRule {
+
+	/**
+	 * This method determines whether the exporter rule is appropriate
+	 * for the supplied model object and format.
+	 * 
+	 * @param modelObject The model object
+	 * @param format The format
+	 * @return Whether the rule is appropriate for the model object and
+	 * 						format
+	 */
+	public boolean isSupported(ModelObject modelObject, Formatter format) {
+		return(modelObject.getClass() == InterruptBlock.class &&
+				format instanceof TextFormatter);
+	}
+
+	/**
+	 * This method exports the model object.
+	 * 
+	 * @param modelObject The model object
+	 * @param context The context
+	 * @throws IOException Failed to record export information
+	 */
+	public void export(ModelObject modelObject, ExporterContext context)
+							throws java.io.IOException {
+		InterruptBlock elem=(InterruptBlock)modelObject;
+		TextFormatter formatter=(TextFormatter)context.getFormatter();
+		
+		formatter.record("interrupt");
+		
+		if (elem.getRoles().size() > 0) {
+			formatter.record(" @ ");
+
+			for (int i=0; i < elem.getRoles().size(); i++) {
+				if (i > 0) {
+					formatter.record(",");
+				}				
+				formatter.record(elem.getRoles().get(i).getName());
+			}
+		}
+
+		super.export(elem, context);
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.export.text/src/java/org/scribble/protocol/export/text/ParallelTextExportRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.protocol.export.text/src/java/org/scribble/protocol/export/text/ParallelTextExportRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.protocol.export.text/src/java/org/scribble/protocol/export/text/ParallelTextExportRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,72 @@
+/*
+ * Copyright 2007 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 21 Dec 2007 : Initial version created by gary
+ */
+package org.scribble.protocol.export.text;
+
+import org.scribble.export.*;
+import org.scribble.export.text.*;
+import org.scribble.extensions.RegistryInfo;
+import org.scribble.model.*;
+import org.scribble.protocol.model.*;
+
+/**
+ * This class implements the text based export rule for the
+ * Parallel entity.
+ */
+ at RegistryInfo(extension=ExportRule.class,notation=ProtocolNotation.NOTATION_CODE)
+public class ParallelTextExportRule implements ExportRule {
+
+	/**
+	 * This method determines whether the exporter rule is appropriate
+	 * for the supplied model object and format.
+	 * 
+	 * @param modelObject The model object
+	 * @param format The format
+	 * @return Whether the rule is appropriate for the model object and
+	 * 						format
+	 */
+	public boolean isSupported(ModelObject modelObject, Formatter format) {
+		return(Parallel.class.isAssignableFrom(modelObject.getClass()) &&
+				format instanceof TextFormatter);
+	}
+
+	/**
+	 * This method exports the model object.
+	 * 
+	 * @param modelObject The model object
+	 * @param context The context
+	 * @throws IOException Failed to record export information
+	 */
+	public void export(ModelObject modelObject, ExporterContext context)
+							throws java.io.IOException {
+		Parallel parallel=(Parallel)modelObject;
+		TextFormatter formatter=(TextFormatter)context.getFormatter();
+		
+		formatter.record("parallel");
+		
+		for (int i=0; i < parallel.getBlocks().size(); i++) {
+			
+			if (i > 0) {
+				formatter.record(" and");
+			}
+
+			context.export(parallel.getBlocks().get(i));
+		}
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.export.text/src/java/org/scribble/protocol/export/text/ProtocolModelTextExportRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.protocol.export.text/src/java/org/scribble/protocol/export/text/ProtocolModelTextExportRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.protocol.export.text/src/java/org/scribble/protocol/export/text/ProtocolModelTextExportRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,66 @@
+/*
+ * Copyright 2007 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 17 Dec 2007 : Initial version created by gary
+ */
+package org.scribble.protocol.export.text;
+
+import org.scribble.export.*;
+import org.scribble.export.text.*;
+import org.scribble.extensions.RegistryInfo;
+import org.scribble.model.*;
+import org.scribble.protocol.model.*;
+
+/**
+ * This class implements the text based export rule for the
+ * ProtocolModel entity.
+ */
+ at RegistryInfo(extension=ExportRule.class,notation=ProtocolNotation.NOTATION_CODE)
+public class ProtocolModelTextExportRule extends AbstractModelTextExportRule {
+
+	/**
+	 * This method determines whether the exporter rule is appropriate
+	 * for the supplied model object and format.
+	 * 
+	 * @param modelObject The model object
+	 * @param format The format
+	 * @return Whether the rule is appropriate for the model object and
+	 * 						format
+	 */
+	public boolean isSupported(ModelObject modelObject, Formatter format) {
+		return(super.isSupported(modelObject, format) &&
+				ProtocolModel.class.isAssignableFrom(modelObject.getClass()));
+	}
+
+	/**
+	 * This method exports the model object.
+	 * 
+	 * @param modelObject The model object
+	 * @param context The context
+	 * @throws IOException Failed to record export information
+	 */
+	public void export(ModelObject modelObject, ExporterContext context)
+							throws java.io.IOException {
+		ProtocolModel model=(ProtocolModel)modelObject;
+		
+		super.export(model, context);
+		
+		if (model.getProtocol() != null) {
+			context.export(model.getProtocol());
+		}
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.export.text/src/java/org/scribble/protocol/export/text/ProtocolReferenceTextExportRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.protocol.export.text/src/java/org/scribble/protocol/export/text/ProtocolReferenceTextExportRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.protocol.export.text/src/java/org/scribble/protocol/export/text/ProtocolReferenceTextExportRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,63 @@
+/*
+ * Copyright 2007-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 9 Mar 2008 : Initial version created by gary
+ */
+package org.scribble.protocol.export.text;
+
+import org.scribble.export.*;
+import org.scribble.export.text.*;
+import org.scribble.extensions.RegistryInfo;
+import org.scribble.model.*;
+import org.scribble.protocol.model.*;
+
+/**
+ * This class implements the text based export rule for the
+ * ProtocolReference entity.
+ */
+ at RegistryInfo(extension=ExportRule.class,notation=ProtocolNotation.NOTATION_CODE)
+public class ProtocolReferenceTextExportRule
+					extends AbstractModelReferenceTextExportRule {
+
+	/**
+	 * This method determines whether the exporter rule is appropriate
+	 * for the supplied model object and format.
+	 * 
+	 * @param modelObject The model object
+	 * @param format The format
+	 * @return Whether the rule is appropriate for the model object and
+	 * 						format
+	 */
+	public boolean isSupported(ModelObject modelObject, Formatter format) {
+		return(super.isSupported(modelObject, format) &&
+				ProtocolReference.class.isAssignableFrom(modelObject.getClass()));
+	}
+
+	/**
+	 * This method exports the model object.
+	 * 
+	 * @param modelObject The model object
+	 * @param context The context
+	 * @throws IOException Failed to record export information
+	 */
+	public void export(ModelObject modelObject, ExporterContext context)
+							throws java.io.IOException {
+		ProtocolReference ref=(ProtocolReference)modelObject;
+		
+		super.export(ref, context);
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.export.text/src/java/org/scribble/protocol/export/text/ProtocolTextExportRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.protocol.export.text/src/java/org/scribble/protocol/export/text/ProtocolTextExportRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.protocol.export.text/src/java/org/scribble/protocol/export/text/ProtocolTextExportRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,79 @@
+/*
+ * Copyright 2007 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 20 Dec 2007 : Initial version created by gary
+ */
+package org.scribble.protocol.export.text;
+
+import org.scribble.export.*;
+import org.scribble.export.text.*;
+import org.scribble.extensions.RegistryInfo;
+import org.scribble.model.*;
+import org.scribble.protocol.model.*;
+
+/**
+ * This class implements the text based export rule for the
+ * Protocol entity.
+ */
+ at RegistryInfo(extension=ExportRule.class,notation=ProtocolNotation.NOTATION_CODE)
+public class ProtocolTextExportRule implements ExportRule {
+
+	/**
+	 * This method determines whether the exporter rule is appropriate
+	 * for the supplied model object and format.
+	 * 
+	 * @param modelObject The model object
+	 * @param format The format
+	 * @return Whether the rule is appropriate for the model object and
+	 * 						format
+	 */
+	public boolean isSupported(ModelObject modelObject, Formatter format) {
+		return(Protocol.class.isAssignableFrom(modelObject.getClass()) &&
+				format instanceof TextFormatter);
+	}
+
+	/**
+	 * This method exports the model object.
+	 * 
+	 * @param modelObject The model object
+	 * @param context The context
+	 * @throws IOException Failed to record export information
+	 */
+	public void export(ModelObject modelObject, ExporterContext context)
+							throws java.io.IOException {
+		Protocol protocol=(Protocol)modelObject;
+		TextFormatter formatter=(TextFormatter)context.getFormatter();
+		
+		formatter.record("protocol ");
+		
+		context.export(protocol.getLocatedName());
+		
+		if (protocol.getConformsTo().size() > 0) {
+			formatter.record(" conformsTo ");
+			
+			for (int i=0; i < protocol.getConformsTo().size(); i++) {
+				
+				if (i > 0) {
+					formatter.record(", ");
+				}
+				context.export(protocol.getConformsTo().get(i));
+			}
+		}
+
+		context.export(protocol.getBlock());
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.export.text/src/java/org/scribble/protocol/export/text/RaiseTextExportRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.protocol.export.text/src/java/org/scribble/protocol/export/text/RaiseTextExportRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.protocol.export.text/src/java/org/scribble/protocol/export/text/RaiseTextExportRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,78 @@
+/*
+ * Copyright 2007-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 10 Nov, 2008 : Initial version created by gary
+ */
+package org.scribble.protocol.export.text;
+
+import org.scribble.export.*;
+import org.scribble.export.text.*;
+import org.scribble.extensions.RegistryInfo;
+import org.scribble.model.*;
+import org.scribble.protocol.model.*;
+
+/**
+ * This class implements the text based export rule for the
+ * Raise entity.
+ */
+ at RegistryInfo(extension=ExportRule.class,notation=ProtocolNotation.NOTATION_CODE) //,preference=10,category=Raise.class)
+public class RaiseTextExportRule implements ExportRule {
+
+	/**
+	 * This method determines whether the exporter rule is appropriate
+	 * for the supplied model object and format.
+	 * 
+	 * @param modelObject The model object
+	 * @param format The format
+	 * @return Whether the rule is appropriate for the model object and
+	 * 						format
+	 */
+	public boolean isSupported(ModelObject modelObject, Formatter format) {
+		return(Raise.class.isAssignableFrom(modelObject.getClass()) &&
+				format instanceof TextFormatter);
+	}
+
+	/**
+	 * This method exports the model object.
+	 * 
+	 * @param modelObject The model object
+	 * @param context The context
+	 * @throws IOException Failed to record export information
+	 */
+	public void export(ModelObject modelObject, ExporterContext context)
+							throws java.io.IOException {
+		Raise raise=(Raise)modelObject;
+		TextFormatter formatter=(TextFormatter)context.getFormatter();
+		
+		formatter.record("raise");
+		
+		if (raise.getRoles().size() > 0) {
+			formatter.record(" @ ");
+
+			for (int i=0; i < raise.getRoles().size(); i++) {
+				if (i > 0) {
+					formatter.record(",");
+				}				
+				formatter.record(raise.getRoles().get(i).getName());
+			}
+		}
+
+		if (raise.getType() != null) {
+			context.export(raise.getType());
+		}
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.export.text/src/java/org/scribble/protocol/export/text/RecurTextExportRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.protocol.export.text/src/java/org/scribble/protocol/export/text/RecurTextExportRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.protocol.export.text/src/java/org/scribble/protocol/export/text/RecurTextExportRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,68 @@
+/*
+ * Copyright 2007-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 9 Mar 2008 : Initial version created by gary
+ */
+package org.scribble.protocol.export.text;
+
+import org.scribble.export.*;
+import org.scribble.export.text.*;
+import org.scribble.extensions.RegistryInfo;
+import org.scribble.model.*;
+import org.scribble.protocol.model.*;
+
+/**
+ * This class implements the text based export rule for the
+ * Recur entity.
+ */
+ at RegistryInfo(extension=ExportRule.class,notation=ProtocolNotation.NOTATION_CODE)
+public class RecurTextExportRule implements ExportRule {
+
+	/**
+	 * This method determines whether the exporter rule is appropriate
+	 * for the supplied model object and format.
+	 * 
+	 * @param modelObject The model object
+	 * @param format The format
+	 * @return Whether the rule is appropriate for the model object and
+	 * 						format
+	 */
+	public boolean isSupported(ModelObject modelObject, Formatter format) {
+		return(Recur.class.isAssignableFrom(modelObject.getClass()) &&
+				format instanceof TextFormatter);
+	}
+
+	/**
+	 * This method exports the model object.
+	 * 
+	 * @param modelObject The model object
+	 * @param context The context
+	 * @throws IOException Failed to record export information
+	 */
+	public void export(ModelObject modelObject, ExporterContext context)
+							throws java.io.IOException {
+		Recur recur=(Recur)modelObject;
+		TextFormatter formatter=(TextFormatter)context.getFormatter();
+		
+		formatter.record("recur ");
+		
+		if (recur.getRecursionBlock() != null &&
+				recur.getRecursionBlock().getName() != null) {
+			formatter.record(recur.getRecursionBlock().getName());
+		}
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.export.text/src/java/org/scribble/protocol/export/text/RecursionBlockTextExportRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.protocol.export.text/src/java/org/scribble/protocol/export/text/RecursionBlockTextExportRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.protocol.export.text/src/java/org/scribble/protocol/export/text/RecursionBlockTextExportRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,65 @@
+/*
+ * Copyright 2007-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 9 Mar 2008 : Initial version created by gary
+ */
+package org.scribble.protocol.export.text;
+
+import org.scribble.export.*;
+import org.scribble.export.text.*;
+import org.scribble.extensions.RegistryInfo;
+import org.scribble.model.*;
+import org.scribble.protocol.model.*;
+
+/**
+ * This class implements the text based export rule for the
+ * RecursionBlock entity.
+ */
+ at RegistryInfo(extension=ExportRule.class,notation=ProtocolNotation.NOTATION_CODE)
+public class RecursionBlockTextExportRule implements ExportRule {
+
+	/**
+	 * This method determines whether the exporter rule is appropriate
+	 * for the supplied model object and format.
+	 * 
+	 * @param modelObject The model object
+	 * @param format The format
+	 * @return Whether the rule is appropriate for the model object and
+	 * 						format
+	 */
+	public boolean isSupported(ModelObject modelObject, Formatter format) {
+		return(RecursionBlock.class.isAssignableFrom(modelObject.getClass()) &&
+				format instanceof TextFormatter);
+	}
+
+	/**
+	 * This method exports the model object.
+	 * 
+	 * @param modelObject The model object
+	 * @param context The context
+	 * @throws IOException Failed to record export information
+	 */
+	public void export(ModelObject modelObject, ExporterContext context)
+							throws java.io.IOException {
+		RecursionBlock recur=(RecursionBlock)modelObject;
+		TextFormatter formatter=(TextFormatter)context.getFormatter();
+		
+		formatter.record(recur.getName()+":");
+		
+		context.export(recur.getBlock());
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.export.text/src/java/org/scribble/protocol/export/text/RepeatTextExportRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.protocol.export.text/src/java/org/scribble/protocol/export/text/RepeatTextExportRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.protocol.export.text/src/java/org/scribble/protocol/export/text/RepeatTextExportRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,75 @@
+/*
+ * Copyright 2007-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 9 Mar 2008 : Initial version created by gary
+ */
+package org.scribble.protocol.export.text;
+
+import org.scribble.export.*;
+import org.scribble.export.text.*;
+import org.scribble.extensions.RegistryInfo;
+import org.scribble.model.*;
+import org.scribble.protocol.model.*;
+
+/**
+ * This class implements the text based export rule for the
+ * Repeat entity.
+ */
+ at RegistryInfo(extension=ExportRule.class,notation=ProtocolNotation.NOTATION_CODE)
+public class RepeatTextExportRule implements ExportRule {
+
+	/**
+	 * This method determines whether the exporter rule is appropriate
+	 * for the supplied model object and format.
+	 * 
+	 * @param modelObject The model object
+	 * @param format The format
+	 * @return Whether the rule is appropriate for the model object and
+	 * 						format
+	 */
+	public boolean isSupported(ModelObject modelObject, Formatter format) {
+		return(Repeat.class.isAssignableFrom(modelObject.getClass()) &&
+				format instanceof TextFormatter);
+	}
+
+	/**
+	 * This method exports the model object.
+	 * 
+	 * @param modelObject The model object
+	 * @param context The context
+	 * @throws IOException Failed to record export information
+	 */
+	public void export(ModelObject modelObject, ExporterContext context)
+							throws java.io.IOException {
+		Repeat repeat=(Repeat)modelObject;
+		TextFormatter formatter=(TextFormatter)context.getFormatter();
+		
+		formatter.record("repeat");
+		
+		if (repeat.getRoles().size() > 0) {
+			formatter.record(" @ ");
+			for (int i=0; i < repeat.getRoles().size(); i++) {
+				if (i > 0) {
+					formatter.record(",");
+				}
+				context.export(repeat.getRoles().get(i));				
+			}
+		}
+		
+		context.export(repeat.getBlock());
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.export.text/src/java/org/scribble/protocol/export/text/RunTextExportRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.protocol.export.text/src/java/org/scribble/protocol/export/text/RunTextExportRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.protocol.export.text/src/java/org/scribble/protocol/export/text/RunTextExportRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,97 @@
+/*
+ * Copyright 2007-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 9 Mar 2008 : Initial version created by gary
+ */
+package org.scribble.protocol.export.text;
+
+import org.scribble.export.*;
+import org.scribble.export.text.*;
+import org.scribble.extensions.RegistryInfo;
+import org.scribble.model.*;
+import org.scribble.protocol.model.*;
+
+/**
+ * This class implements the text based export rule for the
+ * Run entity.
+ */
+ at RegistryInfo(extension=ExportRule.class,notation=ProtocolNotation.NOTATION_CODE)
+public class RunTextExportRule implements ExportRule {
+
+	/**
+	 * This method determines whether the exporter rule is appropriate
+	 * for the supplied model object and format.
+	 * 
+	 * @param modelObject The model object
+	 * @param format The format
+	 * @return Whether the rule is appropriate for the model object and
+	 * 						format
+	 */
+	public boolean isSupported(ModelObject modelObject, Formatter format) {
+		return(Run.class.isAssignableFrom(modelObject.getClass()) &&
+				format instanceof TextFormatter);
+	}
+
+	/**
+	 * This method exports the model object.
+	 * 
+	 * @param modelObject The model object
+	 * @param context The context
+	 * @throws IOException Failed to record export information
+	 */
+	public void export(ModelObject modelObject, ExporterContext context)
+							throws java.io.IOException {
+		Run run=(Run)modelObject;
+		TextFormatter formatter=(TextFormatter)context.getFormatter();
+		
+		formatter.record("run ");
+		
+		if (run.getReference() != null) {
+			context.export(run.getReference());
+		} else if (run.getInlineDefinition() != null) {
+			formatter.record("protocol");
+		}
+		
+		if (run.getBindings().size() > 0) {
+			formatter.record(" (");
+			
+			java.util.Iterator<DeclarationBinding> iter=
+					run.getBindings().iterator();
+			
+			boolean first=true;
+			
+			while (iter.hasNext()) {
+				DeclarationBinding db=iter.next();
+				
+				if (first == false) {
+					formatter.record(",");
+				}
+				
+				formatter.record(db.getDeclaration().getName()+
+						" for "+db.getBoundName());
+				
+				first = false;
+			}
+			
+			formatter.record(")");
+		}
+		
+		if (run.getInlineDefinition() != null) { 
+			context.export(run.getInlineDefinition().getBlock());
+		}
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.export.text/src/java/org/scribble/protocol/export/text/TryEscapeTextExportRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.protocol.export.text/src/java/org/scribble/protocol/export/text/TryEscapeTextExportRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.protocol.export.text/src/java/org/scribble/protocol/export/text/TryEscapeTextExportRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,73 @@
+/*
+ * Copyright 2005-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 19 Oct 2008 : Initial version created by gary
+ */
+package org.scribble.protocol.export.text;
+
+import org.scribble.export.*;
+import org.scribble.export.text.*;
+import org.scribble.extensions.RegistryInfo;
+import org.scribble.model.*;
+import org.scribble.protocol.model.*;
+
+/**
+ * This class implements the text based export rule for the
+ * TryEscape entity.
+ */
+ at RegistryInfo(extension=ExportRule.class,notation=ProtocolNotation.NOTATION_CODE)
+public class TryEscapeTextExportRule implements ExportRule {
+
+	/**
+	 * This method determines whether the exporter rule is appropriate
+	 * for the supplied model object and format.
+	 * 
+	 * @param modelObject The model object
+	 * @param format The format
+	 * @return Whether the rule is appropriate for the model object and
+	 * 						format
+	 */
+	public boolean isSupported(ModelObject modelObject, Formatter format) {
+		return(TryEscape.class.isAssignableFrom(modelObject.getClass()) &&
+				format instanceof TextFormatter);
+	}
+
+	/**
+	 * This method exports the model object.
+	 * 
+	 * @param modelObject The model object
+	 * @param context The context
+	 * @throws IOException Failed to record export information
+	 */
+	public void export(ModelObject modelObject, ExporterContext context)
+							throws java.io.IOException {
+		TryEscape elem=(TryEscape)modelObject;
+		TextFormatter formatter=(TextFormatter)context.getFormatter();
+		
+		formatter.record("try");
+		
+		context.export(elem.getBlock());
+		
+		for (int i=0; i < elem.getEscapeBlocks().size(); i++) {
+						
+			((TextFormatter)context.getFormatter()).cancelEndOfBlock();
+			
+			formatter.record(" ");
+			context.export(elem.getEscapeBlocks().get(i));
+		}
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.export.text/src/java/org/scribble/protocol/export/text/osgi/Activator.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.protocol.export.text/src/java/org/scribble/protocol/export/text/osgi/Activator.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.protocol.export.text/src/java/org/scribble/protocol/export/text/osgi/Activator.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,48 @@
+package org.scribble.protocol.export.text.osgi;
+
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class Activator implements BundleActivator {
+
+	// The plug-in ID
+	public static final String PLUGIN_ID = "org.scribble.protocol.export.text";
+
+	// The shared instance
+	private static Activator plugin;
+	
+	/**
+	 * The constructor
+	 */
+	public Activator() {
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.eclipse.core.runtime.Plugins#start(org.osgi.framework.BundleContext)
+	 */
+	public void start(BundleContext context) throws Exception {
+		plugin = this;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.eclipse.core.runtime.Plugin#stop(org.osgi.framework.BundleContext)
+	 */
+	public void stop(BundleContext context) throws Exception {
+		plugin = null;
+	}
+
+	/**
+	 * Returns the shared instance
+	 *
+	 * @return the shared instance
+	 */
+	public static Activator getDefault() {
+		return plugin;
+	}
+
+}

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.feature/.project
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.protocol.feature/.project	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.protocol.feature/.project	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>org.scribble.protocol.feature</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.pde.FeatureBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.pde.FeatureNature</nature>
+	</natures>
+</projectDescription>

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.feature/LICENSE.txt
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.protocol.feature/LICENSE.txt	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.protocol.feature/LICENSE.txt	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,201 @@
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.feature/build.properties
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.protocol.feature/build.properties	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.protocol.feature/build.properties	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1 @@
+bin.includes = feature.xml

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.feature/feature.xml
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.protocol.feature/feature.xml	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.protocol.feature/feature.xml	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,70 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<feature
+      id="org.scribble.protocol.feature"
+      label="Scribble Protocol Feature"
+      version="0.1.0.qualifier"
+      provider-name="www.scribble.org">
+
+   <description>
+      This feature provides the Scribble protocol notation and capabilities.
+   </description>
+
+   <copyright>
+      Copyright 2005-8 Pi4 Technologies Ltd Licensed under the Apache
+License, Version 2.0 (the &quot;License&quot;); you may not use this file
+except in compliance with the License. You may obtain a copy
+of the License at http://www.apache.org/licenses/LICENSE-2.0
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an &quot;AS IS&quot; BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+or implied. See the License for the specific language governing
+permissions and limitations under the License.
+   </copyright>
+
+   <license url="http://www.apache.org/licenses/LICENSE-2.0.html">
+      The pi4scribble tools suite is licensed under the open source Apache License, version 2.0. http://www.apache.org/licenses/LICENSE-2.0.html
+   </license>
+
+   <requires>
+      <import plugin="org.eclipse.core.runtime"/>
+      <import plugin="org.scribble.core"/>
+      <import plugin="org.eclipse.swt"/>
+      <import plugin="org.eclipse.jface"/>
+   </requires>
+
+   <plugin
+         id="org.scribble.protocol.model"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.scribble.protocol.parser"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.scribble.protocol.projector"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.scribble.protocol.validation"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.scribble.protocol.export.text"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+</feature>

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.model/.classpath
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.protocol.model/.classpath	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.protocol.model/.classpath	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="src" path="src/java"/>
+	<classpathentry kind="src" path="src/test"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/3"/>
+	<classpathentry kind="output" path="classes"/>
+</classpath>

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.model/.project
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.protocol.model/.project	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.protocol.model/.project	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>org.scribble.protocol.model</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.ManifestBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.SchemaBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.pde.PluginNature</nature>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+	</natures>
+</projectDescription>

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.model/LICENSE.txt
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.protocol.model/LICENSE.txt	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.protocol.model/LICENSE.txt	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,201 @@
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.model/META-INF/MANIFEST.MF
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.protocol.model/META-INF/MANIFEST.MF	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.protocol.model/META-INF/MANIFEST.MF	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,12 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Scribble Protocol Model Plug-in
+Bundle-SymbolicName: org.scribble.protocol.model;singleton:=true
+Bundle-Version: 0.1.0.qualifier
+Bundle-Activator: org.scribble.protocol.model.osgi.Activator
+Bundle-Vendor: www.scribble.org
+Import-Package: org.osgi.framework;version="1.3.0"
+Require-Bundle: org.scribble.core
+Bundle-ActivationPolicy: lazy
+Export-Package: org.scribble.protocol.model
+Scribble-Extensions: org.scribble.protocol.model.ProtocolNotation

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.model/build.properties
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.protocol.model/build.properties	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.protocol.model/build.properties	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,5 @@
+source.. = src/java/
+output.. = classes/
+bin.includes = META-INF/,\
+               .,\
+               plugin.xml

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.model/classes/org/scribble/protocol/model/CatchBlock.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.protocol.model/classes/org/scribble/protocol/model/CatchBlock.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.model/classes/org/scribble/protocol/model/Choice.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.protocol.model/classes/org/scribble/protocol/model/Choice.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.model/classes/org/scribble/protocol/model/ChoiceTest$1.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.protocol.model/classes/org/scribble/protocol/model/ChoiceTest$1.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.model/classes/org/scribble/protocol/model/ChoiceTest$2.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.protocol.model/classes/org/scribble/protocol/model/ChoiceTest$2.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.model/classes/org/scribble/protocol/model/ChoiceTest.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.protocol.model/classes/org/scribble/protocol/model/ChoiceTest.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.model/classes/org/scribble/protocol/model/Compose.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.protocol.model/classes/org/scribble/protocol/model/Compose.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.model/classes/org/scribble/protocol/model/EscapeBlock.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.protocol.model/classes/org/scribble/protocol/model/EscapeBlock.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.model/classes/org/scribble/protocol/model/InterruptBlock.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.protocol.model/classes/org/scribble/protocol/model/InterruptBlock.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.model/classes/org/scribble/protocol/model/Parallel.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.protocol.model/classes/org/scribble/protocol/model/Parallel.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.model/classes/org/scribble/protocol/model/Protocol.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.protocol.model/classes/org/scribble/protocol/model/Protocol.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.model/classes/org/scribble/protocol/model/ProtocolModel$1.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.protocol.model/classes/org/scribble/protocol/model/ProtocolModel$1.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.model/classes/org/scribble/protocol/model/ProtocolModel$2.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.protocol.model/classes/org/scribble/protocol/model/ProtocolModel$2.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.model/classes/org/scribble/protocol/model/ProtocolModel.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.protocol.model/classes/org/scribble/protocol/model/ProtocolModel.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.model/classes/org/scribble/protocol/model/ProtocolModelTest.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.protocol.model/classes/org/scribble/protocol/model/ProtocolModelTest.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.model/classes/org/scribble/protocol/model/ProtocolNotation.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.protocol.model/classes/org/scribble/protocol/model/ProtocolNotation.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.model/classes/org/scribble/protocol/model/ProtocolReference.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.protocol.model/classes/org/scribble/protocol/model/ProtocolReference.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.model/classes/org/scribble/protocol/model/Raise.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.protocol.model/classes/org/scribble/protocol/model/Raise.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.model/classes/org/scribble/protocol/model/Recur.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.protocol.model/classes/org/scribble/protocol/model/Recur.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.model/classes/org/scribble/protocol/model/RecursionBlock.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.protocol.model/classes/org/scribble/protocol/model/RecursionBlock.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.model/classes/org/scribble/protocol/model/Repeat.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.protocol.model/classes/org/scribble/protocol/model/Repeat.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.model/classes/org/scribble/protocol/model/RepeatTest$1.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.protocol.model/classes/org/scribble/protocol/model/RepeatTest$1.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.model/classes/org/scribble/protocol/model/RepeatTest$2.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.protocol.model/classes/org/scribble/protocol/model/RepeatTest$2.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.model/classes/org/scribble/protocol/model/RepeatTest.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.protocol.model/classes/org/scribble/protocol/model/RepeatTest.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.model/classes/org/scribble/protocol/model/Run.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.protocol.model/classes/org/scribble/protocol/model/Run.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.model/classes/org/scribble/protocol/model/Spawn.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.protocol.model/classes/org/scribble/protocol/model/Spawn.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.model/classes/org/scribble/protocol/model/TryEscape.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.protocol.model/classes/org/scribble/protocol/model/TryEscape.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.model/classes/org/scribble/protocol/model/osgi/Activator.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.protocol.model/classes/org/scribble/protocol/model/osgi/Activator.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.model/src/java/org/scribble/protocol/model/CatchBlock.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.protocol.model/src/java/org/scribble/protocol/model/CatchBlock.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.protocol.model/src/java/org/scribble/protocol/model/CatchBlock.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,66 @@
+/*
+ * Copyright 2005-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 18 Oct 2008 : Initial version created by gary
+ */
+package org.scribble.protocol.model;
+
+import org.scribble.model.Reference;
+import org.scribble.model.TypeReference;
+
+/**
+ * This class represents a group of activities within
+ * a catch specific 'escape' block of a
+ * try/escape construct.
+ * 
+ */
+public class CatchBlock extends EscapeBlock {
+
+	private static final long serialVersionUID = 775444118561357992L;
+
+	/**
+	 * This method returns the reference of the type associated
+	 * with the catch block.
+	 * 
+	 * @return The type
+	 */
+	@Reference(containment=true)
+	public TypeReference getType() {
+		return(m_type);
+	}
+	
+	/**
+	 * This method sets the reference of the type associated
+	 * with the catch block.
+	 * 
+	 * @param type The type
+	 */
+	public void setType(TypeReference type) {
+		
+		if (m_type != null) {
+			m_type.setParent(null);
+		}
+		
+		m_type = type;
+		
+		if (m_type != null) {
+			m_type.setParent(this);
+		}
+	}
+	
+	private TypeReference m_type=null;
+}

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.model/src/java/org/scribble/protocol/model/Choice.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.protocol.model/src/java/org/scribble/protocol/model/Choice.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.protocol.model/src/java/org/scribble/protocol/model/Choice.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,192 @@
+/*
+ * Copyright 2007 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 29 Oct 2007 : Initial version created by gary
+ */
+package org.scribble.protocol.model;
+
+import org.scribble.model.*;
+
+/**
+ * This class represents the Choice construct between
+ * two or more paths.
+ * 
+ */
+public class Choice extends MultiPathBehaviour {
+
+	private static final long serialVersionUID = 1989654742243530028L;
+
+	/**
+	 * This is the default constructor.
+	 * 
+	 */
+	public Choice() {
+	}
+	
+	/**
+	 * This method determines whether the paths are mutually
+	 * exclusive.
+	 * 
+	 * @return Whether the paths are mutually exclusive
+	 */
+	public boolean isMutuallyExclusivePaths() {
+		return(true);
+	}
+	
+	/**
+	 * This method returns whether the behaviour is a wait
+	 * state.
+	 * 
+	 * @return Whether the behaviour is a wait state
+	 */
+	@Override
+	public boolean isWaitState() {
+		boolean ret=false;
+		
+		Role role=getLocatedRole();
+		
+		// Check if not a decision making role
+		if (role != null && m_roles.contains(role) == false) {
+			ret = true;
+		}
+		
+		return(ret);
+	}
+	
+	/**
+	 * This method returns the list of roles at which
+	 * the choice decision is located.
+	 * 
+	 * @return The list of roles
+	 */
+	public java.util.List<Role> getRoles() {
+		return(m_roles);
+	}
+	
+	/**
+	 * This method returns the list of mutually exclusive
+	 * activity blocks that comprise the multi-path construct.
+	 * 
+	 * @return The list of blocks
+	 */
+	@Reference(containment=true)
+	public java.util.List<Block> getBlocks() {
+		return(m_blocks);
+	}
+	
+	/**
+	 * This method returns the list of mutually exclusive
+	 * activity blocks that comprise the multi-path construct.
+	 * 
+	 * @return The list of blocks
+	 */
+	public java.util.List<Block> getPaths() {
+		return(getBlocks());
+	}
+	
+	/**
+	 * This method creates a new path within the multi-path
+	 * behaviour. If the implementation cannot create
+	 * the new path, then it will return null.
+	 * 
+	 * @return The new block, or null if cannot be created
+	 */
+	public Block createNewPath() {
+		Block ret=new Block();
+		
+		m_blocks.add(ret);
+		
+		return(ret);
+	}
+	
+	/**
+	 * This method removes a path from the multi-path
+	 * behaviour.
+	 * 
+	 * @param path The path
+	 * @return Whether the path was removed
+	 */
+	public boolean removePath(Block path) {
+		boolean ret=false;
+		
+		ret = m_blocks.remove(path);
+		
+		return(ret);
+	}
+	
+	/**
+	 * This method indicates whether the construct requires a
+	 * strict scope to be maintained. If the scope does not
+	 * need to be strictly maintained, then it is possible that
+	 * either activities relevant to each path could either
+	 * be duplicated within each path, or shared following
+	 * the construct.
+	 * 
+	 * @return Whether a strict scope should be maintained
+	 */
+	public boolean isStrictScope() {
+		return(false);
+	}
+	
+	/**
+	 * This method returns the ordering constraint for
+	 * the multipath behaviour.
+	 * 
+	 * @return The ordering constraint
+	 */
+	public OrderingConstraint getOrdering() {
+		return(OrderingConstraint.Unordered);
+	}
+	
+	/**
+	 * This method returns the list of roles that are
+	 * responsible for initiating the activity. This can
+	 * be used to determine whether the model is
+	 * consistent in terms of decision makers subsequently
+	 * initiating actions.
+	 * 
+	 * @return The list of initiator roles
+	 */
+	@Override
+	public java.util.List<Role> getInitiatorRoles() {
+		java.util.List<Role> ret=super.getInitiatorRoles();
+
+		for (int i=0; i < getRoles().size(); i++) {
+			if (ret.contains(getRoles().get(i)) == false) {
+				ret.add(getRoles().get(i));
+			}
+		}
+		
+		return(ret);
+	}
+
+	/**
+	 * This method returns the list of roles that are
+	 * associated with the outcome of the activity.
+	 * 
+	 * @return The list of final roles
+	 */
+	@Override
+	public java.util.List<Role> getFinalRoles() {
+		java.util.List<Role> ret=super.getFinalRoles();
+				
+		return(ret);
+	}
+
+	private java.util.List<Block> m_blocks=new ContainmentList<Block>(this, Block.class);
+	private java.util.List<Role> m_roles=new java.util.Vector<Role>();
+}

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.model/src/java/org/scribble/protocol/model/Compose.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.protocol.model/src/java/org/scribble/protocol/model/Compose.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.protocol.model/src/java/org/scribble/protocol/model/Compose.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,186 @@
+/*
+ * Copyright 2007-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 19 Aug 08 : Initial version created by gary
+ */
+package org.scribble.protocol.model;
+
+import org.scribble.extensions.RegistryFactory;
+import org.scribble.model.*;
+import org.scribble.model.admin.DefaultModelListener;
+import org.scribble.model.admin.ModelInfo;
+import org.scribble.model.admin.ModelRepository;
+
+/**
+ * This class represents the Compose construct.
+ * 
+ */
+public abstract class Compose extends ModelInclude {
+
+	private static final long serialVersionUID = -166094008252739879L;
+
+	/**
+	 * This is the default constructor.
+	 * 
+	 */
+	public Compose() {
+	}
+	
+	/**
+	 * This method returns the associated protocol.
+	 * 
+	 * @return The protocol
+	 */
+	public Protocol getDefinition() {
+		Protocol ret=m_inlineDefinition;
+		
+		if (ret == null && m_reference != null) {
+
+			// Check if local reference
+			if (m_reference.isInner()) {
+				
+				// Search in containing conversation
+				ModelObject cur=getParent();
+				
+				while (ret == null && cur != null) {
+					if (cur instanceof Protocol) {
+						Protocol prot=(Protocol)cur;
+						
+						// Check if conversation contains
+						// sub-conversation of interest
+						for (int i=0; ret == null && i < 
+								prot.getBlock().getContents().size(); i++) {
+							if (prot.getBlock().getContents().get(i) instanceof Protocol) {
+								Protocol subprot=(Protocol)
+									prot.getBlock().getContents().get(i);
+		
+								if (subprot.getLocatedName() != null &&
+										subprot.getLocatedName().getName() != null &&
+										m_reference.getAlias().equals(
+											subprot.getLocatedName().getName()) &&
+									((m_reference.getLocatedRole() == null &&
+											subprot.getLocatedName().getRole() == null) ||
+									((m_reference.getLocatedRole() != null &&
+											subprot.getLocatedName().getRole() != null &&
+											m_reference.getLocatedRole().equals(
+												subprot.getLocatedName().getRole().getName()))))) {
+									
+									ret = subprot;
+								}
+							}
+						}
+					}
+					
+					cur = cur.getParent();
+				}
+				
+			} else {
+				ModelRepository mrep=(ModelRepository)
+							RegistryFactory.getRegistry().getExtension(
+										ModelRepository.class, null);
+				
+				if (mrep != null) {
+					java.util.List<ModelInfo> models=
+							mrep.getModels(m_reference,
+									new DefaultModelListener());
+					
+					for (int i=0; ret == null &&
+									i < models.size(); i++) {
+						if (models.get(i).getModel() instanceof ProtocolModel) {
+							ret = ((ProtocolModel)models.get(i).getModel()).getProtocol();
+						}
+					}
+				}
+			}
+		}
+		
+		return(ret);
+	}
+	
+	/**
+	 * This method returns the protocol reference associated
+	 * with the run construct.
+	 * 
+	 * @return The protocol reference, or null if not defined
+	 */
+	@Reference(containment=true)
+	public ProtocolReference getReference() {
+		return(m_reference);
+	}
+	
+	/**
+	 * This method sets the protocol reference associated
+	 * with the run construct.
+	 * 
+	 * @param ref The protocol reference
+	 */
+	public void setReference(ProtocolReference ref) {
+		
+		if (m_reference != null) {
+			m_reference.setParent(null);
+		}
+		
+		m_reference = ref;
+		
+		if (m_reference != null) {
+			m_reference.setParent(this);
+		}
+	}
+	
+	/**
+	 * This method indicates whether the model include is
+	 * an inline definition.
+	 * 
+	 * @return Whether an inline definition
+	 */
+	public boolean isInline() {
+		return(getInlineDefinition() != null);
+	}
+
+	/**
+	 * This method returns the inline definition associated
+	 * with the model include construct.
+	 * 
+	 * @return The inline definition, or null if not defined
+	 */
+	@Reference(containment=true)
+	public Protocol getInlineDefinition() {
+		return(m_inlineDefinition);
+	}
+	
+	/**
+	 * This method sets the inline definition associated
+	 * with the run construct.
+	 * 
+	 * @param definition The inner definition
+	 */
+	public void setInlineDefinition(Protocol definition) {
+		
+		if (m_inlineDefinition != null) {
+			m_inlineDefinition.setParent(null);
+		}
+		
+		m_inlineDefinition = definition;
+		
+		if (m_inlineDefinition != null) {
+			m_inlineDefinition.setParent(this);
+		}
+	}
+
+	private ProtocolReference m_reference=null;
+	private Protocol m_inlineDefinition=null;
+}

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.model/src/java/org/scribble/protocol/model/EscapeBlock.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.protocol.model/src/java/org/scribble/protocol/model/EscapeBlock.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.protocol.model/src/java/org/scribble/protocol/model/EscapeBlock.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,45 @@
+/*
+ * Copyright 2005-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 18 Oct 2008 : Initial version created by gary
+ */
+package org.scribble.protocol.model;
+
+import org.scribble.model.Block;
+import org.scribble.model.Role;
+
+/**
+ * This class represents a group of activities within
+ * an 'escape' block of a try/escape construct.
+ * 
+ */
+public abstract class EscapeBlock extends Block {
+
+	private static final long serialVersionUID = -2794418546744091644L;
+
+	/**
+	 * This method returns the list of roles at which
+	 * the escape decision is located.
+	 * 
+	 * @return The list of roles
+	 */
+	public java.util.List<Role> getRoles() {
+		return(m_roles);
+	}
+		
+	private java.util.List<Role> m_roles=new java.util.Vector<Role>();
+}

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.model/src/java/org/scribble/protocol/model/InterruptBlock.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.protocol.model/src/java/org/scribble/protocol/model/InterruptBlock.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.protocol.model/src/java/org/scribble/protocol/model/InterruptBlock.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,32 @@
+/*
+ * Copyright 2005-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 18 Oct 2008 : Initial version created by gary
+ */
+package org.scribble.protocol.model;
+
+/**
+ * This class represents a group of activities within
+ * an interrupt specific 'escape' block of a
+ * try/escape construct.
+ * 
+ */
+public class InterruptBlock extends EscapeBlock {
+
+	private static final long serialVersionUID = -5384952960277487512L;
+
+}

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.model/src/java/org/scribble/protocol/model/Parallel.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.protocol.model/src/java/org/scribble/protocol/model/Parallel.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.protocol.model/src/java/org/scribble/protocol/model/Parallel.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,116 @@
+/*
+ * Copyright 2007 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 29 Oct 2007 : Initial version created by gary
+ */
+package org.scribble.protocol.model;
+
+import org.scribble.model.*;
+
+/**
+ * This class represents the Parallel construct with
+ * two or more concurrent paths.
+ * 
+ */
+public class Parallel extends MultiPathBehaviour {
+
+	private static final long serialVersionUID = -6975043613023090432L;
+
+	/**
+	 * This is the default constructor.
+	 * 
+	 */
+	public Parallel() {
+	}
+	
+	/**
+	 * This method returns the list of mutually exclusive
+	 * activity blocks that comprise the multi-path construct.
+	 * 
+	 * @return The list of blocks
+	 */
+	@Reference(containment=true)
+	public java.util.List<Block> getBlocks() {
+		return(m_blocks);
+	}
+	
+	/**
+	 * This method returns the list of mutually exclusive
+	 * activity blocks that comprise the multi-path construct.
+	 * 
+	 * @return The list of blocks
+	 */
+	public java.util.List<Block> getPaths() {
+		return(getBlocks());
+	}
+
+	/**
+	 * This method creates a new path within the multi-path
+	 * behaviour. If the implementation cannot create
+	 * the new path, then it will return null.
+	 * 
+	 * @return The new block, or null if cannot be created
+	 */
+	public Block createNewPath() {
+		Block ret=new Block();
+		
+		m_blocks.add(ret);
+		
+		return(ret);
+	}
+	
+	/**
+	 * This method removes a path from the multi-path
+	 * behaviour.
+	 * 
+	 * @param path The path
+	 * @return Whether the path was removed
+	 */
+	public boolean removePath(Block path) {
+		boolean ret=false;
+		
+		ret = m_blocks.remove(path);
+		
+		return(ret);
+	}
+
+	/**
+	 * This method indicates whether the construct requires a
+	 * strict scope to be maintained. If the scope does not
+	 * need to be strictly maintained, then it is possible that
+	 * either activities relevant to each path could either
+	 * be duplicated within each path, or shared following
+	 * the construct.
+	 * 
+	 * @return Whether a strict scope should be maintained
+	 */
+	public boolean isStrictScope() {
+		return(true);
+	}
+	
+	/**
+	 * This method returns the ordering constraint for
+	 * the multipath behaviour.
+	 * 
+	 * @return The ordering constraint
+	 */
+	public OrderingConstraint getOrdering() {
+		return(OrderingConstraint.Unordered);
+	}
+	
+	private java.util.List<Block> m_blocks=new ContainmentList<Block>(this, Block.class);
+}

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.model/src/java/org/scribble/protocol/model/Protocol.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.protocol.model/src/java/org/scribble/protocol/model/Protocol.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.protocol.model/src/java/org/scribble/protocol/model/Protocol.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,59 @@
+/*
+ * Copyright 2007 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 18 Oct 2007 : Initial version created by gary
+ */
+package org.scribble.protocol.model;
+
+import org.scribble.model.Declaration;
+
+/**
+ * This class represents the protocol notation.
+ */
+public class Protocol extends org.scribble.model.Definition {
+	
+	private static final long serialVersionUID = 5352253730676464788L;
+
+	/**
+	 * The default constructor.
+	 */
+	public Protocol() {
+	}
+	
+	/**
+	 * This method returns whether the activity represents
+	 * a scope.
+	 * 
+	 * @return Whether activity represents a scope
+	 */
+	@Override
+	public boolean isScope() {
+		return(true);
+	}
+	
+	/**
+	 * This method return the top level declarations associated
+	 * with the definition.
+	 * 
+	 * @return The declarations
+	 */
+	public java.util.Set<Declaration> getDeclarations() {
+		java.util.Set<Declaration> ret=new java.util.HashSet<Declaration>();
+		
+		return(ret);
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.model/src/java/org/scribble/protocol/model/ProtocolModel.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.protocol.model/src/java/org/scribble/protocol/model/ProtocolModel.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.protocol.model/src/java/org/scribble/protocol/model/ProtocolModel.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,139 @@
+/*
+ * Copyright 2007 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 23 Oct 2007 : Initial version created by gary
+ */
+package org.scribble.protocol.model;
+
+import org.scribble.model.*;
+import org.scribble.extensions.*;
+
+/**
+ * This class represents the protocol model.
+ * 
+ */
+ at RegistryInfo(extension=Model.class,notation=ProtocolNotation.NOTATION_CODE)
+public class ProtocolModel extends Model {
+
+	private static final long serialVersionUID = 9154775764537136769L;
+
+	/**
+	 * This method returns the model name associated with
+	 * the model.
+	 * 
+	 * @return The model name
+	 */
+	public LocatedName getModelName() {
+		LocatedName ret=null;
+		
+		if (m_protocol != null) {
+			ret = m_protocol.getLocatedName();
+		}
+		
+		return(ret);
+	}
+		
+	/**
+	 * This method returns a read-only list of roles
+	 * associated with the model. If this model represents
+	 * a local model, then the roles in the list
+	 * will be the remote roles, with the local
+	 * role being associated with the model name.
+	 * 
+	 * @return The read-only list of roles
+	 */
+	public java.util.List<Role> getRoles() {
+		java.util.List<Role> ret=null;
+		final java.util.List<Role> roles=
+			new java.util.Vector<Role>();
+		
+		if (m_protocol != null) {
+			// Identify all of the roles defined in the
+			// top level protocol
+			m_protocol.visit(new Visitor() {
+				
+				public boolean visit(ModelObject obj) {
+					boolean ret=true;
+					
+					if (obj instanceof Protocol &&
+							m_protocol != obj) {
+						ret = false;
+						
+					} else if (obj instanceof RoleList) {
+						RoleList plist=(RoleList)obj;
+						
+						roles.addAll(plist.getRoles());
+					}
+					
+					return(ret);
+				}
+			});
+		}
+		
+		ret = new java.util.Vector<Role>(roles) {
+			public boolean add(Role obj) {
+				throw new java.lang.RuntimeException("Read only list");
+			}
+		};
+		
+		return(ret);
+	}
+
+	/**
+	 * This method sets the protocol.
+	 * 
+	 * @param protocol The protocol
+	 */
+	public void setProtocol(Protocol protocol) {
+		
+		if (m_protocol != null) {
+			m_protocol.setParent(null);
+		}
+		
+		m_protocol = protocol;
+		
+		if (m_protocol != null) {
+			m_protocol.setParent(this);
+		}
+	}
+	
+	/**
+	 * This method returns the protocol.
+	 * 
+	 * @return The protocol
+	 */
+	@Reference(containment=true)
+	public Protocol getProtocol() {
+		return(m_protocol);
+	}
+	
+	/**
+	 * This method returns the list of definitions supported by
+	 * this model.
+	 * 
+	 * @return The list of definitions
+	 */
+	public java.util.List<Definition> getDefinitions() {
+		java.util.List<Definition> ret=new java.util.Vector<Definition>();
+		
+		ret.add(getProtocol());
+		
+		return(ret);
+	}
+	
+	private Protocol m_protocol=null;
+}

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.model/src/java/org/scribble/protocol/model/ProtocolNotation.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.protocol.model/src/java/org/scribble/protocol/model/ProtocolNotation.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.protocol.model/src/java/org/scribble/protocol/model/ProtocolNotation.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,67 @@
+/*
+ * Copyright 2007 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 23 Oct 2007 : Initial version created by gary
+ */
+package org.scribble.protocol.model;
+
+import org.scribble.extensions.*;
+import org.scribble.model.ModelReference;
+
+/**
+ * This class represents the protocol notation.
+ */
+ at RegistryInfo(extension=org.scribble.model.Notation.class)
+public class ProtocolNotation extends org.scribble.model.AbstractNotation {
+
+	public static final String NOTATION_CODE="spr";
+	
+	/**
+	 * This is the protocol notation constructor.
+	 */
+	public ProtocolNotation() {
+		super(NOTATION_CODE, "Protocol", true);
+	}
+	
+	/**
+	 * This method returns the initial description associated
+	 * with the supplied reference.
+	 * 
+	 * @param ref The reference
+	 * @return The initial description, or null if no description
+	 */
+	public String getInitialDescription(ModelReference ref) {
+		StringBuffer buf=new StringBuffer();
+		
+		buf.append("namespace ");
+		buf.append(ref.getNamespace());
+		buf.append(";\r\n\r\n");
+		
+		buf.append("protocol ");
+		buf.append(ref.getLocalpart());
+		
+		if (ref.getLocatedRole() != null) {
+			buf.append(ModelReference.LOCATED_REFERENCE_SEPARATOR);
+			buf.append(ref.getLocatedRole());
+			buf.append(" {\r\n\trole\tP;\r\n\r\n}\r\n");
+		} else {		
+			buf.append(" {\r\n\trole\tP1, P2;\r\n\r\n}\r\n");
+		}
+		
+		return(buf.toString());
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.model/src/java/org/scribble/protocol/model/ProtocolReference.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.protocol.model/src/java/org/scribble/protocol/model/ProtocolReference.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.protocol.model/src/java/org/scribble/protocol/model/ProtocolReference.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,38 @@
+/*
+ * Copyright 2007 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 5 Nov 2007 : Initial version created by gary
+ */
+package org.scribble.protocol.model;
+
+import org.scribble.model.*;
+
+/**
+ * This class represents a protocol reference.
+ */
+public class ProtocolReference extends ModelReference {
+
+	private static final long serialVersionUID = -7959015624125684262L;
+
+	/**
+	 * This is the default constructor for the protocol reference.
+	 */
+	public ProtocolReference() {
+		super(ProtocolNotation.NOTATION_CODE);
+	}
+	
+}

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.model/src/java/org/scribble/protocol/model/Raise.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.protocol.model/src/java/org/scribble/protocol/model/Raise.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.protocol.model/src/java/org/scribble/protocol/model/Raise.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,81 @@
+/*
+ * Copyright 2007-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 10 Nov 2008 : Initial version created by gary
+ */
+package org.scribble.protocol.model;
+
+import org.scribble.model.*;
+
+/**
+ * This class represents the Raise construct.
+ * 
+ */
+public class Raise extends Behaviour {
+
+	private static final long serialVersionUID = -8930392757457429214L;
+
+	/**
+	 * This is the default constructor.
+	 * 
+	 */
+	public Raise() {
+	}
+	
+	/**
+	 * This method returns the list of roles at which
+	 * the decision is located.
+	 * 
+	 * @return The list of roles
+	 */
+	public java.util.List<Role> getRoles() {
+		return(m_roles);
+	}
+		
+	/**
+	 * This method returns the reference of the type associated
+	 * with the catch block.
+	 * 
+	 * @return The type
+	 */
+	@Reference(containment=true)
+	public TypeReference getType() {
+		return(m_type);
+	}
+	
+	/**
+	 * This method sets the reference of the type associated
+	 * with the catch block.
+	 * 
+	 * @param type The type
+	 */
+	public void setType(TypeReference type) {
+		
+		if (m_type != null) {
+			m_type.setParent(null);
+		}
+		
+		m_type = type;
+		
+		if (m_type != null) {
+			m_type.setParent(this);
+		}
+	}
+	
+	private java.util.List<Role> m_roles=new java.util.Vector<Role>();
+	private TypeReference m_type=null;
+}

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.model/src/java/org/scribble/protocol/model/Recur.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.protocol.model/src/java/org/scribble/protocol/model/Recur.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.protocol.model/src/java/org/scribble/protocol/model/Recur.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,60 @@
+/*
+ * Copyright 2007 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 31 Oct 2007 : Initial version created by gary
+ */
+package org.scribble.protocol.model;
+
+import org.scribble.model.*;
+
+/**
+ * This class represents the Recur construct.
+ * 
+ */
+public class Recur extends Behaviour {
+
+	private static final long serialVersionUID = -9113642656716684751L;
+
+	/**
+	 * This is the default constructor.
+	 * 
+	 */
+	public Recur() {
+	}
+	
+	/**
+	 * This method returns the recursion block to be
+	 * performed.
+	 * 
+	 * @return The recursion block
+	 */
+	public RecursionBlock getRecursionBlock() {
+		return(m_recursionBlock);
+	}
+	
+	/**
+	 * This method sets the recursion block to be
+	 * performed.
+	 * 
+	 * @param recursion The recursion block
+	 */
+	public void setRecursionBlock(RecursionBlock recursion) {
+		m_recursionBlock = recursion;
+	}
+
+	private RecursionBlock m_recursionBlock=null;
+}

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.model/src/java/org/scribble/protocol/model/RecursionBlock.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.protocol.model/src/java/org/scribble/protocol/model/RecursionBlock.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.protocol.model/src/java/org/scribble/protocol/model/RecursionBlock.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,95 @@
+/*
+ * Copyright 2007 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 29 Oct 2007 : Initial version created by gary
+ */
+package org.scribble.protocol.model;
+
+import org.scribble.model.*;
+
+/**
+ * This class represents the RecursionBlock construct.
+ * 
+ */
+public class RecursionBlock extends SinglePathBehaviour
+					implements Declaration {
+
+	private static final long serialVersionUID = -3777899920653462575L;
+
+	/**
+	 * This is the default constructor.
+	 * 
+	 */
+	public RecursionBlock() {
+		m_block.setParent(this);
+	}
+	
+	/**
+	 * This method returns the name associated with the
+	 * recursion construct.
+	 * 
+	 * @return The name
+	 */
+	public String getName() {
+		return(m_name);
+	}
+	
+	/**
+	 * This method sets the name associated with the
+	 * recursion construct.
+	 * 
+	 * @param name The name
+	 */
+	public void setName(String name) {
+		m_name = name;
+	}
+	
+	/**
+	 * This method returns the activities.
+	 * 
+	 * @return The block of activities
+	 */
+	@Reference(containment=true)
+	public Block getBlock() {
+		return(m_block);
+	}
+	
+	/**
+	 * This method sets the block.
+	 * 
+	 * @param block The block
+	 */
+	public void setBlock(Block block) {
+		m_block = block;
+	}
+
+	/**
+	 * This method indicates whether the construct requires a
+	 * strict scope to be maintained. If the scope does not
+	 * need to be strictly maintained, then it is possible that
+	 * activities could be contained by the construct or
+	 * following the construct.
+	 * 
+	 * @return Whether a strict scope should be maintained
+	 */
+	public boolean isStrictScope() {
+		return(true);
+	}
+	
+	private String m_name=null;
+	private Block m_block=new Block();
+}

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.model/src/java/org/scribble/protocol/model/Repeat.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.protocol.model/src/java/org/scribble/protocol/model/Repeat.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.protocol.model/src/java/org/scribble/protocol/model/Repeat.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,167 @@
+/*
+ * Copyright 2007 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 29 Oct 2007 : Initial version created by gary
+ */
+package org.scribble.protocol.model;
+
+import org.scribble.model.*;
+
+/**
+ * This class represents the Repeat construct.
+ * 
+ */
+public class Repeat extends SinglePathBehaviour {
+
+	private static final long serialVersionUID = -3254432118077412347L;
+
+	/**
+	 * This is the default constructor.
+	 * 
+	 */
+	public Repeat() {
+		m_block.setParent(this);
+	}
+		
+	/**
+	 * This method returns whether the behaviour is a wait
+	 * state.
+	 * 
+	 * @return Whether the behaviour is a wait state
+	 */
+	@Override
+	public boolean isWaitState() {
+		boolean ret=false;
+		
+		Role role=getLocatedRole();
+		
+		// Check if not a decision making role
+		if (role != null && m_roles.contains(role) == false) {
+			ret = true;
+		}
+		
+		return(ret);
+	}
+	
+	/**
+	 * This method returns the list of roles at which
+	 * the repeat decision is located.
+	 * 
+	 * @return The list of roles
+	 */
+	public java.util.List<Role> getRoles() {
+		return(m_roles);
+	}
+	
+	/**
+	 * This method returns the activities.
+	 * 
+	 * @return The block of activities
+	 */
+	@Reference(containment=true)
+	public Block getBlock() {
+		return(m_block);
+	}
+	
+	/**
+	 * This method sets the block.
+	 * 
+	 * @param block The block
+	 */
+	public void setBlock(Block block) {
+		if (m_block != null) {
+			m_block.setParent(null);
+		}
+		
+		m_block = block;
+		
+		if (m_block != null) {
+			m_block.setParent(this);
+		}
+	}
+
+	/**
+	 * This method indicates whether the construct requires a
+	 * strict scope to be maintained. If the scope does not
+	 * need to be strictly maintained, then it is possible that
+	 * activities could be contained by the construct or
+	 * following the construct.
+	 * 
+	 * @return Whether a strict scope should be maintained
+	 */
+	public boolean isStrictScope() {
+		return(true);
+	}
+	
+	/**
+	 * This method indicates whether the activity
+	 * is a conditional construct.
+	 * 
+	 * @return Whether the activity is conditional
+	 */
+	public boolean isConditional() {
+		return(true);
+	}
+	
+	/**
+	 * This method indicates whether the construct is
+	 * repetitive.
+	 * 
+	 * @return Whether the construct supports repetition
+	 */
+	public boolean isRepetition() {
+		return(true);
+	}
+	
+	/**
+	 * This method returns the list of roles that are
+	 * responsible for initiating the activity. This can
+	 * be used to determine whether the model is
+	 * consistent in terms of decision makers subsequently
+	 * initiating actions.
+	 * 
+	 * @return The list of initiator roles
+	 */
+	@Override
+	public java.util.List<Role> getInitiatorRoles() {
+		java.util.List<Role> ret=super.getInitiatorRoles();
+
+		for (int i=0; i < getRoles().size(); i++) {
+			if (ret.contains(getRoles().get(i)) == false) {
+				ret.add(getRoles().get(i));
+			}
+		}
+		
+		return(ret);
+	}
+
+	/**
+	 * This method returns the list of roles that are
+	 * associated with the outcome of the activity.
+	 * 
+	 * @return The list of final roles
+	 */
+	@Override
+	public java.util.List<Role> getFinalRoles() {
+		java.util.List<Role> ret=super.getFinalRoles();
+				
+		return(ret);
+	}
+
+	private Block m_block=new Block();
+	private java.util.List<Role> m_roles=new java.util.Vector<Role>();
+}

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.model/src/java/org/scribble/protocol/model/Run.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.protocol.model/src/java/org/scribble/protocol/model/Run.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.protocol.model/src/java/org/scribble/protocol/model/Run.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,46 @@
+/*
+ * Copyright 2007 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 1 Nov 2007 : Initial version created by gary
+ */
+package org.scribble.protocol.model;
+
+/**
+ * This class represents the Run construct.
+ * 
+ */
+public class Run extends Compose {
+
+	private static final long serialVersionUID = 7877693795925137333L;
+
+	/**
+	 * This is the default constructor.
+	 * 
+	 */
+	public Run() {
+	}
+	
+	/**
+	 * This method determines whether the compose construct
+	 * is asynchronous.
+	 * 
+	 * @return Whether the compose is asynchronous
+	 */
+	public boolean isAsynchronous() {
+		return(false);
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.model/src/java/org/scribble/protocol/model/Spawn.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.protocol.model/src/java/org/scribble/protocol/model/Spawn.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.protocol.model/src/java/org/scribble/protocol/model/Spawn.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,46 @@
+/*
+ * Copyright 2007-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 19 Aug 08 : Initial version created by gary
+ */
+package org.scribble.protocol.model;
+
+/**
+ * This class represents the Spawn construct.
+ * 
+ */
+public class Spawn extends Compose {
+
+	private static final long serialVersionUID = -7446521849639232039L;
+
+	/**
+	 * This is the default constructor.
+	 * 
+	 */
+	public Spawn() {
+	}
+	
+	/**
+	 * This method determines whether the compose construct
+	 * is asynchronous.
+	 * 
+	 * @return Whether the compose is asynchronous
+	 */
+	public boolean isAsynchronous() {
+		return(true);
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.model/src/java/org/scribble/protocol/model/TryEscape.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.protocol.model/src/java/org/scribble/protocol/model/TryEscape.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.protocol.model/src/java/org/scribble/protocol/model/TryEscape.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,150 @@
+/*
+ * Copyright 2005-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 18 Oct 2008 : Initial version created by gary
+ */
+package org.scribble.protocol.model;
+
+import org.scribble.model.*;
+
+/**
+ * This class represents the Try/Escape construct.
+ * 
+ */
+public class TryEscape extends MultiPathBehaviour {
+
+	private static final long serialVersionUID = -2764658967983880397L;
+
+	/**
+	 * This is the default constructor.
+	 * 
+	 */
+	public TryEscape() {
+		m_block.setParent(this);
+	}
+	
+	/**
+	 * This method returns the activities.
+	 * 
+	 * @return The block of activities
+	 */
+	@Reference(containment=true)
+	public Block getBlock() {
+		return(m_block);
+	}
+	
+	/**
+	 * This method sets the block.
+	 * 
+	 * @param block The block
+	 */
+	public void setBlock(Block block) {
+		if (m_block != null) {
+			m_block.setParent(null);
+		}
+		
+		m_block = block;
+		
+		if (m_block != null) {
+			m_block.setParent(this);
+		}
+	}
+
+	/**
+	 * This method returns the list of mutually exclusive
+	 * escape blocks.
+	 * 
+	 * @return The list of escape blocks
+	 */
+	@Reference(containment=true)
+	public java.util.List<EscapeBlock> getEscapeBlocks() {
+		return(m_escapeBlocks);
+	}
+	
+	/**
+	 * This method returns the list of mutually exclusive
+	 * activity blocks that comprise the multi-path construct.
+	 * 
+	 * @return The list of blocks
+	 */
+	public java.util.List<Block> getPaths() {
+		java.util.List<Block> ret=new java.util.Vector<Block>();
+		
+		ret.add(getBlock());
+		
+		ret.addAll(getEscapeBlocks());
+
+		return(ret);
+	}
+	
+	/**
+	 * This method creates a new path within the multi-path
+	 * behaviour. If the implementation cannot create
+	 * the new path, then it will return null.
+	 * 
+	 * @return The new block, or null if cannot be created
+	 */
+	public Block createNewPath() {
+		Block ret=null;
+		return(ret);
+	}
+	
+	/**
+	 * This method removes a path from the multi-path
+	 * behaviour.
+	 * 
+	 * @param path The path
+	 * @return Whether the path was removed
+	 */
+	public boolean removePath(Block path) {
+		boolean ret=false;
+		
+		return(ret);
+	}
+
+	/**
+	 * This method indicates whether the construct requires a
+	 * strict scope to be maintained. If the scope does not
+	 * need to be strictly maintained, then it is possible that
+	 * either activities relevant to each path could either
+	 * be duplicated within each path, or shared following
+	 * the construct.
+	 * 
+	 * @return Whether a strict scope should be maintained
+	 */
+	public boolean isStrictScope() {
+		return(true);
+	}
+	
+	/**
+	 * This method returns the ordering constraint for
+	 * the multipath behaviour.
+	 * 
+	 * @return The ordering constraint
+	 */
+	public OrderingConstraint getOrdering() {
+		// Return as unordered, although the first path
+		// (i.e. the try block) must appear first - but
+		// this will be guaranteed in a comparison
+		// against another try/escape construct,
+		// as this is determined by the language construct.
+		return(OrderingConstraint.Unordered);
+	}
+	
+	private Block m_block=new Block();
+	private java.util.List<EscapeBlock> m_escapeBlocks=new ContainmentList<EscapeBlock>(this, EscapeBlock.class);
+}

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.model/src/java/org/scribble/protocol/model/osgi/Activator.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.protocol.model/src/java/org/scribble/protocol/model/osgi/Activator.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.protocol.model/src/java/org/scribble/protocol/model/osgi/Activator.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,48 @@
+package org.scribble.protocol.model.osgi;
+
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class Activator implements BundleActivator {
+
+	// The plug-in ID
+	public static final String PLUGIN_ID = "org.scribble.protocol.model";
+
+	// The shared instance
+	private static Activator plugin;
+	
+	/**
+	 * The constructor
+	 */
+	public Activator() {
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.eclipse.core.runtime.Plugins#start(org.osgi.framework.BundleContext)
+	 */
+	public void start(BundleContext context) throws Exception {
+		plugin = this;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.eclipse.core.runtime.Plugin#stop(org.osgi.framework.BundleContext)
+	 */
+	public void stop(BundleContext context) throws Exception {
+		plugin = null;
+	}
+
+	/**
+	 * Returns the shared instance
+	 *
+	 * @return the shared instance
+	 */
+	public static Activator getDefault() {
+		return plugin;
+	}
+
+}

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.model/src/test/org/scribble/protocol/model/ChoiceTest.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.protocol.model/src/test/org/scribble/protocol/model/ChoiceTest.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.protocol.model/src/test/org/scribble/protocol/model/ChoiceTest.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,80 @@
+/*
+ * Copyright 2007-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 10 Nov 2008 : Initial version created by gary
+ */
+package org.scribble.protocol.model;
+
+import org.scribble.model.*;
+
+import junit.framework.TestCase;
+
+public class ChoiceTest extends TestCase {
+
+	public void testIsWaitStateFalse() {
+		
+		Definition d=new Definition() {
+		};
+		
+		LocatedName mn=new LocatedName();
+		d.setLocatedName(mn);
+		
+		Role r1=new Role();
+		r1.setName("r1");
+		
+		Role r2=new Role();
+		r2.setName("r2");
+		
+		mn.setRole(r1);
+		
+		Choice choice=new Choice();
+		d.getBlock().getContents().add(choice);
+		
+		choice.getRoles().add(r1);
+		choice.getRoles().add(r2);
+		
+		if (choice.isWaitState()) {
+			fail("NOT a wait state");
+		}
+	}
+
+	public void testIsWaitStateTrue() {
+		
+		Definition d=new Definition() {
+		};
+		
+		LocatedName mn=new LocatedName();
+		d.setLocatedName(mn);
+		
+		Role r1=new Role();
+		r1.setName("r1");
+		
+		Role r2=new Role();
+		r2.setName("r2");
+		
+		mn.setRole(r1);
+		
+		Choice choice=new Choice();
+		d.getBlock().getContents().add(choice);
+		
+		choice.getRoles().add(r2);
+		
+		if (choice.isWaitState() == false) {
+			fail("Is a wait state");
+		}
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.model/src/test/org/scribble/protocol/model/ProtocolModelTest.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.protocol.model/src/test/org/scribble/protocol/model/ProtocolModelTest.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.protocol.model/src/test/org/scribble/protocol/model/ProtocolModelTest.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,91 @@
+/*
+ * Copyright 2007 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 18 Nov 2007 : Initial version created by gary
+ */
+package org.scribble.protocol.model;
+
+import junit.framework.TestCase;
+import org.scribble.model.*;
+
+public class ProtocolModelTest extends TestCase {
+
+	public void testRolesNotSubProtocol() {
+		
+		ProtocolModel model=new ProtocolModel();
+		
+		Protocol protocol=new Protocol();
+		
+		model.setProtocol(protocol);
+		
+		RoleList plist1=new RoleList();
+		Role p1=new Role();
+		Role p2=new Role();
+		
+		plist1.getRoles().add(p1);
+		plist1.getRoles().add(p2);
+		
+		protocol.getBlock().getContents().add(plist1);
+		
+		Parallel parallel=new Parallel();
+		
+		Block block=new Block();
+		
+		RoleList plist2=new RoleList();
+		Role p3=new Role();
+		
+		plist2.getRoles().add(p3);
+		
+		block.getContents().add(plist2);
+		
+		parallel.getBlocks().add(block);
+		
+		protocol.getBlock().getContents().add(parallel);
+		
+		Protocol subprotocol=new Protocol();
+		
+		protocol.getBlock().getContents().add(subprotocol);
+
+		RoleList plist3=new RoleList();
+		Role p4=new Role();
+		
+		plist3.getRoles().add(p4);
+		
+		subprotocol.getBlock().getContents().add(plist3);
+		
+		// Check that list is roles is correct
+		java.util.List<Role> list=model.getRoles();
+		
+		if (list == null) {
+			fail("Role list is null");
+		}
+		
+		if (list.size() != 3) {
+			fail("Role list should have 3, but was: "+list.size());
+		}
+		
+		// See if list is read only
+		try {
+			list.add(p1);
+			
+			fail("Should have thrown runtime exception indicating read only");
+			
+		} catch(RuntimeException e) {
+			// Ignore
+		}
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.model/src/test/org/scribble/protocol/model/RepeatTest.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.protocol.model/src/test/org/scribble/protocol/model/RepeatTest.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.protocol.model/src/test/org/scribble/protocol/model/RepeatTest.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,80 @@
+/*
+ * Copyright 2007-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 10 Nov 2008 : Initial version created by gary
+ */
+package org.scribble.protocol.model;
+
+import org.scribble.model.*;
+
+import junit.framework.TestCase;
+
+public class RepeatTest extends TestCase {
+
+	public void testIsWaitStateFalse() {
+		
+		Definition d=new Definition() {
+		};
+		
+		LocatedName mn=new LocatedName();
+		d.setLocatedName(mn);
+		
+		Role r1=new Role();
+		r1.setName("r1");
+		
+		Role r2=new Role();
+		r2.setName("r2");
+		
+		mn.setRole(r1);
+		
+		Repeat repeat=new Repeat();
+		d.getBlock().getContents().add(repeat);
+		
+		repeat.getRoles().add(r1);
+		repeat.getRoles().add(r2);
+		
+		if (repeat.isWaitState()) {
+			fail("NOT a wait state");
+		}
+	}
+
+	public void testIsWaitStateTrue() {
+		
+		Definition d=new Definition() {
+		};
+		
+		LocatedName mn=new LocatedName();
+		d.setLocatedName(mn);
+		
+		Role r1=new Role();
+		r1.setName("r1");
+		
+		Role r2=new Role();
+		r2.setName("r2");
+		
+		mn.setRole(r1);
+		
+		Repeat repeat=new Repeat();
+		d.getBlock().getContents().add(repeat);
+		
+		repeat.getRoles().add(r2);
+		
+		if (repeat.isWaitState() == false) {
+			fail("Is a wait state");
+		}
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.parser/.classpath
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.protocol.parser/.classpath	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.protocol.parser/.classpath	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="src" path="src/java"/>
+	<classpathentry kind="src" path="src/test"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/3"/>
+	<classpathentry kind="output" path="classes"/>
+</classpath>

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.parser/.project
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.protocol.parser/.project	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.protocol.parser/.project	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>org.scribble.protocol.parser</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.ManifestBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.SchemaBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.pde.PluginNature</nature>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+	</natures>
+</projectDescription>

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.parser/LICENSE.txt
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.protocol.parser/LICENSE.txt	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.protocol.parser/LICENSE.txt	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,201 @@
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.parser/META-INF/MANIFEST.MF
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.protocol.parser/META-INF/MANIFEST.MF	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.protocol.parser/META-INF/MANIFEST.MF	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,26 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Scribble Protocol Parser Plug-in
+Bundle-SymbolicName: org.scribble.protocol.parser;singleton:=true
+Bundle-Version: 0.1.0.qualifier
+Bundle-Activator: org.scribble.protocol.parser.osgi.Activator
+Bundle-Vendor: www.scribble.org
+Import-Package: org.osgi.framework;version="1.3.0"
+Require-Bundle: org.scribble.core,
+ org.scribble.protocol.model
+Bundle-ActivationPolicy: lazy
+Scribble-Extensions: org.scribble.protocol.parser.ProtocolKeyWordProvider,
+   org.scribble.protocol.parser.ProtocolModelParserRule,
+   org.scribble.protocol.parser.ProtocolParserRule,
+   org.scribble.protocol.parser.ProtocolReferenceParserRule,
+   org.scribble.protocol.parser.ChoiceParserRule,
+   org.scribble.protocol.parser.ParallelParserRule,
+   org.scribble.protocol.parser.RepeatParserRule,
+   org.scribble.protocol.parser.RecurParserRule,
+   org.scribble.protocol.parser.RecursionBlockParserRule,
+   org.scribble.protocol.parser.RunParserRule,
+   org.scribble.protocol.parser.RunProtocolParserRule,
+   org.scribble.protocol.parser.RaiseParserRule,
+   org.scribble.protocol.parser.TryEscapeParserRule,
+   org.scribble.protocol.parser.CatchBlockParserRule,
+   org.scribble.protocol.parser.InterruptBlockParserRule

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.parser/build.properties
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.protocol.parser/build.properties	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.protocol.parser/build.properties	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,5 @@
+source.. = src/java/
+output.. = classes/
+bin.includes = META-INF/,\
+               .,\
+               plugin.xml

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.parser/classes/org/scribble/protocol/parser/CatchBlockParserRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.protocol.parser/classes/org/scribble/protocol/parser/CatchBlockParserRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.parser/classes/org/scribble/protocol/parser/ChoiceParserRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.protocol.parser/classes/org/scribble/protocol/parser/ChoiceParserRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.parser/classes/org/scribble/protocol/parser/ChoiceParserRuleTest.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.protocol.parser/classes/org/scribble/protocol/parser/ChoiceParserRuleTest.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.parser/classes/org/scribble/protocol/parser/InterruptBlockParserRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.protocol.parser/classes/org/scribble/protocol/parser/InterruptBlockParserRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.parser/classes/org/scribble/protocol/parser/Messages.properties
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.protocol.parser/classes/org/scribble/protocol/parser/Messages.properties	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.protocol.parser/classes/org/scribble/protocol/parser/Messages.properties	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,21 @@
+# /*
+# * Copyright 2007 Pi4 Technologies Ltd
+# *
+# * Licensed under the Apache License, Version 2.0 (the "License");
+# * you may not use this file except in compliance with the License.
+# * You may obtain a copy of the License at
+# *
+# *     http://www.apache.org/licenses/LICENSE-2.0
+# *
+# * Unless required by applicable law or agreed to in writing, software
+# * distributed under the License is distributed on an "AS IS" BASIS,
+# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# * See the License for the specific language governing permissions and
+# * limitations under the License.
+# *
+# *
+# * Change History:
+# * 28 Oct 2007 : Initial version created by gary
+# */
+
+_UNKNOWN_RECUR_LABEL=Unknown recursion label '{0}'
\ No newline at end of file

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.parser/classes/org/scribble/protocol/parser/ParallelParserRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.protocol.parser/classes/org/scribble/protocol/parser/ParallelParserRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.parser/classes/org/scribble/protocol/parser/ProtocolKeyWordProvider.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.protocol.parser/classes/org/scribble/protocol/parser/ProtocolKeyWordProvider.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.parser/classes/org/scribble/protocol/parser/ProtocolModelParserRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.protocol.parser/classes/org/scribble/protocol/parser/ProtocolModelParserRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.parser/classes/org/scribble/protocol/parser/ProtocolParserRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.protocol.parser/classes/org/scribble/protocol/parser/ProtocolParserRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.parser/classes/org/scribble/protocol/parser/ProtocolReferenceParserRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.protocol.parser/classes/org/scribble/protocol/parser/ProtocolReferenceParserRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.parser/classes/org/scribble/protocol/parser/RaiseParserRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.protocol.parser/classes/org/scribble/protocol/parser/RaiseParserRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.parser/classes/org/scribble/protocol/parser/RecurParserRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.protocol.parser/classes/org/scribble/protocol/parser/RecurParserRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.parser/classes/org/scribble/protocol/parser/RecursionBlockParserRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.protocol.parser/classes/org/scribble/protocol/parser/RecursionBlockParserRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.parser/classes/org/scribble/protocol/parser/RepeatParserRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.protocol.parser/classes/org/scribble/protocol/parser/RepeatParserRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.parser/classes/org/scribble/protocol/parser/RunParserRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.protocol.parser/classes/org/scribble/protocol/parser/RunParserRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.parser/classes/org/scribble/protocol/parser/RunProtocolParserRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.protocol.parser/classes/org/scribble/protocol/parser/RunProtocolParserRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.parser/classes/org/scribble/protocol/parser/TryEscapeParserRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.protocol.parser/classes/org/scribble/protocol/parser/TryEscapeParserRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.parser/classes/org/scribble/protocol/parser/osgi/Activator.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.protocol.parser/classes/org/scribble/protocol/parser/osgi/Activator.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.parser/src/java/org/scribble/protocol/parser/CatchBlockParserRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.protocol.parser/src/java/org/scribble/protocol/parser/CatchBlockParserRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.protocol.parser/src/java/org/scribble/protocol/parser/CatchBlockParserRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,154 @@
+/*
+ * Copyright 2005-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 18 Oct 2008 : Initial version created by gary
+ */
+package org.scribble.protocol.parser;
+
+import org.scribble.extensions.RegistryInfo;
+import org.scribble.model.*;
+import org.scribble.model.admin.DependencyType;
+import org.scribble.model.admin.ModelIssue;
+import org.scribble.model.admin.ModelListener;
+import org.scribble.parser.*;
+import org.scribble.protocol.model.*;
+
+/**
+ * This class provides the parser rule for the CatchBlock construct.
+ * 
+ */
+ at RegistryInfo(extension=ParserRule.class,notation=ProtocolNotation.NOTATION_CODE)
+public class CatchBlockParserRule extends org.scribble.parser.AbstractParserRule {
+
+	/**
+	 * The default constructor.
+	 */
+	public CatchBlockParserRule() {
+		super(ParserRuleType.Group);
+	}
+	
+	/**
+	 * This method determines whether the parser rules is
+	 * appropriate to return a model object of the required
+	 * type.
+	 * 
+	 * @param type The required type
+	 * @return Whether the parser rule returns a
+	 * 				model object of the required type
+	 */
+	public boolean isSupported(Class<?> type) {
+		return(type.isAssignableFrom(CatchBlock.class));
+	}
+
+	/**
+	 * This method parses the description to obtain
+	 * a model object of the appropriate type.
+	 * 
+	 * @param context The context
+	 * @param l The listener
+	 * @return The model object
+	 */
+	public Object parse(ParserContext context, ModelListener l) {
+		CatchBlock ret=null;
+		
+		Token t=context.lookahead(0);
+		
+		if (t.isToken("catch", TokenType.Keyword)) {
+			int startpos=t.getSource().getStartPosition();
+			
+			// Consume token
+			context.nextToken();
+			
+			ret = new CatchBlock();
+			
+			ret.getSource().setStartPosition(startpos);
+			
+			// Check for located roles
+			t = context.lookahead(0);
+			
+			if (t.isToken(ModelReference.LOCATED_REFERENCE_SEPARATOR,
+								TokenType.Symbol)) {
+				boolean f_error=false;
+				
+				// Work through list of roles
+				do {
+					// Consume token
+					context.nextToken();
+					
+					// Read next token, which should be an identifier
+					t = context.lookahead(0);
+				
+					if (t.getType() == TokenType.Identifier) {
+						
+						// Consume token
+						context.nextToken();
+					
+						// Locate the role definition
+						Object part=context.getState(t.getText());
+						
+						if (part == null) {
+							l.error(new ModelIssue(t,
+								org.scribble.util.MessageUtil.format(
+										java.util.PropertyResourceBundle.getBundle(
+												"org.scribble.parser.Messages"),
+										"_UNKNOWN_ROLE",
+										new String[]{t.getText()})));
+						} else if (part instanceof Role) {
+							ret.getRoles().add((Role)part);
+						} else {
+							l.error(new ModelIssue(t,
+								org.scribble.util.MessageUtil.format(
+										java.util.PropertyResourceBundle.getBundle(
+												"org.scribble.parser.Messages"),
+										"_REQUIRED_ROLE",
+										new String[]{t.getText()})));
+						}
+						
+						t = context.lookahead(0);
+					} else {
+						l.error(new ModelIssue(t, java.util.PropertyResourceBundle.getBundle(
+							"org.scribble.parser.Messages").
+							getString("_EXPECTING_ROLE_NAME")));
+						f_error = true;
+					}
+				} while (f_error == false &&
+						t.isToken(ParserConstants.LIST_SEPARATOR,
+								TokenType.Symbol));				
+			}
+
+			// Get the type reference
+			TypeReference typeRef=(TypeReference)
+						context.parse(TypeReference.class, l);
+			
+			resolveReference(context, l, typeRef, DependencyType.Uses);
+			
+			ret.setType(typeRef);
+
+			// Parse group
+			parseGroup(context, l, ret, true);
+			
+			// Parsing the group does not consume the final curly
+			// bracket, to ensure that other rules know that the
+			// block has completed, so need to look past this token
+			t = context.lookahead(0);
+			
+			ret.getSource().setEndPosition(t.getSource().getStartPosition());
+		}
+		
+		return(ret);
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.parser/src/java/org/scribble/protocol/parser/ChoiceParserRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.protocol.parser/src/java/org/scribble/protocol/parser/ChoiceParserRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.protocol.parser/src/java/org/scribble/protocol/parser/ChoiceParserRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,167 @@
+/*
+ * Copyright 2007 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 29 Oct 2007 : Initial version created by gary
+ */
+package org.scribble.protocol.parser;
+
+import org.scribble.extensions.RegistryInfo;
+import org.scribble.model.*;
+import org.scribble.model.admin.ModelIssue;
+import org.scribble.model.admin.ModelListener;
+import org.scribble.parser.*;
+import org.scribble.protocol.model.*;
+
+/**
+ * This class provides the parser rule for the Choice construct.
+ * 
+ */
+ at RegistryInfo(extension=ParserRule.class,notation=ProtocolNotation.NOTATION_CODE)
+public class ChoiceParserRule extends org.scribble.parser.AbstractParserRule {
+
+	/**
+	 * The default constructor.
+	 */
+	public ChoiceParserRule() {
+		super(ParserRuleType.Group);
+	}
+	
+	/**
+	 * This method determines whether the parser rules is
+	 * appropriate to return a model object of the required
+	 * type.
+	 * 
+	 * @param type The required type
+	 * @return Whether the parser rule returns a
+	 * 				model object of the required type
+	 */
+	public boolean isSupported(Class<?> type) {
+		return(type.isAssignableFrom(Choice.class));
+	}
+
+	/**
+	 * This method parses the description to obtain
+	 * a model object of the appropriate type.
+	 * 
+	 * @param context The context
+	 * @param l The listener
+	 * @return The model object
+	 */
+	public Object parse(ParserContext context, ModelListener l) {
+		Choice ret=null;
+		
+		Token t=context.lookahead(0);
+		
+		if (t.isToken("choice", TokenType.Keyword)) {
+			int startpos=t.getSource().getStartPosition();
+
+			// Consume token
+			context.nextToken();
+			
+			ret = new Choice();
+				
+			ret.getSource().setStartPosition(startpos);
+			
+			// Check for located roles
+			t = context.lookahead(0);
+			
+			if (t.isToken(ModelReference.LOCATED_REFERENCE_SEPARATOR,
+								TokenType.Symbol)) {
+				boolean f_error=false;
+				
+				// Work through list of roles
+				do {
+					// Consume token
+					context.nextToken();
+					
+					// Read next token, which should be an identifier
+					t = context.lookahead(0);
+				
+					if (t.getType() == TokenType.Identifier) {
+						
+						// Consume token
+						context.nextToken();
+					
+						// Locate the role definition
+						Object part=context.getState(t.getText());
+						
+						if (part == null) {
+							l.error(new ModelIssue(t,
+								org.scribble.util.MessageUtil.format(
+										java.util.PropertyResourceBundle.getBundle(
+												"org.scribble.parser.Messages"),
+										"_UNKNOWN_ROLE",
+										new String[]{t.getText()})));
+						} else if (part instanceof Role) {
+							ret.getRoles().add((Role)part);
+						} else {
+							l.error(new ModelIssue(t,
+								org.scribble.util.MessageUtil.format(
+										java.util.PropertyResourceBundle.getBundle(
+												"org.scribble.parser.Messages"),
+										"_REQUIRED_ROLE",
+										new String[]{t.getText()})));
+						}
+						
+						t = context.lookahead(0);
+					} else {
+						l.error(new ModelIssue(t, java.util.PropertyResourceBundle.getBundle(
+							"org.scribble.parser.Messages").
+							getString("_EXPECTING_ROLE_NAME")));
+						f_error = true;
+					}
+				} while (f_error == false &&
+						t.isToken(ParserConstants.LIST_SEPARATOR,
+								TokenType.Symbol));				
+			}
+			
+			boolean f_end=false;
+			
+			do {
+				f_end = true;
+				
+				Block block=new Block();
+				
+				ret.getBlocks().add(block);
+
+				block.getSource().setStartPosition(t.getSource().getStartPosition());
+				
+				// Parse group
+				parseGroup(context, l, block, true);
+				
+				// Parsing the group does not consume the final curly
+				// bracket, to ensure that other rules know that the
+				// block has completed, so need to look past this token
+				t = context.lookahead(0);
+				
+				block.getSource().setEndPosition(t.getSource().getStartPosition());
+
+				ret.getSource().setEndPosition(t.getSource().getStartPosition());
+				
+				if (t.isToken("or", TokenType.Keyword)) {
+					f_end = false;
+					
+					// Consume 'or'
+					context.nextToken();
+				}
+				
+			} while (f_end == false);
+		}
+		
+		return(ret);
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.parser/src/java/org/scribble/protocol/parser/InterruptBlockParserRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.protocol.parser/src/java/org/scribble/protocol/parser/InterruptBlockParserRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.protocol.parser/src/java/org/scribble/protocol/parser/InterruptBlockParserRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,145 @@
+/*
+ * Copyright 2005-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 18 Oct 2008 : Initial version created by gary
+ */
+package org.scribble.protocol.parser;
+
+import org.scribble.extensions.RegistryInfo;
+import org.scribble.model.*;
+import org.scribble.model.admin.ModelIssue;
+import org.scribble.model.admin.ModelListener;
+import org.scribble.parser.*;
+import org.scribble.protocol.model.*;
+
+/**
+ * This class provides the parser rule for the CatchBlock construct.
+ * 
+ */
+ at RegistryInfo(extension=ParserRule.class,notation=ProtocolNotation.NOTATION_CODE)
+public class InterruptBlockParserRule extends org.scribble.parser.AbstractParserRule {
+
+	/**
+	 * The default constructor.
+	 */
+	public InterruptBlockParserRule() {
+		super(ParserRuleType.Group);
+	}
+	
+	/**
+	 * This method determines whether the parser rules is
+	 * appropriate to return a model object of the required
+	 * type.
+	 * 
+	 * @param type The required type
+	 * @return Whether the parser rule returns a
+	 * 				model object of the required type
+	 */
+	public boolean isSupported(Class<?> type) {
+		return(type.isAssignableFrom(InterruptBlock.class));
+	}
+
+	/**
+	 * This method parses the description to obtain
+	 * a model object of the appropriate type.
+	 * 
+	 * @param context The context
+	 * @param l The listener
+	 * @return The model object
+	 */
+	public Object parse(ParserContext context, ModelListener l) {
+		InterruptBlock ret=null;
+		
+		Token t=context.lookahead(0);
+		
+		if (t.isToken("interrupt", TokenType.Keyword)) {
+			int startpos=t.getSource().getStartPosition();
+			
+			// Consume token
+			context.nextToken();
+			
+			ret = new InterruptBlock();
+			
+			ret.getSource().setStartPosition(startpos);
+			
+			// Check for located roles
+			t = context.lookahead(0);
+			
+			if (t.isToken(ModelReference.LOCATED_REFERENCE_SEPARATOR,
+								TokenType.Symbol)) {
+				boolean f_error=false;
+				
+				// Work through list of roles
+				do {
+					// Consume token
+					context.nextToken();
+					
+					// Read next token, which should be an identifier
+					t = context.lookahead(0);
+				
+					if (t.getType() == TokenType.Identifier) {
+						
+						// Consume token
+						context.nextToken();
+					
+						// Locate the role definition
+						Object part=context.getState(t.getText());
+						
+						if (part == null) {
+							l.error(new ModelIssue(t,
+								org.scribble.util.MessageUtil.format(
+										java.util.PropertyResourceBundle.getBundle(
+												"org.scribble.parser.Messages"),
+										"_UNKNOWN_ROLE",
+										new String[]{t.getText()})));
+						} else if (part instanceof Role) {
+							ret.getRoles().add((Role)part);
+						} else {
+							l.error(new ModelIssue(t,
+								org.scribble.util.MessageUtil.format(
+										java.util.PropertyResourceBundle.getBundle(
+												"org.scribble.parser.Messages"),
+										"_REQUIRED_ROLE",
+										new String[]{t.getText()})));
+						}
+						
+						t = context.lookahead(0);
+					} else {
+						l.error(new ModelIssue(t, java.util.PropertyResourceBundle.getBundle(
+							"org.scribble.parser.Messages").
+							getString("_EXPECTING_ROLE_NAME")));
+						f_error = true;
+					}
+				} while (f_error == false &&
+						t.isToken(ParserConstants.LIST_SEPARATOR,
+								TokenType.Symbol));				
+			}
+
+			// Parse group
+			parseGroup(context, l, ret, true);
+			
+			// Parsing the group does not consume the final curly
+			// bracket, to ensure that other rules know that the
+			// block has completed, so need to look past this token
+			t = context.lookahead(0);
+			
+			ret.getSource().setEndPosition(t.getSource().getStartPosition());
+		}
+		
+		return(ret);
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.parser/src/java/org/scribble/protocol/parser/Messages.properties
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.protocol.parser/src/java/org/scribble/protocol/parser/Messages.properties	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.protocol.parser/src/java/org/scribble/protocol/parser/Messages.properties	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,21 @@
+# /*
+# * Copyright 2007 Pi4 Technologies Ltd
+# *
+# * Licensed under the Apache License, Version 2.0 (the "License");
+# * you may not use this file except in compliance with the License.
+# * You may obtain a copy of the License at
+# *
+# *     http://www.apache.org/licenses/LICENSE-2.0
+# *
+# * Unless required by applicable law or agreed to in writing, software
+# * distributed under the License is distributed on an "AS IS" BASIS,
+# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# * See the License for the specific language governing permissions and
+# * limitations under the License.
+# *
+# *
+# * Change History:
+# * 28 Oct 2007 : Initial version created by gary
+# */
+
+_UNKNOWN_RECUR_LABEL=Unknown recursion label '{0}'
\ No newline at end of file

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.parser/src/java/org/scribble/protocol/parser/ParallelParserRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.protocol.parser/src/java/org/scribble/protocol/parser/ParallelParserRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.protocol.parser/src/java/org/scribble/protocol/parser/ParallelParserRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,112 @@
+/*
+ * Copyright 2007 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 29 Oct 2007 : Initial version created by gary
+ */
+package org.scribble.protocol.parser;
+
+import org.scribble.extensions.RegistryInfo;
+import org.scribble.model.*;
+import org.scribble.model.admin.ModelListener;
+import org.scribble.parser.*;
+import org.scribble.protocol.model.*;
+
+/**
+ * This class provides the parser rule for the Parallel construct.
+ * 
+ */
+ at RegistryInfo(extension=ParserRule.class,notation=ProtocolNotation.NOTATION_CODE)
+public class ParallelParserRule extends org.scribble.parser.AbstractParserRule {
+
+	/**
+	 * The default constructor.
+	 */
+	public ParallelParserRule() {
+		super(ParserRuleType.Group);
+	}
+	
+	/**
+	 * This method determines whether the parser rules is
+	 * appropriate to return a model object of the required
+	 * type.
+	 * 
+	 * @param type The required type
+	 * @return Whether the parser rule returns a
+	 * 				model object of the required type
+	 */
+	public boolean isSupported(Class<?> type) {
+		return(type.isAssignableFrom(Parallel.class));
+	}
+
+	/**
+	 * This method parses the description to obtain
+	 * a model object of the appropriate type.
+	 * 
+	 * @param context The context
+	 * @param l The listener
+	 * @return The model object
+	 */
+	public Object parse(ParserContext context, ModelListener l) {
+		Parallel ret=null;
+		
+		Token t=context.lookahead(0);
+		
+		if (t.isToken("parallel", TokenType.Keyword)) {
+			int startpos=t.getSource().getStartPosition();
+
+			// Consume token
+			context.nextToken();
+			
+			ret = new Parallel();
+				
+			ret.getSource().setStartPosition(startpos);
+			ret.getSource().setEndPosition(t.getSource().getEndPosition());
+			
+			// Check for located roles
+			t = context.lookahead(0);
+			
+			boolean f_end=false;
+			
+			do {
+				f_end = true;
+				
+				Block block=new Block();
+				
+				ret.getBlocks().add(block);
+
+				block.getSource().setStartPosition(t.getSource().getStartPosition());
+
+				// Parse group
+				parseGroup(context, l, block, true);
+				
+				t = context.lookahead(0);
+				
+				block.getSource().setEndPosition(t.getSource().getStartPosition());
+
+				if (t.isToken("and", TokenType.Keyword)) {
+					f_end = false;
+					
+					// Consume 'and'
+					context.nextToken();
+				}
+				
+			} while (f_end == false);
+		}
+		
+		return(ret);
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.parser/src/java/org/scribble/protocol/parser/ProtocolKeyWordProvider.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.protocol.parser/src/java/org/scribble/protocol/parser/ProtocolKeyWordProvider.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.protocol.parser/src/java/org/scribble/protocol/parser/ProtocolKeyWordProvider.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,63 @@
+/*
+ * Copyright 2007 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 17 Oct 2007 : Initial version created by gary
+ */
+package org.scribble.protocol.parser;
+
+import org.scribble.extensions.RegistryInfo;
+import org.scribble.parser.DefaultKeyWordProvider;
+import org.scribble.parser.KeyWordProvider;
+import org.scribble.protocol.model.*;
+
+/**
+ * The protocol notation keyword provider.
+ */
+ at RegistryInfo(extension=KeyWordProvider.class,notation=ProtocolNotation.NOTATION_CODE)
+public class ProtocolKeyWordProvider extends DefaultKeyWordProvider {
+	
+	public ProtocolKeyWordProvider() {
+		super(PROTOCOL_KEYWORDS);
+	}
+	
+	private static final String[] PROTOCOL_KEYWORDS={
+		"namespace",
+		"import",
+		"as",
+		"protocol",
+		"conforms",
+		"role",
+		"channel",
+		"via",
+		"from",
+		"to",
+		"request",
+		"replyTo",
+		"parallel",
+		"and",
+		"choice",
+		"or",
+		"repeat",
+		"recur",
+		"run",
+		"for",
+		"try",
+		"catch",
+		"interrupt",
+		"raise"
+	};
+}

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.parser/src/java/org/scribble/protocol/parser/ProtocolModelParserRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.protocol.parser/src/java/org/scribble/protocol/parser/ProtocolModelParserRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.protocol.parser/src/java/org/scribble/protocol/parser/ProtocolModelParserRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,71 @@
+/*
+ * Copyright 2007 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 21 Oct 2007 : Initial version created by gary
+ */
+package org.scribble.protocol.parser;
+
+import org.scribble.extensions.RegistryInfo;
+import org.scribble.model.Model;
+import org.scribble.model.admin.ModelListener;
+import org.scribble.parser.ParserContext;
+import org.scribble.parser.ParserRule;
+
+import org.scribble.protocol.model.*;
+
+/**
+ * This class provides the model parser for the Protocol notation.
+ * 
+ */
+ at RegistryInfo(extension=ParserRule.class,notation=ProtocolNotation.NOTATION_CODE)
+public class ProtocolModelParserRule extends org.scribble.parser.AbstractModelParserRule {
+
+	/**
+	 * This method creates the initial empty model.
+	 * 
+	 * @return The model
+	 */
+	protected Model createModel() {
+		return(new ProtocolModel());
+	}
+
+	/**
+	 * This method determines whether the keyword is associated
+	 * with the model.
+	 * 
+	 * @param keyword The model keyword
+	 * @return Whether the keyword is associated with the definition
+	 */
+	protected boolean isDefinitionKeyword(String keyword) {
+		return(ProtocolParserRule.PROTOCOL_KEYWORD.equals(keyword));
+	}
+
+	/**
+	 * This method parsers the model body.
+	 * 
+	 * @param context The context
+	 * @param l The model listener
+	 * @param model The model
+	 */
+	protected void parseModelBody(ParserContext context,
+							ModelListener l, Model model) {
+		Protocol protocol=(Protocol)context.parse(Protocol.class, l);
+		
+		((ProtocolModel)model).setProtocol(protocol);
+	}
+
+}

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.parser/src/java/org/scribble/protocol/parser/ProtocolParserRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.protocol.parser/src/java/org/scribble/protocol/parser/ProtocolParserRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.protocol.parser/src/java/org/scribble/protocol/parser/ProtocolParserRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,249 @@
+/*
+ * Copyright 2007 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 16 Oct 2007 : Initial version created by gary
+ */
+package org.scribble.protocol.parser;
+
+import org.scribble.extensions.*;
+import org.scribble.protocol.model.*;
+import org.scribble.model.*;
+import org.scribble.model.admin.DependencyType;
+import org.scribble.model.admin.ModelIssue;
+import org.scribble.model.admin.ModelListener;
+import org.scribble.parser.*;
+
+/**
+ * This class provides the parser rule for the Protocol
+ * definition.
+ */
+ at RegistryInfo(extension=ParserRule.class,notation=ProtocolNotation.NOTATION_CODE)
+public class ProtocolParserRule extends org.scribble.parser.AbstractParserRule {
+
+	public static final String PROTOCOL_KEYWORD = "protocol";
+
+	/**
+	 * The default constructor.
+	 */
+	public ProtocolParserRule() {
+		super(ParserRuleType.Group);
+	}
+	
+	/**
+	 * This method determines whether the parser rules is
+	 * appropriate to return a model object of the required
+	 * type.
+	 * 
+	 * @param type The required type
+	 * @return Whether the parser rule returns a
+	 * 				model object of the required type
+	 */
+	public boolean isSupported(Class<?> type) {
+		return(type.isAssignableFrom(Protocol.class));
+	}
+
+	/**
+	 * This method parses the description to obtain
+	 * a model object of the appropriate type.
+	 * 
+	 * @param context The context
+	 * @param l The listener
+	 * @return The model object
+	 */
+	public Object parse(ParserContext context, ModelListener l) {
+		Protocol ret=null;
+		
+		Token t=context.nextToken();
+		
+		if (t.isToken(PROTOCOL_KEYWORD, TokenType.Keyword)) {
+			
+			ret = new Protocol();
+			ret.getSource().setStartPosition(t.getSource().getStartPosition());
+
+			LocatedName name=(LocatedName)context.parse(LocatedName.class, l);
+			
+			if (name != null) {
+				ret.setLocatedName(name);
+				
+				// Check if name has already been defined in state
+				if (context.getState(t.getText()) != null) {
+					l.error(new ModelIssue(t,
+							org.scribble.util.MessageUtil.format(
+									java.util.PropertyResourceBundle.getBundle(
+											"org.scribble.parser.Messages"),
+									"_DUPLICATE_DECLARATION",
+									new String[]{t.getText()})));
+				} else {
+					context.setState(t.getText(), ret);
+				}
+				
+				// Check if conforms specified
+				boolean f_processed=false;
+				
+				do {
+					f_processed=false;
+					
+					t = context.lookahead(0);
+					
+					if (t.isToken("conforms", TokenType.Keyword)) {
+						f_processed = true;
+
+						t = context.lookahead(1);
+						
+						if (t.isToken("to", TokenType.Keyword)) {
+							context.nextToken();							
+						}
+						
+						do {
+							// Consume keyword
+							context.nextToken();
+							
+							ConformanceReference ref=(ConformanceReference)
+									context.parse(ConformanceReference.class, l);
+							
+							if (ref != null) {
+								resolveReference(context, l, ref, DependencyType.ConformsTo);
+
+								ret.getConformsTo().add(ref);
+							}
+							
+							t = context.lookahead(0);
+						} while (t.isToken(",", TokenType.Symbol));
+					}
+				} while (f_processed);
+				
+				// Need to create new scope for protocol
+				context.pushScope();
+					
+				if (name.getRole() != null) {
+					context.setState(name.getRole().getName(),
+									name.getRole());
+					
+					context.setLocatedRole(t.getText());
+					
+					/* 27/11/07
+					 * 'Conformance' dependency should be from global
+					 * model to local, not the other way around. If 
+					 * local model is changed, global will be revalidated
+					 * but if global changed, then local should not be.
+					 * 
+					if (context.isOuterScope()) {
+						// Establish dependency on the global model
+						org.scribble.model.DependencyManager dm=
+							(org.scribble.model.DependencyManager)
+							org.scribble.extensions.RegistryFactory.getRegistry().getExtension(
+									org.scribble.model.DependencyManager.class, null);
+						
+						org.scribble.model.ModelRepository mrep=
+							(org.scribble.model.ModelRepository)
+							RegistryFactory.getRegistry().getExtension(
+									org.scribble.model.ModelRepository.class, null);
+
+						if (dm != null && mrep != null) {
+							ModelReference ref=
+								new ModelReference(context.getSource().getNamespace(),
+									context.getSource().getLocalpart(), null,
+									context.getSource().getNotation());
+							
+							mrep.locate(ref, context.getSource());
+							
+							dm.recordDependency(context.getSource(), ref,
+										DependencyType.ConformsTo);
+						}
+					}
+					*/
+				}
+								
+				// Check that the protocol name/located role matches
+				// the source model reference
+				if (context.isOuterScope() &&
+					(context.getSource().getLocalpart().equals(ret.getLocatedName().getName()) == false ||
+					(context.getSource().getLocatedRole() == null &&
+						ret.getLocatedName().getRole() != null) ||
+					(context.getSource().getLocatedRole() != null &&
+						ret.getLocatedName().getRole() == null) ||
+					(ret.getLocatedName().getRole() != null &&
+						context.getSource().getLocatedRole() != null &&
+						ret.getLocatedName().getRole().getName().equals(
+								context.getSource().getLocatedRole()) == false))) {
+					
+					l.error(new ModelIssue(ret.getLocatedName(), java.util.PropertyResourceBundle.getBundle(
+							"org.scribble.parser.Messages").
+								getString("_INCOMPATIBLE_NAME")));
+				}
+	
+				// Process group
+				parseGroup(context, l, ret.getBlock(), false);
+				
+				// Check unresolved references
+				
+				// TODO: In the ProtocolModel, might want to
+				// check if any unresolved references still exist
+				// and report them - not sure if this is being done
+				// somewhere
+				
+				for (int i=0; i < context.getUnresolvedReferences().size(); i++) {
+					
+					if (context.getUnresolvedReferences().get(i) instanceof
+										ProtocolReference) {
+						ProtocolReference ref=
+							(ProtocolReference)
+							context.getUnresolvedReferences().get(i);
+						
+						// Check contained protocol activities
+						for (int j=0; ref.getAlias() != null &&
+									ref.isResolved() == false &&
+									j < ret.getBlock().getContents().size(); j++) {
+							
+							if (ret.getBlock().getContents().get(j) instanceof Protocol) {
+								Protocol protocol=(Protocol)ret.getBlock().getContents().get(j);
+								
+								if (protocol.getLocatedName() != null &&
+									protocol.getLocatedName().getName() != null &&
+									ref.getAlias().equals(
+											protocol.getLocatedName().getName()) &&
+									((ref.getLocatedRole() == null &&
+										protocol.getLocatedName().getRole() == null) ||
+									((ref.getLocatedRole() != null &&
+										protocol.getLocatedName().getRole() != null &&
+										ref.getLocatedRole().equals(
+										protocol.getLocatedName().getRole().getName()))))) {
+										
+									ref.setLocalpart(ref.getAlias());
+									
+									ref.setInner(true);
+									
+									// Remove from unresolved list
+									context.getUnresolvedReferences().remove(i);
+									
+									i--;
+								}
+							}
+						}
+					}
+				}
+				
+				context.popScope();
+				
+				ret.getSource().setEndPosition(name.getSource().getEndPosition());
+			}
+		}
+		
+		return(ret);
+	}
+	
+}

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.parser/src/java/org/scribble/protocol/parser/ProtocolReferenceParserRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.protocol.parser/src/java/org/scribble/protocol/parser/ProtocolReferenceParserRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.protocol.parser/src/java/org/scribble/protocol/parser/ProtocolReferenceParserRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,85 @@
+/*
+ * Copyright 2007 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 5 Nov 2007 : Initial version created by gary
+ */
+package org.scribble.protocol.parser;
+
+import org.scribble.extensions.*;
+import org.scribble.model.*;
+import org.scribble.model.admin.ModelListener;
+import org.scribble.protocol.model.*;
+import org.scribble.parser.*;
+
+/**
+ * This class provides the parser rule for the Protocol Reference.
+ */
+ at RegistryInfo(extension=ParserRule.class)
+public class ProtocolReferenceParserRule extends AbstractModelReferenceParserRule {
+
+	/**
+	 * The default constructor.
+	 */
+	public ProtocolReferenceParserRule() {
+		super(true);
+	}
+	
+	/**
+	 * This method returns the class associated with the
+	 * concrete model reference.
+	 * 
+	 * @return The model reference class
+	 */
+	protected Class<?> getReferenceClass() {
+		return(ProtocolReference.class);
+	}
+
+	/**
+	 * This method instantiates an instance of the model
+	 * reference.
+	 * 
+	 * @param context The parser context
+	 * @param l The model listener
+	 * @return The instantiated model reference
+	 */
+	protected ModelReference createReference(ParserContext context, ModelListener l) {
+		return(new ProtocolReference());
+	}
+
+	/**
+	 * This method parses the description to obtain
+	 * a model object of the appropriate type.
+	 * 
+	 * @param context The context
+	 * @param l The listener
+	 * @return The model object
+	 */
+	public Object parse(ParserContext context, ModelListener l) {
+		Object ret=super.parse(context, l);
+		
+		// Check if reference has been resolved
+		if (ret instanceof ProtocolReference &&
+				((ProtocolReference)ret).isResolved() == false) {
+			
+			// Add to unresolved reference list for current scope
+			context.getUnresolvedReferences().add(
+						(ProtocolReference)ret);
+		}
+		
+		return(ret);
+	}	
+}

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.parser/src/java/org/scribble/protocol/parser/RaiseParserRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.protocol.parser/src/java/org/scribble/protocol/parser/RaiseParserRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.protocol.parser/src/java/org/scribble/protocol/parser/RaiseParserRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,148 @@
+/*
+ * Copyright 2007-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 10 Nov 2008 : Initial version created by gary
+ */
+package org.scribble.protocol.parser;
+
+import org.scribble.extensions.RegistryInfo;
+import org.scribble.model.*;
+import org.scribble.model.admin.DependencyType;
+import org.scribble.model.admin.ModelIssue;
+import org.scribble.model.admin.ModelListener;
+import org.scribble.parser.*;
+import org.scribble.protocol.model.*;
+
+/**
+ * This class provides the parser rule for the Raise construct.
+ * 
+ */
+ at RegistryInfo(extension=ParserRule.class,notation=ProtocolNotation.NOTATION_CODE)
+public class RaiseParserRule extends org.scribble.parser.AbstractParserRule {
+
+	/**
+	 * The default constructor.
+	 */
+	public RaiseParserRule() {
+		super(ParserRuleType.Line);
+	}
+	
+	/**
+	 * This method determines whether the parser rules is
+	 * appropriate to return a model object of the required
+	 * type.
+	 * 
+	 * @param type The required type
+	 * @return Whether the parser rule returns a
+	 * 				model object of the required type
+	 */
+	public boolean isSupported(Class<?> type) {
+		return(type.isAssignableFrom(Raise.class));
+	}
+
+	/**
+	 * This method parses the description to obtain
+	 * a model object of the appropriate type.
+	 * 
+	 * @param context The context
+	 * @param l The listener
+	 * @return The model object
+	 */
+	public Object parse(ParserContext context, ModelListener l) {
+		Raise ret=null;
+		
+		Token t=context.lookahead(0);
+		
+		if (t.isToken("raise", TokenType.Keyword)) {
+			int startpos=t.getSource().getStartPosition();
+			
+			// Consume token
+			context.nextToken();
+			
+			ret = new Raise();
+			
+			ret.getSource().setStartPosition(startpos);
+			
+			// Check for located roles
+			t = context.lookahead(0);
+			
+			if (t.isToken(ModelReference.LOCATED_REFERENCE_SEPARATOR,
+								TokenType.Symbol)) {
+				boolean f_error=false;
+				
+				// Work through list of roles
+				do {
+					// Consume token
+					context.nextToken();
+					
+					// Read next token, which should be an identifier
+					t = context.lookahead(0);
+				
+					if (t.getType() == TokenType.Identifier) {
+						
+						// Consume token
+						context.nextToken();
+					
+						// Locate the role definition
+						Object part=context.getState(t.getText());
+						
+						if (part == null) {
+							l.error(new ModelIssue(t,
+								org.scribble.util.MessageUtil.format(
+										java.util.PropertyResourceBundle.getBundle(
+												"org.scribble.parser.Messages"),
+										"_UNKNOWN_ROLE",
+										new String[]{t.getText()})));
+						} else if (part instanceof Role) {
+							ret.getRoles().add((Role)part);
+						} else {
+							l.error(new ModelIssue(t,
+								org.scribble.util.MessageUtil.format(
+										java.util.PropertyResourceBundle.getBundle(
+												"org.scribble.parser.Messages"),
+										"_REQUIRED_ROLE",
+										new String[]{t.getText()})));
+						}
+						
+						t = context.lookahead(0);
+					} else {
+						l.error(new ModelIssue(t, java.util.PropertyResourceBundle.getBundle(
+							"org.scribble.parser.Messages").
+							getString("_EXPECTING_ROLE_NAME")));
+						f_error = true;
+					}
+				} while (f_error == false &&
+						t.isToken(ParserConstants.LIST_SEPARATOR,
+								TokenType.Symbol));				
+			}
+
+			// Get the type reference
+			TypeReference typeRef=(TypeReference)
+						context.parse(TypeReference.class, l);
+			
+			resolveReference(context, l, typeRef, DependencyType.Uses);
+			
+			ret.setType(typeRef);
+			
+			t = context.lookahead(0);
+			
+			ret.getSource().setEndPosition(t.getSource().getEndPosition());
+		}
+		
+		return(ret);
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.parser/src/java/org/scribble/protocol/parser/RecurParserRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.protocol.parser/src/java/org/scribble/protocol/parser/RecurParserRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.protocol.parser/src/java/org/scribble/protocol/parser/RecurParserRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,108 @@
+/*
+ * Copyright 2007 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 31 Oct 2007 : Initial version created by gary
+ */
+package org.scribble.protocol.parser;
+
+import org.scribble.extensions.RegistryInfo;
+import org.scribble.model.*;
+import org.scribble.model.admin.ModelIssue;
+import org.scribble.model.admin.ModelListener;
+import org.scribble.parser.*;
+import org.scribble.protocol.model.*;
+
+/**
+ * This class provides the parser rule for the Recur construct.
+ * 
+ */
+ at RegistryInfo(extension=ParserRule.class,notation=ProtocolNotation.NOTATION_CODE)
+public class RecurParserRule extends org.scribble.parser.AbstractParserRule {
+
+	/**
+	 * The default constructor.
+	 */
+	public RecurParserRule() {
+		super(ParserRuleType.Line);
+	}
+	
+	/**
+	 * This method determines whether the parser rules is
+	 * appropriate to return a model object of the required
+	 * type.
+	 * 
+	 * @param type The required type
+	 * @return Whether the parser rule returns a
+	 * 				model object of the required type
+	 */
+	public boolean isSupported(Class<?> type) {
+		return(type.isAssignableFrom(Recur.class));
+	}
+
+	/**
+	 * This method parses the description to obtain
+	 * a model object of the appropriate type.
+	 * 
+	 * @param context The context
+	 * @param l The listener
+	 * @return The model object
+	 */
+	public Object parse(ParserContext context, ModelListener l) {
+		Recur ret=null;
+		
+		Token t=context.lookahead(0);
+		
+		if (t.isToken("recur", TokenType.Keyword)) {
+			int startpos=t.getSource().getStartPosition();
+			
+			ret = new Recur();
+			
+			context.nextToken();
+			
+			t = context.lookahead(0);
+			
+			if (t.getType() == TokenType.Identifier) {
+						
+				// Check a recursion block exists for this label
+				Object defn=context.getState(t.getText());
+							
+				if (defn instanceof RecursionBlock) {
+					
+					// Consume token
+					context.nextToken();
+	
+					ret.setRecursionBlock((RecursionBlock)defn);
+				} else {
+					l.error(new ModelIssue(t, org.scribble.util.MessageUtil.format(
+						java.util.PropertyResourceBundle.getBundle(
+							"org.scribble.protocol.parser.Messages"),
+									"_UNKNOWN_RECUR_LABEL",
+									new String[]{t.getText()})));
+				}
+			} else {
+				l.error(new ModelIssue(t, java.util.PropertyResourceBundle.getBundle(
+						"org.scribble.parser.Messages").
+						getString("_EXPECTING_IDENTIFIER")));
+			}
+			
+			ret.getSource().setStartPosition(startpos);
+			ret.getSource().setEndPosition(t.getSource().getEndPosition());
+		}
+		
+		return(ret);
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.parser/src/java/org/scribble/protocol/parser/RecursionBlockParserRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.protocol.parser/src/java/org/scribble/protocol/parser/RecursionBlockParserRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.protocol.parser/src/java/org/scribble/protocol/parser/RecursionBlockParserRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,117 @@
+/*
+ * Copyright 2007 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 31 Oct 2007 : Initial version created by gary
+ */
+package org.scribble.protocol.parser;
+
+import org.scribble.extensions.RegistryInfo;
+import org.scribble.model.*;
+import org.scribble.model.admin.ModelIssue;
+import org.scribble.model.admin.ModelListener;
+import org.scribble.parser.*;
+import org.scribble.protocol.model.*;
+
+/**
+ * This class provides the parser rule for the RecursionBlock construct.
+ * 
+ */
+ at RegistryInfo(extension=ParserRule.class,notation=ProtocolNotation.NOTATION_CODE)
+public class RecursionBlockParserRule extends org.scribble.parser.AbstractParserRule {
+
+	/**
+	 * The default constructor.
+	 */
+	public RecursionBlockParserRule() {
+		super(ParserRuleType.Group);
+	}
+	
+	/**
+	 * This method determines whether the parser rules is
+	 * appropriate to return a model object of the required
+	 * type.
+	 * 
+	 * @param type The required type
+	 * @return Whether the parser rule returns a
+	 * 				model object of the required type
+	 */
+	public boolean isSupported(Class<?> type) {
+		return(type.isAssignableFrom(RecursionBlock.class));
+	}
+
+	/**
+	 * This method parses the description to obtain
+	 * a model object of the appropriate type.
+	 * 
+	 * @param context The context
+	 * @param l The listener
+	 * @return The model object
+	 */
+	public Object parse(ParserContext context, ModelListener l) {
+		RecursionBlock ret=null;
+		
+		Token t=context.lookahead(0);
+		
+		if (t.getType() == TokenType.Identifier) {
+			int startpos=t.getSource().getStartPosition();
+			String label=t.getText();
+			
+			t = context.lookahead(1);
+			
+			if (t.isToken(":", TokenType.Symbol)) {
+				
+				// Need to push the state, to ensure that the recur
+				// declaration is only relevant within its own scope
+				context.pushState();
+	
+				// Consume tokens
+				context.nextToken();
+				context.nextToken();
+			
+				ret = new RecursionBlock();
+				
+				ret.getSource().setStartPosition(startpos);
+							
+				ret.setName(label);
+					
+				// Check a definition does not already exist for this label
+				Object defn=context.getState(label);
+						
+				if (defn != null) {
+					l.error(new ModelIssue(t,
+						org.scribble.util.MessageUtil.format(
+							java.util.PropertyResourceBundle.getBundle(
+								"org.scribble.parser.Messages"),
+								"_EXISTING_DECLARATION",
+								new String[]{label})));
+				} else {
+					context.setState(label, ret);
+				}
+			
+				// Parse group
+				parseGroup(context, l, ret.getBlock(), true);
+				
+				context.popState();
+				
+				t = context.lookahead(-1);
+				ret.getSource().setEndPosition(t.getSource().getStartPosition());
+			}
+		}
+		
+		return(ret);
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.parser/src/java/org/scribble/protocol/parser/RepeatParserRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.protocol.parser/src/java/org/scribble/protocol/parser/RepeatParserRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.protocol.parser/src/java/org/scribble/protocol/parser/RepeatParserRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,141 @@
+/*
+ * Copyright 2007 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 29 Oct 2007 : Initial version created by gary
+ */
+package org.scribble.protocol.parser;
+
+import org.scribble.extensions.RegistryInfo;
+import org.scribble.model.*;
+import org.scribble.model.admin.ModelIssue;
+import org.scribble.model.admin.ModelListener;
+import org.scribble.parser.*;
+import org.scribble.protocol.model.*;
+
+/**
+ * This class provides the parser rule for the Repeat construct.
+ * 
+ */
+ at RegistryInfo(extension=ParserRule.class,notation=ProtocolNotation.NOTATION_CODE)
+public class RepeatParserRule extends org.scribble.parser.AbstractParserRule {
+
+	/**
+	 * The default constructor.
+	 */
+	public RepeatParserRule() {
+		super(ParserRuleType.Group);
+	}
+	
+	/**
+	 * This method determines whether the parser rules is
+	 * appropriate to return a model object of the required
+	 * type.
+	 * 
+	 * @param type The required type
+	 * @return Whether the parser rule returns a
+	 * 				model object of the required type
+	 */
+	public boolean isSupported(Class<?> type) {
+		return(type.isAssignableFrom(Repeat.class));
+	}
+
+	/**
+	 * This method parses the description to obtain
+	 * a model object of the appropriate type.
+	 * 
+	 * @param context The context
+	 * @param l The listener
+	 * @return The model object
+	 */
+	public Object parse(ParserContext context, ModelListener l) {
+		Repeat ret=null;
+		
+		Token t=context.lookahead(0);
+		
+		if (t.isToken("repeat", TokenType.Keyword)) {
+			int startpos=t.getSource().getStartPosition();
+
+			// Consume token
+			context.nextToken();
+			
+			ret = new Repeat();
+				
+			ret.getSource().setStartPosition(startpos);
+			
+			// Check for located roles
+			t = context.lookahead(0);
+			
+			if (t.isToken(ModelReference.LOCATED_REFERENCE_SEPARATOR,
+								TokenType.Symbol)) {
+				boolean f_error=false;
+				
+				// Work through list of roles
+				do {
+					// Consume token
+					context.nextToken();
+					
+					// Read next token, which should be an identifier
+					t = context.lookahead(0);
+				
+					if (t.getType() == TokenType.Identifier) {
+						
+						// Consume token
+						context.nextToken();
+					
+						// Locate the role definition
+						Object part=context.getState(t.getText());
+						
+						if (part == null) {
+							l.error(new ModelIssue(t,
+								org.scribble.util.MessageUtil.format(
+										java.util.PropertyResourceBundle.getBundle(
+												"org.scribble.parser.Messages"),
+										"_UNKNOWN_ROLE",
+										new String[]{t.getText()})));
+						} else if (part instanceof Role) {
+							ret.getRoles().add((Role)part);
+						} else {
+							l.error(new ModelIssue(t,
+								org.scribble.util.MessageUtil.format(
+										java.util.PropertyResourceBundle.getBundle(
+												"org.scribble.parser.Messages"),
+										"_REQUIRED_ROLE",
+										new String[]{t.getText()})));
+						}
+						
+						t = context.lookahead(0);
+					} else {
+						l.error(new ModelIssue(t, java.util.PropertyResourceBundle.getBundle(
+							"org.scribble.parser.Messages").
+							getString("_EXPECTING_ROLE_NAME")));
+						f_error = true;
+					}
+				} while (f_error == false &&
+						t.isToken(ParserConstants.LIST_SEPARATOR,
+								TokenType.Symbol));				
+			}
+			
+			// Parse group
+			parseGroup(context, l, ret.getBlock(), true);
+
+			t = context.lookahead(-1);
+			ret.getSource().setEndPosition(t.getSource().getEndPosition());
+		}
+		
+		return(ret);
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.parser/src/java/org/scribble/protocol/parser/RunParserRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.protocol.parser/src/java/org/scribble/protocol/parser/RunParserRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.protocol.parser/src/java/org/scribble/protocol/parser/RunParserRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,199 @@
+/*
+ * Copyright 2007 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 1 Nov 2007 : Initial version created by gary
+ */
+package org.scribble.protocol.parser;
+
+import org.scribble.extensions.RegistryInfo;
+import org.scribble.model.*;
+import org.scribble.model.admin.DependencyType;
+import org.scribble.model.admin.ModelIssue;
+import org.scribble.model.admin.ModelListener;
+import org.scribble.parser.*;
+import org.scribble.protocol.model.*;
+
+/**
+ * This class provides the parser rule for the Run construct.
+ * 
+ */
+ at RegistryInfo(extension=ParserRule.class,notation=ProtocolNotation.NOTATION_CODE)
+public class RunParserRule extends org.scribble.parser.AbstractParserRule {
+
+	/**
+	 * The default constructor.
+	 */
+	public RunParserRule() {
+		super(ParserRuleType.Line);
+	}
+	
+	/**
+	 * This method determines whether the parser rules is
+	 * appropriate to return a model object of the required
+	 * type.
+	 * 
+	 * @param type The required type
+	 * @return Whether the parser rule returns a
+	 * 				model object of the required type
+	 */
+	public boolean isSupported(Class<?> type) {
+		return(type.isAssignableFrom(Run.class));
+	}
+
+	/**
+	 * This method parses the description to obtain
+	 * a model object of the appropriate type.
+	 * 
+	 * @param context The context
+	 * @param l The listener
+	 * @return The model object
+	 */
+	public Object parse(ParserContext context, ModelListener l) {
+		Run ret=null;
+		
+		Token t=context.lookahead(0);
+		
+		if (t.isToken("run", TokenType.Keyword)) {
+			int startpos=t.getSource().getStartPosition();
+			
+			t = context.lookahead(1);
+			
+			// Need to locate an identifier
+			if (t.getType() == TokenType.Identifier) {
+				
+				// Consume tokens
+				context.nextToken();
+				//context.nextToken();
+				
+				ProtocolReference ref=(ProtocolReference)
+						context.parse(ProtocolReference.class, l);
+				
+				resolveReference(context, l, ref, DependencyType.Uses);
+
+				ret = new Run();
+				
+				ret.setReference(ref);
+					
+				ret.getSource().setStartPosition(startpos);
+				ret.getSource().setEndPosition(t.getSource().getEndPosition());
+			
+				// Check for role bindings
+				t = context.lookahead(0);
+			
+				if (t.isToken("(", TokenType.Symbol)) {
+					boolean f_error=false;
+					
+					do {
+						// Consume token
+						context.nextToken();
+						
+						// Read next token, which should be an identifier
+						t = context.lookahead(0);
+					
+						if (t.getType() == TokenType.Identifier) {
+							Declaration declaration=null;
+							String binding=null;
+							int dbstartpos=t.getSource().getStartPosition();
+							
+							// Consume token
+							context.nextToken();
+						
+							// Locate the declaration
+							Object decl=context.getState(t.getText());
+							
+							if (decl == null) {
+								l.error(new ModelIssue(t,
+									org.scribble.util.MessageUtil.format(
+											java.util.PropertyResourceBundle.getBundle(
+													"org.scribble.parser.Messages"),
+											"_UNKNOWN_DECLARATION",
+											new String[]{t.getText()})));
+							} else if (decl instanceof Declaration) {
+								declaration = (Declaration)decl;
+							} else {
+								l.error(new ModelIssue(t,
+									org.scribble.util.MessageUtil.format(
+											java.util.PropertyResourceBundle.getBundle(
+													"org.scribble.parser.Messages"),
+											"_REQUIRED_DECLARATION",
+											new String[]{t.getText()})));
+							}
+							
+							t = context.lookahead(0);
+							
+							if (t.isToken("for", TokenType.Keyword)) {
+								
+								context.nextToken();
+								
+								t = context.lookahead(0);
+								
+								if (t.getType() == TokenType.Identifier) {
+									
+									context.nextToken();
+									
+									binding = t.getText();
+								} else {
+									l.error(new ModelIssue(t, java.util.PropertyResourceBundle.getBundle(
+											"org.scribble.parser.Messages").
+												getString("_EXPECTING_IDENTIFIER")));
+									f_error = true;
+								}
+							} else {
+								l.error(new ModelIssue(t,
+										org.scribble.util.MessageUtil.format(
+												java.util.PropertyResourceBundle.getBundle(
+														"org.scribble.parser.Messages"),
+												"_EXPECTING_KEYWORD",
+												new String[]{"for"})));
+								f_error = true;
+							}
+							
+							if (declaration != null && binding != null) {
+								DeclarationBinding db=new DeclarationBinding(declaration, binding);
+								
+								db.getSource().setStartPosition(dbstartpos);
+								db.getSource().setEndPosition(t.getSource().getEndPosition());
+								
+								ret.getBindings().add(db);
+							}
+						} else {
+							l.error(new ModelIssue(t, java.util.PropertyResourceBundle.getBundle(
+								"org.scribble.parser.Messages").
+								getString("_EXPECTING_ROLE_NAME")));
+							f_error = true;
+						}
+						
+						t = context.lookahead(0);
+						
+					} while (f_error == false &&
+							t.isToken(ParserConstants.LIST_SEPARATOR,
+									TokenType.Symbol));			
+					
+					if (t.isToken(")", TokenType.Symbol)) {
+						context.nextToken();
+					} else {
+						l.error(new ModelIssue(t, java.util.PropertyResourceBundle.getBundle(
+								"org.scribble.parser.Messages").
+								getString("_EXPECTING_PARAMETER_LIST_DELIMITER")));
+					}
+				}
+			}
+		}
+		
+		return(ret);
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.parser/src/java/org/scribble/protocol/parser/RunProtocolParserRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.protocol.parser/src/java/org/scribble/protocol/parser/RunProtocolParserRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.protocol.parser/src/java/org/scribble/protocol/parser/RunProtocolParserRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,232 @@
+/*
+ * Copyright 2007 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 1 Nov 2007 : Initial version created by gary
+ */
+package org.scribble.protocol.parser;
+
+import org.scribble.extensions.RegistryInfo;
+import org.scribble.model.*;
+import org.scribble.model.admin.ModelIssue;
+import org.scribble.model.admin.ModelListener;
+import org.scribble.parser.*;
+import org.scribble.protocol.model.*;
+
+/**
+ * This class provides the parser rule for the Run construct.
+ * 
+ */
+ at RegistryInfo(extension=ParserRule.class,notation=ProtocolNotation.NOTATION_CODE)
+public class RunProtocolParserRule extends org.scribble.parser.AbstractParserRule {
+
+	/**
+	 * The default constructor.
+	 */
+	public RunProtocolParserRule() {
+		super(ParserRuleType.Group);
+	}
+	
+	/**
+	 * This method determines whether the parser rules is
+	 * appropriate to return a model object of the required
+	 * type.
+	 * 
+	 * @param type The required type
+	 * @return Whether the parser rule returns a
+	 * 				model object of the required type
+	 */
+	public boolean isSupported(Class<?> type) {
+		return(type.isAssignableFrom(Run.class));
+	}
+
+	/**
+	 * This method parses the description to obtain
+	 * a model object of the appropriate type.
+	 * 
+	 * @param context The context
+	 * @param l The listener
+	 * @return The model object
+	 */
+	public Object parse(ParserContext context, ModelListener l) {
+		Run ret=null;
+		
+		Token t=context.lookahead(0);
+		
+		if (t.isToken("run", TokenType.Keyword)) {
+			int startpos=t.getSource().getStartPosition();
+			
+			t = context.lookahead(1);
+			
+			// Need to locate a 'protocol' keyword
+			if (t.isToken("protocol", TokenType.Keyword)) {
+				String located=null;
+				
+				// Consume tokens
+				context.nextToken();
+				context.nextToken();
+				
+				ret = new Run();
+				
+				ret.getSource().setStartPosition(startpos);
+				ret.getSource().setEndPosition(t.getSource().getEndPosition());
+			
+				// Check for role bindings
+				t = context.lookahead(0);
+				
+				if (t.isToken(ModelReference.LOCATED_REFERENCE_SEPARATOR,
+									TokenType.Symbol)) {
+					context.nextToken();
+					
+					t = context.lookahead(0);
+					
+					if (t.getType() == TokenType.Identifier) {
+						context.nextToken();
+
+						located = t.getText();
+						
+						t = context.lookahead(0);
+						
+					} else {
+						l.error(new ModelIssue(t, java.util.PropertyResourceBundle.getBundle(
+							"org.scribble.parser.Messages").
+							getString("_EXPECTING_ROLE_NAME")));
+					}
+				}
+			
+				if (t.isToken("(", TokenType.Symbol)) {
+					boolean f_error=false;
+					
+					do {
+						// Consume token
+						context.nextToken();
+						
+						// Read next token, which should be an identifier
+						t = context.lookahead(0);
+					
+						if (t.getType() == TokenType.Identifier) {
+							Role role=null;
+							String binding=null;
+							int dbstartpos=t.getSource().getStartPosition();
+							
+							// Consume token
+							context.nextToken();
+						
+							// Locate the role definition
+							Object part=context.getState(t.getText());
+							
+							if (part == null) {
+								l.error(new ModelIssue(t,
+									org.scribble.util.MessageUtil.format(
+											java.util.PropertyResourceBundle.getBundle(
+													"org.scribble.parser.Messages"),
+											"_UNKNOWN_ROLE",
+											new String[]{t.getText()})));
+							} else if (part instanceof Role) {
+								role = (Role)part;
+							} else {
+								l.error(new ModelIssue(t,
+									org.scribble.util.MessageUtil.format(
+											java.util.PropertyResourceBundle.getBundle(
+													"org.scribble.parser.Messages"),
+											"_REQUIRED_ROLE",
+											new String[]{t.getText()})));
+							}
+							
+							t = context.lookahead(0);
+							
+							if (t.isToken("for", TokenType.Keyword)) {
+								
+								context.nextToken();
+								
+								t = context.lookahead(0);
+								
+								if (t.getType() == TokenType.Identifier) {
+									
+									context.nextToken();
+									
+									binding = t.getText();
+								} else {
+									l.error(new ModelIssue(t, java.util.PropertyResourceBundle.getBundle(
+											"org.scribble.parser.Messages").
+												getString("_EXPECTING_IDENTIFIER")));
+									f_error = true;
+								}
+							} else {
+								l.error(new ModelIssue(t,
+										org.scribble.util.MessageUtil.format(
+												java.util.PropertyResourceBundle.getBundle(
+														"org.scribble.parser.Messages"),
+												"_EXPECTING_KEYWORD",
+												new String[]{"for"})));
+								f_error = true;
+							}
+							
+							if (role != null && binding != null) {
+								DeclarationBinding db=new DeclarationBinding(role, binding);
+								
+								db.getSource().setStartPosition(dbstartpos);
+								db.getSource().setEndPosition(t.getSource().getEndPosition());
+								
+								ret.getBindings().add(db);
+							}
+						} else {
+							l.error(new ModelIssue(t, java.util.PropertyResourceBundle.getBundle(
+								"org.scribble.parser.Messages").
+								getString("_EXPECTING_ROLE_NAME")));
+							f_error = true;
+						}
+						
+						t = context.lookahead(0);
+						
+					} while (f_error == false &&
+							t.isToken(ParserConstants.LIST_SEPARATOR,
+									TokenType.Symbol));			
+					
+					if (t.isToken(")", TokenType.Symbol)) {
+						context.nextToken();
+					} else {
+						l.error(new ModelIssue(t, java.util.PropertyResourceBundle.getBundle(
+								"org.scribble.parser.Messages").
+								getString("_EXPECTING_PARAMETER_LIST_DELIMITER")));
+					}
+				}
+				
+				Protocol protocol=new Protocol();
+				
+				if (located != null) {
+					LocatedName modelName=new LocatedName();
+					Role role=new Role();
+					role.setName(located);
+					modelName.setRole(role);
+					protocol.setLocatedName(modelName);
+				}
+				
+				ret.setInlineDefinition(protocol);
+				
+				// Create new scope for the inline activities
+				context.pushScope();
+				
+				// Parse the inline activities
+				parseGroup(context, l, protocol.getBlock(), false);
+				
+				context.popScope();
+			}
+		}
+		
+		return(ret);
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.parser/src/java/org/scribble/protocol/parser/TryEscapeParserRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.protocol.parser/src/java/org/scribble/protocol/parser/TryEscapeParserRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.protocol.parser/src/java/org/scribble/protocol/parser/TryEscapeParserRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,105 @@
+/*
+ * Copyright 2005-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 18 Oct 2008 : Initial version created by gary
+ */
+package org.scribble.protocol.parser;
+
+import org.scribble.extensions.RegistryInfo;
+import org.scribble.model.*;
+import org.scribble.model.admin.ModelListener;
+import org.scribble.parser.*;
+import org.scribble.protocol.model.*;
+
+/**
+ * This class provides the parser rule for the TryEscape construct.
+ * 
+ */
+ at RegistryInfo(extension=ParserRule.class,notation=ProtocolNotation.NOTATION_CODE)
+public class TryEscapeParserRule extends org.scribble.parser.AbstractParserRule {
+
+	/**
+	 * The default constructor.
+	 */
+	public TryEscapeParserRule() {
+		super(ParserRuleType.Group);
+	}
+	
+	/**
+	 * This method determines whether the parser rules is
+	 * appropriate to return a model object of the required
+	 * type.
+	 * 
+	 * @param type The required type
+	 * @return Whether the parser rule returns a
+	 * 				model object of the required type
+	 */
+	public boolean isSupported(Class<?> type) {
+		return(type.isAssignableFrom(TryEscape.class));
+	}
+
+	/**
+	 * This method parses the description to obtain
+	 * a model object of the appropriate type.
+	 * 
+	 * @param context The context
+	 * @param l The listener
+	 * @return The model object
+	 */
+	public Object parse(ParserContext context, ModelListener l) {
+		TryEscape ret=null;
+		
+		Token t=context.lookahead(0);
+		
+		if (t.isToken("try", TokenType.Keyword)) {
+			int startpos=t.getSource().getStartPosition();
+
+			// Consume token
+			context.nextToken();
+			
+			ret = new TryEscape();
+				
+			ret.getSource().setStartPosition(startpos);
+			
+			ret.getBlock().getSource().setStartPosition(t.getSource().getStartPosition());
+				
+			// Parse group
+			parseGroup(context, l, ret.getBlock(), true);
+				
+			// Parsing the group does not consume the final curly
+			// bracket, to ensure that other rules know that the
+			// block has completed, so need to look past this token
+			t = context.lookahead(0);
+			
+			ret.getBlock().getSource().setEndPosition(t.getSource().getStartPosition());
+
+			// Configure zero or more escape blocks
+			EscapeBlock eb=null;
+			
+			while ((eb=(EscapeBlock)context.parse(EscapeBlock.class, l)) != null) {
+				ret.getEscapeBlocks().add(eb);
+			}
+			
+			// Find position of last block to set as end for try/escape
+			t = context.lookahead(0);
+
+			ret.getSource().setEndPosition(t.getSource().getStartPosition());
+		}
+		
+		return(ret);
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.parser/src/java/org/scribble/protocol/parser/osgi/Activator.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.protocol.parser/src/java/org/scribble/protocol/parser/osgi/Activator.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.protocol.parser/src/java/org/scribble/protocol/parser/osgi/Activator.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,48 @@
+package org.scribble.protocol.parser.osgi;
+
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class Activator implements BundleActivator {
+
+	// The plug-in ID
+	public static final String PLUGIN_ID = "org.scribble.protocol.parser";
+
+	// The shared instance
+	private static Activator plugin;
+	
+	/**
+	 * The constructor
+	 */
+	public Activator() {
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.eclipse.core.runtime.Plugins#start(org.osgi.framework.BundleContext)
+	 */
+	public void start(BundleContext context) throws Exception {
+		plugin = this;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.eclipse.core.runtime.Plugin#stop(org.osgi.framework.BundleContext)
+	 */
+	public void stop(BundleContext context) throws Exception {
+		plugin = null;
+	}
+
+	/**
+	 * Returns the shared instance
+	 *
+	 * @return the shared instance
+	 */
+	public static Activator getDefault() {
+		return plugin;
+	}
+
+}

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.parser/src/test/org/scribble/protocol/parser/ChoiceParserRuleTest.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.protocol.parser/src/test/org/scribble/protocol/parser/ChoiceParserRuleTest.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.protocol.parser/src/test/org/scribble/protocol/parser/ChoiceParserRuleTest.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,76 @@
+/*
+ * Copyright 2005-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 1 May 2008 : Initial version created by gary
+ */
+package org.scribble.protocol.parser;
+
+import junit.framework.TestCase;
+
+import org.scribble.model.*;
+import org.scribble.model.admin.ErrorRecorder;
+import org.scribble.protocol.model.*;
+import org.scribble.parser.*;
+
+public class ChoiceParserRuleTest extends TestCase {
+
+	protected void setUp() throws Exception {
+		org.scribble.extensions.TestRegistry reg=
+				new org.scribble.extensions.TestRegistry();
+		
+		reg.addExtension(org.scribble.protocol.parser.ProtocolKeyWordProvider.class);
+		reg.addExtension(org.scribble.parser.DefaultParser.class);
+		reg.addExtension(org.scribble.protocol.parser.ChoiceParserRule.class);
+		
+		org.scribble.extensions.RegistryFactory.setRegistry(reg);
+	}
+	
+	protected void tearDown() throws Exception {
+		// Clear registry
+		org.scribble.extensions.RegistryFactory.setRegistry(null);
+	}
+	
+	public void testValidChoice() {
+		String text="choice { } or { }";
+		
+		ModelReference ref=new ModelReference(ProtocolNotation.NOTATION_CODE);
+		TestParserContext context=new TestParserContext(ref, text);
+		ErrorRecorder l=new ErrorRecorder();
+		
+		Object obj=context.parse(Choice.class, l);
+		
+		if (obj instanceof Choice) {
+			Choice choice=(Choice)obj;
+			
+			if (choice.getBlocks().size() != 2) {
+				fail("Two blocks expected");
+			}
+			
+			// Check no errors or warnings
+			if (l.getErrors().size() > 0) {
+				fail("Not expecting "+l.getErrors()+" errors");
+			} else if (l.getWarnings().size() > 0) {
+				fail("Not expecting "+l.getWarnings()+" warnings");
+			}
+			
+		} else if (obj == null) {
+			fail("No object returned");
+		} else {
+			fail("Unexpected object type: "+obj.getClass());
+		}
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.projector/.classpath
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.protocol.projector/.classpath	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.protocol.projector/.classpath	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="src" path="src/java"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+	<classpathentry kind="output" path="classes"/>
+</classpath>

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.projector/.project
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.protocol.projector/.project	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.protocol.projector/.project	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>org.scribble.protocol.projector</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.ManifestBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.SchemaBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.pde.PluginNature</nature>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+	</natures>
+</projectDescription>

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.projector/LICENSE.txt
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.protocol.projector/LICENSE.txt	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.protocol.projector/LICENSE.txt	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,201 @@
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.projector/META-INF/MANIFEST.MF
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.protocol.projector/META-INF/MANIFEST.MF	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.protocol.projector/META-INF/MANIFEST.MF	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,26 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Scribble Protocol Projector Plug-in
+Bundle-SymbolicName: org.scribble.protocol.projector;singleton:=true
+Bundle-Version: 0.1.0.qualifier
+Bundle-Activator: org.scribble.protocol.projector.osgi.Activator
+Bundle-Vendor: www.scribble.org
+Import-Package: org.osgi.framework;version="1.3.0"
+Require-Bundle: org.scribble.core,
+ org.scribble.protocol.model
+Bundle-ActivationPolicy: lazy
+Scribble-Extensions: org.scribble.protocol.projector.ProtocolModelProjectorRule,
+  org.scribble.protocol.projector.ProtocolProjectorRule,
+  org.scribble.protocol.projector.ProtocolReferenceProjectorRule,
+  org.scribble.protocol.projector.ChoiceProjectorRule,
+  org.scribble.protocol.projector.ParallelProjectorRule,
+  org.scribble.protocol.projector.RepeatProjectorRule,
+  org.scribble.protocol.projector.RecurProjectorRule,
+  org.scribble.protocol.projector.RecursionBlockProjectorRule,
+  org.scribble.protocol.projector.RunProjectorRule,
+  org.scribble.protocol.projector.SpawnProjectorRule,
+  org.scribble.protocol.projector.TryEscapeProjectorRule,
+  org.scribble.protocol.projector.CatchBlockProjectorRule,
+  org.scribble.protocol.projector.RaiseProjectorRule,
+  org.scribble.protocol.projector.InterruptBlockProjectorRule
+

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.projector/build.properties
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.protocol.projector/build.properties	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.protocol.projector/build.properties	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,5 @@
+source.. = src/java/
+output.. = classes/
+bin.includes = META-INF/,\
+               .,\
+               plugin.xml

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.projector/classes/org/scribble/protocol/projector/CatchBlockProjectorRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.protocol.projector/classes/org/scribble/protocol/projector/CatchBlockProjectorRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.projector/classes/org/scribble/protocol/projector/ChoiceProjectorRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.protocol.projector/classes/org/scribble/protocol/projector/ChoiceProjectorRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.projector/classes/org/scribble/protocol/projector/ComposeProjectorRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.protocol.projector/classes/org/scribble/protocol/projector/ComposeProjectorRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.projector/classes/org/scribble/protocol/projector/InterruptBlockProjectorRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.protocol.projector/classes/org/scribble/protocol/projector/InterruptBlockProjectorRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.projector/classes/org/scribble/protocol/projector/ParallelProjectorRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.protocol.projector/classes/org/scribble/protocol/projector/ParallelProjectorRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.projector/classes/org/scribble/protocol/projector/ProtocolModelProjectorRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.protocol.projector/classes/org/scribble/protocol/projector/ProtocolModelProjectorRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.projector/classes/org/scribble/protocol/projector/ProtocolProjectorRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.protocol.projector/classes/org/scribble/protocol/projector/ProtocolProjectorRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.projector/classes/org/scribble/protocol/projector/ProtocolReferenceProjectorRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.protocol.projector/classes/org/scribble/protocol/projector/ProtocolReferenceProjectorRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.projector/classes/org/scribble/protocol/projector/RaiseProjectorRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.protocol.projector/classes/org/scribble/protocol/projector/RaiseProjectorRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.projector/classes/org/scribble/protocol/projector/RecurProjectorRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.protocol.projector/classes/org/scribble/protocol/projector/RecurProjectorRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.projector/classes/org/scribble/protocol/projector/RecursionBlockProjectorRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.protocol.projector/classes/org/scribble/protocol/projector/RecursionBlockProjectorRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.projector/classes/org/scribble/protocol/projector/RepeatProjectorRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.protocol.projector/classes/org/scribble/protocol/projector/RepeatProjectorRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.projector/classes/org/scribble/protocol/projector/RunProjectorRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.protocol.projector/classes/org/scribble/protocol/projector/RunProjectorRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.projector/classes/org/scribble/protocol/projector/SpawnProjectorRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.protocol.projector/classes/org/scribble/protocol/projector/SpawnProjectorRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.projector/classes/org/scribble/protocol/projector/TryEscapeProjectorRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.protocol.projector/classes/org/scribble/protocol/projector/TryEscapeProjectorRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.projector/classes/org/scribble/protocol/projector/osgi/Activator.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.protocol.projector/classes/org/scribble/protocol/projector/osgi/Activator.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.projector/src/java/org/scribble/protocol/projector/CatchBlockProjectorRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.protocol.projector/src/java/org/scribble/protocol/projector/CatchBlockProjectorRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.protocol.projector/src/java/org/scribble/protocol/projector/CatchBlockProjectorRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,98 @@
+/*
+ * Copyright 2005-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 19 Oct 2008 : Initial version created by gary
+ */
+package org.scribble.protocol.projector;
+
+import org.scribble.extensions.RegistryInfo;
+import org.scribble.model.*;
+import org.scribble.model.admin.ModelListener;
+import org.scribble.projector.*;
+import org.scribble.protocol.model.*;
+
+/**
+ * This class provides the CatchBlock implementation of the
+ * projector rule.
+ */
+ at RegistryInfo(extension=ProjectorRule.class,notation=ProtocolNotation.NOTATION_CODE)
+public class CatchBlockProjectorRule extends AbstractBlockProjectorRule {
+
+	/**
+	 * This method determines whether the projection rule is
+	 * appropriate for the supplied model object.
+	 * 
+	 * @param obj The model object to be projected
+	 * @return Whether the rule is relevant for the
+	 * 				model object
+	 */
+	public boolean isSupported(ModelObject obj) {
+		return(obj.getClass() == CatchBlock.class);
+	}
+	
+	/**
+	 * This method creates a new block of the appropriate
+	 * type.
+	 * 
+	 * @return The block
+	 */
+	protected Block createBlock() {
+		return(new CatchBlock());
+	}
+	
+	/**
+	 * This method projects the supplied model object based on the
+	 * specified role.
+	 * 
+	 * @param model The model object
+	 * @param role The role
+	 * @param l The model listener
+	 * @return The projected model object
+	 */
+	public ModelObject project(ProjectorContext context, ModelObject model,
+					Role role, ModelListener l) {
+		CatchBlock ret=(CatchBlock)super.project(context,
+				model, role, l);
+		CatchBlock source=(CatchBlock)model;
+
+		// If block not projected, then if projected role is in
+		// the list, the re-instate
+		if (ret == null && source.getRoles().contains(role)) {
+			ret = new CatchBlock();
+			
+			ret.derivedFrom(source);
+		}
+		
+		if (ret != null) {
+			
+			// Project the list of roles
+			for (int i=0; i < source.getRoles().size(); i++) {
+				ret.getRoles().add(new Role(source.getRoles().get(i)));
+			}
+			
+			if (source.getType() != null) {
+		
+				// Project the type reference
+				ret.setType((TypeReference)
+						context.project(source.getType(),
+								role, l));
+			}
+		}
+		
+		return(ret);
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.projector/src/java/org/scribble/protocol/projector/ChoiceProjectorRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.protocol.projector/src/java/org/scribble/protocol/projector/ChoiceProjectorRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.protocol.projector/src/java/org/scribble/protocol/projector/ChoiceProjectorRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,87 @@
+/*
+ * Copyright 2007 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 19 Nov 2007 : Initial version created by gary
+ */
+package org.scribble.protocol.projector;
+
+import org.scribble.extensions.RegistryInfo;
+import org.scribble.model.*;
+import org.scribble.model.admin.ModelListener;
+import org.scribble.projector.*;
+import org.scribble.protocol.model.*;
+
+/**
+ * This class provides the Choice implementation of the
+ * projector rule.
+ */
+ at RegistryInfo(extension=ProjectorRule.class,notation=ProtocolNotation.NOTATION_CODE)
+public class ChoiceProjectorRule implements ProjectorRule {
+
+	/**
+	 * This method determines whether the projection rule is
+	 * appropriate for the supplied model object.
+	 * 
+	 * @param obj The model object to be projected
+	 * @return Whether the rule is relevant for the
+	 * 				model object
+	 */
+	public boolean isSupported(ModelObject obj) {
+		return(obj.getClass() == Choice.class);
+	}
+	
+	/**
+	 * This method projects the supplied model object based on the
+	 * specified role.
+	 * 
+	 * @param model The model object
+	 * @param role The role
+	 * @param l The model listener
+	 * @return The projected model object
+	 */
+	public ModelObject project(ProjectorContext context, ModelObject model,
+					Role role, ModelListener l) {
+		Choice ret=new Choice();
+		Choice source=(Choice)model;
+
+		ret.derivedFrom(source);
+		
+		// Project the list of roles
+		for (int i=0; i < source.getRoles().size(); i++) {
+			ret.getRoles().add(new Role(source.getRoles().get(i)));
+		}
+		
+		for (int i=0; i < source.getBlocks().size(); i++) {
+			Block block=(Block)
+					context.project(source.getBlocks().get(i), role,
+							l);
+			
+			if (block != null) {
+				ret.getBlocks().add(block);
+			}
+		}
+		
+		// Check if choice has atleast one path
+		if (ret.getBlocks().size() == 0) {
+			ret = null;
+		}
+		
+		// TODO: Need to cater for optional paths
+
+		return(ret);
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.projector/src/java/org/scribble/protocol/projector/ComposeProjectorRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.protocol.projector/src/java/org/scribble/protocol/projector/ComposeProjectorRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.protocol.projector/src/java/org/scribble/protocol/projector/ComposeProjectorRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,90 @@
+/*
+ * Copyright 2007-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 19 Aug 08 : Initial version created by gary
+ */
+package org.scribble.protocol.projector;
+
+import org.scribble.model.*;
+import org.scribble.model.admin.ModelListener;
+import org.scribble.projector.*;
+import org.scribble.protocol.model.*;
+
+/**
+ * This class provides the Compose implementation of the
+ * projector rule.
+ */
+public abstract class ComposeProjectorRule extends ModelIncludeProjectorRule {
+
+	/**
+	 * This method projects the supplied model object based on the
+	 * specified role.
+	 * 
+	 * @param model The model object
+	 * @param role The role
+	 * @param l The model listener
+	 * @return The projected model object
+	 */
+	public ModelObject project(ProjectorContext context, ModelObject model,
+					Role role, ModelListener l) {
+		Compose ret=(Compose)super.project(context, model, role,
+						l);
+		Compose source=(Compose)model;
+
+		Role mappedRole=role;
+		
+		// Determine whether role name has been mapped
+		DeclarationBinding db=null;
+		if ((db=source.getDeclarationBinding(role)) != null) {
+			String rename=db.getBoundName();
+			
+			if (rename != null) {
+				mappedRole = new Role();
+				mappedRole.setName(rename);
+			}
+		}
+		
+		if (source.getInlineDefinition() != null) {
+			ret.setInlineDefinition((Protocol)context.project(source.getInlineDefinition(),
+								mappedRole, l));
+		}
+		
+		if (source.getReference() != null) {
+			
+			// Store protocol against mapped role
+			Definition defn=source.getDefinition();
+			
+			if (defn != null &&
+					defn.getRoles().contains(mappedRole)) {
+				
+				// If inner reference, then record interest
+				// in project of definition against this mapped
+				// role
+				if (source.getReference().isInner()) {
+					context.registerInterest(defn, mappedRole);
+				}
+				
+				ret.setReference((ProtocolReference)context.project(
+							source.getReference(), mappedRole, l));
+			} else {
+				ret = null;
+			}
+		}
+
+		return(ret);
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.projector/src/java/org/scribble/protocol/projector/InterruptBlockProjectorRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.protocol.projector/src/java/org/scribble/protocol/projector/InterruptBlockProjectorRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.protocol.projector/src/java/org/scribble/protocol/projector/InterruptBlockProjectorRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,90 @@
+/*
+ * Copyright 2005-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 19 Oct 2008 : Initial version created by gary
+ */
+package org.scribble.protocol.projector;
+
+import org.scribble.extensions.RegistryInfo;
+import org.scribble.model.*;
+import org.scribble.model.admin.ModelListener;
+import org.scribble.projector.*;
+import org.scribble.protocol.model.*;
+
+/**
+ * This class provides the InterruptBlock implementation of the
+ * projector rule.
+ */
+ at RegistryInfo(extension=ProjectorRule.class,notation=ProtocolNotation.NOTATION_CODE)
+public class InterruptBlockProjectorRule extends AbstractBlockProjectorRule {
+
+	/**
+	 * This method determines whether the projection rule is
+	 * appropriate for the supplied model object.
+	 * 
+	 * @param obj The model object to be projected
+	 * @return Whether the rule is relevant for the
+	 * 				model object
+	 */
+	public boolean isSupported(ModelObject obj) {
+		return(obj.getClass() == InterruptBlock.class);
+	}
+	
+	/**
+	 * This method creates a new block of the appropriate
+	 * type.
+	 * 
+	 * @return The block
+	 */
+	protected Block createBlock() {
+		return(new InterruptBlock());
+	}
+	
+	/**
+	 * This method projects the supplied model object based on the
+	 * specified role.
+	 * 
+	 * @param model The model object
+	 * @param role The role
+	 * @param l The model listener
+	 * @return The projected model object
+	 */
+	public ModelObject project(ProjectorContext context, ModelObject model,
+					Role role, ModelListener l) {
+		InterruptBlock ret=(InterruptBlock)super.project(context,
+				model, role, l);
+		InterruptBlock source=(InterruptBlock)model;
+		
+		// If block not projected, then if projected role is in
+		// the list, the re-instate
+		if (ret == null && source.getRoles().contains(role)) {
+			ret = new InterruptBlock();
+			
+			ret.derivedFrom(source);
+		}
+		
+		if (ret != null) {
+			
+			// Project the list of roles
+			for (int i=0; i < source.getRoles().size(); i++) {
+				ret.getRoles().add(new Role(source.getRoles().get(i)));
+			}
+		}
+			
+		return(ret);
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.projector/src/java/org/scribble/protocol/projector/ParallelProjectorRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.protocol.projector/src/java/org/scribble/protocol/projector/ParallelProjectorRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.protocol.projector/src/java/org/scribble/protocol/projector/ParallelProjectorRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,87 @@
+/*
+ * Copyright 2007 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 19 Nov 2007 : Initial version created by gary
+ */
+package org.scribble.protocol.projector;
+
+import org.scribble.extensions.RegistryInfo;
+import org.scribble.model.*;
+import org.scribble.model.admin.ModelListener;
+import org.scribble.projector.*;
+import org.scribble.protocol.model.*;
+
+/**
+ * This class provides the Parallel implementation of the
+ * projector rule.
+ */
+ at RegistryInfo(extension=ProjectorRule.class,notation=ProtocolNotation.NOTATION_CODE)
+public class ParallelProjectorRule implements ProjectorRule {
+
+	/**
+	 * This method determines whether the projection rule is
+	 * appropriate for the supplied model object.
+	 * 
+	 * @param obj The model object to be projected
+	 * @return Whether the rule is relevant for the
+	 * 				model object
+	 */
+	public boolean isSupported(ModelObject obj) {
+		return(obj.getClass() == Parallel.class);
+	}
+	
+	/**
+	 * This method projects the supplied model object based on the
+	 * specified role.
+	 * 
+	 * @param model The model object
+	 * @param role The role
+	 * @param l The model listener
+	 * @return The projected model object
+	 */
+	public ModelObject project(ProjectorContext context, ModelObject model,
+					Role role, ModelListener l) {
+		ModelObject ret=null;
+		Parallel parallel=new Parallel();
+		Parallel source=(Parallel)model;
+		
+		parallel.derivedFrom(source);
+
+		for (int i=0; i < source.getBlocks().size(); i++) {
+			Block block=(Block)
+					context.project(source.getBlocks().get(i),
+							role, l);
+			
+			if (block != null) {
+				parallel.getBlocks().add(block);
+			}
+		}
+		
+		// Check if parallel has atleast one path
+		if (parallel.getBlocks().size() > 0) {
+			ret = parallel;
+			
+			// If parallel only has one path, then
+			// return block
+			if (parallel.getBlocks().size() == 1) {
+				ret = parallel.getBlocks().get(0);
+			}
+		}
+		
+		return(ret);
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.projector/src/java/org/scribble/protocol/projector/ProtocolModelProjectorRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.protocol.projector/src/java/org/scribble/protocol/projector/ProtocolModelProjectorRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.protocol.projector/src/java/org/scribble/protocol/projector/ProtocolModelProjectorRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,84 @@
+/*
+ * Copyright 2007 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 18 Nov 2007 : Initial version created by gary
+ */
+package org.scribble.protocol.projector;
+
+import org.scribble.extensions.RegistryInfo;
+import org.scribble.model.*;
+import org.scribble.model.admin.ModelListener;
+import org.scribble.projector.*;
+import org.scribble.protocol.model.*;
+
+/**
+ * This class provides the ProtocolModel implementation of the
+ * projector rule.
+ */
+ at RegistryInfo(extension=ProjectorRule.class,notation=ProtocolNotation.NOTATION_CODE)
+public class ProtocolModelProjectorRule extends ModelProjectorRule {
+
+	/**
+	 * This method creates the model instance being projected.
+	 * 
+	 * @return The new model
+	 */
+	protected Model createModel() {
+		return(new ProtocolModel());
+	}
+		
+	/**
+	 * This method determines whether the projection rule is
+	 * appropriate for the supplied model object.
+	 * 
+	 * @param obj The model object to be projected
+	 * @return Whether the rule is relevant for the
+	 * 				model object
+	 */
+	public boolean isSupported(ModelObject obj) {
+		return(obj.getClass() == ProtocolModel.class);
+	}
+	
+	/**
+	 * This method projects the supplied model object based on the
+	 * specified role.
+	 * 
+	 * @param model The model object
+	 * @param role The role
+	 * @param l The model listener
+	 * @return The projected model object
+	 */
+	public ModelObject project(ProjectorContext context, ModelObject model,
+					Role role, ModelListener l) {
+		ProtocolModel ret=(ProtocolModel)super.project(context,
+				model, role, l);
+		ProtocolModel source=(ProtocolModel)model;
+		
+		ret.derivedFrom(source);
+		
+		Protocol protocol=null;
+		
+		if (source.getProtocol() != null) {
+			protocol = (Protocol)context.project(source.getProtocol(),
+						role, l);
+		}
+		
+		ret.setProtocol(protocol);
+		
+		return(ret);
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.projector/src/java/org/scribble/protocol/projector/ProtocolProjectorRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.protocol.projector/src/java/org/scribble/protocol/projector/ProtocolProjectorRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.protocol.projector/src/java/org/scribble/protocol/projector/ProtocolProjectorRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,123 @@
+/*
+ * Copyright 2007 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 19 Nov 2007 : Initial version created by gary
+ */
+package org.scribble.protocol.projector;
+
+//import java.util.logging.Logger;
+
+import org.scribble.extensions.RegistryInfo;
+import org.scribble.model.*;
+import org.scribble.model.admin.ModelListener;
+import org.scribble.projector.*;
+import org.scribble.protocol.model.*;
+
+/**
+ * This class provides the Protocol implementation of the
+ * projector rule.
+ */
+ at RegistryInfo(extension=ProjectorRule.class,notation=ProtocolNotation.NOTATION_CODE)
+public class ProtocolProjectorRule implements ProjectorRule {
+
+	/**
+	 * This method determines whether the projection rule is
+	 * appropriate for the supplied model object.
+	 * 
+	 * @param obj The model object to be projected
+	 * @return Whether the rule is relevant for the
+	 * 				model object
+	 */
+	public boolean isSupported(ModelObject obj) {
+		return(obj.getClass() == Protocol.class);
+	}
+	
+	/**
+	 * This method projects the supplied model object based on the
+	 * specified role.
+	 * 
+	 * @param model The model object
+	 * @param role The role
+	 * @param l The model listener
+	 * @return The projected model object
+	 */
+	public ModelObject project(ProjectorContext context, ModelObject model,
+					Role role, ModelListener l) {
+		Activity ret=null;
+		Protocol source=(Protocol)model;
+		java.util.List<Role> roles=null;
+		
+		if (context.isOuterScope() ||
+				(roles=context.getRolesOfInterestForDefinition(source)) != null) {
+
+			if (roles == null) {
+				roles = new java.util.Vector<Role>();
+				roles.add(role);
+			}
+			
+			for (int j=0; j < roles.size(); j++) {
+				Protocol prot = new Protocol();
+
+				// Set current role
+				role = roles.get(j);
+							
+				prot.derivedFrom(source);
+			
+				LocatedName modelName=(LocatedName)
+						context.project(source.getLocatedName(),
+								role, l);
+				prot.setLocatedName(modelName);
+				
+				// Project 'conforms to' references
+				for (int i=0; i < source.getConformsTo().size(); i++) {
+					ConformanceReference ref=source.getConformsTo().get(i);
+					
+					ConformanceReference projectedRef=
+						(ConformanceReference)context.project(ref,
+								role, l);
+					
+					if (projectedRef != null) {
+						prot.getConformsTo().add(projectedRef);
+					}
+				}
+				
+				context.pushScope();
+				
+				prot.setBlock((Block)context.project(source.getBlock(),
+						role, l));
+				prot.getBlock().setParent(prot);
+				
+				context.popScope();
+				
+				if (ret == null) {
+					ret = prot;
+				} else if (ret instanceof Block) {
+					((Block)ret).getContents().add(prot);
+				} else {
+					Block b=new Block();
+					b.getContents().add(ret);
+					b.getContents().add(prot);
+					ret = b;
+				}
+			}
+		}
+
+		return(ret);
+	}
+	
+	//private static Logger logger = Logger.getLogger("org.scribble.protocol.projector");
+}

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.projector/src/java/org/scribble/protocol/projector/ProtocolReferenceProjectorRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.protocol.projector/src/java/org/scribble/protocol/projector/ProtocolReferenceProjectorRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.protocol.projector/src/java/org/scribble/protocol/projector/ProtocolReferenceProjectorRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,84 @@
+/*
+ * Copyright 2007 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 19 Nov 2007 : Initial version created by gary
+ */
+package org.scribble.protocol.projector;
+
+import org.scribble.extensions.RegistryInfo;
+import org.scribble.model.*;
+import org.scribble.model.admin.ModelListener;
+import org.scribble.projector.*;
+import org.scribble.protocol.model.*;
+
+/**
+ * This class provides the ProtocolReference implementation of the
+ * projector rule.
+ */
+ at RegistryInfo(extension=ProjectorRule.class)
+public class ProtocolReferenceProjectorRule extends ModelReferenceProjectorRule {
+
+	/**
+	 * This is the default constructor.
+	 */
+	public ProtocolReferenceProjectorRule() {
+		super(true);
+	}
+	
+	/**
+	 * This method determines whether the projection rule is
+	 * appropriate for the supplied model object.
+	 * 
+	 * @param obj The model object to be projected
+	 * @return Whether the rule is relevant for the
+	 * 				model object
+	 */
+	public boolean isSupported(ModelObject obj) {
+		return(obj.getClass() == ProtocolReference.class);
+	}
+	
+	/**
+	 * This method returns the new reference instance.
+	 * 
+	 * @param source The source reference
+	 * @return The model reference
+	 */
+	protected ModelReference createReference(ModelReference source) {
+		return(new ProtocolReference());
+	}
+	
+	/**
+	 * This method projects the supplied model object based on the
+	 * specified role.
+	 * 
+	 * @param model The model object
+	 * @param role The role
+	 * @param l The model listener
+	 * @return The projected model object
+	 */
+	public ModelObject project(ProjectorContext context, ModelObject model,
+					Role role, ModelListener l) {
+		ProtocolReference ret=(ProtocolReference)super.project(context,
+									model, role, l);
+		
+		if (ret != null) {
+			ret.setInner(((ProtocolReference)model).isInner());
+		}
+		
+		return(ret);
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.projector/src/java/org/scribble/protocol/projector/RaiseProjectorRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.protocol.projector/src/java/org/scribble/protocol/projector/RaiseProjectorRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.protocol.projector/src/java/org/scribble/protocol/projector/RaiseProjectorRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,74 @@
+/*
+ * Copyright 2007-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 10 Nov 2008 : Initial version created by gary
+ */
+package org.scribble.protocol.projector;
+
+import org.scribble.extensions.RegistryInfo;
+import org.scribble.model.*;
+import org.scribble.model.admin.ModelListener;
+import org.scribble.projector.*;
+import org.scribble.protocol.model.*;
+
+/**
+ * This class provides the Raise implementation of the
+ * projector rule.
+ */
+ at RegistryInfo(extension=ProjectorRule.class,notation=ProtocolNotation.NOTATION_CODE)
+public class RaiseProjectorRule implements ProjectorRule {
+
+	/**
+	 * This method determines whether the projection rule is
+	 * appropriate for the supplied model object.
+	 * 
+	 * @param obj The model object to be projected
+	 * @return Whether the rule is relevant for the
+	 * 				model object
+	 */
+	public boolean isSupported(ModelObject obj) {
+		return(obj.getClass() == Raise.class);
+	}
+
+	/**
+	 * This method projects the supplied model object based on the
+	 * specified role.
+	 * 
+	 * @param model The model object
+	 * @param role The role
+	 * @param l The model listener
+	 * @return The projected model object
+	 */
+	public ModelObject project(ProjectorContext context, ModelObject model,
+					Role role, ModelListener l) {
+		Raise ret=null;
+		Raise raise=(Raise)model;
+		
+		if (raise.getRoles().contains(role)) {
+			ret = new Raise();
+			
+			ret.derivedFrom(raise);
+			
+			ret.getRoles().add(new Role(role));
+			
+			ret.setType((TypeReference)context.project(raise.getType(),
+					role, l));
+		}
+		
+		return(ret);
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.projector/src/java/org/scribble/protocol/projector/RecurProjectorRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.protocol.projector/src/java/org/scribble/protocol/projector/RecurProjectorRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.protocol.projector/src/java/org/scribble/protocol/projector/RecurProjectorRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,74 @@
+/*
+ * Copyright 2007-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 9 Mar 2008 : Initial version created by gary
+ */
+package org.scribble.protocol.projector;
+
+import org.scribble.extensions.RegistryInfo;
+import org.scribble.model.*;
+import org.scribble.model.admin.ModelListener;
+import org.scribble.protocol.model.*;
+import org.scribble.projector.*;
+
+/**
+ * This class provides the Recur implementation of the
+ * projector rule.
+ */
+ at RegistryInfo(extension=ProjectorRule.class,notation=ProtocolNotation.NOTATION_CODE)
+public class RecurProjectorRule implements ProjectorRule {
+
+	/**
+	 * This method determines whether the projection rule is
+	 * appropriate for the supplied model object.
+	 * 
+	 * @param obj The model object to be projected
+	 * @return Whether the rule is relevant for the
+	 * 				model object
+	 */
+	public boolean isSupported(ModelObject obj) {
+		return(obj.getClass() == Recur.class);
+	}
+	
+	/**
+	 * This method projects the supplied model object based on the
+	 * specified role.
+	 * 
+	 * @param model The model object
+	 * @param role The role
+	 * @param l The model listener
+	 * @return The projected model object
+	 */
+	public ModelObject project(ProjectorContext context, ModelObject model,
+					Role role, ModelListener l) {
+		Recur ret=new Recur();
+		Recur source=(Recur)model;
+
+		ret.derivedFrom(source);
+		
+		if (source.getRecursionBlock() != null &&
+				source.getRecursionBlock().getName() != null) {
+			Object decl=context.getState(source.getRecursionBlock().getName());
+			
+			if (decl instanceof RecursionBlock) {
+				ret.setRecursionBlock((RecursionBlock)decl);				
+			}
+		}
+		
+		return(ret);
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.projector/src/java/org/scribble/protocol/projector/RecursionBlockProjectorRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.protocol.projector/src/java/org/scribble/protocol/projector/RecursionBlockProjectorRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.protocol.projector/src/java/org/scribble/protocol/projector/RecursionBlockProjectorRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,80 @@
+/*
+ * Copyright 2007-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 9 Mar 2008 : Initial version created by gary
+ */
+package org.scribble.protocol.projector;
+
+import org.scribble.extensions.RegistryInfo;
+import org.scribble.model.*;
+import org.scribble.model.admin.ModelListener;
+import org.scribble.protocol.model.*;
+import org.scribble.projector.*;
+
+/**
+ * This class provides the RecursionBlock implementation of the
+ * projector rule.
+ */
+ at RegistryInfo(extension=ProjectorRule.class,notation=ProtocolNotation.NOTATION_CODE)
+public class RecursionBlockProjectorRule implements ProjectorRule {
+
+	/**
+	 * This method determines whether the projection rule is
+	 * appropriate for the supplied model object.
+	 * 
+	 * @param obj The model object to be projected
+	 * @return Whether the rule is relevant for the
+	 * 				model object
+	 */
+	public boolean isSupported(ModelObject obj) {
+		return(obj.getClass() == RecursionBlock.class);
+	}
+	
+	/**
+	 * This method projects the supplied model object based on the
+	 * specified role.
+	 * 
+	 * @param model The model object
+	 * @param role The role
+	 * @param l The model listener
+	 * @return The projected model object
+	 */
+	public ModelObject project(ProjectorContext context, ModelObject model,
+					Role role, ModelListener l) {
+		RecursionBlock ret=new RecursionBlock();
+		RecursionBlock source=(RecursionBlock)model;
+
+		ret.derivedFrom(source);
+		
+		ret.setName(source.getName());
+		
+		if (ret.getName() != null) {
+			context.setState(ret.getName(), ret);
+		}
+
+		if (ret != null && source.getBlock() != null) {
+			
+			// Project the block
+			ret.setBlock((Block)
+					context.project(source.getBlock(),
+								role, l));
+			ret.getBlock().setParent(ret);
+		}
+		
+		return(ret);
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.projector/src/java/org/scribble/protocol/projector/RepeatProjectorRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.protocol.projector/src/java/org/scribble/protocol/projector/RepeatProjectorRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.protocol.projector/src/java/org/scribble/protocol/projector/RepeatProjectorRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,79 @@
+/*
+ * Copyright 2007-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 9 Mar 2008 : Initial version created by gary
+ */
+package org.scribble.protocol.projector;
+
+import org.scribble.extensions.RegistryInfo;
+import org.scribble.model.*;
+import org.scribble.model.admin.ModelListener;
+import org.scribble.protocol.model.*;
+import org.scribble.projector.*;
+
+/**
+ * This class provides the Repeat implementation of the
+ * projector rule.
+ */
+ at RegistryInfo(extension=ProjectorRule.class,notation=ProtocolNotation.NOTATION_CODE)
+public class RepeatProjectorRule implements ProjectorRule {
+
+	/**
+	 * This method determines whether the projection rule is
+	 * appropriate for the supplied model object.
+	 * 
+	 * @param obj The model object to be projected
+	 * @return Whether the rule is relevant for the
+	 * 				model object
+	 */
+	public boolean isSupported(ModelObject obj) {
+		return(obj.getClass() == Repeat.class);
+	}
+	
+	/**
+	 * This method projects the supplied model object based on the
+	 * specified role.
+	 * 
+	 * @param model The model object
+	 * @param role The role
+	 * @param l The model listener
+	 * @return The projected model object
+	 */
+	public ModelObject project(ProjectorContext context, ModelObject model,
+					Role role, ModelListener l) {
+		Repeat ret=new Repeat();
+		Repeat source=(Repeat)model;
+
+		ret.derivedFrom(source);
+		
+		// Project the list of roles
+		for (int i=0; i < source.getRoles().size(); i++) {
+			ret.getRoles().add(new Role(source.getRoles().get(i)));
+		}
+		
+		if (ret != null && source.getBlock() != null) {
+			
+			// Project the block
+			ret.setBlock((Block)
+					context.project(source.getBlock(),
+								role, l));
+			ret.getBlock().setParent(ret);
+		}
+		
+		return(ret);
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.projector/src/java/org/scribble/protocol/projector/RunProjectorRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.protocol.projector/src/java/org/scribble/protocol/projector/RunProjectorRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.protocol.projector/src/java/org/scribble/protocol/projector/RunProjectorRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,54 @@
+/*
+ * Copyright 2007 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 25 Nov 2007 : Initial version created by gary
+ */
+package org.scribble.protocol.projector;
+
+import org.scribble.extensions.RegistryInfo;
+import org.scribble.model.*;
+import org.scribble.projector.*;
+import org.scribble.protocol.model.*;
+
+/**
+ * This class provides the Run implementation of the
+ * projector rule.
+ */
+ at RegistryInfo(extension=ProjectorRule.class,notation=ProtocolNotation.NOTATION_CODE)
+public class RunProjectorRule extends ComposeProjectorRule {
+
+	/**
+	 * This method determines whether the projection rule is
+	 * appropriate for the supplied model object.
+	 * 
+	 * @param obj The model object to be projected
+	 * @return Whether the rule is relevant for the
+	 * 				model object
+	 */
+	public boolean isSupported(ModelObject obj) {
+		return(obj.getClass() == Run.class);
+	}
+	
+	/**
+	 * This method creates the model include object being projected.
+	 * 
+	 * @return The model include
+	 */
+	protected ModelInclude createModelInclude() {
+		return(new Run());
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.projector/src/java/org/scribble/protocol/projector/SpawnProjectorRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.protocol.projector/src/java/org/scribble/protocol/projector/SpawnProjectorRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.protocol.projector/src/java/org/scribble/protocol/projector/SpawnProjectorRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,54 @@
+/*
+ * Copyright 2007-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 19 Aug 08 : Initial version created by gary
+ */
+package org.scribble.protocol.projector;
+
+import org.scribble.extensions.RegistryInfo;
+import org.scribble.model.*;
+import org.scribble.projector.*;
+import org.scribble.protocol.model.*;
+
+/**
+ * This class provides the Spawn implementation of the
+ * projector rule.
+ */
+ at RegistryInfo(extension=ProjectorRule.class,notation=ProtocolNotation.NOTATION_CODE)
+public class SpawnProjectorRule extends ComposeProjectorRule {
+
+	/**
+	 * This method determines whether the projection rule is
+	 * appropriate for the supplied model object.
+	 * 
+	 * @param obj The model object to be projected
+	 * @return Whether the rule is relevant for the
+	 * 				model object
+	 */
+	public boolean isSupported(ModelObject obj) {
+		return(obj.getClass() == Spawn.class);
+	}
+	
+	/**
+	 * This method creates the model include object being projected.
+	 * 
+	 * @return The model include
+	 */
+	protected ModelInclude createModelInclude() {
+		return(new Spawn());
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.projector/src/java/org/scribble/protocol/projector/TryEscapeProjectorRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.protocol.projector/src/java/org/scribble/protocol/projector/TryEscapeProjectorRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.protocol.projector/src/java/org/scribble/protocol/projector/TryEscapeProjectorRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,90 @@
+/*
+ * Copyright 2005-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 19 Oct 2008 : Initial version created by gary
+ */
+package org.scribble.protocol.projector;
+
+import org.scribble.extensions.RegistryInfo;
+import org.scribble.model.*;
+import org.scribble.model.admin.ModelListener;
+import org.scribble.projector.*;
+import org.scribble.protocol.model.*;
+
+/**
+ * This class provides the TryEscape implementation of the
+ * projector rule.
+ */
+ at RegistryInfo(extension=ProjectorRule.class,notation=ProtocolNotation.NOTATION_CODE)
+public class TryEscapeProjectorRule implements ProjectorRule {
+
+	/**
+	 * This method determines whether the projection rule is
+	 * appropriate for the supplied model object.
+	 * 
+	 * @param obj The model object to be projected
+	 * @return Whether the rule is relevant for the
+	 * 				model object
+	 */
+	public boolean isSupported(ModelObject obj) {
+		return(obj.getClass() == TryEscape.class);
+	}
+	
+	/**
+	 * This method projects the supplied model object based on the
+	 * specified role.
+	 * 
+	 * @param model The model object
+	 * @param role The role
+	 * @param l The model listener
+	 * @return The projected model object
+	 */
+	public ModelObject project(ProjectorContext context, ModelObject model,
+					Role role, ModelListener l) {
+		TryEscape ret=new TryEscape();
+		TryEscape source=(TryEscape)model;
+
+		ret.derivedFrom(source);
+
+		// Project the try block
+		Block tryBlock=(Block)
+				context.project(source.getBlock(), role,
+						l);
+		
+		if (tryBlock != null && tryBlock.getContents().size() > 0) {
+			ret.setBlock(tryBlock);
+		}
+		
+		for (int i=0; i < source.getEscapeBlocks().size(); i++) {
+			EscapeBlock block=(EscapeBlock)
+					context.project(source.getEscapeBlocks().get(i),
+							role, l);
+			
+			if (block != null) {
+				ret.getEscapeBlocks().add(block);
+			}
+		}
+		
+		// Check if choice has atleast one path
+		if (ret.getBlock().getContents().size() == 0 &&
+				ret.getEscapeBlocks().size() == 0) {
+			ret = null;
+		}
+		
+		return(ret);
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.projector/src/java/org/scribble/protocol/projector/osgi/Activator.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.protocol.projector/src/java/org/scribble/protocol/projector/osgi/Activator.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.protocol.projector/src/java/org/scribble/protocol/projector/osgi/Activator.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,48 @@
+package org.scribble.protocol.projector.osgi;
+
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class Activator implements BundleActivator {
+
+	// The plug-in ID
+	public static final String PLUGIN_ID = "org.scribble.protocol.projector";
+
+	// The shared instance
+	private static Activator plugin;
+	
+	/**
+	 * The constructor
+	 */
+	public Activator() {
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.eclipse.core.runtime.Plugins#start(org.osgi.framework.BundleContext)
+	 */
+	public void start(BundleContext context) throws Exception {
+		plugin = this;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.eclipse.core.runtime.Plugin#stop(org.osgi.framework.BundleContext)
+	 */
+	public void stop(BundleContext context) throws Exception {
+		plugin = null;
+	}
+
+	/**
+	 * Returns the shared instance
+	 *
+	 * @return the shared instance
+	 */
+	public static Activator getDefault() {
+		return plugin;
+	}
+
+}

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.validation/.classpath
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.protocol.validation/.classpath	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.protocol.validation/.classpath	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="src" path="src/java"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+	<classpathentry kind="output" path="classes"/>
+</classpath>

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.validation/.project
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.protocol.validation/.project	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.protocol.validation/.project	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>org.scribble.protocol.validation</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.ManifestBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.SchemaBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.pde.PluginNature</nature>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+	</natures>
+</projectDescription>

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.validation/LICENSE.txt
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.protocol.validation/LICENSE.txt	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.protocol.validation/LICENSE.txt	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,201 @@
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.validation/META-INF/MANIFEST.MF
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.protocol.validation/META-INF/MANIFEST.MF	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.protocol.validation/META-INF/MANIFEST.MF	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,20 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Scribble Protocol Validation Plug-in
+Bundle-SymbolicName: org.scribble.protocol.validation;singleton:=true
+Bundle-Version: 0.1.0.qualifier
+Bundle-Activator: org.scribble.protocol.validation.osgi.Activator
+Bundle-Vendor: www.scribble.org
+Import-Package: org.osgi.framework;version="1.3.0"
+Require-Bundle: org.scribble.core,
+ org.scribble.protocol.model
+Bundle-ActivationPolicy: lazy
+Scribble-Extensions: org.scribble.protocol.validation.ProtocolModelValidationRule,
+  org.scribble.protocol.validation.ProtocolValidationRule,
+  org.scribble.protocol.validation.ChoiceValidationRule,
+  org.scribble.protocol.validation.ParallelValidationRule,
+  org.scribble.protocol.validation.RecursionBlockValidationRule,
+  org.scribble.protocol.validation.RepeatValidationRule,
+  org.scribble.protocol.validation.TryEscapeValidationRule,
+  org.scribble.protocol.validation.RaiseValidationRule,
+  org.scribble.protocol.validation.ComposeValidationRule

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.validation/build.properties
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.protocol.validation/build.properties	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.protocol.validation/build.properties	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,5 @@
+source.. = src/java/
+output.. = classes/
+bin.includes = META-INF/,\
+               .,\
+               plugin.xml

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.validation/classes/org/scribble/protocol/validation/ChoiceValidationRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.protocol.validation/classes/org/scribble/protocol/validation/ChoiceValidationRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.validation/classes/org/scribble/protocol/validation/ComposeValidationRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.protocol.validation/classes/org/scribble/protocol/validation/ComposeValidationRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.validation/classes/org/scribble/protocol/validation/Messages.properties
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.protocol.validation/classes/org/scribble/protocol/validation/Messages.properties	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.protocol.validation/classes/org/scribble/protocol/validation/Messages.properties	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,21 @@
+# /*
+# * Copyright 2007 Pi4 Technologies Ltd
+# *
+# * Licensed under the Apache License, Version 2.0 (the "License");
+# * you may not use this file except in compliance with the License.
+# * You may obtain a copy of the License at
+# *
+# *     http://www.apache.org/licenses/LICENSE-2.0
+# *
+# * Unless required by applicable law or agreed to in writing, software
+# * distributed under the License is distributed on an "AS IS" BASIS,
+# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# * See the License for the specific language governing permissions and
+# * limitations under the License.
+# *
+# *
+# * Change History:
+# * 28 Oct 2007 : Initial version created by gary
+# */
+
+_RAISED_TYPE_NOT_CAUGHT=Raised type '{0}' is not caught within the enclosing definition

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.validation/classes/org/scribble/protocol/validation/ParallelValidationRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.protocol.validation/classes/org/scribble/protocol/validation/ParallelValidationRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.validation/classes/org/scribble/protocol/validation/ProtocolModelValidationRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.protocol.validation/classes/org/scribble/protocol/validation/ProtocolModelValidationRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.validation/classes/org/scribble/protocol/validation/ProtocolValidationRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.protocol.validation/classes/org/scribble/protocol/validation/ProtocolValidationRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.validation/classes/org/scribble/protocol/validation/RaiseValidationRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.protocol.validation/classes/org/scribble/protocol/validation/RaiseValidationRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.validation/classes/org/scribble/protocol/validation/RecursionBlockValidationRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.protocol.validation/classes/org/scribble/protocol/validation/RecursionBlockValidationRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.validation/classes/org/scribble/protocol/validation/RepeatValidationRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.protocol.validation/classes/org/scribble/protocol/validation/RepeatValidationRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.validation/classes/org/scribble/protocol/validation/TryEscapeValidationRule.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.protocol.validation/classes/org/scribble/protocol/validation/TryEscapeValidationRule.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.validation/classes/org/scribble/protocol/validation/osgi/Activator.class
===================================================================
(Binary files differ)


Property changes on: tools/eclipse/trunk/plugins/org.scribble.protocol.validation/classes/org/scribble/protocol/validation/osgi/Activator.class
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.validation/src/java/org/scribble/protocol/validation/ChoiceValidationRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.protocol.validation/src/java/org/scribble/protocol/validation/ChoiceValidationRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.protocol.validation/src/java/org/scribble/protocol/validation/ChoiceValidationRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,67 @@
+/*
+ * Copyright 2007-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 13 Mar 2008 : Initial version created by gary
+ */
+package org.scribble.protocol.validation;
+
+import org.scribble.validation.*;
+import org.scribble.extensions.*;
+import org.scribble.model.*;
+import org.scribble.model.admin.ModelListener;
+import org.scribble.protocol.model.*;
+
+/**
+ * This class implements the validation rule for the
+ * Choice construct.
+ */
+ at RegistryInfo(extension=ValidationRule.class,notation=ProtocolNotation.NOTATION_CODE)
+public class ChoiceValidationRule extends AbstractValidationRule {
+
+	/**
+	 * This is the default constructor.
+	 */
+	public ChoiceValidationRule() {
+	}
+
+	/**
+	 * This method determines whether the rule is appropriate for
+	 * the supplied model object.
+	 * 
+	 * @param obj The model object
+	 * @return Whether the rule is appropriate
+	 */
+	public boolean isSupported(ModelObject obj) {
+		return(obj instanceof Choice);
+	}
+
+	/**
+	 * This method validates the supplied model object.
+	 * 
+	 * @param obj The model object
+	 * @param context The context
+	 * @param l The listener
+	 */
+	public void validate(ModelObject obj, ValidationContext context,
+			ModelListener l) {
+		Choice elem=(Choice)obj;
+
+		for (int i=0; i < elem.getBlocks().size(); i++) {
+			context.validate(elem.getBlocks().get(i), l);
+		}
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.validation/src/java/org/scribble/protocol/validation/ComposeValidationRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.protocol.validation/src/java/org/scribble/protocol/validation/ComposeValidationRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.protocol.validation/src/java/org/scribble/protocol/validation/ComposeValidationRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,96 @@
+/*
+ * Copyright 2007 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 2 Nov 2007 : Initial version created by gary
+ */
+package org.scribble.protocol.validation;
+
+import org.scribble.validation.*;
+import org.scribble.extensions.*;
+import org.scribble.model.*;
+import org.scribble.model.admin.ModelIssue;
+import org.scribble.model.admin.ModelListener;
+import org.scribble.protocol.model.*;
+
+/**
+ * This class implements the validation rule for the
+ * compose construct.
+ */
+ at RegistryInfo(extension=ValidationRule.class,notation=ProtocolNotation.NOTATION_CODE)
+public class ComposeValidationRule extends AbstractValidationRule {
+
+	/**
+	 * This is the default constructor.
+	 */
+	public ComposeValidationRule() {
+	}
+
+	/**
+	 * This method determines whether the rule is appropriate for
+	 * the supplied model object.
+	 * 
+	 * @param obj The model object
+	 * @return Whether the rule is appropriate
+	 */
+	public boolean isSupported(ModelObject obj) {
+		return(obj instanceof Compose);
+	}
+
+	/**
+	 * This method validates the supplied model object.
+	 * 
+	 * @param obj The model object
+	 * @param context The context
+	 * @param l The listener
+	 */
+	public void validate(ModelObject obj, ValidationContext context,
+			ModelListener l) {
+		Compose compose=(Compose)obj;
+		
+		Protocol prot=compose.getDefinition();
+		
+		// Validate bound parameters
+		java.util.Iterator<DeclarationBinding> iter=
+					compose.getBindings().iterator();
+		
+		while (iter.hasNext()) {
+			DeclarationBinding db=iter.next();
+			
+			// Check if bound declaration exists
+			Declaration other=prot.getDeclaration(db.getBoundName());
+			
+			if (other == null) {
+				String name=compose.getReference().getAlias();
+				
+				if (compose.getReference().getLocatedRole() != null) {
+					name += ModelReference.LOCATED_REFERENCE_SEPARATOR+
+								compose.getReference().getLocatedRole();
+				}
+								
+				l.error(new ModelIssue(db, org.scribble.util.MessageUtil.format(
+						java.util.PropertyResourceBundle.getBundle(
+						"org.scribble.validation.Messages"),
+							"_NOT_FOUND_BOUND_DECLARATION",
+							new String[]{db.getBoundName(), name})));
+			} else {
+				// TODO:
+				// Check if the two declarations are compatible
+				// types
+			}
+		}
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.validation/src/java/org/scribble/protocol/validation/Messages.properties
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.protocol.validation/src/java/org/scribble/protocol/validation/Messages.properties	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.protocol.validation/src/java/org/scribble/protocol/validation/Messages.properties	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,21 @@
+# /*
+# * Copyright 2007 Pi4 Technologies Ltd
+# *
+# * Licensed under the Apache License, Version 2.0 (the "License");
+# * you may not use this file except in compliance with the License.
+# * You may obtain a copy of the License at
+# *
+# *     http://www.apache.org/licenses/LICENSE-2.0
+# *
+# * Unless required by applicable law or agreed to in writing, software
+# * distributed under the License is distributed on an "AS IS" BASIS,
+# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# * See the License for the specific language governing permissions and
+# * limitations under the License.
+# *
+# *
+# * Change History:
+# * 28 Oct 2007 : Initial version created by gary
+# */
+
+_RAISED_TYPE_NOT_CAUGHT=Raised type '{0}' is not caught within the enclosing definition

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.validation/src/java/org/scribble/protocol/validation/ParallelValidationRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.protocol.validation/src/java/org/scribble/protocol/validation/ParallelValidationRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.protocol.validation/src/java/org/scribble/protocol/validation/ParallelValidationRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,67 @@
+/*
+ * Copyright 2007-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 13 Mar 2008 : Initial version created by gary
+ */
+package org.scribble.protocol.validation;
+
+import org.scribble.validation.*;
+import org.scribble.extensions.*;
+import org.scribble.model.*;
+import org.scribble.model.admin.ModelListener;
+import org.scribble.protocol.model.*;
+
+/**
+ * This class implements the validation rule for the
+ * Parallel construct.
+ */
+ at RegistryInfo(extension=ValidationRule.class,notation=ProtocolNotation.NOTATION_CODE)
+public class ParallelValidationRule extends AbstractValidationRule {
+
+	/**
+	 * This is the default constructor.
+	 */
+	public ParallelValidationRule() {
+	}
+
+	/**
+	 * This method determines whether the rule is appropriate for
+	 * the supplied model object.
+	 * 
+	 * @param obj The model object
+	 * @return Whether the rule is appropriate
+	 */
+	public boolean isSupported(ModelObject obj) {
+		return(obj instanceof Parallel);
+	}
+
+	/**
+	 * This method validates the supplied model object.
+	 * 
+	 * @param obj The model object
+	 * @param context The context
+	 * @param l The listener
+	 */
+	public void validate(ModelObject obj, ValidationContext context,
+			ModelListener l) {
+		Parallel elem=(Parallel)obj;
+
+		for (int i=0; i < elem.getBlocks().size(); i++) {
+			context.validate(elem.getBlocks().get(i), l);
+		}
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.validation/src/java/org/scribble/protocol/validation/ProtocolModelValidationRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.protocol.validation/src/java/org/scribble/protocol/validation/ProtocolModelValidationRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.protocol.validation/src/java/org/scribble/protocol/validation/ProtocolModelValidationRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,65 @@
+/*
+ * Copyright 2007-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 13 Mar 2008 : Initial version created by gary
+ */
+package org.scribble.protocol.validation;
+
+import org.scribble.validation.*;
+import org.scribble.extensions.*;
+import org.scribble.model.*;
+import org.scribble.model.admin.ModelListener;
+import org.scribble.protocol.model.*;
+
+/**
+ * This class implements the validation rule for the
+ * ProtocolModel component.
+ */
+ at RegistryInfo(extension=ValidationRule.class,notation=ProtocolNotation.NOTATION_CODE)
+public class ProtocolModelValidationRule extends AbstractValidationRule {
+
+	/**
+	 * This is the default constructor.
+	 */
+	public ProtocolModelValidationRule() {
+	}
+
+	/**
+	 * This method determines whether the rule is appropriate for
+	 * the supplied model object.
+	 * 
+	 * @param obj The model object
+	 * @return Whether the rule is appropriate
+	 */
+	public boolean isSupported(ModelObject obj) {
+		return(obj instanceof ProtocolModel);
+	}
+
+	/**
+	 * This method validates the supplied model object.
+	 * 
+	 * @param obj The model object
+	 * @param context The context
+	 * @param l The listener
+	 */
+	public void validate(ModelObject obj, ValidationContext context,
+			ModelListener l) {
+		ProtocolModel model=(ProtocolModel)obj;
+
+		context.validate(model.getProtocol(), l);
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.validation/src/java/org/scribble/protocol/validation/ProtocolValidationRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.protocol.validation/src/java/org/scribble/protocol/validation/ProtocolValidationRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.protocol.validation/src/java/org/scribble/protocol/validation/ProtocolValidationRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,72 @@
+/*
+ * Copyright 2007 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 11 Nov 2007 : Initial version created by gary
+ */
+package org.scribble.protocol.validation;
+
+import org.scribble.validation.*;
+import org.scribble.extensions.*;
+import org.scribble.model.*;
+import org.scribble.model.admin.ModelListener;
+import org.scribble.protocol.model.*;
+
+/**
+ * This class implements the validation rule for the
+ * protocol.
+ */
+ at RegistryInfo(extension=ValidationRule.class,notation=ProtocolNotation.NOTATION_CODE)
+public class ProtocolValidationRule extends AbstractValidationRule {
+
+	/**
+	 * This is the default constructor.
+	 */
+	public ProtocolValidationRule() {
+	}
+
+	/**
+	 * This method determines whether the rule is appropriate for
+	 * the supplied model object.
+	 * 
+	 * @param obj The model object
+	 * @return Whether the rule is appropriate
+	 */
+	public boolean isSupported(ModelObject obj) {
+		return(obj instanceof Protocol);
+	}
+
+	/**
+	 * This method validates the supplied model object.
+	 * 
+	 * @param obj The model object
+	 * @param context The context
+	 * @param l The listener
+	 */
+	public void validate(ModelObject obj, ValidationContext context,
+			ModelListener l) {
+		Protocol protocol=(Protocol)obj;
+		
+		// Initialize the located role for the scope
+		if (protocol.getLocatedName() != null &&
+				protocol.getLocatedName().getRole() != null) {
+			context.setLocatedRole(
+					protocol.getLocatedName().getRole().getName());
+		}
+		
+		context.validate(protocol.getBlock(), l);
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.validation/src/java/org/scribble/protocol/validation/RaiseValidationRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.protocol.validation/src/java/org/scribble/protocol/validation/RaiseValidationRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.protocol.validation/src/java/org/scribble/protocol/validation/RaiseValidationRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,99 @@
+/*
+ * Copyright 2007-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 11 Nov 2008 : Initial version created by gary
+ */
+package org.scribble.protocol.validation;
+
+import org.scribble.validation.*;
+import org.scribble.extensions.*;
+import org.scribble.model.*;
+import org.scribble.model.admin.ModelIssue;
+import org.scribble.model.admin.ModelListener;
+import org.scribble.protocol.model.*;
+
+/**
+ * This class implements the validation rule for the
+ * Raise construct.
+ */
+ at RegistryInfo(extension=ValidationRule.class,notation=ProtocolNotation.NOTATION_CODE)
+public class RaiseValidationRule extends AbstractValidationRule {
+
+	/**
+	 * This is the default constructor.
+	 */
+	public RaiseValidationRule() {
+	}
+
+	/**
+	 * This method determines whether the rule is appropriate for
+	 * the supplied model object.
+	 * 
+	 * @param obj The model object
+	 * @return Whether the rule is appropriate
+	 */
+	public boolean isSupported(ModelObject obj) {
+		return(obj instanceof Raise);
+	}
+
+	/**
+	 * This method validates the supplied model object.
+	 * 
+	 * @param obj The model object
+	 * @param context The context
+	 * @param l The listener
+	 */
+	public void validate(ModelObject obj, ValidationContext context,
+			ModelListener l) {
+		Raise elem=(Raise)obj;
+
+		if (elem.getType() != null) {
+			boolean f_found=false;
+			
+			// Check that a 'catch' for this type
+			ModelObject act=elem.getParent();
+			
+			while (f_found == false && act != null &&
+					(act instanceof Definition) == false) {
+			
+				if (act instanceof TryEscape) {
+					TryEscape te=(TryEscape)act;
+					
+					for (int i=0; f_found == false &&
+							i < te.getEscapeBlocks().size(); i++) {
+						
+						if (te.getEscapeBlocks().get(i) instanceof CatchBlock &&
+								elem.getType().equals(((CatchBlock)
+									te.getEscapeBlocks().get(i)).getType())) {
+							f_found = true;
+						}
+					}
+				}
+				
+				act = act.getParent();
+			}
+			
+			if (f_found == false) {
+				l.error(new ModelIssue(elem, org.scribble.util.MessageUtil.format(
+						java.util.PropertyResourceBundle.getBundle(
+						"org.scribble.conversation.validation.Messages"),
+							"_RAISED_TYPE_NOT_CAUGHT",
+							new String[]{elem.getType().toString()})));
+			}
+		}
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.validation/src/java/org/scribble/protocol/validation/RecursionBlockValidationRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.protocol.validation/src/java/org/scribble/protocol/validation/RecursionBlockValidationRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.protocol.validation/src/java/org/scribble/protocol/validation/RecursionBlockValidationRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,65 @@
+/*
+ * Copyright 2007-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 13 Mar 2008 : Initial version created by gary
+ */
+package org.scribble.protocol.validation;
+
+import org.scribble.validation.*;
+import org.scribble.extensions.*;
+import org.scribble.model.*;
+import org.scribble.model.admin.ModelListener;
+import org.scribble.protocol.model.*;
+
+/**
+ * This class implements the validation rule for the
+ * RecursionBlock construct.
+ */
+ at RegistryInfo(extension=ValidationRule.class,notation=ProtocolNotation.NOTATION_CODE)
+public class RecursionBlockValidationRule extends AbstractValidationRule {
+
+	/**
+	 * This is the default constructor.
+	 */
+	public RecursionBlockValidationRule() {
+	}
+
+	/**
+	 * This method determines whether the rule is appropriate for
+	 * the supplied model object.
+	 * 
+	 * @param obj The model object
+	 * @return Whether the rule is appropriate
+	 */
+	public boolean isSupported(ModelObject obj) {
+		return(obj instanceof RecursionBlock);
+	}
+
+	/**
+	 * This method validates the supplied model object.
+	 * 
+	 * @param obj The model object
+	 * @param context The context
+	 * @param l The listener
+	 */
+	public void validate(ModelObject obj, ValidationContext context,
+			ModelListener l) {
+		RecursionBlock elem=(RecursionBlock)obj;
+
+		context.validate(elem.getBlock(), l);
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.validation/src/java/org/scribble/protocol/validation/RepeatValidationRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.protocol.validation/src/java/org/scribble/protocol/validation/RepeatValidationRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.protocol.validation/src/java/org/scribble/protocol/validation/RepeatValidationRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,65 @@
+/*
+ * Copyright 2007-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 13 Mar 2008 : Initial version created by gary
+ */
+package org.scribble.protocol.validation;
+
+import org.scribble.validation.*;
+import org.scribble.extensions.*;
+import org.scribble.model.*;
+import org.scribble.model.admin.ModelListener;
+import org.scribble.protocol.model.*;
+
+/**
+ * This class implements the validation rule for the
+ * Repeat construct.
+ */
+ at RegistryInfo(extension=ValidationRule.class,notation=ProtocolNotation.NOTATION_CODE)
+public class RepeatValidationRule extends AbstractValidationRule {
+
+	/**
+	 * This is the default constructor.
+	 */
+	public RepeatValidationRule() {
+	}
+
+	/**
+	 * This method determines whether the rule is appropriate for
+	 * the supplied model object.
+	 * 
+	 * @param obj The model object
+	 * @return Whether the rule is appropriate
+	 */
+	public boolean isSupported(ModelObject obj) {
+		return(obj instanceof Repeat);
+	}
+
+	/**
+	 * This method validates the supplied model object.
+	 * 
+	 * @param obj The model object
+	 * @param context The context
+	 * @param l The listener
+	 */
+	public void validate(ModelObject obj, ValidationContext context,
+			ModelListener l) {
+		Repeat elem=(Repeat)obj;
+
+		context.validate(elem.getBlock(), l);
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.validation/src/java/org/scribble/protocol/validation/TryEscapeValidationRule.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.protocol.validation/src/java/org/scribble/protocol/validation/TryEscapeValidationRule.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.protocol.validation/src/java/org/scribble/protocol/validation/TryEscapeValidationRule.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,71 @@
+/*
+ * Copyright 2007-8 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * 11 Nov 2008 : Initial version created by gary
+ */
+package org.scribble.protocol.validation;
+
+import org.scribble.validation.*;
+import org.scribble.extensions.*;
+import org.scribble.model.*;
+import org.scribble.model.admin.ModelListener;
+import org.scribble.protocol.model.*;
+
+/**
+ * This class implements the validation rule for the
+ * TryEscape construct.
+ */
+ at RegistryInfo(extension=ValidationRule.class,notation=ProtocolNotation.NOTATION_CODE)
+public class TryEscapeValidationRule extends AbstractValidationRule {
+
+	/**
+	 * This is the default constructor.
+	 */
+	public TryEscapeValidationRule() {
+	}
+
+	/**
+	 * This method determines whether the rule is appropriate for
+	 * the supplied model object.
+	 * 
+	 * @param obj The model object
+	 * @return Whether the rule is appropriate
+	 */
+	public boolean isSupported(ModelObject obj) {
+		return(obj instanceof TryEscape);
+	}
+
+	/**
+	 * This method validates the supplied model object.
+	 * 
+	 * @param obj The model object
+	 * @param context The context
+	 * @param l The listener
+	 */
+	public void validate(ModelObject obj, ValidationContext context,
+			ModelListener l) {
+		TryEscape elem=(TryEscape)obj;
+		
+		if (elem.getBlock() != null) {
+			context.validate(elem.getBlock(), l);
+		}
+
+		for (int i=0; i < elem.getEscapeBlocks().size(); i++) {
+			context.validate(elem.getEscapeBlocks().get(i), l);
+		}
+	}
+}

Added: tools/eclipse/trunk/plugins/org.scribble.protocol.validation/src/java/org/scribble/protocol/validation/osgi/Activator.java
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.protocol.validation/src/java/org/scribble/protocol/validation/osgi/Activator.java	                        (rev 0)
+++ tools/eclipse/trunk/plugins/org.scribble.protocol.validation/src/java/org/scribble/protocol/validation/osgi/Activator.java	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,48 @@
+package org.scribble.protocol.validation.osgi;
+
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class Activator implements BundleActivator {
+
+	// The plug-in ID
+	public static final String PLUGIN_ID = "org.scribble.protocol.validation";
+
+	// The shared instance
+	private static Activator plugin;
+	
+	/**
+	 * The constructor
+	 */
+	public Activator() {
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.eclipse.core.runtime.Plugins#start(org.osgi.framework.BundleContext)
+	 */
+	public void start(BundleContext context) throws Exception {
+		plugin = this;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.eclipse.core.runtime.Plugin#stop(org.osgi.framework.BundleContext)
+	 */
+	public void stop(BundleContext context) throws Exception {
+		plugin = null;
+	}
+
+	/**
+	 * Returns the shared instance
+	 *
+	 * @return the shared instance
+	 */
+	public static Activator getDefault() {
+		return plugin;
+	}
+
+}

Added: tools/eclipse/trunk/plugins/pom.xml
===================================================================
--- tools/eclipse/trunk/plugins/pom.xml	                        (rev 0)
+++ tools/eclipse/trunk/plugins/pom.xml	2010-03-06 20:53:29 UTC (rev 168)
@@ -0,0 +1,24 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" 
+	 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+	<modelVersion>4.0.0</modelVersion>
+
+    <groupId>org.jboss.savara.tools.eclipse</groupId>
+    <artifactId>plugins</artifactId>
+    <packaging>pom</packaging>
+    <name>Savara::Tools::Eclipse::Plugins</name>
+    <version>1.0-SNAPSHOT</version>
+    
+    <parent>
+	  <groupId>org.jboss.savara.tools</groupId>
+	  <artifactId>eclipse</artifactId>
+      <version>1.0-SNAPSHOT</version>
+	</parent>
+  
+
+	<modules>
+		<module>eclipse-build</module>
+	</modules>
+
+</project>
+

Modified: tools/eclipse/trunk/pom.xml
===================================================================
--- tools/eclipse/trunk/pom.xml	2010-02-16 21:31:20 UTC (rev 167)
+++ tools/eclipse/trunk/pom.xml	2010-03-06 20:53:29 UTC (rev 168)
@@ -4,7 +4,7 @@
 	<modelVersion>4.0.0</modelVersion>
 	<groupId>org.jboss.savara.tools</groupId>
 	<artifactId>eclipse</artifactId>
-	<version>1.0-M1</version>
+	<version>1.0-SNAPSHOT</version>
 	<packaging>pom</packaging>
     <name>Savara::Tools::Eclipse</name>
 	<url>http://www.jboss.org/savara</url>
@@ -37,6 +37,7 @@
 		</developer>
 	</developers>
 	<modules>
+		<module>plugins</module>
 		<module>docs</module>
 		<module>distribution</module>
 	</modules>
@@ -101,7 +102,7 @@
 	</build>
 
 	<properties>
-		<savara-version>1.0-M1</savara-version>
+		<savara-version>1.0-SNAPSHOT</savara-version>
 		<junit.version>4.4</junit.version>
 		<rosetta.version>4.5</rosetta.version>
 		<log4j.version>1.2.14</log4j.version>



More information about the savara-commits mailing list