jEdit Community - Resources for users of the jEdit Text Editor
Archives
P4Plugin fails to load in 4.3pre13
Submitted by psiegel on Tuesday, 8 April, 2008 - 12:40
Trying to load P4Plugin 0.2.4 in jEdit 4.3pre13 gives the following error:

Cannot start: java.lang.NoSuchMethodError: org.gjt.sp.jedit.jEdit.addMode(Lorg/gjt/sp/jedit/Mode;)V
Try updating to a newer version of the plugin.

I'm using the following versions of the dependent plugins:
CommonControls: 0.9.4
Console: 4.3.7
ErrorList: 1.7
ProjectViewer: 2.1.3.7

If this is not the correct place to report this bug, where should I report it? I tried emailing the address listed for the author (Marcelo Vanzin), but it bounced.
File to open automatically in buffertab mode
Submitted by tj_sony on Wednesday, 9 April, 2008 - 05:52
I have a file opened in buffertab mode - C:\temp\123.aaa.

Through some internal processing, when I click on C:\temp\123.aaa, an empty file - C:\temp\123.bbb gets created in the folder C:\temp\.

But what I need is, the empty file 123.bbb which gets created in the folder C:\temp\ should open automatically in buffertab mode instead of me doing it manually.

Could someone please help me with this.
Superscript plugin with javascript (Rhino) fails to work
Submitted by phade on Wednesday, 9 April, 2008 - 16:55
Hello to all users of this excellent editor Smiling

Trying to get SuperScript plugin to work with Rhino:

jEdit4.3pre13 with Java 1.6.0

- Downloaded Rhino 1.7R1 and put the jars js.jar and js-14.jar to ~/.jedit/jars
- Ran jedit from the shell (in order to get output to debug)
- Set superscript script mode to javascript and tried to run print("Hello"), no output in superscript plugin but shell displayed error


java.lang.NoSuchMethodError: org.mozilla.javascript.Context.getDebuggableEngine()Lorg/mozilla/javascript/debug/DebuggableEngine;

- googled and found that I probably should use newer bsf (2.4) (SuperScript has bsf 2.3 included and documentation also states that bsf 2.3+ can be used)
- downloaded newer bsf 2.4.0 and replaced the one in ~/.jedit/jars
- started jedit, it started but displayed error in shell:

7:24:47 PM [error] AWT-EventQueue-0: log4j:WARN No appenders could be found for logger (org.apache.bsf.BSFManager).
7:24:47 PM [error] AWT-EventQueue-0: log4j:WARN Please initialize the log4j system properly.

- tried javascript engine again and got output in superscript

org.apache.bsf.engines.javascript.JavaScriptEngine

- also beanshell engine in superscript did not worked anymore (worked fine with superscript included bsf 2.3) and output to superscript window:

bsh.util.BeanShellBSFEngine

- googled and found out that bsf 2.4.0 needs new common-logging.jar from apache commons, downloaded it (commons-logging-1.1.1.jar) and placed in ~/.jedit/jars

- no change still the error in shell and superscript engines fail to work
- decided to try some manual java trickery:

loaded jedit like this:

java -cp jedit.jar:commons-logging-1.1.1.jar:bsf.jar:bsh-2.0b4.jar:js.jar:js-14.jar org.gjt.sp.jedit.jEdit

(in actual command correct jar paths of course were used)

- that way I got no errors on startup, beanshell engine worked in superscript but rhino javascript (ran print("Hello") still failed displaying:

ReferenceError: "print" is not defined.

and shell displayed:

7:49:35 PM [error] SuperScriptPlugin: JavaScript Error: Internal Error: org.mozilla.javascript.EcmaError: ReferenceError: "print" is not defined.
7:49:35 PM [error] SuperScriptPlugin: org.apache.bsf.BSFException: JavaScript Error: Internal Error: org.mozilla.javascript.EcmaError: ReferenceError: "print" is not defined.


So has anyone got newer bsf or Rhino javascript engine to work with SuperScript? I know that some have got bsf 2.4.0 to work with superscript 0.5pre but I can not find this pre version anywhere.


PS: the shell outputted of course more in all cases but I included only relevant lines in the post. If you want to see more just let me know.

All the best,
Villu
Catalog problem in Linux Environment
Submitted by srikrishnan on Tuesday, 15 April, 2008 - 17:54
Hi All, I am using JEdit both in my windows as well as Ubuntu OSs. The same XML file vadlidates against it DTD by the mentioned catalog perfectly. But in Linux version it wont work. I have changed the path also from drive based windows platform to Folder based Linux platform in my catalog file. below is my catalog line: below is the first 2 lines in my errorlist window in JEdit: /media/hdd4/Journals/CUP/AHY/DC/S0667237807000000jra.xml (370 errors, 0 warnings) 2: java.lang.ArrayIndexOutOfBoundsException: 5 Can anybody help me to sort out the catalog problem? Thanks in Advance, Srikrishnan
Interface becomes blank during external processing
Submitted by tj_sony on Thursday, 17 April, 2008 - 10:27
In my below contents, please substitue '[' and ']' with 'open angle bracket' and 'close angle bracket' respectively.

Contents of my jedit_gui.props is as follows
#{{{ process menu
process=aaa \
bbb \
ccc \
ddd \

Contents of my actions.xml is as follows
[ACTION NAME="aaa"]
[CODE]
view.selectProcess("aaa",buffer);
[/CODE]
[/ACTION]

[ACTION NAME="bbb"]
[CODE]
view.selectProcess("bbb",buffer);
[/CODE]
[/ACTION]

[ACTION NAME="ccc"]
[CODE]
view.selectProcess("ccc",buffer);
[/CODE]
[/ACTION]

[ACTION NAME="ddd"]
[CODE]
view.selectProcess("ddd",buffer);
[/CODE]
[/ACTION]

Contents of my View.java is as follows
public void selectProcess(String action,final Buffer buffer) throws IOException
{
...
}

From my customized jedit.jar, when I select anyone of the 4 menubar options (i.e., either aaa, bbb, ccc or ddd), its respective external process happens. But during the happening of the process, the jedit userinterface becomes blank. And till the external process for the respective menubar option is completed I cannot do anyother process on the jedit userinterface.

I think to solve this problem, I need to use Multithreading. Could anyone please tell me where and how do I use Multithreading concept in my above program.
JDialog modal doesnt seem to work in bsh macro
Submitted by drefty on Thursday, 17 April, 2008 - 12:54
Does anyone have a script that demonstrates how to use a Modal dialog from within a Beanshell macro?

Problem: I am trying to get user input in a beanshell script and set a variable based on that input. The problem is when I set modal=true for the JDialog box, the JDialog no longer disposes after presses of "OK" or "Cancel". The dialog just sits there and won't go away, therefore I cannot capture the result and set the variable.
How do I determine whether a file exists?
Submitted by PaulCollingwood on Thursday, 17 April, 2008 - 15:43
I'd like to write a macro for jEdit which runs an external application, and in doing this I wish to check whether a file at a specified path exists, and conditionally execute macro content on this basis.

Does anyone know how this is achieved?

Thanks in advance!
Waiting for buffer.save to finish
Submitted by ntbenari on Friday, 18 April, 2008 - 08:14
I have some commandos that start with
buffer.save(view,null,true);
after which I build a command to run.
Sometimes the save completes before the command
is run and sometimes it doesn't.
Writing
waitForConsole(view)
does seem to help.

Thanks for any help

Moti
Running Java from within jEdit
Submitted by Alan-LB on Saturday, 19 April, 2008 - 06:36
Sorry if this question has been asked before but I couldn't find a thread.

Is there any way of compiling and running a program from within jEdit - ie shelling out to run "javac" and "java". I am using jEdit 4.3 with Windows XP Pro and JDK 6 update 5.

I have tried downloading the "console" plugin but it will not install - it comes up with an error message and suggests getting a later version of the plugin

Everything else works fine.

Alan
Can't run some macros: "Class: gnu.regexp.RE not found in namespace"
Submitted by sempliciotto on Sunday, 20 April, 2008 - 12:32
Hi,
I have a problem running some macros, like Text_Squeezer. I'm on an Ubuntu hardy; I have downloaded jEdit 4.3pre13 from ubuntu repository; I have installed sun-java6-jdk.

$ which java
/usr/bin/java
$ java -version
java version "1.6.0_06"
Java(TM) SE Runtime Environment (build 1.6.0_06-b02)
Java HotSpot(TM) Client VM (build 10.0-b22, mixed mode, sharing)


If I run Text_Squeezer macro I got this error:

Sourced file: /home/gius/.jedit/macros/Text_Squeezer.bsh : Class: gnu.regexp.RE not found in namespace : at Line: 32 : in file: /home/gius/.jedit/macros/Text_Squeezer.bsh : gnu .regexp .RE

at org.gjt.sp.jedit.bsh.BSHAmbiguousName.toClass(BSHAmbiguousName.java:74)
at org.gjt.sp.jedit.bsh.BSHType.getType(BSHType.java:154)
at org.gjt.sp.jedit.bsh.BSHFormalParameter.eval(BSHFormalParameter.java:67)
at org.gjt.sp.jedit.bsh.BSHFormalParameters.eval(BSHFormalParameters.java:107)
at org.gjt.sp.jedit.bsh.BSHMethodDeclaration.evalNodes(BSHMethodDeclaration.java:153)
at org.gjt.sp.jedit.bsh.BSHMethodDeclaration.eval(BSHMethodDeclaration.java:122)
at org.gjt.sp.jedit.bsh.Interpreter.eval(Interpreter.java:644)
at org.gjt.sp.jedit.BeanShell._runScript(BeanShell.java:336)
at org.gjt.sp.jedit.BeanShell._runScript(BeanShell.java:281)
at org.gjt.sp.jedit.BeanShell.runScript(BeanShell.java:207)
at org.gjt.sp.jedit.Macros$BeanShellHandler.runMacro(Macros.java:1020)
at org.gjt.sp.jedit.Macros$Macro.invoke(Macros.java:441)
at org.gjt.sp.jedit.gui.InputHandler.invokeAction(InputHandler.java:383)
at org.gjt.sp.jedit.jEdit$3.invokeAction(jEdit.java:3000)
at org.gjt.sp.jedit.jEdit$3.invokeAction(jEdit.java:2983)
at org.gjt.sp.jedit.EditAction$Wrapper.actionPerformed(EditAction.java:220)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
at javax.swing.AbstractButton.doClick(AbstractButton.java:357)
at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:1220)
at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:1261)
at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:272)
at java.awt.Component.processMouseEvent(Component.java:6041)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3265)
at java.awt.Component.processEvent(Component.java:5806)
at java.awt.Container.processEvent(Container.java:2058)
at java.awt.Component.dispatchEventImpl(Component.java:4413)
at java.awt.Container.dispatchEventImpl(Container.java:2116)
at java.awt.Component.dispatchEvent(Component.java:4243)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4322)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3986)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3916)
at java.awt.Container.dispatchEventImpl(Container.java:2102)
at java.awt.Window.dispatchEventImpl(Window.java:2440)
at java.awt.Component.dispatchEvent(Component.java:4243)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)

What's wrong? Is required some other package or ubuntu's jedit is bugged?

Thanks
Running macro xxx times
Submitted by heinkonijn on Monday, 21 April, 2008 - 12:08
Hi,

I have created a macro, and I weant to run it multiple times.
I have read the documentation and I cannot find how it should be done.

Is it possible?

Thanks,
Hein
Move this forum to Google Groups?
Submitted by drefty on Tuesday, 22 April, 2008 - 00:01
Anyone else experience poor performance and sluggishness with the jedit community site? Is there much community support out there still? Would anyone support moving this forum to Google?
adding shortcut to a macro
Submitted by ianbd on Tuesday, 22 April, 2008 - 13:01
I have some simple macros to which I want to add consistent shortcut keys as part of the install.

I assume that I use the jEdit.setProperty option with something like:
jEdit.setProperty("my_macros/macro1.shortcut", "CA+1"); but that does not work.

When I check the global options, the shortcut is recorded as the literal string, but Ctrl + Alt + 1 does not activate the macro.

Does anyone know how to set such a shortcut? For example, is there some form of key combination code that I need to enter to get this combination to work through setProperty()?

Thanks in advance...
Support DB Objects in Sidekick/CtagsSidekick
Submitted by marcelo.marcsys on Tuesday, 22 April, 2008 - 13:05
When i open a DB Object via SQL plugin and try to use the sidekick plugin, the plugin can't parse the object. It only parses the object when I save it with the appropriate extension. The plugin should be able to parse a text based on the edit mode, all right?
Textmate-like SVN popup menu (Popup SVN Menu.bsh v0.9 by k3rni)
Submitted by k3rni on Tuesday, 22 April, 2008 - 21:00
Designed for use with SVNPlugin. After installing, assign a keystroke (preferably Ctrl-Shift-A, same as in Textmate) to it. When pressed, SVNPlugin's context menu with the most common operations (add, update, revert, commit, resolve etc.) pops up, in relative proximity to the cursor, which is probably the spot that your eyes are already focused on. The items have keyboard shortcuts (digits 1-5, same as in Textmate again) in order to speed up navigation. Thus, e.g. a commit is CS-a, 4. Known bugs:
  • After one use, it steals the SVNPlugin menu from the textarea's context menu, which causes it to mess up, by still having the "Subversion" submenu item, but refusing to show the actual submenu. In order to avoid that, this macro removes that submenu from the textarea's context menu, making it available only on keystroke.
Buffertabs fail on Pre14
Submitted by weberjn on Monday, 28 April, 2008 - 08:02
Hi, the Buffertabs plugin still does not work on Pre14. Pity, so I have to continue using Pre 12.

Greetings,
Juergen
Position Cursor after Template Execution
Submitted by WarrickF on Wednesday, 30 April, 2008 - 17:08
Hi All,

I'm trying to figure out how to position my cursor after I execute a Template using the Templates plugin.

The Clipper plugin allows you to place a "|" (pipe) where you'd like to position the cursor, but I can't seem to find a way to do the same thing using the Templates plugin.

Thanks
Warrick
Template Accelerators - Keywords beginning with @ and other special chars
Submitted by WarrickF on Thursday, 1 May, 2008 - 13:39
Hi all, I'm having a problem setting up Keywords in Accelerator that begin with "@" and other special chars like "<". If I setup an accelerator called Test - all is good, if I name my accelerator @Test it does not work. The help says .... The plugin searches for the keyword from the current caret position in the textarea backwards to first whitespace character. However is seem like it only searches backward for char 1..9,a..z,A..Z Is this a bug or is there some workaround like escaping the char somehow (which I've tried)? Thanks Warrick
Mixed Mode Highlighting
Submitted by WarrickF on Thursday, 1 May, 2008 - 17:55
Hi All,

Is it possible to somehow have mixed mode highlighting.

We've added a custom mode for our own language, but when JavaScript it mixed into the page it does not get highlighted correctly.

What's the best way to approach this ?

Thanks
Warrick
Remove Trailing WhiteSpaces (remove-trailing-ws.bsh v1.0 by Robert Schwenn)
Submitted by Robert Schwenn on Friday, 2 May, 2008 - 21:34
This macro removes trailing WhiteSpaces of selected lines (as the action with same name does). In contrast, if no selection is present, all lines are processed.
User login
Browse archives
« April 2008 »
MoTuWeThFrSaSu
  1
2
5
7
10
11
12
13
14
16
23
24
25
26
27
29
 
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   82339
Context Free Art (*.cfdg)   0.31   46046
JBuilder scheme   .001   18487
BBEdit scheme   1.0   18108
ColdFusion scheme   1.0   18016
R Edit Mode - extensive version   0.1   17465
Advanced HTML edit mode   1.0   16198
Matlab Edit Mode   1.0   16060
jEdit XP icons   1.0   15221
XP icons for jEdit   1.1   14285