[isidorus-cvs] r601 - in branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets: base environment
lgiessmann at common-lisp.net
lgiessmann at common-lisp.net
Tue Jul 12 08:17:15 UTC 2011
Author: lgiessmann
Date: Tue Jul 12 01:17:14 2011
New Revision: 601
Log:
gdl-frontend: Widgets: started to implement the entry point
Modified:
branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/base/GdlPanel.java
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/base/GdlPanel.java
==============================================================================
--- branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/base/GdlPanel.java Mon Jul 11 23:53:15 2011 (r600)
+++ branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/base/GdlPanel.java Tue Jul 12 01:17:14 2011 (r601)
@@ -281,6 +281,9 @@
public void createView(){
try{
// TODO: Implement
+ // search for an instance of default-[editor|creator]-topic-view (only one of those must be existent)
+ // use gdl instaiator
+
for (Pair<ClickHandler, String> item : this.buttonCallbacks) {
view.registerButtonCallback(item.getFirst(), item.getSecond());
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 Mon Jul 11 23:53:15 2011 (r600)
+++ branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/environment/GdlInstantiator.java Tue Jul 12 01:17:14 2011 (r601)
@@ -31,6 +31,7 @@
import us.isidor.gdl.anaToMia.Widgets.view.GdlCreatorAssociationView;
import us.isidor.gdl.anaToMia.Widgets.view.GdlDefaultCreatorTopicView;
import us.isidor.gdl.anaToMia.Widgets.view.GdlDefaultEditorTopicView;
+import us.isidor.gdl.anaToMia.Widgets.view.GdlDefaultTopicView;
import us.isidor.gdl.anaToMia.Widgets.view.GdlEditorAssociationView;
import us.isidor.gdl.anaToMia.Widgets.view.GdlSpecialCreatorTopicView;
import us.isidor.gdl.anaToMia.Widgets.view.GdlSpecialEditorTopicView;
@@ -131,4 +132,21 @@
throw new InvalidGdlSchemaException("the topic " + GdlPsis.getAnyIdOfTopic(tmRepresentative) + " is an instance of an unsupported visible topic type or an abstract topic type: " + values);
}
}
+
+
+ public static GdlDefaultTopicView instantiateDefaultEditorOrCreatorView(TopicMap tm) throws InvalidGdlSchemaException, ExecutionException{
+ if(tm == null) return null;
+
+ Topic defaultCreatorTopicView = getTopicByPsi(GdlPsis.TopicType.gdlDefaultCreatorTopicView, tm);
+ Topic defaultEditorTopicView = getTopicByPsi(GdlPsis.TopicType.gdlDefaultEditorTopicView, tm);
+ if(defaultCreatorTopicView == null && defaultEditorTopicView == null){
+ throw new InvalidGdlSchemaException("the requested GDL schema does not have an entry point defined, either an instance of " + GdlPsis.TopicType.gdlDefaultCreatorTopicView + " or " + GdlPsis.TopicType.gdlDefaultEditorTopicView + " is necessary");
+ }else {
+ // search for an instance of either dctv or detv
+ }
+ return null; // TODO: remove
+
+ // throw new InvalidGdlSchemaException("the requested GDL schema does not have an entry point defined, either an instance of " + GdlPsis.TopicType.gdlDefaultCreatorTopicView + " or " + GdlPsis.TopicType.gdlDefaultEditorTopicView + " is necessary");
+ // throw new InvalidGdlSchemaException("the requested GDL schema does have multiple entry points defined, only an instance of " + GdlPsis.TopicType.gdlDefaultCreatorTopicView + " or " + GdlPsis.TopicType.gdlDefaultEditorTopicView + " is permitted");
+ }
}
More information about the Isidorus-cvs
mailing list