-
Notifications
You must be signed in to change notification settings - Fork 0
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
Feature: Support Citation Style Language (CSL) Styles in LibreOffice/OpenOffice #1
base: csl-lo-oo-integration
Are you sure you want to change the base?
Conversation
|
||
import javafx.beans.property.SimpleStringProperty; | ||
import javafx.beans.property.StringProperty; | ||
import org.jabref.logic.citationstyle.CitationStyle; |
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.
🚫 [reviewdog] <com.puppycrawl.tools.checkstyle.checks.imports.ImportOrderCheck> reported by reviewdog 🐶
'org.jabref.logic.citationstyle.CitationStyle' should be separated from previous imports.
import javafx.beans.property.SimpleStringProperty; | ||
import javafx.beans.property.StringProperty; | ||
import org.jabref.logic.citationstyle.CitationStyle; | ||
import org.jabref.logic.openoffice.style.OOBibStyle; |
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.
🚫 [reviewdog] <com.puppycrawl.tools.checkstyle.checks.imports.UnusedImportsCheck> reported by reviewdog 🐶
Unused import - org.jabref.logic.openoffice.style.OOBibStyle.
@@ -31,6 +33,8 @@ | |||
import com.airhacks.afterburner.views.ViewLoader; | |||
import com.tobiasdiez.easybind.EasyBind; | |||
|
|||
import java.util.stream.Collectors; |
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.
🚫 [reviewdog] <com.puppycrawl.tools.checkstyle.checks.imports.ImportOrderCheck> reported by reviewdog 🐶
Wrong order for 'java.util.stream.Collectors' import.
要支持CSL格式目前还有很多地方需要大改,首先是StyleSelectDialogView jabref/src/main/java/org/jabref/gui/openoffice/StyleSelectDialogViewModel.java Lines 133 to 136 in 9d40be2
可以看到,他将JStyle的文件路径传递给了preferencesService,作为配置保存 然后在OpenOfficePanel中点击Cite后,会通过如下代码发送插入指令到OO/LO jabref/src/main/java/org/jabref/gui/openoffice/OpenOfficePanel.java Lines 484 to 490 in 9d40be2
而此处的style是通过loader的getUsedStyle获取的 jabref/src/main/java/org/jabref/gui/openoffice/OpenOfficePanel.java Lines 149 to 154 in 9d40be2
getUsedStyle又是通过preferencesService获取到Style路径,抽取出loader中对应的OOBibStyle实例 jabref/src/main/java/org/jabref/logic/openoffice/style/StyleLoader.java Lines 127 to 133 in 9d40be2
然后这个OOBibStyle并不是一个接口,而是一个十分复杂的类,里面的所有操作、属性都与JStyle硬相关,甚至连构造函数就是通过传入JStyle Path来实例化,否则只能逐个设置所有属性(这些属性估计CSL也没有) jabref/src/main/java/org/jabref/logic/openoffice/style/OOBibStyle.java Lines 151 to 158 in 9d40be2
然后这个类和整个OpenOffice Panel的耦合也比较深 方法也巨多(不知道那些被外部使用了就是了,这就是不用接口的坏处/(ㄒoㄒ)/~~) 综上,感觉很难完工( |
Implement JabRef#8893.
Support Citation Style Language (CSL) Styles in the LO/OO integration.
Everything is now still working in progress.
CHANGELOG.md
described in a way that is understandable for the average user (if applicable)