Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-17418

Enhancement to all Groovy Editing Interfaces to allow easy use of External Groovy Editors

      In all cases the Jenkins Groovy editors are limited. No, I am not asking for more features for the editor itself, but it occurs to me that a fairly simple enhancement to all of these interfaces could make it very easy to hop in/out of your favorite Groovy Editor; Mine is Netbeans.

      Like most editors, Netbeans monitors the disk to notice if the file has been changed outside the editor.

      So if Script Console for instance would after 5 seconds of no typing, save the file to %JENKINS_HOME%/GroovyScript/ScriptConsole.groovy (or whatever) ... I could then stop typing and almost immediately have the current script in Netbeans (assuming Netbeans currently had that file open). Similarly then, once I finish all my auto-tab, intellisensed changes in Netbeans, I hit "save" and the Groovy Console could then pull back in my changes and I could run them. I could easily make changes in either editor as was most convenient and jump back and forth without all the usual copy/paste nonsense.

      Script Console could even offer the previous script back on the start of a new session.

      Groovy Postbuild has the additional issue that Postbuild is on a job by job basis, so it save area might be %JENKINS_HOME%/GroovyScript/%ITEM_ROOTDIR.groovy. (The name isn't important, but you get the idea).

      Scriptler in a sense already has the files saved, but in an XML file with lots of other metadata that gets in the way. It might save a "clean" version of the groovy in %JENKINS_HOME%/GroovyScript/Scripter.groovy. It would not need to offer all the scripts this way . . . only the script currently being edited.

          [JENKINS-17418] Enhancement to all Groovy Editing Interfaces to allow easy use of External Groovy Editors

          Scripler saves its scripts on a local git repo in the file system, this git repo is even exposed via http/ssh.
          I don't see any better way to do this, specially because in a typical use case Jenkins is installed on a server and not on the local PC/Mac with Netbeans/Eclipse installed.

          Dominik Bartholdi added a comment - Scripler saves its scripts on a local git repo in the file system, this git repo is even exposed via http/ssh. I don't see any better way to do this, specially because in a typical use case Jenkins is installed on a server and not on the local PC/Mac with Netbeans/Eclipse installed.

          ikedam added a comment -

          Groovy-postbuild delegates textareas for groovy script to script-security plugin since 2.0.

          I removed groovy-postbuild from components and added script-security instead.

          ikedam added a comment - Groovy-postbuild delegates textareas for groovy script to script-security plugin since 2.0. I removed groovy-postbuild from components and added script-security instead.

          JT Moree added a comment -

          +1 on improving the groovy editor experience.  It is extremely painful to use since the bootstrap based layout of the application wont let me widen the editor.  I can make it taller but not wider.

          I can use the DOM editor to remove (class="col-md-offset-2 col-md-20") but it is not a permanent fix

          JT Moree added a comment - +1 on improving the groovy editor experience.  It is extremely painful to use since the bootstrap based layout of the application wont let me widen the editor.  I can make it taller but not wider. I can use the DOM editor to remove (class="col-md-offset-2 col-md-20") but it is not a permanent fix

            vjuranek vjuranek
            fmerrow Frank Merrow
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: