Author: lgiessmann Date: Wed Sep 7 07:01:38 2011 New Revision: 852
Log:
Modified: branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/environment/GdlInstantiator.java
Modified: branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/environment/GdlInstantiator.java ============================================================================== --- branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/environment/GdlInstantiator.java Wed Sep 7 06:12:51 2011 (r851) +++ branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/environment/GdlInstantiator.java Wed Sep 7 07:01:38 2011 (r852) @@ -128,9 +128,7 @@ for (Pair<String, TopicIdentifierTypes> pair : panel.getReqeustedTopicsToCreate()) values += ", " + pair.getFirst(); if(values.length() >= 2 )values = values.substring(2); - String bindings = ""; - for (Topic top : views) - bindings += ", " + TmHelper.getAnyIdOfTopic(top); + String bindings = Utils.topicArrayToString(views); if(bindings.length() >= 2)bindings = bindings.substring(2); else bindings = "[]"; throw new InvalidGdlSchemaException("the combination of topics requested (" + values + ") must be bound exactly once to a " + PSIs.GDL.TopicType.gdlDefaultCreatorTopicView + " but is bound to " + bindings); @@ -217,9 +215,7 @@ if(views.size() == 1){ return new GdlDefaultEditorTopicView(views.get(0), requestedTop, null, panel); }else if(views.size() > 1){ - String bindings = ""; - for (Topic top : views) - bindings += ", " + TmHelper.getAnyIdOfTopic(top); + String bindings = Utils.topicArrayToString(views); if(bindings.length() >= 2)bindings = bindings.substring(2); throw new InvalidGdlSchemaException("the topic " + panel.getRequestedTopicToEdit().getFirst() + " requested for editing must be bound to exaclty one " + PSIs.GDL.TopicType.gdlDefaultEditorTopicView + ", but is bound to " + bindings); }else { @@ -234,9 +230,7 @@ for (Pair<String, TopicIdentifierTypes> pair : typesOfRequestedTopic) values += ", " + pair.getFirst(); if(values.length() >= 2)values = values.substring(2); - String bindings = "["; - for (Topic top : views) - bindings += ", " + TmHelper.getAnyIdOfTopic(top); + String bindings = Utils.topicArrayToString(views); if(bindings.length() >= 2)bindings = bindings.substring(2) + "]"; else bindings = "[ ]"; throw new InvalidGdlSchemaException("the combination of topic types (" + values + ") for the requested topic " + panel.getRequestedTopicToEdit().getFirst() + " must be bound exactly once to a " + PSIs.GDL.TopicType.gdlDefaultEditorTopicView + " but is bound to " + bindings);