Changeset 601


Ignore:
Timestamp:
07/12/11 08:17:14 (14 years ago)
Author:
lgiessmann
Message:

gdl-frontend: Widgets: started to implement the entry point

Location:
branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/base/GdlPanel.java

    r600 r601  
    282282                try{
    283283                        // TODO: Implement
     284                        // search for an instance of default-[editor|creator]-topic-view (only one of those must be existent)
     285                        // use gdl instaiator
     286                       
    284287                       
    285288                        for (Pair<ClickHandler, String> item : this.buttonCallbacks) {
  • TabularUnified branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/environment/GdlInstantiator.java

    r600 r601  
    3232import us.isidor.gdl.anaToMia.Widgets.view.GdlDefaultCreatorTopicView;
    3333import us.isidor.gdl.anaToMia.Widgets.view.GdlDefaultEditorTopicView;
     34import us.isidor.gdl.anaToMia.Widgets.view.GdlDefaultTopicView;
    3435import us.isidor.gdl.anaToMia.Widgets.view.GdlEditorAssociationView;
    3536import us.isidor.gdl.anaToMia.Widgets.view.GdlSpecialCreatorTopicView;
     
    132133                }
    133134        }
     135
     136
     137        public static GdlDefaultTopicView instantiateDefaultEditorOrCreatorView(TopicMap tm) throws InvalidGdlSchemaException, ExecutionException{
     138                if(tm == null) return null;
     139               
     140                Topic defaultCreatorTopicView = getTopicByPsi(GdlPsis.TopicType.gdlDefaultCreatorTopicView, tm);
     141                Topic defaultEditorTopicView = getTopicByPsi(GdlPsis.TopicType.gdlDefaultEditorTopicView, tm);
     142                if(defaultCreatorTopicView == null && defaultEditorTopicView == null){
     143                        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");
     144                }else {
     145                        // search for an instance of either dctv or detv
     146                }
     147                return null; // TODO: remove
     148               
     149                // 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");
     150                // 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");
     151        }
    134152}
Note: See TracChangeset for help on using the changeset viewer.