private void openNullAnnotationsConfigurationDialog() { NullAnnotationsConfigurationDialog dialog= new NullAnnotationsConfigurationDialog(); int result= dialog.open(); if (result == Window.OK) { String[] annotationNames= dialog.getResult(); setValue(PREF_NULLABLE_ANNOTATION_NAME, annotationNames[0]); setValue(PREF_NONNULL_ANNOTATION_NAME, annotationNames[1]); setValue(PREF_NONNULL_BY_DEFAULT_ANNOTATION_NAME, annotationNames[2]); setValue(PREF_NULLABLE_ANNOTATION_SECONDARY_NAMES, annotationNames[3]); setValue(PREF_NONNULL_ANNOTATION_SECONDARY_NAMES, annotationNames[4]); setValue(PREF_NONNULL_BY_DEFAULT_ANNOTATION_SECONDARY_NAMES, annotationNames[5]); } updateNullAnnotationsSetting(); }
private void openNullAnnotationsConfigurationDialog() { NullAnnotationsConfigurationDialog dialog= new NullAnnotationsConfigurationDialog(); int result= dialog.open(); if (result == Window.OK) { String[] annotationNames= dialog.getResult(); setValue(PREF_NULLABLE_ANNOTATION_NAME, annotationNames[0]); setValue(PREF_NONNULL_ANNOTATION_NAME, annotationNames[1]); setValue(PREF_NONNULL_BY_DEFAULT_ANNOTATION_NAME, annotationNames[2]); setValue(PREF_NULLABLE_ANNOTATION_SECONDARY_NAMES, annotationNames[3]); setValue(PREF_NONNULL_ANNOTATION_SECONDARY_NAMES, annotationNames[4]); setValue(PREF_NONNULL_BY_DEFAULT_ANNOTATION_SECONDARY_NAMES, annotationNames[5]); } updateNullAnnotationsSetting(); }
public ProblemSeveritiesConfigurationBlock(IStatusChangeListener context, IProject project, IWorkbenchPreferenceContainer container) { super(context, project, getKeys(), container); // compatibilty code for the merge of the two option PB_SIGNAL_PARAMETER: if (ENABLED.equals(getValue(PREF_PB_SIGNAL_PARAMETER_IN_ABSTRACT))) { setValue(PREF_PB_SIGNAL_PARAMETER_IN_OVERRIDING, ENABLED); } }
public ProblemSeveritiesConfigurationBlock(IStatusChangeListener context, IProject project, IWorkbenchPreferenceContainer container) { super(context, project, getKeys(), container); // Compatibility code for the merge of the two option PB_SIGNAL_PARAMETER: if (ENABLED.equals(getValue(PREF_PB_SIGNAL_PARAMETER_IN_ABSTRACT))) { setValue(PREF_PB_SIGNAL_PARAMETER_IN_OVERRIDING, ENABLED); } }
public ProblemSeveritiesConfigurationBlock(IStatusChangeListener context, IProject project, IWorkbenchPreferenceContainer container) { super(context, project, getKeys(), container); // Compatibility code for the merge of the two option PB_SIGNAL_PARAMETER: if (ENABLED.equals(getValue(PREF_PB_SIGNAL_PARAMETER_IN_ABSTRACT))) { setValue(PREF_PB_SIGNAL_PARAMETER_IN_OVERRIDING, ENABLED); } }
protected void validateSettings(Key changedKey, String oldValue, String newValue) { if (!areSettingsEnabled()) { return; } if (changedKey != null) { if (PREF_PB_UNUSED_PARAMETER.equals(changedKey) || PREF_PB_DEPRECATION.equals(changedKey) || PREF_PB_LOCAL_VARIABLE_HIDING.equals(changedKey) || PREF_PB_UNUSED_DECLARED_THROWN_EXCEPTION.equals(changedKey)) { updateEnableStates(); } else if (PREF_PB_SIGNAL_PARAMETER_IN_OVERRIDING.equals(changedKey)) { // merging the two options setValue(PREF_PB_SIGNAL_PARAMETER_IN_ABSTRACT, newValue); } else { return; } } else { updateEnableStates(); } fContext.statusChanged(new StatusInfo()); }
private void updateNullAnnotationsSetting() { String[] annotationNames= { getValue(PREF_NULLABLE_ANNOTATION_NAME), getValue(PREF_NONNULL_ANNOTATION_NAME), getValue(PREF_NONNULL_BY_DEFAULT_ANNOTATION_NAME) }; String defaultNullAnnotationsValue= Arrays.equals(annotationNames, NULL_ANNOTATIONS_DEFAULTS) ? ENABLED : DISABLED; setValue(INTR_DEFAULT_NULL_ANNOTATIONS, defaultNullAnnotationsValue); updateCheckBox(getCheckBox(INTR_DEFAULT_NULL_ANNOTATIONS)); }
private void updateNullAnnotationsSetting() { String[] annotationNames= { getValue(PREF_NULLABLE_ANNOTATION_NAME), getValue(PREF_NONNULL_ANNOTATION_NAME), getValue(PREF_NONNULL_BY_DEFAULT_ANNOTATION_NAME) }; String defaultNullAnnotationsValue= Arrays.equals(annotationNames, NULL_ANNOTATIONS_DEFAULTS) ? ENABLED : DISABLED; setValue(INTR_DEFAULT_NULL_ANNOTATIONS, defaultNullAnnotationsValue); updateCheckBox(getCheckBox(INTR_DEFAULT_NULL_ANNOTATIONS)); }
if (messageDialog.open() == 0) { if (badNullRef) { setValue(PREF_PB_NULL_REFERENCE, getValue(PREF_PB_NULL_SPECIFICATION_VIOLATION)); updateCombo(getComboBox(PREF_PB_NULL_REFERENCE)); setValue(PREF_PB_POTENTIAL_NULL_REFERENCE, getValue(PREF_PB_POTENTIAL_NULL_ANNOTATION_INFERENCE_CONFLICT)); updateCombo(getComboBox(PREF_PB_POTENTIAL_NULL_REFERENCE)); setValue(PREF_PB_SIGNAL_PARAMETER_IN_ABSTRACT, newValue); setValue(PREF_NULLABLE_ANNOTATION_NAME, NULL_ANNOTATIONS_DEFAULTS[0]); setValue(PREF_NONNULL_ANNOTATION_NAME, NULL_ANNOTATIONS_DEFAULTS[1]); setValue(PREF_NONNULL_BY_DEFAULT_ANNOTATION_NAME, NULL_ANNOTATIONS_DEFAULTS[2]); } else { openNullAnnotationsConfigurationDialog();
if (messageDialog.open() == 0) { if (badNullRef) { setValue(PREF_PB_NULL_REFERENCE, getValue(PREF_PB_NULL_SPECIFICATION_VIOLATION)); updateCombo(getComboBox(PREF_PB_NULL_REFERENCE)); setValue(PREF_PB_POTENTIAL_NULL_REFERENCE, getValue(PREF_PB_POTENTIAL_NULL_ANNOTATION_INFERENCE_CONFLICT)); updateCombo(getComboBox(PREF_PB_POTENTIAL_NULL_REFERENCE)); setValue(PREF_PB_SIGNAL_PARAMETER_IN_ABSTRACT, newValue); setValue(PREF_NULLABLE_ANNOTATION_NAME, NULL_ANNOTATIONS_DEFAULTS[0]); setValue(PREF_NONNULL_ANNOTATION_NAME, NULL_ANNOTATIONS_DEFAULTS[1]); setValue(PREF_NONNULL_BY_DEFAULT_ANNOTATION_NAME, NULL_ANNOTATIONS_DEFAULTS[2]); } else { openNullAnnotationsConfigurationDialog();