Object nodeUserObject = view.getNotebookTreeLastSelectedNode();
if(nodeUserObject.getClass() == Note.class){
Note note = (Note)nodeUserObject;
openNote(note);
}else if(nodeUserObject.getClass() == SerializedNote.class){
SerializedNote serializedNote = (SerializedNote) nodeUserObject;
openSerializedNote(serializedNote);
}
}
}