From: Richard B. <rb...@us...> - 2004-12-17 00:29:28
|
Update of /cvsroot/jcframework/FrameworkMapper In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18233 Modified Files: README.txt frmClassInfo.vb Log Message: Fixed an issue with drag and drop for associations Index: frmClassInfo.vb =================================================================== RCS file: /cvsroot/jcframework/FrameworkMapper/frmClassInfo.vb,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- frmClassInfo.vb 10 Dec 2004 04:31:12 -0000 1.2 +++ frmClassInfo.vb 17 Dec 2004 00:29:18 -0000 1.3 @@ -293,6 +293,16 @@ ListView1.EndUpdate() End Sub + Private Sub reloadListView(ByVal ass As CMappedAssociation) + reloadListView() + If Not ass Is Nothing Then + frmMain.fProperties.CurrentObject = ass + frmMain.fProperties.Refresh() + DataGrid2.DataSource = ass.Entries + End If + End Sub + + Private Sub DataGrid1_DragEnter(ByVal sender As Object, ByVal e As System.Windows.Forms.DragEventArgs) Handles DataGrid1.DragEnter If isOKToDrop(e) Then e.Effect = e.AllowedEffect @@ -394,7 +404,7 @@ ' We try to see if we can match all key fields in target class to fields in ' source class. if we can then we assume it's a 1-1 association ' - Dim i As Integer + Dim i As Integer = 0 Dim entryCol As New Collection For Each toAttr In cls.Attributes If toAttr.isKey Then @@ -410,7 +420,7 @@ Next End If Next - If entryCol.Count = i Then + If entryCol.Count = i And i > 0 Then 'Each entry was matched so populate attributes For Each entry In entryCol ass.Entries.Add(entry) @@ -455,7 +465,7 @@ End Try ass.Name = s MappedClass.Associations.Add(ass, s) - reloadListView() + reloadListView(ass) End If End Sub Index: README.txt =================================================================== RCS file: /cvsroot/jcframework/FrameworkMapper/README.txt,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- README.txt 12 Oct 2004 23:10:17 -0000 1.1 +++ README.txt 17 Dec 2004 00:29:18 -0000 1.2 @@ -6,26 +6,60 @@ 1. Generate the AtomsFramework XML file 2. Generate vb/c# classes based on the mappings -3. Facilitate refactoring of code by allowing changes to be made to existing code +3. Generate scripts for databases +4. Facilitate refactoring of code by allowing changes to be made to existing code -In order for this product to work you will need to get a copy of DockPanelSuite from http://sourceforge.net/projects/dockpanelsuite/ (I'm using version 0.9.2.10) +---------------- +Prerequisites + +This program relies on other projects to work properly. You will need copies of + +1. DockPanelSuite from http://sourceforge.net/projects/dockpanelsuite/ (I'm using version 0.9.2.10 - the .dll is included with this distribution) +2. CodeSmith v2.6+ for codegeneration. http://www.ericjsmith.net/codesmith/ +3. WinMerge 2.0+ for viewing differences. http://winmerge.sourceforge.net/ + +When you start the program, you will need to indicate where CodeSmith and WinMerge are located. Go to the Tools->Options menu item and enter details as appropriate. --------------- -The roadmap for development is something like the following: +Documentation -1. Add support for WinMerge (or user selectable diff tool) so that you can visually see the difference between loaded XML file and generated XML file. +There's not a lot of documentation at this stage, but the basics steps to use the program are: -2. On generating the XML, generate to a temp file. Compare to original XML - if the same the delete temp file, otherwise show differences and save over the top of the original XML. +1. Create a new project, and set project properties for codesmith templates to use, and where files live, etc. Save the project. -3. Add support for code generation. I'd like to do it based on a user-selectable (and definable) template set. There should be a codesmith template available in the near future and I'd like to use this tool for generating if possible (why reinvent the wheel :-) +2. Add a database connection (MSSQL server only at this stage) -4. Use the diff tool to show differences between generated code and existing code so that refactoring shows exactly what has changed. +3. Create a new class, and map database fields to the class by either drag-dropping the whole table on the grid, drag-dropping individual fields, or manually entering details. -5. Try to generate SQL scripts for creating db schemas on target databases so that deployment of solutions on client machines is simpler. +4. Generate a new .XML mapping file by selecting Tools->Generate XML. NOTE: YOU MUST DO THIS TO SAVE CLASS CHANGES. -6. Visual representation of class associations instead of grid based ones. Maybe a nice drag/drop interface etc, using a subset of the UML notation. +5. Generate a business object. + +6. Rinse and Repeat :-) + +Please note that if you move the scripts to another directory, you should also copy the CodeSmithDataClasses.dll. This is a helper dll I've written to make scripts easier to write by referencing object structures... Codesmith needs this file in the same location as the .cst file it is executing otherwise it will complain. + +---------------- +Additions since 0.1 Pre-Alpha are + +1. Support added for WinMerge (or user selectable diff tool) so that you can visually see the difference between a generated file and the existing one. Applies to both XML Mapping files and business classes. + +2. Support for code generation via codesmith +3. A few bug fixes - but I'm sure I've introduced a lot more :-) + +---------------- +Still to come... +1. Scripts to generate SQL for creating db schemas + +2. Visual representation of class associations instead of grid based ones. Maybe a nice drag/drop interface etc, using a subset of the UML notation. + +3. Massive clean up + +4. Proper documentation + +5. Install kit. Any assistance and/or suggestions with this tool would be very appreciated and most welcome. |