forked from JabRef/jabref
-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WIP: Improve reversibility rebased 03 #496
Draft
antalk2
wants to merge
1,077
commits into
JabRef:main
Choose a base branch
from
antalk2:improve-reversibility-rebased-03
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+4,768
−1
Draft
Changes from 250 commits
Commits
Show all changes
1077 commits
Select commit
Hold shift + click to select a range
8c8a671
update OOBibStyleTest, act on errors
antalk2 06b85c7
CitedKey fields are mostly private
antalk2 4f358da
drop getNumCitationMarker2 from Lists
antalk2 aad92df
format, comments
antalk2 cce3f3c
move CitationMarkerNumericEntryImpl.fromRaw to OOBibStyleTest.java
antalk2 09c9b22
move CitationMarkerNumericEntryImpl into OOBibStyleTest.java
antalk2 351edd2
CitationGroups.unresolvedKeys() can work without a bibliography
antalk2 99c1fe8
comment on Consistency
antalk2 1c93f08
Support direct lookup of citations, but use old version
antalk2 a6b752a
comments
antalk2 241039c
afterCreateCitationGroup resets bibliography
antalk2 014fb0f
drop some unused methods
antalk2 0364418
OOFrontend.getMarkRange accepts CitationGroup
antalk2 015e63b
OOFrontend.getFillCursorForCitationGroup accepts CitationGroup
antalk2 5047767
OOFrontend.createCitationGroup returns CitationGroup
antalk2 080c9fe
OOFrontend.cleanFillCursorForCitationGroup accepts CitationGroup
antalk2 bc67c96
use getCitationGroupsInGlobalOrder()
antalk2 dfc03a0
getCitationGroupIDsSortedWithinPartitions returns List<CitationGroup>
antalk2 d5a9e67
rename methods according their result types
antalk2 30ffb53
check attempt to cite in protected parts
antalk2 db53c86
reorder OOError, drop fromJabRefException
antalk2 bfc1be4
getBibliographyRange(doc) again beore removing initial para
antalk2 0ee4d5b
comments
antalk2 c2d40ca
Merge remote-tracking branch 'upstream/main' into improve-reversibili…
antalk2 91d0dc8
comments
antalk2 ab9523f
CitedKey.where can be a List
antalk2 fdd00f4
comments
antalk2 6785712
add PageInfo.java
antalk2 9fe181c
use OOListUtil.map
antalk2 23a1fcb
requireNonNull
antalk2 0055832
comments
antalk2 fa1d1b6
bring public methods forward
antalk2 737828d
rename: InTextCitationType -> CitationType
antalk2 8c73d5a
rename: createNormalizedCitationMarkersForNormalStyle -> createNormal…
antalk2 d66bf79
rename: OOBibStyle.getCitationMarker2 -> createCitationMarker
antalk2 9407ec0
format
antalk2 24ee74e
srip unused methods: zipWith, zip3
antalk2 77ac5a5
Tuple3 is only used in OOBibStyleTest.java
antalk2 b9836a7
comment
antalk2 9d46033
rename: CitationGroupID.asString -> citationGroupIdAsString
antalk2 e111d82
rename: CitationGroupID -> CitationGroupId
antalk2 539e4b8
comment
antalk2 8c95a83
use this instead of cgs
antalk2 7d2f050
move model/openoffice/Pair.java to model/oostyle/OOPair.java
antalk2 c6865dd
prefix Result and VoidResult -> OOResult, OOVoidResult
antalk2 8edb556
drop unused: flatListOfValues
antalk2 ab5b6fe
RangeKeyedMapList.partitions is private
antalk2 afbc9bf
comments
antalk2 0600163
comments
antalk2 155f75e
RangeSortEntry fields are private
antalk2 cae3ac0
bring public methods to the front
antalk2 f979fdf
add OOListUtil.flatMap
antalk2 fc0faa6
use OOListUtil.flatMap and map
antalk2 ed3f5c5
rename: ps -> propertySet, xPropertyContainer -> container, psi -> pr…
antalk2 8da865e
rename: psi -> propertySetInfo
antalk2 754e8a4
use longer names
antalk2 2eb3766
drop local variable 'l'
antalk2 b07c757
format
antalk2 118067b
use longer names
antalk2 638c0ff
use longer names
antalk2 46d653b
rename: kv -> pair
antalk2 f80447c
drop OOListUtil.flatMap
antalk2 42463e8
use OOListUtil.map
antalk2 8c971a2
move model.oostyle to model.openoffice.style
antalk2 77eb551
drop unused insertTextAtCurrentLocation
antalk2 a504eb9
move insertParagraphBreak where it is used
antalk2 46e6c06
move OOListUtil to model/openoffice/util
antalk2 b056fc3
move OOPair to model/openoffice/util
antalk2 982ebf7
move comment
antalk2 8a909b0
move OOResult, OOVoidResult to util
antalk2 5f060e5
add model/openoffice/rangesort
antalk2 3d47c16
model/openoffice/rangeoverlap model/openoffice/uno
antalk2 0b226e4
model/openoffice/backend
antalk2 4cd88ae
OOBibStyleTest.java : Tuple23 class is static
antalk2 a277835
logic/openoffice/style
antalk2 cffdf3c
logic/openoffice/uno
antalk2 f85b2f7
logic/openoffice/backend
antalk2 50f1438
rename OOUtil -> backend/GetContext
antalk2 dba71e3
adjust test and test/resources
antalk2 abb0b0e
logic/openoffice/action
antalk2 410e005
logic/openoffice/frontend
antalk2 3d827b4
move UpdateCitationMarkers and UpdateBibliography to frontend
antalk2 66c4076
OOBibBase2, ootext
antalk2 2a02b6c
model/frontend
antalk2 030fd4e
move all of uno to model
antalk2 57084d0
move all of ootext to model
antalk2 46d2882
FunctionalTextViewCursor.java now does not depend on JabRef
antalk2 9e6e083
move rangesort stuff to model
antalk2 a29a8b0
rename OOBibStyleTest OOBibStyleTest2
antalk2 1cf5c9a
restore OOBibStyleTest
antalk2 85b6c1d
uncomment old stuff
antalk2 0513919
OOBibStyleTest.java only has additions now
antalk2 5a3e3e5
correction: getCitationMarker2 is static
antalk2 2b8dea3
ootext comments
antalk2 6a6e258
review rangesort
antalk2 9957449
insert (now commented out) "-Xlint:unchecked"
antalk2 5f0dd88
-Xlint:unchecked
antalk2 8744443
comment type back from oobranch
antalk2 4f4ba21
do not call checkRangeOverlaps twice (too slow)
antalk2 7769b36
format
antalk2 a91e5e5
lock screen refresh in EditInsert
antalk2 9c32217
Speed up cursor vs protected-range checking
antalk2 e8a4b64
add TimeLap.java
antalk2 9c4a99f
visualSort throws on ControllersLocked
antalk2 f4dd60e
rename Tuple3 -> OOTuple3
antalk2 fa0061b
RangeSort.java
antalk2 1d59771
checkstyle
antalk2 fbfbc70
use RangeSort.partitionAndSortRanges, drop RangeKeyedMapList
antalk2 e2b2fb9
timelap format
antalk2 c4c4025
use Collections.sort
antalk2 c8926f8
handle padded integers in OOBibStyle parser
antalk2 becb2f2
EditMerge was eating character after last merged
antalk2 9d248be
try to speed up applyNewCitationMarkers
antalk2 2d04713
remove TimeLap calls
antalk2 05dd8e8
delNamesArray size correction
antalk2 57d4369
cleanup OOBibStyle
antalk2 122d513
adjust OOBibStyleTest.java
antalk2 f31f11a
Revert "adjust OOBibStyleTest.java"
antalk2 7ff80d0
Revert "cleanup OOBibStyle"
antalk2 63338b1
add Makefile
antalk2 b727d12
JabRef 5.3 already exists, rename 'future version' to JabRef60
antalk2 5bc534b
cleanup for checkstyle on tests
antalk2 be723d6
describe OOTuple3
antalk2 1dc82bb
apply requested changes to OOResult
antalk2 8766098
rename JabRef53 -> JabRef60 continued
antalk2 4a41c11
use LOGGER.debug instead of debugThisFun
antalk2 cc8e606
rename s to ootext
antalk2 bcda697
use LOGGER.debug. debugThisFun still needed
antalk2 9a116f0
links to openoffice/README.md
antalk2 326d226
prefer map(Class::method)
antalk2 ce64bdf
renamed OOText.toString -> OOText.asString
antalk2 af846a3
docs/openoffice/
antalk2 cebd8ab
prefer filter(Class::method)
antalk2 26f2126
add .PHONY targets
antalk2 5558455
overview.md
antalk2 1c9df55
add .dir-locals.el
antalk2 1aad247
use less linebreaks
antalk2 cde024d
com.sun.star.uno.Exception
antalk2 8999f6e
drop group comments
antalk2 463ffdf
renamed asString -> toString
antalk2 14f406a
merge with H
antalk2 efa4a0d
merge bach to H
antalk2 10d2fee
Makefile
antalk2 0582d56
build.gradle
antalk2 f63d8cf
Short(short) is deprecated
antalk2 4e8f1ee
cleanup tempfiles
antalk2 0a25497
Exception -> com.sun.star.uno.Exception
antalk2 8a3a446
Exception -> com.sun.star.uno.Exception
antalk2 6914b63
rename optUnoQI -> cast, drop unoQI
antalk2 e28a22c
no need to import from java.lang
antalk2 79b165b
do not throw RuntimeException, review exceptions thrown in model/open…
antalk2 ddac1bf
description in docs
antalk2 fed0952
add figure, more markup
antalk2 e6afe6f
more markup
antalk2 d664f1e
Merge remote-tracking branch 'upstream/main' into improve-reversibili…
antalk2 e97c9bf
drop duplicate 'add' in comment
antalk2 0fd7eb8
use UnoTextRange.compareXXXUnsafe
antalk2 92f4014
format (use longer lines), comments
antalk2 50dc9f2
reviewed RangeHolder.getRange() use
antalk2 5930444
adjust dir-locals (it should set fill-column)
antalk2 f96b1f9
add comment on RangeSet.add costs
antalk2 aa05917
add alternative implementation to footnoteMarkRanges
antalk2 34147ff
use longer lines in OOFrontend.java
antalk2 355f111
use longer lines in OOTextIntoOO.java
antalk2 505dfce
x
antalk2 2a019b5
undo changes to src/main/java/org/jabref/gui/openoffice/OOBibBase.java
antalk2 e74a5c7
do not use RangeSet
antalk2 f52e68d
deleted src/main/java/org/jabref/model/openoffice/rangesort/RangeS…
antalk2 51c3d1e
try to make markdown-lint happy (happier)
antalk2 5038421
use StringUtil.isNullOrEmpty
antalk2 694fd9e
no natural order for ComparableMark, use compareTopToBottomLeftToRigh…
antalk2 69f7be4
add docs/openoffice/ooresult-*.md
antalk2 9712162
copy docs/openoffice from J (for markdown lint changes)
antalk2 fe5a4bc
in response to review
antalk2 f14e5f3
use {@code } to avoid < >
antalk2 16034ed
make HolderComparatorWithinPartition private
antalk2 9e8d5b5
throw explicitly
antalk2 71c332d
use List.sort
antalk2 12c4538
format
antalk2 a6ff50a
avoid raw generics
antalk2 591c31b
add pmd rule to Makefile
antalk2 04883ee
PMD on TimeLap
antalk2 ad8f576
PMD on model/backend
antalk2 0b60594
PMD on model/ootext
antalk2 53dba25
PMD on model/rangesort
antalk2 2354dae
PMD on model/style
antalk2 3057824
PMD on logic/action
antalk2 26ccf7e
PMD on logic/backend
antalk2 9aaf742
PMD on logic/frontend
antalk2 66d3301
PMD on logic/style
antalk2 e4b5ca0
drop unused LOGGER
antalk2 ff92514
pmd rule in Makefile
antalk2 ab275fc
cleanup: redundant throws clause (based on IntelliJ Idea)
antalk2 5fae212
restore UnoTextRange.java
antalk2 835e8f1
Merge remote-tracking branch 'upstream/main' into improve-reversibili…
antalk2 2ea5c5d
replaced single-character names in OOBibStyle.java (in changed part)
antalk2 8e5ae38
some longer names in OOBibStyleGetCitationMarker.java
antalk2 d57caa6
drop normalizePageInfos, use 'preferred' and 'fallback' in getAuthorL…
antalk2 bed4893
checkstyle
antalk2 73a0a0e
use putIfAbsent
antalk2 5ecbb9d
use "{}" with LOGGER
antalk2 7c7e8ab
use Objects.hash and Objects.equals in CitationLookupResult
antalk2 77fbf1e
simplified CitedKey.getBibEntry
antalk2 8a04b8d
more use of "{}" in LOGGER
antalk2 9efc942
more use of "{}" in LOGGER
antalk2 18ee999
more use of "{}" in LOGGER
antalk2 4015e8d
Citation.lookup: use streams
antalk2 8396620
Citation.lookup: Optional::get before findFirst
antalk2 163394c
removed catch RuntimeException around UnoCursor.getViewCursor
antalk2 6297879
drop unused message
antalk2 89b0968
Merge remote-tracking branch 'upstream/main' into improve-reversibili…
antalk2 8e4b2e2
putIfAbsent returns null for new entry
antalk2 c5613e6
What is 52 in Backend52
antalk2 e7675e2
using orElseThrow
antalk2 ddb3c78
using StringBuilder
antalk2 364dac5
refMarkName renamed to markName
antalk2 3c6ef98
import StringBuilder is not needed
antalk2 4ca55aa
orElseThrow correction (now without message)
antalk2 7ace25f
renamed cgid to groupId
antalk2 1a0a991
orElseThrow correction
antalk2 cd67df5
renamed cg to group
antalk2 3762c9a
drop message not understandable by end user
antalk2 b284c3e
reorganized reference mark name generation
antalk2 632d9df
renamed nCitations to numberOfCitations and totalCitations
antalk2 9af060e
format
antalk2 b17f0e2
insert dummy case JabRef60: branch
antalk2 0210909
indent case-label in model/style
antalk2 ef9645a
indent case-label in gui
antalk2 4a35342
indent case-label in logic/backend
antalk2 b4b1ec0
indent case-label in logic/frontend
antalk2 4a085b6
indent case-label in model/ootext
antalk2 88f8e0b
rname cgPageInfos tro pageInfos
antalk2 17b314b
renamed cgPageInfo to singlePageInfo
antalk2 b3c53f4
replace Collectors.toSet() with new HashSet<>()
antalk2 d86eb42
use method reference
antalk2 0bd3587
drop two comments
antalk2 7821283
use String.join
antalk2 dd4fe78
remove nr/nrm prefixes from NamedRange and NamedRangeManager methods
antalk2 cb13256
align dots
antalk2 76b21b9
add config/emacs/lsp-java
antalk2 eed6be1
make PMD happier with longer names
antalk2 f2b86a5
fontend -> frontend
antalk2 ae9abcc
ignore some PMD output
antalk2 3de1a6e
rename ofr to frontend
antalk2 9a8c4a3
drop config/emacs/lsp-java/
antalk2 72cc38d
Merge remote-tracking branch 'upstream/main' into improve-reversibili…
antalk2 771e8d3
follow some PMD suggestions
antalk2 dd15159
Merge remote-tracking branch 'upstream/main' into improve-reversibili…
antalk2 708590a
Merge remote-tracking branch 'upstream/main' into improve-reversibili…
antalk2 2b91d2b
apply suggested changes
antalk2 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
16 changes: 0 additions & 16 deletions
16
src/main/java/org/jabref/gui/openoffice/BibEntryNotFoundException.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are these needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you mean the line breaks, or the exceptions?
The line breaks technically no.
Some of these exceptions mentioned here I caught below,
(UnknownPropertyException, WrappedTargetException)
but not all.
The contructor itself is called from
ManageCitationsDialogView.initialize()
There is no visible call to initialize() in the class body, presumably accessed through the
@FXML
magic,I guess it is called as an event handler or action.
I have no definit answer to "where should these exceptions be caught": should we catch them all
here, or pass them all up (to initialize? or above that?), or something in between. We are probably choosing between
calling a dialog box from an event handler and throwing exception from one.
Those I caught were probably caught here, because this is where they reached
the GUI level. I may have seen UnknownPropertyException and caught it here,
I am not sure I have ever seen a WrappedTargetException. Maybe.
Summary: I do not know where should they be caught.
Moved them to the catch below, then dropped NoSuchElementException,
since the compiler now noticed it is not thrown anyway.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Exceptions.
I haven't spent that much time with JavaFX, but pretty much
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd say catch them all here, or latest in the View. If appropriate do some action (although in this case, I am not sure if you can do all that much more than display an error dialog to the user). I'll try to update the documentation when I have time.
I'll comment in the code what I think of each and why but quite frankly, some of them I have no idea what to do with either (
WrappedTargetException
would be one of those).As a general rule can't think of any reason to make a
JabRefException
(or any other) bubble up past the View. I'd say that most of them (all?) should be handled latest in the ViewModel. This would be one of those I'd appreciate a second opinion on @Siedlerchr 😛