case ROI:
IJ.runPlugIn("ij.plugin.RoiReader", path);
break;
case JAVA_OR_TEXT: case TEXT:
if (IJ.altKeyDown()) { // open in TextWindow if alt key down
new TextWindow(path,400,450);
IJ.setKeyUp(KeyEvent.VK_ALT);
break;
}
File file = new File(path);
int maxSize = 250000;
long size = file.length();
if (size>=28000) {
String osName = System.getProperty("os.name");
if (osName.equals("Windows 95") || osName.equals("Windows 98") || osName.equals("Windows Me"))
maxSize = 60000;
}
if (size<maxSize) {
Editor ed = (Editor)IJ.runPlugIn("ij.plugin.frame.Editor", "");
if (ed!=null) ed.open(getDir(path), getName(path));
} else
new TextWindow(path,400,450);
break;
case OJJ: // ObjectJ project
IJ.runPlugIn("ObjectJ_", path);
break;
case TABLE: // ImageJ Results table