@ -29,7 +29,6 @@ A rule for the politically correct... we don't want to offend anyone.
|
||||
|----|-------------|-----------|
|
||||
|disallowedTerms|[idiot, jerk]|Illegal terms or phrases|
|
||||
|caseSensitive|false|Case sensitive|
|
||||
|wordsAreRegex|false|Use regular expressions|
|
||||
|
||||
**Use this rule by referencing it:**
|
||||
``` xml
|
||||
|
@ -12,10 +12,12 @@ This is a bug fixing release.
|
||||
|
||||
### Table Of Contents
|
||||
|
||||
* [New and noteworthy](#new-and-noteworthy)
|
||||
* [Fixed Issues](#fixed-issues)
|
||||
* [API Changes](#api-changes)
|
||||
* [External Contributions](#external-contributions)
|
||||
* [New and noteworthy](#new-and-noteworthy)
|
||||
* [Fixed Issues](#fixed-issues)
|
||||
* [Ecmascript (JavaScript)](#ecmascript-javascript)
|
||||
* [Modified Rules](#modified-rules)
|
||||
* [API Changes](#api-changes)
|
||||
* [External Contributions](#external-contributions)
|
||||
|
||||
### New and noteworthy
|
||||
|
||||
@ -29,6 +31,11 @@ Detailed changes for changed in Rhino can be found:
|
||||
|
||||
Both are bugfixing releases.
|
||||
|
||||
#### Modified Rules
|
||||
|
||||
* The rule "CommentContentRule" (java-documentation) previously had the property `wordsAreRegex`. But this
|
||||
property never had been implemented and is removed now.
|
||||
|
||||
### Fixed Issues
|
||||
|
||||
* all
|
||||
|
@ -28,15 +28,10 @@ public class ApexParser {
|
||||
protected final ApexParserOptions parserOptions;
|
||||
|
||||
private Map<Integer, String> suppressMap;
|
||||
private String suppressMarker = "NOPMD";
|
||||
|
||||
public ApexParser(ApexParserOptions parserOptions) {
|
||||
ApexJorjeLogging.disableLogging();
|
||||
this.parserOptions = parserOptions;
|
||||
|
||||
if (parserOptions.getSuppressMarker() != null) {
|
||||
suppressMarker = parserOptions.getSuppressMarker();
|
||||
}
|
||||
}
|
||||
|
||||
public Compilation parseApex(final String sourceCode) throws ParseException {
|
||||
|
@ -24,8 +24,6 @@ public abstract class MemberNode<S extends MemberNode<S, T>, T extends Member>
|
||||
|
||||
private List<MemberNode> users;
|
||||
|
||||
private Object decoration;
|
||||
|
||||
public MemberNode(ClassNode classNode, String name, String desc) {
|
||||
this.classNode = classNode;
|
||||
this.name = name;
|
||||
|
@ -68,7 +68,6 @@ public final class JavaQualifiedName implements QualifiedName {
|
||||
private static final int PACKAGES_GROUP_INDEX = 1;
|
||||
private static final int CLASSES_GROUP_INDEX = 3;
|
||||
private static final int OPERATION_GROUP_INDEX = 7;
|
||||
private static final int PARAMETERS_GROUP_INDEX = 9;
|
||||
|
||||
|
||||
/** Local index value for when the class is not local. */
|
||||
|
@ -31,16 +31,12 @@ import net.sourceforge.pmd.properties.StringMultiProperty;
|
||||
public class CommentContentRule extends AbstractCommentRule {
|
||||
|
||||
private boolean caseSensitive;
|
||||
private boolean wordsAreRegex;
|
||||
private List<String> originalBadWords;
|
||||
private List<String> currentBadWords;
|
||||
|
||||
// FIXME need some better defaults (or none?)
|
||||
private static final String[] BAD_WORDS = {"idiot", "jerk" };
|
||||
|
||||
public static final BooleanProperty WORDS_ARE_REGEX_DESCRIPTOR = new BooleanProperty("wordsAreRegex",
|
||||
"Use regular expressions", false, 1.0f);
|
||||
|
||||
// ignored when property above == True
|
||||
public static final BooleanProperty CASE_SENSITIVE_DESCRIPTOR = new BooleanProperty("caseSensitive",
|
||||
"Case sensitive", false, 2.0f);
|
||||
@ -56,7 +52,6 @@ public class CommentContentRule extends AbstractCommentRule {
|
||||
}
|
||||
|
||||
public CommentContentRule() {
|
||||
definePropertyDescriptor(WORDS_ARE_REGEX_DESCRIPTOR);
|
||||
definePropertyDescriptor(CASE_SENSITIVE_DESCRIPTOR);
|
||||
definePropertyDescriptor(DISSALLOWED_TERMS_DESCRIPTOR);
|
||||
}
|
||||
@ -66,7 +61,6 @@ public class CommentContentRule extends AbstractCommentRule {
|
||||
*/
|
||||
@Override
|
||||
public void start(RuleContext ctx) {
|
||||
wordsAreRegex = getProperty(WORDS_ARE_REGEX_DESCRIPTOR);
|
||||
originalBadWords = getProperty(DISSALLOWED_TERMS_DESCRIPTOR);
|
||||
caseSensitive = getProperty(CASE_SENSITIVE_DESCRIPTOR);
|
||||
if (caseSensitive) {
|
||||
@ -79,12 +73,6 @@ public class CommentContentRule extends AbstractCommentRule {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Set<PropertyDescriptor<?>> ignoredProperties() {
|
||||
return getProperty(WORDS_ARE_REGEX_DESCRIPTOR) ? NON_REGEX_PROPERTIES
|
||||
: Collections.<PropertyDescriptor<?>>emptySet();
|
||||
}
|
||||
|
||||
/**
|
||||
* .
|
||||
* @see Rule#end(RuleContext)
|
||||
|
@ -53,10 +53,10 @@ public class Designer extends Application {
|
||||
DesignerRoot owner = new DesignerRoot(stage);
|
||||
MainDesignerController mainController = new MainDesignerController(owner);
|
||||
|
||||
NodeInfoPanelController nodeInfoPanelController = new NodeInfoPanelController(owner, mainController);
|
||||
NodeInfoPanelController nodeInfoPanelController = new NodeInfoPanelController(mainController);
|
||||
XPathPanelController xpathPanelController = new XPathPanelController(owner, mainController);
|
||||
SourceEditorController sourceEditorController = new SourceEditorController(owner, mainController);
|
||||
EventLogController eventLogController = new EventLogController(owner, mainController);
|
||||
EventLogController eventLogController = new EventLogController(owner);
|
||||
|
||||
loader.setControllerFactory(type -> {
|
||||
if (type == MainDesignerController.class) {
|
||||
|
@ -31,7 +31,6 @@ import javafx.scene.control.cell.PropertyValueFactory;
|
||||
public class EventLogController implements Initializable {
|
||||
|
||||
private final DesignerRoot designerRoot;
|
||||
private final MainDesignerController parent;
|
||||
|
||||
@FXML
|
||||
private TableView<LogEntry> eventLogTableView;
|
||||
@ -45,9 +44,8 @@ public class EventLogController implements Initializable {
|
||||
private TextArea logDetailsTextArea;
|
||||
|
||||
|
||||
public EventLogController(DesignerRoot owner, MainDesignerController mainController) {
|
||||
public EventLogController(DesignerRoot owner) {
|
||||
this.designerRoot = owner;
|
||||
parent = mainController;
|
||||
}
|
||||
|
||||
|
||||
|
@ -66,6 +66,7 @@ import javafx.util.Duration;
|
||||
* @see XPathPanelController
|
||||
* @since 6.0.0
|
||||
*/
|
||||
@SuppressWarnings("PMD.UnusedPrivateField")
|
||||
public class MainDesignerController implements Initializable, SettingsOwner {
|
||||
|
||||
/**
|
||||
|
@ -39,9 +39,9 @@ import javafx.scene.control.TreeView;
|
||||
* @author Clément Fournier
|
||||
* @since 6.0.0
|
||||
*/
|
||||
@SuppressWarnings("PMD.UnusedPrivateField")
|
||||
public class NodeInfoPanelController implements Initializable {
|
||||
|
||||
private final DesignerRoot designerRoot;
|
||||
private final MainDesignerController parent;
|
||||
|
||||
@FXML
|
||||
@ -61,8 +61,7 @@ public class NodeInfoPanelController implements Initializable {
|
||||
private MetricEvaluator metricEvaluator = new MetricEvaluator();
|
||||
|
||||
|
||||
public NodeInfoPanelController(DesignerRoot root, MainDesignerController mainController) {
|
||||
this.designerRoot = root;
|
||||
public NodeInfoPanelController(MainDesignerController mainController) {
|
||||
parent = mainController;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user