Hi.
I'm using the default bundle for Java and would like to modify it so that the console output is displayed as plain text in a tool tip, as Venkat is doing here: http://www.youtube.com/watch?v=7vYr12vlwrA#t=329
When I edit the Compile & Run Menu Action to show the output in tool tip and set the format to text the console output is indeed shown in a tool tip but it's shown as HTML. How do prevent TextMate from generating HTML in this case?
Thanks in advance! / Fredrik
On 12 Feb 2014, at 17:09, Fredrik Östling wrote:
[…] When I edit the Compile & Run Menu Action to show the output in tool tip and set the format to text the console output is indeed shown in a tool tip but it's shown as HTML. How do prevent TextMate from generating HTML in this case?
Making this as a modicication of the current command is a little involved, since the current command uses TextMate.Executor to manage running the java compiler, and that API is what outputs the HTML.
It might be simpler to just make a new command with tool tip output, and make that command run your java. I think this should suffice to compile and run a single file:
#!/bin/sh cd "$TM_DIRECTORY" javac "$TM_FILENAME" && java "${TM_FILENAME%.java}"
Set the command to “Save: Current Document” and scope selector to “source.java”.