Hi TM2 folks,
I would like to request the following feature in TM2:
* In a selected portion, matching identical words. ALthough this can be done by Find in selection menu, it would be more
handy if just by double clicking on a word we could find identical words.
* Editing these identical words by introducing simultaneous carrots.
Sometimes this feature becomes very useful in checking and editing a code.
Cheers,
Riki
Sitting on Textmate 2 9305 and the folding indicators seems to big and
offcenter, or at least offcenter, the same with the icon showing that an
area is folded. Im running this on a Macbook Pro Retina with the native
resolution.
Folded[image: Inline image 1]
Unfolded
[image: Inline image 2]
> Date: Mon, 10 Sep 2012 07:08:15 +1000
> From: David Howden <dhowden(a)gmail.com>
> To: TextMate users <textmate(a)lists.macromates.com>
> Subject: [TxMt] Re: Java Compile and run
> Message-ID:
> <CAP2kWKHah0sAKbNzh9GFwb6q-YfzJ=dqrSUDHgxrLoe9rvjqvg(a)mail.gmail.com>
> Content-Type: text/plain; charset=ISO-8859-1
>
> Right, so I've had a little play with this.
>
> 1. Create a file called helloworld.java and save it on your desktop.
> 2. Put this in it:
> public class helloworld {
> public static void main(String[] args) {
> System.out.println("Hello World!");
> }
> }
> 3. Save again!
> 4. Cmd+R
>
> This runs perfectly for me in TM2 using the default Java bundle. Try
> it on your version (checking and double checking the filename and the
> class name match exactly).
>
> Cheers,
>
> David
Hey David,
I am pleasantly surprised, but your suggestion was what I needed! Apparently, the code I had used (below) didn't have the class defined as public. I don't understand why that would make a difference, but hey, it works, and that's what really matters.
Many thanks!
Michael
class HelloWorldApp {
public static void main(String[] args) {
System.out.println("Hello World!"); //Display the string.
}
}
> [?] compile and run java code [?] cannot find the class file [?]
Do you have multiple sources?
The Compile & Run was initially done for just running a single Java file.
That said, the command does have some poor man?s build system support by allowing you e.g. to set TM_JAVA_FILEGLOB (presumably to ?*.java?) which would call the compiler with all the matches (rather than just the current one).
The alternative would be to set CLASSPATH if you have your class files somewhere. The proper solution though is to use a build system (when you?re doing more than just a quick test).
No, it is only a single file. My wife is taking a beginner class in Java programming, and I am trying to set up a simple environment on our Mac in which she can do her homework. As she is using only very simple single files, and I want her to concentrate on the code and not the programming environment, I would like to enable her to simply press Command-R to compile and run the code. However, it appears that the system is not automatically creating the needed .class file, as shown in the complete output here:
Exception in thread "main" java.lang.NoClassDefFoundError: helloworld
Caused by: java.lang.ClassNotFoundException: helloworld
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
Given all this, what is the best way to configure this poor man's compile-and-run environment?
I have installed the latest iteration of Netbeans IDE, but it is way too much for my wife, at least for the moment.
I have Max OS X 10.8.1 and am using TM 2.0 (9302), and am having trouble getting it to compile and run java code from within TM. It cannot find the class file, as shown here:
Exception in thread "main" java.lang.NoClassDefFoundError: helloworld
Caused by: java.lang.ClassNotFoundException: helloworld
My guess is that a needed environment variable is not set, but I cannot find any documentation on what to set. Any ideas?
I've noticed, in all of the beta versions of TM2 I've tested yet, that
the arrow button to expand the text fields for multiple lines doesn't
work. (See here: http://bit.ly/P3RASq)
Is there a plan to fix this?
Cheers!
--
Nicolas Vaughan
Allan,
thought you might be interested to know: if I set the "Save:" popup to "Nothing" in the bundle editor I no longer see the broken syntax colouring after running my uncrustify command, so it seems to have something to do with saving immediately before. I notice that similar reformatting commands, such as the XML Tidy command also save nothing, and they also work, but they too break if you set "Save:" to "Current Document".
Chris
I just switched from TextMate 1 to TextMate 2. In TextMate 1, it was
possible to have .c and .h files in different folders and when I would use
the command go to file counterpart (⌥⌘↑) it would open the counterpart. In
TextMate 2, it will only open the counterpart if they are in the same
folder. Is there something I'm doing wrong?
Thanks, -- dv
--
View this message in context: http://textmate.1073791.n5.nabble.com/Open-Counterpart-tp25611.html
Sent from the textmate users mailing list archive at Nabble.com.