String messageTitle = org.openide.util.NbBundle.getMessage(SonarIssuesTopComponent.class, "SonarIssuesTopComponent.unexistentFile.title");
String message = MessageFormat.format(org.openide.util.NbBundle.getMessage(SonarIssuesTopComponent.class, "SonarIssuesTopComponent.unexistentFile.text"), file.getPath());
JOptionPane.showMessageDialog(WindowManager.getDefault().getMainWindow(), message, messageTitle, JOptionPane.WARNING_MESSAGE);
return;
}
DataObject dobj = null;
try {
dobj = DataObject.find(fobj);
} catch (DataObjectNotFoundException ex) {
Exceptions.printStackTrace(ex);
}
if (dobj != null) {
EditorCookie ec = (EditorCookie) dobj.getLookup().lookup(EditorCookie.class);
if (ec != null) {
ec.open();
Line.Set lineSet = ec.getLineSet();
int index = lineNumber-1;
assert !lineSet.getLines().isEmpty();