pp instanceof java.util.List
bundles/org.scribble.protocol.projection/src/main/java/org/scribble/protocol/projection/impl/ProtocolProjectorRule.java
for (Object obj : (java.util.List<?>)pp) {
                    if (obj instanceof Protocol) {
                        projected.getNestedProtocols().add((Protocol)obj);
else if (pp instanceof java.util.List)
Choice choice  Journal l
bundles/org.scribble.protocol/src/main/java/org/scribble/protocol/validation/rules/ChoiceValidatorRule.java
// Confirm each path has distinct initial interactions
        java.util.List<ModelObject> interactions=new java.util.Vector<ModelObject>();
        
        for (Block path : choice.getPaths()) {
            java.util.List<ModelObject> initial=InteractionUtil.getInitialInteractions(path);
        
            if (!Collections.disjoint(interactions, initial)) {
                l.error(MessageFormat.format(
                        java.util.PropertyResourceBundle.getBundle("org.scribble.protocol.Messages").
                                getString("_AMBIGUOUS_CHOICE"), (Object[])null), null);
void checkForAmbiguity(Choice choice, Journal l)
String baseDir
qa/org.scribble.protocol.ctk/src/test/java/org/scribble/protocol/ctk/CTKUtil.java
public ProtocolModel parse(ProtocolTools context, Content content, Journal journal)
        DefaultResourceLocator locator=null;
        if (baseDir != null) {
            java.net.URL url=ClassLoader.getSystemResource(baseDir);
            
            if (url == null) {
                fail("Failed to find base directory '"+baseDir+"'");
ProtocolTools getProtocolTools(String baseDir)
String globalModelFile  String expectedLocalModelFile  ProtocolTools context
qa/org.scribble.protocol.ctk/src/test/java/org/scribble/protocol/ctk/ProtocolProjectorTest.java
{"InlineProtocol.spr", "InlineProtocol@Buyer.spr", CTKUtil.getProtocolTools("tests/protocol/global")
public ProtocolProjectorTest(String globalModelFile, String expectedLocalModelFile, ProtocolTools context)
ProjectorContext context  Choice projected 
                            Role role  Journal l
bundles/org.scribble.protocol.projection/src/main/java/org/scribble/protocol/projection/impl/ChoiceProjectorRule.java
// Confirm each path has distinct initial interactions
        java.util.List<ModelObject> interactions=new java.util.Vector<ModelObject>();
        
        for (Block path : projected.getPaths()) {
            java.util.List<ModelObject> initial=InteractionUtil.getInitialInteractions(path);
            
            if (!Collections.disjoint(interactions, initial)) {
                l.error(MessageFormat.format(
                        java.util.PropertyResourceBundle.getBundle("org.scribble.protocol.projection.Messages").
                            getString("_AMBIGUOUS_CHOICE"),
                            role.getName()), null);
void checkForAmbiguity(ProjectorContext context, Choice projected,
                            Role role, Journal l)
pp instanceof java.util.List
bundles/org.scribble.protocol.projection/src/main/java/org/scribble/protocol/projection/impl/ProtocolProjectorRule.java
for (Object obj : (java.util.List<?>)pp) {
                            if (obj instanceof Protocol) {
                                prot.getNestedProtocols().add((Protocol)obj);
else if (pp instanceof java.util.List)
String globalModelFile  String expectedLocalModelFile  ProtocolContext context
qa/org.scribble.protocol.ctk/src/test/java/org/scribble/protocol/ctk/ProtocolProjectorTest.java
{"InlineProtocol.spr", "InlineProtocol@Buyer.spr", CTKUtil.getProtocolContext("tests/protocol/global")
public ProtocolProjectorTest(String globalModelFile, String expectedLocalModelFile, ProtocolContext context)