jEdit Community - Resources for users of the jEdit Text Editor
Archives
Wiki cleaned up and able to send mails
Submitted by Vampire on Sunday, 22 February, 2009 - 21:33
Hi all,

in a long hard piece of work I cleaned up our wiki completely from the spam. I not only fixed the pages, I also deleted all the spam revisions and spam users. I even recreated the TWikiUsers topic how it should be. So now the wiki is cleaned up and usable again. Have fun using it.

Regards
Vampire
Jedit 4.3pre16: automatic identation in C++ mode witchin switch/case blocks
Submitted by SegFault on Monday, 23 February, 2009 - 16:02
Hello. I'm using jedit 4.3pre16 on slackware 12.2 linux, and I had following problem: When I was typing something something like -- switch(index){ case(Choices::done): -- jedit kept moving (case(Choices::done)Smiling line to the left (i.e. was unindenting the line) every time I typed colon (*any* colon - even the one in the middle of Choices::done). I was able to partially fix it by copying cplusplus.xml to ~/.jedit/modes, adding it to ~/.jedit/modes/catalog and replacing --- ?!Smiling).*$" /> --- with --- ?!Smiling).*$" /> --- But I got another problem. Now when I type something like: --- switch(index){ case(Choices::done): break; case(Choices::cancel):{ --- jedit keeps moving "case(Choices::cancel):{" to the right (i.e. indenting) when I type "{". This obviously happens because jedit "thinks" that break is not within indentation block and defines proper indentation level. How can I fix that? I've tried replacing --- --- with regexp that would exclude "case" (something like "(?!\bcase\b.*\(.*\):){"), but this didn't work (it looks like indentOpenBrackets doesn't take regexp as argument). Any ideas?
will not start
Submitted by Tonda on Wednesday, 25 February, 2009 - 15:17
Hi there
After many good works my j-edit will not start. If i click to start, the start picture show how file which boot. At "run startup scripts" j--edit hang up and that's it. I must close the file by process manager.
Please help, because this is a good program.
German prefer...my english is...BAD Eye-wink

Many thanks and greetZ from Germany, Ingo
Buffer switcher not switching buffers
Submitted by jsguru72 on Wednesday, 25 February, 2009 - 22:25
I am running 4.3 pre16 with JDK 1.6.0_11

Most of the time everything works fine, but just today I have twice had the buffer switcher stop working.

I only have 4 or so files open. When I click on the switcher it drops down the list of files. I select one and the switcher updates to display that filename, but the buffer itself does not change. The previously selected file is still there.

If I use the CTRL-PGUP/PGDOWN shortcut it works fine. The problem is only when I use the drop-down.

Right now this issue appears to be random. I closed all of the files and reopened them and the problem went away for a while but within a few minutes, it was back.

I have since restarted the editor entirely. I will advise if it happens again or if I am able to narrow down a set of circumstances where the problem occurs.

Right now, I am just curious if anyone else has experienced this.

Thanks.
How do I define “hidden files” in JEdit?
Submitted by funkyworklehead on Tuesday, 3 March, 2009 - 13:58
When doing recursive directory regular expression search and replace, how do I define which types of files are hidden? In Linux, by default, all files beginning with '.' are "hidden" to the JEdit file system browser and JEdit recursive search. How do I define other file globs to be hidden? How can I tell JEdit to not look in directory 'SCCS'.
PHP Projects Plugin in combination with (S)FTP
Submitted by DerKobe on Wednesday, 4 March, 2009 - 13:40
I discoverd a problem using PHP Projects with the FTP-Plugin. When I tried to remote scan a project the programm got stuck in an infinite loop (as you can see below). Any idea whats going wrong?

Thx, Kobe


13:23:49 [jEdit I/O #1] [debug] DirectoryCache: Cached sftp://admin@ourserver.com:22/var/www/lamda/modules to /Users/Admin/.jedit/cache/cache-431-1236169429442.tmp
13:23:49 [jEdit I/O #1] [debug] DirectoryCache: Cached sftp://admin@ourserver.com:22/var/www/lamda/modules/Global to /Users/Admin/.jedit/cache/cache-432-1236169429698.tmp
13:23:50 [jEdit I/O #1] [debug] DirectoryCache: Cached sftp://admin@ourserver.com:22/var/www/lamda/modules/Global/.. to /Users/Admin/.jedit/cache/cache-433-1236169430941.tmp
13:23:51 [jEdit I/O #1] [debug] DirectoryCache: Cached sftp://admin@ourserver.com:22/var/www/lamda/modules/Global/../Global to /Users/Admin/.jedit/cache/cache-434-1236169431193.tmp
13:23:52 [jEdit I/O #1] [debug] DirectoryCache: Cached sftp://admin@ourserver.com:22/var/www/lamda/modules/Global/../Global/.. to /Users/Admin/.jedit/cache/cache-435-1236169432340.tmp
13:23:52 [jEdit I/O #1] [debug] DirectoryCache: Cached sftp://admin@ourserver.com:22/var/www/lamda/modules/Global/../Global/../Global to /Users/Admin/.jedit/cache/cache-436-1236169432594.tmp
13:23:53 [jEdit I/O #1] [debug] DirectoryCache: Cached sftp://admin@ourserver.com:22/var/www/lamda/modules/Global/../Global/../Global/.. to /Users/Admin/.jedit/cache/cache-437-1236169433760.tmp
13:23:54 [jEdit I/O #1] [debug] DirectoryCache: Cached sftp://admin@ourserver.com:22/var/www/lamda/modules/Global/../Global/../Global/../Global to /Users/Admin/.jedit/cache/cache-438-1236169434015.tmp
13:23:55 [jEdit I/O #1] [debug] DirectoryCache: Cached sftp://admin@ourserver.com:22/var/www/lamda/modules/Global/../Global/../Global/../Global/.. to /Users/Admin/.jedit/cache/cache-439-1236169435174.tmp
13:23:55 [jEdit I/O #1] [debug] DirectoryCache: Cached sftp://admin@ourserver.com:22/var/www/lamda/modules/Global/../Global/../Global/../Global/../Global to /Users/Admin/.jedit/cache/cache-440-1236169435429.tmp
13:23:56 [jEdit I/O #1] [debug] DirectoryCache: Cached sftp://admin@ourserver.com:22/var/www/lamda/modules/Global/../Global/../Global/../Global/../Global/.. to /Users/Admin/.jedit/cache/cache-441-1236169436590.tmp
13:23:56 [jEdit I/O #1] [debug] DirectoryCache: Cached sftp://admin@ourserver.com:22/var/www/lamda/modules/Global/../Global/../Global/../Global/../Global/../Global to /Users/Admin/.jedit/cache/cache-442-1236169436839.tmp
13:23:58 [jEdit I/O #1] [debug] DirectoryCache: Cached sftp://admin@ourserver.com:22/var/www/lamda/modules/Global/../Global/../Global/../Global/../Global/../Global/.. to /Users/Admin/.jedit/cache/cache-443-1236169438009.tmp
etc.
lost all keyboard support
Submitted by audrey on Thursday, 5 March, 2009 - 18:12
jEdit 4.3pre12 java 1.5.0_14, Fedora 10

I suddenly cannot use my keyboard for anything inside jEdit. It was fine earlier today but I tabbed over to jEdit from another app and could not type. I then realised that the keyboard gave no response for anything. After some poking around, I finally simply restarted the machine. When I re-launched jEdit I found the same problem!

I'm guessing it's a Java bug, and not jEdit, but I'm really at a loss to troubleshoot this any further. Can anyone point me in the right direction? Or, any direction, for that matter.

I did let the system update yesterday although, as I said, it was working fine this morning so I can't see how that's the issue.
jedit doesn't reopen files that were open last time when starting
Submitted by onurbi on Friday, 6 March, 2009 - 12:40
Hello,

using Version 4.3 pre 16 under Windows, jedit doesn't reopen the files which has been open when I closed it.

Few years ago I appreciated this feature. I found nothing in the global settings which does switch off or on this feature.

It is not so, that jedit does forget any setting, but for instance the check box of the plugin buffer tabs belongs to the amnesia case.

Regards,

onurbi
JEdit 4.3 pre16 on Windows Vista SLOW scrolling
Submitted by bfredrickson on Friday, 13 March, 2009 - 17:09
There seems to be a 1 second delay between pressing page down and the screen responding.

Subsequent pgdn's don't appear to be cached, so scrolling via the keyboard happens very slowly.

This also happens using the scroll wheel on the mouse.

This also happens using the Vertical Scroll component on the side of the screen. This was not happening on the previous version of JEdit.

Is there a fix / patch, or a command-line switch that will fix this?

Hardware:
Windows Vista Business; 1GB RAM; Athalon 64 X2 4200+; NVIDIA GeForce 7300 GS video card

Thanks!

Blaine Fredrickson
mac version types invisible characters
Submitted by NeoVanGoth on Saturday, 14 March, 2009 - 09:07
I have a very strange issue with jEdit on MacOS X Leopard (current version). I use jEdit mainly for PHP programming and have experienced the following: Sometimes when I type correct code, I get strange syntax errors at whitespacec somewhere in the middle of an expression. When I set the line as comment and retype it below, it's working.
After seeing this behaviour several times, I looked at the code with a hex editor and saw, that those syntax errors are no single whitespaces, but indeed two bytes, which look like UTF-16 characters! I think it maybe happens for example when I type | (alt+7 on mac) and after that a space, maybe while still holding down alt (it happens when you type fast...). As in MacOS, nearly everything is a hotkey for some unicode character, I thought of that, but I couldn't reproduce it clearly.

Does anyone know this behaviour? I use the latest version of jEdit, but encountered the issue with several other versions too. The JRE is apple default, as it can't be upgraded with Sun JRE or something.
Maybe there is some way to tell the jEdit textarea to only recognize some default characters (ASCII + maybe some selfdefined unicode chars [I need umlauts])?!

Thanks and regards,
Neo / Tom
Keyboard Focus in Text Area
Submitted by ggblack on Wednesday, 18 March, 2009 - 13:14
I have just started using jedit (4.3pre16 under Mandriva Linux 2009) and I have found it so far a pleasure to use. However one aspect of its operation has proved an annoyance, and so I would like to know if this is a feature I have to live with, or that I am missing something.

I prefer to use the keyboard as much as possible, and only revert to the mouse where absolutely necessary. I find that whenever I trigger a command from a shotcut that presents an input dialog, I am left in a keyboard limbo when the dialog closes. The only way I have found to return to editing the text with the keyboard is to click into the text area with the mouse, which I would naturally prefer not to have to do, but rather find a keyboard solution. An example would be the "go to line" shortcut.

Any help would be much appreciated.
Select From Gutter With Right-Click
Submitted by ehtyar on Thursday, 19 March, 2009 - 00:43
Hi all.

I'm a recent jEdit convert from Notepad++. My primary motivation for converting was for a consistent experience across platforms (namely Linux vs. Windows), but I'm very impressed with jEdit all-round.

The only feature I'm missing is being able to select text blocks from the Gutter. I understand that this cannot be implemented with left-click because it would interfere with code-folding which I totally understand. After some experimentation I found that selecting from the gutter works with right-click. Unfortunately, it also triggers the standard context menu.

My request is, would it be possibly to have right-click on the gutter not display the context menu to make it possible to select text blocks from the gutter. I would very much appreciate consideration of this new feature.

Thank you, Ehtyar.
Open Selection with Extension (Open_Selection_with_Extension.bsh v1.0 by Gael Ecorchard)
Submitted by galou on Thursday, 19 March, 2009 - 08:25
Opens the file which base name is the selected text and which extension is identical to the one of the file where the text is selected - creates the file if it does not exist.
What is the community's opinion of "Jedit X"?
Submitted by Todd on Saturday, 21 March, 2009 - 14:11
This is probably as good a place as any to post this question. I have been a long-time jEdit user, but since moving to a Mac I've been frustrated with its lack of "Cocoa-ness." Progress has been made with the interface *looking* more Mac-centric, but the software itself doesn't play especially well with OSX.

So when I stumbled on "Jedit X," I was excited at first, thinking I'd finally found a Cocoa version of jEdit. This doesn't seem to be entirely true. While the first paragraph describing Jedit X says it is "the result of re-building the software entirely from scratch in Cocoa to best take advantage OS X's capabilities," a line further down says "Our Jedit is a native Macintosh application and is totally unrelated to the Java editor 'jEdit.'" Not quite sure how both can be true. The two programs certainly have similarities, but a lot of differences, too. Boiling it down to the biggest advantages & disadvantages from my view, it has a lot of the same powerful text-editing functions and search capability but with better OSX integration, but doesn't have the Plugin Manager or even compatibility with manual jEdit plugin installation (unless I'm missing something). Of course another advantage/disadvantage, depending on how you look at it, is the fact that Jedit X is a commercial product.

I'm still hoping there will one day be a Cocoa version of jEdit itself that stays current, or close to current with the Java version. Is that even remotely possible? What is the jEdit community's opinion of "Jedit X"? Is it viewed as a rip-off or a legitimate commercial offshoot of jEdit?

Thanks,

Todd
Highlight plugin - fixed matching of end-of-line with '$' and beginning-of-line with '^' (Highlight.jar v0.2 by Shlomy Reinstein)
Submitted by shlomy on Monday, 23 March, 2009 - 21:43

Updated on 03/24/2009 - 07:33
Downloads: 1027

java.net.ConnectException: Connection refused
Submitted by audrey on Wednesday, 25 March, 2009 - 02:36
I updated my Fedora 10 box yesterday and now cannot launch jEdit. At least, I'm assuming the update is responsible. There was nothing else that I can think of that might have changed. When it launches, I see only a white screen, no window at all. I can see my gnome panels, though. The following is from activity.log: java.version=1.5.0_14 java.vm.version=1.5.0_14-b03 java.runtime.version=1.5.0_14-b03 java.vendor=Sun Microsystems Inc. java.compiler=null os.name=Linux os.version=2.6.27.19-170.2.35.fc10.i686 os.arch=i386 user.home=/home/audrey java.home=/usr/lib/jvm/java-1.5.0-sun-1.5.0.14/jre java.class.path=/home/audrey/jedit/4.3pre12/jedit.jar An error occurred while connecting to the jEdit server instance. This probably means that jEdit crashed and/or exited abnormally the last time it was run. If you don't know what this means, don't worry. java.net.ConnectException: Connection refused at java.net.PlainSocketImpl.socketConnect(Native Method) at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333) at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195) at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182) at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366) at java.net.Socket.connect(Socket.java:520) at java.net.Socket.connect(Socket.java:470) at java.net.Socket.(Socket.java:367) at java.net.Socket.(Socket.java:209) at org.gjt.sp.jedit.jEdit.main(jEdit.java:247) My yum.log shows the following were updated: selinux-policy-targeted-3.5.13-49.fc10.noarch postgresql-libs-8.3.7-1.fc10.i386 postgresql-8.3.7-1.fc10.i386 postgresql-server-8.3.7-1.fc10.i386 postgresql-plperl-8.3.7-1.fc10.i386 postgresql-plpython-8.3.7-1.fc10.i386 gtk2-2.14.7-7.fc10.i386 lcms-1.18-1.fc10.i386 lcms-libs-1.18-1.fc10.i386 libX11-devel-1.1.5-1.fc10.i386 libX11-1.1.5-1.fc10.i386 xorg-x11-drv-vesa-2.2.0-3.fc10.i386 I'm going to assume (I know--a lot of assumptions here) that Postgres and Little CMS have nothing to do with it. I know next to nothing about Java sockets or jEdit server. Could the gtk or x11/xorg updates possibly be at fault? BTW, I did try to upgrade jEdit before posting here, but that's been a bit of a problem itself, and is the subject of the next post I'll be making. I figured I should keep them separate.
installer jar fails
Submitted by audrey on Wednesday, 25 March, 2009 - 03:02
  • I just posted the "java.net.ConnectException: Connection refused" thread below, about sudden problems 4.3pre12 (it had been fine for a while). Before posting, I thought to check for a newer release and tried installing 4.3pre16 but have encountered other problems. When I try to launch the jar installer, I get the following backtrace and the installer window is blank and completely unresponsive. Anyone know what this might mean?
  • BTW, I have to use list items here because the forum otherwise disappears my newlines. Maybe allowing code blocks would be good. Also, preview only seems to work for comments, not new threads.
  • $ java -jar jedit4.3pre16install.jar
  • Locking assertion failure. Backtrace:
  • #0 /usr/lib/libxcb-xlib.so.0 [0xdfc767]
  • #1 /usr/lib/libxcb-xlib.so.0(xcb_xlib_unlock+0x31) [0xdfc831]
  • #2 /usr/lib/libX11.so.6(_XReply+0x254) [0x24bf54]
  • #3 /usr/lib/jvm/java-1.5.0-sun-1.5.0.14/jre/lib/i386/xawt/libmawt.so [0xab22cd7e]
  • #4 /usr/lib/jvm/java-1.5.0-sun-1.5.0.14/jre/lib/i386/xawt/libmawt.so [0xab216d47]
  • #5 /usr/lib/jvm/java-1.5.0-sun-1.5.0.14/jre/lib/i386/xawt/libmawt.so [0xab216ec3]
  • #6 /usr/lib/jvm/java-1.5.0-sun-1.5.0.14/jre/lib/i386/xawt/libmawt.so(Java_sun_awt_X11GraphicsEnvironment_initDisplay+0x26) [0xab217106]
  • #7 [0xb4003bfa]
  • #8 [0xb3ffdb3b]
  • #9 [0xb3ffdb3b]
  • #10 [0xb3ffb219]
  • #11 /usr/lib/jvm/java-1.5.0-sun-1.5.0.14/jre/lib/i386/client/libjvm.so [0xb79d82bc]
  • #12 /usr/lib/jvm/java-1.5.0-sun-1.5.0.14/jre/lib/i386/client/libjvm.so [0xb7aecf98]
  • #13 /usr/lib/jvm/java-1.5.0-sun-1.5.0.14/jre/lib/i386/client/libjvm.so [0xb79d80ef]
  • #14 /usr/lib/jvm/java-1.5.0-sun-1.5.0.14/jre/lib/i386/client/libjvm.so(JVM_DoPrivileged+0x32d) [0xb7a35b9d]
  • #15 /usr/lib/jvm/java-1.5.0-sun-1.5.0.14/jre/lib/i386/libjava.so(Java_java_security_AccessController_doPrivileged__Ljava_security_PrivilegedAction_2+0x3d) [0xb781f30d]
  • #16 [0xb40034ab]
  • #17 [0xb3ffda64]
  • #18 [0xb3ffb219]
  • #19 /usr/lib/jvm/java-1.5.0-sun-1.5.0.14/jre/lib/i386/client/libjvm.so [0xb79d82bc]
  • Locking assertion failure. Backtrace:
  • #0 /usr/lib/libxcb-xlib.so.0 [0xdfc767]
  • #1 /usr/lib/libxcb-xlib.so.0(xcb_xlib_lock+0x2e) [0xdfc90e]
  • #2 /usr/lib/libX11.so.6 [0x24b0e9]
  • #3 /usr/lib/libX11.so.6(XGetVisualInfo+0x26) [0x241216]
  • #4 /usr/lib/jvm/java-1.5.0-sun-1.5.0.14/jre/lib/i386/xawt/libmawt.so [0xab216089]
  • #5 /usr/lib/jvm/java-1.5.0-sun-1.5.0.14/jre/lib/i386/xawt/libmawt.so [0xab2162d3]
  • #6 /usr/lib/jvm/java-1.5.0-sun-1.5.0.14/jre/lib/i386/xawt/libmawt.so [0xab216f71]
  • #7 /usr/lib/jvm/java-1.5.0-sun-1.5.0.14/jre/lib/i386/xawt/libmawt.so(Java_sun_awt_X11GraphicsEnvironment_initDisplay+0x26) [0xab217106]
  • #8 [0xb4003bfa]
  • #9 [0xb3ffdb3b]
  • #10 [0xb3ffdb3b]
  • #11 [0xb3ffb219]
  • #12 /usr/lib/jvm/java-1.5.0-sun-1.5.0.14/jre/lib/i386/client/libjvm.so [0xb79d82bc]
  • #13 /usr/lib/jvm/java-1.5.0-sun-1.5.0.14/jre/lib/i386/client/libjvm.so [0xb7aecf98]
  • #14 /usr/lib/jvm/java-1.5.0-sun-1.5.0.14/jre/lib/i386/client/libjvm.so [0xb79d80ef]
  • #15 /usr/lib/jvm/java-1.5.0-sun-1.5.0.14/jre/lib/i386/client/libjvm.so(JVM_DoPrivileged+0x32d) [0xb7a35b9d]
  • #16 /usr/lib/jvm/java-1.5.0-sun-1.5.0.14/jre/lib/i386/libjava.so(Java_java_security_AccessController_doPrivileged__Ljava_security_PrivilegedAction_2+0x3d) [0xb781f30d]
  • #17 [0xb40034ab]
  • #18 [0xb3ffda64]
  • #19 [0xb3ffb219]
persist search settings by buffer
Submitted by greghk on Saturday, 28 March, 2009 - 03:37
I search some files backward by default. It would be nice to have the equivalent to the :folding command that you can insert into a buffer to persist folding options. Something like :search=backward to default the search direction in this buffer to backward. Perhaps other users have other search options that they are constantly setting for certain files that a mechanism like this could persist as well.
Installing plugins without network?
Submitted by neigaard on Monday, 30 March, 2009 - 11:41
I have a Jedit on a machine with network, and also one on a machine without network. Can I somehow copy my plugins to the machine without network, and make them work there? I have tried copying all the jars from the plugin dir, but I get strange errors like this:

java.lang.NoClassDefFoundError: gnu/regexp/REException
at buffertabs.BufferTabs.propertiesChanged(Unknown Source)
at buffertabs.BufferTabs.start(Unknown Source)
at buffertabs.BufferTabsPlugin.addBufferTabsToEditPane(Unknown Source)
at buffertabs.BufferTabsPlugin.toggleBufferTabsForEditPane(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.gjt.sp.jedit.bsh.Reflect.invokeMethod(Reflect.java:134)
at org.gjt.sp.jedit.bsh.Reflect.invokeStaticMethod(Reflect.java:98)
at org.gjt.sp.jedit.bsh.Name.invokeMethod(Name.java:871)
at org.gjt.sp.jedit.bsh.BSHMethodInvocation.eval(BSHMethodInvocation.java:75)
at org.gjt.sp.jedit.bsh.BSHPrimaryExpression.eval(BSHPrimaryExpression.java:102)
at org.gjt.sp.jedit.bsh.BSHPrimaryExpression.eval(BSHPrimaryExpression.java:47)
at org.gjt.sp.jedit.bsh.BSHBlock.evalBlock(BSHBlock.java:130)
at org.gjt.sp.jedit.bsh.BSHBlock.eval(BSHBlock.java:80)
at org.gjt.sp.jedit.bsh.BshMethod.invokeImpl(BshMethod.java:362)
at org.gjt.sp.jedit.bsh.BshMethod.invoke(BshMethod.java:258)
at org.gjt.sp.jedit.bsh.BshMethod.invoke(BshMethod.java:186)
at org.gjt.sp.jedit.BeanShellFacade.runCachedBlock(BeanShellFacade.java:225)
at org.gjt.sp.jedit.BeanShell.runCachedBlock(BeanShell.java:441)
at org.gjt.sp.jedit.BeanShellAction.invoke(BeanShellAction.java:73)
at org.gjt.sp.jedit.gui.InputHandler.invokeAction(InputHandler.java:352)
at org.gjt.sp.jedit.jEdit$4.invokeAction(jEdit.java:3083)
at org.gjt.sp.jedit.jEdit$4.invokeAction(jEdit.java:3067)
at org.gjt.sp.jedit.EditAction$Wrapper.actionPerformed(EditAction.java:220)
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
at javax.swing.AbstractButton.doClick(Unknown Source)
at javax.swing.plaf.basic.BasicMenuItemUI.doClick(Unknown Source)
at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(Unknown Source)
at java.awt.AWTEventMulticaster.mouseReleased(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
Caused by: java.lang.ClassNotFoundException: gnu.regexp.REException
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at org.gjt.sp.jedit.JARClassLoader.loadFromParent(JARClassLoader.java:469)
at org.gjt.sp.jedit.JARClassLoader.loadClass(JARClassLoader.java:86)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
... 54 more
Solution: Launching External Apps From Macros
Submitted by ehtyar on Wednesday, 1 April, 2009 - 00:25
Hi guys.

When i first moved to jEdit, I was extremely frustrated by the way Java launches external apps (via Runtime.getRuntime().exec()). It decided internally whether or not you should see a console window for a console program and other stupid stuff like that. There are solutions all over the place using cmd /c and cmd /k to remedy this problem, but that all gets very messy when you're dealing with batch files.

To solve this problem, I downloaded ShellExecute by OptimumX (http://www.optimumx.com/), which basically just uses ShellExecuteEx() to launch the app specified on the command line. When launching apps via this utility, they behave as you would expect them to.

To use it, put it in your jre bin directory, or somewhere in your path environment variable, and use it in your macro like so:

path = buffer.getPath().substring(0, buffer.getPath().lastIndexOf("\\"));
Process proc = Runtime.getRuntime().exec("ShellExecute.exe /F:cmd.exe", null, new File(path));

That example macro will open a command prompt in the directory containing the document of the current buffer.

Hope this helps some people out.

Ehtyar.
User login
Browse archives
« February 2009 »
MoTuWeThFrSaSu
 
1
4
5
7
8
10
14
15
16
17
18
19
20
21
24
26
27
28
 
Poll
Are you interested in language packs for jEdit?
Yes, and I could help maintain translations
26%
Yes, I'd like to have translations
32%
Indifferent
35%
No, that'd be bad (please comment)
7%
Total votes: 1093
Syndication
file   ver   dls
German Localization light   4.4.2.1   99587
Context Free Art (*.cfdg)   0.31   46062
BBEdit scheme   1.0   18601
JBuilder scheme   .001   18502
ColdFusion scheme   1.0   18031
R Edit Mode - extensive version   0.1   17480
Advanced HTML edit mode   1.0   16213
Matlab Edit Mode   1.0   16075
jEdit XP icons   1.0   15236
XP icons for jEdit   1.1   14300