jEdit Community - Resources for users of the jEdit Text Editor
Archives
Edit Mode Priorities
Submitted by Anonymous on Friday, 4 February, 2005 - 08:34
Hi, if there is a clash with file extensions (in my case .pl - perl and prolog), is there a way of specifying which takes priority? In this case, the default is the perl edit mode, however I would like it to be prolog. Adding an entry into the catalog file simply stating that .pl should be prolog did not resolve the matter.

Thanks,
Mike
unescape a unicode escape sequence
Submitted by Anonymous on Friday, 4 February, 2005 - 16:27
Hi, I'm trying to convert unicode escape sequences to characters. Can someone recommend a good strategy for writing a macro ( or a BeanShell snippet for use in Search Replace dialog? )?

Basically I want to search for this pattern:

(\\u00[[:alnum:]][[:alnum:]]) which matches things like \u00E9

and I want to replace it with:

new Character( $1 ); where $1 is the match from the pattern search.

Is there a way to do this using SearchReplace? Or do I need to iterate through the lines of the current buffer and do replacements on each line?

Thanks for any tips. jEdit Rules my world!!

-Travis McCauley
Toronto
error when opening multiple files, jedit 4.2 xp sp1
Submitted by Anonymous on Friday, 4 February, 2005 - 18:16
i installed jedit 4.2 and have the launcher from www.mbisping.de/jedit/launcher.html on xp sp1

i have been able to associate various file extensions to open in jedit by default. i also went through the registry and made sure any reference to jedit now refers to the launcher: "c:\program files\jedit 4.2" -reuseview "%L"

this works well when i open one file. when i open a second file, whether by double clicking the icon or using the context menu, i get the errors pasted below. does anyone know how i can fix this?

[error] EditBus: Exception while sending message on EditBus:
[error] EditBus: java.lang.NoSuchMethodError: org.gjt.sp.jedit.EBMessage.getSource()Lorg/gjt/sp/jedit/EBComponent;
[error] EditBus: at bufferselector.BufferSelector.handleMessage(Unknown Source)
[error] EditBus: at org.gjt.sp.jedit.EditBus.send(EditBus.java:148)
[error] EditBus: at org.gjt.sp.jedit.EditPane.setBuffer(EditPane.java:117)
[error] EditBus: at org.gjt.sp.jedit.View.setBuffer(View.java:967)
[error] EditBus: at org.gjt.sp.jedit.jEdit.openFiles(jEdit.java:1365)
[error] EditBus: at org.gjt.sp.jedit.EditServer.handleClient(EditServer.java:252)
[error] EditBus: at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[error] EditBus: at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
[error] EditBus: at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
[error] EditBus: at java.lang.reflect.Method.invoke(Unknown Source)
[error] EditBus: at bsh.Reflect.invokeOnMethod(Reflect.java:149)
[error] EditBus: at bsh.Reflect.invokeStaticMethod(Reflect.java:100)
[error] EditBus: at bsh.Name.invokeMethod(Name.java:872)
[error] EditBus: at bsh.BSHMethodInvocation.eval(BSHMethodInvocation.java:72)
[error] EditBus: at bsh.BSHPrimaryExpression.eval(BSHPrimaryExpression.java:102)
[error] EditBus: at bsh.BSHPrimaryExpression.eval(BSHPrimaryExpression.java:47)
[error] EditBus: at bsh.BSHAssignment.eval(BSHAssignment.java:77)
[error] EditBus: at bsh.Interpreter.eval(Interpreter.java:641)
[error] EditBus: at bsh.Interpreter.eval(Interpreter.java:731)
[error] EditBus: at bsh.Interpreter.eval(Interpreter.java:720)
[error] EditBus: at org.gjt.sp.jedit.BeanShell._eval(BeanShell.java:446)
[error] EditBus: at org.gjt.sp.jedit.BeanShell.eval(BeanShell.java:410)
[error] EditBus: at org.gjt.sp.jedit.EditServer$1.run(EditServer.java:343)
[error] EditBus: at java.awt.event.InvocationEvent.dispatch(Unknown Source)
[error] EditBus: at java.awt.EventQueue.dispatchEvent(Unknown Source)
[error] EditBus: at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
[error] EditBus: at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
[error] EditBus: at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
[error] EditBus: at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
[error] EditBus: at java.awt.EventDispatchThread.run(Unknown Source)
ProjectViewer: No easy way to start an instance of it?
Submitted by malyvelky on Friday, 4 February, 2005 - 22:06
Hi, until recently I wasn't able to use ProjectViewer because there was no way to start it. There is no menu entry 'Start Project Viewer' or "New floating P. W,'. Finally I discovered I can use the plugin's actions 'Project Viewer (new floating instance' and 'Project Viewer (toggle)' to add them to the main jEdit context menu and start it from there. But I'm sure this is not the normal way. Is there something missing in my ProjectViewer's menu or is this normal? Thanks! /Kuba
Impossible to listen to keys typed in 1 buffer?
Submitted by malyvelky on Saturday, 5 February, 2005 - 03:43
Hi,
I need to get notified whenever a user types a (word constituent) key in a particular buffer because I want to make a text autocompletion feature. But so far I wasn't able to figure out how to do it. I'm only interested in keystrokes in the given buffer. 1. If I use view.setKeyEventInterceptor I grab keys from the whole view and not only the buffer (i.e. the text area) and, moreover, I prevent them from being processed further even though I call view.processKeyEvent afterwards. 2. I tried to add my listener to the textArea ( view.getTextArea() ) but there seems to be only one text area common to all buffers because when I registered it in my constructor with view.getTextArea() the listener received keys no matter what was the active buffer at the moment.
I'd very appreciate if you could advice me how to manage to listen to keys only from one buffer. Thanks! /Kuba
JDoc usage question
Submitted by Anonymous on Saturday, 5 February, 2005 - 04:33
I'm having a problem using JDoc. JDoc seems to apend a "@" character to the front of the Source File Names. I've tried several different combination of paths and no paths, wildcard and specific file names butcould never get it to work (javadoc rejects the "@" character).

Any help would be GREATLY appreciated.

--Greg
Beanshell: How to load/define a class?
Submitted by malyvelky on Saturday, 5 February, 2005 - 14:51
Hi, I'm using beanshell in my jedit development to test my classes. If I compile the class how can I load it into beanshell so that I could instantiate (without an URLClassLoader and that stuff)? The original beanshell let you load a class but the necessary package bsh.classpath is not in jEdit. Thanks!
iEdit Launcher-like program (doesn't need .NET) (windows_runjedit.zip v1.0 by Kuba)
Submitted by malyvelky on Saturday, 5 February, 2005 - 15:00
Do you miss jEditLauncher? Use RunjEdit!

PURPOSE
--------
This tiny program runs jEdit and gives it over any command-line parameter such as filenames. You can use it to open files in jEdit. For example you can associate some file extension such as .java with it or you can create a link to it from your directory C:\Documents and Settings\\SendTo so that you can open any file in it via the context menu "Send To".

It runs jEdit with the option -reuseview thus opening a file in an existing instance of jEdit unless jEdit is not yet running.

REQUIREMENTS
-------------
1. The program must be in the same directory as jedit.jar because it looks there for it (unpack the zip and move runjedit.exe to wherever your jEdit is.
2. You Java executable must be named javaw.exe and it must be on the system %PATH%

(To modify the PATH variable right-click on "My Computer" on the desktop and select "Properties". In the System Properties window click on the "Advanced" tab. In the Advanced section click the "Environment Variables" button. If you're an Admin edit the variable PATH otherwise add a new user variable called PATH with the value (modified for your computer):
C:\my\path\to\dir\with\javaw.exe;%PATH%
and log out and back in again.)

3. Runjedit have only been tested under Windows 2000/XP but hopefully it runs elsewhere too.

DEVELOPMENT
------------
Runjedit was developed with Dev-C++ but except for the icon it's an ordinary C++ program not bound to Dev-C++.

BUGS
-----
If you find any bugs let me know to maly.velky@email.cz

PS: I've realized that somebody else has published something similar a few days ago and it might be better but since it requires .NET I do release this for those who haven't it.
Words disappearing
Submitted by Anonymous on Sunday, 6 February, 2005 - 00:16
I'm having trouble when ever I type the words 'in', 'and', as well as 'or' they disappear into a little box. Can somebody tell me what setting I need to change?

Thank you.
Load Classes To Instantiate (Load_Classes2Instantiate.bsh v1.1 by Jakub (Kuba) Holy)
Submitted by malyvelky on Sunday, 6 February, 2005 - 13:57
Load compiled classes not on the class path whose instances you want to create. This macro is useful for users of BeanShell - it defines a function that loads compiled classes and returns them in a hashtable.

Load classes given by the user into a Hashtable mapping full class name to Class. Either all classes under a given directory are loaded (see loadAllClassesRecurs( packageBaseDirName )) or the user is presented with a browser to select the classes to load (ctrl+click for multiple selection!!!; see loadClassesWithBrowser(view)) and then is asked to say what's the directory part of the path and what's a fully qualified name of one of the selected classes.

USAGE:
  1. Open the macro in a buffer and evaluate the buffer in beanshell to make the functions available
  2. theClassHashtable = loadClassFromFile();
  3. myClass = theClassHashtable.get("mypackage.MyClass");
  4. a) - no-argument constructor:
    myObj = myClass.newInstance();
  5. b) - constructor taking an integer and string:
    myObj = myClass.getConstructor(new Class[]{Integer.TYPE, String.class})
    .newInstance( new Object[]{ 5, "xx" });

Notice: This macro is not intended to be run directly. Instead, you open it in a buffer, evaluate it and use its methods from beanshell.
See the source file for an example of a script to setup instances of classes I want to test, for help with file browser and additional info. Inside I refer to this script under the name Load_Classes2Instantiate while your is probalby named Load_Classes_To_Instantiate

CHANGELOG:
Updated the example script to load & instantiate classes to test.
Ruby Edit Mode - Minor correction (ruby.xml v0.6 by Karl von Laudermann)
Submitted by doodpants on Monday, 7 February, 2005 - 06:07
Fixed misspelling of $LOAD_PATH, so it now highlights properly.
Insert Newline and Indent
Submitted by Anonymous on Monday, 7 February, 2005 - 16:53
Am I missing some cofig choice regarding "Insert Newline and Indent"? If I space over, say 10 spaces, enter 'x' then , the following line contains 2 tabs and 2 spaces. Was expecting it to have 10 spaces. It appears some feature I'm not aware of is automatically converting spaces to tabs during the Indent. I don't want "Soft Tabs" as I want a tab to be a tab; but neither do I want spaces to become tabs.
ELF binary type "0" not known
Submitted by Anonymous on Tuesday, 8 February, 2005 - 11:09
Hi.When i first time run jedit it works fine then i turn off my computer and when i turned on the next time and try to run jedit i get a message: ELF binary type "0" not known.
Abort trap
I am using FreeBSD and jedit installed from ports.Please help me to solve the problem.Thanks.
A simple filter macro?
Submitted by Anonymous on Tuesday, 8 February, 2005 - 17:08
Hi all,

I am after a simple macro which would pass the selected text to an external process through stdin and replace the selected text by the stdout output of the external process. Any idea how to do that?

Thanks a lot.

Victor.
All Buffer Replace broken
Submitted by Anonymous on Wednesday, 9 February, 2005 - 18:28
4.2final. Search and replace -- replace all when "all buffers" is checked is broken. Says it found 0 occurances, even though there are many, including in the current buffer.
Installing w/ JDK1.3
Submitted by Anonymous on Thursday, 10 February, 2005 - 05:56
I need to use JDK1.3 even though other JDK versions are also installed.

So this is what I tried:

  • in build.xml, I added target="1.1" and "source=1.3" to the compile target.
  • in build.xml, I commented out the jdk14 and jdk15 properties in the init target
So now everything builds, but running it yields an error:
/home/java/pc.i86.linux/blackdown-j2sdk.1.3.0/bin/java org.gjt.sp.jedit.jEdit                        
error] AWT-EventQueue-0: Exception occurred during event dispatching:
[error] AWT-EventQueue-0: java.lang.NoSuchMethodError
[error] AWT-EventQueue-0:  at org.gjt.sp.jedit.gui.TipOfTheDay.(TipOfTheDay.java:94)
[error] AWT-EventQueue-0:  at org.gjt.sp.jedit.jEdit.newView(jEdit.java:2200)
[error] AWT-EventQueue-0:  at org.gjt.sp.jedit.PerspectiveManager$PerspectiveHandler.endElement(PerspectiveManager.java:344)
[error] AWT-EventQueue-0:  at com.microstar.xml.XmlParser.parseETag(XmlParser.java:1041)
[error] AWT-EventQueue-0:  at com.microstar.xml.XmlParser.parseContent(XmlParser.java:1112)
[error] AWT-EventQueue-0:  at com.microstar.xml.XmlParser.parseElement(XmlParser.java:947)
[error] AWT-EventQueue-0:  at com.microstar.xml.XmlParser.parseContent(XmlParser.java:1118)
[error] AWT-EventQueue-0:  at com.microstar.xml.XmlParser.parseElement(XmlParser.java:947)
[error] AWT-EventQueue-0:  at com.microstar.xml.XmlParser.parseDocument(XmlParser.java:496)
[error] AWT-EventQueue-0:  at com.microstar.xml.XmlParser.doParse(XmlParser.java:176)
[error] AWT-EventQueue-0:  at com.microstar.xml.XmlParser.parse(XmlParser.java:146)
[error] AWT-EventQueue-0:  at org.gjt.sp.jedit.PerspectiveManager.loadPerspective(PerspectiveManager.java:81)
[error] AWT-EventQueue-0:  at org.gjt.sp.jedit.jEdit$5.run(jEdit.java:3450)
[error] AWT-EventQueue-0:  at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:154)
[error] AWT-EventQueue-0:  at java.awt.EventQueue.dispatchEvent(EventQueue.java:331)
[error] AWT-EventQueue-0:  at java.awt.EventDispatchThread.pumpOneEvent(EventDispatchThread.java:103)
[error] AWT-EventQueue-0:  at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
[error] AWT-EventQueue-0:  at java.awt.EventDispatchThread.run(EventDispatchThread.java:84)
                                                                                             
Even though a window comes up, I can't type anything.

Any help would be appreciated.

P.S. I need to use JDK1.3 since it supports green threads. Basically, I would like to try running JEdit under the "Stabilizer". See: http://stabilizer.sf.net.

escaped Chars like \n or \$ in PHP-Edit-Mode
Submitted by Anonymous on Thursday, 10 February, 2005 - 16:13

Hi !

Is it possible to highlight the escaped Characters in PHP-Strings (RULES SET="LITERAL1")?

I tried just to add:
<MARK_FOLLOWING TYPE="LABEL">&#092;</MARK_FOLLOWING>
to the RULES SET , also the "\" Entity and \ and \\ but nothing works .

With an other Escape Char like # (for testing) it works.

Someboy an Idea ?

mfg Tobias Werner

Unsupported major.minor version 49.0
Submitted by Anonymous on Thursday, 10 February, 2005 - 20:28
Hi, I just update to 4.2-2jpp via yum, and now when I lauch jedit I get that :

Exception in thread "main" java.lang.UnsupportedClassVersionError: org/gjt/sp/jedit/jEdit (Unsupported major.minor version 49.0)
at java.lang.ClassLoader.defineClass0(Native Method)
.....

I read somewhere that it has to do with my version of java and the version used to compile the program. Here I run jvm and jdk 1.4.2_06-b03 on Fedora Core 3. anyone can help?
I am amazed.
Submitted by Anonymous on Thursday, 10 February, 2005 - 21:04
jEdit is _THE_ best editor I've ever used. I can run it on all types of platform, the plugin functionallity is GREAT and it's fast, it's lightweight and the split-functionallty.... can't believe someone didn't came up with that idea earlier!


jEdit is great :]

Thanks for making such a amazing application!

regards, fredrik.
Ability to open all files listed in Edit > Find results window
Submitted by a992400 on Thursday, 10 February, 2005 - 22:07
When a user does Edit > Find and searches for all files within one or more directories, their search results can contain multiple files. But there does not appear to be an easy way to open up all of those files at once. In the Find results window (where all the files and matching lines are listed), the user should be able to right-click within the window and have an option to open all files.
User login
Browse archives
« February 2005 »
MoTuWeThFrSaSu
  6
12
14
 
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   108249
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