jEdit Community - Resources for users of the jEdit Text Editor
sql 2 html
Submitted by mbisping on Saturday, 17 November, 2007 - 11:25
Hello,

I'd like to present SQL from a database with syntax highlighting on a HTML-web page.
I thougt about combining the JEdit syntax package
with the Code2Html plugin.
However, even the old version of the plugin doesn't streamline with the jedit syntax code.
What would be the best/easiest way to create a java method like

/**
* param String sql - a number of sql statements
* returns syntax highlighted sql codes in HTML notation
**/
public String toSyntaxHighlightHTML(String sql)

Cheers

Meikel
Macro problem on self-built jEdit
Submitted by jedi on Thursday, 25 October, 2007 - 20:46
I checked out the HEAD from svn (rev 10955) and it compiled without errors. However, when I'm running it (ant run) it gives me errors from some of the built-in macros. For example:

Sourced file: /Users/jedi/projects/jedit/jEdit/build/macros/Editing/Emacs_Next_Line.bsh : Command not found: setAccessibility( boolean ) : at Line: 16 : in file: /Users/jedi/projects/jedit/jEdit/build/macros/Editing/Emacs_Next_Line.bsh : setAccessibility ( true )

Emacs_Next_Line works fine if I use it in the latest release (4.3pre1).

Has something been changed in the beanshell & macros since the latest release and how do I fix this?

Thanks!
autoindent and matlab
Submitted by skvalen on Monday, 3 September, 2007 - 14:29
hi, I have fiddled with the autoindent in matlab mode, and i come up with this:

< PROPERTY NAME="indentNextLines" VALUE="^\s*(if|for|function|switch|try|while)([\t ]*\(|[\t ]+|$).*(?!end)$" />
< PROPERTY NAME="indentNextLine" VALUE=".*?\.{3}.*" />
< PROPERTY NAME="unindentThisLine" VALUE="^\s*(end|else|elseif([\t ]*\(|[\t ]+).*|case|otherwise|catch)[\t ]*(%.*)?$" />
< PROPERTY NAME="unindentNextLines" VALUE="^\s*end\s*(%.*)?$" />

that gives something like this:
if foo
    bar
    end
    foobar

and that is wrong, but if I mark it and press 'indent-lines' (c+i) I get:

if foo
    bar
end
foobar

which is correct.

Anny idea who this can be correct on the fly?
mcse exam preps ?
Submitted by jakannan on Saturday, 25 August, 2007 - 22:01
i am studying for my mcse 2003 exams . I have a week to prepare for my 070-290 exam . Iam looking at
some practice exams to purchase for my exam . anyone knows how good are certmagic.com practice exam for
070-290 ? . plz let me know if they are well worth it or they are not
Developing jEdit in NetBeans
Submitted by Daria Titova on Tuesday, 17 July, 2007 - 22:22
Dear jEdit developers,

I would like to let you now that we have recently ported jEdit 4.2 environment into the NetBeans IDE.
You may wish to check it out:
http://wiki.netbeans.org/wiki/view/NetbeansedJEdit

Now you can completely run, debug, and profile jEdit inside the NetBeans IDE, and have access to all nifty features NetBeans IDE provides to make developer's more productive and happy.

I would greatly appreciate any feedback you may have about my project and any ideas on how to make it more useful for jEdit community.

If you are new to NetBeans please go to http://www.netbeans.org for all information, tutorials and fun stuff.

Daria Titova
NetBeans Engineer.
Using addError & addExtraMessage - the ErrorList plugin API
Submitted by PaulCollingwood on Friday, 20 April, 2007 - 20:40
I have been using jEdit alongside the Microsoft Visual C++ IDE (MSDEV) application for quite some time now, whilst writing embedded apps simulations PCs hosting XP.
Some time ago I bolted together a support tool that detected compilation log creation (.plg files generated by MSVC when compiling C/C++ projects) and then opened and parsed the errors & warnings.
From this data a bsh script file is generated, an then executed by jEdit to populate the ErrorList plugin's window accordingly.
So I can compile within another IDE, but edit and correct code within jEdit. Quite handy.
I later extended this tool to collate PC-Lint analysis results (also invoked within the IDE) in the same manner.

A typical example of the bsh file generated by the tool is as follows (I have only included a single addError invocation, but this is enough to demonstrate the script format):

//-----------------------------------------------------

import org.gjt.sp.jedit.*;
import org.gjt.sp.util.*;
import org.gjt.sp.jedit.gui.OptionsDialog;
import org.gjt.sp.jedit.msg.*;
import java.io.*;
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
import errorlist.*;
import java.util.*;
import gnu.regexp.*;
import console.*;

void run()
{
void log_errors()
{
errorlist.DefaultErrorSource errsrc;
errsrc = new errorlist.DefaultErrorSource("MSVC");
errorlist.ErrorSource.registerErrorSource(errsrc);
jEdit.getAction("error-list-clear").invoke(null);

errsrc.addError(ErrorSource.ERROR, "C:\\my_projects\\hw_if\\control\\ctrlapi.c",944,0,0,"LNT787: (Info -- enum constant 'DTV_PL_ASIG_AV_IP1_AUDIO' not used within switch)");

errsrc = null;
}

if(jEdit.getLastView() == null)
VFSManager.runInAWTThread(this);
else
log_errors();
}

run();

//-----------------------------------------------------

The problem I have here is that I wish to extend some of the messages in the plugin output to be multi-line, but I cannot see how to use the addExtraMessage method with the preceding code - can anybody explain how I would modify my bsh script output to permit this?

PS - if anyone else out there running a Windows OS also wants to generate errors/warnings in jEdit from externally generated files, then let me know!
changelog?
Submitted by thefayth on Wednesday, 18 April, 2007 - 08:50
hi,
i don't know what forum i should ask this in so i'll put it in here, sorry if it shoulsn't be, i was wondering does anyone know when i can access the changelog for jEdit i'm doing a little bit of research for a project and it would help if i had a changelog to see how its developed over time. Thanks for any help.
Syntax pakage, Undo and Redo and JavaCCLexer
Submitted by kagepower on Saturday, 31 March, 2007 - 18:34
Hello, I am from spain. I am developing an application, is a editor for javaCC.

But when using Syntax package in my project, undo and redo, it doesn't responded well.
I would like to know as making JavaCCLexer for to recognize reserved words.

help me plese... thank my mail is ronytour@hotmail.com
line numbers
Submitted by mich24 on Thursday, 14 December, 2006 - 09:26
Can somebody tell me in what class the line numbers of the program editor are displayed? I have to have a look on the code beacause I have to implement line numers in another editor...

thx a lot!
compilation errors
Submitted by mich24 on Thursday, 14 December, 2006 - 09:25
I have create a project with JBuilder with all the jEdit source files but I get many compilation errors... why?

Thx a lot for any ideas!
Trouble writing an edit mode with line continuation characters
Submitted by logris on Tuesday, 28 November, 2006 - 21:35

I am trying to write an edit mode for "JPL", the code behind a 4GL language called Panther and created by Prolifics. I have run into a problem that I cannot find a solution to and I would like to pose it to the JEdit community for any ideas.

Panther statements are newline terminated with a line continuation character. This seems to be the root of my problems. I would like to syntax highlight embedded SQL-like statements using keywords that only pertain to the embedded language. Here is an example of the embedded statement I would like to highlight:

// Call some function
call some_func()

// Begin the embedded SQL to highlight
DBMS SQL SELECT column \
FROM table \
WHERE column = 'Value'

// Do something else
for i= ...

The statement I want to highlight always begins with 'DBMS' and ends at the end of line, unless there is a line continuation character. There can be any number of continued lines. The statement ends at the end of the first line without a continuation character. For now, I will assume nothing can go after the continuation character (no comments).

Any ideas on how to match and delegate this statement to a seperate set of <RULES>? The best I have found so far is use <SEQ> to match the beginning DBMS statement and use <SEQ_REGEXP> to match on " [^\s\\]*$" with a hash character of " " for the end, but that tends to mess up my last token's highlighting.

Maybe there is a way to match on newline or detect the end of line? Or delegate when no more tokens are left on a line? Or match across a line?

Any help would be appreciated. Thanks. =)

Including plug-ins in install
Submitted by adxp on Monday, 28 August, 2006 - 03:29
Hey,

I've customised a few pre-existing jEdit plug-ins, and I'd like to distribute them within my organisation by having the installer copy them to the plug-in directory automatically. Is there any easy way of accomplishing this? Also, in a similar vein, is there any good way of defining default perspective.xml settings?

Cheers, -adxp
Excluding directories from search
Submitted by Mischan on Thursday, 3 August, 2006 - 23:25
I often use jedits hypersearch through big directory structures (eg. to find references to old datastructures or import-like language constructs, after fundamental rewrites, etc.). While I'm very fond of hypersearchs speed, there are directories i want to exclude from search, because they contain lots of irrelevant data (eg. caching directories) and therefore delay the search to no avail.

Now my favourite solution to the problem would be, to write a simple config file (like every newline a separate dir) "ExcludeDirs.cfg" or something, where search could look up directories that must not be visited recursively. After some browsing through the jEdits code I found the class VFS. There I would, for a quick personal hack, introduce an ArrayList that loads the "ExcludeDirs.cfg" and a boolean member that tells the class if the exclusion mechanism is necessary for its current use (because, VFS isn't used by search only). Inside the function listFiles I could add something like

if(!ExcludeDirs.contains(canonPath))
// recursive call to subdir

and hope that it works.

Now, before i start, i would like to hear some comments. I'm a complete jEdit starter so I don't know what the idiomatic way to solve this within jedits framework would be or if it could be solved with a simple extension mechnasim like a macro or plugin (or it is already there and i couldn't locate it). From my personal feeling VFS seems a bit too low-level for the task, on the other hand it's the only approach i can think of, that manipulates jEdits code directly without changing one interface. Furthermore i could think of other tasks where configurated exclusion of directories at this abstraction level could be relevant.

Thanks in advance
Mischan Gholizadeh Toosarani
MAC REQUEST: apple.laf.useScreenMenuBar
Submitted by stovak on Saturday, 1 July, 2006 - 18:22
in the "java" section of the info.plist in the mac download, I'd like to request one small change: Using the mac's top white menu as the default menu bar... you do this by added the following entry to the key entry in the info.plist: [code] Java Properties ....... apple.laf.useScreenMenuBar true [/code] This will put jEdit's menu bar at the top of the screen in the white menubar.
Large files
Submitted by maciejr on Tuesday, 27 June, 2006 - 12:20
Hi,

I sometimes need to work with large data files: containing numeric and other data. By "large" I mean larger than the available memory, say a few GB. Note that there are many editors around that compete in solving the problem of editing files in memory. Surprisingly, I could not find even a simple tool that solves a different problem: does what can be done in reasonable time with a large text file on disk.

I would like to find or make a tool to edit a file with no limit on file size, like a disk-based editor. Specifically such a tool could:

(1) quickly view parts of a file
(2) edit a small part of the file in memory (taking appropriately long to commit changes)
(3) search and replace some text through the file (making one full pass through the file)

I've searched these fora and, judging from a discussion in 2004, jEdit does not seem to support editing large files.
Are there any plans for a "large files" editing mode with limited functionality?
Could anyone point me to a (free or low cost) tool that already does that?
I am totally new to jEdit, but have some programming background. Do you think it is doable to adapt jEdit to perform such a task?

Thanks in advance for help,

Maciej.
solution for proper highlighting of script/style tags
Submitted by silverquick on Wednesday, 17 May, 2006 - 01:37
Hey all, I was always bothered by how SCRIPT and STYLE tags in HTML or PHP mode look kind of ugly because of how those modes have to delegate their contents to the right ruleset. This may have been discovered already but I've found a pretty simple solution. I'm not sure if I should release it to the files section though, as my mode files are pretty customized in other ways too (customized OCD style Smiling).

Basically, my new rules highlight any occurences of '<script' or '<style' as 'MARKUP', along with their matching closing tags, and delegate everything between them to a 'mediating' ruleset, which imports the rules from the TAGS ruleset (so any attributes of the style or script tag are highlighted properly), but adds a rule to delegate anything after '>' to either CSS mode or Javascript mode. Doesn't sound as simple as I thought. Smiling

Anyway, I can't get HTML to show up on this forum, so if you want to see what the rules look like in html.xml, look at this file:
http://www.flowingcreativity.net/jedit-better-rules.txt
Manipulating jEdit from external process.
Submitted by PaulCollingwood on Wednesday, 22 February, 2006 - 10:24
I was wondering if anyone knows if it's possible to access a running version of jEdit (and it's plugins) from an external application?

I have very,very little understanding of Java, but instincts tell me that maybe this could be achieved via a JVM instance in control of an application.
Could someone confirm whether this is possible?

The reason I would like to perform such a task is to invoke calls to the ErrorList pligin, via it's addError() call, as is outline here....

http://community.jedit.org/cgi-bin/TWiki/view/Plugins/PluginDebuggingTechniques

I would like to write a WIN32 application that performs such a tesk, and this would ideally be written in either VB or C.

Has anyone got any ideas how I would get started on this?

Many Thanks Smiling
Problem with a new mode
Submitted by witchi on Monday, 23 January, 2006 - 16:39
Hi, I try to create a new mode and I have problems with to lines, which I have to distinguish. Maybe someone here has an idea...

FETCH :$$.$$.DEATH.DEATH(autopsy)
and
(test.tmpItem(::$$.$$.DEATH.DEATH.$$.AUTOPSY))

In the first line, DEATH(autopsy) is not a function, but test.tmpItem( in the second line. With the line
<MARK_PREVIOUS TYPE="FUNCTION" EXCLUDE_MATCH="TRUE">(</MARK_PREVIOUS>
I get the type FUNCTION for both strings. How can I avoid that?

Thank you
Andre
Any kind of diagrams?
Submitted by clievers on Thursday, 19 January, 2006 - 20:20
Does anyone know if there are any kind of diagrams that will allow you to see class relationships, etc without having to look at all of the code?

Thanks.
any future releases of jEdit planned or in progress?
Submitted by paulflory on Tuesday, 27 December, 2005 - 03:49
Hi all,

I've been an avid jEdit user for a number of years now and always look forward to new versions and plugins. However, I haven't seen any new jEdit versions for some time now, and wondering if development is still ongoing?

Thanks,
Paul
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   82349
Context Free Art (*.cfdg)   0.31   46055
BBEdit scheme   1.0   18595
JBuilder scheme   .001   18495
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