jEdit Community - Resources for users of the jEdit Text Editor
Archives
Regular Expressions backreference feature
Submitted by sjoaquim on Thursday, 19 October, 2006 - 18:39
Hi, I've tried to use the standard backreference for regular expressions (\1) in the "Replace with:" field of jEdit's Search and Replace with no success. I also tried to use variations of the common sintax for most regex-oriented languages like Perl or Ruby, which is something like this:
s/<span id=\"([^\"]*)\">/Value is equal to \1/g
But had no success.

Do you know if jEdit implement a different kind of backreference or if it really doesn't implement it at all? If so, wouldn't it be nice to have it?

Thanks!
Plugin install fails: An I/O error occurred (error in opening zip file)
Submitted by cayhorstmann on Friday, 20 October, 2006 - 05:08
I just installed 4.3pre7 and tried to install the XML plugin. The plugin files seem to get downloaded, and then I get a sequence of error dialogs "An I/O error occurred (error in opening zip file)". I use JDK6 (build 102) on Ubuntu 6.06 (Dapper).

I tried blowing away ~/.jedit, and the result is still the same.

I would appreciate any hints.

Thanks,

Cay
jedit ftp (sftp) plugin not working with openssh
Submitted by eero on Friday, 20 October, 2006 - 06:16
Problem appears with newer openssh version, is there working solution to this problem?
Updated Tcl Edit mode (tcl.xml v2006/10/20 by Jean-François Larvoire)
Submitted by larvoire on Friday, 20 October, 2006 - 14:56
Hello,

Here's a much improved Tcl language edit mode, based on the one in the latest source.

Changes:
  • Fixed comments detection: Only # at the beginning of Tcl commands are comments!
  • Quoted strings can span multiple lines.
  • Added recursive in-string substituted command and variable analysis.
  • Added numerous missing tcl keywords and variables up to version 8.4.14.
  • Removed $ on global variable keywords, as they're often used with $::.
  • Added Expect keywords, as KEYWORD2. ("send" was already in tk as KEYWORD2)
  • Avoid colouring substituted variables that are homonyms of a keyword.
  • Highlight hexadecimal numbers too.
Known limitations:
  • Unbalanced quotes or brackets within braces, such as in regular expressions, will confuse the analysis. Add behind the confusing instruction a ;# comment with closing quotes and brackets, to trick it into thinking it's balanced again.
Known bugs (Were there before, and I failed to fix them):
  • \c escape colouring does not work for escapes embedded in words. I attemted numerous workarounds using spans and regexps, but they all seem to fail to detect anything beginning with a \. And using NO_ESCAPE="TRUE" does not help.
  • {} within quoted strings should not affect indentation.
Any hint at how to fix the last two known bugs is welcome!
Trying to get code complete going on jedit 4.3pre7
Submitted by Rom399 on Saturday, 21 October, 2006 - 11:32
I've installed
JavaSide kick
Project Viewer
Ant Farm

running java 1.5

When i try and code complete in a class i get the following : error


java.lang.ArrayIndexOutOfBoundsException: -1:104
at org.gjt.sp.jedit.buffer.JEditBuffer.getText(JEditBuffer.java:520)
at sidekick.java.JavaCompletionFinder.getWordAtCursor(JavaCompletionFinder.java:90)
at sidekick.java.JavaCompletionFinder.complete(JavaCompletionFinder.java:51)
at sidekick.java.JavaParser.complete(JavaParser.java:637)
at sidekick.SideKickActions.complete(SideKickActions.java:101)
at sun.reflect.GeneratedMethodAccessor26.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at bsh.Reflect.invokeMethod(Reflect.java:134)
at bsh.Reflect.invokeStaticMethod(Reflect.java:98)
at bsh.Name.invokeMethod(Name.java:874)
at bsh.BSHMethodInvocation.eval(BSHMethodInvocation.java:75)
at bsh.BSHPrimaryExpression.eval(BSHPrimaryExpression.java:102)
at bsh.BSHPrimaryExpression.eval(BSHPrimaryExpression.java:47)
at bsh.BSHBlock.evalBlock(BSHBlock.java:130)
at bsh.BSHBlock.eval(BSHBlock.java:80)
at bsh.BshMethod.invokeImpl(BshMethod.java:362)
at bsh.BshMethod.invoke(BshMethod.java:258)
at bsh.BshMethod.invoke(BshMethod.java:186)
at org.gjt.sp.jedit.BeanShell.runCachedBlock(BeanShell.java:509)
at org.gjt.sp.jedit.BeanShellAction.invoke(BeanShellAction.java:76)
at org.gjt.sp.jedit.gui.InputHandler.invokeAction(InputHandler.java:440)
at org.gjt.sp.jedit.gui.InputHandler.invokeAction(InputHandler.java:406)
at org.gjt.sp.jedit.gui.DefaultInputHandler.handleKey(DefaultInputHandler.java:373)
at org.gjt.sp.jedit.gui.InputHandler.processKeyEventKeyStrokeHandling(InputHandler.java:295)
at org.gjt.sp.jedit.gui.InputHandler.processKeyEvent(InputHandler.java:184)
at org.gjt.sp.jedit.textarea.TextArea.processKeyEvent(TextArea.java:4557)
at java.awt.Component.processEvent(Component.java:5265)
at java.awt.Container.processEvent(Container.java:1966)
at java.awt.Component.dispatchEventImpl(Component.java:3955)
at java.awt.Container.dispatchEventImpl(Container.java:2024)
at java.awt.Component.dispatchEvent(Component.java:3803)
at java.awt.KeyboardFocusManager.redispatchEvent(KeyboardFocusManager.java:1810)
at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(DefaultKeyboardFocusManager.java:672)
at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(DefaultKeyboardFocusManager.java:920)
at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeyboardFocusManager.java:798)
at java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:636)
at java.awt.Component.dispatchEventImpl(Component.java:3841)
at java.awt.Container.dispatchEventImpl(Container.java:2024)
at java.awt.Window.dispatchEventImpl(Window.java:1774)
at java.awt.Component.dispatchEvent(Component.java:3803)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
Trying to get code complete going on jedit 4.3pre7
Submitted by Rom399 on Saturday, 21 October, 2006 - 11:58
I've installed
JavaSide kick
Project Viewer
Ant Farm

running java 1.5

When i try and code complete in a class i get the following : error


java.lang.ArrayIndexOutOfBoundsException: -1:104
at org.gjt.sp.jedit.buffer.JEditBuffer.getText(JEditBuffer.java:520)
at sidekick.java.JavaCompletionFinder.getWordAtCursor(JavaCompletionFinder.java:90)
at sidekick.java.JavaCompletionFinder.complete(JavaCompletionFinder.java:51)
at sidekick.java.JavaParser.complete(JavaParser.java:637)
at sidekick.SideKickActions.complete(SideKickActions.java:101)
at sun.reflect.GeneratedMethodAccessor26.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at bsh.Reflect.invokeMethod(Reflect.java:134)
at bsh.Reflect.invokeStaticMethod(Reflect.java:98)
at bsh.Name.invokeMethod(Name.java:874)
at bsh.BSHMethodInvocation.eval(BSHMethodInvocation.java:75)
at bsh.BSHPrimaryExpression.eval(BSHPrimaryExpression.java:102)
at bsh.BSHPrimaryExpression.eval(BSHPrimaryExpression.java:47)
at bsh.BSHBlock.evalBlock(BSHBlock.java:130)
at bsh.BSHBlock.eval(BSHBlock.java:80)
at bsh.BshMethod.invokeImpl(BshMethod.java:362)
at bsh.BshMethod.invoke(BshMethod.java:258)
at bsh.BshMethod.invoke(BshMethod.java:186)
at org.gjt.sp.jedit.BeanShell.runCachedBlock(BeanShell.java:509)
at org.gjt.sp.jedit.BeanShellAction.invoke(BeanShellAction.java:76)
at org.gjt.sp.jedit.gui.InputHandler.invokeAction(InputHandler.java:440)
at org.gjt.sp.jedit.gui.InputHandler.invokeAction(InputHandler.java:406)
at org.gjt.sp.jedit.gui.DefaultInputHandler.handleKey(DefaultInputHandler.java:373)
at org.gjt.sp.jedit.gui.InputHandler.processKeyEventKeyStrokeHandling(InputHandler.java:295)
at org.gjt.sp.jedit.gui.InputHandler.processKeyEvent(InputHandler.java:184)
at org.gjt.sp.jedit.textarea.TextArea.processKeyEvent(TextArea.java:4557)
at java.awt.Component.processEvent(Component.java:5265)
at java.awt.Container.processEvent(Container.java:1966)
at java.awt.Component.dispatchEventImpl(Component.java:3955)
at java.awt.Container.dispatchEventImpl(Container.java:2024)
at java.awt.Component.dispatchEvent(Component.java:3803)
at java.awt.KeyboardFocusManager.redispatchEvent(KeyboardFocusManager.java:1810)
at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(DefaultKeyboardFocusManager.java:672)
at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(DefaultKeyboardFocusManager.java:920)
at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeyboardFocusManager.java:798)
at java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:636)
at java.awt.Component.dispatchEventImpl(Component.java:3841)
at java.awt.Container.dispatchEventImpl(Container.java:2024)
at java.awt.Window.dispatchEventImpl(Window.java:1774)
at java.awt.Component.dispatchEvent(Component.java:3803)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
javaIndent.bsh v1.0 by Pierre Grimaud
Submitted by pieroxy on Saturday, 21 October, 2006 - 13:53
This macro will ident the selected lines in the current buffer. The identation of the first line will serve as a reference. Note that the code isn't changed, just some whitespaces added (or removed) at the beginning of each lines. Line 38 and 67 to 81 you can configure your preferred indentation sizes.
Mac os X and JDK 1.5
Submitted by damaru on Saturday, 21 October, 2006 - 19:54
I am sure thisquestion hasbeen asked and answered manytimebut I couldn't yet find the info. . How do you changethe PATH and HOME of your java once Java1.5 is install ?

Thanks
Console subshell path
Submitted by neurophyre on Saturday, 21 October, 2006 - 23:29
Console doesn't recognize my 'subshell path' until I hit 'apply' in the plugin options every time after I load jEdit. This is extremely annoying and can't be working as intended. Is there a workaround for it?
How to launch jEdit from inside another Java program?
Submitted by trader_stuart on Monday, 23 October, 2006 - 10:56
Sorry people this is probably a really dumb question but I've been searching the forum and the net for 2 hours and I can't find the answer.

I have a Java program that maintains a list of web pages. Presently the program is configurable to allow the user to select an editor of choice e.g. NotePad, WordPad, DreamWeaver etc. That editor is opened with the files that the user has selected from a list box. I would like it to be possible for jEdit to be used, however I have failed completely to get jEdit to launch. I have found numerous examples of code on the web that make a call like this -> jEdit.openFile(null, path) but when I use null for the View I get a null pointer exception. I've tried using jEdit.getCurrentView and that returns null (not surprisingly), I've even launched jEdit manually and getCurrentView still returns a null.

What am I missing, I assume this is possible? I don't want multiple instances, I just want a single instance of jEdit running with the ability to set it viewing one or more files that have been selected from inside of my Java program.

Any help most appreciated. I'm running jEdit 4.3pre7 under Windows XP Home.
Project(s)-wide SideKick
Submitted by shlomy on Monday, 23 October, 2006 - 13:46
The SideKick plugin currently provides a tree for the current buffer, which can be updated each time the buffer is modified or another buffer becomes the current buffer.

How about a project-wide SideKick? I normally work on an entire project, not a single buffer. I have many buffers open at the same time and I frequently switch between them (or open new ones). Nearly every single feature/bug fix I write involves several files. A project-wide SideKick could help navigate an entire project - for example, I don't need to know where a function is defined (or even type its name) in order to go to it. I can simply click it in the project-wide SideKick.

To be generally useful, a project-wide SideKick would probably need some filtering, but this in itself is an issue for another discussion. What do you think about a project-wide SideKick? The CtagsSideKick plugin, for example, could use existing (project-wide) tag files to generate much more information than it currently does.
Java process using 50% CPU
Submitted by fabrizim on Monday, 23 October, 2006 - 17:15
Hi all-

First off, jEdit is the best text editor around, hands down. I've used it for several years now and it beats the pants off commercial editors. Anyway, on to my issue.

I just installed the 4.3pre7 on a new machine along with JDK 1.5.0_09, and jEdit's java process is using 50% of my proccessor (according to Task Manager). The problem does not occur with the stable 4.2 build. However, The syntax highlighting and many plugins are much better with the 4.3 version, so I'd rather not use 4.2. This issue does not occur on any of my other PC's.

The computer in question is running Win XP SP 2, on a Dell Dimension E520 w/ an Intel Core 2 Duo proccessor.

Any help is greatly appreciated!

Regards-
Mark
The Jedit.org site is broken!!
Submitted by mjetpax on Monday, 23 October, 2006 - 18:30
When I use this URL:

http://www.jedit.org

Nothing but a blank screen comes up. But, when I use this URL:

http://jedit.org

The site comes up just fine. I just thought I should tell someone. I wasn't sure who to contact though.
Regular Expression Bug in 4.3Pre7
Submitted by icon on Monday, 23 October, 2006 - 22:37
Searching (or replacing) using simply: (.*) causes jEdit to crash (or at least run the CPU up to 100%). I suspect this is related to a previous bug I reported. The expected result would be to retrieve the whole line so that it can be replace in an expression. Perhaps jEdit should have a multi-line switch for regular expression searches?

//i\\
How to compile.
Submitted by morgue_ on Wednesday, 25 October, 2006 - 01:38
Hi,I'm using Ubuntu. I installed jEdit and also the Console Plugin, however, when I try Plugins -> Console -> Javac

I'm getting this:

This shell runs operating system processes.

Press TAB with an empty command line to list built-in commands.
Run built-in with --help argument to get a brief usage message.
Run %help to view Console plugin online help.

Errors generated by compilers and some other programs are listed
for easy one-click access in the 'Plugins->Error List->Error List'
window.
/home/morgue> javac -classpath "$CLASSPATH:/home/morgue/workspace/Week 5 - GUI" -sourcepath "/home/morgue/workspace/Week 5 - GUI" -encoding UTF-8 "/home/morgue/workspace/Week 5 - GUI/NumberGuess2.java"
Process javac exited with code 127
/bin/bash: javac: command not found
/home/morgue>

What should I do?
pango_layout_set_text()
Submitted by djemili on Thursday, 26 October, 2006 - 09:30
When I try to run jEdit I have this problem:

(.:5957): Pango-WARNING **: Invalid UTF-8 string passed to pango_layout_set_text()
[error] AWT-EventQueue-3: java.lang.InternalError: Pango: Invalid UTF-8 string passed to pango_layout_set_text()
[error] AWT-EventQueue-3: at java.la
[error] AWT-EventQueue-3: ng.reflect.Constructor.newInstance(libgcj.so.7)
*** glibc detected *** double free or corruption (!prev): 0x0820c168 ***

Is there any relation with the language of my system?
LANG=ca_ES.UTF-8
LANGUAGE=ca_ES:ca:en_GB:en

I do an export of this two variables trying other most typicall languages (english) but it doesn't work anyway.

How can I solve that? I'm using kubuntu.

Thanks
jEdit 4.2: PorjectViewer Plugin Fails with Swing Error
Submitted by maddog39 on Friday, 27 October, 2006 - 19:20
Hello all, Im using Xubuntu 6.10 and I have jEdit 4.2 installed. I downloaded the ProjectViewer plugin from the plugin manager and whenever I try to use it, it always come up with this beanshell error. java.lang.LinkageError: loader constraints violated when linking org/xml/sax/DTDHandler class at projectviewer.PVActions.newXMLReader(PVActions.java:429) at projectviewer.ProjectManager.loadConfig(ProjectManager.java:172) at projectviewer.ProjectManager.(ProjectManager.java:118) at projectviewer.ProjectManager.(ProjectManager.java:90) at projectviewer.PVMenuProvider.(PVMenuProvider.java:57) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:274) at bsh.Reflect.constructObject(Reflect.java:668) at bsh.BSHAllocationExpression.constructObject(BSHAllocationExpression.java:123) at bsh.BSHAllocationExpression.objectAllocation(BSHAllocationExpression.java:114) at bsh.BSHAllocationExpression.eval(BSHAllocationExpression.java:62) at bsh.BSHPrimaryExpression.eval(BSHPrimaryExpression.java:102) at bsh.BSHPrimaryExpression.eval(BSHPrimaryExpression.java:47) at bsh.Interpreter.eval(Interpreter.java:641) at bsh.Interpreter.eval(Interpreter.java:731) at bsh.Interpreter.eval(Interpreter.java:720) at org.gjt.sp.jedit.BeanShell._eval(BeanShell.java:446) at org.gjt.sp.jedit.BeanShell.eval(BeanShell.java:410) at org.gjt.sp.jedit.menu.EnhancedMenu.init(EnhancedMenu.java:114) at org.gjt.sp.jedit.menu.EnhancedMenu.menuSelected(EnhancedMenu.java:99) at javax.swing.JMenu.fireMenuSelected(JMenu.java:1097) at javax.swing.JMenu$MenuChangeListener.stateChanged(JMenu.java:1190) at javax.swing.DefaultButtonModel.fireStateChanged(DefaultButtonModel.java:362) at javax.swing.DefaultButtonModel.setSelected(DefaultButtonModel.java:228) at javax.swing.JMenu.setSelected(JMenu.java:286) at javax.swing.JMenu.menuSelectionChanged(JMenu.java:1257) at javax.swing.MenuSelectionManager.setSelectedPath(MenuSelectionManager.java:83) at javax.swing.plaf.basic.BasicMenuUI$MouseInputHandler.mouseEntered(BasicMenuUI.java:388) at java.awt.Component.processMouseEvent(Component.java:5109) at java.awt.Component.processEvent(Component.java:4897) at java.awt.Container.processEvent(Container.java:1569) at java.awt.Component.dispatchEventImpl(Component.java:3615) at java.awt.Container.dispatchEventImpl(Container.java:1627) at java.awt.Component.dispatchEvent(Component.java:3477) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3483) at java.awt.LightweightDispatcher.trackMouseEnterExit(Container.java:3323) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3180) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3128) at java.awt.Container.dispatchEventImpl(Container.java:1613) at java.awt.Window.dispatchEventImpl(Window.java:1606) at java.awt.Component.dispatchEvent(Component.java:3477) at java.awt.EventQueue.dispatchEvent(EventQueue.java:456) at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:201) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:145) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:137) at java.awt.EventDispatchThread.run(EventDispatchThread.java:100) I have also never had this problem before, and it always seems to happen on linux. Windows works fine. Please help.
japanese input "bug"
Submitted by Pomax on Sunday, 29 October, 2006 - 14:58
to be honest I don't know if this is some windows-integration jar missing, or whether it's a jedit specific thing - I have a japanse keyboard, and the button that allows me to re-convert highlighted text does absolutely nothing in jedit. Also, typing japanese pops up the windows input dialog instead, so I don't actually type text in the editor itself when using japanese until I commit what I typed.

slight inconvenience, possibly a bug, I have no idea.

- Pomax
www.nihongoresources.com
How to setup Javasidekick for code completion?
Submitted by Savior on Sunday, 29 October, 2006 - 16:35
Hello, I have troubles setting up the code completion feature of Javasidekick. Could someone with more experience than me please explain how to do it? I have ProjectViewer and Javasidekick installed. I tried the following code:

String word = "word";
word.
When I entered the last ".", I waited for some seconds (code completion is set to 0.5s), but nothing happened; ctrl+b (the word completion) did not work either. I have added the rt.jar to the project's classpath in ProjectViewer, but still nothing... what am I missing? Thanks, Savior
Non-standard characters not displayed
Submitted by agoston on Monday, 30 October, 2006 - 15:22
Hi!

When I'm editing a file (even a newly-created one), whatever non-standard characters (e.g. é, á, ü, ö, etc) I type, it's only a small square displayed in place of them. If I edit an existing file and then save it, the non-standard characters get messed up in it (shown as '?' if I look at them with another editor).

This is the command I run jedit with:
.../java/jdk/1.5.0_09/bin/java -Xmx512m -jar /home/agoston/jedit/4.2/jedit.jar $@ 2>/dev/null >/dev/null
(But it behaves the same way with other JVM versions.)

I'm working on SUSE Linux 10.1.

Some relevant settings:
Utilities / Global options / general /
default character encoding: ISO-8859-1 (but there's no difference in behaviour if I set it to e.g. UTF-8)
Auto-detect file encoding when possible: YES

Any idea on how to get jedit to get non-ISO-8859-1 characters right?

Thanks!
Agoston
User login
Browse archives
« October 2006 »
MoTuWeThFrSaSu
 
1
2
5
8
14
18
22
24
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   108250
Context Free Art (*.cfdg)   0.31   46071
BBEdit scheme   1.0   18607
JBuilder scheme   .001   18508
ColdFusion scheme   1.0   18041
R Edit Mode - extensive version   0.1   17488
Advanced HTML edit mode   1.0   16222
Matlab Edit Mode   1.0   16086
jEdit XP icons   1.0   15245
XP icons for jEdit   1.1   14309