jalview

Clone Tools
  • last updated a few seconds ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
I know the problems you had with close() - you mentioned in the comments on the issue. However, you might have noticed that FileParse.close() is not called from many places, so changing its behavio...

I know the problems you had with close() - you mentioned in the comments on the issue. However, you might have noticed that FileParse.close() is not called from many places, so changing its behaviour wouldn't have too many side effects.

The intended pattern for FileParse.close() was:

ParserThing pt;
try {
pt = new <? assignable to FileParse>(data spec..)
.. do whatever needed to trigger parsing
.. then check pt's error/warning status and report any problems.
} catch (IOException ..) {
.. handle read or parse errors 
}
finally {
if (pt!=null) {
pt.close();
} // catch and report any IOErrors if desired
}
I tried this first, but FileParse.close() deliberately leaves the FileParse in an error state, which caused problems later (I don't remember the specifics). I could not work out why the FileParse.c...

I tried this first, but FileParse.close() deliberately leaves the FileParse in an error state, which caused problems later (I don't remember the specifics). I could not work out why the FileParse.close() was designed to do this but suspect changing this methos so it's (in general) not left in an error state will cause bigger problems. Also, since Jalview is used to having dataIn for the lifetime of the alignment, I wasn't sure if nulling the object would cause unforeseen errors (in e.g. filename etc).

Maybe it would be best to overload FileParse.close() to pass in an error value/message, then it would essentially be calling FileParse.closeDataIn() instead of FileParse.dataIn.close()

Agree with the finally {} – forgot that (not been a java programmer for quite long enough!). Presumably that should go in FileParse and not AlignFile too.

Ideally, any low level file ops should happen in the base class (FileParse) rather than here. AlignFile should call the FileParse.close() method rather than directly manipulate dataIn, which is man...

Ideally, any low level file ops should happen in the base class (FileParse) rather than here. AlignFile should call the FileParse.close() method rather than directly manipulate dataIn, which is managed by FileParse. Note that FileParse.close() nulls the dataIn reference so the stream can be garbage collected properly.

It's also good practice to try to close() in a finally {} clause, catching and reporting exceptions if needed... this is actually what the FileParse.close() method's design was intended for, since the caller should have already checked 'error' and 'errormessage' for parsing problems. Exceptions/Errors on close are not fatal for file import.

file close error will trash import of project

file close error will trash import of project

close filehandles straight after parse, without setting an error
close filehandles straight after parse, without setting an error
JAL-3933 Updated log4j jars with log4j-2.16.0 and compatibility API log4j-1.2-api-2.16.0. Stripped...
JAL-3933 Updated log4j jars with log4j-2.16.0 and compatibility API log4j-1.2-api-2.16.0. Stripped...
JAL-3930 Added a customizedId="JALVIEW" to launcher for use by file associations. Better for response.varfile installation of Jalview

    • -25
    • +25
    /utils/install4j/file_associations_auto-install4j8.xml
    • -1
    • +1
    /utils/install4j/file_associations_template-install4j8.xml
JAL-3553 added customized labels for install4j output.txt

JAL-3830 forgot to uncheck this

JAL-3830 polished setup app for macos

JAL-3830 quick fix to installer text

JAL-3830 install4j9 tries to parse and can't cope with the hyphens and filename format of the jre-VERSION-OS-ARCH.tar.gz JRE tar files, so using underscores in symbolic links

JAL-3830 Added steps for install4j9 to create macOS symbolic link to wrapper script (link) at /Applications/Jalview.app/Contents/MacOS/jalview and to add icon to Dock

    • -0
    • +1447
    /utils/install4j/install4j9_template.install4j
JAL-3907 adjusted download_jdks.sh and download_jres.sh scripts to use adoptium and added Java 17 download. Added JAVA_VERSION=17 as a gradle build property option.

Merge branch 'bug/r2_11_2/JAL-3904_structureviewermenu' into develop

JAL-3905 Fix: wait for response when sending mouseovers. Combined remove old label and add new label and also added warning in javadoc about out-of-order execution

JAL-3904 override buildActionMenu to add in additional menu actions after rebuild

    • -4
    • +15
    /src/jalview/gui/ChimeraViewFrame.java
    • -1
    • +7
    /src/jalview/gui/StructureViewerBase.java
JAL-3904 failing test

    • -1
    • +5
    /src/jalview/gui/StructureViewerBase.java
SequencesInfo which is an individual object is doable, but I feel like it would be just a wrapper around a Map. What additional functionality would SequencesInfo have over a traditional Map? I'm n...

SequencesInfo which is an individual object is doable, but I feel like it would be just a wrapper around a Map. What additional functionality would SequencesInfo have over a traditional Map?

I'm not very familiar with serialization in java, I know there are libraries that can serialize beans to json or xml, but what are your expectations in this case?

one class with a static factory method seems to be better than two classes and an external mutable object.

one class with a static factory method seems to be better than two classes and an external mutable object.

What's wrong with static classes? They are just like regular classes but within other class' namespace. That's non-static inner classes that are special. About factory pattern, I think it would be ...

What's wrong with static classes? They are just like regular classes but within other class' namespace. That's non-static inner classes that are special.
About factory pattern, I think it would be an overkill for a class that is only used by SeqsetUtils' methods.

yes, I see that, but do you really need a nested static class ? in line with my general comments re encapsulating the Map<String,SequenceInfo> further: perhaps it might make sense to simply apply a...

yes, I see that, but do you really need a nested static class ? in line with my general comments re encapsulating the Map<String,SequenceInfo> further: perhaps it might make sense to simply apply a factory pattern rather than have an internal bean that a generic map holds references to ?

(lets not get stuck on this though, the main thing is that the implementation works fine for now, though needs more work in order to save/restore sequenceInfo objects from Jalview project files)

Because it's instantiated in a static context e.g. uniquify and it does not need an instance of SeqsetUtils object to work.

Because it's instantiated in a static context e.g. uniquify and it does not need an instance of SeqsetUtils object to work.

we won't see this messages unless asserts are enabled. Cache.log.warn is perhaps better ?

we won't see this messages unless asserts are enabled. Cache.log.warn is perhaps better ?

it's a reasonable first pass, though stylistically all you've done is transformed a single concrete instance (Hashtable) to a more strongly typed verbose instance (Map<String,SequenceInfo>). Why no...

it's a reasonable first pass, though stylistically all you've done is transformed a single concrete instance (Hashtable) to a more strongly typed verbose instance (Map<String,SequenceInfo>). Why not go further and have a SequencesInfo object that records metadata for one or more sequences ?

There are also other requirements: SequenceInfo sets will need to be persisted for a web services job. You could expand JAL-3899 to incorporate this perhaps - JAL-1786 is the relevant epic for that.