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 Add RNAalifold service discovery.

JAL-3878 Add javadocs to created classes and reformat code.

    • -6
    • +12
    /src/jalview/gui/WebServicesMenuBuilder.java
    • -0
    • +17
    /src/jalview/ws2/MenuEntryProviderI.java
    • -0
    • +39
    /src/jalview/ws2/PollableTaskI.java
    • -0
    • +43
    /src/jalview/ws2/PollableTaskListenerI.java
    • -1
    • +39
    /src/jalview/ws2/PollingTaskExecutor.java
    • -0
    • +11
    /src/jalview/ws2/ResultSupplier.java
    • -3
    • +101
    /src/jalview/ws2/WebServiceDiscoverer.java
    • -0
    • +11
    /src/jalview/ws2/WebServiceInfoUpdater.java
    • -6
    • +42
    /src/jalview/ws2/WebServiceWorkerI.java
    • -2
    • +8
    /src/jalview/ws2/gui/ProgressBarUpdater.java
    • -5
    • +84
    /src/jalview/ws2/operations/Operation.java
JAL-3878 Remove redundand edit params dialog method from the AnnotationOperation.

JAL-3878 Separate gui elements from operations.

Separation went well for alignment operation but not so much

for the annotations. GUI progress bar needs to be moved outside

the operation and be controlled by the worker listener.

Addition of the results to the frame needs to be moved out from

the #done method, but it's strongly wired to the align frame

code and cannot be nicely packed into AnnotationResult object.

    • -5
    • +7
    /src/jalview/ws2/WebServiceDiscoverer.java
    • -1
    • +33
    /src/jalview/ws2/WebServiceInfoUpdater.java
    • -2
    • +6
    /src/jalview/ws2/WebServiceWorkerI.java
    • -0
    • +16
    /src/jalview/ws2/WebServiceWorkerListener.java
    • -0
    • +73
    /src/jalview/ws2/WebServiceWorkerListenersList.java
    • -0
    • +377
    /src/jalview/ws2/gui/AlignmentMenuBuilder.java
    • -0
    • +190
    /src/jalview/ws2/gui/AnnotationMenuBuilder.java
    • -0
    • +8
    /src/jalview/ws2/operations/Operation.java
    • -22
    • +2
    /src/jalview/ws2/slivka/SlivkaWebService.java
JAL-3878 Make interactive service arguments persistent between starts.

JAL-3878 Create proper menu for interactive services.

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

    • -22
    • +33
    /src/jalview/api/AlignCalcManagerI2.java
JAL-3878 Create WebServiceMenuBuilder which will replace PreferredServiceRegistry

    • -0
    • +201
    /src/jalview/gui/WebServicesMenuBuilder.java
JAL-3878 Annotation comments and questions

JAL-3878 Add annotation operations to slivka discoverer.

JAL-3878 Fix sequences not being gathered when submitting without gaps.

JAL-3878 Rename annotation provider method to getAnnotations

    • -1
    • +1
    /src/jalview/ws2/slivka/SlivkaWebService.java
JAL-3878 Set job status to cancelled on job cancellation.

Despite job cancellation not being implemented in slivka client,

the job status should be updated to cancelled for the event to

be emitted to the ui updater.

    • -0
    • +1
    /src/jalview/ws2/slivka/SlivkaWebService.java
JAL-3878 Start interactive job by registering them with calcManager

JAL-3878 Fix progress updater bar to account for cancelled state.

    • -5
    • +2
    /src/jalview/ws2/gui/ProgressBarUpdater.java
JAL-3878 Refactoring SeqAnnotationServiceCalcWorker.

    • -0
    • +47
    /src/jalview/ws2/gui/ProgressBarUpdater.java
    • -0
    • +569
    /src/jalview/ws2/operations/AnnotationServiceWorker.java
    • -0
    • +6
    /src/jalview/ws2/operations/Operation.java
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
JAL-3878 Rename web service worker to more generic pollable task.

    • -0
    • +12
    /src/jalview/ws2/PollableTaskI.java
    • -0
    • +14
    /src/jalview/ws2/PollableTaskListenerI.java
    • -0
    • +126
    /src/jalview/ws2/PollingTaskExecutor.java
    • -133
    • +0
    /src/jalview/ws2/WebServiceExecutor.java
    • -7
    • +3
    /src/jalview/ws2/WebServiceWorkerI.java
Update annotation operation WIP

JAL-3878 Add dataset and viewport arguments to ResultSupplier.

    • -4
    • +22
    /src/jalview/ws2/slivka/SlivkaWebService.java