jEdit Community - Resources for users of the jEdit Text Editor
can jedit do this
Submitted by tsr on Sunday, 17 February, 2008 - 21:33
Hi,

I'm thinking about adapting an editor to handle the creation of UMC (user made content) for Battle for Wesnoth (BfW) - located at: http://www.wesnoth.org.

BfW uses a mark-up language called WML (wesnoth markup language) that has some similarities with xml (the main differences are: preprocessor directives and [ ] instead of < >). WML is fairly strict in what you are allowed to write where.

I've been looking (really fast and not in-depth) into jEdit, and it seems that it meets my requirements. But before I dive into the specifics of jEdit and java I'd like to know if what I want is possible.

What I want to be able to do is something like:
- hide unwanted features (from the editor) easily (as to not confuse people that are new to the concept of programming)
- indentation and syntax-highlightning
- code snippets
- wizards (that is, some kind of forms/dialogs that when completed insert a modified code snippet), both the ability to create them but also the ability to define where (in the UI) they will be shown.
- create a wml-reference
- plugin in a few wml-tools (that are currently written in python) that can be launched and generate reports back to jedit
- launch the main application (that is BfW), to easily test changes
- when the cursor waits a list of possible strings to write at the current location are displayed.

I think that's it. So is this possible to accomplish with jedit as a foundation and an unspecified amount of hours? (I mean without forking the projekt, 'just' writing a plugin)

/tsr
Comment viewing options
Select your preferred way to display the comments and click 'Save settings' to activate your changes.
Hi tsr. Comments below.
by elberry on Mon, 18/02/2008 - 20:39
Hi tsr. Comments below.

>What I want to be able to do is something like:
>- hide unwanted features (from the editor) easily (as to not confuse people that are new to the concept of programming)

You might want to consider looking in to the TextArea project which is actually a sort of sub-project of jEdit. This allows you to use jEdit's text area (and the syntax highlighting engine) and embed it in another application. This is extreme though, since what you want sounds like it'd make a really great plugin for jEdit - so anyone can use it.
You should join the users mailing list and ask for more information there if you're interested.

http://sourceforge.net/mail/?group_id=588

>- indentation and syntax-highlightning

Definitely, look at the help docs that come with jEdit about writing and installing edit modes.

>- code snippets

Absolutely. jEdit has macro capabilities which can do this. There are also abbreviations jEdit has that you can add to, and there are a few plugins which would work well as well. You should check out the SuperAbbrevs, and Templates plugins.


>- wizards (that is, some kind of forms/dialogs that when completed insert a modified code snippet), both the ability to create them but also the ability to define where (in the UI) they will be shown.

Again, this sounds like a perfect plugin opportunity. The closest thing I can think of here would be the console plugin, which has a "Commando" feature that has a UI xml format that you can use to create forms. Then you can execute java code (in the form of beanshell) based on those form values. Other than that you would have to create your own wizards.

>- create a wml-reference

Please elaborate.

>- plugin in a few wml-tools (that are currently written in python) that can be launched and generate reports back to jedit

Not sure about this one, you'll have to look at some of the plugins out there for jEdit that deal with python. There is a jython interpreter plugin, but I've never used it so I'm not sure what it's capabilities are.

>- launch the main application (that is BfW), to easily test changes

This would depend on how you can launch the application. If it can be launched from command line then there definitely won't be a problem. You can use the console plugin to run commands from your plugin, or from a macro.

>- when the cursor waits a list of possible strings to write at the current location are displayed.

Yes. jEdit has a completion popup which I know has had some work done on it recently. If you write your own plugin for this application, then you should be able to use the completion popup. Again, you should join the users mailing list to get more information about this.

>I think that's it. So is this possible to accomplish with jedit as a foundation and an unspecified amount of hours? (I mean without forking the projekt, 'just' writing a plugin)

Indeed, but I think you need to get to know jEdit a lot better first. This little text editor has a lot of power and features.

I hope that helps.

Cheers and good luck! This sounds like a really fun plugin, I can't wait to see it.


Learn from the past. Live in the present. Plan for the future.
11101000
 
Hi elberry, Thanks for you
by tsr on Tue, 19/02/2008 - 06:54
Hi elberry,

Thanks for your help, seems I managed to find a good option here with jedit Smiling

All your comments are very positive, so now it's more about finding the time to do it...

I plan to make it one step at a time, starting with the easiest first: syntax highlighting and indentation.

As for some specifcs about your comments:

>>- create a wml-reference
>Please elaborate.

I meant like documentation for wml that is well integrated with jEdit, in hte end it would be fantastic if you could write a tag or key/value-pair, press F1 (or whatever the help shortcut is) and be presented with information about that (where to use, how to use, etc)

This has really low priority atm (not only because it takes a lot of time, but also because wml - and the rest of BfW just went into the final stages before a new stable release and wml has changed a lot in the last year)

>>- plugin in a few wml-tools (that are currently written in python) that can be launched and generate reports back to jedit
>Not sure about this one, you'll have to look at some of the plugins out there for jEdit that deal with python. There is a jython interpreter plugin, but I've never used it so I'm not sure what it's capabilities are.

Ok, this isn't that neccesary either, but basicly it's just running a cli-script and getting the output back to jEdit in some way, seems jEdit has a command line so it can't be that hard (I hope).

>>- launch the main application (that is BfW), to easily test changes
>This would depend on how you can launch the application. If it can be launched from command line then there definitely won't be a problem. You can use the console plugin to run commands from your plugin, or from a macro.

Great, yes, there is a cli to launch BfW so then it's not problem.

Yay! Looks promising, I'll join the mailing list when I've thought a bit more and have time to do some work. Thanks, again, for your help!

/tsr
 
Welcome to the wonderful world of jEdit. :)
by elberry on Wed, 20/02/2008 - 08:07
Hi TSR. You are most welcome.

Welcome to the wonderful world of jEdit. Smiling

>>- create a wml-reference
>Please elaborate.

>I meant like documentation for wml that is well integrated with jEdit, in hte end it would be fantastic if you could write a tag or key/value-pair, press F1 (or whatever the help shortcut is) and be presented with information about that (where to use, how to use, etc)

>This has really low priority atm (not only because it takes a lot of time, but also because wml - and the rest of BfW just went into the final stages before a new stable release and wml has changed a lot in the last year)

Ah, Ok. Well there isn't really any context sensitive help at the moment, as far as I know, but there are easy ways to include help documentation with your plugin. Which would then be readily available from jEdit's help menu.

I'm not sure if you're familiar with DocBook (http://www.docbook.org/) - I'm not myself - but I believe that jEdit can help package your documentation using that.

Again, this sounds like a really great plugin opportunity. I wish you the best of luck with it.

Learn from the past. Live in the present. Plan for the future.
11101000
User login
Browse archives
« March 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
31
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   82338
Context Free Art (*.cfdg)   0.31   46043
JBuilder scheme   .001   18487
BBEdit scheme   1.0   18107
ColdFusion scheme   1.0   18015
R Edit Mode - extensive version   0.1   17461
Advanced HTML edit mode   1.0   16194
Matlab Edit Mode   1.0   16057
jEdit XP icons   1.0   15220
XP icons for jEdit   1.1   14281