Top Description Inners Fields Constructors Methods
org.jabref.gui.push

public abstract Class AbstractPushToApplication

extends Object
implements PushToApplication
Class Inheritance
All Implemented Interfaces
org.jabref.gui.push.PushToApplication
Known Direct Subclasses
org.jabref.gui.push.PushToEmacs, org.jabref.gui.push.PushToLyx, org.jabref.gui.push.PushToSublimeText, org.jabref.gui.push.PushToTexmaker, org.jabref.gui.push.PushToTexShop, org.jabref.gui.push.PushToTeXstudio, org.jabref.gui.push.PushToTeXworks, org.jabref.gui.push.PushToVim, org.jabref.gui.push.PushToWinEdt
Imports
java.io.IOException, java.util.List, .Optional, org.jabref.gui.DialogService, org.jabref.gui.actions.Action, org.jabref.gui.icon.IconTheme, .JabRefIcon, org.jabref.gui.keyboard.KeyBinding, org.jabref.logic.l10n.Localization, org.jabref.logic.util.OS, org.jabref.model.database.BibDatabaseContext, org.jabref.model.entry.BibEntry, org.jabref.model.strings.StringUtil, org.jabref.preferences.PreferencesService, .PushToApplicationPreferences, com.google.common.annotations.VisibleForTesting, org.slf4j.Logger, .LoggerFactory

Abstract class for pushing entries into different editors.

Nested and Inner Type Summary

Modifier and TypeClass and Description
protected class

Field Summary

Modifier and TypeField and Description
protected String
protected boolean
protected boolean
protected final DialogService
private static final Logger
protected boolean
protected final PreferencesService

Constructor Summary

AccessConstructor and Description
public
AbstractPushToApplication(DialogService dialogService, PreferencesService preferencesService)

Method Summary

Modifier and TypeMethod and Description
public Action
public JabRefIcon
getApplicationIcon()

Implements org.jabref.gui.push.PushToApplication.getApplicationIcon.

Gets the icon associated with the application.

protected String
protected String
protected String[]

Returns:

String array with the command to call and its arguments
getCommandLine
(String
String containing the Bibtex keys to be pushed to the application
keyString
)

Constructs the command line arguments for pushing citations to the application.

protected String

Returns:

String with the command name
getCommandName
()

Function to get the command name in case it is different from the application name

public String
public PushToApplicationSettings
public String
getTooltip()

Implements org.jabref.gui.push.PushToApplication.getTooltip.

Gets a tooltip for the push operation.

public void
onOperationCompleted()

Implements org.jabref.gui.push.PushToApplication.onOperationCompleted.

Reporting etc., this method is called on the event dispatch thread after pushEntries() returns.

public void
pushEntries(BibDatabaseContext database, List<BibEntry> entries, String keyString)

Implements org.jabref.gui.push.PushToApplication.pushEntries.

The actual operation.

protected void
pushEntries(BibDatabaseContext database, List<BibEntry> entries, String keyString, ProcessBuilder processBuilder)

public boolean
requiresCitationKeys()

Implements org.jabref.gui.push.PushToApplication.requiresCitationKeys.

Check whether this operation requires citation keys to be set for the entries.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

commandPathback to summary
protected String commandPath
couldNotCallback to summary
protected boolean couldNotCall
couldNotPushback to summary
protected boolean couldNotPush
dialogServiceback to summary
protected final DialogService dialogService
LOGGERback to summary
private static final Logger LOGGER
notDefinedback to summary
protected boolean notDefined
preferencesServiceback to summary
protected final PreferencesService preferencesService

Constructor Detail

AbstractPushToApplicationback to summary
public AbstractPushToApplication(DialogService dialogService, PreferencesService preferencesService)

Method Detail

getActionback to summary
public Action getAction()

Implements org.jabref.gui.push.PushToApplication.getAction.

Annotations
@Override
getApplicationIconback to summary
public JabRefIcon getApplicationIcon()

Implements org.jabref.gui.push.PushToApplication.getApplicationIcon.

Doc from org.jabref.gui.push.PushToApplication.getApplicationIcon.

Gets the icon associated with the application.

Returns:JabRefIcon

The icon for the application.

Annotations
@Override
getCitePrefixback to summary
protected String getCitePrefix()
getCiteSuffixback to summary
protected String getCiteSuffix()
getCommandLineback to summary
protected String[] getCommandLine(String keyString)

Constructs the command line arguments for pushing citations to the application. The method formats the citation key and prefixes/suffixes as per user preferences before invoking the application with the command to insert text.

Parameters
keyString:String

String containing the Bibtex keys to be pushed to the application

Returns:String[]

String array with the command to call and its arguments

Annotations
@SuppressWarnings:unused
getCommandNameback to summary
protected String getCommandName()

Function to get the command name in case it is different from the application name

Returns:String

String with the command name

getDelimiterback to summary
public String getDelimiter()

Implements org.jabref.gui.push.PushToApplication.getDelimiter.

getSettingsback to summary
public PushToApplicationSettings getSettings(PushToApplication application, PushToApplicationPreferences preferences)

Implements org.jabref.gui.push.PushToApplication.getSettings.

Annotations
@Override
getTooltipback to summary
public String getTooltip()

Implements org.jabref.gui.push.PushToApplication.getTooltip.

Doc from org.jabref.gui.push.PushToApplication.getTooltip.

Gets a tooltip for the push operation.

Annotations
@Override
onOperationCompletedback to summary
public void onOperationCompleted()

Implements org.jabref.gui.push.PushToApplication.onOperationCompleted.

Doc from org.jabref.gui.push.PushToApplication.onOperationCompleted.

Reporting etc., this method is called on the event dispatch thread after pushEntries() returns.

Annotations
@Override
pushEntriesback to summary
public void pushEntries(BibDatabaseContext database, List<BibEntry> entries, String keyString)

Implements org.jabref.gui.push.PushToApplication.pushEntries.

Doc from org.jabref.gui.push.PushToApplication.pushEntries.

The actual operation. This method will not be called on the event dispatch thread, so it should not do GUI operations without utilizing invokeLater().

Annotations
@Override
pushEntriesback to summary
protected void pushEntries(BibDatabaseContext database, List<BibEntry> entries, String keyString, ProcessBuilder processBuilder)
Annotations
@VisibleForTesting
requiresCitationKeysback to summary
public boolean requiresCitationKeys()

Implements org.jabref.gui.push.PushToApplication.requiresCitationKeys.

Doc from org.jabref.gui.push.PushToApplication.requiresCitationKeys.

Check whether this operation requires citation keys to be set for the entries. If true is returned an error message will be displayed if keys are missing.

Returns:boolean

true if citation keys are required for this operation.

Annotations
@Override
org.jabref.gui.push back to summary

protected Class AbstractPushToApplication.PushToApplicationAction

extends Object
implements Action
Class Inheritance
  • java.lang.Object
  • org.jabref.gui.push.AbstractPushToApplication.PushToApplicationAction
All Implemented Interfaces
org.jabref.gui.actions.Action

Constructor Summary

AccessConstructor and Description
protected

Method Summary

Modifier and TypeMethod and Description
public Optional<JabRefIcon>
public Optional<KeyBinding>
public String
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

PushToApplicationActionback to summary
protected PushToApplicationAction()

Method Detail

getIconback to summary
public Optional<JabRefIcon> getIcon()

Overrides default org.jabref.gui.actions.Action.getIcon.

Annotations
@Override
getKeyBindingback to summary
public Optional<KeyBinding> getKeyBinding()

Overrides default org.jabref.gui.actions.Action.getKeyBinding.

Annotations
@Override
getTextback to summary
public String getText()

Implements org.jabref.gui.actions.Action.getText.

Annotations
@Override