Skip to content

Change attribute value bulk update#4226

Merged
Maheshkale447 merged 15 commits into
masterfrom
Feature/BulkPublishItem
Jun 16, 2025
Merged

Change attribute value bulk update#4226
Maheshkale447 merged 15 commits into
masterfrom
Feature/BulkPublishItem

Conversation

@GokulBothe99

@GokulBothe99 GokulBothe99 commented Jun 3, 2025

Copy link
Copy Markdown
Contributor

Thank you for your contribution.
Before submitting this PR, please make sure:

  • PR description and commit message should describe the changes done in this PR
  • Verify the PR is pointing to correct branch i.e. Release or Beta branch if the code fix is for specific release , else point it to master
  • Latest Code from master or specific release branch is merged to your branch
  • No unwanted\commented\junk code is included
  • No new warning upon build solution
  • Code Summary\Comments are added to my code which explains what my code is doing
  • Existing unit test cases are passed
  • New Unit tests are added for your development
  • Sanity Tests are successfully executed for New and Existing Functionality
  • Verify that changes are compatible with all relevant browsers and platforms.
  • After creating pull request there should not be any conflicts
  • Resolve all Codacy comments
  • Builds and checks are passed before PR is sent for review
  • Resolve code review comments
  • Update the Help Library document to match any feature changes

Summary by CodeRabbit

  • New Features

    • Introduced a new "Replace Attribute" mode in the Find and Replace tool, enabling attribute-specific search and bulk updates with tailored editing controls.
    • Added "Find And Replace" option to folder context menus for attribute value updates across multiple items.
    • Enabled editing of attributes like "Active", "Description", "Status", and others directly within the Find and Replace interface.
  • Improvements

    • Redesigned Find and Replace page layout to support dual-mode operation and enhanced attribute editing capabilities.
    • Added support for combo box, checkbox, and text box controls for attribute value editing.
    • Enhanced status tracking and feedback during bulk update and save operations.
  • Bug Fixes

    • Improved error handling and logging throughout the Find and Replace functionality.
  • Chores

    • Added metadata attributes to various properties to enable user editing.
    • Cleaned up whitespace and formatting in multiple source files.
    • Refactored Find and Replace page instantiation to always create new instances for consistent behavior.

@coderabbitai

coderabbitai Bot commented Jun 3, 2025

Copy link
Copy Markdown
Contributor

Walkthrough

This change expands the Find and Replace functionality by adding a new "Replace Attribute" mode that enables bulk editing of specific attributes across multiple items. It introduces new UI elements, attribute metadata annotations, enhanced backend logic for attribute discovery and replacement, and integrates attribute update options into folder context menus and tree view items.

Changes

File(s) Change Summary
Ginger/Ginger/Functionalities/FindAndReplacePage.xaml, Ginger/Ginger/Functionalities/FindAndReplacePage.xaml.cs Expanded UI and logic to support dual-mode Find and Replace with a new "Replace Attribute" mode, including new controls, attribute editing grid views, event handlers, and folder-based bulk attribute update support.
Ginger/GingerCoreCommon/Functionalities/FindAndReplaceUtils.cs Added methods to find editable attribute names, retrieve serializable editable member names, and enhanced attribute replacement logic supporting multiple data types.
Ginger/GingerCoreCommon/Functionalities/FoundItem.cs Updated status enum values, added properties for attribute field name, value, type, and modification tracking with change notifications.
Ginger/GingerCoreCommon/Repository/RepositoryItemAttributes.cs Introduced new AllowUserToEdit attribute to mark properties as user-editable for attribute-level editing.
Ginger/GingerCoreCommon/Repository/BusinessFlowLib/BusinessFlow.cs, Activity.cs, ActivitiesGroup.cs, Environments/ProjEnvironment.cs, RunLib/Agent.cs, Run/RunSetConfig.cs, RepositoryItemBase.cs, VariablesLib/VariableBase.cs Added [AllowUserToEdit] attributes to various properties to enable their editing in the new attribute replacement mode.
Ginger/GingerCoreCommon/Dictionaries/GingerDicser.cs Added new enum members Agents and Environment to eTermResKey.
Ginger/GingerCore/GeneralLib/General.cs Removed trailing whitespace and blank lines; no functional changes.
Ginger/Ginger/SolutionWindows/TreeViewItems/BusinessFlowsFolderTreeItem.cs, NewTreeViewItemBase.cs, TreeViewItemBase.cs Enabled attribute update option in folder context menus and implemented/overrode UpdateItemAttributeValue() methods to launch attribute editing UI from tree nodes.
Ginger/Ginger/UserControlsLib/UCTreeView/TreeViewItemGenericBase.cs Added allowAttributeUpdate parameter to folder menu setup, introduced abstract and routed event handler methods for attribute updates, and integrated "Find And Replace" menu item for attribute editing.
Ginger/Ginger/MainWindow.xaml, Ginger/Ginger/MainWindow.xaml.cs Minor whitespace and indentation cleanup only; no functional changes.
Ginger/Ginger/AutomatePageLib/NewAutomatePage.xaml.cs, Ginger/Ginger/RunSetPageLib/NewRunSetPage.xaml.cs Removed cached FindAndReplacePage instances and instantiate new pages on each invocation for fresh state.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant UI as FindAndReplacePage UI
    participant Logic as FindAndReplacePage Logic
    participant Utils as FindAndReplaceUtils
    participant Repo as RepositoryItemBase

    User->>UI: Select "Replace Attribute" mode
    UI->>Logic: Handle attribute mode toggle
    Logic->>UI: Show attribute selection panels
    User->>UI: Select main item type and attribute name
    UI->>Logic: Populate attribute ComboBox with GetSerializableEditableMemberNames()
    User->>UI: Click "Find"
    UI->>Logic: Invoke FindItemsAsync_item()
    Logic->>Utils: Call FindTopLevelAttributeNames()
    Utils->>Logic: Return list of FoundItems
    Logic->>UI: Display FoundItems in attribute editing grid
    User->>UI: Edit attribute values in grid
    User->>UI: Click "Replace Selected"
    UI->>Logic: xUpdateAttributeValueBtn_Click()
    Logic->>Utils: For each modified item, call ReplaceItemEnhanced()
    Utils->>Repo: Update property value on RepositoryItemBase
    Repo-->>Utils: Confirm update
    Utils-->>Logic: Return success/failure per item
    Logic->>UI: Update grid and status display
Loading

Suggested reviewers

  • Maheshkale447

Poem

A rabbit hopped through fields of code,
To find and change what once abode.
Now attributes can swiftly switch,
With menus, grids, and one-click glitch!
From folders deep to fields anew,
The bunny cheers, "Bulk edit—woohoo!"
🐇✨

✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate Unit Tests
  • Create PR with Unit Tests
  • Commit Unit Tests in branch Feature/BulkPublishItem
  • Post Copyable Unit Tests in Comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai auto-generate unit tests to generate unit tests for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai or @coderabbitai title anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 19

♻️ Duplicate comments (1)
Ginger/GingerCoreCommon/Functionalities/FindAndReplaceUtils.cs (1)

177-180: ⚠️ Potential issue

Add exception logging for debugging.

Similar to the other method, this catch block should log exceptions to help with debugging reflection issues.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 401eb1f and adffa43.

📒 Files selected for processing (15)
  • Ginger/Ginger/Functionalities/FindAndReplacePage.xaml (2 hunks)
  • Ginger/Ginger/Functionalities/FindAndReplacePage.xaml.cs (6 hunks)
  • Ginger/Ginger/MainWindow.xaml (1 hunks)
  • Ginger/Ginger/MainWindow.xaml.cs (3 hunks)
  • Ginger/GingerCoreCommon/Functionalities/FindAndReplaceUtils.cs (2 hunks)
  • Ginger/GingerCoreCommon/Functionalities/FoundItem.cs (2 hunks)
  • Ginger/GingerCoreCommon/Repository/BusinessFlowLib/ActivitiesGroup.cs (1 hunks)
  • Ginger/GingerCoreCommon/Repository/BusinessFlowLib/Activity.cs (5 hunks)
  • Ginger/GingerCoreCommon/Repository/BusinessFlowLib/BusinessFlow.cs (4 hunks)
  • Ginger/GingerCoreCommon/Repository/Environments/ProjEnvironment.cs (1 hunks)
  • Ginger/GingerCoreCommon/Repository/RepositoryItemAttributes.cs (1 hunks)
  • Ginger/GingerCoreCommon/Repository/RepositoryItemBase.cs (1 hunks)
  • Ginger/GingerCoreCommon/Run/RunSetConfig.cs (5 hunks)
  • Ginger/GingerCoreCommon/RunLib/Agent.cs (7 hunks)
  • Ginger/GingerCoreCommon/VariablesLib/VariableBase.cs (4 hunks)
🧰 Additional context used
🧬 Code Graph Analysis (9)
Ginger/GingerCoreCommon/Repository/Environments/ProjEnvironment.cs (1)
Ginger/GingerCoreCommon/Repository/RepositoryItemAttributes.cs (4)
  • AllowUserToEdit (66-102)
  • AllowUserToEdit (70-73)
  • AllowUserToEdit (79-82)
  • AllowUserToEdit (88-91)
Ginger/GingerCoreCommon/Repository/BusinessFlowLib/ActivitiesGroup.cs (1)
Ginger/GingerCoreCommon/Repository/RepositoryItemAttributes.cs (4)
  • AllowUserToEdit (66-102)
  • AllowUserToEdit (70-73)
  • AllowUserToEdit (79-82)
  • AllowUserToEdit (88-91)
Ginger/GingerCoreCommon/Repository/RepositoryItemBase.cs (1)
Ginger/GingerCoreCommon/Repository/RepositoryItemAttributes.cs (4)
  • AllowUserToEdit (66-102)
  • AllowUserToEdit (70-73)
  • AllowUserToEdit (79-82)
  • AllowUserToEdit (88-91)
Ginger/GingerCoreCommon/VariablesLib/VariableBase.cs (1)
Ginger/GingerCoreCommon/Repository/RepositoryItemAttributes.cs (4)
  • AllowUserToEdit (66-102)
  • AllowUserToEdit (70-73)
  • AllowUserToEdit (79-82)
  • AllowUserToEdit (88-91)
Ginger/GingerCoreCommon/Repository/BusinessFlowLib/BusinessFlow.cs (1)
Ginger/GingerCoreCommon/Repository/RepositoryItemAttributes.cs (4)
  • AllowUserToEdit (66-102)
  • AllowUserToEdit (70-73)
  • AllowUserToEdit (79-82)
  • AllowUserToEdit (88-91)
Ginger/GingerCoreCommon/Repository/BusinessFlowLib/Activity.cs (1)
Ginger/GingerCoreCommon/Repository/RepositoryItemAttributes.cs (4)
  • AllowUserToEdit (66-102)
  • AllowUserToEdit (70-73)
  • AllowUserToEdit (79-82)
  • AllowUserToEdit (88-91)
Ginger/GingerCoreCommon/Run/RunSetConfig.cs (1)
Ginger/GingerCoreCommon/Repository/RepositoryItemAttributes.cs (4)
  • AllowUserToEdit (66-102)
  • AllowUserToEdit (70-73)
  • AllowUserToEdit (79-82)
  • AllowUserToEdit (88-91)
Ginger/GingerCoreCommon/RunLib/Agent.cs (1)
Ginger/GingerCoreCommon/Repository/RepositoryItemAttributes.cs (4)
  • AllowUserToEdit (66-102)
  • AllowUserToEdit (70-73)
  • AllowUserToEdit (79-82)
  • AllowUserToEdit (88-91)
Ginger/GingerCoreCommon/Functionalities/FindAndReplaceUtils.cs (3)
Ginger/GingerCoreCommon/Repository/RepositoryItemBase.cs (7)
  • RepositoryItemBase (58-1570)
  • RepositoryItemBase (721-798)
  • RepositoryItemBase (835-866)
  • RepositoryItemBase (875-886)
  • RepositoryItemBase (1394-1404)
  • RepositoryItemBase (1440-1443)
  • ToString (154-157)
Ginger/GingerCoreCommon/Functionalities/FoundItem.cs (1)
  • FoundItem (27-161)
Ginger/GingerCoreCommon/Repository/RepositoryItemAttributes.cs (10)
  • IsSerializedForLocalRepositoryAttribute (28-64)
  • IsSerializedForLocalRepositoryAttribute (32-35)
  • IsSerializedForLocalRepositoryAttribute (41-44)
  • IsSerializedForLocalRepositoryAttribute (50-53)
  • AllowUserToEdit (66-102)
  • AllowUserToEdit (70-73)
  • AllowUserToEdit (79-82)
  • AllowUserToEdit (88-91)
  • ToString (55-58)
  • ToString (93-96)
🔇 Additional comments (17)
Ginger/Ginger/MainWindow.xaml.cs (1)

938-938: LGTM - Good code hygiene!

The whitespace cleanup improves code quality without affecting functionality. These formatting improvements are appreciated.

Also applies to: 985-985, 1030-1030

Ginger/GingerCoreCommon/Functionalities/FoundItem.cs (2)

19-19: LGTM - Clean addition.

The using System; directive is properly added to support the new Type usage.


102-102: LGTM - Well-designed property addition.

The FieldType property is cleanly implemented and will enable type-aware operations in the enhanced find-and-replace functionality. The property follows good naming conventions and fits well with the existing class structure.

Ginger/Ginger/MainWindow.xaml (1)

200-200: Minor formatting adjustment looks good.

The indentation change is harmless and doesn't affect functionality. This appears to be a minor cleanup as part of the broader find and replace enhancement.

Ginger/GingerCoreCommon/Repository/Environments/ProjEnvironment.cs (1)

74-74: Good addition of user-editable metadata.

Adding the [AllowUserToEdit] attribute to the Active property is consistent with the broader initiative to mark properties as user-editable for the new bulk update functionality. The placement is correct and follows the established pattern.

Ginger/GingerCoreCommon/Repository/BusinessFlowLib/ActivitiesGroup.cs (1)

78-78: Appropriate addition of user-editable attribute.

Adding the [AllowUserToEdit] attribute to the Description property is well-placed and consistent with the broader pattern of marking properties as user-editable. The Description field is a logical candidate for bulk editing functionality.

Ginger/GingerCoreCommon/Repository/BusinessFlowLib/BusinessFlow.cs (4)

236-237: LGTM! Appropriate property for user editing.

The [AllowUserToEdit] attribute is correctly added to the Description property, making it available for the new find-and-replace attribute editing functionality. This is a logical choice as description fields are commonly edited by users.


311-324: LGTM! Status property appropriately marked for user editing.

Adding the [AllowUserToEdit] attribute to the Status property is correct and logical. Business flow status is a key property that users need to manage as flows progress through their lifecycle stages.


327-340: LGTM! Active property correctly configured for user editing.

The [AllowUserToEdit] attribute addition to the Active property is appropriate. This boolean property controls whether the business flow is enabled, which is a fundamental setting users need to modify. The attribute works well alongside the existing DefaultValue: true configuration.


343-356: LGTM! Mandatory property appropriately configured.

Adding the [AllowUserToEdit] attribute to the Mandatory property is correct. This boolean property determines whether the business flow is required for execution, which is an important configuration option that users should be able to modify through the find-and-replace interface.

Ginger/GingerCoreCommon/Repository/BusinessFlowLib/Activity.cs (1)

228-228: LGTM! Consistent attribute addition for user-editable properties.

The addition of [AllowUserToEdit] attributes to the Active, Mandatory, Description, AutomationStatus, and ActionRunOption properties is consistent with the broader enhancement to enable user-editable property metadata. These properties are appropriately marked as user-editable since they represent user-configurable aspects of activities.

Also applies to: 269-269, 285-285, 386-386, 402-402

Ginger/GingerCoreCommon/Run/RunSetConfig.cs (1)

78-78: LGTM! Appropriate properties marked as user-editable.

The addition of [AllowUserToEdit] attributes to the Description, RunDescription, RunModeParallel, StopRunnersOnFailure, and RunWithAnalyzer properties is well-aligned with the feature enhancement. These properties represent user-configurable run set settings that would benefit from the new find-and-replace attribute value functionality.

Also applies to: 176-176, 319-319, 338-338, 357-357

Ginger/Ginger/Functionalities/FindAndReplacePage.xaml (4)

10-10: Appropriate width increase for enhanced UI.

The page width increase from 800 to 1000 pixels accommodates the new dual-mode interface and additional controls for the attribute value replacement functionality.


26-35: Good grid restructuring for new layout requirements.

The grid row definitions have been appropriately updated to accommodate the new radio button panel and attribute editing controls while maintaining proper spacing and sizing for the enhanced interface.


37-41: Well-designed operation mode selection.

The radio button panel provides clear user choice between "Find And Replace" and "Change Attribute Value" modes. The consistent styling and event handling setup supports the dual-mode functionality effectively.


86-112: Excellent progressive disclosure design for attribute editing.

The new panels for attribute editing are properly designed with:

  • Consistent styling using established style resources
  • Appropriate visibility management (initially hidden)
  • Logical flow from item selection to attribute selection to value editing
  • Support for different value input types (text, combo, checkbox)

The error message panel provides good user feedback capability.

Ginger/GingerCoreCommon/RunLib/Agent.cs (1)

52-52: LGTM! Comprehensive coverage of user-configurable agent properties.

The addition of [AllowUserToEdit] attributes to agent properties (AgentType, Active, DriverType, Notes, Platform, Healenium, HealeniumURL) provides comprehensive coverage of user-configurable agent settings. These properties appropriately represent aspects that users would want to bulk update through the new attribute value replacement functionality.

Also applies to: 119-119, 190-190, 231-231, 289-289, 640-640, 662-662

Comment thread Ginger/GingerCoreCommon/Repository/RepositoryItemAttributes.cs
Comment thread Ginger/GingerCoreCommon/Repository/RepositoryItemBase.cs
Comment thread Ginger/GingerCoreCommon/VariablesLib/VariableBase.cs
Comment thread Ginger/GingerCoreCommon/VariablesLib/VariableBase.cs Outdated
Comment thread Ginger/GingerCoreCommon/VariablesLib/VariableBase.cs
Comment thread Ginger/Ginger/Functionalities/FindAndReplacePage.xaml.cs Outdated
Comment thread Ginger/Ginger/Functionalities/FindAndReplacePage.xaml.cs
Comment thread Ginger/Ginger/Functionalities/FindAndReplacePage.xaml.cs Outdated
Comment thread Ginger/Ginger/Functionalities/FindAndReplacePage.xaml.cs Outdated
Comment thread Ginger/Ginger/Functionalities/FindAndReplacePage.xaml.cs Outdated

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

♻️ Duplicate comments (8)
Ginger/Ginger/Functionalities/FindAndReplacePage.xaml.cs (8)

1397-1400: Improve error message specificity.


1412-1412: Remove unnecessary empty lines.


1431-1438: Remove or implement the empty event handler.


1515-1537: Rename enum to better reflect its purpose.


1541-1660: Refactor to reduce code duplication and improve maintainability.


1604-1604: Remove unnecessary empty lines.


1751-1751: Remove or use the unused variable.


1903-1943: Move EnumHelper to a separate utility file.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between adffa43 and 39c48d4.

📒 Files selected for processing (4)
  • Ginger/Ginger/Functionalities/FindAndReplacePage.xaml (2 hunks)
  • Ginger/Ginger/Functionalities/FindAndReplacePage.xaml.cs (6 hunks)
  • Ginger/GingerCoreCommon/Repository/BusinessFlowLib/Activity.cs (3 hunks)
  • Ginger/GingerCoreCommon/RunLib/Agent.cs (2 hunks)
🧰 Additional context used
🧬 Code Graph Analysis (2)
Ginger/GingerCoreCommon/RunLib/Agent.cs (1)
Ginger/GingerCoreCommon/Repository/RepositoryItemAttributes.cs (4)
  • AllowUserToEdit (66-102)
  • AllowUserToEdit (70-73)
  • AllowUserToEdit (79-82)
  • AllowUserToEdit (88-91)
Ginger/GingerCoreCommon/Repository/BusinessFlowLib/Activity.cs (1)
Ginger/GingerCoreCommon/Repository/RepositoryItemAttributes.cs (4)
  • AllowUserToEdit (66-102)
  • AllowUserToEdit (70-73)
  • AllowUserToEdit (79-82)
  • AllowUserToEdit (88-91)
🔇 Additional comments (11)
Ginger/GingerCoreCommon/RunLib/Agent.cs (1)

118-118: LGTM! Clean metadata enhancement for user-editable properties.

The addition of [AllowUserToEdit] attributes to the Active and Notes properties is well-aligned with the new find-and-replace functionality. These annotations properly mark user-editable fields without modifying the existing property logic or behavior.

Also applies to: 229-229

Ginger/GingerCoreCommon/Repository/BusinessFlowLib/Activity.cs (1)

228-228: LGTM! Consistent attribute enhancement following the established pattern.

The [AllowUserToEdit] attributes added to Active, Mandatory, and Description properties are consistent with the broader codebase enhancement. These metadata additions properly integrate with the new attribute-level find-and-replace functionality without affecting existing property behavior.

Also applies to: 269-269, 285-285

Ginger/Ginger/Functionalities/FindAndReplacePage.xaml (5)

10-10: Appropriate width adjustment for enhanced functionality.

The width increase from 800 to 1000 pixels is reasonable to accommodate the new dual-mode interface and additional controls.


27-27: Well-designed dual-mode interface addition.

The new top row with radio buttons provides a clean way to toggle between "Find And Replace" and "Change Attribute Value" modes. The row structure properly accommodates the new functionality.

Also applies to: 37-41


43-48: Correct grid row adjustments for existing panels.

All existing panels have been properly shifted down by one row to accommodate the new top panel. The Grid.Row values are correctly updated and maintain the logical flow of the interface.

Also applies to: 50-54, 57-60, 62-66, 68-71


87-113: Well-structured attribute selection controls.

The new panels for attribute selection and value editing are logically organized:

  • Item selection with proper ComboBox setup
  • Attribute name selection with appropriate event handlers
  • Multi-type attribute value controls (TextBox, ComboBox, CheckBox) for different data types
  • Error message display panel
  • Update button panel with processing indicator

The initial Visibility="Collapsed" state ensures these controls don't interfere with the existing find-and-replace functionality.


117-117: Correct positioning of Find Results grid.

The Find Results grid has been properly moved to Grid.Row="7" to account for the new UI structure above it.

Ginger/Ginger/Functionalities/FindAndReplacePage.xaml.cs (4)

31-32: LGTM! Required imports for new functionality.

The imports for GingerCore.Activities and GingerCore.Environments are necessary for the new attribute value change functionality.


85-91: Good initialization of UI state.

Setting the default mode to Find/Replace and populating the combo box with enum descriptions is appropriate. The UI state management is clear.


126-187: Well-structured grid view configuration with proper error handling.

The implementation correctly sets up three different grid views (default Replace view, Find view, and the new ReplaceAttributeValueView) with appropriate column visibility settings. The error handling ensures graceful degradation if setup fails.


236-262: Smart selection logic based on active mode.

The method correctly handles item selection differently for Find/Replace mode (using visible items) versus Attribute Value mode (using all items). This distinction makes sense as filtering may differ between modes.

Comment thread Ginger/Ginger/Functionalities/FindAndReplacePage.xaml.cs Outdated
Comment thread Ginger/Ginger/Functionalities/FindAndReplacePage.xaml.cs Outdated
Comment thread Ginger/Ginger/Functionalities/FindAndReplacePage.xaml.cs Outdated
coderabbitai[bot]
coderabbitai Bot previously approved these changes Jun 5, 2025

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

♻️ Duplicate comments (3)
Ginger/GingerCoreCommon/Repository/RepositoryItemAttributes.cs (2)

98-101: Method name still contains typo.

The method name GetDefualtValue() contains a typo and should be GetDefaultValue(). This was identified in previous reviews but appears to still be present.

Apply this fix:

-        public object GetDefualtValue()
+        public object GetDefaultValue()

66-102: Review XML documentation for accuracy.

The XML documentation comments (lines 76-77, 85-86) still reference "save to the xml" which appears to be copied from IsSerializedForLocalRepositoryAttribute. Consider updating the documentation to accurately reflect this attribute's purpose for marking user-editable properties.

Ginger/Ginger/Functionalities/FindAndReplacePage.xaml.cs (1)

1512-1534: Consider renaming enum to better reflect its purpose.

The enum name eBulkPublishItemsList doesn't accurately represent its use for the "Change Attribute Value" functionality.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 39c48d4 and f4ed29e.

📒 Files selected for processing (7)
  • Ginger/Ginger/Functionalities/FindAndReplacePage.xaml (2 hunks)
  • Ginger/Ginger/Functionalities/FindAndReplacePage.xaml.cs (10 hunks)
  • Ginger/GingerCore/GeneralLib/General.cs (3 hunks)
  • Ginger/GingerCoreCommon/Functionalities/FindAndReplaceUtils.cs (2 hunks)
  • Ginger/GingerCoreCommon/Functionalities/FoundItem.cs (3 hunks)
  • Ginger/GingerCoreCommon/Repository/RepositoryItemAttributes.cs (1 hunks)
  • Ginger/GingerCoreCommon/VariablesLib/VariableBase.cs (4 hunks)
🧰 Additional context used
🧬 Code Graph Analysis (1)
Ginger/GingerCoreCommon/VariablesLib/VariableBase.cs (1)
Ginger/GingerCoreCommon/Repository/RepositoryItemAttributes.cs (4)
  • AllowUserToEdit (66-102)
  • AllowUserToEdit (70-73)
  • AllowUserToEdit (79-82)
  • AllowUserToEdit (88-91)
🔇 Additional comments (16)
Ginger/GingerCoreCommon/Functionalities/FoundItem.cs (3)

19-19: LGTM: System namespace import added appropriately.

The using System; directive is correctly added to support the new Type property.


101-101: LGTM: FieldType property supports enhanced functionality.

The new FieldType property appropriately supports the type-aware editing functionality mentioned in the AI summary, enabling UI controls to behave differently based on data types.


30-37:

Details

✅ Verification successful

Verify enum status changes don't break existing functionality.

The enum simplification looks good - consolidating ReplaceFailed and SavedFailed into a single Failed status improves clarity. However, ensure all existing code using the removed enum values has been updated.


🏁 Script executed:

#!/bin/bash
# Description: Verify no remaining references to old enum values
# Test: Search for old enum values. Expect: No occurrences of removed values.

echo "Searching for old enum values that should be replaced..."
rg -i "ReplaceFailed|SavedFailed|PendingReplace" --type cs

Length of output: 183


Enum status changes verified – no remaining references to old values

I ran a global search for ReplaceFailed, SavedFailed, and PendingReplace and found no occurrences in the codebase. All usages of the old enum values have been updated. No further action is required.

Ginger/GingerCoreCommon/VariablesLib/VariableBase.cs (1)

87-87: LGTM: AllowUserToEdit attributes applied consistently.

The [AllowUserToEdit] attributes are appropriately added to user-configurable properties. The implementation aligns with the bulk attribute update functionality and follows the established pattern across the codebase.

Also applies to: 103-103, 119-119, 154-154

Ginger/GingerCore/GeneralLib/General.cs (4)

1330-1330: LGTM: Minor whitespace cleanup.

The whitespace cleanup improves code formatting.


1562-1577: LGTM: GetEnumFromDescription method implementation is sound.

The method correctly uses reflection to find enum values by description attribute and includes proper null handling. The generic constraint ensures type safety.


1579-1590: LGTM: PopulateComboBoxWithEnumDescriptions implementation is appropriate.

The method includes proper type validation and clears the ComboBox before populating. Good defensive programming with the enum type check.


1592-1599: LGTM: GetEnumDescription helper method is well-implemented.

The private helper method correctly retrieves enum descriptions with appropriate fallback to the enum's string representation when no attribute is present.

Ginger/Ginger/Functionalities/FindAndReplacePage.xaml (4)

10-10: LGTM! Appropriate width increase for dual-mode interface.

The width increase from 800 to 1000 properly accommodates the expanded functionality with the new "Change Attribute Value" mode.


26-35: Well-structured grid layout for dual functionality.

The grid row definitions are properly organized to support both the existing find/replace functionality and the new attribute value change mode. The row height allocations are appropriate for the UI controls.


37-41: Clear mode selection interface.

The radio button implementation for switching between "Find And Replace" and "Change Attribute Value" modes provides intuitive user experience with proper grouping and event handling.


87-113: Comprehensive attribute value editing controls.

The new UI panels provide a complete interface for:

  • Item type selection with ComboBox
  • Attribute name selection
  • Multiple input types (TextBox, ComboBox, CheckBox) for different data types
  • Error message display
  • Processing feedback with update controls

The visibility management (initially Collapsed) allows for dynamic showing/hiding based on user interaction.

Ginger/GingerCoreCommon/Functionalities/FindAndReplaceUtils.cs (3)

62-147: Excellent implementation of attribute discovery with proper filtering.

The FindTopLevelAttributeNames method provides robust functionality for finding attributes by name with:

  • Comprehensive reflection-based member discovery
  • Proper filtering using IsSerializedForLocalRepositoryAttribute and AllowUserToEdit attributes
  • Configurable case sensitivity matching
  • Appropriate exception handling with logging (addressing previous feedback)
  • Well-structured FoundItem creation with all necessary metadata

The method correctly handles both properties and fields, and the exact name matching logic is appropriate for attribute-level operations.


149-187: Clean and efficient member name enumeration.

The GetSerializableEditableMemberNames method provides a focused utility for retrieving editable member names with:

  • Consistent filtering logic matching the main discovery method
  • Proper exception handling that continues processing other members
  • Clear separation of concerns for just retrieving names

This method complements the main discovery functionality well.


435-495: Robust enhanced replacement method with improved type handling.

The ReplaceItemEnhanced method demonstrates significant improvements over the original:

  • Enhanced error checking: Proper null validation and property writability checks
  • Improved type handling: Clean switch statement approach with nullable type support
  • Configurable case sensitivity: Enum parsing now respects SearchConfig.MatchCase (addressing previous feedback)
  • Comprehensive logging: Exception details are properly logged (addressing previous feedback)
  • Proper state management: Sets DirtyStatus.Modified to track changes

The method appropriately handles Boolean, String, and Enum types which covers the primary use cases for this functionality.

Ginger/Ginger/Functionalities/FindAndReplacePage.xaml.cs (1)

1801-1904: Well-implemented attribute value handlers.

The new event handlers for attribute value changes are properly structured with consistent error handling across all methods.

Comment thread Ginger/Ginger/Functionalities/FindAndReplacePage.xaml.cs Outdated

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

♻️ Duplicate comments (1)
Ginger/Ginger/Functionalities/FindAndReplacePage.xaml.cs (1)

442-445: ⚠️ Potential issue

Fix incorrect status assignment on replacement failure.

When ReplaceItem returns false (indicating failure), the status should be Failed, not Replaced.

Apply this diff to fix the logic:

                    else
                    {
-                        foundItem.Status = FoundItem.eStatus.Replaced;
+                        foundItem.Status = FoundItem.eStatus.Failed;
                    }
📜 Review details

Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between f4ed29e and e853dd6.

📒 Files selected for processing (3)
  • Ginger/Ginger/Functionalities/FindAndReplacePage.xaml (2 hunks)
  • Ginger/Ginger/Functionalities/FindAndReplacePage.xaml.cs (15 hunks)
  • Ginger/GingerCoreCommon/Dictionaries/GingerDicser.cs (1 hunks)
🔇 Additional comments (10)
Ginger/GingerCoreCommon/Dictionaries/GingerDicser.cs (1)

39-42: LGTM! Clean enum extension.

The addition of Agents and Environment enum values is well-structured, and the trailing comma after Parameter is a good practice for cleaner diffs in future changes.

Ginger/Ginger/Functionalities/FindAndReplacePage.xaml (2)

10-10: Width adjustment appropriate for new UI elements.

The increase from 800 to 1000 pixels accommodates the additional controls for the dual-mode interface.


21-37: Well-structured UI additions for attribute value editing.

The new data templates and UI panels are properly implemented with:

  • Correct data bindings for different field types
  • Consistent naming conventions
  • Appropriate visibility controls for mode switching

Also applies to: 52-132

Ginger/Ginger/Functionalities/FindAndReplacePage.xaml.cs (7)

124-185: Good addition of error handling to grid view setup.

The try-catch block and error messaging improve robustness, and the new ReplaceAttributeValueView is properly configured for the attribute editing mode.


557-571: Consistent implementation of new search methods.

The GetAgentToSearchIn and GetEnvironmentToSearchIn methods follow the established pattern for populating search items.


1355-1413: Well-implemented mode switching with proper error handling.

The radio button handlers correctly manage UI visibility states and include appropriate error logging for debugging.


1550-1669: Comprehensive item population with good error handling.

The implementation covers all item types with appropriate error handling and logging.


1754-1776: Correct status handling in attribute value updates.

The method properly sets status to Replaced or Failed based on the operation result, with appropriate error logging.


1813-1886: Well-structured attribute value event handlers.

The handlers correctly capture values from different control types (TextBox, ComboBox, CheckBox) with consistent error handling.


1444-1497: Smart control selection based on field type.

The method correctly displays appropriate controls (CheckBox for Boolean, TextBox for String, ComboBox for Enum) with proper enum value population using reflection.

Comment thread Ginger/Ginger/Functionalities/FindAndReplacePage.xaml.cs Outdated

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 22

🔭 Outside diff range comments (2)
Ginger/GingerCoreCommon/Repository/BusinessFlowLib/BusinessFlow.cs (2)

310-325: ⚠️ Potential issue

Enum default value mismatch for Status

AllowUserToEdit("Status") supplies a string to a property whose type is eBusinessFlowStatus.
This will box the string and later cause an invalid-cast when reflection tries to compare to the enum value.
Use the bool/enum overload instead.

-[AllowUserToEdit("Status")]
+[AllowUserToEdit(eBusinessFlowStatus.Unknown)]

326-341: 🛠️ Refactor suggestion

Boolean property given string default

Active is a bool but receives a string "Active".

-[AllowUserToEdit("Active")]
+[AllowUserToEdit(true)]

Additionally, the property already has [IsSerializedForLocalRepository(DefaultValue: true)]; duplicating default handling in the new attribute is redundant and can diverge. Pick one source of truth.

♻️ Duplicate comments (7)
Ginger/GingerCoreCommon/Repository/RepositoryItemBase.cs (1)

1528-1530: Duplicate: default value for Publish

Same observation as raised in an earlier review: the string "Publish" is supplied where a boolean default (false) is expected.
See prior discussion – commenting again for completeness.

Ginger/GingerCoreCommon/VariablesLib/VariableBase.cs (1)

85-88: Same string/boolean default-value mismatch observed here

The remarks on Activity.cs apply equally to these three properties (SetAsInputValue, MandatoryInput, SetAsOutputValue).
Using strings like "Input Value" against bool fields defeats the serializer optimisation and risks invalid casts.

Consider the parameter-less form or a proper boolean default.

Also applies to: 101-105, 117-120

Ginger/GingerCoreCommon/Repository/BusinessFlowLib/BusinessFlow.cs (1)

342-356: Same issue for Mandatory

Mandatory is bool yet string default "Mandatory" is supplied. Apply the same fix as for Active.

-[AllowUserToEdit("Mandatory")]
+[AllowUserToEdit(false)]   // or omit parameter if no default
Ginger/Ginger/Functionalities/FindAndReplacePage.xaml.cs (3)

556-556: ⚠️ Potential issue

Fix incorrect status assignment on replacement failure.

When ReplaceItem returns false (indicating failure), the status should be Failed, not Replaced.

-                        foundItem.Status = FoundItem.eStatus.Replaced;
+                        foundItem.Status = FoundItem.eStatus.Failed;

1617-1626: 🧹 Nitpick (assertive)

Remove unused helper method.

The AddRepositoryItems<T> method is defined but never used in the codebase. Consider removing it to reduce code clutter.


93-96: 🧹 Nitpick (assertive)

Remove unnecessary empty lines.

These empty lines reduce code readability and break the flow of the constructor.

             SetFoundItemsGridView();
             Init();
-
-
-
         }
Ginger/GingerCoreCommon/Functionalities/FindAndReplaceUtils.cs (1)

70-78: Hard-coded skip list still duplicated

The literal chain of member.Name is … or … was already flagged earlier; extracting a HashSet
(or attribute) would centralise maintenance and avoid future drift.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 1a35112 and a9a0789.

📒 Files selected for processing (11)
  • Ginger/Ginger/Functionalities/FindAndReplacePage.xaml (2 hunks)
  • Ginger/Ginger/Functionalities/FindAndReplacePage.xaml.cs (18 hunks)
  • Ginger/GingerCoreCommon/Functionalities/FindAndReplaceUtils.cs (2 hunks)
  • Ginger/GingerCoreCommon/Functionalities/FoundItem.cs (5 hunks)
  • Ginger/GingerCoreCommon/Repository/BusinessFlowLib/Activity.cs (3 hunks)
  • Ginger/GingerCoreCommon/Repository/BusinessFlowLib/BusinessFlow.cs (4 hunks)
  • Ginger/GingerCoreCommon/Repository/Environments/ProjEnvironment.cs (1 hunks)
  • Ginger/GingerCoreCommon/Repository/RepositoryItemBase.cs (1 hunks)
  • Ginger/GingerCoreCommon/Run/RunSetConfig.cs (2 hunks)
  • Ginger/GingerCoreCommon/RunLib/Agent.cs (2 hunks)
  • Ginger/GingerCoreCommon/VariablesLib/VariableBase.cs (4 hunks)
🧰 Additional context used
🧠 Learnings (1)
Ginger/Ginger/Functionalities/FindAndReplacePage.xaml.cs (4)
Learnt from: GokulBothe99
PR: Ginger-Automation/Ginger#4188
File: Ginger/GingerCoreNET/RunLib/CLILib/DoOptionsHanlder.cs:22-23
Timestamp: 2025-04-25T13:29:45.059Z
Learning: The `using Amdocs.Ginger.Repository;` statement in Ginger/GingerCoreNET/RunLib/CLILib/DoOptionsHanlder.cs is necessary as it provides access to the `ObservableList<>` class which is used throughout the file for collections of RunSetConfig, AnalyzerItemBase, and ApplicationPOMModel objects.
Learnt from: GokulBothe99
PR: Ginger-Automation/Ginger#4188
File: Ginger/GingerCoreNET/RunLib/CLILib/DoOptionsHanlder.cs:22-23
Timestamp: 2025-04-25T13:29:45.059Z
Learning: The `using Amdocs.Ginger.Repository;` statement in Ginger/GingerCoreNET/RunLib/CLILib/DoOptionsHanlder.cs is necessary as it imports the ObservableList<> class which is used throughout the file.
Learnt from: GokulBothe99
PR: Ginger-Automation/Ginger#4137
File: Ginger/Ginger/SourceControl/SourceControlProjectsPage.xaml.cs:21-21
Timestamp: 2025-03-20T11:10:30.816Z
Learning: The `Amdocs.Ginger.Common.SourceControlLib` namespace is required in files that reference the `GingerSolution` class for source control operations in the Ginger automation framework.
Learnt from: GokulBothe99
PR: Ginger-Automation/Ginger#4137
File: Ginger/Ginger/SourceControl/SourceControlProjectsPage.xaml.cs:21-21
Timestamp: 2025-03-20T11:10:33.780Z
Learning: The `Amdocs.Ginger.Common.SourceControlLib` namespace is required in files that reference the `GingerSolution` class for source control operations in the Ginger automation framework.
🧬 Code Graph Analysis (8)
Ginger/GingerCoreCommon/RunLib/Agent.cs (1)
Ginger/GingerCoreCommon/Repository/RepositoryItemAttributes.cs (4)
  • AllowUserToEdit (66-102)
  • AllowUserToEdit (70-73)
  • AllowUserToEdit (79-82)
  • AllowUserToEdit (88-91)
Ginger/GingerCoreCommon/Repository/Environments/ProjEnvironment.cs (1)
Ginger/GingerCoreCommon/Repository/RepositoryItemAttributes.cs (4)
  • AllowUserToEdit (66-102)
  • AllowUserToEdit (70-73)
  • AllowUserToEdit (79-82)
  • AllowUserToEdit (88-91)
Ginger/GingerCoreCommon/Run/RunSetConfig.cs (1)
Ginger/GingerCoreCommon/Repository/RepositoryItemAttributes.cs (4)
  • AllowUserToEdit (66-102)
  • AllowUserToEdit (70-73)
  • AllowUserToEdit (79-82)
  • AllowUserToEdit (88-91)
Ginger/GingerCoreCommon/VariablesLib/VariableBase.cs (1)
Ginger/GingerCoreCommon/Repository/RepositoryItemAttributes.cs (4)
  • AllowUserToEdit (66-102)
  • AllowUserToEdit (70-73)
  • AllowUserToEdit (79-82)
  • AllowUserToEdit (88-91)
Ginger/GingerCoreCommon/Repository/BusinessFlowLib/BusinessFlow.cs (1)
Ginger/GingerCoreCommon/Repository/RepositoryItemAttributes.cs (4)
  • AllowUserToEdit (66-102)
  • AllowUserToEdit (70-73)
  • AllowUserToEdit (79-82)
  • AllowUserToEdit (88-91)
Ginger/GingerCoreCommon/Repository/BusinessFlowLib/Activity.cs (1)
Ginger/GingerCoreCommon/Repository/RepositoryItemAttributes.cs (4)
  • AllowUserToEdit (66-102)
  • AllowUserToEdit (70-73)
  • AllowUserToEdit (79-82)
  • AllowUserToEdit (88-91)
Ginger/GingerCoreCommon/Repository/RepositoryItemBase.cs (1)
Ginger/GingerCoreCommon/Repository/RepositoryItemAttributes.cs (4)
  • AllowUserToEdit (66-102)
  • AllowUserToEdit (70-73)
  • AllowUserToEdit (79-82)
  • AllowUserToEdit (88-91)
Ginger/Ginger/Functionalities/FindAndReplacePage.xaml.cs (6)
Ginger/GingerCoreCommon/Functionalities/FindAndReplaceUtils.cs (4)
  • List (150-189)
  • FindTopLevelAttributeNames (62-148)
  • FindAndReplaceUtils (29-563)
  • ReplaceItemEnhanced (500-558)
Ginger/GingerCore/GeneralLib/General.cs (8)
  • List (267-275)
  • List (663-677)
  • List (679-688)
  • List (689-703)
  • List (1160-1165)
  • General (54-1601)
  • T (545-548)
  • T (1173-1190)
Ginger/GingerCoreCommon/Functionalities/FoundItem.cs (1)
  • FoundItem (27-171)
Ginger/GingerCoreCommon/Repository/RepositoryItemBase.cs (6)
  • RepositoryItemBase (58-1570)
  • RepositoryItemBase (721-798)
  • RepositoryItemBase (835-866)
  • RepositoryItemBase (875-886)
  • RepositoryItemBase (1394-1404)
  • RepositoryItemBase (1440-1443)
Ginger/GingerCoreCommon/ReporterLib/Reporter.cs (1)
  • Reporter (28-357)
Ginger/GingerCoreCommon/Repository/Environments/ProjEnvironment.cs (1)
  • ProjEnvironment (29-187)
🔇 Additional comments (2)
Ginger/GingerCoreCommon/Run/RunSetConfig.cs (1)

353-357:

Details

❓ Verification inconclusive

RunWithAnalyzer – pass boolean default

-[AllowUserToEdit("Run with Analyzer")]
+[AllowUserToEdit(true)]   // default already matches `[IsSerializedForLocalRepository(true)]`

Ensures serialisation behaves as intended.


I’ll inspect the AllowUserToEditAttribute definition and its constructors to confirm what parameters it accepts:


🏁 Script executed:

#!/bin/bash
set -e

# Find any source files defining AllowUserToEditAttribute
files=$(find . -type f -iname "*AllowUserToEdit*.cs")
echo "Found attribute files:"
echo "$files"

# Print the first 200 lines of each to see class signature and constructors
for f in $files; do
  echo -e "\n---- $f ----"
  sed -n '1,200p' "$f"
done

Length of output: 131


I’m not finding the attribute’s definition in the repo—please confirm that AllowUserToEditAttribute supports a bool constructor before switching from a string to true.

Ginger/GingerCoreCommon/Repository/BusinessFlowLib/Activity.cs (1)

228-230:

Details

❓ Verification inconclusive

String literal supplied to AllowUserToEdit does not match the property's type

AllowUserToEdit(string) is documented as carrying a default value that the serializer compares against to decide whether to persist the field.
Supplying non-boolean literals such as "Active"/"Mandatory"/"Description" to Boolean and string properties creates a type mismatch:

  • the comparison boolValue.Equals("Active") will never succeed → property is always written.
  • callers that cast the default back to bool will hit an InvalidCastException.

If you only need the metadata flag (editable), rely on the parameter-less overload, or pass the real default:

-[AllowUserToEdit("Active")]
+[AllowUserToEdit]                  // or [AllowUserToEdit(false)]

-[AllowUserToEdit("Mandatory")]
+[AllowUserToEdit]                  // or [AllowUserToEdit(false)]

-[AllowUserToEdit("Description")]
+[AllowUserToEdit]                  // or [AllowUserToEdit("")]

Please double-check the attribute consumers before this lands in production.

Also applies to: 269-271, 285-287


🏁 Script executed:

#!/bin/bash
set -e

echo "Locating the AllowUserToEditAttribute class definition..."
rg --max-count 1 "class AllowUserToEditAttribute" -A5 -B5 -g "*.cs" || true

echo
echo "Listing all public constructors for AllowUserToEditAttribute..."
rg "public AllowUserToEditAttribute" -A2 -B0 -g "*.cs" || true

Length of output: 419


Verify AllowUserToEdit default‐value overload

It looks like you’re passing property names (e.g. "Active") as the default‐value argument, but AllowUserToEdit(string) is intended to carry the actual default value that the serializer compares against. Supplying "Active"/"Mandatory"/"Description" to Boolean or string properties will never match at runtime and may lead to always‐written fields or cast errors.

Please review the attribute’s constructor overloads and ensure you’re using:

  • the parameterless attribute for merely marking a property editable, or
  • the overload that accepts the real default for the property’s type

For example, in Ginger/GingerCoreCommon/Repository/BusinessFlowLib/Activity.cs:

-[AllowUserToEdit("Active")]
+[AllowUserToEdit]           // or [AllowUserToEdit(false)]

-[AllowUserToEdit("Mandatory")]
+[AllowUserToEdit]           // or [AllowUserToEdit(false)]

-[AllowUserToEdit("Description")]
+[AllowUserToEdit]           // or [AllowUserToEdit("")]

Applies also to lines 269–271 and 285–287.
Please confirm against the attribute implementation before merging.

Comment thread Ginger/GingerCoreCommon/Repository/Environments/ProjEnvironment.cs
Comment thread Ginger/GingerCoreCommon/RunLib/Agent.cs
Comment thread Ginger/GingerCoreCommon/RunLib/Agent.cs
Comment thread Ginger/GingerCoreCommon/Run/RunSetConfig.cs
Comment thread Ginger/GingerCoreCommon/VariablesLib/VariableBase.cs
Comment thread Ginger/Ginger/Functionalities/FindAndReplacePage.xaml.cs Outdated
Comment thread Ginger/Ginger/Functionalities/FindAndReplacePage.xaml.cs
Comment thread Ginger/Ginger/Functionalities/FindAndReplacePage.xaml.cs Outdated
Comment thread Ginger/GingerCoreCommon/Functionalities/FindAndReplaceUtils.cs
Comment thread Ginger/GingerCoreCommon/Functionalities/FindAndReplaceUtils.cs Outdated

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 11

🔭 Outside diff range comments (1)
Ginger/Ginger/UserControlsLib/UCTreeView/TreeViewItemGenericBase.cs (1)

270-337: 🛠️ Refactor suggestion

Method signature is bloated – introduce an options object or flag enum
AddFolderNodeBasicManipulationsOptions now accepts 16 bool parameters, which is error-prone and unreadable.
Consider replacing the long parameter list with a struct/record or an enum with [Flags] so callers specify only the required capabilities while keeping call-sites self-documenting.

-public void AddFolderNodeBasicManipulationsOptions(ContextMenu CM, string nodeItemTypeName,
-    bool allowRefresh = true, bool allowAddNew = true, /* …14 more… */, bool allowAttributeUpdate = false)
+public void AddFolderNodeBasicManipulationsOptions(
+    ContextMenu CM,
+    string nodeItemTypeName,
+    FolderNodeOption options = FolderNodeOption.Default)

This will greatly improve maintainability whenever new capabilities are introduced.

♻️ Duplicate comments (15)
Ginger/Ginger/Functionalities/FindAndReplacePage.xaml (4)

10-10: 🧹 Nitpick (assertive)

Fixed page size blocks DPI scaling.

Hard-coded Height="800" and Width="1000" prevents proper resizing and multi-DPI rendering. Remove or switch to MinWidth/MinHeight.


52-56: 🧹 Nitpick (assertive)

No radio-button default – UI opens in undefined state.

Neither xFindReplaceBtn nor xAttributeValueBtn is checked by default.
Set one IsChecked="True" in XAML or check it in code-behind constructor.


94-95: 🧹 Nitpick (assertive)

Duplicate processing indicators – consolidate to avoid redundant XAML.

xProcessingImage and xProcessingImage2 provide the same visual feedback.
Reuse a single control or encapsulate it in a user control.


26-29: ⚠️ Potential issue

Invalid Width="auto" value – runtime XamlParseException.

FrameworkElement.Width expects a double; the string "auto" is not valid.
Use Width="Auto" on a ColumnDefinition or omit the property:

- <ComboBox ... Width="auto"/>
+ <ComboBox ... />
Ginger/GingerCoreCommon/Functionalities/FoundItem.cs (4)

140-141: 🛠️ Refactor suggestion

FieldType should not be static.

Making it instance-specific allows heterogeneous rows in the grid.

- public Type FieldType { get; set; }
+ public Type FieldType { get; set; }

[note: remove static if present elsewhere]


174-176: 🛠️ Refactor suggestion

Shared FieldValueOption list breaks per-row options.

Different attributes may have distinct option lists. Remove static.

- public static List<string> FieldValueOption { get; set; }
+ public List<string> FieldValueOption { get; set; }

49-62: 🛠️ Refactor suggestion

Setter marks item modified even when value unchanged.

This causes unnecessary PropertyChanged storms & dirty-state flips.

set
{
-    mFieldValue = value;
-    IsModified = eStatus.Modified;
-    OnPropertyChanged(nameof(FieldValue));
+    if (mFieldValue == value) return;
+    mFieldValue  = value;
+    IsModified   = eStatus.Modified;
+    OnPropertyChanged(nameof(FieldValue));
}

30-38: ⚠️ Potential issue

Enum changes break backward compatibility & outdated descriptions.

  1. Removing explicit numeric values alters wire format when deserialising persisted data.
  2. EnumValueDescription still says "Pending Replace".

Add explicit values & correct descriptions:

public enum eStatus
{
-    [EnumValueDescription("Pending Replace")]
-    Pending,
-    Updated,
-    Failed,
-    Saved,
-    Modified
+    [EnumValueDescription("Pending")]
+    Pending      = 0,
+    [EnumValueDescription("Updated")]
+    Updated      = 1,
+    [EnumValueDescription("Failed")]
+    Failed       = 2,
+    [EnumValueDescription("Saved")]
+    Saved        = 3,
+    [EnumValueDescription("Modified")]
+    Modified     = 4
}
Ginger/GingerCoreCommon/Functionalities/FindAndReplaceUtils.cs (3)

525-538: Still limited to Boolean/String/Enum – numeric types unhandled
A previous review suggested adding int, double, etc. The current switch is unchanged.
Tagging as duplicate for visibility.


136-138: ⚠️ Potential issue

[] collection expression requires C# 12 preview – will not compile in current LTS tool-chains

OptionalValuesToRepalce = [],

Replace with an explicit constructor to keep the project buildable on C# 11 and earlier:

-OptionalValuesToRepalce = [],
+OptionalValuesToRepalce = new List<string>(),

Search for similar uses ([]) in the codebase and fix them.


509-513: ⚠️ Potential issue

ReplaceItemEnhanced can’t update fields – 50 % of discoverable members are skipped
The method only interrogates writable properties (GetProperty).
Editable fields surfaced by FindTopLevelAttributeNames will therefore never be updated.

Add fallback logic:

-var property = foundItem.ItemObject.GetType().GetProperty(foundItem.FieldName);
-if (property == null || !property.CanWrite) return false;
+var type     = foundItem.ItemObject.GetType();
+var property = type.GetProperty(foundItem.FieldName);
+var field    = property == null
+               ? type.GetField(foundItem.FieldName,
+                               BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic)
+               : null;
+if (property == null && field == null) return false;

Use property?.PropertyType ?? field.FieldType and property?.SetValue(...) / field.SetValue(...) accordingly.

Ginger/Ginger/Functionalities/FindAndReplacePage.xaml.cs (4)

161-171: Commented-out column definition still present

This exact block was already flagged previously; leaving it clutters the grid definition.
Either restore the code or delete it entirely.


268-272: Empty event handler

FieldValueComboBox_SelectionChanged contains no logic and silently swallows the event. Delete the method or implement the required behaviour to avoid misleading maintainers.


298-299: Typo in log message

“Helighted” → “Highlighted”.


1774-1783: Unused helper AddRepositoryItems<T>

The generic helper remains unused after earlier feedback. Delete it or call it from the relevant switch cases to justify its existence.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between a9a0789 and be0f01c.

📒 Files selected for processing (9)
  • Ginger/Ginger/Actions/ActionEditPage.xaml.cs (1 hunks)
  • Ginger/Ginger/Functionalities/FindAndReplacePage.xaml (2 hunks)
  • Ginger/Ginger/Functionalities/FindAndReplacePage.xaml.cs (20 hunks)
  • Ginger/Ginger/SolutionWindows/TreeViewItems/BusinessFlowsFolderTreeItem.cs (1 hunks)
  • Ginger/Ginger/SolutionWindows/TreeViewItems/NewTreeViewItemBase.cs (3 hunks)
  • Ginger/Ginger/SolutionWindows/TreeViewItems/TreeViewItemBase.cs (1 hunks)
  • Ginger/Ginger/UserControlsLib/UCTreeView/TreeViewItemGenericBase.cs (2 hunks)
  • Ginger/GingerCoreCommon/Functionalities/FindAndReplaceUtils.cs (3 hunks)
  • Ginger/GingerCoreCommon/Functionalities/FoundItem.cs (5 hunks)
🧰 Additional context used
🧠 Learnings (2)
Ginger/Ginger/SolutionWindows/TreeViewItems/NewTreeViewItemBase.cs (4)
Learnt from: GokulBothe99
PR: Ginger-Automation/Ginger#4188
File: Ginger/GingerCoreNET/RunLib/CLILib/DoOptionsHanlder.cs:22-23
Timestamp: 2025-04-25T13:29:45.059Z
Learning: The `using Amdocs.Ginger.Repository;` statement in Ginger/GingerCoreNET/RunLib/CLILib/DoOptionsHanlder.cs is necessary as it provides access to the `ObservableList<>` class which is used throughout the file for collections of RunSetConfig, AnalyzerItemBase, and ApplicationPOMModel objects.
Learnt from: GokulBothe99
PR: Ginger-Automation/Ginger#4188
File: Ginger/GingerCoreNET/RunLib/CLILib/DoOptionsHanlder.cs:22-23
Timestamp: 2025-04-25T13:29:45.059Z
Learning: The `using Amdocs.Ginger.Repository;` statement in Ginger/GingerCoreNET/RunLib/CLILib/DoOptionsHanlder.cs is necessary as it imports the ObservableList<> class which is used throughout the file.
Learnt from: GokulBothe99
PR: Ginger-Automation/Ginger#4137
File: Ginger/Ginger/SourceControl/SourceControlProjectsPage.xaml.cs:21-21
Timestamp: 2025-03-20T11:10:30.816Z
Learning: The `Amdocs.Ginger.Common.SourceControlLib` namespace is required in files that reference the `GingerSolution` class for source control operations in the Ginger automation framework.
Learnt from: GokulBothe99
PR: Ginger-Automation/Ginger#4137
File: Ginger/Ginger/SourceControl/SourceControlProjectsPage.xaml.cs:21-21
Timestamp: 2025-03-20T11:10:33.780Z
Learning: The `Amdocs.Ginger.Common.SourceControlLib` namespace is required in files that reference the `GingerSolution` class for source control operations in the Ginger automation framework.
Ginger/Ginger/Functionalities/FindAndReplacePage.xaml.cs (5)
Learnt from: prashelke
PR: Ginger-Automation/Ginger#3429
File: Ginger/Ginger/AutomatePageLib/AddActionMenu/WindowExplorer/Common/WindowExplorerPage.xaml.cs:1123-1126
Timestamp: 2024-07-26T22:04:12.930Z
Learning: The user has removed an unnecessary empty line at 1123 in `WindowExplorerPage.xaml.cs` for better code compactness.
Learnt from: GokulBothe99
PR: Ginger-Automation/Ginger#4188
File: Ginger/GingerCoreNET/RunLib/CLILib/DoOptionsHanlder.cs:22-23
Timestamp: 2025-04-25T13:29:45.059Z
Learning: The `using Amdocs.Ginger.Repository;` statement in Ginger/GingerCoreNET/RunLib/CLILib/DoOptionsHanlder.cs is necessary as it provides access to the `ObservableList<>` class which is used throughout the file for collections of RunSetConfig, AnalyzerItemBase, and ApplicationPOMModel objects.
Learnt from: GokulBothe99
PR: Ginger-Automation/Ginger#4188
File: Ginger/GingerCoreNET/RunLib/CLILib/DoOptionsHanlder.cs:22-23
Timestamp: 2025-04-25T13:29:45.059Z
Learning: The `using Amdocs.Ginger.Repository;` statement in Ginger/GingerCoreNET/RunLib/CLILib/DoOptionsHanlder.cs is necessary as it imports the ObservableList<> class which is used throughout the file.
Learnt from: GokulBothe99
PR: Ginger-Automation/Ginger#4137
File: Ginger/Ginger/SourceControl/SourceControlProjectsPage.xaml.cs:21-21
Timestamp: 2025-03-20T11:10:33.780Z
Learning: The `Amdocs.Ginger.Common.SourceControlLib` namespace is required in files that reference the `GingerSolution` class for source control operations in the Ginger automation framework.
Learnt from: GokulBothe99
PR: Ginger-Automation/Ginger#4137
File: Ginger/Ginger/SourceControl/SourceControlProjectsPage.xaml.cs:21-21
Timestamp: 2025-03-20T11:10:30.816Z
Learning: The `Amdocs.Ginger.Common.SourceControlLib` namespace is required in files that reference the `GingerSolution` class for source control operations in the Ginger automation framework.
🧬 Code Graph Analysis (2)
Ginger/Ginger/SolutionWindows/TreeViewItems/BusinessFlowsFolderTreeItem.cs (2)
Ginger/Ginger/UserControlsLib/UCTreeView/TreeViewItemGenericBase.cs (1)
  • AddFolderNodeBasicManipulationsOptions (270-337)
Ginger/GingerCoreCommon/Dictionaries/GingerDicser.cs (2)
  • GingerDicser (65-96)
  • GetTermResValue (67-94)
Ginger/GingerCoreCommon/Functionalities/FindAndReplaceUtils.cs (3)
Ginger/GingerCoreCommon/Repository/RepositoryItemBase.cs (7)
  • RepositoryItemBase (58-1570)
  • RepositoryItemBase (721-798)
  • RepositoryItemBase (835-866)
  • RepositoryItemBase (875-886)
  • RepositoryItemBase (1394-1404)
  • RepositoryItemBase (1440-1443)
  • ToString (154-157)
Ginger/GingerCoreCommon/Functionalities/FoundItem.cs (1)
  • FoundItem (27-185)
Ginger/GingerCoreCommon/Repository/RepositoryItemAttributes.cs (12)
  • IsSerializedForLocalRepositoryAttribute (28-64)
  • IsSerializedForLocalRepositoryAttribute (32-35)
  • IsSerializedForLocalRepositoryAttribute (41-44)
  • IsSerializedForLocalRepositoryAttribute (50-53)
  • AllowUserToEdit (66-102)
  • AllowUserToEdit (70-73)
  • AllowUserToEdit (79-82)
  • AllowUserToEdit (88-91)
  • GetDefualtValue (60-63)
  • GetDefualtValue (98-101)
  • ToString (55-58)
  • ToString (93-96)
🔇 Additional comments (1)
Ginger/Ginger/SolutionWindows/TreeViewItems/BusinessFlowsFolderTreeItem.cs (1)

145-150: 👍 Enabling attribute-update in context menu

Passing allowAttributeUpdate: true cleanly hooks the new find-and-replace feature for both root & non-root BF folders. No issues spotted.

Comment thread Ginger/Ginger/Actions/ActionEditPage.xaml.cs
Comment thread Ginger/Ginger/SolutionWindows/TreeViewItems/TreeViewItemBase.cs
Comment thread Ginger/Ginger/SolutionWindows/TreeViewItems/NewTreeViewItemBase.cs
Comment thread Ginger/Ginger/SolutionWindows/TreeViewItems/NewTreeViewItemBase.cs Outdated
Comment thread Ginger/GingerCoreCommon/Functionalities/FoundItem.cs
Comment thread Ginger/Ginger/UserControlsLib/UCTreeView/TreeViewItemGenericBase.cs
Comment thread Ginger/GingerCoreCommon/Functionalities/FindAndReplaceUtils.cs
Comment thread Ginger/Ginger/Functionalities/FindAndReplacePage.xaml.cs
Comment thread Ginger/Ginger/Functionalities/FindAndReplacePage.xaml.cs Outdated
Comment thread Ginger/Ginger/Functionalities/FindAndReplacePage.xaml.cs

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

♻️ Duplicate comments (7)
Ginger/GingerCoreCommon/Functionalities/FindAndReplaceUtils.cs (2)

136-136: ⚠️ Potential issue

[] collection expression will not build on C# ≤ 11

OptionalValuesToRepalce = [] relies on the preview-only C# 12 collection-expression feature.
Unless the entire solution is compiled with /langversion:preview, this line will cause a compile-time error.

-                            OptionalValuesToRepalce = [],
+                            OptionalValuesToRepalce = new List<string>(),

Apply the same fix anywhere else you use the bare [] literal.


465-468: 🧹 Nitpick (assertive)

Consider widening type support beyond bool | string | enum

ReplaceItemEnhanced currently returns false for any numeric, DateTime, or custom struct types even when a valid value is supplied. If end-users attempt to replace an int or double attribute, the UI will misleadingly show a failure.

Optional refactor:

- _ => false
+ Type t when t == typeof(int)    => int.TryParse(input,   out var i)   && Assign(out valueToSet, i),
+ Type t when t == typeof(double) => double.TryParse(input,out var d)   && Assign(out valueToSet, d),
+ _ => false

Add others (decimal, long, etc.) as required.

Ginger/Ginger/Functionalities/FindAndReplacePage.xaml.cs (5)

298-298: ⚠️ Potential issue

Fix typo in error message.

"Helighted" should be "Highlighted".

-                Reporter.ToLog(eLogLevel.ERROR, "Error: No Helighted row found.", ex);
+                Reporter.ToLog(eLogLevel.ERROR, "Error: No Highlighted row found.", ex);

676-678: 🧹 Nitpick (assertive)

Remove commented-out code.

This appears to be leftover test code and should be removed.

-                case eContext.SolutionPage:/*
-                    RepositoryFolder rr = new Amdocs.Ginger.Repository.RepositoryFolder();
-                    var tt = rr.GetFolderRepositoryItems<BusinessFlow>();*/
+                case eContext.SolutionPage:

268-271: 🧹 Nitpick (assertive)

Remove empty event handler.

This event handler is empty and appears to be unused. Either implement the required logic or remove it entirely.

Remove the empty handler:

-        private void FieldValueComboBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
-        {
-
-        }

140-141: 🧹 Nitpick (assertive)

Remove unused field valueTypes.

The field valueTypes is declared but never initialized or used anywhere in the code.

Remove this unused field:

-
-        List<ComboEnumItem> valueTypes;

1720-1739: 🛠️ Refactor suggestion

Use type checks instead of string comparisons.

Comparing type names as strings is brittle and can break with refactoring. Use proper type comparisons instead.

-                if (item.FieldType.Name == "Boolean")
+                if (item.FieldType == typeof(bool))
                 {
                     xFoundItemsGrid.ChangeGridView(eGridView.ReplaceAttributeCheckBoxView.ToString());
                 }
-                else if (item.FieldType.Name == "String")
+                else if (item.FieldType == typeof(string))
                 {
                     xFoundItemsGrid.ChangeGridView(eGridView.ReplaceAttributeTextBoxView.ToString());
                 }
-                else if (item.FieldType.BaseType?.Name == "Enum")
+                else if (item.FieldType.IsEnum)
                 {
                     string enumTypeName = item.FieldType.FullName;
                     Type enumType = item.FieldType.Assembly.GetType(enumTypeName);
-                    if (enumType != null && enumType.IsEnum)
+                    if (enumType != null)
                     {
                         List<ComboEnumItem> comboItems = GingerCore.General.GetEnumValuesForCombo(enumType);
📜 Review details

Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between be0f01c and f66fd0b.

📒 Files selected for processing (2)
  • Ginger/Ginger/Functionalities/FindAndReplacePage.xaml.cs (20 hunks)
  • Ginger/GingerCoreCommon/Functionalities/FindAndReplaceUtils.cs (3 hunks)
🧰 Additional context used
🧠 Learnings (1)
Ginger/Ginger/Functionalities/FindAndReplacePage.xaml.cs (5)
Learnt from: prashelke
PR: Ginger-Automation/Ginger#3429
File: Ginger/Ginger/AutomatePageLib/AddActionMenu/WindowExplorer/Common/WindowExplorerPage.xaml.cs:1123-1126
Timestamp: 2024-07-26T22:04:12.930Z
Learning: The user has removed an unnecessary empty line at 1123 in `WindowExplorerPage.xaml.cs` for better code compactness.
Learnt from: GokulBothe99
PR: Ginger-Automation/Ginger#4188
File: Ginger/GingerCoreNET/RunLib/CLILib/DoOptionsHanlder.cs:22-23
Timestamp: 2025-04-25T13:29:45.059Z
Learning: The `using Amdocs.Ginger.Repository;` statement in Ginger/GingerCoreNET/RunLib/CLILib/DoOptionsHanlder.cs is necessary as it provides access to the `ObservableList<>` class which is used throughout the file for collections of RunSetConfig, AnalyzerItemBase, and ApplicationPOMModel objects.
Learnt from: GokulBothe99
PR: Ginger-Automation/Ginger#4188
File: Ginger/GingerCoreNET/RunLib/CLILib/DoOptionsHanlder.cs:22-23
Timestamp: 2025-04-25T13:29:45.059Z
Learning: The `using Amdocs.Ginger.Repository;` statement in Ginger/GingerCoreNET/RunLib/CLILib/DoOptionsHanlder.cs is necessary as it imports the ObservableList<> class which is used throughout the file.
Learnt from: GokulBothe99
PR: Ginger-Automation/Ginger#4137
File: Ginger/Ginger/SourceControl/SourceControlProjectsPage.xaml.cs:21-21
Timestamp: 2025-03-20T11:10:33.780Z
Learning: The `Amdocs.Ginger.Common.SourceControlLib` namespace is required in files that reference the `GingerSolution` class for source control operations in the Ginger automation framework.
Learnt from: GokulBothe99
PR: Ginger-Automation/Ginger#4137
File: Ginger/Ginger/SourceControl/SourceControlProjectsPage.xaml.cs:21-21
Timestamp: 2025-03-20T11:10:30.816Z
Learning: The `Amdocs.Ginger.Common.SourceControlLib` namespace is required in files that reference the `GingerSolution` class for source control operations in the Ginger automation framework.
🔇 Additional comments (1)
Ginger/GingerCoreCommon/Functionalities/FindAndReplaceUtils.cs (1)

119-120: Verify spelling of GetDefualtValue

member.GetCustomAttribute<AllowUserToEdit>().GetDefualtValue() – the method name appears miss-spelled.
If the actual helper is named GetDefaultValue, this will not compile. Please double-check the attribute helper API.

Comment thread Ginger/GingerCoreCommon/Functionalities/FindAndReplaceUtils.cs

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 7

🔭 Outside diff range comments (1)
Ginger/Ginger/MainWindow.xaml.cs (1)

1027-1035: 🧹 Nitpick (assertive)

Unnecessary Math.Abs and ultra-fine threshold hide early progress updates

progress is already non-negative; wrapping it with Math.Abs is redundant.
The < 0.01 guard means the UI will not show anything until ≥ 0.01 %, so on large jobs (e.g., 1 / 10 000 steps) the first 99 updates are silently dropped. Consider a more practical threshold (e.g., < 1) or remove the check entirely if throttling is not required.

-                    if (Math.Abs(progress) < 0.01)
+                    // Skip noisy updates below 1 % – tweak as required
+                    if (progress < 1)
♻️ Duplicate comments (9)
Ginger/Ginger/Functionalities/FindAndReplacePage.xaml (4)

26-30: ⚠️ Potential issue

Width="auto" will crash at runtime

FrameworkElement.Width expects a double; the string "auto" throws a XamlParseException.
Either remove the Width attribute or set it to a numeric value/Width="Auto" on a ColumnDefinition.

-<ComboBox … Width="auto"/>
+<ComboBox … Width="Auto"/> <!-- or omit Width entirely -->

52-56: 🧹 Nitpick (assertive)

No default radio-button selected

Both “Find And Replace” and “Replace Attribute” start unchecked.
Give users a deterministic default using IsChecked="True" on one of them or set it programmatically.


94-95: 🧹 Nitpick (assertive)

Two separate “processing” images = redundant UI

xProcessingImage and xProcessingImage2 duplicate the same spinner.
Reuse a single control or wrap the spinner in a reusable UserControl to avoid duplicated bindings & state handling.


10-10: 🧹 Nitpick (assertive)

Hard-coded size again

Height="800" Width="1000" prevents proper DPI/scaling. Consider MinHeight/MinWidth or rely on layout panels instead.

Ginger/GingerCoreCommon/Functionalities/FindAndReplaceUtils.cs (2)

444-476: ⚠️ Potential issue

ReplaceItemEnhanced still ignores fields – replacement silently fails for 50 % of members

The method bails out when no writable property exists, so editable fields surfaced by the UI can never be updated.
This issue was raised earlier but the fix hasn’t landed.

Suggested minimal patch:

- var property = foundItem.ItemObject.GetType().GetProperty(foundItem.FieldName);
- if (property is null || !property.CanWrite)
- {
-     return false;
- }
-
- var targetType = Nullable.GetUnderlyingType(property.PropertyType) ?? property.PropertyType;
+ var type     = foundItem.ItemObject.GetType();
+ var property = type.GetProperty(foundItem.FieldName);
+ var field    = property == null
+                ? type.GetField(foundItem.FieldName,
+                                BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance)
+                : null;
+
+ if (property == null && field == null)
+     return false;
+
+ bool memberIsReadOnly = property?.CanWrite == false || field?.IsInitOnly == true;
+ if (memberIsReadOnly)
+     return false;
+
+ var targetType = Nullable.GetUnderlyingType(property?.PropertyType ?? field!.FieldType) 
+                  ?? (property?.PropertyType ?? field!.FieldType);- property.SetValue(foundItem.ItemObject, valueToSet);
+ (property != null ? property.SetValue(foundItem.ItemObject, valueToSet)
+                   : field!.SetValue(foundItem.ItemObject, valueToSet));

Without this, every editable field ends up in a no-op status, breaking the bulk-update feature.


457-470: 🧹 Nitpick (assertive)

Very limited type support

Only bool, string, and enum are handled. Numeric types (int, double, etc.) were suggested previously and are still unhandled.
If users expose numeric attributes, replacement will always fail. Consider extending the switch:

+ Type t when t == typeof(int)    => int.TryParse(input, out var i)    && Assign(out valueToSet, i),
+ Type t when t == typeof(double) => double.TryParse(input, out var d) && Assign(out valueToSet, d),
Ginger/Ginger/Functionalities/FindAndReplacePage.xaml.cs (3)

278-278: Fix typo in log message (“Helighted” → “Highlighted”)


1696-1705: Replace brittle string type checks with typeof / IsEnum


1790-1791: IsModified enum misuse still confusing

📜 Review details

Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between f66fd0b and 3046ed2.

📒 Files selected for processing (8)
  • Ginger/Ginger/AutomatePageLib/NewAutomatePage.xaml.cs (1 hunks)
  • Ginger/Ginger/Functionalities/FindAndReplacePage.xaml (2 hunks)
  • Ginger/Ginger/Functionalities/FindAndReplacePage.xaml.cs (20 hunks)
  • Ginger/Ginger/MainWindow.xaml.cs (4 hunks)
  • Ginger/Ginger/RunSetPageLib/NewRunSetPage.xaml.cs (2 hunks)
  • Ginger/Ginger/SolutionWindows/TreeViewItems/NewTreeViewItemBase.cs (3 hunks)
  • Ginger/GingerCore/GeneralLib/General.cs (3 hunks)
  • Ginger/GingerCoreCommon/Functionalities/FindAndReplaceUtils.cs (3 hunks)
🧰 Additional context used
🧠 Learnings (2)
Ginger/Ginger/SolutionWindows/TreeViewItems/NewTreeViewItemBase.cs (4)
Learnt from: GokulBothe99
PR: Ginger-Automation/Ginger#4188
File: Ginger/GingerCoreNET/RunLib/CLILib/DoOptionsHanlder.cs:22-23
Timestamp: 2025-04-25T13:29:45.059Z
Learning: The `using Amdocs.Ginger.Repository;` statement in Ginger/GingerCoreNET/RunLib/CLILib/DoOptionsHanlder.cs is necessary as it provides access to the `ObservableList<>` class which is used throughout the file for collections of RunSetConfig, AnalyzerItemBase, and ApplicationPOMModel objects.
Learnt from: GokulBothe99
PR: Ginger-Automation/Ginger#4188
File: Ginger/GingerCoreNET/RunLib/CLILib/DoOptionsHanlder.cs:22-23
Timestamp: 2025-04-25T13:29:45.059Z
Learning: The `using Amdocs.Ginger.Repository;` statement in Ginger/GingerCoreNET/RunLib/CLILib/DoOptionsHanlder.cs is necessary as it imports the ObservableList<> class which is used throughout the file.
Learnt from: GokulBothe99
PR: Ginger-Automation/Ginger#4137
File: Ginger/Ginger/SourceControl/SourceControlProjectsPage.xaml.cs:21-21
Timestamp: 2025-03-20T11:10:30.816Z
Learning: The `Amdocs.Ginger.Common.SourceControlLib` namespace is required in files that reference the `GingerSolution` class for source control operations in the Ginger automation framework.
Learnt from: GokulBothe99
PR: Ginger-Automation/Ginger#4137
File: Ginger/Ginger/SourceControl/SourceControlProjectsPage.xaml.cs:21-21
Timestamp: 2025-03-20T11:10:33.780Z
Learning: The `Amdocs.Ginger.Common.SourceControlLib` namespace is required in files that reference the `GingerSolution` class for source control operations in the Ginger automation framework.
Ginger/Ginger/Functionalities/FindAndReplacePage.xaml.cs (5)
Learnt from: prashelke
PR: Ginger-Automation/Ginger#3429
File: Ginger/Ginger/AutomatePageLib/AddActionMenu/WindowExplorer/Common/WindowExplorerPage.xaml.cs:1123-1126
Timestamp: 2024-07-26T22:04:12.930Z
Learning: The user has removed an unnecessary empty line at 1123 in `WindowExplorerPage.xaml.cs` for better code compactness.
Learnt from: GokulBothe99
PR: Ginger-Automation/Ginger#4188
File: Ginger/GingerCoreNET/RunLib/CLILib/DoOptionsHanlder.cs:22-23
Timestamp: 2025-04-25T13:29:45.059Z
Learning: The `using Amdocs.Ginger.Repository;` statement in Ginger/GingerCoreNET/RunLib/CLILib/DoOptionsHanlder.cs is necessary as it provides access to the `ObservableList<>` class which is used throughout the file for collections of RunSetConfig, AnalyzerItemBase, and ApplicationPOMModel objects.
Learnt from: GokulBothe99
PR: Ginger-Automation/Ginger#4188
File: Ginger/GingerCoreNET/RunLib/CLILib/DoOptionsHanlder.cs:22-23
Timestamp: 2025-04-25T13:29:45.059Z
Learning: The `using Amdocs.Ginger.Repository;` statement in Ginger/GingerCoreNET/RunLib/CLILib/DoOptionsHanlder.cs is necessary as it imports the ObservableList<> class which is used throughout the file.
Learnt from: GokulBothe99
PR: Ginger-Automation/Ginger#4137
File: Ginger/Ginger/SourceControl/SourceControlProjectsPage.xaml.cs:21-21
Timestamp: 2025-03-20T11:10:33.780Z
Learning: The `Amdocs.Ginger.Common.SourceControlLib` namespace is required in files that reference the `GingerSolution` class for source control operations in the Ginger automation framework.
Learnt from: GokulBothe99
PR: Ginger-Automation/Ginger#4137
File: Ginger/Ginger/SourceControl/SourceControlProjectsPage.xaml.cs:21-21
Timestamp: 2025-03-20T11:10:30.816Z
Learning: The `Amdocs.Ginger.Common.SourceControlLib` namespace is required in files that reference the `GingerSolution` class for source control operations in the Ginger automation framework.
🧬 Code Graph Analysis (1)
Ginger/Ginger/AutomatePageLib/NewAutomatePage.xaml.cs (1)
Ginger/Ginger/Functionalities/FindAndReplacePage.xaml.cs (2)
  • FindAndReplacePage (65-1829)
  • FindAndReplacePage (92-101)
🔇 Additional comments (5)
Ginger/GingerCore/GeneralLib/General.cs (2)

295-296: Pure whitespace change – nothing to review

Only a blank-line shuffle; no functional impact.


1559-1559: Pure whitespace change – nothing to review

No behaviour change in GenericToGDIImageFormat.

Ginger/Ginger/AutomatePageLib/NewAutomatePage.xaml.cs (1)

1682-1686:

Details

❓ Verification inconclusive

Drop the misleading m prefix & streamline the instantiation

mfindAndReplacePageAutomate is now a local variable, yet its m prefix signals a member field and violates the project’s naming conventions.
Either rename the variable or inline the call to avoid the needless handle.

-FindAndReplacePage mfindAndReplacePageAutomate = new FindAndReplacePage(FindAndReplacePage.eContext.AutomatePage, mBusinessFlow);
-mfindAndReplacePageAutomate.ShowAsWindow();
+var findAndReplacePage = new FindAndReplacePage(FindAndReplacePage.eContext.AutomatePage, mBusinessFlow);
+findAndReplacePage.ShowAsWindow();

Additionally, creating a brand-new window on every click might leave users with multiple open “Find & Replace” dialogs. Confirm that this UX change is intentional and that old windows are closed (or reused) elsewhere.


Rename local variable & confirm Find & Replace window reuse

Drop the misleading m prefix on this local variable (it implies a private field) and either inline the call or give it a clear camel-case name:

--- a/Ginger/Ginger/AutomatePageLib/NewAutomatePage.xaml.cs
+++ b/Ginger/Ginger/AutomatePageLib/NewAutomatePage.xaml.cs
@@ -1682,2 +1682,2
-    FindAndReplacePage mfindAndReplacePageAutomate = new FindAndReplacePage(FindAndReplacePage.eContext.AutomatePage, mBusinessFlow);
-    mfindAndReplacePageAutomate.ShowAsWindow();
+    var findAndReplacePage = new FindAndReplacePage(FindAndReplacePage.eContext.AutomatePage, mBusinessFlow);
+    findAndReplacePage.ShowAsWindow();

Also, each click creates a brand-new dialog. Please verify whether you intend to allow multiple “Find & Replace” windows or if instances should be reused/closed.

Ginger/Ginger/RunSetPageLib/NewRunSetPage.xaml.cs (1)

3304-3307: (Optional) guard against multiple concurrent “Find & Replace” windows

Creating a fresh page every click is fine, but it now allows users to open any number of identical windows.
If that’s not intended, cache a single window or track IsVisible before spawning another instance.

No change requested if multiple windows are desired—just flagging the behavioural shift introduced here.

Ginger/Ginger/Functionalities/FindAndReplacePage.xaml.cs (1)

69-72: Confirm C# 12 collection-expression support

The [] shorthand for ObservableList<FoundItem> mFoundItemsList = []; requires the collection-expression feature introduced in C# 12 / .NET 8.
Verify the project’s language-version & tool-chain before merging, or fall back to new ObservableList<FoundItem>().

Comment thread Ginger/Ginger/SolutionWindows/TreeViewItems/NewTreeViewItemBase.cs
Comment thread Ginger/Ginger/SolutionWindows/TreeViewItems/NewTreeViewItemBase.cs Outdated
Comment thread Ginger/Ginger/MainWindow.xaml.cs
Comment thread Ginger/Ginger/RunSetPageLib/NewRunSetPage.xaml.cs
Comment thread Ginger/GingerCoreCommon/Functionalities/FindAndReplaceUtils.cs
Comment thread Ginger/Ginger/Functionalities/FindAndReplacePage.xaml.cs
Comment thread Ginger/Ginger/Functionalities/FindAndReplacePage.xaml.cs

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

♻️ Duplicate comments (3)
Ginger/Ginger/SolutionWindows/TreeViewItems/NewTreeViewItemBase.cs (1)

776-783: Remove dead variables & add guard for empty collection (same feedback as before).

showConfirmation and itemsSavedCount are still declared but never used.
Additionally, opening the Find-and-Replace window when childNodes is empty is pointless.

-            bool showConfirmation = true;
-            int itemsSavedCount = 0;
+            if (childNodes.Count == 0)
+            {
+                Reporter.ToUser(eUserMsgKey.StaticWarnMessage, "Selected folder contains no items to update.");
+                return;
+            }
Ginger/Ginger/Functionalities/FindAndReplacePage.xaml.cs (2)

282-282: ⚠️ Potential issue

Fix typo in error message.

Apply this diff to fix the typo:

-                Reporter.ToLog(eLogLevel.ERROR, "Error: No Helighted row found.", ex);
+                Reporter.ToLog(eLogLevel.ERROR, "Error: No Highlighted row found.", ex);

53-53: 🧹 Nitpick (assertive)

Remove unused WinForms designer import.

The System.Windows.Forms.Design namespace is for WinForms design-time functionality and shouldn't be referenced in a WPF project.

Remove this unused import:

-using System.Windows.Forms.Design;
📜 Review details

Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 3046ed2 and 4ff396f.

📒 Files selected for processing (2)
  • Ginger/Ginger/Functionalities/FindAndReplacePage.xaml.cs (20 hunks)
  • Ginger/Ginger/SolutionWindows/TreeViewItems/NewTreeViewItemBase.cs (2 hunks)
🧰 Additional context used
🧠 Learnings (2)
Ginger/Ginger/SolutionWindows/TreeViewItems/NewTreeViewItemBase.cs (4)
Learnt from: GokulBothe99
PR: Ginger-Automation/Ginger#4188
File: Ginger/GingerCoreNET/RunLib/CLILib/DoOptionsHanlder.cs:22-23
Timestamp: 2025-04-25T13:29:45.059Z
Learning: The `using Amdocs.Ginger.Repository;` statement in Ginger/GingerCoreNET/RunLib/CLILib/DoOptionsHanlder.cs is necessary as it provides access to the `ObservableList<>` class which is used throughout the file for collections of RunSetConfig, AnalyzerItemBase, and ApplicationPOMModel objects.
Learnt from: GokulBothe99
PR: Ginger-Automation/Ginger#4188
File: Ginger/GingerCoreNET/RunLib/CLILib/DoOptionsHanlder.cs:22-23
Timestamp: 2025-04-25T13:29:45.059Z
Learning: The `using Amdocs.Ginger.Repository;` statement in Ginger/GingerCoreNET/RunLib/CLILib/DoOptionsHanlder.cs is necessary as it imports the ObservableList<> class which is used throughout the file.
Learnt from: GokulBothe99
PR: Ginger-Automation/Ginger#4137
File: Ginger/Ginger/SourceControl/SourceControlProjectsPage.xaml.cs:21-21
Timestamp: 2025-03-20T11:10:30.816Z
Learning: The `Amdocs.Ginger.Common.SourceControlLib` namespace is required in files that reference the `GingerSolution` class for source control operations in the Ginger automation framework.
Learnt from: GokulBothe99
PR: Ginger-Automation/Ginger#4137
File: Ginger/Ginger/SourceControl/SourceControlProjectsPage.xaml.cs:21-21
Timestamp: 2025-03-20T11:10:33.780Z
Learning: The `Amdocs.Ginger.Common.SourceControlLib` namespace is required in files that reference the `GingerSolution` class for source control operations in the Ginger automation framework.
Ginger/Ginger/Functionalities/FindAndReplacePage.xaml.cs (5)
Learnt from: prashelke
PR: Ginger-Automation/Ginger#3429
File: Ginger/Ginger/AutomatePageLib/AddActionMenu/WindowExplorer/Common/WindowExplorerPage.xaml.cs:1123-1126
Timestamp: 2024-07-26T22:04:12.930Z
Learning: The user has removed an unnecessary empty line at 1123 in `WindowExplorerPage.xaml.cs` for better code compactness.
Learnt from: GokulBothe99
PR: Ginger-Automation/Ginger#4188
File: Ginger/GingerCoreNET/RunLib/CLILib/DoOptionsHanlder.cs:22-23
Timestamp: 2025-04-25T13:29:45.059Z
Learning: The `using Amdocs.Ginger.Repository;` statement in Ginger/GingerCoreNET/RunLib/CLILib/DoOptionsHanlder.cs is necessary as it provides access to the `ObservableList<>` class which is used throughout the file for collections of RunSetConfig, AnalyzerItemBase, and ApplicationPOMModel objects.
Learnt from: GokulBothe99
PR: Ginger-Automation/Ginger#4188
File: Ginger/GingerCoreNET/RunLib/CLILib/DoOptionsHanlder.cs:22-23
Timestamp: 2025-04-25T13:29:45.059Z
Learning: The `using Amdocs.Ginger.Repository;` statement in Ginger/GingerCoreNET/RunLib/CLILib/DoOptionsHanlder.cs is necessary as it imports the ObservableList<> class which is used throughout the file.
Learnt from: GokulBothe99
PR: Ginger-Automation/Ginger#4137
File: Ginger/Ginger/SourceControl/SourceControlProjectsPage.xaml.cs:21-21
Timestamp: 2025-03-20T11:10:33.780Z
Learning: The `Amdocs.Ginger.Common.SourceControlLib` namespace is required in files that reference the `GingerSolution` class for source control operations in the Ginger automation framework.
Learnt from: GokulBothe99
PR: Ginger-Automation/Ginger#4137
File: Ginger/Ginger/SourceControl/SourceControlProjectsPage.xaml.cs:21-21
Timestamp: 2025-03-20T11:10:30.816Z
Learning: The `Amdocs.Ginger.Common.SourceControlLib` namespace is required in files that reference the `GingerSolution` class for source control operations in the Ginger automation framework.
🔇 Additional comments (5)
Ginger/Ginger/Functionalities/FindAndReplacePage.xaml.cs (5)

332-346: Verify the intentional change from marking visible items to all items.

The method now marks/unmarks all source items instead of just visible (filtered) items. This is a significant behavioral change that could impact performance with large datasets and user expectations.

Please confirm this change is intentional. If users expect only visible items to be affected, consider reverting to the previous behavior or providing separate options for "Mark All" vs "Mark Visible".


472-488: Well-structured button initialization.

The PageButton method properly initializes the window buttons with appropriate text and event handlers.


490-503: Clean implementation of FolderItems context support.

The ShowAsWindow method properly handles the new FolderItems context and integrates the window buttons.


1782-1806: Robust implementation of attribute value updates.

The method properly filters for modified and selected items, updates their values, and handles both success and failure cases with appropriate status updates.


1727-1752: Well-implemented async search functionality.

The method properly manages UI state, handles errors, and automatically selects all found items for user convenience.

Comment thread Ginger/Ginger/Functionalities/FindAndReplacePage.xaml.cs
Comment thread Ginger/Ginger/Functionalities/FindAndReplacePage.xaml.cs
coderabbitai[bot]
coderabbitai Bot previously approved these changes Jun 16, 2025
Comment thread Ginger/GingerCoreCommon/VariablesLib/VariableBase.cs Outdated
Comment thread Ginger/GingerCoreCommon/Functionalities/FindAndReplaceUtils.cs Outdated

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

♻️ Duplicate comments (2)
Ginger/GingerCoreCommon/Functionalities/FindAndReplaceUtils.cs (2)

124-126: ⚠️ Potential issue

[] collection expression requires C# 12 preview → breaks normal builds

OptionalValuesToRepalce = [], relies on the collection-expressions feature that is still preview-only.
Unless the entire solution is compiled with /langversion:preview, this will not compile.

-OptionalValuesToRepalce = [],
+OptionalValuesToRepalce = new List<string>(),

435-439: ⚠️ Potential issue

ReplaceItemEnhanced still ignores fields – 50 % of editable members remain non-updatable

The method exits early when no writable property is found, silently skipping fields that FindTopLevelAttributeNames already surfaced.
This contradicts previous feedback and leaves bulk replace ineffective for field-backed attributes.

-var property = foundItem.ItemObject.GetType().GetProperty(foundItem.FieldName);
-if (property is null || !property.CanWrite)
-{
-    return false;
-}
+var type     = foundItem.ItemObject.GetType();
+var property = type.GetProperty(foundItem.FieldName);
+var field    = property == null
+               ? type.GetField(foundItem.FieldName, BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance)
+               : null;
+
+if (property == null && field == null)          // nothing to write to
+    return false;
+
+bool memberIsReadOnly = property?.CanWrite == false || field?.IsInitOnly == true;
+if (memberIsReadOnly)
+    return false;

Later, use var targetType = Nullable.GetUnderlyingType(property?.PropertyType ?? field!.FieldType) ?? (property?.PropertyType ?? field!.FieldType);
and call property?.SetValue(...) or field!.SetValue(...) accordingly.

Without this change the new “Replace Attribute” mode will fail for every field you expose.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 4ff396f and 189e63c.

📒 Files selected for processing (2)
  • Ginger/GingerCoreCommon/Functionalities/FindAndReplaceUtils.cs (3 hunks)
  • Ginger/GingerCoreCommon/VariablesLib/VariableBase.cs (4 hunks)
🧰 Additional context used
🧠 Learnings (2)
Ginger/GingerCoreCommon/VariablesLib/VariableBase.cs (1)
Learnt from: GokulBothe99
PR: Ginger-Automation/Ginger#4226
File: Ginger/GingerCoreCommon/Repository/BusinessFlowLib/BusinessFlow.cs:234-238
Timestamp: 2025-06-13T12:50:36.132Z
Learning: In the Ginger codebase, the `[AllowUserToEdit("<Label>")]` attribute is intentionally supplied with a string that represents the display label (e.g., `"Description"`, `"Active"`), not a default value. Suggestions to remove or change this parameter should be avoided unless the label itself is incorrect.
Ginger/GingerCoreCommon/Functionalities/FindAndReplaceUtils.cs (1)
Learnt from: GokulBothe99
PR: Ginger-Automation/Ginger#4226
File: Ginger/GingerCoreCommon/Functionalities/FindAndReplaceUtils.cs:457-461
Timestamp: 2025-06-14T09:40:41.306Z
Learning: In the ReplaceItemEnhanced method in FindAndReplaceUtils.cs, the Enum.TryParse call is intentionally case-sensitive (without the ignoreCase parameter), which is the expected behavior as confirmed by the user.
🧬 Code Graph Analysis (2)
Ginger/GingerCoreCommon/VariablesLib/VariableBase.cs (1)
Ginger/GingerCoreCommon/Repository/RepositoryItemAttributes.cs (4)
  • AllowUserToEdit (66-102)
  • AllowUserToEdit (70-73)
  • AllowUserToEdit (79-82)
  • AllowUserToEdit (88-91)
Ginger/GingerCoreCommon/Functionalities/FindAndReplaceUtils.cs (4)
Ginger/GingerCoreCommon/Repository/RepositoryItemBase.cs (7)
  • RepositoryItemBase (58-1570)
  • RepositoryItemBase (721-798)
  • RepositoryItemBase (835-866)
  • RepositoryItemBase (875-886)
  • RepositoryItemBase (1394-1404)
  • RepositoryItemBase (1440-1443)
  • ToString (154-157)
Ginger/GingerCoreCommon/Functionalities/FoundItem.cs (1)
  • FoundItem (27-185)
Ginger/GingerCoreCommon/Repository/RepositoryItemAttributes.cs (12)
  • IsSerializedForLocalRepositoryAttribute (28-64)
  • IsSerializedForLocalRepositoryAttribute (32-35)
  • IsSerializedForLocalRepositoryAttribute (41-44)
  • IsSerializedForLocalRepositoryAttribute (50-53)
  • AllowUserToEdit (66-102)
  • AllowUserToEdit (70-73)
  • AllowUserToEdit (79-82)
  • AllowUserToEdit (88-91)
  • GetDefualtValue (60-63)
  • GetDefualtValue (98-101)
  • ToString (55-58)
  • ToString (93-96)
Ginger/GingerCoreCommon/ReporterLib/Reporter.cs (1)
  • Reporter (28-357)
🔇 Additional comments (1)
Ginger/GingerCoreCommon/VariablesLib/VariableBase.cs (1)

85-120: Attributes added correctly – no issues spotted

The [AllowUserToEdit] annotations are applied consistently with meaningful labels. Good job!

Also applies to: 101-105, 117-120, 152-155

Comment thread Ginger/GingerCoreCommon/Functionalities/FindAndReplaceUtils.cs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants