boolean showSSAnnotations, boolean showAnnotations,
boolean hideTFrows)
{
+ if (af == null)
+ {
+ Console.warn("Expected Alignment Window not opened");
+ return;
+ }
af.setAnnotationsVisibility(showSSAnnotations, true, false);
af.setAnnotationsVisibility(showAnnotations, false, true);
Cache.enableSessionProperties();
structureViewerPath.setText(viewerPath);
- jalview.bin.Console.debug("Found " + paths.size()
- + " paths to look for " + selectedItem.toString());
+ jalview.bin.Console
+ .debug("Found " + (paths == null ? null : paths.size())
+ + " paths to look for " + selectedItem.toString());
+ if (paths == null)
+ {
+ paths = new ArrayList<>();
+ }
paths.add(0, structureViewerPath.getText());
for (String path : paths)
{
{
String glob = "glob:" + parentDir.toString() + File.separator
+ rest;
+ if (Platform.isWin())
+ {
+ // escape "\\" on Windows
+ // This ultimately replaces "\\" == '\' with "\\\\" = '\\' to escape
+ // backslashes
+ glob = glob.replaceAll("\\\\", "\\\\\\\\");
+ }
PathMatcher pm = FileSystems.getDefault().getPathMatcher(glob);
int maxDepth = rest.contains("**") ? 1028
: (int) (rest.chars()