SplashScreen conflict when building jEdit
Submitted by
a992400 on
Sunday, 15 June, 2008 - 19:05
Hello. I'm trying to rebuild jEdit from source, and I'm using the jEdit source code for version 4.2, and Apache Ant version 1.7.0. Ant correctly locates build.xml in the root directory of the jEdit source, and starts the building process. But it fails with two errors, and many warnings. Ignoring the warnings for now, I'm looking at the first error:
[javac] D:\_t\org\gjt\sp\jedit\GUIUtilities.java:1532: reference to SplashScreen is ambiguous, both class org.gjt.sp.jedit.gui.SplashScreen in org.gjt.sp.jedit.gui and class java.awt.SplashScreen in java.awt match
[javac] private static SplashScreen splash;
Apparently Java AWT has a class named SplashScreen (http://java.sun.com/javase/6/docs/api/java/awt/SplashScreen.html), and jEdit is trying to use the same name for its own class. So I'm wondering how jEdit was able to be successfully built for the release? Anyone have any ideas on this?
InfoViewer encoding
Submitted by
takeshin on
Wednesday, 18 June, 2008 - 09:30
Hello,
I use InfoViewer plugin to preview HTML during coding.
When I declare UTF-8 in meta tag, and UTF-8 in buffer encoding,
Unicode characters (ą, ę, ś, ć, ż, ż…) are rendered incorrect.
When I change meta declaration to iso-8859-2 and buffer encoding to UTF-8,
characters are ok.
Anybody can help me with this issue?
--
takeshin
GlobalPlugin gtags integration
Submitted by
kalabp on
Wednesday, 18 June, 2008 - 14:48
I have started using the GlobalPlugin to integrate jEdit with GNU Global and am very impressed with its capabilities. What I would like to see in GlobalPlugin would be integration with gtags, so that the cross-reference database could be generated and updated from jEdit, and integration with the ProjectViewer plugin so that the list of files to be cross-referenced could be obtained from the project:
- Provide a way to run gtags on the entire project from jEdit. gtags should use the GTAGSDBPATH environment variable (if set) as the location of the cross-reference files.
- Update the cross-reference database when a buffer is saved (use incremental the update feature of gtags and global).
jEdit Launcher bug on administrative privilages
Submitted by
takeshin on
Thursday, 19 June, 2008 - 09:01
Problem exists on Windows XP/Vista and other NT based.
When I try to open a new file (form system context menu Open with jEdit)
and server instance of jEdit is running, i get following error:
java.lang.NullPointerException: Null Pointer in Method Invocation
at org.gjt.sp.jedit.bsh.Name.invokeMethod(Name.java:841)
at org.gjt.sp.jedit.bsh.BSHMethodInvocation.eval(BSHMethodInvocation.java:75)
at org.gjt.sp.jedit.bsh.BSHPrimaryExpression.eval(BSHPrimaryExpression.java:102)
at org.gjt.sp.jedit.bsh.BSHPrimaryExpression.eval(BSHPrimaryExpression.java:47)
at org.gjt.sp.jedit.bsh.BSHVariableDeclarator.eval(BSHVariableDeclarator.java:86)
at org.gjt.sp.jedit.bsh.BSHTypedVariableDeclaration.eval(BSHTypedVariableDeclaration.java:84)
at org.gjt.sp.jedit.bsh.Interpreter.eval(Interpreter.java:644)
at org.gjt.sp.jedit.bsh.Interpreter.eval(Interpreter.java:738)
at org.gjt.sp.jedit.bsh.Interpreter.eval(Interpreter.java:727)
at org.gjt.sp.jedit.BeanShellFacade._eval(BeanShellFacade.java:149)
at org.gjt.sp.jedit.BeanShellFacade.eval(BeanShellFacade.java:114)
at org.gjt.sp.jedit.BeanShell.eval(BeanShell.java:389)
at org.gjt.sp.jedit.EditServer$1.run(EditServer.java:343)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
What’s the trouble?
--
takesgin
Plugin compilation
Hi
I have the source to the ProjectViewer plugin within which I have made a trivial modification.
Could someone advice me on the tools and command directives I need to use to create a new version of the plugin .jar file?
If the existing jar file is over-written with a the newly build version, is it just a case of restarting jEdit to utilize the modified plugin?
many thanks,
Paul
How to parse HTML/DOM to set ID attributes
Submitted by
takeshin on
Thursday, 19 June, 2008 - 09:23
I want to write a macro to automatically add id attribute for all specified tags (h2, h3, h4…),
when it is not set yet. (for example #h2-1, #h2-2, #h2-3…).
I wrote a simple javascript bookmarklet to do it,
but I dont’t know how to do it in beanshell macro.
Set IDs bookmarklet
How to write getElementsByTagName(tag) function?
Maybe just regular expression with returning beanshell replacement will work?
Then how to increment those IDs in regexp?
TIA,
takeshin
Import/Export keyboard shortcuts
Submitted by
takeshin on
Thursday, 19 June, 2008 - 11:23
jEdit is great, but configuration/customization takes a lot of time…
It would be great feature to Import/Export keyboard shortcut list to file.
If a macro is attached to shortcut, macro file should be also exported/imported.
How to write a macro to do that?
--
takeshin
Macro 'on event' caller - a simple plugin that culd prove very handy!
I think it could prove very useful to have a plugin that facilitated the configuration of (in each case) a marco to be automatically executed on (for example) the following state-transitions within a jEdit session.
Buffer focus changing, File opening, File saved, File closed (last associated buffer closing), directory in FileBrowser changing
The plugin's option panel would permit the selection of an installed macro (using a dropdown) for each event type supported.
I'm sure there are many more such events for which a macro invocation would prove useful.
Another enhancement for the plugin would be a public API which permitted other plugins to register their own events (by passing a descriptor string, and then invoking another function when the event is to be actioned).
Fuzzy looking fonts and graphics
Submitted by
gatorbrit on
Monday, 23 June, 2008 - 19:18
Hi I am running jEdit in Ubuntu linux 8.04. The fonts etc are really fuzzy and blurry. Not at all crisp. Everything else (outside of jEdit) is very clear.
Any ideas where the problem might be.
Thanks
Opening a file into jEdit in the current view
Submitted by
ewiener on
Monday, 23 June, 2008 - 21:34
I am new to writing plugins (and java in general). I have made a program that pulls some text files off the web and saves them on my computer. I know the paths of the files, but I can't figure out how to open them. I know this must be incredibly simple, but I haven't been able to find a simple explanation of how to do this online, nor do I have a good enough grasp of plugin development to understand the source code to plugins on this site. If anyone can explain this to me, I would be extremely grateful.
Making a plugin aware of a user saving
Submitted by
ewiener on
Monday, 23 June, 2008 - 22:00
Is it possible to let my plugin know when a user saves a file? My plugin is used to pull text files off a remote server, and then store them on the local machine for the user to edit them. In the end, I'd like for the user to just be able to hit save, and then the plugin would take care of updating the file on the server. Is there some sort of event that is triggered when a user saves that I could use to signal the plugin to upload the modified file? Any help will be appreciated immensely.
Swing dialog - RAD tool available?
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
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

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