eclipse-sirius / sirius-desktop

Sirius Desktop: desktop-based graphical modelers for dedicated DSLs
https://eclipse.dev/sirius/
Eclipse Public License 2.0
15 stars 11 forks source link

Provide an UI feature to reset WorkspaceImage style #471

Open GlennPlou opened 1 month ago

GlennPlou commented 1 month ago

Issue description

It is currently difficult and not ergonomic to delete the image associated with a node in a diagram. Today, there are 2 ways of doing this:

A more ergonomic way of deleting an image associated with a node should be provided. Since there's already a dialog for managing the image associated with a node, it would be more efficient to add functionality to the dialog rather than adding yet another context menu or toolbar button.

I propose the following change to solve the described issue: A new “Reset Image Style” button in the dialog. image

Steps to validate:

  1. Import project issue_471 in your workspace from issue_471.zip, open issue_471 package entities diagram, select NewEclass1, open Properties view and the Error Log view. image
  2. Click on Set style to workspace image button from tabbar or Appearancetab in Properties view Expected: The dialog appears. The image path field refers to the actual image issue_471/images/green_beetle.png. The "Reset Image Style" button is enabled. "OK" button is disabled. image
  3. Click on "Reset Image Style" button. Expected: The "Reset Image Style" button is disabled. OK button is enabled. the path is empty.
  4. Select another image in the gallery, such as "blue_beetle.png" in issue_471 > images. Expected: The path refers to issue_471/images/blue_beetle.png. The "Reset Image Style" button is enabled. "OK" button is disabled.
  5. Click on an invalid location, such as an empty place in the gallery, or the project "issue_471" in the tree viewer. Expected: The path is updated with the actual Workspace Image issue_471/images/green_beetle.png. The "Reset Image Style" button is enabled. "OK" button is disabled.
  6. Click on "Reset Image Style" button again, then click "OK". Expected: The style of the node has been updated: the image is not even used, and other custom features are preserved (bold, italic, color label, size label...) image