use of com.intellij.codeInsight.template.emmet.filters.ZenCodingFilter in project intellij-community by JetBrains.
the class XmlEmmetConfigurable method reset.
@Override
public void reset() {
EmmetOptions emmetOptions = EmmetOptions.getInstance();
myEnableEmmetJBCheckBox.setSelected(emmetOptions.isEmmetEnabled());
myEnablePreviewJBCheckBox.setEnabled(emmetOptions.isEmmetEnabled());
myEnablePreviewJBCheckBox.setSelected(emmetOptions.isPreviewEnabled());
myEnableHrefAutodetectJBCheckBox.setEnabled(emmetOptions.isEmmetEnabled());
myEnableHrefAutodetectJBCheckBox.setSelected(emmetOptions.isHrefAutoDetectEnabled());
myAddEditPointAtTheEndOfTemplateJBCheckBox.setEnabled(emmetOptions.isEmmetEnabled());
myAddEditPointAtTheEndOfTemplateJBCheckBox.setSelected(emmetOptions.isAddEditPointAtTheEndOfTemplate());
myBemElementSeparatorTextField.setText(emmetOptions.getBemElementSeparator());
myBemModifierSeparatorTextField.setText(emmetOptions.getBemModifierSeparator());
myBemShortElementPrefixTextField.setText(emmetOptions.getBemShortElementPrefix());
Set<String> enabledByDefault = emmetOptions.getFiltersEnabledByDefault();
for (ZenCodingFilter filter : ZenCodingFilter.getInstances()) {
final String filterSuffix = filter.getSuffix();
final JBCheckBox checkBox = myFilterCheckboxes.get(filterSuffix);
if (checkBox != null) {
checkBox.setEnabled(emmetOptions.isEmmetEnabled());
checkBox.setSelected(enabledByDefault.contains(filterSuffix));
}
}
}
Aggregations