Conversation
|
@imranakram, Please review my thoughts and let me know if this is implemented well or if it should be done more efficiently! |
There was a problem hiding this comment.
🟡 Changes recommended
Project apply/open currently has watcher lifecycle/config issues (not disposing existing watchers and leaving package config active) and AddPluginAssembly ignores its path parameter, which can lead to incorrect behavior.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Adds a new “Project” concept to AutoDeployer to persist and reopen the current set of watched artifacts across sessions (assemblies and plugin packages; web resources explicitly not supported yet), integrating it into the main toolbar UI.
Changes:
- Introduces
Project/WatchFileXML-serializable model and adds Open/Save project actions (*.adproj). - Updates the main UI (ToolStrip) with a new Project dropdown and supporting icons/resources.
- Extends plugin package watcher display data (
PluginPackageName) and includes some small safety/readability tweaks.
File summaries
| File | Description |
|---|---|
| XrmToolBox.AutoDeployer/XrmToolBox.AutoDeployer.csproj | Includes new Project.cs and additional icon resources in the project. |
| XrmToolBox.AutoDeployer/WatchPluginPackageFile.cs | Exposes plugin package name for persistence/display; minor guard/bracing changes. |
| XrmToolBox.AutoDeployer/Properties/Resources.resx | Adds new bitmap resources (folder/disk/package icons) for the UI. |
| XrmToolBox.AutoDeployer/Properties/Resources.Designer.cs | Adds strongly-typed accessors for the new resources. |
| XrmToolBox.AutoDeployer/Project.cs | Adds the new Project/WatchFile model and enum for serialization. |
| XrmToolBox.AutoDeployer/MainControl.Designer.cs | Adds Project UI controls (Open/Save) and updates ToolStrip layout/tooltips. |
| XrmToolBox.AutoDeployer/MainControl.cs | Implements project open/save, project application to watchers, and package config updates. |
Review details
Files not reviewed (2)
- XrmToolBox.AutoDeployer/MainControl.Designer.cs: Generated file
- XrmToolBox.AutoDeployer/Properties/Resources.Designer.cs: Generated file
- Files reviewed: 5/10 changed files
- Comments generated: 4
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| private void AddPluginAssembly(string path) | ||
| { | ||
| if (ofdPlugin.ShowDialog() == DialogResult.OK) | ||
| var plugin = new WatchPluginFile(ofdPlugin.FileName, Service, this); | ||
| plugin.Changed += Plugin_Changed; | ||
| listWatching.Items.Add(plugin.ListItem); |
| listWatching.Items.Clear(); | ||
| //ClearWebResourceWatchers(); | ||
| ClearPluginPackageWatchers(); | ||
| } |
| this.bSave.Name = "bSave"; | ||
| this.bSave.Size = new System.Drawing.Size(68, 28); | ||
| this.bSave.Text = "Save..."; | ||
| this.bSave.ToolTipText = "Save list of watched files to can get opened for next time."; |
| public enum Type | ||
| { | ||
| PluginAssembly, | ||
| PluginPackage, | ||
| WebResource |
Used to store all current watching files, to easily be able to open the same list of plugins/packages, but not webresources yet, please fulfill it for us :)
Solves #18