Skip to content

Commit

Permalink
Code formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
stefan-kolb committed Mar 3, 2016
1 parent 69fe30e commit 72dbdbb
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 11 deletions.
11 changes: 5 additions & 6 deletions src/main/java/net/sf/jabref/wizard/auximport/AuxFileParser.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,21 @@

import java.io.*;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.*;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

/**
* LaTeX Aux to BibTeX Parser
*
* <p>
* Extracts a subset of BibTeX entries from a BibDatabase that are included in an aux file.
*/
public class AuxFileParser {
private static final Log LOGGER = LogFactory.getLog(AuxFileParser.class);

private static final Pattern CITE_PATTERN = Pattern.compile("\\\\(citation|abx@aux@cite)\\{(.+)\\}");
private static final Pattern INPUT_PATTERN = Pattern.compile("\\\\@input\\{(.+)\\}");

private BibDatabase masterDatabase;

private BibDatabase auxDatabase;
Expand Down Expand Up @@ -102,9 +104,6 @@ public String getInformation(boolean includeMissingEntries) {
return result.toString();
}

private static final Pattern CITE_PATTERN = Pattern.compile("\\\\(citation|abx@aux@cite)\\{(.+)\\}");
private static final Pattern INPUT_PATTERN = Pattern.compile("\\\\@input\\{(.+)\\}");

/*
* Parses the aux file and extracts all bib keys.
* Also supports nested aux files (latex \\include).
Expand Down Expand Up @@ -149,7 +148,7 @@ private void parseAuxFile(String filename) {

String inputFile = inputString;
Path rootPath = new File(filename).toPath().getParent();
if(rootPath != null) {
if (rootPath != null) {
inputFile = rootPath.resolve(inputString).toString();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
import java.awt.BorderLayout;
import java.awt.event.ActionEvent;
import java.io.File;
import java.util.List;

import javax.swing.AbstractAction;
import javax.swing.ActionMap;
Expand All @@ -62,10 +61,8 @@
import net.sf.jabref.gui.BasePanel;
import net.sf.jabref.gui.keyboard.KeyBinding;
import net.sf.jabref.model.database.BibDatabase;
import net.sf.jabref.model.entry.BibEntry;
import net.sf.jabref.gui.JabRefFrame;
import net.sf.jabref.gui.FileDialogs;
import net.sf.jabref.gui.maintable.MainTable;
import net.sf.jabref.logic.l10n.Localization;
import net.sf.jabref.wizard.auximport.AuxFileParser;

Expand Down Expand Up @@ -97,7 +94,7 @@ public class FromAuxDialog extends JDialog {


public FromAuxDialog(JabRefFrame frame, String title, boolean modal,
JTabbedPane viewedDBs) {
JTabbedPane viewedDBs) {
super(frame, title, modal);

parentTabbedPane = viewedDBs;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.List;

import org.junit.Before;
import org.junit.Test;
Expand Down

0 comments on commit 72dbdbb

Please sign in to comment.