diff options
author | bvosburgh | 2011-03-02 23:38:04 +0000 |
---|---|---|
committer | bvosburgh | 2011-03-02 23:38:04 +0000 |
commit | c33940b79c906fdb2f20a4ffa99e15f96039d719 (patch) | |
tree | 9a0901ed883578c08f088a78ed1218fc474919e8 /jpa/plugins | |
parent | de24ef1f7fb732f140326d9cb6cedb427d5877b6 (diff) | |
download | webtools.dali-c33940b79c906fdb2f20a4ffa99e15f96039d719.tar.gz webtools.dali-c33940b79c906fdb2f20a4ffa99e15f96039d719.tar.xz webtools.dali-c33940b79c906fdb2f20a4ffa99e15f96039d719.zip |
add ICUStringCollator
Diffstat (limited to 'jpa/plugins')
2 files changed, 6 insertions, 18 deletions
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/details/MappedByPane.java b/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/details/MappedByPane.java index e349e72384..913fb2dfa2 100644 --- a/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/details/MappedByPane.java +++ b/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/details/MappedByPane.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2007, 2010 Oracle. All rights reserved. + * Copyright (c) 2007, 2011 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. @@ -9,9 +9,8 @@ ******************************************************************************/ package org.eclipse.jpt.jpa.ui.internal.details; -import java.util.Comparator; import java.util.Iterator; - +import org.eclipse.jpt.common.core.internal.utility.ICUStringCollator; import org.eclipse.jpt.common.ui.internal.widgets.Pane; import org.eclipse.jpt.common.utility.internal.model.value.CollectionAspectAdapter; import org.eclipse.jpt.common.utility.internal.model.value.PropertyAspectAdapter; @@ -23,8 +22,6 @@ import org.eclipse.jpt.jpa.core.context.MappedByRelationshipStrategy; import org.eclipse.jpt.jpa.ui.internal.JpaHelpContextIds; import org.eclipse.swt.widgets.Composite; -import com.ibm.icu.text.Collator; - /** * Here the layout of this pane: * <pre> @@ -34,7 +31,6 @@ import com.ibm.icu.text.Collator; * | -------------------------------------------------------------- | * -----------------------------------------------------------------------------</pre> * - * @see NonOwningMapping * @see ManyToManyMappingComposite - A container of this pane * @see OneToManyMappingComposite - A container of this pane * @see OneToOneMappingComposite - A container of this pane @@ -79,11 +75,7 @@ public class MappedByPane return this.subject.candidateMappedByAttributeNames(); } }, - new Comparator<String>() { - public int compare(String string1, String string2){ - return Collator.getInstance().compare(string1, string2); - } - } + new ICUStringCollator() ); } diff --git a/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/properties/JpaProjectPropertiesPage.java b/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/properties/JpaProjectPropertiesPage.java index c6454aac56..201b8e1df5 100644 --- a/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/properties/JpaProjectPropertiesPage.java +++ b/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/properties/JpaProjectPropertiesPage.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2007, 2010 Oracle. All rights reserved. + * Copyright (c) 2007, 2011 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. @@ -23,6 +23,7 @@ import org.eclipse.jdt.core.IJavaElement; import org.eclipse.jdt.core.IJavaElementDelta; import org.eclipse.jdt.core.IJavaProject; import org.eclipse.jdt.core.JavaCore; +import org.eclipse.jpt.common.core.internal.utility.ICUStringCollator; import org.eclipse.jpt.common.ui.internal.listeners.SWTPropertyChangeListenerWrapper; import org.eclipse.jpt.common.ui.internal.properties.JptProjectPropertiesPage; import org.eclipse.jpt.common.ui.internal.util.SWTUtil; @@ -102,7 +103,6 @@ import org.eclipse.swt.widgets.Link; import org.eclipse.ui.PlatformUI; import org.eclipse.ui.preferences.IWorkbenchPreferenceContainer; import org.eclipse.wst.common.project.facet.core.IProjectFacetVersion; -import com.ibm.icu.text.Collator; /** * Way more complicated UI than you would think.... @@ -143,11 +143,7 @@ public class JpaProjectPropertiesPage private static final String BUILD_PATHS_PROPERTY_PAGE_ID = "org.eclipse.jdt.ui.propertyPages.BuildPathsPropertyPage"; //$NON-NLS-1$ - /* private */ static final Comparator<String> STRING_COMPARATOR = new Comparator<String>() { - public int compare(String string1, String string2){ - return Collator.getInstance().compare(string1, string2); - } - }; + /* private */ static final Comparator<String> STRING_COMPARATOR = new ICUStringCollator(); // ************ construction ************ |