use of com.kalessil.phpStorm.phpInspectionsEA.settings.ComparisonStyle in project phpinspectionsea by kalessil.
the class EAApplicationConfiguration method createComponent.
@Nullable
@Override
public JComponent createComponent() {
final EASettings settings = EASettings.getInstance();
SEND_CRASH_REPORTS = settings.getSendCrashReports();
final ComparisonStyle comparisonStyle = settings.getComparisonStyle();
COMPARISON_STYLE_REGULAR = comparisonStyle == ComparisonStyle.REGULAR;
COMPARISON_STYLE_YODA = comparisonStyle == ComparisonStyle.YODA;
return OptionsComponent.create(component -> {
component.addPanel("Anonymous data collect", panelComponent -> panelComponent.addCheckbox("Automatically collect crash-reports", SEND_CRASH_REPORTS, (isSelected) -> SEND_CRASH_REPORTS = isSelected));
/* comparison style */
component.addPanel("Comparison code style", panelComponent -> panelComponent.delegateRadioCreation(radioComponent -> {
radioComponent.addOption("Regular comparison style", COMPARISON_STYLE_REGULAR, (isSelected) -> COMPARISON_STYLE_REGULAR = isSelected);
radioComponent.addOption("Yoda comparison style", COMPARISON_STYLE_YODA, (isSelected) -> COMPARISON_STYLE_YODA = isSelected);
}));
});
}
use of com.kalessil.phpStorm.phpInspectionsEA.settings.ComparisonStyle in project phpinspectionsea by kalessil.
the class EAApplicationConfiguration method isModified.
@Override
public boolean isModified() {
final EASettings settings = EASettings.getInstance();
final ComparisonStyle comparisonStyle = settings.getComparisonStyle();
return SEND_CRASH_REPORTS != settings.getSendCrashReports() || COMPARISON_STYLE_YODA != (comparisonStyle == ComparisonStyle.YODA);
}
Aggregations