Skip to content

Commit

Permalink
revert formatting changes
Browse files Browse the repository at this point in the history
revert debug output
  • Loading branch information
Siedlerchr committed Feb 22, 2018
1 parent 1f6546a commit 3eee795
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 21 deletions.
39 changes: 29 additions & 10 deletions src/main/java/org/jabref/gui/JabRefFrame.java
Original file line number Diff line number Diff line change
Expand Up @@ -764,7 +764,8 @@ private MenuBar createMenu() {
factory.createMenuItem(StandardActions.IMPORT_INTO_NEW_LIBRARY, new ImportCommand(this, false)),
factory.createMenuItem(StandardActions.EXPORT_ALL, new ExportCommand(this, false)),
factory.createMenuItem(StandardActions.EXPORT_SELECTED, new ExportCommand(this, true)),
factory.createMenuItem(StandardActions.SAVE_SELECTED_AS_PLAIN_BIBTEX, new OldDatabaseCommandWrapper(Actions.SAVE_SELECTED_AS_PLAIN, this, Globals.stateManager))),
factory.createMenuItem(StandardActions.SAVE_SELECTED_AS_PLAIN_BIBTEX, new OldDatabaseCommandWrapper(Actions.SAVE_SELECTED_AS_PLAIN, this, Globals.stateManager))
),

new SeparatorMenuItem(),

Expand All @@ -778,7 +779,9 @@ private MenuBar createMenu() {
new SeparatorMenuItem(),

factory.createMenuItem(StandardActions.CLOSE_LIBRARY, new CloseDatabaseAction()),
factory.createMenuItem(StandardActions.QUIT, new CloseAction()));
factory.createMenuItem(StandardActions.QUIT, new CloseAction())

);

edit.getItems().addAll(
factory.createMenuItem(StandardActions.UNDO, new OldDatabaseCommandWrapper(Actions.UNDO, this, Globals.stateManager)),
Expand All @@ -804,7 +807,9 @@ private MenuBar createMenu() {

factory.createMenuItem(StandardActions.SEND_AS_EMAIL, new OldDatabaseCommandWrapper(Actions.SEND_AS_EMAIL, this, Globals.stateManager)),

new SeparatorMenuItem());
new SeparatorMenuItem()

);
/*
edit.add(mark);
for (int i = 0; i < EntryMarker.MAX_MARKING_LEVEL; i++) {
Expand Down Expand Up @@ -857,7 +862,9 @@ private MenuBar createMenu() {
edit.getItems().addAll(
factory.createMenuItem(StandardActions.MANAGE_KEYWORDS, new ManageKeywordsAction(this)),
factory.createMenuItem(StandardActions.REPLACE_ALL, new OldDatabaseCommandWrapper(Actions.REPLACE_ALL, this, Globals.stateManager)),
factory.createMenuItem(StandardActions.MASS_SET_FIELDS, new MassSetFieldAction(this)));
factory.createMenuItem(StandardActions.MASS_SET_FIELDS, new MassSetFieldAction(this))

);

library.getItems().addAll(
factory.createMenuItem(StandardActions.NEW_ARTICLE, new NewEntryAction(this, BibtexEntryTypes.ARTICLE)),
Expand All @@ -872,7 +879,9 @@ private MenuBar createMenu() {

factory.createMenuItem(StandardActions.LIBRARY_PROPERTIES, new LibraryPropertiesAction(this)),
factory.createMenuItem(StandardActions.EDIT_PREAMBLE, new OldDatabaseCommandWrapper(Actions.EDIT_PREAMBLE, this, Globals.stateManager)),
factory.createMenuItem(StandardActions.EDIT_STRINGS, new OldDatabaseCommandWrapper(Actions.EDIT_STRINGS, this, Globals.stateManager)));
factory.createMenuItem(StandardActions.EDIT_STRINGS, new OldDatabaseCommandWrapper(Actions.EDIT_STRINGS, this, Globals.stateManager))

);

Menu lookupIdentifiers = factory.createSubMenu(StandardActions.LOOKUP_DOC_IDENTIFIER);
for (IdFetcher<?> fetcher : WebFetchers.getIdFetchers(Globals.prefs.getImportFormatPreferences())) {
Expand All @@ -896,7 +905,9 @@ private MenuBar createMenu() {
factory.createMenuItem(StandardActions.SET_FILE_LINKS, new AutoLinkFilesAction()),
factory.createMenuItem(StandardActions.FIND_UNLINKED_FILES, new FindUnlinkedFilesAction(this)),
lookupIdentifiers,
factory.createMenuItem(StandardActions.DOWNLOAD_FULL_TEXT, new OldDatabaseCommandWrapper(Actions.DOWNLOAD_FULL_TEXT, this, Globals.stateManager)));
factory.createMenuItem(StandardActions.DOWNLOAD_FULL_TEXT, new OldDatabaseCommandWrapper(Actions.DOWNLOAD_FULL_TEXT, this, Globals.stateManager))

);

SidePaneComponent webSearch = sidePaneManager.getComponent(SidePaneType.WEB_SEARCH);
SidePaneComponent groups = sidePaneManager.getComponent(SidePaneType.GROUPS);
Expand All @@ -916,7 +927,9 @@ private MenuBar createMenu() {
new SeparatorMenuItem(),

factory.createMenuItem(StandardActions.NEXT_PREVIEW_STYLE, new OldDatabaseCommandWrapper(Actions.NEXT_PREVIEW_STYLE, this, Globals.stateManager)),
factory.createMenuItem(StandardActions.PREVIOUS_PREVIEW_STYLE, new OldDatabaseCommandWrapper(Actions.PREVIOUS_PREVIEW_STYLE, this, Globals.stateManager)));
factory.createMenuItem(StandardActions.PREVIOUS_PREVIEW_STYLE, new OldDatabaseCommandWrapper(Actions.PREVIOUS_PREVIEW_STYLE, this, Globals.stateManager))

);

PushToApplicationButton pushToExternal = new PushToApplicationButton(this, pushApplications.getApplications());
tools.getItems().addAll(
Expand All @@ -940,7 +953,9 @@ private MenuBar createMenu() {

factory.createMenuItem(StandardActions.ABBREVIATE_ISO, new OldDatabaseCommandWrapper(Actions.ABBREVIATE_ISO, this, Globals.stateManager)),
factory.createMenuItem(StandardActions.ABBREVIATE_MEDLINE, new OldDatabaseCommandWrapper(Actions.ABBREVIATE_MEDLINE, this, Globals.stateManager)),
factory.createMenuItem(StandardActions.UNABBREVIATE, new OldDatabaseCommandWrapper(Actions.UNABBREVIATE, this, Globals.stateManager)));
factory.createMenuItem(StandardActions.UNABBREVIATE, new OldDatabaseCommandWrapper(Actions.UNABBREVIATE, this, Globals.stateManager))

);

options.getItems().addAll(
factory.createMenuItem(StandardActions.SHOW_PREFS, new ShowPreferencesAction(this)),
Expand All @@ -959,7 +974,9 @@ private MenuBar createMenu() {

factory.createMenuItem(StandardActions.MANAGE_CONTENT_SELECTORS, new OldDatabaseCommandWrapper(Actions.MANAGE_SELECTORS, this, Globals.stateManager)),
factory.createMenuItem(StandardActions.CUSTOMIZE_ENTRY_TYPES, new CustomizeEntryAction(this)),
factory.createMenuItem(StandardActions.MANAGE_CITE_KEY_PATTERNS, new BibtexKeyPatternAction(this)));
factory.createMenuItem(StandardActions.MANAGE_CITE_KEY_PATTERNS, new BibtexKeyPatternAction(this))

);

help.getItems().addAll(
factory.createMenuItem(StandardActions.HELP, HelpAction.getCommand()),
Expand Down Expand Up @@ -989,7 +1006,9 @@ private MenuBar createMenu() {
factory.createMenuItem(StandardActions.DONATE, new OpenBrowserAction("https://donations.jabref.org"))

),
factory.createMenuItem(StandardActions.ABOUT, new AboutAction()));
factory.createMenuItem(StandardActions.ABOUT, new AboutAction())

);

MenuBar menu = new MenuBar();
menu.getStyleClass().add("mainMenu");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ public FileAnnotationTabViewModel(FileAnnotationCache cache, BibEntry entry, Fil
this.cache = cache;
this.entry = entry;
this.fileMonitor = fileMonitor;

fileAnnotations = this.cache.getFromCache(this.entry);
files.setAll(fileAnnotations.keySet());
}
Expand Down
13 changes: 2 additions & 11 deletions src/main/java/org/jabref/gui/util/DefaultFileUpdateMonitor.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import java.io.IOException;
import java.nio.file.FileSystems;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.StandardWatchEventKinds;
import java.nio.file.WatchEvent;
Expand Down Expand Up @@ -71,17 +70,9 @@ private void notifyAboutChange(Path path) {
@Override
public void addListenerForFile(Path file, FileUpdateListener listener) throws IOException {
// We can't watch files directly, so monitor their parent directory for updates

Path directory = file.toAbsolutePath().getParent();
System.out.println(directory);
if ((directory != null) && Files.exists(directory)) {
directory.register(watcher, StandardWatchEventKinds.ENTRY_MODIFY);

listeners.put(file, listener);
}
else {
System.out.println("Dir not exist " + directory);
}
directory.register(watcher, StandardWatchEventKinds.ENTRY_MODIFY);
listeners.put(file, listener);
}

@Override
Expand Down

0 comments on commit 3eee795

Please sign in to comment.