public void apply() throws ConfigurationException { final WebEditorOptions xmlEditorOptions = WebEditorOptions.getInstance(); xmlEditorOptions.setAutomaticallyInsertClosingTag( myAutomaticallyInsertClosingTagCheckBox.isSelected()); xmlEditorOptions.setAutomaticallyInsertRequiredAttributes( myAutomaticallyInsertRequiredAttributesCheckBox.isSelected()); xmlEditorOptions.setAutomaticallyInsertRequiredSubTags( myAutomaticallyInsertRequiredSubTagsCheckBox.isSelected()); xmlEditorOptions.setAutomaticallyStartAttribute( myAutomaticallyStartAttributeAfterCheckBox.isSelected()); }
public void reset() { final WebEditorOptions xmlEditorOptions = WebEditorOptions.getInstance(); myAutomaticallyInsertClosingTagCheckBox.setSelected( xmlEditorOptions.isAutomaticallyInsertClosingTag()); myAutomaticallyInsertRequiredAttributesCheckBox.setSelected( xmlEditorOptions.isAutomaticallyInsertRequiredAttributes()); myAutomaticallyInsertRequiredSubTagsCheckBox.setSelected( xmlEditorOptions.isAutomaticallyInsertRequiredSubTags()); myAutomaticallyStartAttributeAfterCheckBox.setSelected( xmlEditorOptions.isAutomaticallyStartAttribute()); }
public boolean isModified() { final WebEditorOptions xmlEditorOptions = WebEditorOptions.getInstance(); return xmlEditorOptions.isAutomaticallyInsertClosingTag() != myAutomaticallyInsertClosingTagCheckBox.isSelected() || xmlEditorOptions.isAutomaticallyInsertRequiredAttributes() != myAutomaticallyInsertRequiredAttributesCheckBox.isSelected() || xmlEditorOptions.isAutomaticallyStartAttribute() != myAutomaticallyStartAttributeAfterCheckBox.isSelected() || xmlEditorOptions.isAutomaticallyInsertRequiredSubTags() != myAutomaticallyInsertRequiredSubTagsCheckBox.isSelected(); }