import jalview.analysis.AlignmentUtils;
import jalview.analysis.Conservation;
import jalview.api.AlignViewportI;
-import jalview.bin.Cache;
+import jalview.bin.Console;
import jalview.commands.ChangeCaseCommand;
import jalview.commands.EditCommand;
import jalview.commands.EditCommand.Action;
import java.io.IOException;
import java.net.MalformedURLException;
-
/**
* The popup menu that is displayed on right-click on a sequence id, or in the
* sequence alignment.
urlLink = new UrlLink(link);
} catch (Exception foo)
{
- Cache.log.error("Exception for URLLink '" + link + "'", foo);
+ Console.error("Exception for URLLink '" + link + "'", foo);
continue;
}
if (!urlLink.isValid())
{
- Cache.log.error(urlLink.getInvalidMessage());
+ Console.error(urlLink.getInvalidMessage());
continue;
}
});
add(menuItem);
}
-
menuItem = new JMenuItem(
MessageManager.getString("action.hide_sequences"));
menuItem.addActionListener(new ActionListener()
{
buildGroupURLMenu(sg, groupLinks);
}
+ // TODO REMOVE FOR 2.12 ?
// Add a 'show all structures' for the current selection
Hashtable<String, PDBEntry> pdbe = new Hashtable<>();
Hashtable<String, PDBEntry> reppdb = new Hashtable<>();
/*
* show local rather than linked feature coordinates
*/
- int[] beginRange = mf.getMappedPositions(start, start);
- start = beginRange[0];
- int[] endRange = mf.getMappedPositions(end, end);
- end = endRange[endRange.length - 1];
+ int[] localRange = mf.getMappedPositions(start, end);
+ if (localRange == null)
+ {
+ // e.g. variant extending to stop codon so not mappable
+ return;
+ }
+ start = localRange[0];
+ end = localRange[localRange.length - 1];
}
StringBuilder desc = new StringBuilder();
desc.append(sf.getType()).append(" ").append(String.valueOf(start));
urlLink = new GroupUrlLink(link);
} catch (Exception foo)
{
- Cache.log.error("Exception for GroupURLLink '" + link + "'", foo);
+ Console.error("Exception for GroupURLLink '" + link + "'", foo);
continue;
}
if (!urlLink.isValid())
{
- Cache.log.error(urlLink.getInvalidMessage());
+ Console.error(urlLink.getInvalidMessage());
continue;
}
final String label = urlLink.getLabel();
menuItem.setEnabled(true);
for (String calcId : tipEntries.keySet())
{
- tooltip.append("<br>" + calcId + "/" + tipEntries.get(calcId));
+ tooltip.append("<br/>" + calcId + "/" + tipEntries.get(calcId));
}
String tooltipText = JvSwingUtils.wrapTooltip(true,
tooltip.toString());
contents.append("<p><h2>" + MessageManager.formatMessage(
"label.create_sequence_details_report_annotation_for",
new Object[]
- { seq.getDisplayId(true) }) + "</h2></p><p>");
+ { seq.getDisplayId(true) }) + "</h2></p>\n<p>");
new SequenceAnnotationReport(false).createSequenceAnnotationReport(
contents, seq, true, true, ap.getSeqPanel().seqCanvas.fr);
contents.append("</p>");