Feat: Add select entries CAYW feature and command endpoint#13554
Conversation
…ource for executing commands through http
# Conflicts: # jabsrv/src/main/java/module-info.java # jabsrv/src/main/java/org/jabref/http/server/LibraryResource.java
… make instanceof possible
| public ObservableList<BibDatabaseContext> getOpenDatabases() { | ||
| return FXCollections.emptyObservableList(); | ||
| } |
There was a problem hiding this comment.
Follow-up: the should be a set - and org.jabref.http.server.services.ServerUtils#getBibDatabaseContext rewritten accordingly.
Here, I am a bit undecided whether a thow should be used, but maybe OK :)
| } | ||
|
|
||
| @Override | ||
| public List<String> collectAllDatabasePaths() { |
There was a problem hiding this comment.
I did put it there because I remembered there was a List of Paths for the Library Resources, I thought later on we could maybe use it to integrate it to use in filesToServe and just use this instead of filestoserve or context.
For example maybe here https://github.com/palukku/jabref/blob/561acce7864fba4023645d1d14f1ae9ebdf7bc06/jabsrv/src/main/java/org/jabref/http/server/Server.java#L76
| public Optional<BibEntryTableViewModel> getViewModelByCitationKey(String citationKey) { | ||
| return entriesViewModel.stream() | ||
| .filter(viewModel -> citationKey.equals(viewModel.getEntry().getCitationKey().orElse(""))) | ||
| .findFirst(); | ||
| } |
There was a problem hiding this comment.
The method accepts a String parameter without null check, which could lead to NullPointerException. According to special instruction 19, null should never be passed to a method.
|
@trag-bot didn't find any issues in the code! ✅✨ |
* add GuiHolder * remove disable wadl * refactor guibridge * replace ListChangeListener with WeakListChangeListener for garbage collection * replace ListChangeListener with WeakListChangeListener for garbage collection * refactor * add active database to guibridge * refactor selection of Entries through GuiBridge and added Command Resource for executing commands through http * update SelectEntriesCommand * add sources to jbang * fix tests * fix tests * rework StateManager * fix ServerTest * rename CliStateManager and remove extends from the GuiStateManager to make instanceof possible * remove sout * add empty returns to JabRefSrvStateManager * add CommandSelectionTab Interface * add sources to jbang * remove old comments * refine * changes requested by koppor * removed or else * change to use identity * change indent

Closes palukku#1 and Closes palukku#9
Added the "select=true" parameter to cayw and implemented an commands endpoint which can be used to select entries of a specific library
Steps to test
You can use the commands.http to test the selection in the chocolate.bib file.
Mandatory checks
CHANGELOG.mddescribed in a way that is understandable for the average user (if change is visible to the user)