1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-23 22:52:11 +02:00

Minor code cleanup.

This commit is contained in:
Sergey Prigogin 2014-03-03 15:35:52 -08:00
parent f36a34d6a5
commit 68b2dd67dc

View file

@ -46,7 +46,7 @@ import org.eclipse.cdt.internal.ui.preferences.PreferencesAccess;
* If no formatter is contributed, nothing is shown. * If no formatter is contributed, nothing is shown.
*/ */
public class CustomCodeFormatterBlock extends Observable { public class CustomCodeFormatterBlock extends Observable {
private HashMap<String, String> idMap = new HashMap<String, String>(); private final Map<String, String> idMap = new HashMap<>();
private IEclipsePreferences fPrefs; private IEclipsePreferences fPrefs;
private String fDefaultFormatterId; private String fDefaultFormatterId;
private Combo fFormatterCombo; private Combo fFormatterCombo;
@ -187,7 +187,7 @@ public class CustomCodeFormatterBlock extends Observable {
} }
private void initializeFormatters() { private void initializeFormatters() {
idMap = new HashMap<>(); idMap.clear();
idMap.put(DEFAULT, CCorePreferenceConstants.DEFAULT_CODE_FORMATTER); idMap.put(DEFAULT, CCorePreferenceConstants.DEFAULT_CODE_FORMATTER);
IExtensionPoint point = Platform.getExtensionRegistry().getExtensionPoint(CCorePlugin.PLUGIN_ID, CCorePlugin.FORMATTER_EXTPOINT_ID); IExtensionPoint point = Platform.getExtensionRegistry().getExtensionPoint(CCorePlugin.PLUGIN_ID, CCorePlugin.FORMATTER_EXTPOINT_ID);
if (point != null) { if (point != null) {