cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r905616 [1/6] - in /cayenne/main/trunk/framework: cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/map/event/ cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/project/ cayenne-jdk1.5-unpublished/src/main/java/org/apach...
Date Tue, 02 Feb 2010 13:08:18 GMT
Author: oltka
Date: Tue Feb  2 13:06:56 2010
New Revision: 905616

URL: http://svn.apache.org/viewvc?rev=905616&view=rev
Log:
CAY-1339 Remove org.apache.cayenne.project package from runtime

* remove all org.apache.cayenne.project.Project in modeller
* change method find
* change file filter for dialog "Open project"
* add ValidationVisitor

Added:
    cayenne/main/trunk/framework/cayenne-project-unpublished/src/main/java/org/apache/cayenne/project2/validate/
    cayenne/main/trunk/framework/cayenne-project-unpublished/src/main/java/org/apache/cayenne/project2/validate/ConfigurationValidationVisitor.java
    cayenne/main/trunk/framework/cayenne-project-unpublished/src/main/java/org/apache/cayenne/project2/validate/DataChannelValidator.java
      - copied, changed from r905298, cayenne/main/trunk/framework/cayenne-modeler/src/test/java/org/apache/cayenne/modeler/action/ModelerProjectLoaderDelegateTest.java
    cayenne/main/trunk/framework/cayenne-project-unpublished/src/main/java/org/apache/cayenne/project2/validate/DataMapValidator.java
      - copied, changed from r905298, cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/project/validator/DataMapValidator.java
    cayenne/main/trunk/framework/cayenne-project-unpublished/src/main/java/org/apache/cayenne/project2/validate/DataNodeValidator.java
      - copied, changed from r905298, cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/project/validator/DataNodeValidator.java
    cayenne/main/trunk/framework/cayenne-project-unpublished/src/main/java/org/apache/cayenne/project2/validate/DbAttributeValidator.java
    cayenne/main/trunk/framework/cayenne-project-unpublished/src/main/java/org/apache/cayenne/project2/validate/DbEntityValidator.java
    cayenne/main/trunk/framework/cayenne-project-unpublished/src/main/java/org/apache/cayenne/project2/validate/DbRelationshipValidator.java
    cayenne/main/trunk/framework/cayenne-project-unpublished/src/main/java/org/apache/cayenne/project2/validate/EJBQLQueryValidator.java
      - copied, changed from r905298, cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/project/validator/EJBQLQueryValidator.java
    cayenne/main/trunk/framework/cayenne-project-unpublished/src/main/java/org/apache/cayenne/project2/validate/EmbeddableAttributeValidator.java
    cayenne/main/trunk/framework/cayenne-project-unpublished/src/main/java/org/apache/cayenne/project2/validate/EmbeddableValidator.java
    cayenne/main/trunk/framework/cayenne-project-unpublished/src/main/java/org/apache/cayenne/project2/validate/ObjAttributeValidator.java
    cayenne/main/trunk/framework/cayenne-project-unpublished/src/main/java/org/apache/cayenne/project2/validate/ObjEntityValidator.java
    cayenne/main/trunk/framework/cayenne-project-unpublished/src/main/java/org/apache/cayenne/project2/validate/ObjRelationshipValidator.java
    cayenne/main/trunk/framework/cayenne-project-unpublished/src/main/java/org/apache/cayenne/project2/validate/ProcedureParameterValidator.java
    cayenne/main/trunk/framework/cayenne-project-unpublished/src/main/java/org/apache/cayenne/project2/validate/ProcedureQueryValidator.java
      - copied, changed from r905298, cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/project/validator/ProcedureQueryValidator.java
    cayenne/main/trunk/framework/cayenne-project-unpublished/src/main/java/org/apache/cayenne/project2/validate/ProcedureValidator.java
    cayenne/main/trunk/framework/cayenne-project-unpublished/src/main/java/org/apache/cayenne/project2/validate/SQLTemplateValidator.java
      - copied, changed from r905298, cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/project/validator/SQLTemplateValidator.java
    cayenne/main/trunk/framework/cayenne-project-unpublished/src/main/java/org/apache/cayenne/project2/validate/SelectQueryValidator.java
      - copied, changed from r905298, cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/project/validator/SelectQueryValidator.java
    cayenne/main/trunk/framework/cayenne-project-unpublished/src/main/java/org/apache/cayenne/project2/validate/Validator.java
      - copied, changed from r905298, cayenne/main/trunk/framework/cayenne-modeler/src/test/java/org/apache/cayenne/modeler/event/DomainDisplayEventTest.java
Removed:
    cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/ModelerProject.java
    cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/CreateDomainAction.java
    cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/ModelerProjectLoadDelegate.java
    cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/ModelerProjectSaveDelegate.java
    cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/undo/CreateDomainUndoableEdit.java
    cayenne/main/trunk/framework/cayenne-modeler/src/test/java/org/apache/cayenne/modeler/action/ModelerProjectLoaderDelegateTest.java
    cayenne/main/trunk/framework/cayenne-modeler/src/test/java/org/apache/cayenne/modeler/dialog/validator/ValidationDisplayHandlerTest.java
Modified:
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/map/event/MapEvent.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/project/NamedObjectFactory.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/project/validator/DataMapValidator.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/project/validator/DataNodeValidator.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/project/validator/EJBQLQueryValidator.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/project/validator/MappingNamesHelper.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/project/validator/ProcedureQueryValidator.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/project/validator/SQLTemplateValidator.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/project/validator/SelectQueryValidator.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/validation/EJBQlQueryValidatorTest.java
    cayenne/main/trunk/framework/cayenne-modeler/pom.xml
    cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/configuration/event/DataNodeEvent.java
    cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/configuration/event/DomainEvent.java
    cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/configuration/event/DomainListener.java
    cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/ActionManager.java
    cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/Application.java
    cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/CayenneModelerController.java
    cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/CayenneModelerFrame.java
    cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/FileClassLoadingService.java
    cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/ProjectController.java
    cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/ProjectTreeModel.java
    cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/ProjectTreeView.java
    cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/ProjectWatchdog.java
    cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/CreateAttributeAction.java
    cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/CreateDataMapAction.java
    cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/CreateDbEntityAction.java
    cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/CreateEmbeddableAction.java
    cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/CreateNodeAction.java
    cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/CreateObjEntityAction.java
    cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/CreateProcedureAction.java
    cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/CreateProcedureParameterAction.java
    cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/CreateQueryAction.java
    cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/CreateRelationshipAction.java
    cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/DBWizardAction.java
    cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/DbEntitySyncAction.java
    cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/FindAction.java
    cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/ImportDBAction.java
    cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/ImportDataMapAction.java
    cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/ImportEOModelAction.java
    cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/NewProjectAction.java
    cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/ObjEntitySyncAction.java
    cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/OpenProjectAction.java
    cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/PasteAction.java
    cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/ProjectAction.java
    cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/ProjectOpener.java
    cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/RemoveAction.java
    cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/RemoveAttributeAction.java
    cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/RevertAction.java
    cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/SaveAction.java
    cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/SaveAsAction.java
    cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/ValidateAction.java
    cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/dialog/FindDialog.java
    cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/dialog/datadomain/CacheSyncConfigController.java
    cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/dialog/db/DBGeneratorOptions.java
    cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/dialog/db/DbLoaderHelper.java
    cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/dialog/db/MergerOptions.java
    cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/dialog/db/TableSelectorController.java
    cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/dialog/objentity/ObjAttributeInfoDialog.java
    cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/dialog/query/QueryTypeController.java
    cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/dialog/validator/AttributeErrorMsg.java
    cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/dialog/validator/DataMapErrorMsg.java
    cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/dialog/validator/DataNodeErrorMsg.java
    cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/dialog/validator/DomainErrorMsg.java
    cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/dialog/validator/EmbeddableAttributeErrorMsg.java
    cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/dialog/validator/EmbeddableErrorMsg.java
    cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/dialog/validator/EntityErrorMsg.java
    cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/dialog/validator/ProcedureErrorMsg.java
    cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/dialog/validator/ProcedureParameterErrorMsg.java
    cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/dialog/validator/QueryErrorMsg.java
    cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/dialog/validator/RelationshipErrorMsg.java
    cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/dialog/validator/ValidationDisplayHandler.java
    cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/dialog/validator/ValidatorDialog.java
    cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/editor/DataDomainView.java
    cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/editor/DataMapView.java
    cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/editor/EjbqlQueryScriptsTab.java
    cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/editor/EmbeddableAttributeTab.java
    cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/editor/EmbeddableTab.java
    cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/editor/ObjAttributeTableModel.java
    cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/editor/ObjEntityAttributeTab.java
    cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/editor/ObjEntityRelationshipTab.java
    cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/editor/ObjEntityTab.java
    cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/editor/ProcedureParameterTab.java
    cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/editor/ProcedureTab.java
    cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/editor/RawQueryPropertiesPanel.java
    cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/editor/datanode/AdapterEditor.java
    cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/editor/datanode/CustomDataSourceEditor.java
    cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/editor/datanode/DBCPDataSourceEditor.java
    cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/editor/datanode/DataSourceEditor.java
    cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/editor/datanode/JDBCDataSourceEditor.java
    cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/editor/datanode/JNDIDataSourceEditor.java
    cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/editor/datanode/MainDataNodeEditor.java
    cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/editor/datanode/PasswordEncoderEditor.java
    cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/editor/dbentity/DbEntityAttributeTab.java
    cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/editor/dbentity/DbEntityRelationshipTab.java
    cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/editor/dbentity/DbEntityTab.java
    cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/editor/dbentity/DbRelationshipTableModel.java
    cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/event/AttributeDisplayEvent.java
    cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/event/DataMapDisplayEvent.java
    cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/event/DataNodeDisplayEvent.java
    cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/event/DomainDisplayEvent.java
    cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/event/EmbeddableAttributeDisplayEvent.java
    cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/event/EmbeddableDisplayEvent.java
    cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/event/EntityDisplayEvent.java
    cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/event/ProcedureDisplayEvent.java
    cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/event/ProcedureParameterDisplayEvent.java
    cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/event/QueryDisplayEvent.java
    cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/event/RelationshipDisplayEvent.java
    cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/graph/BaseGraphBuilder.java
    cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/graph/DataDomainGraphTab.java
    cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/graph/DbEntityCellMetadata.java
    cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/graph/DbGraphBuilder.java
    cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/graph/GraphBuilder.java
    cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/graph/GraphFile.java
    cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/graph/GraphMap.java
    cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/graph/GraphRegistry.java
    cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/graph/ObjEntityCellMetadata.java
    cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/graph/ObjGraphBuilder.java
    cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/graph/action/EntityDisplayAction.java
    cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/graph/action/ShowGraphEntityAction.java
    cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/pref/DataNodeDefaults.java
    cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/undo/CreateAttributeUndoableEdit.java
    cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/undo/CreateDataMapUndoableEdit.java
    cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/undo/CreateNodeUndoableEdit.java
    cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/undo/CreateQueryUndoableEdit.java
    cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/undo/CreateRelationshipUndoableEdit.java
    cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/undo/DbEntitySyncUndoableEdit.java
    cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/undo/PasteUndoableEdit.java
    cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/undo/RemoveAttributeUndoableEdit.java
    cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/undo/RemoveUndoableEdit.java
    cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/undo/TextCompoundEdit.java
    cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/util/CayenneAction.java
    cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/util/CayenneController.java
    cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/util/CellRenderers.java
    cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/util/Comparators.java
    cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/util/FileFilters.java
    cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/util/ModelerUtil.java
    cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/util/ProjectUtil.java
    cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/pref/CayennePreferenceService.java
    cayenne/main/trunk/framework/cayenne-modeler/src/test/java/org/apache/cayenne/configuration/event/DataNodeEventTest.java
    cayenne/main/trunk/framework/cayenne-modeler/src/test/java/org/apache/cayenne/modeler/action/CreateNodeActionTest.java
    cayenne/main/trunk/framework/cayenne-modeler/src/test/java/org/apache/cayenne/modeler/event/DomainDisplayEventTest.java
    cayenne/main/trunk/framework/cayenne-modeler/src/test/java/org/apache/cayenne/modeler/event/DomainEventTest.java

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/map/event/MapEvent.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/map/event/MapEvent.java?rev=905616&r1=905615&r2=905616&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/map/event/MapEvent.java (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/map/event/MapEvent.java Tue Feb  2 13:06:56 2010
@@ -19,7 +19,7 @@
 
 package org.apache.cayenne.map.event;
 
-import org.apache.cayenne.access.DataDomain;
+import org.apache.cayenne.configuration.DataChannelDescriptor;
 import org.apache.cayenne.event.CayenneEvent;
 import org.apache.cayenne.util.Util;
 
@@ -52,7 +52,7 @@
     /**
      * Domain of event object. Might be null
      */
-    protected DataDomain domain;
+    protected DataChannelDescriptor domain;
 
     /**
      * Constructor for MapEvent.
@@ -116,14 +116,14 @@
     /**
      * Sets domain of event object.
      */
-    public void setDomain(DataDomain domain) {
+    public void setDomain(DataChannelDescriptor domain) {
         this.domain = domain;
     }
     
     /**
      * @return Domain of event object. Might be null
      */
-    public DataDomain getDomain() {
+    public DataChannelDescriptor getDomain() {
         return domain;
     }
 }

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/project/NamedObjectFactory.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/project/NamedObjectFactory.java?rev=905616&r1=905615&r2=905616&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/project/NamedObjectFactory.java (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/project/NamedObjectFactory.java Tue Feb  2 13:06:56 2010
@@ -20,11 +20,14 @@
 package org.apache.cayenne.project;
 
 import java.util.HashMap;
+import java.util.Iterator;
 import java.util.Map;
 
 import org.apache.cayenne.access.DataDomain;
 import org.apache.cayenne.access.DataNode;
 import org.apache.cayenne.conf.Configuration;
+import org.apache.cayenne.configuration.DataChannelDescriptor;
+import org.apache.cayenne.configuration.DataNodeDescriptor;
 import org.apache.cayenne.dba.TypesMapping;
 import org.apache.cayenne.map.DataMap;
 import org.apache.cayenne.map.DbAttribute;
@@ -42,33 +45,30 @@
 import org.apache.cayenne.query.Query;
 import org.apache.cayenne.query.SelectQuery;
 
-/** 
- * Factory class that generates various Cayenne objects with 
- * default names that are unique in their corresponding context. 
- * Supports creation of the following
- * objects:
+/**
+ * Factory class that generates various Cayenne objects with default names that are unique
+ * in their corresponding context. Supports creation of the following objects:
  * <ul>
- *    <li>DataMap</li>
- *    <li>ObjEntity</li>
- *    <li>ObjAttribute</li>
- *    <li>ObjRelationship</li>
- *    <li>DbEntity</li>
- *    <li>DerivedDbEntity</li>
- *    <li>DbAttribute</li>
- *    <li>DerivedDbAttribute</li>
- *    <li>DbRelationship</li>
- *    <li>DataNode</li>
- *    <li>DataDomain</li>
- *    <li>Query</li>
- * 	  <li>Procedure</li>
- *    <li>ProcedureParameter</li>
+ * <li>DataMap</li>
+ * <li>ObjEntity</li>
+ * <li>ObjAttribute</li>
+ * <li>ObjRelationship</li>
+ * <li>DbEntity</li>
+ * <li>DerivedDbEntity</li>
+ * <li>DbAttribute</li>
+ * <li>DerivedDbAttribute</li>
+ * <li>DbRelationship</li>
+ * <li>DataNode</li>
+ * <li>DataNodeDescriptor</li>
+ * <li>DataDomain</li>
+ * <li>Query</li>
+ * <li>Procedure</li>
+ * <li>ProcedureParameter</li>
  * </ul>
- * 
- * This is a helper class used mostly by GUI and database 
- * reengineering classes.
- * 
+ * This is a helper class used mostly by GUI and database reengineering classes.
  */
 public abstract class NamedObjectFactory {
+
     private static final Map<Class, NamedObjectFactory> factories = new HashMap<Class, NamedObjectFactory>();
 
     static {
@@ -78,6 +78,8 @@
         factories.put(ObjAttribute.class, new ObjAttributeFactory());
         factories.put(DbAttribute.class, new DbAttributeFactory());
         factories.put(DataNode.class, new DataNodeFactory());
+        factories.put(DataNodeDescriptor.class, new DataNodeDescriptorFactory());
+        factories.put(DataChannelDescriptor.class, new DataChannelDescriptorFactory());
         factories.put(DbRelationship.class, new DbRelationshipFactory(null, false));
         factories.put(ObjRelationship.class, new ObjRelationshipFactory(null, false));
         factories.put(DataDomain.class, new DataDomainFactory());
@@ -91,66 +93,64 @@
     public static String createName(Class objectClass, Object namingContext) {
         return (factories.get(objectClass)).makeName(namingContext);
     }
-    
+
     /**
      * @since 1.0.5
      */
-    public static String createName(Class objectClass, Object namingContext, String nameBase) {
+    public static String createName(
+            Class objectClass,
+            Object namingContext,
+            String nameBase) {
         return (factories.get(objectClass)).makeName(namingContext, nameBase);
     }
 
     /**
-     * Creates an object using an appropriate factory class.
-     * If no factory is found for the object, NullPointerException is 
-     * thrown. 
-     * 
-     * <p><i>Note that newly created object is not added to the parent.
-     * This behavior can be changed later.</i></p>
+     * Creates an object using an appropriate factory class. If no factory is found for
+     * the object, NullPointerException is thrown.
+     * <p>
+     * <i>Note that newly created object is not added to the parent. This behavior can be
+     * changed later.</i>
+     * </p>
      */
     public static Object createObject(Class objectClass, Object namingContext) {
-        return (factories.get(objectClass)).makeObject(
-            namingContext);
+        return (factories.get(objectClass)).makeObject(namingContext);
     }
 
     /**
      * @since 1.0.5
      */
     public static Object createObject(
-        Class<? extends DataMap> objectClass,
-        Object namingContext,
-        String nameBase) {
-        return (factories.get(objectClass)).makeObject(
-            namingContext,
-            nameBase);
+            Class<? extends DataMap> objectClass,
+            Object namingContext,
+            String nameBase) {
+        return (factories.get(objectClass)).makeObject(namingContext, nameBase);
     }
 
     /**
-     * Creates a relationship using an appropriate factory class.
-     * If no factory is found for the object, NullPointerException is 
-     * thrown. 
-     * 
-     * <p><i>Note that newly created object is not added to the parent.
-     * This behavior can be changed later.</i></p>
+     * Creates a relationship using an appropriate factory class. If no factory is found
+     * for the object, NullPointerException is thrown.
+     * <p>
+     * <i>Note that newly created object is not added to the parent. This behavior can be
+     * changed later.</i>
+     * </p>
      */
     public static Relationship createRelationship(
-        Entity srcEnt,
-        Entity targetEnt,
-        boolean toMany) {
-        NamedObjectFactory factory =
-            (srcEnt instanceof ObjEntity)
+            Entity srcEnt,
+            Entity targetEnt,
+            boolean toMany) {
+        NamedObjectFactory factory = (srcEnt instanceof ObjEntity)
                 ? new ObjRelationshipFactory(targetEnt, toMany)
                 : new DbRelationshipFactory(targetEnt, toMany);
         return (Relationship) factory.makeObject(srcEnt);
     }
 
     /**
-     * Creates a unique name for the new object and constructs
-     * this object.
+     * Creates a unique name for the new object and constructs this object.
      */
     protected synchronized String makeName(Object namingContext) {
-        return  makeName(namingContext, nameBase());
+        return makeName(namingContext, nameBase());
     }
-    
+
     /**
      * @since 1.0.5
      */
@@ -160,7 +160,7 @@
         while (isNameInUse(name, namingContext)) {
             name = nameBase + c++;
         }
-        
+
         return name;
     }
 
@@ -170,7 +170,7 @@
     protected Object makeObject(Object namingContext) {
         return makeObject(namingContext, nameBase());
     }
-    
+
     /**
      * @since 1.0.5
      */
@@ -184,14 +184,14 @@
     /** Internal factory method. Invoked after the name is figured out. */
     protected abstract Object create(String name, Object namingContext);
 
-    /** 
-     * Checks if the name is already taken by another sibling
-     * in the same context.
+    /**
+     * Checks if the name is already taken by another sibling in the same context.
      */
     protected abstract boolean isNameInUse(String name, Object namingContext);
 
     // concrete factories
     static class DataDomainFactory extends NamedObjectFactory {
+
         @Override
         protected String nameBase() {
             return "UntitledDomain";
@@ -208,8 +208,30 @@
             return config.getDomain(name) != null;
         }
     }
+    
+    
+    static class  DataChannelDescriptorFactory extends NamedObjectFactory {
+
+        @Override
+        protected String nameBase() {
+            return "UntitledDomain";
+        }
+
+        @Override
+        protected Object create(String name, Object namingContext) {
+            DataChannelDescriptor dataChDes = new DataChannelDescriptor();
+            dataChDes.setName(name);
+            return dataChDes;
+        }
+
+        @Override
+        protected boolean isNameInUse(String name, Object namingContext) {
+            return false;
+        }
+    }
 
     static class DataMapFactory extends NamedObjectFactory {
+
         @Override
         protected String nameBase() {
             return "UntitledMap";
@@ -228,12 +250,22 @@
                 return false;
             }
 
-            DataDomain domain = (DataDomain) namingContext;
-            return domain.getMap(name) != null;
+            if (namingContext instanceof DataDomain) {
+                DataDomain domain = (DataDomain) namingContext;
+                return domain.getMap(name) != null;
+            }
+            
+            if (namingContext instanceof DataChannelDescriptor) {
+                DataChannelDescriptor domain = (DataChannelDescriptor) namingContext;
+                return domain.getDataMap(name) != null;
+            }
+            return false;
+           
         }
     }
 
     static class ObjEntityFactory extends NamedObjectFactory {
+
         @Override
         protected String nameBase() {
             return "UntitledObjEntity";
@@ -252,15 +284,13 @@
     }
 
     static class EmbeddableFactory extends NamedObjectFactory {
-        
+
         private String nameBase;
-        
-        
+
         public String getNameBase() {
             return nameBase;
         }
 
-        
         public void setNameBase(String nameBase) {
             this.nameBase = nameBase;
         }
@@ -268,17 +298,17 @@
         @Override
         protected String nameBase() {
             System.out.println("nameBase");
-            if(getNameBase()==null){
+            if (getNameBase() == null) {
                 setNameBase("UntitledEmbeddable");
             }
             return getNameBase();
-           
+
         }
 
         @Override
         protected Object create(String name, Object namingContext) {
             DataMap map = (DataMap) namingContext;
-            if(map.getDefaultPackage() != null){
+            if (map.getDefaultPackage() != null) {
                 return new Embeddable(map.getDefaultPackage() + "." + name);
             }
             return new Embeddable(name);
@@ -287,14 +317,15 @@
         @Override
         protected boolean isNameInUse(String name, Object namingContext) {
             DataMap map = (DataMap) namingContext;
-            if(map.getDefaultPackage() != null){
+            if (map.getDefaultPackage() != null) {
                 return map.getEmbeddable((map.getDefaultPackage() + "." + name)) != null;
             }
             return map.getEmbeddable(name) != null;
         }
     }
-    
+
     static class EmbeddableAttributeFactory extends NamedObjectFactory {
+
         @Override
         protected String nameBase() {
             return "untitledAttr";
@@ -312,9 +343,8 @@
         }
     }
 
-    
-    
     static class DbEntityFactory extends NamedObjectFactory {
+
         @Override
         protected String nameBase() {
             return "UntitledDbEntity";
@@ -333,6 +363,7 @@
     }
 
     static class ProcedureParameterFactory extends NamedObjectFactory {
+
         @Override
         protected String nameBase() {
             return "UntitledProcedureParameter";
@@ -345,8 +376,8 @@
 
         @Override
         protected boolean isNameInUse(String name, Object namingContext) {
-        	
-            // it doesn't matter if we create a parameter with 
+
+            // it doesn't matter if we create a parameter with
             // a duplicate name.. parameters are positional anyway..
             // still try to use unique names for visual consistency
             Procedure procedure = (Procedure) namingContext;
@@ -361,6 +392,7 @@
     }
 
     static class ProcedureFactory extends NamedObjectFactory {
+
         @Override
         protected String nameBase() {
             return "UntitledProcedure";
@@ -377,8 +409,9 @@
             return map.getProcedure(name) != null;
         }
     }
-    
+
     static class SelectQueryFactory extends NamedObjectFactory {
+
         @Override
         protected String nameBase() {
             return "UntitledQuery";
@@ -399,6 +432,7 @@
     }
 
     static class ObjAttributeFactory extends NamedObjectFactory {
+
         @Override
         protected String nameBase() {
             return "untitledAttr";
@@ -417,16 +451,18 @@
     }
 
     static class DbAttributeFactory extends ObjAttributeFactory {
+
         @Override
         protected Object create(String name, Object namingContext) {
             return new DbAttribute(
-                name,
-                TypesMapping.NOT_DEFINED,
-                (DbEntity) namingContext);
+                    name,
+                    TypesMapping.NOT_DEFINED,
+                    (DbEntity) namingContext);
         }
     }
 
     static class DataNodeFactory extends NamedObjectFactory {
+
         @Override
         protected String nameBase() {
             return "UntitledDataNode";
@@ -444,7 +480,33 @@
         }
     }
 
+    static class DataNodeDescriptorFactory extends NamedObjectFactory {
+
+        @Override
+        protected String nameBase() {
+            return "UntitledDataNode";
+        }
+
+        @Override
+        protected Object create(String name, Object namingContext) {
+            return new DataNodeDescriptor(name);
+        }
+
+        @Override
+        protected boolean isNameInUse(String name, Object namingContext) {
+            DataChannelDescriptor domain = (DataChannelDescriptor) namingContext;
+            Iterator<DataNodeDescriptor> nodeIt = domain.getNodeDescriptors().iterator();
+            while (nodeIt.hasNext()) {
+                if (nodeIt.next().getName().equals(name)) {
+                    return true;
+                }
+            }
+            return false;
+        }
+    }
+
     static class ObjRelationshipFactory extends NamedObjectFactory {
+
         protected Entity target;
         protected boolean toMany;
 
@@ -464,10 +526,10 @@
             return ent.getRelationship(name) != null;
         }
 
-        /** 
-         * Returns generated name for the ObjRelationships. 
-         * For to-one case and entity name "xxxx" it generates name "toXxxx".
-         * For to-many case and entity name "Xxxx" it generates name "xxxxArray".
+        /**
+         * Returns generated name for the ObjRelationships. For to-one case and entity
+         * name "xxxx" it generates name "toXxxx". For to-many case and entity name "Xxxx"
+         * it generates name "xxxxArray".
          */
         @Override
         protected String nameBase() {
@@ -476,13 +538,16 @@
             }
 
             String name = target.getName();
-            return (toMany)
-                ? Character.toLowerCase(name.charAt(0)) + name.substring(1) + "Array"
-                : "to" + Character.toUpperCase(name.charAt(0)) + name.substring(1);
+            return (toMany) ? Character.toLowerCase(name.charAt(0))
+                    + name.substring(1)
+                    + "Array" : "to"
+                    + Character.toUpperCase(name.charAt(0))
+                    + name.substring(1);
         }
     }
 
     static class DbRelationshipFactory extends ObjRelationshipFactory {
+
         public DbRelationshipFactory(Entity target, boolean toMany) {
             super(target, toMany);
         }
@@ -492,10 +557,9 @@
             return new DbRelationship(name);
         }
 
-        /** 
-         * Returns generated name for the DbRelationships. 
-         * For to-one case it generates name "TO_XXXX".
-         * For to-many case it generates name "XXXX_ARRAY". 
+        /**
+         * Returns generated name for the DbRelationships. For to-one case it generates
+         * name "TO_XXXX". For to-many case it generates name "XXXX_ARRAY".
          */
         @Override
         protected String nameBase() {

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/project/validator/DataMapValidator.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/project/validator/DataMapValidator.java?rev=905616&r1=905615&r2=905616&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/project/validator/DataMapValidator.java (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/project/validator/DataMapValidator.java Tue Feb  2 13:06:56 2010
@@ -19,8 +19,6 @@
 
 package org.apache.cayenne.project.validator;
 
-import java.util.Iterator;
-
 import org.apache.cayenne.access.DataDomain;
 import org.apache.cayenne.access.DataNode;
 import org.apache.cayenne.map.DataMap;

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/project/validator/DataNodeValidator.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/project/validator/DataNodeValidator.java?rev=905616&r1=905615&r2=905616&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/project/validator/DataNodeValidator.java (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/project/validator/DataNodeValidator.java Tue Feb  2 13:06:56 2010
@@ -19,8 +19,6 @@
 
 package org.apache.cayenne.project.validator;
 
-import java.util.Iterator;
-
 import org.apache.cayenne.access.DataDomain;
 import org.apache.cayenne.access.DataNode;
 import org.apache.cayenne.conf.DriverDataSourceFactory;

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/project/validator/EJBQLQueryValidator.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/project/validator/EJBQLQueryValidator.java?rev=905616&r1=905615&r2=905616&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/project/validator/EJBQLQueryValidator.java (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/project/validator/EJBQLQueryValidator.java Tue Feb  2 13:06:56 2010
@@ -24,17 +24,17 @@
 import org.apache.cayenne.access.DataDomain;
 import org.apache.cayenne.ejbql.EJBQLException;
 
+import org.apache.cayenne.map.EntityResolver;
 import org.apache.cayenne.project.ProjectPath;
 import org.apache.cayenne.query.EJBQLQuery;
 
 public class EJBQLQueryValidator extends TreeNodeValidator {
 
-    // private DataDomain dd;
     @Override
     public void validateObject(ProjectPath treeNodePath, Validator validator) {
         EJBQLQuery query = (EJBQLQuery) treeNodePath.getObject();
         PositionException message = validateEJBQL(query, treeNodePath
-                .firstInstanceOf(DataDomain.class));
+                .firstInstanceOf(DataDomain.class).getEntityResolver());
 
         if (message != null) {
             validator.registerWarning(
@@ -43,7 +43,7 @@
         }
     }
 
-    public PositionException validateEJBQL(EJBQLQuery query, DataDomain dd) {
+    public PositionException validateEJBQL(EJBQLQuery query, EntityResolver er) {
 
         if (query.getEjbqlStatement() != null) {
             PositionException message = null;
@@ -52,7 +52,7 @@
             queryTemp.setEjbqlStatement(query.getEjbqlStatement());
             
             try {
-                queryTemp.getExpression(dd.getEntityResolver());
+                queryTemp.getExpression(er);
             }
             catch (CayenneRuntimeException e) {
                 message = new PositionException();

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/project/validator/MappingNamesHelper.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/project/validator/MappingNamesHelper.java?rev=905616&r1=905615&r2=905616&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/project/validator/MappingNamesHelper.java (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/project/validator/MappingNamesHelper.java Tue Feb  2 13:06:56 2010
@@ -64,19 +64,19 @@
      * This is more of a sanity check than a real validation. As different DBs allow
      * different chars in identifiers, here we simply check for dots.
      */
-    String invalidCharsInDbPathComponent(String dbPathComponent) {
+    public String invalidCharsInDbPathComponent(String dbPathComponent) {
         return (dbPathComponent.indexOf('.') >= 0) ? "." : null;
     }
 
     /**
      * Scans a name of ObjAttribute or ObjRelationship for invalid characters.
      */
-    String invalidCharsInObjPathComponent(String objPathComponent) {
+    public String invalidCharsInObjPathComponent(String objPathComponent) {
         String invalidChars = validateJavaIdentifier(objPathComponent, "");
         return (invalidChars.length() > 0) ? invalidChars : null;
     }
 
-    String invalidCharsInJavaClassName(String javaClassName) {
+    public String invalidCharsInJavaClassName(String javaClassName) {
         if (javaClassName == null) {
             return null;
         }
@@ -91,7 +91,7 @@
         return (invalidChars.length() > 0) ? invalidChars : null;
     }
 
-    boolean invalidDataObjectClass(String dataObjectClassFQN) {
+    public boolean invalidDataObjectClass(String dataObjectClassFQN) {
         if (dataObjectClassFQN == null) {
             return true;
         }
@@ -138,7 +138,7 @@
      * considered invalid if there is a getter or a setter for it in java.lang.Object or
      * CayenneDataObject.
      */
-    boolean invalidDataObjectProperty(String dataObjectProperty) {
+    public boolean invalidDataObjectProperty(String dataObjectProperty) {
         return dataObjectProperty == null
                 || INVALID_JAVA_PROPERTIES.contains(dataObjectProperty);
     }

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/project/validator/ProcedureQueryValidator.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/project/validator/ProcedureQueryValidator.java?rev=905616&r1=905615&r2=905616&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/project/validator/ProcedureQueryValidator.java (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/project/validator/ProcedureQueryValidator.java Tue Feb  2 13:06:56 2010
@@ -19,8 +19,6 @@
 
 package org.apache.cayenne.project.validator;
 
-import java.util.Iterator;
-
 import org.apache.cayenne.map.DataMap;
 import org.apache.cayenne.map.Procedure;
 import org.apache.cayenne.project.ProjectPath;

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/project/validator/SQLTemplateValidator.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/project/validator/SQLTemplateValidator.java?rev=905616&r1=905615&r2=905616&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/project/validator/SQLTemplateValidator.java (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/project/validator/SQLTemplateValidator.java Tue Feb  2 13:06:56 2010
@@ -19,8 +19,6 @@
 
 package org.apache.cayenne.project.validator;
 
-import java.util.Iterator;
-
 import org.apache.cayenne.map.DataMap;
 import org.apache.cayenne.project.ProjectPath;
 import org.apache.cayenne.query.Query;

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/project/validator/SelectQueryValidator.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/project/validator/SelectQueryValidator.java?rev=905616&r1=905615&r2=905616&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/project/validator/SelectQueryValidator.java (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/project/validator/SelectQueryValidator.java Tue Feb  2 13:06:56 2010
@@ -19,8 +19,6 @@
 
 package org.apache.cayenne.project.validator;
 
-import java.util.Iterator;
-
 import org.apache.cayenne.access.QueryEngine;
 import org.apache.cayenne.exp.Expression;
 import org.apache.cayenne.exp.ExpressionException;

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/validation/EJBQlQueryValidatorTest.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/validation/EJBQlQueryValidatorTest.java?rev=905616&r1=905615&r2=905616&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/validation/EJBQlQueryValidatorTest.java (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/validation/EJBQlQueryValidatorTest.java Tue Feb  2 13:06:56 2010
@@ -69,7 +69,7 @@
         for (int i=0; i<ejbqlError.length;i++) {            
             EJBQLQuery queryError = new EJBQLQuery(ejbqlError[i]);
             EJBQLQueryValidator ejbqlQueryValidator = new EJBQLQueryValidator();
-            PositionException s = ejbqlQueryValidator.validateEJBQL(queryError, getDomain());
+            PositionException s = ejbqlQueryValidator.validateEJBQL(queryError, getDomain().getEntityResolver());
             assertEquals(typeError[i].getClass(),s.getE().getClass());
           }
     }

Modified: cayenne/main/trunk/framework/cayenne-modeler/pom.xml
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-modeler/pom.xml?rev=905616&r1=905615&r2=905616&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-modeler/pom.xml (original)
+++ cayenne/main/trunk/framework/cayenne-modeler/pom.xml Tue Feb  2 13:06:56 2010
@@ -98,6 +98,13 @@
 		</dependency>
 		
 		<dependency>
+			<groupId>org.apache.cayenne.unpublished</groupId>
+			<artifactId>cayenne-project-unpublished</artifactId>
+			<version>${version}</version>
+			<scope>provided</scope>
+		</dependency>
+		
+		<dependency>
 			<groupId>org.apache.cayenne</groupId>
 			<artifactId>cayenne-tools</artifactId>
 			<version>${version}</version>

Modified: cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/configuration/event/DataNodeEvent.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/configuration/event/DataNodeEvent.java?rev=905616&r1=905615&r2=905616&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/configuration/event/DataNodeEvent.java (original)
+++ cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/configuration/event/DataNodeEvent.java Tue Feb  2 13:06:56 2010
@@ -19,7 +19,7 @@
 
 package org.apache.cayenne.configuration.event;
 
-import org.apache.cayenne.access.DataNode;
+import org.apache.cayenne.configuration.DataNodeDescriptor;
 import org.apache.cayenne.map.event.MapEvent;
 
 /** 
@@ -27,28 +27,28 @@
  * in CayenneModeler.
  */
 public class DataNodeEvent extends MapEvent {
-	protected DataNode dataNode;
+	protected DataNodeDescriptor dataNode;
 
 	/** Creates a node change event. */
-	public DataNodeEvent(Object src, DataNode node) {
+	public DataNodeEvent(Object src, DataNodeDescriptor nextNode) {
 		super(src);
-		setDataNode(node);
+		setDataNode(nextNode);
 	}
 
 	/** Creates a node event of a specified type. */
-	public DataNodeEvent(Object src, DataNode node, int id) {
+	public DataNodeEvent(Object src, DataNodeDescriptor node, int id) {
 		this(src, node);
 		setId(id);
 	}
 
 	/** Creates a node name change event.*/
-	public DataNodeEvent(Object src, DataNode node, String oldName) {
+	public DataNodeEvent(Object src, DataNodeDescriptor node, String oldName) {
 		this(src, node);
 		setOldName(oldName);
 	}
 
 	/** Returns node object associated with this event. */
-	public DataNode getDataNode() {
+	public DataNodeDescriptor getDataNode() {
 		return dataNode;
 	}
 
@@ -57,7 +57,7 @@
 	 * 
 	 * @param dataNode The dataNode to set
 	 */
-	public void setDataNode(DataNode dataNode) {
+	public void setDataNode(DataNodeDescriptor dataNode) {
 		this.dataNode = dataNode;
 	}
 	

Modified: cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/configuration/event/DomainEvent.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/configuration/event/DomainEvent.java?rev=905616&r1=905615&r2=905616&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/configuration/event/DomainEvent.java (original)
+++ cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/configuration/event/DomainEvent.java Tue Feb  2 13:06:56 2010
@@ -19,7 +19,7 @@
 
 package org.apache.cayenne.configuration.event;
 
-import org.apache.cayenne.access.DataDomain;
+import org.apache.cayenne.configuration.DataChannelDescriptor;
 import org.apache.cayenne.map.event.MapEvent;
 
 /** 
@@ -29,19 +29,19 @@
  */
 public class DomainEvent extends MapEvent {
 	/** Creates a domain change event. */
-	public DomainEvent(Object src, DataDomain domain) {
+	public DomainEvent(Object src, DataChannelDescriptor domain) {
 		super(src);
 		setDomain(domain);
 	}
 
 	/** Creates a domain event of a specified type. */
-	public DomainEvent(Object src, DataDomain domain, int id) {
+	public DomainEvent(Object src, DataChannelDescriptor domain, int id) {
 		this(src, domain);
 		setId(id);
 	}
 
 	/** Creates a domain name change event.*/
-	public DomainEvent(Object src, DataDomain domain, String oldName) {
+	public DomainEvent(Object src, DataChannelDescriptor domain, String oldName) {
 		this(src, domain);	
 		setOldName(oldName);
 	}

Modified: cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/configuration/event/DomainListener.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/configuration/event/DomainListener.java?rev=905616&r1=905615&r2=905616&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/configuration/event/DomainListener.java (original)
+++ cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/configuration/event/DomainListener.java Tue Feb  2 13:06:56 2010
@@ -26,10 +26,6 @@
 {
 	/** Domain property (usually - name) changed. */
 	public void domainChanged(DomainEvent e);
-	/** New data map has been created/added.*/
-	public void domainAdded(DomainEvent e);
-	/** Domain has been removed.*/
-	public void domainRemoved(DomainEvent e);
 	
 }
 

Modified: cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/ActionManager.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/ActionManager.java?rev=905616&r1=905615&r2=905616&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/ActionManager.java (original)
+++ cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/ActionManager.java Tue Feb  2 13:06:56 2010
@@ -44,7 +44,6 @@
 import org.apache.cayenne.modeler.action.CreateDataMapAction;
 import org.apache.cayenne.modeler.action.CreateDataMapEntityListenerAction;
 import org.apache.cayenne.modeler.action.CreateDbEntityAction;
-import org.apache.cayenne.modeler.action.CreateDomainAction;
 import org.apache.cayenne.modeler.action.CreateEmbeddableAction;
 import org.apache.cayenne.modeler.action.CreateNodeAction;
 import org.apache.cayenne.modeler.action.CreateObjEntityAction;
@@ -106,7 +105,8 @@
 
     // search action added to project actions
     static final Collection<String> PROJECT_ACTIONS = Arrays.asList(RevertAction
-            .getActionName(), CreateDomainAction.getActionName(), ProjectAction
+            .getActionName(), 
+            ProjectAction
             .getActionName(), ValidateAction.getActionName(), SaveAsAction
             .getActionName(), FindAction.getActionName());
 
@@ -196,7 +196,6 @@
         registerAction(new RevertAction(application));
         registerAction(new ValidateAction(application));
         registerAction(new RemoveAction(application));
-        registerAction(new CreateDomainAction(application));
         registerAction(new CreateNodeAction(application));
         registerAction(new CreateDataMapAction(application));
         registerAction(new GenerateCodeAction(application));
@@ -307,8 +306,6 @@
     public void dataMapSelected() {
         processActionsState(DATA_MAP_ACTIONS);
         updateActions("DataMap");
-        // reset
-        // getAction(CreateAttributeAction.getActionName()).setName("Create Attribute");
     }
 
     public void objEntitySelected() {

Modified: cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/Application.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/Application.java?rev=905616&r1=905615&r2=905616&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/Application.java (original)
+++ cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/Application.java Tue Feb  2 13:06:56 2010
@@ -31,6 +31,10 @@
 import javax.swing.JRootPane;
 import javax.swing.SwingUtilities;
 
+import org.apache.cayenne.configuration.CayenneServerModule;
+import org.apache.cayenne.di.DIBootstrap;
+import org.apache.cayenne.di.Injector;
+import org.apache.cayenne.di.Module;
 import org.apache.cayenne.modeler.dialog.LogConsole;
 import org.apache.cayenne.modeler.undo.CayenneUndoManager;
 import org.apache.cayenne.modeler.util.AdapterMapping;
@@ -44,7 +48,8 @@
 import org.apache.cayenne.pref.HSQLEmbeddedPreferenceEditor;
 import org.apache.cayenne.pref.HSQLEmbeddedPreferenceService;
 import org.apache.cayenne.pref.PreferenceService;
-import org.apache.cayenne.project.Project;
+import org.apache.cayenne.project2.CayenneProjectModule;
+import org.apache.cayenne.project2.Project;
 import org.apache.cayenne.swing.BindingFactory;
 import org.apache.commons.collections.CollectionUtils;
 import org.apache.commons.collections.Transformer;
@@ -98,17 +103,23 @@
     private boolean isQuittingApplication = false;
 
     protected CayennePreference cayennePreference;
+    
+    protected Injector injector;
 
     public static Application getInstance() {
         return instance;
     }
 
     // static methods that should probably go away eventually...
-
     public static CayenneModelerFrame getFrame() {
         return (CayenneModelerFrame) getInstance().getFrameController().getView();
     }
 
+    
+    public Injector getInjector() {
+        return injector;
+    }
+
     public static Project getProject() {
         return getInstance().getFrameController().getProjectController().getProject();
     }
@@ -116,6 +127,11 @@
     public Application(File initialProject) {
         this.initialProject = initialProject;
 
+        Module module = new CayenneProjectModule();
+        Module moduleSer = new CayenneServerModule("CayenneModeler");
+
+        injector = DIBootstrap.createInjector(module, moduleSer);
+        
         // configure startup settings
         String configuredName = System.getProperty(APPLICATION_NAME_PROPERTY);
         this.name = (configuredName != null) ? configuredName : DEFAULT_APPLICATION_NAME;

Modified: cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/CayenneModelerController.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/CayenneModelerController.java?rev=905616&r1=905615&r2=905616&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/CayenneModelerController.java (original)
+++ cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/CayenneModelerController.java Tue Feb  2 13:06:56 2010
@@ -35,6 +35,7 @@
 
 import javax.swing.WindowConstants;
 
+import org.apache.cayenne.conf.ConfigStatus;
 import org.apache.cayenne.conf.Configuration;
 import org.apache.cayenne.modeler.action.ExitAction;
 import org.apache.cayenne.modeler.action.OpenProjectAction;
@@ -43,8 +44,9 @@
 import org.apache.cayenne.modeler.pref.ComponentGeometry;
 import org.apache.cayenne.modeler.pref.FSPath;
 import org.apache.cayenne.modeler.util.CayenneController;
-import org.apache.cayenne.project.ApplicationProject;
-import org.apache.cayenne.project.validator.Validator;
+import org.apache.cayenne.project.validator.ValidationInfo;
+import org.apache.cayenne.project2.Project;
+import org.apache.cayenne.project2.validate.ConfigurationValidationVisitor;
 
 /**
  * Controller of the main application frame.
@@ -152,9 +154,10 @@
     }
 
     public void projectModifiedAction() {
-        String title = (projectController.getProject().isLocationUndefined())
+        String title = (projectController.getProject().getConfigurationResource() == null)
                 ? "[New]"
-                : projectController.getProject().getMainFile().getAbsolutePath();
+                : projectController.getProject()
+                .getConfigurationResource().getURL().getPath();
 
         frame.setTitle("* - " + ModelerConstants.TITLE + " - " + title);
     }
@@ -164,7 +167,8 @@
         updateStatus("Project saved...");
         frame.setTitle(ModelerConstants.TITLE
                 + " - "
-                + projectController.getProject().getMainFile().getAbsolutePath());
+                + projectController.getProject()
+                .getConfigurationResource().getURL().getPath());
     }
 
     /**
@@ -190,8 +194,9 @@
     /**
      * Handles project opening control. Updates main frame, then delegates control to
      * child controllers.
+     * @param config 
      */
-    public void projectOpenedAction(ApplicationProject project) {
+    public void projectOpenedAction(Project project, Configuration config) {
 
         projectController.setProject(project);
 
@@ -201,7 +206,7 @@
         application.getActionManager().projectOpened();
 
         // do status update AFTER the project is actually opened...
-        if (project.isLocationUndefined()) {
+        if (project.getConfigurationResource() == null){
             updateStatus("New project created...");
             frame.setTitle(ModelerConstants.TITLE + "- [New]");
         }
@@ -209,24 +214,32 @@
             updateStatus("Project opened...");
             frame.setTitle(ModelerConstants.TITLE
                     + " - "
-                    + project.getMainFile().getAbsolutePath());
+                    + project
+                    .getConfigurationResource().getURL().getPath());
         }
 
         // update preferences
-        if (!project.isLocationUndefined()) {
-            getLastDirectory().setDirectory(project.getProjectDirectory());
+        if (project.getConfigurationResource() != null) {
+            getLastDirectory().setDirectory(new File(project.getConfigurationResource().getURL().getPath()));
             frame.fireRecentFileListChanged();
         }
 
+        
+        ConfigStatus loadStatus = (config != null)
+                ? config.getLoadStatus()
+                : new ConfigStatus();
+                
         // --- check for load errors
-        if (project.getLoadStatus().hasFailures()) {
+        if (loadStatus.hasFailures()) {
             // mark project as unsaved
             project.setModified(true);
             projectController.setDirty(true);
 
+            ConfigurationValidationVisitor validatVisitor = new ConfigurationValidationVisitor(project);
+            List<ValidationInfo> object = (List<ValidationInfo>) project.getRootNode().acceptVisitor(validatVisitor);
+            
             // show warning dialog
-            ValidatorDialog.showDialog(frame, new Validator(project, project
-                    .getLoadStatus()));
+            ValidatorDialog.showDialog(frame, object);
         }
 
     }
@@ -296,4 +309,38 @@
             }
         }
     }
+
+    public void changePathInLastProjListAction(String oldPath, String newPath) {
+        Preferences frefLastProjFiles = ModelerPreferences.getLastProjFilesPref();
+        List<String> arr = ModelerPreferences.getLastProjFiles();
+        // Add proj path to the preferences
+        // Prevent duplicate entries.
+        if (arr.contains(oldPath)) {
+            arr.remove(oldPath);
+        }
+        
+        if (arr.contains(newPath)) {
+            arr.remove(newPath);
+        }
+
+        arr.add(0, newPath);
+        while (arr.size() > ModelerPreferences.LAST_PROJ_FILES_SIZE) {
+            arr.remove(arr.size() - 1);
+        }
+
+        try {
+            frefLastProjFiles.clear();
+        }
+        catch (BackingStoreException e) {
+            // ignore exception
+        }
+        int size = arr.size();
+        
+        for (int i=0; i< size; i++) {
+            frefLastProjFiles.put(String.valueOf(i), arr.get(i).toString());
+        }
+        
+        getLastDirectory().setDirectory(new File(newPath));
+        frame.fireRecentFileListChanged();
+    }
 }

Modified: cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/CayenneModelerFrame.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/CayenneModelerFrame.java?rev=905616&r1=905615&r2=905616&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/CayenneModelerFrame.java (original)
+++ cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/CayenneModelerFrame.java Tue Feb  2 13:06:56 2010
@@ -49,7 +49,6 @@
 import org.apache.cayenne.modeler.action.CopyAction;
 import org.apache.cayenne.modeler.action.CreateDataMapAction;
 import org.apache.cayenne.modeler.action.CreateDbEntityAction;
-import org.apache.cayenne.modeler.action.CreateDomainAction;
 import org.apache.cayenne.modeler.action.CreateEmbeddableAction;
 import org.apache.cayenne.modeler.action.CreateNodeAction;
 import org.apache.cayenne.modeler.action.CreateObjEntityAction;
@@ -104,7 +103,6 @@
 import org.apache.cayenne.modeler.util.ModelerUtil;
 import org.apache.cayenne.modeler.util.OperatingSystem;
 import org.apache.cayenne.modeler.util.RecentFileMenu;
-import org.apache.cayenne.pref.Domain;
 import org.apache.commons.logging.LogFactory;
 
 /**
@@ -216,7 +214,6 @@
 
         projectMenu.add(getAction(ValidateAction.getActionName()).buildMenu());
         projectMenu.addSeparator();
-        projectMenu.add(getAction(CreateDomainAction.getActionName()).buildMenu());
         projectMenu.add(getAction(CreateNodeAction.getActionName()).buildMenu());
         projectMenu.add(getAction(CreateDataMapAction.getActionName()).buildMenu());
 
@@ -383,7 +380,6 @@
 
         toolBar.addSeparator();
 
-        toolBar.add(getAction(CreateDomainAction.getActionName()).buildButton());
         toolBar.add(getAction(CreateNodeAction.getActionName()).buildButton());
         toolBar.add(getAction(CreateDataMapAction.getActionName()).buildButton());
 

Modified: cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/FileClassLoadingService.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/FileClassLoadingService.java?rev=905616&r1=905615&r2=905616&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/FileClassLoadingService.java (original)
+++ cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/FileClassLoadingService.java Tue Feb  2 13:06:56 2010
@@ -26,7 +26,6 @@
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Collections;
-import java.util.Iterator;
 import java.util.List;
 
 /**

Modified: cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/ProjectController.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/ProjectController.java?rev=905616&r1=905615&r2=905616&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/ProjectController.java (original)
+++ cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/ProjectController.java Tue Feb  2 13:06:56 2010
@@ -34,8 +34,6 @@
 import javax.swing.event.EventListenerList;
 
 import org.apache.cayenne.CayenneRuntimeException;
-import org.apache.cayenne.access.DataDomain;
-import org.apache.cayenne.access.DataNode;
 import org.apache.cayenne.configuration.event.DataMapEvent;
 import org.apache.cayenne.configuration.event.DataMapListener;
 import org.apache.cayenne.configuration.event.DataNodeEvent;
@@ -48,6 +46,8 @@
 import org.apache.cayenne.configuration.event.ProcedureParameterListener;
 import org.apache.cayenne.configuration.event.QueryEvent;
 import org.apache.cayenne.configuration.event.QueryListener;
+import org.apache.cayenne.configuration.DataChannelDescriptor;
+import org.apache.cayenne.configuration.DataNodeDescriptor;
 import org.apache.cayenne.map.DataMap;
 import org.apache.cayenne.map.DbAttribute;
 import org.apache.cayenne.map.DbEntity;
@@ -73,7 +73,6 @@
 import org.apache.cayenne.map.event.ObjEntityListener;
 import org.apache.cayenne.map.event.ObjRelationshipListener;
 import org.apache.cayenne.map.event.RelationshipEvent;
-import org.apache.cayenne.modeler.action.ModelerProjectConfiguration;
 import org.apache.cayenne.modeler.action.NavigateBackwardAction;
 import org.apache.cayenne.modeler.action.NavigateForwardAction;
 import org.apache.cayenne.modeler.action.RevertAction;
@@ -117,9 +116,8 @@
 import org.apache.cayenne.modeler.util.CircularArray;
 import org.apache.cayenne.modeler.util.Comparators;
 import org.apache.cayenne.pref.Domain;
-import org.apache.cayenne.project.ApplicationProject;
-import org.apache.cayenne.project.Project;
 import org.apache.cayenne.project.ProjectPath;
+import org.apache.cayenne.project2.Project;
 import org.apache.cayenne.query.Query;
 import org.apache.cayenne.util.IDUtil;
 import org.apache.commons.logging.Log;
@@ -146,8 +144,8 @@
 
         private boolean isRefiring;
         private DisplayEvent event;
-        private DataDomain domain;
-        private DataNode node;
+        private DataChannelDescriptor domain;
+        private DataNodeDescriptor node;
         private DataMap map;
         private ObjEntity objEntity;
         private DbEntity dbEntity;
@@ -263,7 +261,7 @@
     protected EventListenerList listenerList;
     protected boolean dirty;
 
-    protected ApplicationProject project;
+    protected Project project;
     protected Domain projectPreferences;
 
     protected Preferences projectControllerPreferences;
@@ -290,20 +288,15 @@
         return parent.getView();
     }
 
-    public ApplicationProject getProject() {
+    public Project getProject() {
         return project;
     }
 
-    public void setProject(ApplicationProject currentProject) {
+    public void setProject(Project currentProject) {
         if (this.project != currentProject) // strange enough, this method is called twice
         // during project opening. Not to disturb
         // watchdog extra time, adding this check
         {
-            if (this.project != null) {
-                ((ModelerProjectConfiguration) project.getConfiguration())
-                        .getGraphRegistry()
-                        .unregister(this);
-            }
 
             this.project = currentProject;
             this.projectPreferences = null;
@@ -324,8 +317,8 @@
 
                 watchdog.reconfigure();
 
-                addDomainListener(((ModelerProjectConfiguration) project
-                        .getConfiguration()).getGraphRegistry());
+//                addDomainListener(((ModelerProjectConfiguration) project
+//                        .getConfiguration()).getGraphRegistry());
             }
         }
     }
@@ -347,10 +340,10 @@
         }
 
         if (projectPreferences == null) {
-            String key = getProject().isLocationUndefined() ? new String(IDUtil
+            String key = getProject().getConfigurationResource() == null//getProject().isLocationUndefined() 
+                    ? new String(IDUtil
                     .pseudoUniqueByteSequence16()) : project
-                    .getMainFile()
-                    .getAbsolutePath();
+                    .getConfigurationResource().getURL().getPath();
 
             projectPreferences = getApplicationPreferenceDomain().getSubdomain(
                     Project.class).getSubdomain(key);
@@ -364,10 +357,10 @@
             throw new CayenneRuntimeException("No Project selected");
         }
         if (projectControllerPreferences == null) {
-            String key = getProject().isLocationUndefined() ? new String(IDUtil
+            String key = getProject().getConfigurationResource() == null//getProject().isLocationUndefined() 
+                ? new String(IDUtil
                     .pseudoUniqueByteSequence16()) : project
-                    .getMainFile()
-                    .getAbsolutePath();
+                    .getConfigurationResource().getURL().getPath();
 
             projectControllerPreferences = Preferences.userNodeForPackage(Project.class);
 
@@ -386,23 +379,24 @@
      * project is selected.
      */
     public Domain getPreferenceDomainForDataDomain() {
-        DataDomain dataDomain = getCurrentDataDomain();
+        DataChannelDescriptor dataDomain = (DataChannelDescriptor)getProject().getRootNode();
         if (dataDomain == null) {
             throw new CayenneRuntimeException("No DataDomain selected");
         }
 
         return getPreferenceDomainForProject()
-                .getSubdomain(DataDomain.class)
+                .getSubdomain(DataChannelDescriptor.class)
                 .getSubdomain(dataDomain.getName());
     }
 
     public Preferences getPreferenceForDataDomain() {
-        DataDomain dataDomain = getCurrentDataDomain();
+        
+        DataChannelDescriptor dataDomain = (DataChannelDescriptor)getProject().getRootNode();
         if (dataDomain == null) {
             throw new CayenneRuntimeException("No DataDomain selected");
         }
 
-        return getPreferenceForProject().node("DataDomains").node(dataDomain.getName());
+        return getPreferenceForProject().node(dataDomain.getName());
     }
 
     /**
@@ -432,7 +426,7 @@
      * DataMap is selected.
      */
     public DataNodeDefaults getDataNodePreferences() {
-        DataNode node = getCurrentDataNode();
+        DataNodeDescriptor node = getCurrentDataNode();
         if (node == null) {
             throw new CayenneRuntimeException("No DataNode selected");
         }
@@ -495,50 +489,6 @@
         }
     }
 
-    protected void refreshNamespace() {
-        refreshNamespace(getCurrentDataDomain());
-    }
-
-    protected void refreshNamespace(DataDomain domain) {
-        if (domain != null) {
-            domain.getEntityResolver().clearCache();
-        }
-    }
-
-    /**
-     * Finds a domain containing specified DataNode.
-     */
-    public DataDomain findDomain(DataNode node) {
-        Collection<DataDomain> domains = (getProject()).getConfiguration().getDomains();
-
-        for (DataDomain domain : domains) {
-            if (domain.getNode(node.getName()) == node) {
-                return domain;
-            }
-        }
-
-        return null;
-    }
-
-    /**
-     * Finds a domain containing specified DataMap.
-     */
-    public DataDomain findDomain(DataMap map) {
-        Collection<DataDomain> domains = (getProject()).getConfiguration().getDomains();
-
-        if (map == null) {
-            map = getCurrentDataMap();
-        }
-
-        for (DataDomain domain : domains) {
-            if (domain.getMap(map.getName()) == map) {
-                return domain;
-            }
-        }
-
-        return null;
-    }
-
     private void removeFromHistory(EventObject e) {
 
         synchronized (controllerStateHistory) {
@@ -610,14 +560,10 @@
         }
     }
 
-    public DataNode getCurrentDataNode() {
+    public DataNodeDescriptor getCurrentDataNode() {
         return currentState.node;
     }
 
-    public DataDomain getCurrentDataDomain() {
-        return currentState.domain;
-    }
-
     public DataMap getCurrentDataMap() {
         return currentState.map;
     }
@@ -874,22 +820,15 @@
         setDirty(true);
 
         if (e.getId() == MapEvent.REMOVE) {
-            refreshNamespace(e.getDomain());
             removeFromHistory(e);
         }
 
         for (EventListener listener : listenerList.getListeners(DomainListener.class)) {
             DomainListener temp = (DomainListener) listener;
             switch (e.getId()) {
-                case MapEvent.ADD:
-                    temp.domainAdded(e);
-                    break;
                 case MapEvent.CHANGE:
                     temp.domainChanged(e);
                     break;
-                case MapEvent.REMOVE:
-                    temp.domainRemoved(e);
-                    break;
                 default:
                     throw new IllegalArgumentException("Invalid DomainEvent type: "
                             + e.getId());
@@ -937,7 +876,6 @@
         setDirty(true);
 
         if (e.getId() == MapEvent.REMOVE) {
-            refreshNamespace(e.getDomain());
             removeFromHistory(e);
         }
 
@@ -1000,7 +938,6 @@
         setDirty(true);
 
         if (e.getId() == MapEvent.REMOVE) {
-            refreshNamespace(e.getDomain());
             removeFromHistory(e);
         }
 
@@ -1036,7 +973,6 @@
         }
 
         if (e.getId() == MapEvent.REMOVE) {
-            refreshNamespace(e.getDomain());
             removeFromHistory(e);
         }
 
@@ -1071,7 +1007,6 @@
         }
 
         if (e.getId() == MapEvent.REMOVE) {
-            refreshNamespace(e.getDomain());
             removeFromHistory(e);
         }
 
@@ -1102,7 +1037,6 @@
         setDirty(true);
 
         if (e.getId() == MapEvent.REMOVE) {
-            refreshNamespace(e.getDomain());
             removeFromHistory(e);
         }
 
@@ -1133,7 +1067,6 @@
         setDirty(true);
 
         if (e.getId() == MapEvent.REMOVE) {
-            refreshNamespace(e.getDomain());
             removeFromHistory(e);
         }
 
@@ -1721,12 +1654,11 @@
     public void addDataMap(Object src, DataMap map, boolean makeCurrent) {
 
         // new map was added.. link it to domain (and node if possible)
-        currentState.domain.addMap(map);
+        currentState.domain.getDataMaps().add(map);
 
-        if (currentState.node != null && !currentState.node.getDataMaps().contains(map)) {
-            currentState.node.addDataMap(map);
+        if (currentState.node != null && !currentState.node.getDataMapNames().contains(map.getName())) {
+            currentState.node.getDataMapNames().add(map.getName());
             fireDataNodeEvent(new DataNodeEvent(this, currentState.node));
-            currentState.domain.reindexNodes();
         }
 
         fireDataMapEvent(new DataMapEvent(src, map, MapEvent.ADD));
@@ -1902,9 +1834,6 @@
         else if (getCurrentDataNode() != null) {
             return getCurrentDataNode();
         }
-        else if (getCurrentDataDomain() != null) {
-            return getCurrentDataDomain();
-        }
         else if (getCurrentPaths() != null) { // multiple objects
             ProjectPath[] paths = getCurrentPaths();
             List<Object> result = new Vector<Object>();
@@ -1985,8 +1914,8 @@
     }
 
     public ArrayList<Embeddable> getEmbeddableNamesInCurRentDataDomain() {
-        DataDomain dd = getCurrentDataDomain();
-        Collection<DataMap> maps = dd.getDataMaps();
+        DataChannelDescriptor dataChannelDescriptor = (DataChannelDescriptor)getProject().getRootNode();
+        Collection<DataMap> maps = dataChannelDescriptor.getDataMaps();
         Iterator<DataMap> it = maps.iterator();
         ArrayList<Embeddable> embs = new ArrayList<Embeddable>();
         while (it.hasNext()) {

Modified: cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/ProjectTreeModel.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/ProjectTreeModel.java?rev=905616&r1=905615&r2=905616&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/ProjectTreeModel.java (original)
+++ cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/ProjectTreeModel.java Tue Feb  2 13:06:56 2010
@@ -28,13 +28,13 @@
 import javax.swing.tree.DefaultTreeModel;
 import javax.swing.tree.MutableTreeNode;
 
-import org.apache.cayenne.access.DataDomain;
-import org.apache.cayenne.access.DataNode;
+import org.apache.cayenne.configuration.DataChannelDescriptor;
+import org.apache.cayenne.configuration.DataNodeDescriptor;
 import org.apache.cayenne.map.DataMap;
-import org.apache.cayenne.project.Project;
 import org.apache.cayenne.project.ProjectPath;
 import org.apache.cayenne.project.ProjectTraversal;
 import org.apache.cayenne.project.ProjectTraversalHandler;
+import org.apache.cayenne.project2.Project;
 
 /**
  * ProjectTreeModel is a model of Cayenne project tree.
@@ -57,7 +57,7 @@
      * Constructor for ProjectTreeModel.
      */
     public ProjectTreeModel(Project project) {
-        super(wrapProjectNode(project));
+        super(ProjectTreeFactory.wrapProjectNode(project.getRootNode()));
     }
 
     /**
@@ -82,48 +82,51 @@
 
         Object object = treeNode.getUserObject();
 
-        int len = parent.getChildCount();
-        int ins = -1;
-        int rm = -1;
+        if (parent != null) {
+            int len = parent.getChildCount();
+            int ins = -1;
+            int rm = -1;
+
+            for (int i = 0; i < len; i++) {
+                DefaultMutableTreeNode node = (DefaultMutableTreeNode) parent
+                        .getChildAt(i);
+
+                // remember to remove node
+                if (node == treeNode) {
+                    rm = i;
+                    continue;
+                }
 
-        for (int i = 0; i < len; i++) {
-            DefaultMutableTreeNode node = (DefaultMutableTreeNode) parent.getChildAt(i);
+                // no more insert checks
+                if (ins >= 0) {
+                    continue;
+                }
 
-            // remember to remove node
-            if (node == treeNode) {
-                rm = i;
-                continue;
+                // ObjEntities go before DbEntities
+                if (comparator.compare(object, node.getUserObject()) <= 0) {
+                    ins = i;
+                }
             }
 
-            // no more insert checks
-            if (ins >= 0) {
-                continue;
+            if (ins < 0) {
+                ins = len;
             }
 
-            // ObjEntities go before DbEntities
-            if (comparator.compare(object, node.getUserObject()) <= 0) {
-                ins = i;
+            if (rm == ins) {
+                return;
             }
-        }
-
-        if (ins < 0) {
-            ins = len;
-        }
 
-        if (rm == ins) {
-            return;
-        }
-
-        // remove
-        if (rm >= 0) {
-            removeNodeFromParent(treeNode);
-            if (rm < ins) {
-                ins--;
+            // remove
+            if (rm >= 0) {
+                removeNodeFromParent(treeNode);
+                if (rm < ins) {
+                    ins--;
+                }
             }
-        }
 
-        // insert
-        insertNodeInto(treeNode, parent, ins);
+            // insert
+            insertNodeInto(treeNode, parent, ins);
+        }
     }
 
     /**
@@ -207,14 +210,14 @@
             // do not read deatils of linked maps
             if ((node instanceof DataMap)
                     && parentPath != null
-                    && (parentPath.getObject() instanceof DataNode)) {
+                    && (parentPath.getObject() instanceof DataNodeDescriptor)) {
                 return false;
             }
 
             return (node instanceof Project)
-                    || (node instanceof DataDomain)
+                    || (node instanceof DataChannelDescriptor)
                     || (node instanceof DataMap)
-                    || (node instanceof DataNode);
+                    || (node instanceof DataNodeDescriptor);
         }
     }
 



Mime
View raw message