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-3878 Use annotations from the representative sequence in the new alignment.

    • -2
    • +3
    /src/jalview/ws2/gui/JPredMenuBuilder.java
    • -2
    • +1
    /src/jalview/ws2/operations/JPredWorker.java
JAL-3878 Add jpred operation and worker to the services.

    • -0
    • +157
    /src/jalview/ws2/gui/JPredMenuBuilder.java
    • -0
    • +35
    /src/jalview/ws2/operations/JPredOperation.java
    • -0
    • +334
    /src/jalview/ws2/operations/JPredWorker.java
    • -16
    • +22
    /src/jalview/ws2/slivka/SlivkaWebService.java
JAL-3878 Make openEditsParamsDialog an interface static method.

    • -40
    • +4
    /src/jalview/ws2/gui/AnnotationMenuBuilder.java
    • -0
    • +43
    /src/jalview/ws2/gui/MenuEntryProviderI.java
JAL-3878 Add annotation operation and worker to the services.

    • -0
    • +181
    /src/jalview/ws2/gui/AnnotationMenuBuilder.java
    • -0
    • +50
    /src/jalview/ws2/gui/ProgressBarUpdater.java
    • -0
    • +602
    /src/jalview/ws2/operations/AnnotationWorker.java
    • -42
    • +35
    /src/jalview/ws2/slivka/SlivkaWebService.java
JAL-3878 Handle nulls when filtering annotation workers by name.

JAL-3878 Move common poll method to upper class AbstractWorker

JAL-3878 Add methods to get and remove workers by their calc name.

    • -2
    • +13
    /src/jalview/api/AlignCalcManagerI2.java
JAL-3878 Add multiple sequence operation.

    • -0
    • +206
    /src/jalview/ws2/gui/AlignmentMenuBuilder.java
    • -0
    • +170
    /src/jalview/ws2/gui/AlignmentProgressUpdater.java
    • -0
    • +145
    /src/jalview/ws2/gui/WebServiceInfoUpdater.java
    • -0
    • +415
    /src/jalview/ws2/operations/AlignmentWorker.java
    • -2
    • +1
    /src/jalview/ws2/slivka/SlivkaWebService.java
JAL-3878 Create abstract workers and their utility classes.

    • -0
    • +75
    /src/jalview/ws2/operations/AbstractPollableWorker.java
    • -0
    • +20
    /src/jalview/ws2/operations/AbstractWorker.java
    • -0
    • +8
    /src/jalview/ws2/operations/Operation.java
    • -0
    • +64
    /src/jalview/ws2/operations/WSJobList.java
    • -0
    • +10
    /src/jalview/ws2/operations/WebServiceWorkerI.java
    • -0
    • +74
    /src/jalview/ws2/operations/WebServiceWorkerListener.java
JAL-3878 Create pollable task and executor it can be run with.

    • -0
    • +51
    /src/jalview/ws2/PollableTaskI.java
    • -0
    • +57
    /src/jalview/ws2/PollableTaskListenerI.java
    • -0
    • +164
    /src/jalview/ws2/PollingTaskExecutor.java
JAL-3878 Add ws menu builder and attach to the align frame.

    • -19
    • +20
    /src/jalview/gui/SlivkaPreferences.java
    • -2
    • +2
    /src/jalview/ws2/WebServiceDiscovererI.java
    • -0
    • +208
    /src/jalview/ws2/gui/WebServicesMenuBuilder.java
JAL-3878 Add slivka's implementations of web service and discoverer.

    • -0
    • +210
    /src/jalview/ws2/slivka/SlivkaWSDiscoverer.java
    • -0
    • +304
    /src/jalview/ws2/slivka/SlivkaWebService.java
JAL-3878 Create backbone for new web services

    • -0
    • +183
    /src/jalview/ws2/WSJob.java
    • -0
    • +105
    /src/jalview/ws2/WSJobStatus.java
    • -0
    • +168
    /src/jalview/ws2/WebServiceDiscovererI.java
    • -0
    • +105
    /src/jalview/ws2/WebServiceI.java
    • -0
    • +28
    /src/jalview/ws2/gui/MenuEntryProviderI.java
    • -0
    • +144
    /src/jalview/ws2/operations/AbstractOperation.java
    • -0
    • +119
    /src/jalview/ws2/operations/Operation.java
    • -0
    • +97
    /src/jalview/ws2/operations/OperationStub.java
JAL-3066 Remove redundant throws declaration from SlivkaParamSet constructor.

    • -1
    • +1
    /src/jalview/ws/slivkaws/SlivkaParamSet.java
Merge branch 'JAL-3866_RNAalifold-slivka-client' into alpha/JAL-3066_Jalview_212_slivka-integration

Merge branch 'alpha/JAL-3899_deuniquify_refactor' into alpha/JAL-3066_Jalview_212_slivka-integration

JAL-3878 Add getCalcName to AlignCalcWorkerI.

getCalcName() can be used to identify services that run the calculator.

when an alternative calculator (different host or parameters) is created

the old ones sharing the name can be stopped.

    • -3
    • +15
    /src/jalview/api/AlignCalcWorkerI.java
    • -0
    • +6
    /src/jalview/workers/ConsensusThread.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.