} catch (Exception e)
{
- Cache.log.error("Couln't write Jalview state to " + statefile, e);
+ Cache.error("Couln't write Jalview state to " + statefile, e);
// TODO: inform user of the problem - they need to know if their data was
// not saved !
if (errorMessage == null)
System.err.println("error writing date: " + e.toString());
}
object.setVersion(
- jalview.bin.Cache.getDefault("VERSION", "Development Build"));
+ Cache.getDefault("VERSION", "Development Build"));
/**
* rjal is full height alignment, jal is actual alignment with full metadata
}
else
{
- Cache.log.error(
+ Cache.error(
"Failed to save viewer state for " + viewerType);
}
}
.getHiddenColumns();
if (hidden == null)
{
- warn("REPORT BUG: avoided null columnselection bug (DMAM reported). Please contact Jim about this.");
+ Cache.warn("REPORT BUG: avoided null columnselection bug (DMAM reported). Please contact Jim about this.");
}
else
{
object.getPcaViewer().add(viewer);
} catch (Throwable t)
{
- Cache.log.error("Error saving PCA: " + t.getMessage());
+ Cache.error("Error saving PCA: " + t.getMessage());
}
}
}
else if (!matchedFile.equals(pdbentry.getFile()))
{
- Cache.log.warn(
+ Cache.warn(
"Probably lost some PDB-Sequence mappings for this structure file (which apparently has same PDB Entry code): "
+ pdbentry.getFile());
}
calcIdParam.getParameters().replace("|\\n|", "\n"));
} catch (IOException x)
{
- warn("Couldn't parse parameter data for "
+ Cache.warn("Couldn't parse parameter data for "
+ calcIdParam.getCalcId(), x);
return false;
}
}
else
{
- warn("Cannot resolve a service for the parameters used in this project. Try configuring a JABAWS server.");
+ Cache.warn("Cannot resolve a service for the parameters used in this project. Try configuring a JABAWS server.");
return false;
}
}
return id.toString();
}
// give up and warn that something has gone wrong
- warn("Cannot find ID for object in external mapping : " + jvobj);
+ Cache.warn("Cannot find ID for object in external mapping : " + jvobj);
}
return altCode;
}
mp.setDseqFor(jmpid);
if (!seqRefIds.containsKey(jmpid))
{
- jalview.bin.Cache.log.debug("creatign new DseqFor ID");
+ Cache.debug("creatign new DseqFor ID");
seqRefIds.put(jmpid, ps);
}
else
{
- jalview.bin.Cache.log.debug("reusing DseqFor ID");
+ Cache.debug("reusing DseqFor ID");
}
// mp.setMappingChoice(mpc);
}
else
{
- warn("Couldn't find entry in Jalview Jar for " + jarEntryName);
+ Cache.warn("Couldn't find entry in Jalview Jar for " + jarEntryName);
}
} catch (Exception ex)
{
tp.getTreeCanvas().setApplyToAllViews(tree.isLinkToAllViews());
if (tp == null)
{
- warn("There was a problem recovering stored Newick tree: \n"
+ Cache.warn("There was a problem recovering stored Newick tree: \n"
+ tree.getNewick());
continue;
}
else
{
errorMessage = ("The Jmol views in this project were imported\nfrom an older version of Jalview.\nPlease review the sequence colour associations\nin the Colour by section of the Jmol View menu.\n\nIn the case of problems, see note at\nhttp://issues.jalview.org/browse/JAL-747");
- warn(errorMessage);
+ Cache.warn(errorMessage);
}
}
}
} catch (IllegalArgumentException | NullPointerException e)
{
// TODO JAL-3619 show error dialog / offer an alternative viewer
- Cache.log.error("Invalid structure viewer type: " + type);
+ Cache.error("Invalid structure viewer type: " + type);
}
}
}
else
{
- warn("Couldn't recover parameters for "
+ Cache.warn("Couldn't recover parameters for "
+ calcIdParam.getCalcId());
}
}
String id = object.getViewport().get(0).getSequenceSetId();
if (skipList.containsKey(id))
{
- if (Cache.log != null && Cache.log.isDebugEnabled())
- {
- Cache.log.debug("Skipping seuqence set id " + id);
- }
+ Cache.debug("Skipping seuqence set id " + id);
return true;
}
return false;
{
if (ds != null && ds != seqSetDS)
{
- warn("JAL-3171 regression: Overwriting a dataset reference for an alignment"
+ Cache.warn("JAL-3171 regression: Overwriting a dataset reference for an alignment"
+ " - CDS/Protein crossreference data may be lost");
if (xtant_ds != null)
{
// This can only happen if the unique sequence set ID was bound to a
// dataset that did not contain any of the sequences in the view
// currently being restored.
- warn("JAL-3171 SERIOUS! TOTAL CONFUSION - please consider contacting the Jalview Development team so they can investigate why your project caused this message to be displayed.");
+ Cache.warn("JAL-3171 SERIOUS! TOTAL CONFUSION - please consider contacting the Jalview Development team so they can investigate why your project caused this message to be displayed.");
}
}
ds = seqSetDS;
SequenceI[] dsseqs = new SequenceI[dseqs.size()];
dseqs.copyInto(dsseqs);
ds = new jalview.datamodel.Alignment(dsseqs);
- debug("Created new dataset " + vamsasSet.getDatasetId()
+ Cache.debug("Created new dataset " + vamsasSet.getDatasetId()
+ " for alignment " + System.identityHashCode(al));
addDatasetRef(vamsasSet.getDatasetId(), ds);
}
AlignmentI prevDS = seqToDataset.put(restoredSeq.getDsseqid(), ds);
if (prevDS != null && prevDS != ds)
{
- warn("Dataset sequence appears in many datasets: "
+ Cache.warn("Dataset sequence appears in many datasets: "
+ restoredSeq.getDsseqid());
// TODO: try to merge!
}
{
if (dataset.getDataset() != null)
{
- warn("Serious issue! Dataset Object passed to getDatasetIdRef is not a Jalview DATASET alignment...");
+ Cache.warn("Serious issue! Dataset Object passed to getDatasetIdRef is not a Jalview DATASET alignment...");
}
String datasetId = makeHashCode(dataset, null);
if (datasetId == null)
seqRefIds.put(sqid, djs);
}
- jalview.bin.Cache.log.debug("about to recurse on addDBRefs.");
+ Cache.debug("about to recurse on addDBRefs.");
addDBRefs(djs, ms);
}
private Hashtable jvids2vobj;
- private void warn(String msg)
- {
- warn(msg, null);
- }
-
- private void warn(String msg, Exception e)
- {
- if (Cache.log != null)
- {
- if (e != null)
- {
- Cache.log.warn(msg, e);
- }
- else
- {
- Cache.log.warn(msg);
- }
- }
- else
- {
- System.err.println("Warning: " + msg);
- if (e != null)
- {
- e.printStackTrace();
- }
- }
- }
-
- private void debug(String string)
- {
- debug(string, null);
- }
-
- private void debug(String msg, Exception e)
- {
- if (Cache.log != null)
- {
- if (e != null)
- {
- Cache.log.debug(msg, e);
- }
- else
- {
- Cache.log.debug(msg);
- }
- }
- else
- {
- System.err.println("Warning: " + msg);
- if (e != null)
- {
- e.printStackTrace();
- }
- }
- }
-
/**
* set the object to ID mapping tables used to write/recover objects and XML
* ID strings for the jalview project. If external tables are provided then
if (!jvann.annotationId.equals(anid))
{
// TODO verify that this is the correct behaviour
- this.warn("Overriding Annotation ID for " + anid
+ Cache.warn("Overriding Annotation ID for " + anid
+ " from different id : " + jvann.annotationId);
jvann.annotationId = anid;
}
}
else
{
- Cache.log.debug("Ignoring " + jvobj.getClass() + " (ID = " + id);
+ Cache.debug("Ignoring " + jvobj.getClass() + " (ID = " + id);
}
}
}
}
else
{
- warn("Couldn't find entry in Jalview Jar for " + jarEntryName);
+ Cache.warn("Couldn't find entry in Jalview Jar for " + jarEntryName);
}
} catch (Exception ex)
{
}
} catch (Exception ex)
{
- Cache.log.error("Error loading PCA: " + ex.toString());
+ Cache.error("Error loading PCA: " + ex.toString());
}
}
});
} catch (InvocationTargetException | InterruptedException ex)
{
- warn("Unexpected error when opening " + viewerType
+ Cache.warn("Unexpected error when opening " + viewerType
+ " structure viewer", ex);
}
}
}
} catch (IOException e)
{
- Cache.log.error("Error restoring Jmol session: " + e.toString());
+ Cache.error("Error restoring Jmol session: " + e.toString());
}
return null;
}
maxcol = new Color(Integer.parseInt(colourModel.getRGB(), 16));
} catch (Exception e)
{
- Cache.log.warn("Couldn't parse out graduated feature color.", e);
+ Cache.warn("Couldn't parse out graduated feature color.", e);
}
NoValueColour noCol = colourModel.getNoValueColour();