Announcement Announcement Module
Collapse
No announcement yet.
Why is there no delete command? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Why is there no delete command?

    Hi,

    if I would like to delete some roo managed artefacts I have to do it manually for some of them (e.g. Views, messages files etc).
    I read http://forum.springsource.org/showth...eleting-entity and I agree that Roo should not delete it implicitly.

    But I would like to have a corresponding --remove command option. Is this something what is planned for Roo?

    Thank you

  • #2
    Hm... no one needs this command?

    Comment


    • #3
      I'm not sure what you think you need here. As you probably know Roo already deletes files that are not needed. If you delete the java source file for instance Roo deletes the corresponding itd-files automatically, likewise if you push in all the methods from these.
      The write once files, that I assume is what you want to get rid of, how is Roo supposed to know which ones you don't want to keep around? And why is write-once files the responsibility of Roo, even when it doesn't govern them?

      An automatic remove of, unused or unreferenced files for instance, is better suited for an IDE IMHO.

      If you want to remove files from the command line, also many files at once in a controlled semiautomatic way, on unix systems you only need to utilize grep and rm in another terminal window opened to your your source folders.

      So say you need to get rid of all jspx-files you'd use something like:
      Code:
      find * -regex '.*\.jspx' -exec rm {} ;
      Last edited by MiB; Jan 30th, 2013, 04:49 AM.

      Comment


      • #4
        Originally posted by MiB View Post
        how is Roo supposed to know which ones you don't want to keep around?
        Let's assume that there is a "entity... --remove" command.
        Then Roo should remove all files and changes it generated for this entity:

        * Controller
        * Finders
        * Views
        * Updates in menu.jspx
        * Updates in application.properties

        etc

        Comment


        • #5
          I'm not sure I agree with this being a good idea warranting a delete command. I find such a command superfluous as I have the IDE and the command line for this already. I also feel Roo getting rid of things that are write once can cause too much unexpected behavior.
          But you should make a JIRA-request for this feature and see what happens.
          Last edited by MiB; Jan 29th, 2013, 08:07 AM. Reason: spelling correction

          Comment


          • #6
            I would like to remove finders that I don't want anymore. I can't find out what I shall remove.
            When I try to remove related finders,menu or view roo always recreate those.
            /Gunnar

            Comment


            • #7
              Found it myself!
              /Gunnar

              Comment


              • #8
                We don't delete .java files apart from those managed by the database reverse engineering process.

                Comment

                Working...
                X