jEdit Community - Resources for users of the jEdit Text Editor
Using Eclipse to develop plugins
Submitted by Anonymous on Sunday, 14 November, 2004 - 09:27
I want to use Eclipse to develop a plugin. No problem setting up an Eclipse(3.01) project running JEdit 4.2 with breakpoints etc. But now I would like to be able to debug a plugin (setting breakpoints in the plugin source), and it seems to me that is not easily possible without modifying JEdit considerably (which I would prefer no to do). JEdit appears to be designed to only run plugins from jars. Any ideas?
Comment viewing options
Select your preferred way to display the comments and click 'Save settings' to activate your changes.
Using Eclipse to develop jEdit plugins
by hoelzl on Sat, 28/06/2008 - 08:13
It is easy do develop jEdit plugins with Eclipse. Just add jEdit.jar to the classpath of the Eclipse project. Optimally with the sources set to the jEdit source, so it is also possible to browse the jEdit sources.

Now to start jEdit just create a new run configuration and start org.gjt.sp.jedit.jEdit as java application. To install the plugin you need to export the project as JAR archive and save it under ~/.jedit/jars. But this can also happen as an ant target which can be added to the projects builders, then everything happens automatically.
Yes, just run jEdit in a sepa
by Anonymous on Tue, 12/07/2005 - 20:12
Yes, just run jEdit in a separte JVM with remote debugging enabled, set your breakpoints in Eclipse, then start a remote debugging session.

Step by step:

1. Create your plugin in Eclipse
2. Build the jar (probably using ant)
3. Copy the jar to your jEdit installation
4. Start jEdit with remote debugging enabled (see below)
5. Attach the Eclipse debugger (see below)

To run jedit with remote debugging enabled, I use the following command:
"java -agentlib:jdwp=transport=dt_socket,suspend=y,server=y,address=XXXX -jar jedit.jar"

where XXXX is any open port number you wish. The above invocation works for Sun's JDK 5.0. There's an alternate incantation for earlier releases. (See http://java.sun.com/j2se/1.5.0/docs/guide/jpda/conninv.html)

To start debugging in Eclipse, create a debug configuration by selecting "Run->Debug->Remote Java Application" and set the port number you used above. jEdit will start and then stop at your first breakpoint. On subsequent run-throughs, use F11 (Debug last launched) as a shortcut. (Note, I'm using Eclipse 3.1)

-Ed King
User login
Browse archives
« April 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   82348
Context Free Art (*.cfdg)   0.31   46055
JBuilder scheme   .001   18495
BBEdit scheme   1.0   18116
ColdFusion scheme   1.0   18024
R Edit Mode - extensive version   0.1   17473
Advanced HTML edit mode   1.0   16206
Matlab Edit Mode   1.0   16068
jEdit XP icons   1.0   15229
XP icons for jEdit   1.1   14293