jEdit Community - Resources for users of the jEdit Text Editor
External Help files, and Preview in Web Browser of active file :)
Submitted by Anonymous on Thursday, 15 January, 2004 - 03:28
Hello,

After a few hours of frustration, I've finally got external help files (launched from a toolbar), and preview in web browser (also toolbar buttons) setup and working perfectly.

The way I did it was to use the Console plugin and I wrote a macro that launches processes. For the experts, this is probably no big deal, but for us beginners, here is how I did it..

runCommandInConsole(view,"System","hh \"I:\\Reference\\[Web]\\php_manual_en.chm\"");
view.getDockableWindowManager().toggleDockableWindow("console");

This loads the HTML help compiler with the php manual.

And here is how to do preview in browser:

runCommandInConsole(view,"System","\"C:\\Program Files\\MozillaFirebird\\MozillaFirebird\" \"" + buffer.getPath() + "\"");
view.getDockableWindowManager().toggleDockableWindow("console");

OS is windows xp pro. I've also created some toolbar icons (email me if interested) for jEdit which can be seen by clicking here: http://www.funklabs.org/screenshots/jedit_3.jpg

It should be pointed out to newbies that just using a macro 'exec' will only half work because exec waits for the process to terminate before returning control to jEdit (atleast it did for me) and thus you gotta close the browser to get the display back and jEdit ready for more business. the console plugin was the only way I could get this to work as it should (just launching the process and not waiting).

I love the program. I am a long time user of ultraedit but no more. it's jedit forever for me Smiling If anyone is interested I can create a zip archive containing all the graphics and .bsh macro scripts that I use so that you can also have nifty features as found in UltraEdit Evil

Thanks.

- grymmjack (mailto:grymmz0r@yahoo.com)

Comment viewing options
Select your preferred way to display the comments and click 'Save settings' to activate your changes.
Here's the BeanShell Script if you want to add lookups in a CHM
by Anonymous on Tue, 05/10/2004 - 14:28
CHM_location = "C:\\PHP\\php_manual_en.chm";

if (textArea.getSelection().length > 0) {
CHM_location += "::/_function.html#" + textArea.getSelectedText();
}
exec("HH " + CHM_location);

Thank you,
Blaine
 
CHM Lookup Uber-Script
by Anonymous on Mon, 02/05/2005 - 16:10

As mentioned in the parent post, exec() will wait for HtmlHelp to close before returning control to jEdit--not what you want if you're bringing up a help file to look at. Using a combination of the parent and the above post, I came up with the following script:

CHM_location = "C:\\php_manual\\php_manual_en.chm";
if (textArea.getSelection().length <= 0) {
	textArea.selectWord();
}
CHM_location += "::/_function.html#" + textArea.getSelectedText();
view.getDockableWindowManager().toggleDockableWindow("console");
runCommandInConsole(view,"System","hh \"" + CHM_location + "\"");
view.getDockableWindowManager().toggleDockableWindow("console");

This will check to see if anything is selected first, and if not, it will select the current word, then launch HH via the console (I'm assuming that you have the console docked to the jEdit window and hidden by default). The only downside to this setup is that it won't reuse previous instances of HH; a new window will pop up each time it's invoked. I'm assuming that there's some sort of Windows API that other IDEs use to keep that from happening, since I don't see any way to prevent that in jEdit.

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   82348
Context Free Art (*.cfdg)   0.31   46055
JBuilder scheme   .001   18495
BBEdit scheme   1.0   18116
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