jEdit Community - Resources for users of the jEdit Text Editor
Archives
Swing dialog - RAD tool available?
Submitted by PaulCollingwood on Friday, 27 June, 2008 - 08:34
I have been experimenting with writing macros that invoke dialogs for user interaction with some success.
I have found the process of contriving the UI components within a BSH script a bit cumbersome.

Does anyone know of a (Java) RAD tool that permits the 'wysiwyg' development of dialogs, which then produces java swing directives which can then be injected into a macro script?

Alternatively, does anyone know of a Java source that encapsulates a suite of useful dialog templates as classes, so that they can be invoked from a macro, in the same way as some basic dialog types are supplied within jEdit?
ISO-10646-UCS-2 encoded xml-file isn't readable
Submitted by achim.wessling on Sunday, 29 June, 2008 - 13:55
I've a ISO-10646-UCS-2 encoded xml-file which is written by Smallworld GIS. If I try to open this file with jedit it's not readable. Cryptic characters are displayed, other editors like gedit, PSPad, windows texteditor, do not have any problem with displaying it. What's wrong?
Select_Word_or_Enclosed.bsh v1.0 by Tomek Peszor
Submitted by takeshin on Wednesday, 2 July, 2008 - 12:16
This macro is ment for fast selecting text with one keyboard shortcut. It selects word when no selection is set. When selection is set (second run), it looks outside selection for pairs of characters like parenthesis ()[]{}<> or quotations "" '' or line separator and selects text beetween. Just assign shortcut to this macro (I use CTRL+ALT+UP ARROW) and you are able to select word no matter if caret is on the begginig, inside or at the end of word. Then hit this keyboard shortcut again to select text between characters described above. Hit once more to extend selection to select enclosing characters too, and once more to expand selection to next pairs. This macro is useful for selecting words, syntax keywords, strings, function values, HTML attribute values and many more. See it in action on the screencast.
Bug with Console plugin 4.3.7, jEdit 4.3pre14 for Windows, and the font White Rabbit
Submitted by KBKarma on Friday, 4 July, 2008 - 01:16
OK, hell of a combination, I know. But, here we go.

I recently (ie within the last few months) upgraded to pre14. As usual, Console was docked at the bottom of the screen. I had set the font to White Rabbit several months previously, and had no issues. I had been using pre9.

I had just finished writing some C, and wanted to run gcc (yes, on Windows). So, I brought up the Console.

I got the following image:


The same happened with the Beanshell drop-down. As a result of this, I couldn't do anything with Console.

Why, you ask? Because it wouldn't accept any input. I mashed keys for a few minutes when I realised this, but to no avail.

Today, I checked if there was an update to jEdit, then decided to bring this matter to the fore. In so doing, I checked the settings for Console. I changed the font, then opened it.

And it worked.

I have no idea if this is a Console bug, a pre14 bug, or a "feature" of the font itself. I'm assuming it's a pre14, but it could be a Console + pre14 bug, ie a Console bug that only occurs in pre14 (and yes, that could be considered a pre14 bug).

Any
Send Selection To ...
Submitted by Kel Solaar on Friday, 4 July, 2008 - 07:53
Hello o/
I'm currently trying to write a macro to Send Selection To Python, but I need some help to improve the stuff : I would like to be able to switch back to make active the previous buffer (the one the selecton came from) and the best would be maybe to do that in a transparent way without having the file popping into jEdit. I tried with the jEdit.openTemporary(); but didnt figured how to make it work. Some help would be really appreciated Smiling Here is the simple macro so far :

// Send Selected Text To Python
String pythonPath = "D:\\Softwares\\Developpement\\Python25\\pythonw.exe";
String currentFile = "D:\\_Temp\\_SendSelectedTextToPython.py";

Registers.copy(textArea,'$');
jEdit.newFile(view);
Buffer newBuffer = view.getBuffer();
Registers.paste(textArea,'$',false);
newBuffer.save(view, currentFile);
runInSystemShell(view, "\"" + pythonPath + " -t \"" + currentFile + "\"");
Remove_blank_lines.bsh v1.0 by Tomek Pęszor
Submitted by takeshin on Friday, 4 July, 2008 - 11:08
This simple macro removes blank lines from the current buffer or selection (lines with spaces or tabs also, not only \n\n). It just uses simple RegEx: ([\t\s]+)?\n+\n?
XML/HTML tags
Submitted by takeshin on Friday, 4 July, 2008 - 11:29
Features needed (for XML plugin for example)
- go to next/prev tag
- go to next HTML attribute
- toggle between attributes (move caret or select next attribute value)

--
takeshin
Code suggestions
Submitted by takeshin on Friday, 4 July, 2008 - 12:39
Code suggestions like in other IDE.

I’d like to have a real code completion like in other IDE’s (like in Netbeans, Eclipse
or Zend Studio).
When I type "function", I’d like to see suggestion: "string function( int foo, sting bar [more…])."
Including previously entered methods, functions from included files.
That’s the only thing jEdit is missing.

Here are some screenshots:
http://www.netbeans.org/images/articles/60/web/gwt/code-completion.png
http://www.projectbritannia.com/wiki/uploads/Tools/skrit_code_completion.jpg
http://static.zend.com/topics/zs_code_completion.gif
http://blogs.sun.com/tor/resource/instance-completion.png


--
takeshin
Opening ans saving file in macro
Submitted by JeanPierre on Saturday, 5 July, 2008 - 02:47
I do not know java and my question should be really stupid, but I do not find an answer. I create a macro using "Record macro" and "Stop recording". The macro is:
--------------------------------------------------------------------------------------------------------
// This is a recorded macro. First, check over the
// commands to make sure this is what you intended. Then,
// save this buffer, and the macro should appear in the
// Macros menu.

GUIUtilities.showVFSFileDialog(view,null,VFSBrowser.BROWSER_DIALOG,true);
SearchAndReplace.setSearchString("^(-)(.*KW.*A0.*\\.(jpg|mpg|mov|avi|asf))");
SearchAndReplace.setReplaceString("$2");
SearchAndReplace.setBeanShellReplace(false);
SearchAndReplace.setIgnoreCase(true);
SearchAndReplace.setRegexp(true);
SearchAndReplace.setSearchFileSet(new CurrentBufferSet());
SearchAndReplace.replaceAll(view);
SearchAndReplace.setSearchString("^-.*\\n");
SearchAndReplace.setReplaceString("$2");
SearchAndReplace.setBeanShellReplace(false);
SearchAndReplace.setIgnoreCase(true);
SearchAndReplace.setRegexp(true);
SearchAndReplace.setSearchFileSet(new CurrentBufferSet());
SearchAndReplace.replaceAll(view);
buffer.saveAs(view,true);
--------------------------------------------------------------------------------------------------------
The macro is working fine, but i would like to start the macro automatically opening (loading in a new buffer) a given file "D:\folderInput\fileinput.txt"
and finish the macro automatically saving the file (saving the buffer in the file) "D:\folderOuput\fileouput.txt"
Any help will be appreciated.
JP
Open_This.bsh v1.1 by Tomek Peszor
Submitted by takeshin on Monday, 7 July, 2008 - 06:11
Opens selected path in new buffer. Select path to any file in current textarea and run this macro to open this file in new buffer. If nothing is selected, looks for file path inside quotes surrounding caret. Opens remote URLs as well. Based on Open_Selection.bsh macro, but no selection is needed. Most useful for included files, linked HTML pages, linked scripts or CSS files.
Sorting in MacroManager
Submitted by takeshin on Monday, 7 July, 2008 - 06:18
Macros in MacroManager plugin should be sorted alphabetically.
Also browsing/installing by category would be useful.

--
takeshin
Drag_Down.bsh v1.1 by Tomek Peszor
Submitted by takeshin on Monday, 7 July, 2008 - 07:13
Moves current line or selected lines one line down. It is not needed to select lines from the beginning to the end. Just hold shift+up/down arrow to indicate which lines to move, and then, use a keyboard shortcut you have chosen for this macro. Keeps selection. Suggested shortcut: CS+down arrow. Use in conjunction with Drag_Up.bsh macro.
Drag_Up.bsh v1.1 by Tomek Pęszor
Submitted by takeshin on Monday, 7 July, 2008 - 07:16
Moves current line or selected lines one line up. It is not needed to select lines from the beginning to the end. Just hold shift+up/down arrow to indicate which lines to move, and then, use a keyboard shortcut you have chosen for this macro. Keeps selection. Suggested shortcut: CS+up arrow. Use in conjunction with Drag_Down.bsh macro.
Plugin or Macro?
Submitted by tj.rothwell on Wednesday, 9 July, 2008 - 18:22
I was wondering if there is a way to change the behavior when editing a file that was updated/modified outside the editor.

Instead of a notification to reload or ignore the change, could there be one that would allow the user to merge the two?

In order to do this, could it be done as a macro tying in jdiff? Or would you need a plugin to override the event on how to handle changed files?
Error Message
Submitted by audstune on Saturday, 12 July, 2008 - 20:01
Hi...I installed jedit on my desktop and love it. But I tried to run it on my laptop and I get an error message: When Java Virtual Machine Launcher tries to launch, the error says: Could not find the main class.

Can anyone help with this? I need to use my laptop on a trip to update my xml file.

Thanks!
PHPParser: removing check for ?>
Submitted by Max Headroom on Sunday, 13 July, 2008 - 16:11
Hi
In Drupal, it is recommend not to close PHP code with a '?>'. as not to clash with other modules. PHP code works fine with out it.

Is there a way to remove the check for '?>' from the parser?
Line Height Correctioin
Submitted by _HI_ on Tuesday, 15 July, 2008 - 18:42
when I did install jedit with openjdk in fedora, "Anti Aliased" visibility of source code was more qualited and beauty than with j2se package, but there was another problem , fonts height is not enoutg ( such as Monospaced, Dejavu Sans Mono ) and sometimes underline simbols disappears and after appears.
for example "mysql_connect" functioin is shown as "mysql connect". is posible to add option such as netbeans 5.5.1 has "Line Height Correctioin" in "Editor Settings" Options, or can anyone fix this problem in jedit with alternative way?
Show CR LF
Submitted by yocec on Wednesday, 16 July, 2008 - 13:21
Is there a way to show end line symbol ? carriage return and/or line feed

When I open a file, I need to know end line caracter : LF only or CRLF

Is ther any way to do that ?

Thanks
Component or piece of code for search and replace text multiline with java
Submitted by andremonio on Wednesday, 16 July, 2008 - 18:29
Hi everybody.

Do you have any component or piece of code for search and replace text multiline with java?

I have installed the jEdit and their sources, but it is huge and complex, and I only need this functionality to replace many of the type TXT files.

Thanks!

Best regards.

---- André Campanini - Brazil
jEdit licence when using textarea
Submitted by blafountain on Wednesday, 16 July, 2008 - 23:10
Hello, I stumbled across jedit's capability to be embedded in a swing application using TextArea. This product is a perfect fit for what i need. The only thing is my application is not going to be released as GPL. I was wondering if there was any consideration to make the jedit-textarea.jar under a LGPL style license while jedit as a whole under the GPL.

I would need to make some additions to the TextArea that i would love to contribute back, but with a GPL license i will have to either build my own or find another (probably purchase, i wasn't able to find another product equal to jedit that was LGPL).

thanks for your time.
User login
Browse archives
« June 2008 »
MoTuWeThFrSaSu
 
7
8
9
13
14
16
17
21
22
24
25
26
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   82338
Context Free Art (*.cfdg)   0.31   46043
JBuilder scheme   .001   18487
BBEdit scheme   1.0   18108
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   14282