jEdit Community - Resources for users of the jEdit Text Editor
Close the console problem
Submitted by baloo on Friday, 13 February, 2004 - 15:39
Hi, i modified a macro to do this

import console.Console;

startBatch()
{
String strCheckerPath = "F:\\projects\\javapaint\\makejar.bat";

runCommandInConsole(view, "System", strCheckerPath);

// close the console if it is open
// manager = view.getDockableWindowManager();
//if (manager.isDockableWindowVisible("console")) {
//manager.toggleDockableWindow("console");
//}
}

startBatch();

it's start a batch file, but if i uncomment the code for closing the console my batch file isnt starting anymore... if i let this in comment my batch file is starting but the console isnt closing. So how can modify this to be able to close the console and that my batch file start

thx
Format of date
Submitted by Anonymous on Monday, 26 January, 2004 - 12:26
Hey all, Trying to customize the stock Insert_Date.bsh macro to use the format I want but can't get it to work. So I tried this, and it didn't work either. What am I doing wrong?
    Date today;
    String output;
    SimpleDateFormat formatter;

    formatter = new SimpleDateFormat("E, M d, y - h :m  a", currentLocale);
    today = new Date();
    output = formatter.format(today);

    // inserting date and internet time to textarea
    textArea.setSelectedText(ouput);
Thanks in advance
Getting string properties
Submitted by Anonymous on Saturday, 24 January, 2004 - 19:38
Which method is recommended for getting a string property like "lineComment" which depend on the current editing mode?
buffer.getMode().getProperty() or can I use buffer.getStringProperty()?
Macro Help Needed by Newbie
Submitted by Anonymous on Tuesday, 20 January, 2004 - 01:24
Hello and thanks for looking and helping me out. I am using version 4.1 final.

For my second macro, I wish to write a routine that allows me to prompt the user for a single character and then to replace every character position in a selected area with that user-supplied character. Seems like it sould be pretty simple.

What I am finding is that it is not as easy as I expected. It seems that when selections include areas beyond the end of a line, the values I get for the start and end positions on those lines are not what I expect. They are offets into the buffer and there is no accounting for the selected area that has "virtual" space. There appears to be no way (in the API) for me to find the on-screen bondaries of the selected area.
Get environment variable from Windows
Submitted by Anonymous on Friday, 16 January, 2004 - 16:13
I am not a java programmer, so I'm not sure where or how to do it, but is there a way to get an environment variable into a macro variable? I would like to use environment variable %USERPROFILE% so that when I copy my .jedit folder to other computers that I use, all of my macros, and configurations work as they should on the other computers, seamlessly without modification. Example macro:
user = "grymmjack";
quot = "\"";
prog = "hh";
file = "C:\\Documents and Settings\\" + user + "\\.jedit\\reference\\php.chm";
line  = quot + prog + quot + " " + file;
runCommandInConsole(view, "System", line);
  
Regular expression in macro doesn't work
Submitted by Anonymous on Tuesday, 23 December, 2003 - 23:48
Hi, Macros like below
 
>>>>
    Pattern p = Pattern.compile("*.\(([0-9]+)\).*");
    lineText = textArea.getLineText(line);
    Matcher m = p.matcher(lineText);
>>>>

or 

>>>>
gnu.regexp.RE re = new gnu.regexp.RE("^(\*.)\\t(\*.)\\t(\*.)$");
lineText = textArea.getLineText(line);
gnu.regexp.REMatch match = re.getMatch(lineText);
lineText = "<1>=" + match.toString(1) + "<2>=" + 
   match.toString(2) + "<3>=" + match.toString(3);
>>>>
don't work. Parsing fails on both. Does it mean I can't use any regular expressions in macros or am I doing something wrong?
How to Un-comment a selection
Submitted by orapower on Wednesday, 17 December, 2003 - 17:36
I'm looking to do the opposite of applying comments (both line and range) to a selection. Any idea how to do this?
User login
Browse archives
« November 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   101634
Context Free Art (*.cfdg)   0.31   46062
BBEdit scheme   1.0   18601
JBuilder scheme   .001   18502
ColdFusion scheme   1.0   18031
R Edit Mode - extensive version   0.1   17481
Advanced HTML edit mode   1.0   16213
Matlab Edit Mode   1.0   16075
jEdit XP icons   1.0   15236
XP icons for jEdit   1.1   14300