Skip to content
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

Remove checkstyle hack. 8.36 got released #6816

Merged
merged 2 commits into from
Aug 31, 2020
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
7 changes: 0 additions & 7 deletions config/checkstyle/checkstyle.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,6 @@
<property name="header" value=""/>
</module>

<!-- BeforeExecutionFileFilters is required for sources that are based on java14 -->
<module name="BeforeExecutionExclusionFileFilter">
<property
name="fileNamePattern"
value="AuthorAndsReplacer.java|EntryTypeView.java|IEEE.java|MainTableFieldValueFormatter.java|Ordinal.java"/>
</module>

<module name="SuppressionFilter">
<property name="file" value="${config_loc}/suppressions.xml"/>
</module>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ Contributions to JabRef's source code need to have a code formatting that is con
3. Click "Browse" and choose `config/checkstyle/checkstyle.xml`
4. Click "Next" and "Finish"
5. Activate the CheckStyle configuration file by ticking it in the list
6. Ensure that the latest CheckStyle version is selected \(8.32 or higher\)
6. Ensure that the [latest CheckStyle version](https://checkstyle.org/releasenotes.html) is selected \(8.36 or higher\). 8.36 is required for Java 14.
7. Set the "Scan Scope" to "Only Java sources \(including tests\)
8. Save settings by clicking "OK"
9. Your configuration should now look like this:
Expand Down
22 changes: 9 additions & 13 deletions src/main/java/org/jabref/gui/EntryTypeView.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,11 @@
import java.util.List;
import java.util.Optional;

import javax.inject.Inject;

import javafx.application.Platform;
import javafx.event.Event;
import javafx.fxml.FXML;

import javax.inject.Inject;

import javafx.scene.control.Button;
import javafx.scene.control.ButtonType;
import javafx.scene.control.ComboBox;
Expand Down Expand Up @@ -43,11 +42,11 @@

/**
* Dialog that prompts the user to choose a type for an entry.
*
* @return null if canceled
*/
public class EntryTypeView extends BaseDialog<EntryType> {

@Inject StateManager stateManager;

@FXML private ButtonType generateButton;
@FXML private TextField idTextField;
@FXML private ComboBox<IdBasedFetcher> idBasedFetchers;
Expand All @@ -62,8 +61,6 @@ public class EntryTypeView extends BaseDialog<EntryType> {
@FXML private TitledPane customTitlePane;
@FXML private TitledPane biblatexSoftwareTitlePane;

@Inject StateManager stateManager;

private final BasePanel basePanel;
private final DialogService dialogService;
private final JabRefPreferences prefs;
Expand Down Expand Up @@ -202,11 +199,12 @@ private void setEntryTypeForReturnAndClose(Optional<BibEntryType> entryType) {
this.close();
}

//The description is coming from biblatex manual chapter 2
//Biblatex documentation is favored over the bibtex,
//since bibtex is a subset of biblatex and biblatex is better documented.
/**
* The description is originating from biblatex manual chapter 2
* Biblatex documentation is favored over the bibtex,
* since bibtex is a subset of biblatex and biblatex is better documented.
*/
public static String getDescription(EntryType selectedType) {
//CHECKSTYLE:OFF
if (selectedType instanceof StandardEntryType) {
switch ((StandardEntryType) selectedType) {
case Article -> {
Expand Down Expand Up @@ -312,7 +310,5 @@ public static String getDescription(EntryType selectedType) {
} else {
return "";
}
//CHECKSTYLE:ON

}
}