-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add sublime text editor as external push application
Fixes #10098 Co-authored-by: AdamWysokinski <[email protected]>
- Loading branch information
1 parent
1332e29
commit a2e5e9e
Showing
3 changed files
with
35 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
package org.jabref.gui.push; | ||
|
||
import org.jabref.gui.DialogService; | ||
import org.jabref.gui.icon.IconTheme; | ||
import org.jabref.gui.icon.JabRefIcon; | ||
import org.jabref.preferences.PreferencesService; | ||
|
||
/** | ||
* Class for pushing entries into SublimeText. | ||
*/ | ||
public class PushToSublimeText extends AbstractPushToApplication { | ||
|
||
public static final String NAME = "SublimeText"; | ||
|
||
public PushToSublimeText(DialogService dialogService, PreferencesService preferencesService) { | ||
super(dialogService, preferencesService); | ||
} | ||
|
||
@Override | ||
public String getDisplayName() { | ||
return NAME; | ||
} | ||
|
||
@Override | ||
public JabRefIcon getApplicationIcon() { | ||
return IconTheme.JabRefIcons.APPLICATION_SUBLIMETEXT; | ||
} | ||
|
||
@Override | ||
protected String[] getCommandLine(String keyString) { | ||
return new String[] {commandPath, "--command \'insert {\"characters\": \"\\", getCiteCommand() + "{" + keyString + "}\\}\'"}; | ||
} | ||
} |