jEdit Community home jEdit Community Wiki > Main > JEditSourceCodeIntro jEdit Community Wiki webs:
Main | Plugins | Know | TWiki | Sandbox?
Main . { Whats New | Users | Groups | Changes | Index | Search | Go }

Introduction to jEdit's Source Code

Hopefully this page will help people who are just writing their first macro or plugin to get familiar with the structure of jEdit's source code. Some of this will probably overlap with Gui Components.

jEdit's main class is %JAVADOC{jEdit:org.gjt.sp.jedit.jEdit}%. It's the starting point for getting a hold of various components and changing preferences. Like most of the jEdit code that new developers will want to find, it's in the org.gjt.sp.jedit package.

Each window in jEdit is an instance of the %JAVADOC{jEdit:org.gjt.sp.jedit.View}% class. Each text area you see in a View is an instance of %JAVADOC{jEdit:org.gjt.sp.jedit.textarea.JEditTextArea}%, each of which is contained in its own %JAVADOC{jEdit:org.gjt.sp.jedit.EditPane}%. Files are represented by the %JAVADOC{jEdit:org.gjt.sp.jedit.Buffer}% class.

If you want to print out debugging or error messages to the activity log, use the %JAVADOC{jEdit:org.gjt.sp.util.Log}% class.

If you're writing a plugin that listens to Edit Bus? messages, its main class will have to extend %JAVADOC{jEdit:org.gjt.sp.jedit.EBPlugin}% so that it will receive subclasses of %JAVADOC{jEdit:org.gjt.sp.jedit.EBMessage}% which are contained in the org.gjt.sp.jedit.msg package.

Classes of interest to developers

Class Macros Plugins
%JAVADOC{jEdit:org.gjt.sp.jedit.jEdit}% · ·
%JAVADOC{jEdit:org.gjt.sp.jedit.View}% · ·
%JAVADOC{jEdit:org.gjt.sp.jedit.EditPane}% · ·
%JAVADOC{jEdit:org.gjt.sp.jedit.Buffer}% · ·
%JAVADOC{jEdit:org.gjt.sp.jedit.textarea.JEditTextArea}% · ·
%JAVADOC{jEdit:org.gjt.sp.jedit.EBMessage}%   ·

Topic JEditSourceCodeIntro . { Edit | Attach | Ref-By | Printable | Diffs | r1.3 | > | r1.2 | > | r1.1 | More }
Revision r1.3 - 09 Sep 2003 - 06:12 GMT - Brad Mace
Parents: Web Home
Copyright © 1999-2011 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding jEdit Community Wiki? Send feedback.
Get jEdit at !SourceForge.net. Fast, secure and Free Open Source software downloads