Skip to content
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

Technical Documentation and Prototype #2

Open
wants to merge 36 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 17 commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
df90a25
Refactor ContainBasedSearchRuleTest
koppor Nov 1, 2021
418bb66
Introduce FullTextSearchRule as abstraction of ContainBasedSearchRule…
koppor Nov 1, 2021
6984c5f
Add class comment
koppor Nov 1, 2021
a297ee6
Add missing "s" to class name
koppor Nov 1, 2021
ba4dea1
RegexBasedSearchRule: Make validateSearchStrings consistent to applyRule
koppor Nov 1, 2021
e769b50
Add support for Lucene-based search
koppor Nov 2, 2021
c190af0
Merge branch 'main' into refine-search
koppor Nov 3, 2021
0224a9e
Add support for grouping
koppor Nov 3, 2021
c57ea64
Add RecentSearch and DropDownMenu class
julianbopp Nov 13, 2021
ee64ffd
Merge branch 'refine-search' into DropDownMenu_prototype
julianbopp Nov 13, 2021
41b4f38
Add DropDownMenu to GlobalSearchBar
julianbopp Nov 13, 2021
89f9986
Fix dropdown menu appearance and add test method to author button
josphstar Nov 13, 2021
cd71654
Improve buttons and fix dropdown menu appearance
josphstar Nov 13, 2021
c6f8066
add buttonEventHandler for DropDownMenu
dmadoery Nov 14, 2021
98c958b
Merge pull request #1 from josphstar/DropDownProto_Mark
josphstar Nov 14, 2021
2383a84
Merge branch 'DropDownMenu_prototype' into designdoc
josphstar Nov 14, 2021
2c9c5a6
Add technical documentation
josphstar Nov 14, 2021
16b31f4
Update image paths for technical doc
josphstar Nov 14, 2021
a2c2505
Update technical-documentation.md
josphstar Nov 14, 2021
98edfaf
Add color coding and legend to class diagram
josphstar Nov 16, 2021
aff9a10
Queries now get added to RecentSearch when Searchbar loses focus
julianbopp Nov 17, 2021
86f2474
Fix Indentation
julianbopp Nov 17, 2021
d6d51fe
Remove comment
julianbopp Nov 17, 2021
ea67be0
Add pflichtenheft.md in doc folder
albertjasari Nov 17, 2021
f029581
Fix null pointer exception when clicking on empty space in recent sea…
josphstar Nov 20, 2021
71522e6
Fix wrong carret position when using recent search list
josphstar Nov 20, 2021
59ff03c
Add carret position method
josphstar Nov 20, 2021
859ac83
Fix checkstyle and clean up
josphstar Nov 20, 2021
46b5413
Add second draft SearchFieldSynchronizer
josphstar Nov 20, 2021
c1f2a9d
Fix spacing issue in search bar
josphstar Nov 20, 2021
64eeefb
Fix but where quote marks caused an exception
josphstar Nov 20, 2021
60f1a54
Search uses OR operator as default now
josphstar Nov 20, 2021
2f477bc
Correct func-spec/tec documentation and remove early draft
josphstar Nov 21, 2021
a39a32e
Add some draft comments to key functions for better understanding.
josphstar Nov 21, 2021
956afb7
Merge branch 'DropDownProto_Mark' into designdoc
josphstar Nov 21, 2021
9658d52
Update link to functional-specification-doc.md
josphstar Nov 21, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ Note that this project **does not** adhere to [Semantic Versioning](http://semve

- We added confirmation dialog when user wants to close a library where any empty entires are detected. [#8096](https://github.com/JabRef/jabref/issues/8096)
- We added import support for CFF files. [#7945](https://github.com/JabRef/jabref/issues/7945)
- We added support to use Lucence search syntax also for the searchin the library or in dynamic groups.
- We added the option to copy the DOI of an entry directly from the context menu copy submenu. [#7826](https://github.com/JabRef/jabref/issues/7826)
- We added a fulltext search feature. [#2838](https://github.com/JabRef/jabref/pull/2838)
- We improved the deduction of bib-entries from imported fulltext pdfs. [#7947](https://github.com/JabRef/jabref/pull/7947)
Expand Down
265 changes: 265 additions & 0 deletions docs/sweng/diagrams.pu
Original file line number Diff line number Diff line change
@@ -0,0 +1,265 @@
' +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
@startuml class-diagram
mainframe **Class Diagram: "Better Search" Implementation **
' package LEGEND {
' class Existing as " Existing Classes " #White
' hide Existing circle
' hide Existing methods
' hide Existing members

' class New as " New Classes "
' hide New circle
' hide New methods
' hide New members

' ' Workaround to prevent PlantUML from positioning the legend blocks randomly.
' Existing -[hidden]- New
' }

' =======================================================
' Grouping
' =======================================================
together {
class DropDownMenu
class SearchFieldSynchronizer
}

' =======================================================
' Relations
' =======================================================
CustomTextField - GlobalSearchbar
SearchItem *- itemType
RecentSearch <- SearchFieldSynchronizer
GlobalSearchbar -- Highlighting
GlobalSearchbar <-- Autocomplete
DropDownMenu <-- RecentSearch

SearchFieldSynchronizer -- LuceneBasedSearchRule
SearchItem "0...*" -> "1 " SearchFieldSynchronizer
JFXChipView -- SearchFieldSynchronizer
DropDownMenu --> SearchFieldSynchronizer
CustomTextField <-- TextInputControl
Autocomplete <-- TextInputControl
TextInputControl <-- SearchFieldSynchronizer
RecentSearch "1 " <-- "0...*" SearchItem

' =======================================================
' Classes
' =======================================================
class GlobalSearchbar #TECHNOLOGY {
searchField: CustomTextField
updateSearchResultsForQuery()
' initSearchModifierButtons()
' initSearchModifierButton()
' focus()
performSearch()
' validRegex()
' informUserAboutInvalidSearchQuery()
updateResults()
' setSearchFieldHintTooltip()
' updateHintVisibility()
' registerEventListener()
' onSuggestionChosen()
}

class Highlighting #TECHNOLOGY {

}

class RecentSearch #PeachPuff {
pastSearchItemList: ArrayList<SearchItem>
ListView<String> authors
ListView<String> titles
show()
hide()
add()
checkSearchItemExists()

}

class DropDownMenu #PeachPuff {
authorBtn: Button
journalBtn: Button
titleBtn: Button
yearBtn: Button
andBtn: Button
orBtn: Button
andMinusBtn: Button
orMinusBtn: Button
isPrevAttribute: boolean
checkAndAddSpace()
isPrevAttribute()
}

class LuceneBasedSearchRule #TECHNOLOGY {
validateSearchStrings()
}

class Autocomplete #TECHNOLOGY {
AutoCompletionTextFieldBinding<T> String
AutoCompletePopup<T> autoCompletionPopup
bindAutoCompletion()
}

class SearchFieldSynchronizer #PeachPuff {
searchItemList: ArrayList<SearchItem>
searchString: String
compare()
updateList()
addSearchItemToList()
removeSearchItemToList()
insertSearchItemToList()
SearchStringBuilder()
validateButton()
}

class SearchItem #PeachPuff {
itemType: enum
item: String
getType()
get()
setType()
set()
}

enum itemType #PeachPuff {
logicalOperator
attribute
bracket
}

class CustomTextField #TECHNOLOGY {
get()
get(int start, int end)
length()
addListener()
}

class TextInputControl #TECHNOLOGY {
getText()
insertText()
deleteText()
replaceText()
positionCaret()
getCarretPosition()
getLength()
}

class JFXChipView #TECHNOLOGY {
chips
StringConverter()
}
@enduml

' +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
' Julian: Recent Search
@startuml recent-search
mainframe **Sequence Diagram: Recent Search **
actor User
User -> GlobalSearchBar: performSearch()
GlobalSearchBar -> RecentSearch: addQueryToRecentSearches
User -> RecentSearch: clickOnRecentSearchEntry
RecentSearch -> GlobalSearchBar: performSearch()
@enduml

' +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
' Mark: User Search Input
@startuml user-search-input
mainframe **Sequence Diagram: User Search Input **
actor User
User -> DropDownMenu: Button Input
box **SearchFieldSynchronizer**
DropDownMenu -> SearchFieldSynchronizer: <font color=green> ActionEvent
entity searchItemList
SearchFieldSynchronizer -> searchItemList: addSearchItemToList()
searchItemList --> SearchFieldSynchronizer: SearchStringBuilder()
end box
box **CustomTextField** #White
entity searchField
SearchFieldSynchronizer -> searchField: replaceText()
end box

User -> searchField: Text Input
searchField --> SearchFieldSynchronizer: <font color=green>EventListener
SearchFieldSynchronizer -> searchItemList: updateList()
searchItemList --> SearchFieldSynchronizer: SearchStringBuilder()
SearchFieldSynchronizer -> searchField: replaceText()
@enduml

' +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
' Albert: Autocomplete
@startuml
mainframe **Sequence Diagram: Autocomplete **
actor User
User -> AutoCompletePopup: bindAutoCompletion()
AutoCompletePopup -> AutoCompletionTextInputBinding: convertSuggestionsToStrings
AutoCompletionTextInputBinding -> GlobalSearchBar: provideSuggestionsInGlobalSearch
GlobalSearchBar -> AutoCompletePopup: bindAutoCompletion()
@enduml

' +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
' Dani: ChipView
@startuml
mainframe Sequence Diagram: ChipView
actor User
User->GlobalSearchBar: performSearch()
GlobalSearchBar->ChipView: addChipViewToSearchField()
User->ChipView: clickOnChipInSearchField
ChipView->GlobalSearchBar:deleteChosenSearchkey()
@enduml

' +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
' Mark: Logical Operators
@startuml logic-operators
mainframe **Activity Diagram: Logic Operators **
start
switch ( Button Press )
case ( )
:Attribute;
if (leftSideExists?) then
if (isLeftAttribute?) then
if (isLeftAttributeWithoutSearchString?) then
#pink:do nothing;
kill
endif
#palegreen:Add OR;
endif
endif
#palegreen:Add attribute;
stop
case ( )
switch ( Logic Operator )
case ( )
:1;
if (leftSideExists?) then
if (isLeftAttribute?) then
if (isLeftAttributeWithSearchString?) then
#palegreen:Add logic operator;
kill
endif
endif
endif
#pink:do nothing;
stop
case ( )
:-1;
if (!MinusOneExists?) then
if (leftSideExists?) then
if (isLeftAttribute?) then
if (isLeftAttributeWithSearchString?) then
#palegreen:Add right bracket;
#palegreen:Add logic operator;
#palegreen:Add left bracket;
:positionCarret to start;
#palegreen:Add left bracket;
:positionCarret to end;
#palegreen:Add right bracket;
:positionCarret to end - 1;
kill
endif
endif
endif
endif
#pink:do nothing;
stop
@enduml
Binary file added docs/sweng/diagrams/autocomplete.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/sweng/diagrams/chip-view.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/sweng/diagrams/class-diagram-withLegend.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/sweng/diagrams/class-diagram.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/sweng/diagrams/logic-operators.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/sweng/diagrams/recent-search.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/sweng/diagrams/user-search-input.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions docs/sweng/legend.pu
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
@startuml legend #White
legend right
|<#TECHNOLOGY> | <#White> Existing class |
|<#PeachPuff> | <#White> New class |
endlegend
@enduml
Loading