diff options
author | tle | 2012-03-07 23:05:58 +0000 |
---|---|---|
committer | tle | 2012-03-07 23:05:58 +0000 |
commit | c8c36f62d141efa442ea23f73e124d457935c462 (patch) | |
tree | 56747bf2760401d12f6e6bf8c6271f0acdb68fe4 /jpa | |
parent | 64c7b4623561e79c4713bcfde0da760b1ac896c9 (diff) | |
download | webtools.dali-c8c36f62d141efa442ea23f73e124d457935c462.tar.gz webtools.dali-c8c36f62d141efa442ea23f73e124d457935c462.tar.xz webtools.dali-c8c36f62d141efa442ea23f73e124d457935c462.zip |
Refactored JPQL Identifiers preferences support
Diffstat (limited to 'jpa')
8 files changed, 183 insertions, 90 deletions
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/prefs/JpaPreferencesManager.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/prefs/JpaPreferencesManager.java index ac94091ba0..e1748049e8 100644 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/prefs/JpaPreferencesManager.java +++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/prefs/JpaPreferencesManager.java @@ -155,6 +155,22 @@ public class JpaPreferencesManager } flush(wkspPrefs); } + + protected static boolean getWorkspacePreference(String key, boolean defaultBooleanValue) { + return getWorkspacePreferences().getBoolean(key, defaultBooleanValue); + } + + public static void setWorkspacePreference(String key, boolean booleanValue) { + IEclipsePreferences wkspPrefs = getWorkspacePreferences(); + wkspPrefs.putBoolean(key, booleanValue); + flush(wkspPrefs); + } + + public static void removeWorkspacePreference(String key) { + IEclipsePreferences wkspPrefs = getWorkspacePreferences(); + wkspPrefs.remove(key); + flush(wkspPrefs); + } // ********** private static methods ********** @@ -291,12 +307,13 @@ public class JpaPreferencesManager protected void setProjectPreference(String key, boolean booleanValue) { IEclipsePreferences projectPrefs = this.getProjectPreferences(); - if( ! booleanValue) { - projectPrefs.remove(key); - } - else { - projectPrefs.putBoolean(key, booleanValue); - } + projectPrefs.putBoolean(key, booleanValue); + flush(projectPrefs); + } + + protected void removeProjectPreference(String key) { + IEclipsePreferences projectPrefs = this.getProjectPreferences(); + projectPrefs.remove(key); flush(projectPrefs); } diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/prefs/JpaEntityGenPreferencesManager.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/prefs/JpaEntityGenPreferencesManager.java index b05ca5b451..1bf0ee7d53 100644 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/prefs/JpaEntityGenPreferencesManager.java +++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/prefs/JpaEntityGenPreferencesManager.java @@ -32,7 +32,12 @@ public class JpaEntityGenPreferencesManager extends JpaPreferencesManager } public static void setDefaultPackageWorkspacePreference(String value) { - setWorkspacePreference(appendPrefix(DEFAULT_PACKAGE), value); + if(StringTools.stringsAreEqual(value, getDefaultDefaultPackage())) { + removeWorkspacePreference(appendPrefix(DEFAULT_PACKAGE)); + } + else { + setWorkspacePreference(appendPrefix(DEFAULT_PACKAGE), value); + } } public static String getDefaultDefaultPackage() { @@ -65,7 +70,7 @@ public class JpaEntityGenPreferencesManager extends JpaPreferencesManager } public void removeDefaultPackagePreference() { - this.setProjectPreference(appendPrefix(DEFAULT_PACKAGE), null); + this.removeProjectPreference(appendPrefix(DEFAULT_PACKAGE)); } } diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/prefs/JpaJpqlPreferencesManager.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/prefs/JpaJpqlPreferencesManager.java new file mode 100644 index 0000000000..1b5104b3f0 --- /dev/null +++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/prefs/JpaJpqlPreferencesManager.java @@ -0,0 +1,78 @@ +/******************************************************************************* +* Copyright (c) 2012 Oracle. All rights reserved. +* This program and the accompanying materials are made available under the +* terms of the Eclipse Public License v1.0, which accompanies this distribution +* and is available at http://www.eclipse.org/legal/epl-v10.html. +* +* Contributors: +* Oracle - initial API and implementation +*******************************************************************************/ +package org.eclipse.jpt.jpa.core.prefs; + +import org.eclipse.core.resources.IProject; +import org.eclipse.jpt.common.utility.internal.StringTools; +import org.eclipse.jpt.jpa.core.internal.prefs.JpaPreferencesManager; +/** + * JpaEntityGenPreferencesManager + */ +public class JpaJpqlPreferencesManager extends JpaPreferencesManager +{ + // ********** public constants ********** + + private static final String JPQL_IDENTIFIER_PREFIX = "jpqlIdentifier."; + public static final String JPQL_IDENTIFIER_LOWERCASE_PREF_VALUE = "lowercase"; //$NON-NLS-1$ + public static final String JPQL_IDENTIFIER_UPPERCASE_PREF_VALUE = "uppercase"; //$NON-NLS-1$ + + public static final String CASE = "CASE"; //$NON-NLS-1$ + public static final String DEFAULT_CASE = JPQL_IDENTIFIER_LOWERCASE_PREF_VALUE; //$NON-NLS-1$ + + public static final String MATCH_FIRST_CHARACTER_CASE = "MATCH_FIRST_CHARACTER_CASE"; //$NON-NLS-1$ + public static final boolean DEFAULT_MATCH_FIRST_CHARACTER_CASE = true; //$NON-NLS-1$ + + // ********** workspace preference ********** + + public static String getIdentifiersCaseWorkspacePreference() { + return getWorkspacePreference(appendPrefix(CASE), getDefaultIdentifiersCase()); + } + + public static void setIdentifiersCaseWorkspacePreference(String value) { + if(StringTools.stringsAreEqual(value, getDefaultIdentifiersCase())) { + removeWorkspacePreference(appendPrefix(CASE)); + } + else { + setWorkspacePreference(appendPrefix(CASE), value); + } + } + + public static String getDefaultIdentifiersCase() { + return DEFAULT_CASE; + } + + public static boolean getMatchFirstCharacterCaseWorkspacePreference() { + return getWorkspacePreference(appendPrefix(MATCH_FIRST_CHARACTER_CASE), getDefaultMatchFirstCharacterCase()); + } + + public static void setMatchFirstCharacterCaseWorkspacePreference(boolean value) { + if(value == getDefaultMatchFirstCharacterCase()) { + removeWorkspacePreference(appendPrefix(MATCH_FIRST_CHARACTER_CASE)); + } + else { + setWorkspacePreference(appendPrefix(MATCH_FIRST_CHARACTER_CASE), value); + } + } + + public static boolean getDefaultMatchFirstCharacterCase() { + return DEFAULT_MATCH_FIRST_CHARACTER_CASE; + } + + private static String appendPrefix(String prefId) { + return JPQL_IDENTIFIER_PREFIX + prefId; + } + + // ********** constructor ********** + + public JpaJpqlPreferencesManager(IProject project) { + super(project); + } + +} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.ui/plugin.xml b/jpa/plugins/org.eclipse.jpt.jpa.ui/plugin.xml index c00f7fd3a6..65eb7df0a7 100644 --- a/jpa/plugins/org.eclipse.jpt.jpa.ui/plugin.xml +++ b/jpa/plugins/org.eclipse.jpt.jpa.ui/plugin.xml @@ -1115,17 +1115,6 @@ </extension> - - <extension - point="org.eclipse.core.runtime.preferences" - id="org.eclipse.jpt.jpa.ui"> - - <initializer - class="org.eclipse.jpt.jpa.ui.internal.prefs.JpaUiPreferenceInitializer"> - </initializer> - - </extension> - <!-- ***** JPA project properties pages ***** --> diff --git a/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/JptJpaUiPlugin.java b/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/JptJpaUiPlugin.java index f70a5ad608..e3d955da9f 100644 --- a/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/JptJpaUiPlugin.java +++ b/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/JptJpaUiPlugin.java @@ -58,13 +58,17 @@ public class JptJpaUiPlugin // ********** Preference keys ********** - /** * The preference key used to retrieve the case used for JPQL identifiers. + * @deprecated - Use JpaJpqlPreferencesManager instead */ + @Deprecated public static final String JPQL_IDENTIFIER_CASE_PREF_KEY = PLUGIN_ID + ".jpqlIdentifier.case"; + @Deprecated public static final String JPQL_IDENTIFIER_LOWERCASE_PREF_VALUE = "lowercase"; + @Deprecated public static final String JPQL_IDENTIFIER_UPPERCASE_PREF_VALUE = "uppercase"; + @Deprecated public static final String JPQL_IDENTIFIER_MATCH_FIRST_CHARACTER_CASE_PREF_KEY = PLUGIN_ID + ".jpqlIdentifier.matchFirstCharacterCase"; diff --git a/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/jpql/JpqlCompletionProposalComputer.java b/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/jpql/JpqlCompletionProposalComputer.java index 5fc6cfb032..b9f18eb9c5 100644 --- a/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/jpql/JpqlCompletionProposalComputer.java +++ b/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/jpql/JpqlCompletionProposalComputer.java @@ -22,6 +22,7 @@ import org.eclipse.jface.resource.ImageRegistry; import org.eclipse.jpt.common.utility.internal.CollectionTools; import org.eclipse.jpt.jpa.core.context.NamedQuery; import org.eclipse.jpt.jpa.core.jpql.JpaJpqlQueryHelper; +import org.eclipse.jpt.jpa.core.prefs.JpaJpqlPreferencesManager; import org.eclipse.jpt.jpa.ui.JptJpaUiPlugin; import org.eclipse.jpt.jpa.ui.internal.JptUiIcons; import org.eclipse.persistence.jpa.jpql.ContentAssistProposals; @@ -429,12 +430,12 @@ abstract class JpqlCompletionProposalComputer<T> { } private boolean shouldMatchFirstCharacterCase() { - return JptJpaUiPlugin.instance().getPreferenceStore().getBoolean(JptJpaUiPlugin.JPQL_IDENTIFIER_MATCH_FIRST_CHARACTER_CASE_PREF_KEY); + return JpaJpqlPreferencesManager.getMatchFirstCharacterCaseWorkspacePreference(); } private boolean shouldUseLowercaseIdentifiers() { - String value = JptJpaUiPlugin.instance().getPreferenceStore().getString(JptJpaUiPlugin.JPQL_IDENTIFIER_CASE_PREF_KEY); - return JptJpaUiPlugin.JPQL_IDENTIFIER_LOWERCASE_PREF_VALUE.equals(value); + String value = JpaJpqlPreferencesManager.getIdentifiersCaseWorkspacePreference(); + return JpaJpqlPreferencesManager.JPQL_IDENTIFIER_LOWERCASE_PREF_VALUE.equals(value); } private <I extends Comparable<? super I>> Iterable<I> sort(Iterable<I> iterator) { diff --git a/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/prefs/JpaPreferencesPage.java b/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/prefs/JpaPreferencesPage.java index 467f358aea..d441aa41c6 100644 --- a/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/prefs/JpaPreferencesPage.java +++ b/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/prefs/JpaPreferencesPage.java @@ -11,9 +11,11 @@ package org.eclipse.jpt.jpa.ui.internal.prefs; import org.eclipse.jface.dialogs.Dialog; import org.eclipse.jface.dialogs.IDialogConstants; +import org.eclipse.jface.preference.IPreferenceStore; import org.eclipse.jface.preference.PreferencePage; import org.eclipse.jpt.common.utility.internal.StringTools; import org.eclipse.jpt.jpa.core.prefs.JpaEntityGenPreferencesManager; +import org.eclipse.jpt.jpa.core.prefs.JpaJpqlPreferencesManager; import org.eclipse.jpt.jpa.ui.JptJpaUiPlugin; import org.eclipse.jpt.jpa.ui.internal.JptUiMessages; import org.eclipse.swt.SWT; @@ -91,7 +93,12 @@ public class JpaPreferencesPage extends PreferencePage */ @Override protected void performDefaults() { + // entitygen prefs + String defaultPackage = JpaEntityGenPreferencesManager.getDefaultDefaultPackage(); + this.setDefaultPackage(defaultPackage); + JpaEntityGenPreferencesManager.setDefaultPackageWorkspacePreference(defaultPackage); + // jpql identifier prefs this.lowercase = this.isDefaultJpqlIdentifierLowercase(); this.matchFirstCharacterCase = this.shouldDefaultMatchFirstCharacterCase(); @@ -107,12 +114,12 @@ public class JpaPreferencesPage extends PreferencePage */ @Override public boolean performOk() { - + // entitygen prefs JpaEntityGenPreferencesManager.setDefaultPackageWorkspacePreference(this.getDefaultPackage()); - - //TODO use JpaPreferencesManager - this.getPreferenceStore().setValue(JptJpaUiPlugin.JPQL_IDENTIFIER_CASE_PREF_KEY, jpqlIdentifierPreferenceValue()); - this.getPreferenceStore().setValue(JptJpaUiPlugin.JPQL_IDENTIFIER_MATCH_FIRST_CHARACTER_CASE_PREF_KEY, matchFirstCharacterCase); + + // jpql identifier prefs + JpaJpqlPreferencesManager.setIdentifiersCaseWorkspacePreference(this.jpqlIdentifierPreferenceValue()); + JpaJpqlPreferencesManager.setMatchFirstCharacterCaseWorkspacePreference(this.matchFirstCharacterCase); return super.performOk(); } @@ -122,7 +129,8 @@ public class JpaPreferencesPage extends PreferencePage * {@inheritDoc} */ public void init(IWorkbench workbench) { - this.setPreferenceStore(JptJpaUiPlugin.instance().getPreferenceStore()); + this.migrateLegacyJpqlWorkspacePreferences(); + this.lowercase = this.shouldUseLowercaseIdentifiers(); this.matchFirstCharacterCase = this.shouldMatchFirstCharacterCase(); } @@ -157,24 +165,24 @@ public class JpaPreferencesPage extends PreferencePage description.setText(JptUiMessages.JpaPreferencesPage_jpqlEditor_description); // Uppercase radio button - lowerCaseRadioButton = new Button(group, SWT.RADIO); - lowerCaseRadioButton.setText(JptUiMessages.JpaPreferencesPage_jpqlEditor_lowerCaseRadioButton); - lowerCaseRadioButton.addSelectionListener(buildLowercaseSelectionListener()); - lowerCaseRadioButton.setSelection(lowercase); + this.lowerCaseRadioButton = new Button(group, SWT.RADIO); + this.lowerCaseRadioButton.setText(JptUiMessages.JpaPreferencesPage_jpqlEditor_lowerCaseRadioButton); + this.lowerCaseRadioButton.addSelectionListener(this.buildLowercaseSelectionListener()); + this.lowerCaseRadioButton.setSelection(this.lowercase); // Uppercase radio button - upperCaseRadioButton = new Button(group, SWT.RADIO); - upperCaseRadioButton.setText(JptUiMessages.JpaPreferencesPage_jpqlEditor_upperCaseRadioButton); - upperCaseRadioButton.addSelectionListener(buildUppercaseSelectionListener()); - upperCaseRadioButton.setSelection(!lowercase); + this.upperCaseRadioButton = new Button(group, SWT.RADIO); + this.upperCaseRadioButton.setText(JptUiMessages.JpaPreferencesPage_jpqlEditor_upperCaseRadioButton); + this.upperCaseRadioButton.addSelectionListener(this.buildUppercaseSelectionListener()); + this.upperCaseRadioButton.setSelection( ! this.lowercase); new Label(group, SWT.NONE); // Match Case of First Letter check box - matchFirstCharacterCaseCheckBox = new Button(group, SWT.CHECK); - matchFirstCharacterCaseCheckBox.setText(JptUiMessages.JpaPreferencesPage_jpqlEditor_matchFirstCharacterCaseRadioButton); - matchFirstCharacterCaseCheckBox.addSelectionListener(buildMatchFirstCharacterCaseSelectionListener()); - matchFirstCharacterCaseCheckBox.setSelection(matchFirstCharacterCase); + this.matchFirstCharacterCaseCheckBox = new Button(group, SWT.CHECK); + this.matchFirstCharacterCaseCheckBox.setText(JptUiMessages.JpaPreferencesPage_jpqlEditor_matchFirstCharacterCaseRadioButton); + this.matchFirstCharacterCaseCheckBox.addSelectionListener(buildMatchFirstCharacterCaseSelectionListener()); + this.matchFirstCharacterCaseCheckBox.setSelection(this.matchFirstCharacterCase); } private SelectionListener buildLowercaseSelectionListener() { @@ -208,25 +216,27 @@ public class JpaPreferencesPage extends PreferencePage } private boolean isDefaultJpqlIdentifierLowercase() { - String value = getPreferenceStore().getDefaultString(JptJpaUiPlugin.JPQL_IDENTIFIER_CASE_PREF_KEY); - return JptJpaUiPlugin.JPQL_IDENTIFIER_LOWERCASE_PREF_VALUE.equals(value); + String value = JpaJpqlPreferencesManager.getDefaultIdentifiersCase(); + return JpaJpqlPreferencesManager.JPQL_IDENTIFIER_LOWERCASE_PREF_VALUE.equals(value); } private String jpqlIdentifierPreferenceValue() { - return lowercase ? JptJpaUiPlugin.JPQL_IDENTIFIER_LOWERCASE_PREF_VALUE : JptJpaUiPlugin.JPQL_IDENTIFIER_UPPERCASE_PREF_VALUE; + return this.lowercase ? + JpaJpqlPreferencesManager.JPQL_IDENTIFIER_LOWERCASE_PREF_VALUE : + JpaJpqlPreferencesManager.JPQL_IDENTIFIER_UPPERCASE_PREF_VALUE; } private boolean shouldDefaultMatchFirstCharacterCase() { - return getPreferenceStore().getDefaultBoolean(JptJpaUiPlugin.JPQL_IDENTIFIER_MATCH_FIRST_CHARACTER_CASE_PREF_KEY); + return JpaJpqlPreferencesManager.getDefaultMatchFirstCharacterCase(); } private boolean shouldMatchFirstCharacterCase() { - return getPreferenceStore().getBoolean(JptJpaUiPlugin.JPQL_IDENTIFIER_MATCH_FIRST_CHARACTER_CASE_PREF_KEY); + return JpaJpqlPreferencesManager.getMatchFirstCharacterCaseWorkspacePreference(); } private boolean shouldUseLowercaseIdentifiers() { - String value = getPreferenceStore().getString(JptJpaUiPlugin.JPQL_IDENTIFIER_CASE_PREF_KEY); - return JptJpaUiPlugin.JPQL_IDENTIFIER_LOWERCASE_PREF_VALUE.equals(value); + String value = JpaJpqlPreferencesManager.getIdentifiersCaseWorkspacePreference(); + return JpaJpqlPreferencesManager.JPQL_IDENTIFIER_LOWERCASE_PREF_VALUE.equals(value); } private String getDefaultPackage() { @@ -238,6 +248,37 @@ public class JpaPreferencesPage extends PreferencePage this.defaultPackageText.getText(); } + private void setDefaultPackage(String defaultPackage) { + if(this.defaultPackageText == null) { + return; + } + this.defaultPackageText.setText(defaultPackage); + } + + private void migrateLegacyJpqlWorkspacePreferences() { + + IPreferenceStore preferences = JptJpaUiPlugin.instance().getPreferenceStore(); + + String legacyCase = preferences.getString(JptJpaUiPlugin.JPQL_IDENTIFIER_CASE_PREF_KEY); + boolean legacyMatchFirstCharacterCase = preferences.getBoolean(JptJpaUiPlugin.JPQL_IDENTIFIER_MATCH_FIRST_CHARACTER_CASE_PREF_KEY); + + if( ! StringTools.stringIsEmpty(legacyCase)) { // value is not empty when legacy preference exist + JpaJpqlPreferencesManager.setIdentifiersCaseWorkspacePreference(legacyCase); + } + if(legacyMatchFirstCharacterCase) { // value is true when legacy preference exist + JpaJpqlPreferencesManager.setMatchFirstCharacterCaseWorkspacePreference(legacyMatchFirstCharacterCase); + } + + this.removeLegacyJpqlPreferences(); + } + + private void removeLegacyJpqlPreferences() { + IPreferenceStore preferences = JptJpaUiPlugin.instance().getPreferenceStore(); + + preferences.setToDefault(JptJpaUiPlugin.JPQL_IDENTIFIER_CASE_PREF_KEY); + preferences.setToDefault(JptJpaUiPlugin.JPQL_IDENTIFIER_MATCH_FIRST_CHARACTER_CASE_PREF_KEY); + } + // ********** UI controls ********** private Text buildText(Composite parent, int horizontalSpan) { diff --git a/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/prefs/JpaUiPreferenceInitializer.java b/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/prefs/JpaUiPreferenceInitializer.java deleted file mode 100644 index 23cb2bfe00..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/prefs/JpaUiPreferenceInitializer.java +++ /dev/null @@ -1,42 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008, 2009 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.jpa.ui.internal.prefs; - -import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer; -import org.eclipse.jface.preference.IPreferenceStore; -import org.eclipse.jpt.jpa.ui.JptJpaUiPlugin; - -/** - * The initializer of the JPA UI preferences, which sets the default values. - * - * @version 3.0 - * @since 3.0 - * @author Pascal Filion - */ -public class JpaUiPreferenceInitializer extends AbstractPreferenceInitializer { - - /** - * Creates a new <code>JpaUiPreferenceInitializer</code>. - */ - public JpaUiPreferenceInitializer() { - super(); - } - - /** - * {@inheritDoc} - */ - @Override - public void initializeDefaultPreferences() { - - IPreferenceStore preferences = JptJpaUiPlugin.instance().getPreferenceStore(); - preferences.setDefault(JptJpaUiPlugin.JPQL_IDENTIFIER_CASE_PREF_KEY, JptJpaUiPlugin.JPQL_IDENTIFIER_LOWERCASE_PREF_VALUE); - preferences.setDefault(JptJpaUiPlugin.JPQL_IDENTIFIER_MATCH_FIRST_CHARACTER_CASE_PREF_KEY, true); - } -}
\ No newline at end of file |