[savara-commits] savara SVN: r196 - in tools/eclipse/trunk/plugins: org.scribble.conversation.comparator/src/java/org/scribble/conversation/comparator and 4 other directories.

do-not-reply at jboss.org do-not-reply at jboss.org
Mon Mar 15 14:06:06 EDT 2010


Author: objectiser
Date: 2010-03-15 14:06:05 -0400 (Mon, 15 Mar 2010)
New Revision: 196

Removed:
   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/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/InterruptBlockProtocolComparatorRule.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/RaiseProtocolComparatorRule.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/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/test/org/scribble/conversation/comparator/CatchBlockProtocolComparatorRuleTest.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/InterruptBlockProtocolComparatorRuleTest.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/RaiseProtocolComparatorRuleTest.java
   tools/eclipse/trunk/plugins/org.scribble.conversation.parser/src/java/org/scribble/conversation/parser/ProtocolImplementsReferenceParserRule.java
Modified:
   tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/META-INF/MANIFEST.MF
   tools/eclipse/trunk/plugins/org.scribble.conversation.model/META-INF/MANIFEST.MF
   tools/eclipse/trunk/plugins/org.scribble.conversation.parser/META-INF/MANIFEST.MF
Log:
Remove unnecessary plugins.

Modified: tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/META-INF/MANIFEST.MF
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/META-INF/MANIFEST.MF	2010-03-13 19:12:26 UTC (rev 195)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/META-INF/MANIFEST.MF	2010-03-15 18:06:05 UTC (rev 196)
@@ -9,7 +9,6 @@
 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

Deleted: 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	2010-03-13 19:12:26 UTC (rev 195)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/java/org/scribble/conversation/comparator/CatchBlockProtocolComparatorRule.java	2010-03-15 18:06:05 UTC (rev 196)
@@ -1,109 +0,0 @@
-/*
- * 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);
-	}
-	
-}

Deleted: 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	2010-03-13 19:12:26 UTC (rev 195)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/java/org/scribble/conversation/comparator/ConversationModelProtocolModelComparatorRule.java	2010-03-15 18:06:05 UTC (rev 196)
@@ -1,116 +0,0 @@
-/*
- * 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);
-	}	
-}

Deleted: 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	2010-03-13 19:12:26 UTC (rev 195)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/java/org/scribble/conversation/comparator/IfChoiceComparatorRule.java	2010-03-15 18:06:05 UTC (rev 196)
@@ -1,108 +0,0 @@
-/*
- * 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);
-	}	
-}

Deleted: 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	2010-03-13 19:12:26 UTC (rev 195)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/java/org/scribble/conversation/comparator/InterruptBlockProtocolComparatorRule.java	2010-03-15 18:06:05 UTC (rev 196)
@@ -1,98 +0,0 @@
-/*
- * 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);
-	}
-	
-}

Deleted: 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	2010-03-13 19:12:26 UTC (rev 195)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/java/org/scribble/conversation/comparator/ParallelProtocolParallelComparatorRule.java	2010-03-15 18:06:05 UTC (rev 196)
@@ -1,107 +0,0 @@
-/*
- * 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);
-	}	
-}

Deleted: 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	2010-03-13 19:12:26 UTC (rev 195)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/java/org/scribble/conversation/comparator/RaiseProtocolComparatorRule.java	2010-03-15 18:06:05 UTC (rev 196)
@@ -1,115 +0,0 @@
-/*
- * 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);
-	}	
-}

Deleted: 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	2010-03-13 19:12:26 UTC (rev 195)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/java/org/scribble/conversation/comparator/SpawnProtocolSpawnComparatorRule.java	2010-03-15 18:06:05 UTC (rev 196)
@@ -1,96 +0,0 @@
-/*
- * 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);
-	}	
-}

Deleted: 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	2010-03-13 19:12:26 UTC (rev 195)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/java/org/scribble/conversation/comparator/TryEscapeProtocolComparatorRule.java	2010-03-15 18:06:05 UTC (rev 196)
@@ -1,106 +0,0 @@
-/*
- * 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);
-	}	
-}

Deleted: 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	2010-03-13 19:12:26 UTC (rev 195)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/java/org/scribble/conversation/comparator/WhenChoiceComparatorRule.java	2010-03-15 18:06:05 UTC (rev 196)
@@ -1,106 +0,0 @@
-/*
- * 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);
-	}	
-}

Deleted: 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	2010-03-13 19:12:26 UTC (rev 195)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/test/org/scribble/conversation/comparator/CatchBlockProtocolComparatorRuleTest.java	2010-03-15 18:06:05 UTC (rev 196)
@@ -1,213 +0,0 @@
-/*
- * 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");
-		}
-	}
-}

Deleted: 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	2010-03-13 19:12:26 UTC (rev 195)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/test/org/scribble/conversation/comparator/ConversationModelProtocolModelComparatorRuleTest.java	2010-03-15 18:06:05 UTC (rev 196)
@@ -1,86 +0,0 @@
-/*
- * 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");
-		}
-	}
-}

Deleted: 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	2010-03-13 19:12:26 UTC (rev 195)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/test/org/scribble/conversation/comparator/IfChoiceComparatorRuleTest.java	2010-03-15 18:06:05 UTC (rev 196)
@@ -1,64 +0,0 @@
-/*
- * 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");
-		}
-	}
-}

Deleted: 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	2010-03-13 19:12:26 UTC (rev 195)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/test/org/scribble/conversation/comparator/InterruptBlockProtocolComparatorRuleTest.java	2010-03-15 18:06:05 UTC (rev 196)
@@ -1,67 +0,0 @@
-/*
- * 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
-}

Deleted: 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	2010-03-13 19:12:26 UTC (rev 195)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/test/org/scribble/conversation/comparator/ParallelProtocolParallelComparatorRuleTest.java	2010-03-15 18:06:05 UTC (rev 196)
@@ -1,64 +0,0 @@
-/*
- * 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");
-		}
-	}
-}

Deleted: 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	2010-03-13 19:12:26 UTC (rev 195)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.comparator/src/test/org/scribble/conversation/comparator/RaiseProtocolComparatorRuleTest.java	2010-03-15 18:06:05 UTC (rev 196)
@@ -1,212 +0,0 @@
-/*
- * 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");
-		}
-	}
-}

Modified: tools/eclipse/trunk/plugins/org.scribble.conversation.model/META-INF/MANIFEST.MF
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.model/META-INF/MANIFEST.MF	2010-03-13 19:12:26 UTC (rev 195)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.model/META-INF/MANIFEST.MF	2010-03-15 18:06:05 UTC (rev 196)
@@ -6,8 +6,7 @@
 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
+Require-Bundle: org.scribble.core
 Eclipse-LazyStart: true
 Export-Package: org.scribble.conversation.model
 Scribble-Extensions: org.scribble.conversation.model.ConversationNotation

Modified: tools/eclipse/trunk/plugins/org.scribble.conversation.parser/META-INF/MANIFEST.MF
===================================================================
--- tools/eclipse/trunk/plugins/org.scribble.conversation.parser/META-INF/MANIFEST.MF	2010-03-13 19:12:26 UTC (rev 195)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.parser/META-INF/MANIFEST.MF	2010-03-15 18:06:05 UTC (rev 196)
@@ -7,8 +7,7 @@
 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
+ org.scribble.conversation.model
 Bundle-ActivationPolicy: lazy
 Scribble-Extensions: org.scribble.conversation.parser.ConversationKeyWordProvider,
    org.scribble.conversation.parser.ConversationParserRule,

Deleted: 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	2010-03-13 19:12:26 UTC (rev 195)
+++ tools/eclipse/trunk/plugins/org.scribble.conversation.parser/src/java/org/scribble/conversation/parser/ProtocolImplementsReferenceParserRule.java	2010-03-15 18:06:05 UTC (rev 196)
@@ -1,54 +0,0 @@
-/*
- * 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);
-	}
-}



More information about the savara-commits mailing list