}
}
public void doubleClickHandler() {
int lineNumber = 0;
CompilerNode n = (CompilerNode) getNodeSelected();
if (n == null) {
return;
}
try {
DataObject dob = DataObject.find(currentFileInEditor);
//Bug fix: actually open the file
openEditor(dob);
EditorCookie ck = (EditorCookie) dob.getCookie(EditorCookie.class);
if (ck != null) {
ck.openDocument();
JEditorPane[] p = ck.getOpenedPanes();
if (p.length > 0) {
//Need to do this since we're disabling the window system's
//auto focus mechanism
p[0].requestFocus();
if (dob != null) {
LineCookie lc = (LineCookie) dob.getCookie(LineCookie.class);
if (lc == null) {
return;
}
lineNumber = n.getDescriptor().getLine() - 1;
Line l = lc.getLineSet().getOriginal(lineNumber);
l.show(Line.ShowOpenType.OPEN, Line.ShowVisibilityType.FOCUS);
if (TextToSpeechOptions.isScreenReading()) {
speech.speak("Focussed to " + currentFileInEditor.getName()
+ " dot " + currentFileInEditor.getExt() + " "
+ n.getShortDescription() + " " + n.getDisplayName(),
SpeechPriority.MEDIUM);
}
}
}
}