Revert "[580788] SSE StringUtils imports com.ibm.icu.util.StringTokenizer instead of java.util.StringTokenizer" This reverts commit b0a0df1c7097c1e5eab7185dc99499e29aee9852.
diff --git a/core/bundles/org.eclipse.wst.sse.core/META-INF/MANIFEST.MF b/core/bundles/org.eclipse.wst.sse.core/META-INF/MANIFEST.MF index 2fac57d..6abc009 100644 --- a/core/bundles/org.eclipse.wst.sse.core/META-INF/MANIFEST.MF +++ b/core/bundles/org.eclipse.wst.sse.core/META-INF/MANIFEST.MF
@@ -38,10 +38,12 @@ org.eclipse.wst.sse.core.text, org.eclipse.wst.sse.core.utils, org.eclipse.wst.sse.internal.contentproperties;x-friends:="org.eclipse.wst.dtd.core,org.eclipse.wst.dtd.ui,org.eclipse.wst.sse.ui,org.eclipse.wst.xml.core,org.eclipse.wst.xml.ui,org.eclipse.wst.xsd.core,org.eclipse.wst.xsd.ui" +Import-Package: com.ibm.icu.util, + com.ibm.icu.text Require-Bundle: org.eclipse.core.resources;bundle-version="[3.13.0,4.0.0)", org.eclipse.text;bundle-version="[3.6.0,4.0.0)";visibility:=reexport, org.eclipse.core.jobs;bundle-version="[3.10.0,4.0.0)", - org.eclipse.core.runtime;bundle-version="[3.26.0,4.0.0)", + org.eclipse.core.runtime;bundle-version="[3.14.0,4.0.0)", org.eclipse.core.filebuffers;bundle-version="[3.6.0,4.0.0)", org.eclipse.wst.common.uriresolver;bundle-version="[1.2.300,2.0.0)", org.eclipse.emf.common;bundle-version="[2.14.0,3.0.0)",
diff --git a/core/bundles/org.eclipse.wst.sse.core/pom.xml b/core/bundles/org.eclipse.wst.sse.core/pom.xml index 5bb2b22..1acee3c 100644 --- a/core/bundles/org.eclipse.wst.sse.core/pom.xml +++ b/core/bundles/org.eclipse.wst.sse.core/pom.xml
@@ -23,4 +23,25 @@ <artifactId>org.eclipse.wst.sse.core</artifactId> <version>1.2.900-SNAPSHOT</version> <packaging>eclipse-plugin</packaging> + + <build> + <plugins> + <plugin> + <groupId>org.eclipse.tycho</groupId> + <artifactId>target-platform-configuration</artifactId> + <configuration> + <dependency-resolution> + <extraRequirements> + <requirement> + <type>eclipse-plugin</type> + <id>com.ibm.icu</id> + <versionRange>0.0.0</versionRange> + </requirement> + </extraRequirements> + </dependency-resolution> + </configuration> + </plugin> + </plugins> + </build> + </project>
diff --git a/core/bundles/org.eclipse.wst.sse.core/src-encoding/org/eclipse/wst/sse/core/internal/encoding/util/Logger.java b/core/bundles/org.eclipse.wst.sse.core/src-encoding/org/eclipse/wst/sse/core/internal/encoding/util/Logger.java index 95f6ff8..bdea85d 100644 --- a/core/bundles/org.eclipse.wst.sse.core/src-encoding/org/eclipse/wst/sse/core/internal/encoding/util/Logger.java +++ b/core/bundles/org.eclipse.wst.sse.core/src-encoding/org/eclipse/wst/sse/core/internal/encoding/util/Logger.java
@@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2001, 2022 IBM Corporation and others. + * Copyright (c) 2001, 2006 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License 2.0 * which accompanies this distribution, and is available at @@ -14,7 +14,7 @@ *******************************************************************************/ package org.eclipse.wst.sse.core.internal.encoding.util; -import java.util.StringTokenizer; +import com.ibm.icu.util.StringTokenizer; import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.Platform;
diff --git a/core/bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/util/PathHelper.java b/core/bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/util/PathHelper.java index d2ceec1..c7cbf3c 100644 --- a/core/bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/util/PathHelper.java +++ b/core/bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/util/PathHelper.java
@@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2001, 2022 IBM Corporation and others. + * Copyright (c) 2001, 2010 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License 2.0 * which accompanies this distribution, and is available at @@ -16,8 +16,9 @@ package org.eclipse.wst.sse.core.internal.util; + import java.io.File; -import java.util.StringTokenizer; +import com.ibm.icu.util.StringTokenizer; /** * Collection of helper methods to manage and convert links Originally part of
diff --git a/core/bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/util/ProjectResolver.java b/core/bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/util/ProjectResolver.java index 0b81ded..790fc7f 100644 --- a/core/bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/util/ProjectResolver.java +++ b/core/bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/util/ProjectResolver.java
@@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2001, 202 IBM Corporation and others. + * Copyright (c) 2001, 2007 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License 2.0 * which accompanies this distribution, and is available at @@ -17,7 +17,6 @@ import java.io.InputStream; import java.net.MalformedURLException; import java.net.URL; -import java.util.StringTokenizer; import org.eclipse.core.resources.IFile; import org.eclipse.core.resources.IProject; @@ -25,6 +24,8 @@ import org.eclipse.core.runtime.Path; import org.eclipse.wst.common.uriresolver.internal.util.URIHelper; +import com.ibm.icu.util.StringTokenizer; + /** * @deprecated The URIResolver interface is deprecated. Use the resolver from * org.eclipse.wst.common.uriresolver.
diff --git a/core/bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/utils/StringUtils.java b/core/bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/utils/StringUtils.java index dd6cbfd..3f054c0 100644 --- a/core/bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/utils/StringUtils.java +++ b/core/bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/utils/StringUtils.java
@@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2001, 2022 IBM Corporation and others. + * Copyright (c) 2001, 2019 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License 2.0 * which accompanies this distribution, and is available at @@ -17,7 +17,6 @@ import java.util.ArrayList; import java.util.List; -import java.util.StringTokenizer; import org.eclipse.jface.text.BadLocationException; import org.eclipse.jface.text.Document; @@ -25,6 +24,8 @@ import org.eclipse.jface.text.IRegion; import org.eclipse.wst.sse.core.internal.Logger; +import com.ibm.icu.util.StringTokenizer; + public class StringUtils { protected static final String AMPERSTAND = "&"; //$NON-NLS-1$
diff --git a/core/bundles/org.eclipse.wst.sse.ui/META-INF/MANIFEST.MF b/core/bundles/org.eclipse.wst.sse.ui/META-INF/MANIFEST.MF index a6f74c9..ef872e0 100755 --- a/core/bundles/org.eclipse.wst.sse.ui/META-INF/MANIFEST.MF +++ b/core/bundles/org.eclipse.wst.sse.ui/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Bundle-ManifestVersion: 2 Bundle-Name: %pluginName Bundle-SymbolicName: org.eclipse.wst.sse.ui; singleton:=true -Bundle-Version: 1.7.600.qualifier +Bundle-Version: 1.7.500.qualifier Bundle-Activator: org.eclipse.wst.sse.ui.internal.SSEUIPlugin Bundle-Vendor: %providerName Bundle-Localization: plugin @@ -50,6 +50,8 @@ org.eclipse.wst.sse.ui.typing, org.eclipse.wst.sse.ui.views.contentoutline, org.eclipse.wst.sse.ui.views.properties +Import-Package: com.ibm.icu.util, + com.ibm.icu.text Require-Bundle: org.eclipse.ui.ide;bundle-version="[3.14.0,4.0.0)", org.eclipse.jface.text;bundle-version="[3.13.0,4.0.0)", org.eclipse.debug.ui;bundle-version="[3.13.0,4.0.0)",
diff --git a/core/bundles/org.eclipse.wst.sse.ui/pom.xml b/core/bundles/org.eclipse.wst.sse.ui/pom.xml index 304342b..ee70675 100644 --- a/core/bundles/org.eclipse.wst.sse.ui/pom.xml +++ b/core/bundles/org.eclipse.wst.sse.ui/pom.xml
@@ -21,6 +21,26 @@ <groupId>org.eclipse.webtools.sourceediting</groupId> <artifactId>org.eclipse.wst.sse.ui</artifactId> - <version>1.7.600-SNAPSHOT</version> + <version>1.7.500-SNAPSHOT</version> <packaging>eclipse-plugin</packaging> + + <build> + <plugins> + <plugin> + <groupId>org.eclipse.tycho</groupId> + <artifactId>target-platform-configuration</artifactId> + <configuration> + <dependency-resolution> + <extraRequirements> + <requirement> + <type>eclipse-plugin</type> + <id>com.ibm.icu</id> + <versionRange>0.0.0</versionRange> + </requirement> + </extraRequirements> + </dependency-resolution> + </configuration> + </plugin> + </plugins> + </build> </project>
diff --git a/core/bundles/org.eclipse.wst.sse.ui/src-tasktags/org/eclipse/wst/sse/ui/internal/preferences/ui/MainTab.java b/core/bundles/org.eclipse.wst.sse.ui/src-tasktags/org/eclipse/wst/sse/ui/internal/preferences/ui/MainTab.java index 0de263f..0dfd3f1 100644 --- a/core/bundles/org.eclipse.wst.sse.ui/src-tasktags/org/eclipse/wst/sse/ui/internal/preferences/ui/MainTab.java +++ b/core/bundles/org.eclipse.wst.sse.ui/src-tasktags/org/eclipse/wst/sse/ui/internal/preferences/ui/MainTab.java
@@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2001, 2022 IBM Corporation and others. + * Copyright (c) 2001, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License 2.0 * which accompanies this distribution, and is available at @@ -16,7 +16,6 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.List; -import java.util.StringTokenizer; import org.eclipse.core.resources.IMarker; import org.eclipse.core.runtime.Platform; @@ -61,6 +60,8 @@ import org.eclipse.wst.sse.core.utils.StringUtils; import org.eclipse.wst.sse.ui.internal.SSEUIMessages; +import com.ibm.icu.util.StringTokenizer; + class MainTab implements IPreferenceTab { public class TaskTagDialog extends Dialog { public TaskTag taskTag = null; @@ -192,9 +193,9 @@ int result = dlg.open(); if (result == Window.OK) { TaskTag newTag = dlg.taskTag; - List<TaskTag> newTags = new ArrayList<>(Arrays.asList(fTaskTags)); + List newTags = new ArrayList(Arrays.asList(fTaskTags)); newTags.add(newTag); - fTaskTags = newTags.toArray(new TaskTag[newTags.size()]); + fTaskTags = (TaskTag[]) newTags.toArray(new TaskTag[newTags.size()]); valueTable.setInput(fTaskTags); valueTable.getTable().setSelection(fTaskTags.length - 1); } @@ -210,6 +211,7 @@ Label description = new Label(composite, SWT.NONE); description.setText(SSEUIMessages.TaskTagPreferenceTab_33); //$NON-NLS-1$ +// description.setBackground(composite.getBackground()); GridData gd = new GridData(SWT.FILL, SWT.FILL, true, false, 2, 1); // https://bugs.eclipse.org/bugs/show_bug.cgi?id=104403 Point sizeHint = description.computeSize(SWT.DEFAULT, SWT.DEFAULT); @@ -338,7 +340,7 @@ String[] tags = StringUtils.unpack(tagString); StringTokenizer toker = null; - List<Integer> list = new ArrayList<>(); + List list = new ArrayList(); toker = new StringTokenizer(priorityString, ","); //$NON-NLS-1$ while (toker.hasMoreTokens()) { @@ -347,11 +349,11 @@ number = Integer.valueOf(toker.nextToken()); } catch (NumberFormatException e) { - number = Integer.valueOf(IMarker.PRIORITY_NORMAL); + number = new Integer(IMarker.PRIORITY_NORMAL); } list.add(number); } - Integer[] priorities = list.toArray(new Integer[0]); + Integer[] priorities = (Integer[]) list.toArray(new Integer[0]); fTaskTags = new TaskTag[Math.min(tags.length, priorities.length)]; for (int i = 0; i < fTaskTags.length; i++) { @@ -394,18 +396,18 @@ */ private void removeTags(ISelection selection) { IStructuredSelection structuredSelection = (IStructuredSelection) selection; - List<TaskTag> taskTags = new ArrayList<>(Arrays.asList(fTaskTags)); + List taskTags = new ArrayList(Arrays.asList(fTaskTags)); taskTags.removeAll(structuredSelection.toList()); - fTaskTags = taskTags.toArray(new TaskTag[taskTags.size()]); + fTaskTags = (TaskTag[]) taskTags.toArray(new TaskTag[taskTags.size()]); valueTable.setInput(fTaskTags); } private void save() { - IEclipsePreferences defaultPreferences = DefaultScope.INSTANCE.getNode(TaskTagPreferenceKeys.TASK_TAG_NODE); + IEclipsePreferences defaultPreferences = new DefaultScope().getNode(TaskTagPreferenceKeys.TASK_TAG_NODE); String defaultTags = defaultPreferences.get(TaskTagPreferenceKeys.TASK_TAG_TAGS, null); String defaultPriorities = defaultPreferences.get(TaskTagPreferenceKeys.TASK_TAG_PRIORITIES, null); - StringBuilder buf = new StringBuilder(); + StringBuffer buf = new StringBuffer(); for (int i = 0; i < fTaskTags.length; i++) { if (i > 0) { buf.append(","); //$NON-NLS-1$ @@ -427,7 +429,7 @@ fPreferencesLookupOrder[0].getNode(TaskTagPreferenceKeys.TASK_TAG_NODE).put(TaskTagPreferenceKeys.TASK_TAG_TAGS, currentTags); } - StringBuilder buf2 = new StringBuilder(); + StringBuffer buf2 = new StringBuffer(); for (int i = 0; i < fTaskTags.length; i++) { if (i > 0) { buf2.append(","); //$NON-NLS-1$
diff --git a/core/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/Logger.java b/core/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/Logger.java index 2b4e680..215ae3e 100644 --- a/core/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/Logger.java +++ b/core/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/Logger.java
@@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2001, 2022 IBM Corporation and others. + * Copyright (c) 2001, 2010 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License 2.0 * which accompanies this distribution, and is available at @@ -16,13 +16,13 @@ -import java.util.StringTokenizer; - import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.Platform; import org.eclipse.core.runtime.Status; import org.osgi.framework.Bundle; +import com.ibm.icu.util.StringTokenizer; + /** * Small convenience class to log messages to plugin's log file and also, if * desired, the console. This class should only be used by classes in this
diff --git a/core/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/extension/ActionDescriptor.java b/core/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/extension/ActionDescriptor.java index 9407eec..5263bdf 100644 --- a/core/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/extension/ActionDescriptor.java +++ b/core/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/extension/ActionDescriptor.java
@@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2001, 2022 IBM Corporation and others. + * Copyright (c) 2001, 2006 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License 2.0 * which accompanies this distribution, and is available at @@ -14,7 +14,9 @@ *******************************************************************************/ package org.eclipse.wst.sse.ui.internal.extension; -import java.util.StringTokenizer; + + +import com.ibm.icu.util.StringTokenizer; import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.IConfigurationElement; @@ -29,6 +31,7 @@ import org.eclipse.wst.sse.ui.internal.Logger; import org.osgi.framework.Bundle; + /** * When 'action' tag is found in the registry, an object of this class is * created. It creates the appropriate action object and captures information @@ -267,6 +270,8 @@ */ private IAction createAction(IConfigurationElement actionElement) { Object action = new ExtendedEditorActionProxyForDelayLoading(actionElement, ATT_CLASS); + if (action == null) + return null; if (action instanceof IActionValidator) { if (!((IActionValidator) action).isValidAction()) return null;
diff --git a/core/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/extension/BreakpointProviderBuilder.java b/core/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/extension/BreakpointProviderBuilder.java index 65bc268..30fa1f3 100644 --- a/core/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/extension/BreakpointProviderBuilder.java +++ b/core/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/extension/BreakpointProviderBuilder.java
@@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2001, 2022 IBM Corporation and others. + * Copyright (c) 2001, 2018 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License 2.0 * which accompanies this distribution, and is available at @@ -22,7 +22,7 @@ import java.util.List; import java.util.Map; import java.util.Set; -import java.util.StringTokenizer; +import com.ibm.icu.util.StringTokenizer; import org.eclipse.core.resources.IResource; import org.eclipse.core.runtime.CoreException; @@ -40,7 +40,7 @@ /** - * Reads breakpoint extension registry and returns breakpoint provider + * Reads breakpoint extension registory and returns breakpoint provider * instances */ public class BreakpointProviderBuilder extends RegistryReader { @@ -129,8 +129,8 @@ } - protected List<IConfigurationElement> cache; - private Map<String,IBreakpointProvider[]> map = new HashMap<>(); + protected List cache; + private Map map = new HashMap(); protected String targetContributionTag; @@ -219,7 +219,7 @@ return new IConfigurationElement[0]; int num = cache.size(); - List<IConfigurationElement> elements = new ArrayList<>(1); + List elements = new ArrayList(1); for (int i = 0; i < num; i++) { Object obj = cache.get(i); if (!(obj instanceof IConfigurationElement)) @@ -265,7 +265,7 @@ elements.add(element); } } - return elements.toArray(new IConfigurationElement[0]); + return (IConfigurationElement[]) elements.toArray(new IConfigurationElement[0]); } /** @@ -284,9 +284,9 @@ // Get breakpoint providers for this content type handler IBreakpointProvider[] providers1 = new IBreakpointProvider[0]; IContentType contentType = Platform.getContentTypeManager().getContentType(contentTypeID); - List<IBreakpointProvider> holdProviders = new ArrayList<>(2); + List holdProviders = new ArrayList(2); while (contentType != null) { - IBreakpointProvider[] providers = map.get(contentType.getId()); + IBreakpointProvider[] providers = (IBreakpointProvider[]) map.get(contentType.getId()); if (providers == null) { providers = createBreakpointProviders(ATT_CONTENT_TYPES, contentType.getId()); if (providers != null) { @@ -299,12 +299,12 @@ } contentType = contentType.getBaseType(); } - providers1 = holdProviders.toArray(new IBreakpointProvider[holdProviders.size()]); + providers1 = (IBreakpointProvider[]) holdProviders.toArray(new IBreakpointProvider[holdProviders.size()]); // Get breakpoint providers for this extension IBreakpointProvider[] providers2 = new IBreakpointProvider[0]; if (ext != null) { - providers2 = map.get(ext); + providers2 = (IBreakpointProvider[]) map.get(ext); if (providers2 == null) { providers2 = createBreakpointProviders(ATT_EXTENSIONS, ext); if (providers2 != null) { @@ -314,7 +314,7 @@ } // create single hash set to remove duplication - Set<IBreakpointProvider> s = new HashSet<>(); + Set s = new HashSet(); s.addAll(Arrays.asList(providers1)); s.addAll(Arrays.asList(providers2)); @@ -355,7 +355,7 @@ private void initCache() { if (cache == null) { - cache = new ArrayList<>(); + cache = new ArrayList(); readContributions(TAG_BREAKPOINT_CONTRIBUTION, PL_BREAKPOINT); } }
diff --git a/core/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/extension/RegistryReader.java b/core/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/extension/RegistryReader.java index e4fca61..5d73ff4 100644 --- a/core/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/extension/RegistryReader.java +++ b/core/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/extension/RegistryReader.java
@@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2001, 2022 IBM Corporation and others. + * Copyright (c) 2001, 2021 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License 2.0 * which accompanies this distribution, and is available at
diff --git a/core/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/filter/OutlineFilterDescriptor.java b/core/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/filter/OutlineFilterDescriptor.java index cfb9cd4..3ab64c1 100644 --- a/core/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/filter/OutlineFilterDescriptor.java +++ b/core/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/filter/OutlineFilterDescriptor.java
@@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011, 2022 IBM Corporation and others. + * Copyright (c) 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License 2.0 * which accompanies this distribution, and is available at @@ -12,24 +12,29 @@ *******************************************************************************/ package org.eclipse.wst.sse.ui.internal.filter; -import java.text.Collator; import java.util.ArrayList; import java.util.HashSet; import java.util.List; import java.util.Set; +import com.ibm.icu.text.Collator; + import org.eclipse.core.runtime.Assert; import org.eclipse.core.runtime.IConfigurationElement; import org.eclipse.core.runtime.IExtensionRegistry; import org.eclipse.core.runtime.ISafeRunnable; import org.eclipse.core.runtime.Platform; import org.eclipse.core.runtime.SafeRunner; + import org.eclipse.jface.util.SafeRunnable; import org.eclipse.jface.viewers.ViewerFilter; + import org.eclipse.ui.IPluginContribution; import org.eclipse.ui.activities.WorkbenchActivityHelper; import org.eclipse.wst.sse.ui.internal.SSEUIPlugin; + + /** * Represents a custom filter which is provided by the * "org.eclipse.sse.ui.outlineFilters" extension point. @@ -77,7 +82,7 @@ */ public static OutlineFilterDescriptor[] getFilterDescriptors(String targetId) { OutlineFilterDescriptor[] filterDescs= OutlineFilterDescriptor.getFilterDescriptors(); - List<OutlineFilterDescriptor> result= new ArrayList<>(filterDescs.length); + List result= new ArrayList(filterDescs.length); for (int i= 0; i < filterDescs.length; i++) { String tid= filterDescs[i].getTargetId(); if (WorkbenchActivityHelper.filterItem(filterDescs[i])) @@ -85,7 +90,7 @@ if (tid == null || tid.equals(targetId)) result.add(filterDescs[i]); } - return result.toArray(new OutlineFilterDescriptor[result.size()]); + return (OutlineFilterDescriptor[])result.toArray(new OutlineFilterDescriptor[result.size()]); } /** @@ -242,8 +247,8 @@ * @return new filter descriptors */ private static OutlineFilterDescriptor[] createFilterDescriptors(IConfigurationElement[] elements) { - List<OutlineFilterDescriptor> result= new ArrayList<>(5); - Set<String> descIds= new HashSet<>(5); + List result= new ArrayList(5); + Set descIds= new HashSet(5); for (int i= 0; i < elements.length; i++) { final IConfigurationElement element= elements[i]; if (FILTER_TAG.equals(element.getName())) { @@ -261,7 +266,7 @@ } } } - return result.toArray(new OutlineFilterDescriptor[result.size()]); + return (OutlineFilterDescriptor[])result.toArray(new OutlineFilterDescriptor[result.size()]); } public String getLocalId() {
diff --git a/core/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/openon/OpenFileHyperlinkTracker.java b/core/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/openon/OpenFileHyperlinkTracker.java index 02a05be..424d00f 100644 --- a/core/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/openon/OpenFileHyperlinkTracker.java +++ b/core/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/openon/OpenFileHyperlinkTracker.java
@@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2001, 2022 IBM Corporation and others. + * Copyright (c) 2001, 2006 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License 2.0 * which accompanies this distribution, and is available at @@ -14,7 +14,7 @@ *******************************************************************************/ package org.eclipse.wst.sse.ui.internal.openon; -import java.util.StringTokenizer; +import com.ibm.icu.util.StringTokenizer; import org.eclipse.jface.preference.IPreferenceStore; import org.eclipse.jface.preference.PreferenceConverter;
diff --git a/core/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/preferences/ui/ColorHelper.java b/core/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/preferences/ui/ColorHelper.java index d61b23d..a94b6d2 100644 --- a/core/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/preferences/ui/ColorHelper.java +++ b/core/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/preferences/ui/ColorHelper.java
@@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2001, 2022 IBM Corporation and others. + * Copyright (c) 2001, 2008 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License 2.0 * which accompanies this distribution, and is available at @@ -16,12 +16,12 @@ -import java.util.StringTokenizer; - import org.eclipse.jface.resource.ColorRegistry; import org.eclipse.swt.graphics.RGB; import org.eclipse.wst.sse.ui.internal.Logger; +import com.ibm.icu.util.StringTokenizer; + public class ColorHelper { public final static String BACKGROUND = "background";//$NON-NLS-1$
diff --git a/core/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/taginfo/TextHoverManager.java b/core/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/taginfo/TextHoverManager.java index c2acecc..0faa8d4 100644 --- a/core/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/taginfo/TextHoverManager.java +++ b/core/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/taginfo/TextHoverManager.java
@@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2001, 2022 IBM Corporation and others. + * Copyright (c) 2001, 2007 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License 2.0 * which accompanies this distribution, and is available at @@ -15,7 +15,6 @@ package org.eclipse.wst.sse.ui.internal.taginfo; import java.util.HashMap; -import java.util.StringTokenizer; import org.eclipse.jface.preference.IPreferenceStore; import org.eclipse.jface.text.ITextHover; @@ -24,6 +23,8 @@ import org.eclipse.wst.sse.ui.internal.SSEUIPlugin; import org.eclipse.wst.sse.ui.internal.preferences.EditorPreferenceNames; +import com.ibm.icu.util.StringTokenizer; + /** * Manages text hovers for Structured Text editors */
diff --git a/core/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/util/EditorUtility.java b/core/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/util/EditorUtility.java index 5fcf90e..0e0bd8f 100644 --- a/core/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/util/EditorUtility.java +++ b/core/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/util/EditorUtility.java
@@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2001, 2022 IBM Corporation and others. + * Copyright (c) 2001, 2006 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License 2.0 * which accompanies this distribution, and is available at @@ -15,7 +15,7 @@ package org.eclipse.wst.sse.ui.internal.util; -import java.util.StringTokenizer; +import com.ibm.icu.util.StringTokenizer; import org.eclipse.jface.action.Action; import org.eclipse.jface.resource.JFaceResources;
diff --git a/core/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/preferences/AbstractCompletionProposalCategoriesConfiguration.java b/core/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/preferences/AbstractCompletionProposalCategoriesConfiguration.java index 43d8ad2..ad5f8ca 100644 --- a/core/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/preferences/AbstractCompletionProposalCategoriesConfiguration.java +++ b/core/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/preferences/AbstractCompletionProposalCategoriesConfiguration.java
@@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2010, 2022 IBM Corporation and others. + * Copyright (c) 2010 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License 2.0 * which accompanies this distribution, and is available at @@ -17,11 +17,12 @@ import java.util.Iterator; import java.util.List; import java.util.Set; -import java.util.StringTokenizer; import org.eclipse.jface.preference.IPreferenceStore; import org.eclipse.wst.sse.ui.internal.contentassist.CompletionProposalCategory; +import com.ibm.icu.util.StringTokenizer; + /** * <p>Implements a completion proposal categories configuration * reader and writer using an {@link IPreferenceStore}</p> @@ -46,7 +47,7 @@ * <code>{@link List}<{@link String}></code> * <ul><li><b>values:</b> {@link CompletionProposalCategory} IDs</li></ul> */ - private List<String> fDefaultPageSortOrder; + private List fDefaultPageSortOrder; /** * <p>{@link CompletionProposalCategory} IDs sorted by the order they should @@ -55,7 +56,7 @@ * <code>{@link List}<{@link String}></code> * <ul><li><b>values:</b> {@link CompletionProposalCategory} IDs</li></ul> */ - private List<String> fOwnPageSortOrder; + private List fOwnPageSortOrder; /** * <p>{@link CompletionProposalCategory} IDs that should not be displayed on @@ -64,7 +65,7 @@ * <code>{@link Set}<{@link String}></code> * <ul><li><b>values:</b> {@link CompletionProposalCategory} IDs</li></ul> */ - private Set<String> fShouldNotDisplayOnOwnPage; + private Set fShouldNotDisplayOnOwnPage; /** * <p>{@link CompletionProposalCategory} IDs that should not be displayed on @@ -73,16 +74,16 @@ * <code>{@link Set}<{@link String}></code> * <ul><li><b>values:</b> {@link CompletionProposalCategory} IDs</li></ul> */ - private Set<String> fShouldNotDisplayOnDefaultPage; + private Set fShouldNotDisplayOnDefaultPage; /** * <p>Create a new configuration by loading from the associated {@link IPreferenceStore}</p> */ public AbstractCompletionProposalCategoriesConfiguration() { - this.fOwnPageSortOrder = new ArrayList<>(); - this.fDefaultPageSortOrder = new ArrayList<>(); - this.fShouldNotDisplayOnOwnPage = new HashSet<>(); - this.fShouldNotDisplayOnDefaultPage = new HashSet<>(); + this.fOwnPageSortOrder = new ArrayList(); + this.fDefaultPageSortOrder = new ArrayList(); + this.fShouldNotDisplayOnOwnPage = new HashSet(); + this.fShouldNotDisplayOnDefaultPage = new HashSet(); this.loadUserConfiguration(); } @@ -207,14 +208,14 @@ /** * @see org.eclipse.wst.sse.ui.preferences.ICompletionProposalCategoriesConfigurationWriter#setPageOrder(java.util.List) */ - public void setPageOrder(List<String> order) { + public void setPageOrder(List order) { this.fOwnPageSortOrder = order; } /** * @see org.eclipse.wst.sse.ui.preferences.ICompletionProposalCategoriesConfigurationWriter#setDefaultPageOrder(java.util.List) */ - public void setDefaultPageOrder(List<String> order) { + public void setDefaultPageOrder(List order) { this.fDefaultPageSortOrder = order; } @@ -313,7 +314,7 @@ //parse either the default or user configuration preference String preference; - if (useDefaults) { + if(useDefaults) { preference = getPreferenceStore().getDefaultString(getShouldNotDisplayOnOwnPagePrefKey()); } else { preference = getPreferenceStore().getString(getShouldNotDisplayOnOwnPagePrefKey()); @@ -332,9 +333,9 @@ private void saveShouldDisplayOnDefaultPageConfiguration() { //create the preference string StringBuffer defaultPageBuff = new StringBuffer(); - Iterator<String> defaultPageIter = this.fShouldNotDisplayOnDefaultPage.iterator(); - while (defaultPageIter.hasNext()) { - String categoryID = defaultPageIter.next(); + Iterator defaultPageIter = this.fShouldNotDisplayOnDefaultPage.iterator(); + while(defaultPageIter.hasNext()) { + String categoryID = (String)defaultPageIter.next(); defaultPageBuff.append(categoryID + PREFERENCE_CATEGORY_SEPERATOR); } @@ -347,9 +348,9 @@ */ private void savePageSortOrderConfiguration() { //create the preference string - StringBuilder orderBuff = new StringBuilder(); - for (int i = 0; i < this.fOwnPageSortOrder.size(); ++i) { - if (this.fOwnPageSortOrder.get(i) != null) { + StringBuffer orderBuff = new StringBuffer(); + for(int i = 0; i < this.fOwnPageSortOrder.size(); ++i) { + if(this.fOwnPageSortOrder.get(i) != null) { orderBuff.append(this.fOwnPageSortOrder.get(i) + PREFERENCE_CATEGORY_SEPERATOR); } } @@ -363,8 +364,8 @@ */ private void saveDefaultPageSortOrderConfiguration() { //create the preference string - StringBuilder orderBuff = new StringBuilder(); - for (int i = 0; i < this.fDefaultPageSortOrder.size(); ++i) { + StringBuffer orderBuff = new StringBuffer(); + for(int i = 0; i < this.fDefaultPageSortOrder.size(); ++i) { if(this.fDefaultPageSortOrder.get(i) != null) { orderBuff.append(this.fDefaultPageSortOrder.get(i) + PREFERENCE_CATEGORY_SEPERATOR); } @@ -380,10 +381,10 @@ */ private void saveShouldDisplayOnOwnPageConfiguration() { //create the preference string - StringBuilder buff = new StringBuilder(); - Iterator<String> iter = this.fShouldNotDisplayOnOwnPage.iterator(); + StringBuffer buff = new StringBuffer(); + Iterator iter = this.fShouldNotDisplayOnOwnPage.iterator(); while(iter.hasNext()) { - String categoryID = iter.next(); + String categoryID = (String)iter.next(); buff.append(categoryID + PREFERENCE_CATEGORY_SEPERATOR); }
diff --git a/core/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/preferences/ICompletionProposalCategoriesConfigurationWriter.java b/core/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/preferences/ICompletionProposalCategoriesConfigurationWriter.java index 17a02bf..a4c483e 100644 --- a/core/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/preferences/ICompletionProposalCategoriesConfigurationWriter.java +++ b/core/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/preferences/ICompletionProposalCategoriesConfigurationWriter.java
@@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2010, 2022 IBM Corporation and others. + * Copyright (c) 2010 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License 2.0 * which accompanies this distribution, and is available at @@ -87,7 +87,7 @@ * @param order <code>{@link List}<{@link String}></code> * <ul><li><b>values:</b> {@link CompletionProposalCategory} IDs</li></ul> */ - void setPageOrder(List<String> order); + void setPageOrder(List order); /** * <p>Sets the order in which the categories should be listed on the default page. @@ -102,7 +102,7 @@ * @param order <code>{@link List}<{@link String}></code> * <ul><li><b>values:</b> {@link CompletionProposalCategory} IDs</li></ul> */ - void setDefaultPageOrder(List<String> order); + void setDefaultPageOrder(List order); /** * <p>Should load the default settings from wherever they are being stored</p>