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?