I copy this to lilypond-devel as well, because I'm interested in the developers' opinion, especially about the third step.

To use point-and-click with jEdit and Adobe Reader in the native build of lilypond:

1. create a jump.bsh file somewhere, possibly in c:\prog\jEdit\macros\Misc\:

// COPY FROM HERE:
void jump()
{
   void run()
   {
       param = args[2];
       view = jEdit.getLastView();
       for ( b : jEdit.getBuffers() ) {
           if (b.getPath().contains("textedit")) {
               jEdit.closeBuffer(view, buffer);
               break;
           }
} param=param.replaceAll("textedit://", "");

       parts=param.split(":");
       line=parts[parts.length-2];
       col=parts[parts.length-1];
fileName = param.substring(0, param.length()-(line.length()+col.length()+2));
       buffer = jEdit.openFile(view, fileName);
       view.goToBuffer(buffer);
textArea = jEdit.getActiveView().getTextArea(); // lily takes a \t character as 8 normal characters.
       line = new Integer(line)-1;
       col = new Integer(col)-1;
       lineText = textArea.getLineText(line);
       // \t will only be one character
       int columnOffset;
       for (columnOffset = 0; col >= 0; columnOffset++, col--) {
            if (lineText.charAt(columnOffset) == '\t') {
                  col -= 7;
               }
           }
       int offset = textArea.getLineStartOffset(line)+columnOffset;
       textArea.setCaretPosition(offset);
}

   if(jEdit.getLastView() == null)
       VFSManager.runInAWTThread(this);
   else
       run();
}

jump();
// COPY UNTIL HERE
-------------------------------
2. create a jedit.bat file in c:\Program Files\LilyPond\usr\bin, with the content

java -jar c:\prog\jedit\jedit.jar -reuseview -run="c:\prog\jEdit\macros\Misc\jump.bsh" %1 %2 %3 %4 %5 %6 %7 %8 %9

Note you must set jump.bsh's directory in the -run parameter
-------------------------------
3. We don't need guile for parameter processing, so change some lines in lilypond-invoke-editor.bat (keep the first lines intact):
...
set LYEDITOR=jedit
:editor
%LYEDITOR% %1 %2 %3 %4 %5 %6 %7 %8 %9

------------------

For running the native lilypond from jEdit, I had to modify the plugin sources, so until that, you could use the System shell in the Console, with the following commands. The first two commands are only necessary before the first build of the file.

cd ${d}
%unset USERPROFILE
"c:\program files\lilypond\usr\bin\lilypond.bat" ${f}

Bert


_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to