Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
ee50022
change CAYWEntry.java from class to record
palukku Jul 4, 2025
a20d7b2
Merge branch 'JabRef:main' into cayw
palukku Jul 5, 2025
0dcaab6
refactor
palukku Jul 5, 2025
1863499
replace id hash with sharedID
palukku Jul 5, 2025
8dd9c7c
Merge branch 'JabRef:main' into cayw
palukku Jul 6, 2025
0eba897
Merge branch 'JabRef:main' into cayw
palukku Jul 7, 2025
26655cd
Refactor PushToApplications and move the logic part to jablib
palukku Jul 8, 2025
2c66a6d
Merge remote-tracking branch 'origin/cayw' into cayw
palukku Jul 8, 2025
96d79bc
Add Prefix GUI to all gui classes
palukku Jul 8, 2025
02677ef
Merge branch 'JabRef:main' into cayw
palukku Jul 8, 2025
63cf18c
Move Cite Command Preferences from ExternalApplicationsPreferences to…
palukku Jul 8, 2025
7acb3c0
Merge remote-tracking branch 'origin/cayw' into cayw
palukku Jul 8, 2025
a13d704
Merge branch 'JabRef:main' into cayw
palukku Jul 8, 2025
bfe016f
fix wrong changes
palukku Jul 8, 2025
eed07db
Merge remote-tracking branch 'origin/cayw' into cayw
palukku Jul 8, 2025
124abf4
change field name
palukku Jul 8, 2025
7432cd5
checkstyle and rewriterun
palukku Jul 8, 2025
e80d7d7
add private constructor
palukku Jul 8, 2025
d1cb260
refactor
palukku Jul 8, 2025
881b650
use orElseGet instead of orElse
palukku Jul 8, 2025
19792bf
Merge branch 'main' into cayw
palukku Jul 9, 2025
2b2ad7b
Reduce Gui classes by extending the interfaces with default methods
palukku Jul 9, 2025
566ba96
Add methods for error notification routing and update citation comman…
koppor Jul 9, 2025
ba8aa2b
delete
palukku Jul 9, 2025
7372e55
Merge branch 'cayw-2' into cayw
palukku Jul 9, 2025
552206c
rename
palukku Jul 9, 2025
43c632f
Streamline signature for pushEntries
koppor Jul 9, 2025
dc5e8db
Merge branch 'JabRef:main' into cayw
palukku Jul 9, 2025
ec2bc1e
introduce Applications Enum and change CLI PushToApplications factory.
palukku Jul 9, 2025
b78f9b8
Add doc
koppor Jul 9, 2025
12d89f0
refactor
palukku Jul 9, 2025
ce96f31
fix tests
palukku Jul 9, 2025
b25a985
fix tests2
palukku Jul 9, 2025
282325d
Merge branch 'main' into cayw
palukku Jul 9, 2025
13de083
Merge branch 'main' into cayw
palukku Jul 10, 2025
6be78f2
add ability to cayw to push to other applications
palukku Jul 10, 2025
e1a9c52
rename wrong variables
palukku Jul 10, 2025
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
2 changes: 1 addition & 1 deletion jabgui/src/main/java/org/jabref/gui/desktop/os/Linux.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@
import org.jabref.gui.externalfiletype.ExternalFileType;
import org.jabref.gui.externalfiletype.ExternalFileTypes;
import org.jabref.gui.frame.ExternalApplicationsPreferences;
import org.jabref.gui.util.StreamGobbler;
import org.jabref.logic.l10n.Localization;
import org.jabref.logic.util.Directories;
import org.jabref.logic.util.HeadlessExecutorService;
import org.jabref.logic.util.StreamGobbler;

import org.slf4j.LoggerFactory;

Expand Down
4 changes: 2 additions & 2 deletions jabgui/src/main/java/org/jabref/gui/edit/CopyMoreAction.java
Original file line number Diff line number Diff line change
Expand Up @@ -169,13 +169,13 @@ private void doCopyKey(Function<List<String>, String> mapKeyList) {

private void copyCiteKey() {
doCopyKey(keys -> {
CitationCommandString citeCommand = preferences.getExternalApplicationsPreferences().getCiteCommand();
CitationCommandString citeCommand = preferences.getPushToApplicationPreferences().getCiteCommand();
return citeCommand.prefix() + String.join(citeCommand.delimiter(), keys) + citeCommand.suffix();
});
}

private void copyKey() {
doCopyKey(keys -> String.join(preferences.getExternalApplicationsPreferences().getCiteCommand().delimiter(), keys));
doCopyKey(keys -> String.join(preferences.getPushToApplicationPreferences().getCiteCommand().delimiter(), keys));
}

private void copyKeyAndTitle() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@
import org.jabref.gui.DialogService;
import org.jabref.gui.LibraryTab;
import org.jabref.gui.preferences.GuiPreferences;
import org.jabref.gui.push.PushToApplication;
import org.jabref.gui.push.PushToApplications;
import org.jabref.gui.push.PushToTeXstudio;
import org.jabref.gui.push.GuiPushToApplication;
import org.jabref.gui.push.GuiPushToApplications;
import org.jabref.gui.push.GuiPushToTeXstudio;
import org.jabref.gui.texparser.CitationsDisplay;
import org.jabref.gui.util.DirectoryDialogConfiguration;
import org.jabref.gui.util.DirectoryMonitor;
Expand Down Expand Up @@ -98,11 +98,11 @@ public void handleMouseClick(MouseEvent event, CitationsDisplay citationsDisplay
if (event.getButton() == MouseButton.PRIMARY && event.getClickCount() == 2 && selectedItem != null) {
String applicationName = preferences.getPushToApplicationPreferences()
.getActiveApplicationName();
PushToApplication application = PushToApplications.getApplicationByName(
GuiPushToApplication application = GuiPushToApplications.getGUIApplicationByName(
applicationName,
dialogService,
preferences)
.orElse(new PushToTeXstudio(dialogService, preferences));
preferences.getPushToApplicationPreferences())
.orElseGet(() -> new GuiPushToTeXstudio(dialogService, preferences.getPushToApplicationPreferences()));
preferences.getPushToApplicationPreferences().setActiveApplicationName(application.getDisplayName());
application.jumpToLine(selectedItem.path(), selectedItem.line(), selectedItem.colStart());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,18 @@
import java.util.TreeSet;

import javafx.beans.property.BooleanProperty;
import javafx.beans.property.ObjectProperty;
import javafx.beans.property.SimpleBooleanProperty;
import javafx.beans.property.SimpleObjectProperty;
import javafx.beans.property.SimpleStringProperty;
import javafx.beans.property.StringProperty;
import javafx.collections.FXCollections;
import javafx.collections.ObservableSet;

import org.jabref.gui.externalfiletype.ExternalFileType;
import org.jabref.logic.push.CitationCommandString;

public class ExternalApplicationsPreferences {

private final StringProperty eMailSubject;
private final BooleanProperty shouldAutoOpenEmailAttachmentsFolder;
private final ObjectProperty<CitationCommandString> citeCommand;

private final ObjectProperty<CitationCommandString> defaultCiteCommand;

private final BooleanProperty useCustomTerminal;
private final StringProperty customTerminalCommand;
Expand All @@ -33,8 +27,6 @@ public class ExternalApplicationsPreferences {

public ExternalApplicationsPreferences(String eMailSubject,
boolean shouldAutoOpenEmailAttachmentsFolder,
CitationCommandString citeCommand,
CitationCommandString defaultCiteCommand,
Set<ExternalFileType> externalFileTypes,
boolean useCustomTerminal,
String customTerminalCommand,
Expand All @@ -44,8 +36,6 @@ public ExternalApplicationsPreferences(String eMailSubject,

this.eMailSubject = new SimpleStringProperty(eMailSubject);
this.shouldAutoOpenEmailAttachmentsFolder = new SimpleBooleanProperty(shouldAutoOpenEmailAttachmentsFolder);
this.citeCommand = new SimpleObjectProperty<>(citeCommand);
this.defaultCiteCommand = new SimpleObjectProperty<>(defaultCiteCommand);
this.externalFileTypes.addAll(externalFileTypes);
this.useCustomTerminal = new SimpleBooleanProperty(useCustomTerminal);
this.customTerminalCommand = new SimpleStringProperty(customTerminalCommand);
Expand Down Expand Up @@ -78,18 +68,6 @@ public void setAutoOpenEmailAttachmentsFolder(boolean shouldAutoOpenEmailAttachm
this.shouldAutoOpenEmailAttachmentsFolder.set(shouldAutoOpenEmailAttachmentsFolder);
}

public CitationCommandString getCiteCommand() {
return citeCommand.get();
}

public ObjectProperty<CitationCommandString> citeCommandProperty() {
return citeCommand;
}

public void setCiteCommand(CitationCommandString citeCommand) {
this.citeCommand.set(citeCommand);
}

public boolean useCustomTerminal() {
return useCustomTerminal.get();
}
Expand Down Expand Up @@ -150,10 +128,6 @@ public void setKindleEmail(String kindleEmail) {
this.kindleEmail.set(kindleEmail);
}

public CitationCommandString getDefaultCiteCommand() {
return defaultCiteCommand.getValue();
}

public ObservableSet<ExternalFileType> getExternalFileTypes() {
return this.externalFileTypes;
}
Expand Down
6 changes: 3 additions & 3 deletions jabgui/src/main/java/org/jabref/gui/frame/JabRefFrame.java
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
import org.jabref.gui.keyboard.KeyBinding;
import org.jabref.gui.libraryproperties.LibraryPropertiesAction;
import org.jabref.gui.preferences.GuiPreferences;
import org.jabref.gui.push.PushToApplicationCommand;
import org.jabref.gui.push.GuiPushToApplicationCommand;
import org.jabref.gui.search.GlobalSearchBar;
import org.jabref.gui.search.SearchType;
import org.jabref.gui.sidepane.SidePane;
Expand Down Expand Up @@ -104,7 +104,7 @@ private enum PanelMode { MAIN_TABLE, MAIN_TABLE_AND_ENTRY_EDITOR }
private final TaskExecutor taskExecutor;

private final JabRefFrameViewModel viewModel;
private final PushToApplicationCommand pushToApplicationCommand;
private final GuiPushToApplicationCommand pushToApplicationCommand;
private final SplitPane horizontalSplit = new SplitPane();
private final SidePane sidePane;
private final SplitPane verticalSplit = new SplitPane();
Expand Down Expand Up @@ -188,7 +188,7 @@ public JabRefFrame(Stage mainStage,
clipBoardManager,
undoManager);

this.pushToApplicationCommand = new PushToApplicationCommand(
this.pushToApplicationCommand = new GuiPushToApplicationCommand(
stateManager,
dialogService,
this.preferences,
Expand Down
6 changes: 3 additions & 3 deletions jabgui/src/main/java/org/jabref/gui/frame/MainMenu.java
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
import org.jabref.gui.preferences.ShowPreferencesAction;
import org.jabref.gui.preview.CopyCitationAction;
import org.jabref.gui.preview.PreviewControls;
import org.jabref.gui.push.PushToApplicationCommand;
import org.jabref.gui.push.GuiPushToApplicationCommand;
import org.jabref.gui.search.RebuildFulltextSearchIndexAction;
import org.jabref.gui.shared.ConnectToSharedDatabaseCommand;
import org.jabref.gui.shared.PullChangesFromSharedAction;
Expand Down Expand Up @@ -98,7 +98,7 @@ public class MainMenu extends MenuBar {
private final JabRefFrame frame;
private final FileHistoryMenu fileHistoryMenu;
private final SidePane sidePane;
private final PushToApplicationCommand pushToApplicationCommand;
private final GuiPushToApplicationCommand pushToApplicationCommand;
private final GuiPreferences preferences;
private final StateManager stateManager;
private final FileUpdateMonitor fileUpdateMonitor;
Expand All @@ -115,7 +115,7 @@ public class MainMenu extends MenuBar {
public MainMenu(JabRefFrame frame,
FileHistoryMenu fileHistoryMenu,
SidePane sidePane,
PushToApplicationCommand pushToApplicationCommand,
GuiPushToApplicationCommand pushToApplicationCommand,
GuiPreferences preferences,
StateManager stateManager,
FileUpdateMonitor fileUpdateMonitor,
Expand Down
6 changes: 3 additions & 3 deletions jabgui/src/main/java/org/jabref/gui/frame/MainToolBar.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
import org.jabref.gui.importer.NewEntryAction;
import org.jabref.gui.importer.actions.OpenDatabaseAction;
import org.jabref.gui.preferences.GuiPreferences;
import org.jabref.gui.push.PushToApplicationCommand;
import org.jabref.gui.push.GuiPushToApplicationCommand;
import org.jabref.gui.search.GlobalSearchBar;
import org.jabref.gui.theme.ThemeManager;
import org.jabref.gui.undo.CountingUndoManager;
Expand All @@ -47,7 +47,7 @@

public class MainToolBar extends ToolBar {
private final LibraryTabContainer frame;
private final PushToApplicationCommand pushToApplicationCommand;
private final GuiPushToApplicationCommand pushToApplicationCommand;
private final GlobalSearchBar globalSearchBar;
private final DialogService dialogService;
private final StateManager stateManager;
Expand All @@ -64,7 +64,7 @@ public class MainToolBar extends ToolBar {
private Subscription taskProgressSubscription;

public MainToolBar(LibraryTabContainer tabContainer,
PushToApplicationCommand pushToApplicationCommand,
GuiPushToApplicationCommand pushToApplicationCommand,
GlobalSearchBar globalSearchBar,
DialogService dialogService,
StateManager stateManager,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
import org.jabref.gui.mergeentries.MergeDialogPreferences;
import org.jabref.gui.newentry.NewEntryPreferences;
import org.jabref.gui.preview.PreviewPreferences;
import org.jabref.gui.push.PushToApplicationPreferences;
import org.jabref.gui.specialfields.SpecialFieldsPreferences;
import org.jabref.logic.preferences.CliPreferences;
import org.jabref.logic.push.PushToApplicationPreferences;

public interface GuiPreferences extends CliPreferences {
CopyToPreferences getCopyToPreferences();
Expand Down
Loading
Loading