-
-
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.
Fix DBLPFetcherTest -- dblp changed the format (#5582)
- Clean URLs in DBLPFetcher - Style RemoveLatexCommandsFormatter - Add tests for RemoveLatexCommandsFormatter - Add support for removing single and multiple whitespaces after a command - Split tests in RemoveBracketsTest - Fix casing in CleanupUrlFormatter (to match style and current name of test class CleanUpFormatterTest) - Fix casing in some ...Url.. method names - Format CleanupUrlFormatter - Improve code of ShortenDoiFormatter - Reformat code and more speaking variable name - Introduce LayoutFormatterBasedFormatter
- Loading branch information
Showing
18 changed files
with
227 additions
and
104 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
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
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
40 changes: 40 additions & 0 deletions
40
src/main/java/org/jabref/logic/layout/LayoutFormatterBasedFormatter.java
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,40 @@ | ||
package org.jabref.logic.layout; | ||
|
||
import org.jabref.model.cleanup.Formatter; | ||
|
||
/** | ||
* When having to use a LayoutFormatter as Formatter, this class is helpful. One usecase is {@link org.jabref.model.cleanup.FieldFormatterCleanup} | ||
*/ | ||
public class LayoutFormatterBasedFormatter extends Formatter { | ||
|
||
private final LayoutFormatter layoutFormatter; | ||
|
||
public LayoutFormatterBasedFormatter(LayoutFormatter layoutFormatter) { | ||
this.layoutFormatter = layoutFormatter; | ||
} | ||
|
||
@Override | ||
public String getName() { | ||
return layoutFormatter.getClass().getName(); | ||
} | ||
|
||
@Override | ||
public String getKey() { | ||
return layoutFormatter.getClass().getName(); | ||
} | ||
|
||
@Override | ||
public String format(String value) { | ||
return layoutFormatter.format(value); | ||
} | ||
|
||
@Override | ||
public String getDescription() { | ||
return layoutFormatter.getClass().getName(); | ||
} | ||
|
||
@Override | ||
public String getExampleInput() { | ||
return layoutFormatter.getClass().getName(); | ||
} | ||
} |
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
Oops, something went wrong.