Skip to content

Commit

Permalink
fix: IEEETRANBSTCTL belongs to IEEE types not standard BibTeX types
Browse files Browse the repository at this point in the history
  • Loading branch information
stefan-kolb committed Aug 23, 2019
1 parent 9f34593 commit e7f9a40
Show file tree
Hide file tree
Showing 147 changed files with 844 additions and 766 deletions.
14 changes: 7 additions & 7 deletions src/main/java/org/jabref/gui/EntryTypeView.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@
import org.jabref.logic.l10n.Localization;
import org.jabref.model.database.BibDatabaseMode;
import org.jabref.model.entry.BibEntryType;
import org.jabref.model.entry.BiblatexEntryTypes;
import org.jabref.model.entry.BibtexEntryTypes;
import org.jabref.model.entry.EntryType;
import org.jabref.model.entry.IEEETranEntryTypes;
import org.jabref.model.entry.types.BiblatexEntryTypeDefinitions;
import org.jabref.model.entry.types.BibtexEntryTypeDefinitions;
import org.jabref.model.entry.types.EntryType;
import org.jabref.model.entry.types.IEEETranEntryTypeDefinitions;
import org.jabref.preferences.JabRefPreferences;

import com.airhacks.afterburner.views.ViewLoader;
Expand Down Expand Up @@ -119,7 +119,7 @@ public void initialize() {
customTitlePane.managedProperty().bind(customTitlePane.visibleProperty());

if (basePanel.getBibDatabaseContext().isBiblatexMode()) {
addEntriesToPane(biblatexPane, BiblatexEntryTypes.ALL);
addEntriesToPane(biblatexPane, BiblatexEntryTypeDefinitions.ALL);

bibTexTitlePane.setVisible(false);
ieeeTranTitlePane.setVisible(false);
Expand All @@ -133,8 +133,8 @@ public void initialize() {

} else {
biblatexTitlePane.setVisible(false);
addEntriesToPane(bibTexPane, BibtexEntryTypes.ALL);
addEntriesToPane(ieeetranPane, IEEETranEntryTypes.ALL);
addEntriesToPane(bibTexPane, BibtexEntryTypeDefinitions.ALL);
addEntriesToPane(ieeetranPane, IEEETranEntryTypeDefinitions.ALL);

List<BibEntryType> customTypes = Globals.entryTypesManager.getAllCustomTypes(BibDatabaseMode.BIBTEX);
if (customTypes.isEmpty()) {
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/org/jabref/gui/JabRefFrame.java
Original file line number Diff line number Diff line change
Expand Up @@ -121,9 +121,9 @@
import org.jabref.model.database.BibDatabaseMode;
import org.jabref.model.database.shared.DatabaseLocation;
import org.jabref.model.entry.BibEntry;
import org.jabref.model.entry.StandardEntryType;
import org.jabref.model.entry.field.SpecialField;
import org.jabref.model.entry.field.StandardField;
import org.jabref.model.entry.types.BibtexEntryType;
import org.jabref.preferences.JabRefPreferences;
import org.jabref.preferences.LastFocusedTabPreferences;

Expand Down Expand Up @@ -526,7 +526,7 @@ private Node createToolbar() {
pushToApplicationsManager.setToolBarButton(pushToApplicationButton);

HBox rightSide = new HBox(
factory.createIconButton(StandardActions.NEW_ARTICLE, new NewEntryAction(this, StandardEntryType.Article, dialogService, Globals.prefs, stateManager)),
factory.createIconButton(StandardActions.NEW_ARTICLE, new NewEntryAction(this, BibtexEntryType.Article, dialogService, Globals.prefs, stateManager)),
factory.createIconButton(StandardActions.DELETE_ENTRY, new OldDatabaseCommandWrapper(Actions.DELETE, this, stateManager)),
new Separator(Orientation.VERTICAL),
factory.createIconButton(StandardActions.UNDO, new OldDatabaseCommandWrapper(Actions.UNDO, this, stateManager)),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
import org.jabref.model.bibtexkeypattern.GlobalBibtexKeyPattern;
import org.jabref.model.database.BibDatabaseMode;
import org.jabref.model.entry.BibEntryType;
import org.jabref.model.entry.EntryType;
import org.jabref.model.entry.types.EntryType;
import org.jabref.preferences.JabRefPreferences;

public class BibtexKeyPatternPanel extends Pane {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import javafx.scene.control.Tab;

import org.jabref.model.entry.BibEntry;
import org.jabref.model.entry.EntryType;
import org.jabref.model.entry.types.EntryType;

public abstract class EntryEditorTab extends Tab {

Expand Down
6 changes: 3 additions & 3 deletions src/main/java/org/jabref/gui/fieldeditors/FieldEditors.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@
import org.jabref.logic.integrity.FieldCheckers;
import org.jabref.logic.journals.JournalAbbreviationRepository;
import org.jabref.model.database.BibDatabaseContext;
import org.jabref.model.entry.EntryType;
import org.jabref.model.entry.StandardEntryType;
import org.jabref.model.entry.field.Field;
import org.jabref.model.entry.field.FieldFactory;
import org.jabref.model.entry.field.FieldProperty;
import org.jabref.model.entry.field.InternalField;
import org.jabref.model.entry.field.StandardField;
import org.jabref.model.entry.types.EntryType;
import org.jabref.model.entry.types.IEEETranEntryType;
import org.jabref.model.metadata.MetaData;
import org.jabref.preferences.JabRefPreferences;

Expand Down Expand Up @@ -79,7 +79,7 @@ public static FieldEditorFX getForField(final Field field,
} else if (fieldProperties.contains(FieldProperty.PAGINATION)) {
return new OptionEditor<>(new PaginationEditorViewModel(field, suggestionProvider, fieldCheckers));
} else if (fieldProperties.contains(FieldProperty.TYPE)) {
if (entryType.equals(StandardEntryType.Patent)) {
if (entryType.equals(IEEETranEntryType.Patent)) {
return new OptionEditor<>(new PatentTypeEditorViewModel(field, suggestionProvider, fieldCheckers));
} else {
return new OptionEditor<>(new TypeEditorViewModel(field, suggestionProvider, fieldCheckers));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import org.jabref.Globals;
import org.jabref.model.database.BibDatabaseMode;
import org.jabref.model.entry.BibEntryType;
import org.jabref.model.entry.EntryTypeFactory;
import org.jabref.model.entry.types.EntryTypeFactory;
import org.jabref.preferences.PreferencesService;

public class ImportCustomEntryTypesDialogViewModel {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@
import org.jabref.logic.l10n.Localization;
import org.jabref.model.database.BibDatabaseContext;
import org.jabref.model.entry.BibEntry;
import org.jabref.model.entry.EntryType;
import org.jabref.model.entry.StandardEntryType;
import org.jabref.model.entry.field.StandardField;
import org.jabref.model.entry.types.BibtexEntryType;
import org.jabref.model.entry.types.EntryType;
import org.jabref.model.util.FileUpdateMonitor;
import org.jabref.preferences.PreferencesService;

Expand Down Expand Up @@ -156,7 +156,7 @@ private Node getEntryNode(BibEntry entry) {
}

private IconTheme.JabRefIcons getIcon(EntryType type) {
if (StandardEntryType.Book.equals(type)) {
if (BibtexEntryType.Book.equals(type)) {
return IconTheme.JabRefIcons.BOOK;
}
return IconTheme.JabRefIcons.ARTICLE;
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/jabref/gui/importer/NewEntryAction.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
import org.jabref.gui.StateManager;
import org.jabref.gui.actions.SimpleCommand;
import org.jabref.model.entry.BibEntry;
import org.jabref.model.entry.EntryType;
import org.jabref.model.entry.types.EntryType;
import org.jabref.preferences.JabRefPreferences;

import org.slf4j.Logger;
Expand Down
10 changes: 5 additions & 5 deletions src/main/java/org/jabref/gui/menus/ChangeEntryTypeMenu.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@
import org.jabref.model.database.BibDatabaseMode;
import org.jabref.model.entry.BibEntry;
import org.jabref.model.entry.BibEntryType;
import org.jabref.model.entry.BibtexEntryTypes;
import org.jabref.model.entry.EntryType;
import org.jabref.model.entry.IEEETranEntryTypes;
import org.jabref.model.entry.types.BibtexEntryTypeDefinitions;
import org.jabref.model.entry.types.EntryType;
import org.jabref.model.entry.types.IEEETranEntryTypeDefinitions;

public class ChangeEntryTypeMenu {

Expand Down Expand Up @@ -63,11 +63,11 @@ private void populateComplete(ObservableList<MenuItem> items, BibEntry entry, Bi
populateSubMenu(items, Localization.lang("Custom"), Globals.entryTypesManager.getAllCustomTypes(BibDatabaseMode.BIBLATEX), entry, undoManager);
} else {
// Default BibTeX
populateSubMenu(items, BibDatabaseMode.BIBTEX.getFormattedName(), BibtexEntryTypes.ALL, entry, undoManager);
populateSubMenu(items, BibDatabaseMode.BIBTEX.getFormattedName(), BibtexEntryTypeDefinitions.ALL, entry, undoManager);
items.remove(0); // Remove separator

// IEEETran
populateSubMenu(items, "IEEETran", IEEETranEntryTypes.ALL, entry, undoManager);
populateSubMenu(items, "IEEETran", IEEETranEntryTypeDefinitions.ALL, entry, undoManager);

// Custom types
populateSubMenu(items, Localization.lang("Custom"), Globals.entryTypesManager.getAllCustomTypes(BibDatabaseMode.BIBTEX), entry, undoManager);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@
import org.jabref.logic.importer.WebFetchers;
import org.jabref.logic.l10n.Localization;
import org.jabref.model.entry.BibEntry;
import org.jabref.model.entry.EntryType;
import org.jabref.model.entry.field.Field;
import org.jabref.model.entry.field.FieldFactory;
import org.jabref.model.entry.field.StandardField;
import org.jabref.model.entry.types.EntryType;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
Expand Down
2 changes: 0 additions & 2 deletions src/main/java/org/jabref/gui/preferences/AdvancedTab.fxml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@
<?import javafx.scene.layout.HBox?>
<?import javafx.scene.layout.RowConstraints?>
<?import javafx.scene.layout.VBox?>

<?import org.controlsfx.control.textfield.CustomPasswordField?>

<fx:root prefWidth="650.0" spacing="10.0" type="VBox"
xmlns="http://javafx.com/javafx/8.0.212" xmlns:fx="http://javafx.com/fxml/1"
fx:controller="org.jabref.gui.preferences.AdvancedTabView">
Expand Down
3 changes: 1 addition & 2 deletions src/main/java/org/jabref/gui/preferences/ExternalTab.fxml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,12 @@
<?import javafx.scene.control.RadioButton?>
<?import javafx.scene.control.TextField?>
<?import javafx.scene.control.ToggleGroup?>
<?import javafx.scene.control.Tooltip?>
<?import javafx.scene.layout.ColumnConstraints?>
<?import javafx.scene.layout.GridPane?>
<?import javafx.scene.layout.HBox?>
<?import javafx.scene.layout.RowConstraints?>
<?import javafx.scene.layout.VBox?>

<?import javafx.scene.control.Tooltip?>
<fx:root prefWidth="650.0" spacing="10.0" type="VBox"
xmlns="http://javafx.com/javafx/8.0.212" xmlns:fx="http://javafx.com/fxml/1"
fx:controller="org.jabref.gui.preferences.ExternalTabView">
Expand Down
1 change: 0 additions & 1 deletion src/main/java/org/jabref/gui/preferences/FileTab.fxml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
<?import javafx.scene.control.Tooltip?>
<?import javafx.scene.layout.HBox?>
<?import javafx.scene.layout.VBox?>

<fx:root prefWidth="650.0" spacing="10.0" type="VBox"
xmlns="http://javafx.com/javafx/8.0.212" xmlns:fx="http://javafx.com/fxml/1"
fx:controller="org.jabref.gui.preferences.FileTabView">
Expand Down
1 change: 0 additions & 1 deletion src/main/java/org/jabref/gui/preferences/GeneralTab.fxml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
<?import javafx.scene.layout.HBox?>
<?import javafx.scene.layout.RowConstraints?>
<?import javafx.scene.layout.VBox?>

<fx:root prefWidth="650.0" spacing="10.0" type="VBox"
xmlns="http://javafx.com/javafx/8.0.212" xmlns:fx="http://javafx.com/fxml/1"
fx:controller="org.jabref.gui.preferences.GeneralTabView">
Expand Down
4 changes: 1 addition & 3 deletions src/main/java/org/jabref/gui/preferences/GroupsTab.fxml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,11 @@
<?import javafx.scene.control.Label?>
<?import javafx.scene.control.RadioButton?>
<?import javafx.scene.control.TextField?>
<?import javafx.scene.control.ToggleGroup?>
<?import javafx.scene.layout.ColumnConstraints?>
<?import javafx.scene.layout.GridPane?>
<?import javafx.scene.layout.RowConstraints?>
<?import javafx.scene.layout.VBox?>

<?import javafx.scene.control.ToggleGroup?>

<fx:root prefWidth="650.0" spacing="10.0" type="VBox"
xmlns="http://javafx.com/javafx/8.0.212" xmlns:fx="http://javafx.com/fxml/1"
fx:controller="org.jabref.gui.preferences.GroupsTabView">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@
<?import javafx.scene.control.SplitPane?>
<?import javafx.scene.control.Tooltip?>
<?import javafx.scene.layout.VBox?>

<?import org.controlsfx.control.textfield.CustomTextField?>

<DialogPane prefHeight="700.0" prefWidth="1100.0" minHeight="400" minWidth="600"
xmlns="http://javafx.com/javafx/8.0.212" xmlns:fx="http://javafx.com/fxml/1"
fx:controller="org.jabref.gui.preferences.PreferencesDialogView">
Expand Down
11 changes: 4 additions & 7 deletions src/main/java/org/jabref/gui/preferences/PreviewTab.fxml
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,13 @@
<?import javafx.scene.control.Button?>
<?import javafx.scene.control.Label?>
<?import javafx.scene.control.ListView?>
<?import javafx.scene.control.Tab?>
<?import javafx.scene.control.TabPane?>
<?import javafx.scene.layout.AnchorPane?>
<?import javafx.scene.layout.HBox?>
<?import javafx.scene.layout.VBox?>

<?import org.fxmisc.richtext.CodeArea?>

<?import org.fxmisc.flowless.VirtualizedScrollPane?>
<?import javafx.scene.control.TabPane?>
<?import javafx.scene.control.Tab?>
<?import javafx.scene.layout.AnchorPane?>

<?import org.fxmisc.richtext.CodeArea?>
<fx:root prefWidth="650.0" spacing="4.0" type="VBox" xmlns="http://javafx.com/javafx/8.0.212"
xmlns:fx="http://javafx.com/fxml/1" fx:controller="org.jabref.gui.preferences.PreviewTabView">
<children>
Expand Down
1 change: 0 additions & 1 deletion src/main/java/org/jabref/gui/texparser/ParseTexDialog.fxml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
<?import javafx.scene.layout.HBox?>
<?import javafx.scene.layout.VBox?>
<?import org.controlsfx.control.CheckTreeView?>

<DialogPane xmlns="http://javafx.com/javafx/8.0.171" xmlns:fx="http://javafx.com/fxml/1"
fx:controller="org.jabref.gui.texparser.ParseTexDialogView"
prefWidth="500.0" prefHeight="650.0">
Expand Down
1 change: 0 additions & 1 deletion src/main/java/org/jabref/gui/texparser/ParseTexResult.fxml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
<?import javafx.scene.layout.HBox?>
<?import javafx.scene.layout.VBox?>
<?import org.jabref.gui.texparser.CitationsDisplay?>

<DialogPane xmlns="http://javafx.com/javafx/8.0.171" xmlns:fx="http://javafx.com/fxml/1"
fx:controller="org.jabref.gui.texparser.ParseTexResultView"
prefWidth="900.0" prefHeight="600.0">
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/org/jabref/gui/undo/UndoableChangeType.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
import org.jabref.logic.l10n.Localization;
import org.jabref.model.FieldChange;
import org.jabref.model.entry.BibEntry;
import org.jabref.model.entry.EntryType;
import org.jabref.model.entry.EntryTypeFactory;
import org.jabref.model.entry.types.EntryType;
import org.jabref.model.entry.types.EntryTypeFactory;
import org.jabref.model.strings.StringUtil;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
import org.jabref.model.database.BibDatabase;
import org.jabref.model.database.BibDatabaseContext;
import org.jabref.model.entry.BibEntry;
import org.jabref.model.entry.EntryType;
import org.jabref.model.entry.types.EntryType;
import org.jabref.model.strings.StringUtil;

import org.slf4j.Logger;
Expand Down
33 changes: 17 additions & 16 deletions src/main/java/org/jabref/logic/exporter/BibTeXMLExporter.java
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,10 @@
import org.jabref.logic.util.StandardFileType;
import org.jabref.model.database.BibDatabaseContext;
import org.jabref.model.entry.BibEntry;
import org.jabref.model.entry.StandardEntryType;
import org.jabref.model.entry.field.Field;
import org.jabref.model.entry.field.StandardField;
import org.jabref.model.entry.types.BibtexEntryType;
import org.jabref.model.entry.types.EntryType;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
Expand Down Expand Up @@ -76,34 +77,34 @@ public void export(final BibDatabaseContext databaseContext, final Path resultFi

bibEntry.getCiteKeyOptional().ifPresent(entry::setId);

org.jabref.model.entry.EntryType i = bibEntry.getType();
if (StandardEntryType.Article.equals(i)) {
EntryType i = bibEntry.getType();
if (BibtexEntryType.Article.equals(i)) {
parse(new Article(), bibEntry, entry);
} else if (StandardEntryType.Book.equals(i)) {
} else if (BibtexEntryType.Book.equals(i)) {
parse(new Book(), bibEntry, entry);
} else if (StandardEntryType.Booklet.equals(i)) {
} else if (BibtexEntryType.Booklet.equals(i)) {
parse(new Booklet(), bibEntry, entry);
} else if (StandardEntryType.Conference.equals(i)) {
} else if (BibtexEntryType.Conference.equals(i)) {
parse(new Conference(), bibEntry, entry);
} else if (StandardEntryType.InBook.equals(i)) {
} else if (BibtexEntryType.InBook.equals(i)) {
parseInbook(new Inbook(), bibEntry, entry);
} else if (StandardEntryType.InCollection.equals(i)) {
} else if (BibtexEntryType.InCollection.equals(i)) {
parse(new Incollection(), bibEntry, entry);
} else if (StandardEntryType.InProceedings.equals(i)) {
} else if (BibtexEntryType.InProceedings.equals(i)) {
parse(new Inproceedings(), bibEntry, entry);
} else if (StandardEntryType.MastersThesis.equals(i)) {
} else if (BibtexEntryType.MastersThesis.equals(i)) {
parse(new Mastersthesis(), bibEntry, entry);
} else if (StandardEntryType.Manual.equals(i)) {
} else if (BibtexEntryType.Manual.equals(i)) {
parse(new Manual(), bibEntry, entry);
} else if (StandardEntryType.Misc.equals(i)) {
} else if (BibtexEntryType.Misc.equals(i)) {
parse(new Misc(), bibEntry, entry);
} else if (StandardEntryType.PhdThesis.equals(i)) {
} else if (BibtexEntryType.PhdThesis.equals(i)) {
parse(new Phdthesis(), bibEntry, entry);
} else if (StandardEntryType.Proceedings.equals(i)) {
} else if (BibtexEntryType.Proceedings.equals(i)) {
parse(new Proceedings(), bibEntry, entry);
} else if (StandardEntryType.TechReport.equals(i)) {
} else if (BibtexEntryType.TechReport.equals(i)) {
parse(new Techreport(), bibEntry, entry);
} else if (StandardEntryType.Unpublished.equals(i)) {
} else if (BibtexEntryType.Unpublished.equals(i)) {
parse(new Unpublished(), bibEntry, entry);
} else {
LOGGER.warn("unexpected type appeared");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
import org.jabref.model.bibtexkeypattern.AbstractBibtexKeyPattern;
import org.jabref.model.bibtexkeypattern.GlobalBibtexKeyPattern;
import org.jabref.model.cleanup.FieldFormatterCleanups;
import org.jabref.model.entry.EntryType;
import org.jabref.model.entry.types.EntryType;
import org.jabref.model.groups.GroupTreeNode;
import org.jabref.model.metadata.ContentSelector;
import org.jabref.model.metadata.MetaData;
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/jabref/logic/exporter/ModsExporter.java
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,10 @@
import org.jabref.logic.util.StandardFileType;
import org.jabref.model.database.BibDatabaseContext;
import org.jabref.model.entry.BibEntry;
import org.jabref.model.entry.EntryType;
import org.jabref.model.entry.field.Field;
import org.jabref.model.entry.field.StandardField;
import org.jabref.model.entry.field.UnknownField;
import org.jabref.model.entry.types.EntryType;

/**
* TemplateExporter for exporting in MODS XML format.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
import org.jabref.logic.util.StandardFileType;
import org.jabref.model.database.BibDatabaseContext;
import org.jabref.model.entry.BibEntry;
import org.jabref.model.entry.EntryType;
import org.jabref.model.entry.types.EntryType;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
Expand Down
Loading

0 comments on commit e7f9a40

Please sign in to comment.