Is there any way to set up UE to search through a defined path in the Open File dialog? For example, if I have a path such as .:src:src/inc, I'd like UE to look in ".", then "src", then "src/inc" for the file.
Thanks,
Steve
Thanks,
Steve
Code: Select all
var myRootPath = "C:\\MyProject\\";
var selectProgram;
if (UltraEdit.activeDocument.isSel()) {
selectProgram = UltraEdit.activeDocument.selection;
}
else {
selectProgram = UltraEdit.getString("Enter filename to open:",1);
}
if (selectProgram.length==0) {
// no filename entered or selected
}
else {
if (selectProgram.indexOf(".jsp") > 0) {
UltraEdit.open(myRootPath+"jsp\\"+selectProgram);
}
else {
if ((selectProgram.indexOf(".java") > 0) || (selectProgram.indexOf(".class") > 0)) {
selectProgram = selectProgram.replace(".class",".java");
UltraEdit.open(myRootPath+"java\\"+selectProgram);
}
else {
UltraEdit.open(myRootPath+"misc\\"+selectProgram);
}
}
}