jEdit Community - Resources for users of the jEdit Text Editor
Archives
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.
Increase heap size used by jEdit?
Submitted by a992400 on Thursday, 10 February, 2005 - 22:24
I tried editing many files at once in jEdit v4.2, and got an error message from jEdit that there was not enough heap allocated. Back in the days of version 4.1, a simple fix was to increase the maximum heap size via Programs > jEdit > "Set jEdit Parameters" > "Command line options for Java executable", and setting it to "-mx64m". But now that Windows launcher and other handy things appeared to be missing in the new version, it seems I have to pass "-mx64m" as a parameter to jEdit.

So I tried adding -mx64m to the shortcut created during jEdit installation. (By the way, C:\_a\ is where I install all of my applications.) So...
C:\_a\Java\JRE\bin\javaw.exe -jar C:\_a\jEdit\jedit.jar
... which works fine, becomes...
C:\_a\Java\JRE\bin\javaw.exe -jar C:\_a\jEdit\jedit.jar -mx64m
... which doesn't work at all. When I enter that at the command line, nothing happens. I'm guessing that Java sees -mx64m as an invalid parameter, but unhelpfully does not report that.

I know I am able to pass parameters to jEdit, e.g.:
C:\_a\Java\JRE\bin\javaw.exe -jar C:\_a\jEdit\jedit.jar x.html
... opens the file just fine. But...
C:\_a\Java\JRE\bin\javaw.exe -jar C:\_a\jEdit\jedit.jar x.html -mx64m
... fails.

Any suggestions on how to get it to work?
Font issues on Windows with jEdit 4.2
Submitted by Anonymous on Thursday, 10 February, 2005 - 23:14
Whenever I start jEdit (using javaw) on Windows (XP SP2) all the fonts on the screen seem to go bold (or something). As soon as I close jEdit they return to normal.

Has anyone any idea what might be causing this?

Thanks
Fonts look...weird in Windows
Submitted by imgod2u on Friday, 11 February, 2005 - 14:53
In x11, the fonts in jEdit look ok (not as good as they do in say, gedit under KDE or Gnome) but in Windows, they exhibit this weird behavior where the colors are not uniform. I'm not sure if it'll show up in this screenshot but:

http://www.engineering.ucsb.edu/~jkang/JeditScreen.jpg

As you can see, the capitalized text with color (specifically, "INTEGER"), seem to have white "stripes". I turned antialiasing off and the characters looked even weirder, like they had pixels missing where they should be. I'm not sure what's causing this as other fonts in Windows look just fine.

Any help would be greatly appreciated. I've also noticed that fonts (like monospaced and Lucinda Console) don't look the same in jEdit as they do in other programs (even on the same computer)
jEdit under Windows
Submitted by Anonymous on Sunday, 13 February, 2005 - 20:11
Hello,
I'm very happy with jEdit, but I've got a problem: I said windows that he should open all *.php files with this adress:
C:\Programme\Java\j2re1.4.0_01\bin\javaw.exe -jar "G:\Programme\jEdit\jedit.jar"
It works, but not with *.php files in directories with blanks. Unfortunately, all my files are in "H:\Tim\Eigene Dateien" and so I can't open them directly.
Can somebody help me? I really hope so Eye-wink
Thanks,
Tim.
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