Search in sources :

Example 1 with StructuredCleanupPreferences

use of org.eclipse.wst.sse.core.internal.cleanup.StructuredCleanupPreferences in project webtools.sourceediting by eclipse.

the class HTMLCleanupProcessorImpl method getCleanupPreferences.

public IStructuredCleanupPreferences getCleanupPreferences() {
    if (fCleanupPreferences == null) {
        fCleanupPreferences = new StructuredCleanupPreferences();
        Preferences preferences = getModelPreferences();
        if (preferences != null) {
            fCleanupPreferences.setTagNameCase(preferences.getInt(HTMLCorePreferenceNames.CLEANUP_TAG_NAME_CASE));
            fCleanupPreferences.setAttrNameCase(preferences.getInt(HTMLCorePreferenceNames.CLEANUP_ATTR_NAME_CASE));
            fCleanupPreferences.setCompressEmptyElementTags(preferences.getBoolean(HTMLCorePreferenceNames.COMPRESS_EMPTY_ELEMENT_TAGS));
            fCleanupPreferences.setInsertRequiredAttrs(preferences.getBoolean(HTMLCorePreferenceNames.INSERT_REQUIRED_ATTRS));
            fCleanupPreferences.setInsertMissingTags(preferences.getBoolean(HTMLCorePreferenceNames.INSERT_MISSING_TAGS));
            fCleanupPreferences.setQuoteAttrValues(preferences.getBoolean(HTMLCorePreferenceNames.QUOTE_ATTR_VALUES));
            fCleanupPreferences.setFormatSource(preferences.getBoolean(HTMLCorePreferenceNames.FORMAT_SOURCE));
            fCleanupPreferences.setConvertEOLCodes(preferences.getBoolean(HTMLCorePreferenceNames.CONVERT_EOL_CODES));
            fCleanupPreferences.setEOLCode(preferences.getString(HTMLCorePreferenceNames.CLEANUP_EOL_CODE));
        }
    }
    return fCleanupPreferences;
}
Also used : IStructuredCleanupPreferences(org.eclipse.wst.sse.core.internal.cleanup.IStructuredCleanupPreferences) StructuredCleanupPreferences(org.eclipse.wst.sse.core.internal.cleanup.StructuredCleanupPreferences) Preferences(org.eclipse.core.runtime.Preferences) IStructuredCleanupPreferences(org.eclipse.wst.sse.core.internal.cleanup.IStructuredCleanupPreferences) StructuredCleanupPreferences(org.eclipse.wst.sse.core.internal.cleanup.StructuredCleanupPreferences)

Example 2 with StructuredCleanupPreferences

use of org.eclipse.wst.sse.core.internal.cleanup.StructuredCleanupPreferences in project webtools.sourceediting by eclipse.

the class CleanupProcessorXML method getCleanupPreferences.

public IStructuredCleanupPreferences getCleanupPreferences() {
    if (fCleanupPreferences == null) {
        fCleanupPreferences = new StructuredCleanupPreferences();
        Preferences preferences = getModelPreferences();
        if (preferences != null) {
            fCleanupPreferences.setCompressEmptyElementTags(preferences.getBoolean(XMLCorePreferenceNames.COMPRESS_EMPTY_ELEMENT_TAGS));
            fCleanupPreferences.setInsertRequiredAttrs(preferences.getBoolean(XMLCorePreferenceNames.INSERT_REQUIRED_ATTRS));
            fCleanupPreferences.setInsertMissingTags(preferences.getBoolean(XMLCorePreferenceNames.INSERT_MISSING_TAGS));
            fCleanupPreferences.setQuoteAttrValues(preferences.getBoolean(XMLCorePreferenceNames.QUOTE_ATTR_VALUES));
            fCleanupPreferences.setFormatSource(preferences.getBoolean(XMLCorePreferenceNames.FORMAT_SOURCE));
            fCleanupPreferences.setConvertEOLCodes(preferences.getBoolean(XMLCorePreferenceNames.CONVERT_EOL_CODES));
            fCleanupPreferences.setEOLCode(preferences.getString(XMLCorePreferenceNames.CLEANUP_EOL_CODE));
        }
    }
    return fCleanupPreferences;
}
Also used : IStructuredCleanupPreferences(org.eclipse.wst.sse.core.internal.cleanup.IStructuredCleanupPreferences) StructuredCleanupPreferences(org.eclipse.wst.sse.core.internal.cleanup.StructuredCleanupPreferences) Preferences(org.eclipse.core.runtime.Preferences) IStructuredCleanupPreferences(org.eclipse.wst.sse.core.internal.cleanup.IStructuredCleanupPreferences) StructuredCleanupPreferences(org.eclipse.wst.sse.core.internal.cleanup.StructuredCleanupPreferences)

Example 3 with StructuredCleanupPreferences

use of org.eclipse.wst.sse.core.internal.cleanup.StructuredCleanupPreferences in project webtools.sourceediting by eclipse.

the class NodeCleanupHandler method getCleanupPreferences.

public IStructuredCleanupPreferences getCleanupPreferences() {
    if (fCleanupPreferences == null) {
        fCleanupPreferences = new StructuredCleanupPreferences();
        Preferences preferences = getModelPreferences();
        if (preferences != null) {
            fCleanupPreferences.setCompressEmptyElementTags(preferences.getBoolean(XMLCorePreferenceNames.COMPRESS_EMPTY_ELEMENT_TAGS));
            fCleanupPreferences.setInsertRequiredAttrs(preferences.getBoolean(XMLCorePreferenceNames.INSERT_REQUIRED_ATTRS));
            fCleanupPreferences.setInsertMissingTags(preferences.getBoolean(XMLCorePreferenceNames.INSERT_MISSING_TAGS));
            fCleanupPreferences.setQuoteAttrValues(preferences.getBoolean(XMLCorePreferenceNames.QUOTE_ATTR_VALUES));
            fCleanupPreferences.setFormatSource(preferences.getBoolean(XMLCorePreferenceNames.FORMAT_SOURCE));
            fCleanupPreferences.setConvertEOLCodes(preferences.getBoolean(XMLCorePreferenceNames.CONVERT_EOL_CODES));
            fCleanupPreferences.setEOLCode(preferences.getString(XMLCorePreferenceNames.CLEANUP_EOL_CODE));
        }
    }
    return fCleanupPreferences;
}
Also used : IStructuredCleanupPreferences(org.eclipse.wst.sse.core.internal.cleanup.IStructuredCleanupPreferences) StructuredCleanupPreferences(org.eclipse.wst.sse.core.internal.cleanup.StructuredCleanupPreferences) Preferences(org.eclipse.core.runtime.Preferences) IStructuredCleanupPreferences(org.eclipse.wst.sse.core.internal.cleanup.IStructuredCleanupPreferences) StructuredCleanupPreferences(org.eclipse.wst.sse.core.internal.cleanup.StructuredCleanupPreferences)

Example 4 with StructuredCleanupPreferences

use of org.eclipse.wst.sse.core.internal.cleanup.StructuredCleanupPreferences in project webtools.sourceediting by eclipse.

the class AbstractNodeCleanupHandler method getCleanupPreferences.

public IStructuredCleanupPreferences getCleanupPreferences() {
    if (fCleanupPreferences == null) {
        fCleanupPreferences = new StructuredCleanupPreferences();
        Preferences preferences = getModelPreferences();
        if (preferences != null) {
            fCleanupPreferences.setTagNameCase(preferences.getInt(HTMLCorePreferenceNames.CLEANUP_TAG_NAME_CASE));
            fCleanupPreferences.setAttrNameCase(preferences.getInt(HTMLCorePreferenceNames.CLEANUP_ATTR_NAME_CASE));
            fCleanupPreferences.setCompressEmptyElementTags(preferences.getBoolean(HTMLCorePreferenceNames.COMPRESS_EMPTY_ELEMENT_TAGS));
            fCleanupPreferences.setInsertRequiredAttrs(preferences.getBoolean(HTMLCorePreferenceNames.INSERT_REQUIRED_ATTRS));
            fCleanupPreferences.setInsertMissingTags(preferences.getBoolean(HTMLCorePreferenceNames.INSERT_MISSING_TAGS));
            fCleanupPreferences.setQuoteAttrValues(preferences.getBoolean(HTMLCorePreferenceNames.QUOTE_ATTR_VALUES));
            fCleanupPreferences.setFormatSource(preferences.getBoolean(HTMLCorePreferenceNames.FORMAT_SOURCE));
            fCleanupPreferences.setConvertEOLCodes(preferences.getBoolean(HTMLCorePreferenceNames.CONVERT_EOL_CODES));
            fCleanupPreferences.setEOLCode(preferences.getString(HTMLCorePreferenceNames.CLEANUP_EOL_CODE));
        }
    }
    return fCleanupPreferences;
}
Also used : IStructuredCleanupPreferences(org.eclipse.wst.sse.core.internal.cleanup.IStructuredCleanupPreferences) StructuredCleanupPreferences(org.eclipse.wst.sse.core.internal.cleanup.StructuredCleanupPreferences) Preferences(org.eclipse.core.runtime.Preferences) IStructuredCleanupPreferences(org.eclipse.wst.sse.core.internal.cleanup.IStructuredCleanupPreferences) StructuredCleanupPreferences(org.eclipse.wst.sse.core.internal.cleanup.StructuredCleanupPreferences)

Aggregations

Preferences (org.eclipse.core.runtime.Preferences)4 IStructuredCleanupPreferences (org.eclipse.wst.sse.core.internal.cleanup.IStructuredCleanupPreferences)4 StructuredCleanupPreferences (org.eclipse.wst.sse.core.internal.cleanup.StructuredCleanupPreferences)4