Skip to content

Removed some random unused stuff #377

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 21, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 2 additions & 2 deletions src/main/java/net/sf/jabref/collab/ChangeScanner.java
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ public void run() {

scanEntries(sInMem, sInTemp, sOnDisk);

scanGroups(mdInMem, mdInTemp, mdOnDisk);
scanGroups(mdInTemp, mdOnDisk);

} catch (IOException ex) {
ex.printStackTrace();
Expand Down Expand Up @@ -515,7 +515,7 @@ private static BibtexString findString(BibtexDatabase base, String name, HashSet
* This method only detects whether a change took place or not. It does not determine the type of change. This would
* be possible, but difficult to do properly, so I rather only report the change.
*/
private void scanGroups(MetaData inMem, MetaData onTmp, MetaData onDisk) {
private void scanGroups(MetaData onTmp, MetaData onDisk) {
final GroupTreeNode groupsTmp = onTmp.getGroups();
final GroupTreeNode groupsDisk = onDisk.getGroups();
if ((groupsTmp == null) && (groupsDisk == null)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,6 @@ public void run() {
+ (checkExisting ? sel.length : 0);
panel.frame().setProgressBarMaximum(progressBarMax);
int progress = 0;
int brokenLinks = 0;
final NamedCompound ce = new NamedCompound(Localization.lang("Autoset %0 field", fieldName));

//final OpenFileFilter off = Util.getFileFilterForField(fieldName);
Expand Down Expand Up @@ -217,7 +216,6 @@ public void run() {
// Cancel
break mainLoop;
}
brokenLinks++;
}

// Unless we deleted this link, see if its file type is recognized:
Expand Down
23 changes: 0 additions & 23 deletions src/main/java/net/sf/jabref/groups/GroupSelector.java
Original file line number Diff line number Diff line change
Expand Up @@ -691,21 +691,6 @@ private void updateGroupContent(GroupTreeNode node) {
}
}

/**
* @param deletion != addition
*/
public void updateGroupContentIfEnabled(boolean deletion) {
if ((groupsTree == null) || (groupsTree.getSelectionCount() == 0)) {
return;
}
if (!this.editModeIndicator) {
// add button selected
return;
}
GroupTreeNode curNode = (GroupTreeNode) (groupsTree.getSelectionPaths())[0].getLastPathComponent();
updateGroupContent(curNode);
}

private void annotationEvent(GroupTreeNode node) {
LOGGER.info("Performing annotation " + node);
if (editModeIndicator) {
Expand All @@ -716,10 +701,6 @@ private void annotationEvent(GroupTreeNode node) {
}
}

// private void annotationEvent() {
// this.annotationEvent((GroupTreeNode) ((groupsTree.getSelectionPaths())[0].getLastPathComponent()));
// }

@Override
public void valueChanged(TreeSelectionEvent e) {
if (panel == null) // sorry, we're closed!
Expand Down Expand Up @@ -948,10 +929,6 @@ public NodeAction(String s) {
super(s);
}

public GroupTreeNode getNode() {
return m_node;
}

public void setNode(GroupTreeNode node) {
this.m_node = node;
}
Expand Down
14 changes: 1 addition & 13 deletions src/main/java/net/sf/jabref/gui/AttachFileDialog.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright (C) 2003-2011 JabRef contributors.
/* Copyright (C) 2003-2015 JabRef contributors.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
Expand All @@ -17,7 +17,6 @@

import java.awt.BorderLayout;
import java.awt.Dialog;
import java.awt.Frame;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

Expand Down Expand Up @@ -57,17 +56,6 @@ public class AttachFileDialog extends JDialog {
private final MetaData metaData;
private boolean cancelled = true; // Default to true, so a pure close operation implies Cancel.


public AttachFileDialog(Frame parent, MetaData metaData, BibtexEntry entry, String fieldName) {
super(parent, true);
this.metaData = metaData;
this.entry = entry;
this.fieldName = fieldName;
this.editor = new TextField(fieldName, entry.getField(fieldName), false);

initGui();
}

public AttachFileDialog(Dialog parent, MetaData metaData, BibtexEntry entry, String fieldName) {
super(parent, true);
this.metaData = metaData;
Expand Down
10 changes: 1 addition & 9 deletions src/main/java/net/sf/jabref/gui/BibtexFields.java
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ private BibtexFields() {
// collect all public fields for the PUBLIC_FIELDS array
Vector<String> pFields = new Vector<>(fieldSet.size());
for (BibtexSingleField sField : fieldSet.values()) {
if (sField.isPublic()) {
if (!sField.isPrivate()) {
pFields.add(sField.getFieldName());
// or export the complet BibtexSingleField ?
// BibtexSingleField.toString() { return fieldname ; }
Expand Down Expand Up @@ -561,14 +561,6 @@ public boolean isPrivate() {
return isSet(BibtexSingleField.PRIVATE);
}

public void setPublic() {
setFlag(false, BibtexSingleField.PRIVATE);
}

public boolean isPublic() {
return !isSet(BibtexSingleField.PRIVATE);
}

public void setDisplayable(boolean value) {
setFlag(value, BibtexSingleField.DISPLAYABLE);
}
Expand Down
4 changes: 0 additions & 4 deletions src/main/java/net/sf/jabref/gui/DuplicateResolverDialog.java
Original file line number Diff line number Diff line change
Expand Up @@ -199,10 +199,6 @@ private void buttonPressed(int button) {
dispose();
}

public boolean isBlocking() {
return block;
}

public int getSelected() {
return status;
}
Expand Down
16 changes: 0 additions & 16 deletions src/main/java/net/sf/jabref/gui/FieldSetComponent.java
Original file line number Diff line number Diff line change
Expand Up @@ -281,18 +281,6 @@ void removeSelected() {

}

public void activate() {
sel.requestFocus();
}

/**
* Returns true if there have been changes to the field list. Reports true
* if changes have been made, regardless of whether the changes cancel each other.
*/
public boolean changesMade() {
return changesMade;
}

/**
* Return the current list.
*/
Expand Down Expand Up @@ -320,10 +308,6 @@ public void addAdditionActionListener(ActionListener l) {
additionListeners.add(l);
}

public void removeAdditionActionListener(ActionListener l) {
additionListeners.remove(l);
}

public void addListDataListener(ListDataListener l) {
listModel.addListDataListener(l);
modelListeners.add(l);
Expand Down
18 changes: 5 additions & 13 deletions src/main/java/net/sf/jabref/gui/FindUnlinkedFilesDialog.java
Original file line number Diff line number Diff line change
Expand Up @@ -612,7 +612,7 @@ public void stateChanged(ChangeEvent e) {
progressBarImporting.setString(counter + " of " + progressBarImporting.getMaximum());
}
}, errors);
importFinishedHandler(count, errors);
importFinishedHandler(errors);
}
});

Expand All @@ -622,7 +622,7 @@ public void stateChanged(ChangeEvent e) {
*
* @param errors
*/
private void importFinishedHandler(int count, List<String> errors) {
private void importFinishedHandler(List<String> errors) {

if ((errors != null) && !errors.isEmpty()) {

Expand Down Expand Up @@ -1083,7 +1083,8 @@ private void createFileTypesCombobox() {
* @see javax.swing.DefaultListCellRenderer#getListCellRendererComponent(javax.swing.JList, java.lang.Object, int, boolean, boolean)
*/
@Override
public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) {
public Component getListCellRendererComponent(JList<?> list, Object value, int index, boolean isSelected,
boolean cellHasFocus) {
JLabel label = (JLabel) super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus);
if (value instanceof EntryFromFileCreator) {
EntryFromFileCreator creator = (EntryFromFileCreator) value;
Expand Down Expand Up @@ -1143,9 +1144,8 @@ public String toString() {

public static class CheckableTreeNode extends DefaultMutableTreeNode {

private static final long serialVersionUID = -1131241777605570737L;
private boolean isSelected;
private JCheckBox checkbox;
private final JCheckBox checkbox;


public CheckableTreeNode(Object userObject) {
Expand All @@ -1160,14 +1160,6 @@ public JCheckBox getCheckbox() {
return checkbox;
}

/**
* @param checkbox
* the checkbox to set
*/
public void setCheckbox(JCheckBox checkbox) {
this.checkbox = checkbox;
}

public void check() {
setSelected(!isSelected);
}
Expand Down
14 changes: 0 additions & 14 deletions src/main/java/net/sf/jabref/gui/GUIGlobals.java
Original file line number Diff line number Diff line change
Expand Up @@ -189,20 +189,6 @@ public static void updateEntryEditorColors() {
GUIGlobals.editorTextColor = JabRefPreferences.getInstance().getColor(JabRefPreferences.FIELD_EDITOR_TEXT_COLOR);
}

/**
* returns the path to language independent help files
*/
public static String getLocaleHelpPath() {
JabRefPreferences prefs = JabRefPreferences.getInstance();
String middle = prefs.get(JabRefPreferences.LANGUAGE) + '/';
if (middle.equals("en/")) {
middle = ""; // English in base help dir.
}

return GUIGlobals.helpPre + middle;
}


/**
* Perform initializations that are only used in graphical mode. This is to prevent
* the "Xlib: connection to ":0.0" refused by server" error when access to the X server
Expand Down
33 changes: 0 additions & 33 deletions src/main/java/net/sf/jabref/gui/TitleLabel.java

This file was deleted.