jEdit Community - Resources for users of the jEdit Text Editor
Write macros in Java
Submitted by leshij on Monday, 27 April, 2009 - 16:28
Hello all.
Having written a pair of longer-then-ten-lines macros, I really missing coding support features like code completion, integrated javadoc and so on that is available in modern Java IDEs. I think it would be nice to have an ability to write macros in Java with your favourite IDE (yes, I know, there is IDE support for many languages, including dynamic ones, but such a support is a number of magnitude weaker then one for Java).
I have dirtily implemented this features inline in jEdit source code.
Is anyone interested in this? If so, I can repack it as a plugin.
Comment viewing options
Select your preferred way to display the comments and click 'Save settings' to activate your changes.
I'm sorry, I'm not quite clea
by elberry on Mon, 27/04/2009 - 22:10
I'm sorry, I'm not quite clear as to what you've implemented? Could you explain it a little bit more?

Also, have you checked out the plugins list? Is there nothing that accomplishes what you want?

Learn from the past. Live in the present. Plan for the future.
11101000
Blog
 
Yes, I've lookup at plugin li
by leshij on Tue, 28/04/2009 - 06:09
Yes, I've lookup at plugin list, you can write macros in e. g. Jython (maybe also Groovy), but not in Java.
Also, I tried to find IDE/plugin that can provide autocompletion for beanshell, but anyway it cannot autocomplete methods of variables
declared outside macro (buffer, textArea, etc).

Actually, I have implemented org.gjt.sp.jedit.Macros.Handler so it loads compiled class files (instead of beanshell scripts like bundled with jEdit implementation does) from macro directory . I have setup a project in IDE so it compiles my macros to this directory.

So I can now write:
public class Messages_Stat implements Macros.ClassHandler.MacroClass {

public void run(Buffer buffer, View view, Macros.Macro macro, JEditTextArea textArea) {
/* my code goes here */
}

}

It is more verbose, but you don't need to keep javadoc opened all the time.
 
:) Nice. Very nifty. Sound
by elberry on Thu, 30/04/2009 - 22:01
Smiling Nice. Very nifty.

Sounds like a great plugin to me.

Learn from the past. Live in the present. Plan for the future.
11101000
Blog
User login
Browse archives
« November 2024  
MoTuWeThFrSaSu
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
 
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   101634
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   17481
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