Uploaded image for project: 'Teiid Designer'
  1. Teiid Designer
  2. TEIIDDES-2612

Cannot delete a model project with a read-only model in it.

    XMLWordPrintable

Details

    • Workaround Exists
    • Hide

      Delete the read-only file first (Designer will warn the file is read-only, but allow deleting it after a confirmation) and then delete the project

      Show
      Delete the read-only file first (Designer will warn the file is read-only, but allow deleting it after a confirmation) and then delete the project

    Description

      I set up a 2 projects with a single model in it. Project 1 has a read-only -model, Project 2 has a writeable model.

      I can delete Project 2, but Project 1 sends up a error message dialog that it can't delete because the project has a read-only file in it.

      Looking at DeleteResourcesRefactoring.checkResource(), it starts with checking if the resource is in the selected list. If not selected, it'll be an ERROR if a child resources is READ-ONLY, rather than a WARNING.

      Further down the method it checks for read-only state of the resource and will set the message.

      Problem is the Selected/Top-level Project should determine the severity of the read-only check. At most, the message should be an OK/Warning dialog to ask the user "Read-only resources found... do you still wish to delete?"

      adding a method to check that allProjectsSelected() and switching the ERROR read-only status to WARNING at the start of the method seems to work.

      Attachments

        Activity

          People

            blafond Barry LaFond
            blafond Barry LaFond
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: