[mapguide-commits] r8524 - in trunk/Tools/Maestro: Maestro Maestro.Editors/MapDefinition OSGeo.MapGuide.MaestroAPI

svn_mapguide at osgeo.org svn_mapguide at osgeo.org
Wed Jan 28 07:25:38 PST 2015


Author: jng
Date: 2015-01-28 07:25:38 -0800 (Wed, 28 Jan 2015)
New Revision: 8524

Added:
   trunk/Tools/Maestro/Maestro/mono.txt
Modified:
   trunk/Tools/Maestro/Maestro.Editors/MapDefinition/MapLayersSectionCtrl.cs
   trunk/Tools/Maestro/Maestro/changelog.txt
   trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/Utility.cs
Log:
This submission includes the following changes:
 - Fix NRE trying to edit the base map section of a pre-3.0.0 Map Definition. This was due to recent changes to support the v3.0.0 schema
 - Add mono workarounds to allow the property grid to work in the Map Definition editor (Mono doesn't like objects being assigned to a detached PropertyGrid)
 - Use Stream.CopyTo for Utility.CopyStream
 - Add a small text file documenting some gotchas when running Maestro under Mono.

Modified: trunk/Tools/Maestro/Maestro/changelog.txt
===================================================================
--- trunk/Tools/Maestro/Maestro/changelog.txt	2015-01-28 11:49:12 UTC (rev 8523)
+++ trunk/Tools/Maestro/Maestro/changelog.txt	2015-01-28 15:25:38 UTC (rev 8524)
@@ -1,11 +1,30 @@
- - Drag/Drop now properly handles cases where multiple handlers could handle a given file drop
+ 6.0a4
+ =====
+ 
+ - Updated to target .net Framework 4.5
+ - Expression Editor now supports parsing/validation of FDO Filters and Expressions
+    - Structure of an FDO filter or expression can be viewed under the tools menu
+ - MapGuide Open Source 3.0 support
+    - Support for editing v3.0.0 Map Definition resources
+    - Support for local resource previews in 3.0
+    - Stamed tile layer options in Fusion editor
+ - Fix: Don't show debug watermarks when previewing watermarks
+ - Fix: Divide by zero errors in Text Editor component
+ - Fix: Incorrect MgCooker tile calculations
+ - Fix: Add missing "Left" and "Right" horizontal text alignment options
+ - Fix: Avoid XML content error in Layer Definition by preventing the ability to deleting style rule if there's only one
+ 
+ 6.0a3
+ =====
+ 
+ - Drag/Drop now properly handles cases where multiple handlers could handle a given file drop
  - Future-proofing
-	- Maestro can now work with unknown resource types
-	- Map Definitions, Web Layouts and Application Definitions of unknown schema versions can be previewed
-	- Files of unknown extensions will be loaded as XML content when drag/dropped in the Site Explorer
+    - Maestro can now work with unknown resource types
+    - Map Definitions, Web Layouts and Application Definitions of unknown schema versions can be previewed
+    - Files of unknown extensions will be loaded as XML content when drag/dropped in the Site Explorer
  - Fusion editor changes
     - Map Group editor re-designed to better reflect its logical structure in the Map Definition
-	- New Generic XML editor option allowing for custom layer types to be added
+    - New Generic XML editor option allowing for custom layer types to be added
 
 6.0a2
 -----
@@ -18,14 +37,14 @@
  - Added specialized builder support for LOOKUP() and RANGE() expression functions in Expression Editor
  - Added support for customizing border colors when theming
  - Improve the usability of the Composite Symbolization dialog
-	- Moved the inline Symbol Definition editor off to a separate dialog
-	- Symbol name now shown along side type for each component symbol in Symbolization Components list
-	- New button to show more information about a selected symbol parameter
-	- "Edit Instance Properties" button moved into Symbolization Components list toolbar
-	- Editing symbol parameter values can now be done via
-		- Editing the cell
-		- Using a specialized editor (that falls back to the Expression Editor if no specialized editor is found)
-		- Using the Expression Editor
+    - Moved the inline Symbol Definition editor off to a separate dialog
+    - Symbol name now shown along side type for each component symbol in Symbolization Components list
+    - New button to show more information about a selected symbol parameter
+    - "Edit Instance Properties" button moved into Symbolization Components list toolbar
+    - Editing symbol parameter values can now be done via
+        - Editing the cell
+        - Using a specialized editor (that falls back to the Expression Editor if no specialized editor is found)
+        - Using the Expression Editor
  - Fix: Negative index exception in grid-based editor when selecting row header
  - Fix: XML diff false positives
  - Fix: Wrong previews in Composite Symbolization dialog when multiple composite styles defined
@@ -198,9 +217,9 @@
 
 - New "address bar" for Resource IDs, allowing for quick navigation and identiifcation of Resource IDs.
 - Layer Definition editor improvements:
-	- Add support for "exploding" themes into individual filtered sub-layers.
-	- Theme generation now considers active layer filter when generating rules
-	- Use GETLEGENDIMAGE for layer style previews
+    - Add support for "exploding" themes into individual filtered sub-layers.
+    - Theme generation now considers active layer filter when generating rules
+    - Use GETLEGENDIMAGE for layer style previews
 - Symbol Definitions can now be previewed (via the GETLEGENDIMAGE API)
 - Resource IDs references in the Resource Properties Dialog can now be copied to the clipboard
 - New specialized error dialog for XML content errors, that shows the offending XML contnent.
@@ -271,8 +290,8 @@
  - MgCooker tiling classes now part of the MaestroAPI
  - Better handling of large Feature Sources
  - ODBC Editor enhancements
-	- Supports creating ODBC configuration documents with a filtered logical schema. When creating/resetting a configuration document, the user is prompted for the feature classes to include in the configuration document
-	- Supports specifying the coordinate system for the default spatial context
+    - Supports creating ODBC configuration documents with a filtered logical schema. When creating/resetting a configuration document, the user is prompted for the feature classes to include in the configuration document
+    - Supports specifying the coordinate system for the default spatial context
  - Fix: Maestro/MaestroAPI creates invalid ODBC configuration documents
  - Fix: Potentially long running tasks are now done on background threads with busy dialogs
  - Fix: Non-working expression buttons for some color pickers
@@ -571,9 +590,9 @@
     - Remaining missing functionality:
        - Add/Remove/Edit containers
        - Widget set configuration
-		  - Add new widget from WidgetInfo
-		  - Edit widget parameters
-		  - Remove widget from widget set
+          - Add new widget from WidgetInfo
+          - Edit widget parameters
+          - Remove widget from widget set
 
 Test Build 3
 ------------
@@ -599,8 +618,8 @@
  - Resource Dialog fixes and UX enhancements
  - Mono fixes related to XML and UI sizing.
  - Added inter-server migration tools
-	- Move/Copy resources to a folder on another server with option to overwrite existing resources
-	- Copy selected resource (and its dependencies) to the same path on another server, with choices of which dependent resources to copy and whether to overwrite existing resources.
+    - Move/Copy resources to a folder on another server with option to overwrite existing resources
+    - Copy selected resource (and its dependencies) to the same path on another server, with choices of which dependent resources to copy and whether to overwrite existing resources.
 
 Test Build 1
 ------------
@@ -608,44 +627,44 @@
 First public preview release of Maestro 3.0.
  
  - Redesigned User Interface
-	- Now driven by the SharpDevelop Core framework
-		- Allows for easy customization of user interfaces.
-		- AddIn infrastructure allows for easy addition of new functionality.	 
-	- Site Explorer now uses the TreeViewAdv control, allowing for multiple selections and commands that operate on multiple selected resources. This control is compatible with Mono.
-		- Some example commands which were previously not possible.
-			- Delete selected resources
-			- Validate selected resources
-			- Package selected resources
+    - Now driven by the SharpDevelop Core framework
+        - Allows for easy customization of user interfaces.
+        - AddIn infrastructure allows for easy addition of new functionality.	 
+    - Site Explorer now uses the TreeViewAdv control, allowing for multiple selections and commands that operate on multiple selected resources. This control is compatible with Mono.
+        - Some example commands which were previously not possible.
+            - Delete selected resources
+            - Validate selected resources
+            - Package selected resources
  - Rewritten resource editor infrastructure
-	- One editor per resource type / version
-	- Uses the INotifyPropertyChanged databinding infrastructure
-	- Allow for upgrades to newer versions of a resource type (eg. LayerDefinition 1.0.0 to LayerDefinition 1.3.0). Upgrades are manual and explicit, with a firefox-style notification bar to indicate whether a resource can be upgraded.
-	- Resources types and/or versions without a specialized editor default to the XML editor.
-	- Support for browsing Symbol Libraries
-	- Flexible new resource templates
-	- New specialized editors for
-		- Drawing Source
-		- Print Layout
-	- Enhancements to existing specialized editors
-		- Web Layout
-			- Support for importing/exporting custom commands.
-	- Editor library can be used outside of Maestro.exe as long as you implement the core service interfaces (IResourceService, IFeatureService)
+    - One editor per resource type / version
+    - Uses the INotifyPropertyChanged databinding infrastructure
+    - Allow for upgrades to newer versions of a resource type (eg. LayerDefinition 1.0.0 to LayerDefinition 1.3.0). Upgrades are manual and explicit, with a firefox-style notification bar to indicate whether a resource can be upgraded.
+    - Resources types and/or versions without a specialized editor default to the XML editor.
+    - Support for browsing Symbol Libraries
+    - Flexible new resource templates
+    - New specialized editors for
+        - Drawing Source
+        - Print Layout
+    - Enhancements to existing specialized editors
+        - Web Layout
+            - Support for importing/exporting custom commands.
+    - Editor library can be used outside of Maestro.exe as long as you implement the core service interfaces (IResourceService, IFeatureService)
  - Redesigned core API
-	- ServerConnectionI -> IServerConnection
-		- Connection interface is now separated into service specific sub-interfaces
-			- IResourceService
-			- IFeatureService
-			- etc.
-	- Cleaner resource object model
-		- All top-level resource classes implement a common IResource interface
-		- Base library includes resource classes generated from v1.0.0 xsd schemas.
-		- Classes generated from newer xsd schemas reside in their own separate assembly.
-	- New connections capabilities API
-		- Allows interrogation of supported features/commands depending on implementation and mapguide server version.
-	- Custom command API
-		- Allows for custom functionality which may only work for newer versions of MapGuide.
+    - ServerConnectionI -> IServerConnection
+        - Connection interface is now separated into service specific sub-interfaces
+            - IResourceService
+            - IFeatureService
+            - etc.
+    - Cleaner resource object model
+        - All top-level resource classes implement a common IResource interface
+        - Base library includes resource classes generated from v1.0.0 xsd schemas.
+        - Classes generated from newer xsd schemas reside in their own separate assembly.
+    - New connections capabilities API
+        - Allows interrogation of supported features/commands depending on implementation and mapguide server version.
+    - Custom command API
+        - Allows for custom functionality which may only work for newer versions of MapGuide.
  - Other New Features and Changes
-	- Load Procedure validation support
-	- API and UI support for listening to outbound requests. You can now view outbound requests of your MapGuide Server connections
-	- Validation no longer logs redundant messages. All errors, warnings and other messages are unique for each resource being validated. You won't get repeats
+    - Load Procedure validation support
+    - API and UI support for listening to outbound requests. You can now view outbound requests of your MapGuide Server connections
+    - Validation no longer logs redundant messages. All errors, warnings and other messages are unique for each resource being validated. You won't get repeats
  
\ No newline at end of file

Added: trunk/Tools/Maestro/Maestro/mono.txt
===================================================================
--- trunk/Tools/Maestro/Maestro/mono.txt	                        (rev 0)
+++ trunk/Tools/Maestro/Maestro/mono.txt	2015-01-28 15:25:38 UTC (rev 8524)
@@ -0,0 +1,25 @@
+Mono Gotchas
+============
+
+This document is a compilation of known gotchas when using Maestro within a Mono environment
+
+Suggestions for code-based workarounds or alternatives would be much appreciated.
+
+Notes are based on running the current Maestro trunk against Mono 3.12 on Ubuntu 14.04 (from Xamarin's repo)
+
+General
+=======
+
+ - Where possible, run the latest and greatest version of Mono.
+ - Maestro may randomly core dump on startup. Workaround is just to restart again.
+ - Editors may be "shrunk" when opened when Maestro is not fully maximized. Workaround is to resize the Maestro main window or maximize it.
+
+Layer Editor
+============
+
+ - Style rule previews do not render. Either Mono's DataGridView cannot support image-based cells or the Image property of our rule models do not bind properly to image-based cells
+
+Map Editor
+==========
+
+ - You cannot batch edit multiple groups and layers. Mono's PropertyGrid does not properly handle editing properties multiple selected objects
\ No newline at end of file

Modified: trunk/Tools/Maestro/Maestro.Editors/MapDefinition/MapLayersSectionCtrl.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.Editors/MapDefinition/MapLayersSectionCtrl.cs	2015-01-28 11:49:12 UTC (rev 8523)
+++ trunk/Tools/Maestro/Maestro.Editors/MapDefinition/MapLayersSectionCtrl.cs	2015-01-28 15:25:38 UTC (rev 8524)
@@ -158,6 +158,7 @@
                 if (mdf3 == null)
                 {
                     tabs.TabPages.Remove(TAB_TILE_SET);
+                    InitInlineModel();
                 }
                 else
                 {
@@ -285,10 +286,8 @@
             btnMoveLayerOrGroupDown.Enabled = true;
             btnConvertLayerGroupToBaseGroup.Enabled = true;
 
-            propertiesPanel.Controls.Clear();
-            var item = CreateGroupControl(group);
             _activeLayer = null;
-            propertiesPanel.Controls.Add(item);
+            AddGroupControl(group);
         }
 
         private class LocalizedDisplayNameAttribute : DisplayNameAttribute
@@ -459,15 +458,15 @@
 
         #endregion Designer Attributes
 
-        private Control CreateGroupControl(GroupItem group)
+        private void AddGroupControl(GroupItem group)
         {
+            propertiesPanel.Controls.Clear();
+
             Control ctrl = new Control();
 
             CommonPropertyCtrl commCtrl = new CommonPropertyCtrl();
             commCtrl.Dock = DockStyle.Fill;
 
-            commCtrl.SelectedObject = new GroupItemDesigner(group);
-
             var item = new GroupPropertiesCtrl(_map, group.Tag);
             //item.GroupChanged += (s, evt) => { OnResourceChanged(); };
             item.GroupChanged += WeakEventHandler.Wrap((s, evt) => OnResourceChanged(), (eh) => item.GroupChanged -= eh);
@@ -478,13 +477,17 @@
 
             ctrl.Dock = DockStyle.Fill;
 
-            return ctrl;
+            propertiesPanel.Controls.Add(ctrl);
+
+            commCtrl.SelectedObject = new GroupItemDesigner(group);
         }
 
         #region Control Factories
 
-        private Control CreateMultiControl(System.Collections.ObjectModel.ReadOnlyCollection<TreeNodeAdv> nodes)
+        private void AddMultiControl(System.Collections.ObjectModel.ReadOnlyCollection<TreeNodeAdv> nodes)
         {
+            propertiesPanel.Controls.Clear();
+
             CommonPropertyCtrl commCtrl = new CommonPropertyCtrl();
             commCtrl.Dock = DockStyle.Fill;
 
@@ -513,19 +516,20 @@
                 }
             }
 
+            propertiesPanel.Controls.Add(commCtrl);
+
             commCtrl.SelectedObjects = values.ToArray();
-            return commCtrl;
         }
 
-        private Control CreateBaseGroupControl(BaseLayerGroupItem group)
+        private void AddBaseGroupControl(BaseLayerGroupItem group)
         {
+            propertiesPanel.Controls.Clear();
+
             Control ctrl = new Control();
 
             CommonPropertyCtrl commCtrl = new CommonPropertyCtrl();
             commCtrl.Dock = DockStyle.Fill;
 
-            commCtrl.SelectedObject = new BaseGroupItemDesigner(group);
-
             var item = new GroupPropertiesCtrl(_map, group.Tag);
             //item.GroupChanged += (s, evt) => { OnResourceChanged(); };
             item.GroupChanged += WeakEventHandler.Wrap((s, evt) => OnResourceChanged(), (eh) => item.GroupChanged -= eh);
@@ -536,18 +540,20 @@
 
             ctrl.Dock = DockStyle.Fill;
 
-            return ctrl;
+            propertiesPanel.Controls.Add(ctrl);
+
+            commCtrl.SelectedObject = new BaseGroupItemDesigner(group);
         }
 
-        private Control CreateBaseLayerControl(BaseLayerItem layer)
+        private void AddBaseLayerControl(BaseLayerItem layer)
         {
+            propertiesPanel.Controls.Clear();
+
             Control ctrl = new Control();
 
             CommonPropertyCtrl commCtrl = new CommonPropertyCtrl();
             commCtrl.Dock = DockStyle.Fill;
 
-            commCtrl.SelectedObject = new BaseLayerItemDesigner(layer);
-
             var item = new LayerPropertiesCtrl(layer.Tag, _edSvc);
             //item.LayerChanged += (s, evt) => { OnResourceChanged(); };
             item.LayerChanged += WeakEventHandler.Wrap((s, evt) => OnResourceChanged(), (eh) => item.LayerChanged -= eh);
@@ -558,18 +564,20 @@
 
             ctrl.Dock = DockStyle.Fill;
 
-            return ctrl;
+            propertiesPanel.Controls.Add(ctrl);
+
+            commCtrl.SelectedObject = new BaseLayerItemDesigner(layer);
         }
 
-        private Control CreateLayerControl(LayerItem layer)
+        private void AddLayerControl(LayerItem layer)
         {
+            propertiesPanel.Controls.Clear();
+
             Control ctrl = new Control();
 
             CommonPropertyCtrl commCtrl = new CommonPropertyCtrl();
             commCtrl.Dock = DockStyle.Fill;
 
-            commCtrl.SelectedObject = new LayerItemDesigner(layer);
-
             var item = new LayerPropertiesCtrl(layer.Tag, _edSvc);
             //item.LayerChanged += (s, evt) => { OnResourceChanged(); };
             item.LayerChanged += WeakEventHandler.Wrap((s, evt) => OnResourceChanged(), (eh) => item.LayerChanged -= eh);
@@ -580,7 +588,9 @@
 
             ctrl.Dock = DockStyle.Fill;
 
-            return ctrl;
+            propertiesPanel.Controls.Add(ctrl);
+            
+            commCtrl.SelectedObject = new LayerItemDesigner(layer);
         }
 
         #endregion Control Factories
@@ -593,11 +603,8 @@
             btnMoveLayerOrGroupUp.Enabled = true;   //TODO: Disable if layer is top of its group
             btnMoveLayerOrGroupDown.Enabled = true; //TODO: Disable if layer is bottom of its group
 
-            propertiesPanel.Controls.Clear();
-
-            var item = CreateLayerControl(layer);
             _activeLayer = layer.Tag;
-            propertiesPanel.Controls.Add(item);
+            AddLayerControl(layer);
         }
 
         private static bool AllLayers(System.Collections.ObjectModel.ReadOnlyCollection<TreeNodeAdv> nodes)
@@ -671,11 +678,8 @@
             btnRemoveBaseLayerGroup.Enabled = bAllBaseGroups;
             btnBaseLayerGroupToRegular.Enabled = bAllBaseGroups;
 
-            propertiesPanel.Controls.Clear();
-
-            var item = CreateMultiControl(nodes);
+            AddMultiControl(nodes);
             _activeLayer = null;
-            propertiesPanel.Controls.Add(item);
         }
 
         private IMapLayer _activeLayer;
@@ -688,11 +692,8 @@
             btnDLMoveLayerUp.Enabled =
             btnDLRemoveLayer.Enabled = true;
 
-            propertiesPanel.Controls.Clear();
-
-            var item = CreateLayerControl(layer);
             _activeLayer = layer.Tag;
-            propertiesPanel.Controls.Add(item);
+            AddLayerControl(layer);
         }
 
         private void btnAddGroup_Click(object sender, EventArgs e)
@@ -1469,9 +1470,8 @@
             //var item = new GroupPropertiesCtrl(_map, group.Tag);
             //item.GroupChanged += (s, evt) => { OnResourceChanged(); };
             //item.Dock = DockStyle.Fill;
-            var item = CreateBaseGroupControl(group);
             _activeLayer = null;
-            propertiesPanel.Controls.Add(item);
+            AddBaseGroupControl(group);
         }
 
         private void OnBaseLayerItemSelected(BaseLayerItem layer)
@@ -1481,13 +1481,11 @@
             btnMoveBaseLayerUp.Enabled = true;
             btnBaseLayerGroupToRegular.Enabled = false;
 
-            propertiesPanel.Controls.Clear();
             //var item = new LayerPropertiesCtrl(layer.Tag, _edSvc.ResourceService, _edSvc);
             //item.LayerChanged += (s, evt) => { OnResourceChanged(); };
             //item.Dock = DockStyle.Fill;
-            var item = CreateBaseLayerControl(layer);
             _activeLayer = null;
-            propertiesPanel.Controls.Add(item);
+            AddBaseLayerControl(layer);
         }
 
         private void trvBaseLayers_MouseDoubleClick(object sender, MouseEventArgs e)

Modified: trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/Utility.cs
===================================================================
--- trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/Utility.cs	2015-01-28 11:49:12 UTC (rev 8523)
+++ trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/Utility.cs	2015-01-28 15:25:38 UTC (rev 8524)
@@ -346,11 +346,14 @@
                 //    throw new InvalidOperationException("Could not rewind the source stream. Most likely the source stream does not support seeking or rewinding"); //LOCALIZEME
             }
 
+            source.CopyTo(target);
+            /*
             do
             {
                 r = source.Read(buf, 0, buf.Length);
                 target.Write(buf, 0, r);
             } while (r > 0);
+             */
         }
 
         /// <summary>



More information about the mapguide-commits mailing list