Checkstyle

This commit is contained in:
Clément Fournier
2019-01-29 01:15:09 +01:00
parent e377a17265
commit e47f942c80
7 changed files with 23 additions and 19 deletions

View File

@ -51,14 +51,15 @@ public class EventLogger implements ApplicationComponent {
public EventLogger(DesignerRoot designerRoot) {
this.designerRoot = designerRoot; // we have to be careful with initialization order here
EventStream<LogEntryWithData<NodeSelectionEvent>> eventTraces =
// none of this is done if developer mode isn't enabled because then those events aren't even pushed in the first place
reduceEntangledIfPossible(filterOnCategory(latestEvent, false, SELECTION_EVENT_TRACING).map(t -> (LogEntryWithData<NodeSelectionEvent>) t),
// the user data for those is the event
// if they're the same event we reduce them together
(lastEv, newEv) -> Objects.equals(lastEv.getUserData(), newEv.getUserData()),
LogEntryWithData::reduceEventTrace,
EVENT_TRACING_REDUCTION_DELAY);
// none of this is done if developer mode isn't enabled because then those events aren't even pushed in the first place
EventStream<LogEntryWithData<NodeSelectionEvent>> eventTraces = reduceEntangledIfPossible(
filterOnCategory(latestEvent, false, SELECTION_EVENT_TRACING).map(t -> (LogEntryWithData<NodeSelectionEvent>) t),
// the user data for those is the event
// if they're the same event we reduce them together
(lastEv, newEv) -> Objects.equals(lastEv.getUserData(), newEv.getUserData()),
LogEntryWithData::reduceEventTrace,
EVENT_TRACING_REDUCTION_DELAY
);
EventStream<LogEntry> onlyParseException = deleteOnSignal(latestEvent, PARSE_EXCEPTION, PARSE_OK);
EventStream<LogEntry> onlyXPathException = deleteOnSignal(latestEvent, XPATH_EVALUATION_EXCEPTION, XPATH_OK);
@ -86,9 +87,11 @@ public class EventLogger implements ApplicationComponent {
private static EventStream<LogEntry> deleteOnSignal(EventStream<LogEntry> input, Category normal, Category deleteSignal) {
return DesignerUtil.deleteOnSignal(filterOnCategory(input, false, normal, deleteSignal),
x -> x.getCategory() == deleteSignal,
PARSE_EXCEPTION_REDUCTION_DELAY);
return DesignerUtil.deleteOnSignal(
filterOnCategory(input, false, normal, deleteSignal),
x -> x.getCategory() == deleteSignal,
PARSE_EXCEPTION_REDUCTION_DELAY
);
}

View File

@ -111,8 +111,8 @@ public interface NodeSelectionSource extends ApplicationComponent {
return false;
}
NodeSelectionEvent that = (NodeSelectionEvent) o;
return Objects.equals(selection, that.selection) &&
Objects.equals(origin, that.origin);
return Objects.equals(selection, that.selection)
&& Objects.equals(origin, that.origin);
}

View File

@ -3,6 +3,7 @@
*/
/**
* Interfaces and base classes that structure an support the whole app.
* Interfaces and base classes that structure and support the whole app.
* See {@link net.sourceforge.pmd.util.fxdesigner.app.ApplicationComponent}.
*/
package net.sourceforge.pmd.util.fxdesigner.app;
package net.sourceforge.pmd.util.fxdesigner.app;

View File

@ -16,9 +16,9 @@ import net.sourceforge.pmd.lang.LanguageVersionHandler;
import net.sourceforge.pmd.lang.Parser;
import net.sourceforge.pmd.lang.ast.Node;
import net.sourceforge.pmd.util.fxdesigner.SourceEditorController;
import net.sourceforge.pmd.util.fxdesigner.app.ApplicationComponent;
import net.sourceforge.pmd.util.fxdesigner.app.DesignerRoot;
import net.sourceforge.pmd.util.fxdesigner.app.LogEntry.Category;
import net.sourceforge.pmd.util.fxdesigner.app.ApplicationComponent;
/**

View File

@ -21,8 +21,8 @@ import org.reactfx.value.Var;
import net.sourceforge.pmd.properties.PropertyTypeId;
import net.sourceforge.pmd.properties.ValueParser;
import net.sourceforge.pmd.properties.ValueParserConstants;
import net.sourceforge.pmd.util.fxdesigner.util.DesignerUtil;
import net.sourceforge.pmd.util.fxdesigner.model.PropertyDescriptorSpec;
import net.sourceforge.pmd.util.fxdesigner.util.DesignerUtil;
import net.sourceforge.pmd.util.fxdesigner.util.controls.PropertyTableView;
import javafx.application.Platform;

View File

@ -20,10 +20,10 @@ import org.reactfx.value.Var;
import net.sourceforge.pmd.lang.ast.Node;
import net.sourceforge.pmd.util.fxdesigner.MainDesignerController;
import net.sourceforge.pmd.util.fxdesigner.app.AbstractController;
import net.sourceforge.pmd.util.fxdesigner.app.EventLogger;
import net.sourceforge.pmd.util.fxdesigner.app.LogEntry;
import net.sourceforge.pmd.util.fxdesigner.app.LogEntry.Category;
import net.sourceforge.pmd.util.fxdesigner.app.AbstractController;
import net.sourceforge.pmd.util.fxdesigner.util.DesignerUtil;
import javafx.beans.property.SimpleObjectProperty;

View File

@ -11,9 +11,9 @@ import java.util.function.Consumer;
import org.reactfx.value.Var;
import net.sourceforge.pmd.properties.PropertyTypeId;
import net.sourceforge.pmd.util.fxdesigner.model.PropertyDescriptorSpec;
import net.sourceforge.pmd.util.fxdesigner.popups.EditPropertyDialogController;
import net.sourceforge.pmd.util.fxdesigner.util.DesignerUtil;
import net.sourceforge.pmd.util.fxdesigner.model.PropertyDescriptorSpec;
import net.sourceforge.pmd.util.fxdesigner.util.SoftReferenceCache;
import javafx.application.Platform;