Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNitin Dahyabhai2022-09-29 04:28:49 +0000
committerNitin Dahyabhai2022-09-29 04:52:39 +0000
commitb0a0df1c7097c1e5eab7185dc99499e29aee9852 (patch)
tree7690e1f39c39de2b0800c9504aed8f32de56a736 /core/bundles/org.eclipse.wst.sse.ui/src/org
parentc479ea70999b4deaab7e57ee066e622d51f79d36 (diff)
downloadwebtools.sourceediting-b0a0df1c7097c1e5eab7185dc99499e29aee9852.tar.gz
webtools.sourceediting-b0a0df1c7097c1e5eab7185dc99499e29aee9852.tar.xz
webtools.sourceediting-b0a0df1c7097c1e5eab7185dc99499e29aee9852.zip
[580788] SSE StringUtils imports com.ibm.icu.util.StringTokenizer instead of java.util.StringTokenizer
Diffstat (limited to 'core/bundles/org.eclipse.wst.sse.ui/src/org')
-rw-r--r--core/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/Logger.java6
-rw-r--r--core/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/extension/ActionDescriptor.java9
-rw-r--r--core/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/extension/BreakpointProviderBuilder.java26
-rw-r--r--core/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/extension/RegistryReader.java2
-rw-r--r--core/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/filter/OutlineFilterDescriptor.java19
-rw-r--r--core/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/openon/OpenFileHyperlinkTracker.java4
-rw-r--r--core/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/preferences/ui/ColorHelper.java6
-rw-r--r--core/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/taginfo/TextHoverManager.java5
-rw-r--r--core/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/util/EditorUtility.java4
-rw-r--r--core/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/preferences/AbstractCompletionProposalCategoriesConfiguration.java49
-rw-r--r--core/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/preferences/ICompletionProposalCategoriesConfigurationWriter.java6
11 files changed, 62 insertions, 74 deletions
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 215ae3e003..2b4e6807ea 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, 2010 IBM Corporation and others.
+ * Copyright (c) 2001, 2022 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 @@ package org.eclipse.wst.sse.ui.internal;
+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 5263bdf463..9407eec652 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, 2006 IBM Corporation and others.
+ * Copyright (c) 2001, 2022 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,9 +14,7 @@
*******************************************************************************/
package org.eclipse.wst.sse.ui.internal.extension;
-
-
-import com.ibm.icu.util.StringTokenizer;
+import java.util.StringTokenizer;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IConfigurationElement;
@@ -31,7 +29,6 @@ import org.eclipse.wst.sse.ui.internal.IActionValidator;
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
@@ -270,8 +267,6 @@ public class ActionDescriptor {
*/
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 30fa1f350f..65bc26896e 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, 2018 IBM Corporation and others.
+ * Copyright (c) 2001, 2022 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.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Set;
-import com.ibm.icu.util.StringTokenizer;
+import java.util.StringTokenizer;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.runtime.CoreException;
@@ -40,7 +40,7 @@ import org.osgi.framework.Bundle;
/**
- * Reads breakpoint extension registory and returns breakpoint provider
+ * Reads breakpoint extension registry and returns breakpoint provider
* instances
*/
public class BreakpointProviderBuilder extends RegistryReader {
@@ -129,8 +129,8 @@ public class BreakpointProviderBuilder extends RegistryReader {
}
- protected List cache;
- private Map map = new HashMap();
+ protected List<IConfigurationElement> cache;
+ private Map<String,IBreakpointProvider[]> map = new HashMap<>();
protected String targetContributionTag;
@@ -219,7 +219,7 @@ public class BreakpointProviderBuilder extends RegistryReader {
return new IConfigurationElement[0];
int num = cache.size();
- List elements = new ArrayList(1);
+ List<IConfigurationElement> elements = new ArrayList<>(1);
for (int i = 0; i < num; i++) {
Object obj = cache.get(i);
if (!(obj instanceof IConfigurationElement))
@@ -265,7 +265,7 @@ public class BreakpointProviderBuilder extends RegistryReader {
elements.add(element);
}
}
- return (IConfigurationElement[]) elements.toArray(new IConfigurationElement[0]);
+ return elements.toArray(new IConfigurationElement[0]);
}
/**
@@ -284,9 +284,9 @@ public class BreakpointProviderBuilder extends RegistryReader {
// Get breakpoint providers for this content type handler
IBreakpointProvider[] providers1 = new IBreakpointProvider[0];
IContentType contentType = Platform.getContentTypeManager().getContentType(contentTypeID);
- List holdProviders = new ArrayList(2);
+ List<IBreakpointProvider> holdProviders = new ArrayList<>(2);
while (contentType != null) {
- IBreakpointProvider[] providers = (IBreakpointProvider[]) map.get(contentType.getId());
+ IBreakpointProvider[] providers = map.get(contentType.getId());
if (providers == null) {
providers = createBreakpointProviders(ATT_CONTENT_TYPES, contentType.getId());
if (providers != null) {
@@ -299,12 +299,12 @@ public class BreakpointProviderBuilder extends RegistryReader {
}
contentType = contentType.getBaseType();
}
- providers1 = (IBreakpointProvider[]) holdProviders.toArray(new IBreakpointProvider[holdProviders.size()]);
+ providers1 = holdProviders.toArray(new IBreakpointProvider[holdProviders.size()]);
// Get breakpoint providers for this extension
IBreakpointProvider[] providers2 = new IBreakpointProvider[0];
if (ext != null) {
- providers2 = (IBreakpointProvider[]) map.get(ext);
+ providers2 = map.get(ext);
if (providers2 == null) {
providers2 = createBreakpointProviders(ATT_EXTENSIONS, ext);
if (providers2 != null) {
@@ -314,7 +314,7 @@ public class BreakpointProviderBuilder extends RegistryReader {
}
// create single hash set to remove duplication
- Set s = new HashSet();
+ Set<IBreakpointProvider> s = new HashSet<>();
s.addAll(Arrays.asList(providers1));
s.addAll(Arrays.asList(providers2));
@@ -355,7 +355,7 @@ public class BreakpointProviderBuilder extends RegistryReader {
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 5d73ff4d1e..e4fca6175c 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, 2021 IBM Corporation and others.
+ * Copyright (c) 2001, 2022 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 3ab64c1db8..cfb9cd46f0 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 IBM Corporation and others.
+ * Copyright (c) 2011, 2022 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,29 +12,24 @@
*******************************************************************************/
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.
@@ -82,7 +77,7 @@ public class OutlineFilterDescriptor implements Comparable, IPluginContribution
*/
public static OutlineFilterDescriptor[] getFilterDescriptors(String targetId) {
OutlineFilterDescriptor[] filterDescs= OutlineFilterDescriptor.getFilterDescriptors();
- List result= new ArrayList(filterDescs.length);
+ List<OutlineFilterDescriptor> result= new ArrayList<>(filterDescs.length);
for (int i= 0; i < filterDescs.length; i++) {
String tid= filterDescs[i].getTargetId();
if (WorkbenchActivityHelper.filterItem(filterDescs[i]))
@@ -90,7 +85,7 @@ public class OutlineFilterDescriptor implements Comparable, IPluginContribution
if (tid == null || tid.equals(targetId))
result.add(filterDescs[i]);
}
- return (OutlineFilterDescriptor[])result.toArray(new OutlineFilterDescriptor[result.size()]);
+ return result.toArray(new OutlineFilterDescriptor[result.size()]);
}
/**
@@ -247,8 +242,8 @@ public class OutlineFilterDescriptor implements Comparable, IPluginContribution
* @return new filter descriptors
*/
private static OutlineFilterDescriptor[] createFilterDescriptors(IConfigurationElement[] elements) {
- List result= new ArrayList(5);
- Set descIds= new HashSet(5);
+ List<OutlineFilterDescriptor> result= new ArrayList<>(5);
+ Set<String> descIds= new HashSet<>(5);
for (int i= 0; i < elements.length; i++) {
final IConfigurationElement element= elements[i];
if (FILTER_TAG.equals(element.getName())) {
@@ -266,7 +261,7 @@ public class OutlineFilterDescriptor implements Comparable, IPluginContribution
}
}
}
- return (OutlineFilterDescriptor[])result.toArray(new OutlineFilterDescriptor[result.size()]);
+ return 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 424d00f7ce..02a05beb18 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, 2006 IBM Corporation and others.
+ * Copyright (c) 2001, 2022 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 com.ibm.icu.util.StringTokenizer;
+import java.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 a94b6d242a..d61b23d866 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, 2008 IBM Corporation and others.
+ * Copyright (c) 2001, 2022 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 @@ package org.eclipse.wst.sse.ui.internal.preferences.ui;
+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 0faa8d44c8..c2aceccc2e 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, 2007 IBM Corporation and others.
+ * Copyright (c) 2001, 2022 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,6 +15,7 @@
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;
@@ -23,8 +24,6 @@ import org.eclipse.wst.sse.ui.internal.SSEUIMessages;
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 0e0bd8f07d..5fcf90e247 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, 2006 IBM Corporation and others.
+ * Copyright (c) 2001, 2022 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 com.ibm.icu.util.StringTokenizer;
+import java.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 ad5f8ca291..43d8ad2ff4 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 IBM Corporation and others.
+ * Copyright (c) 2010, 2022 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,12 +17,11 @@ import java.util.HashSet;
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>
@@ -47,7 +46,7 @@ public abstract class AbstractCompletionProposalCategoriesConfiguration
* <code>{@link List}<{@link String}></code>
* <ul><li><b>values:</b> {@link CompletionProposalCategory} IDs</li></ul>
*/
- private List fDefaultPageSortOrder;
+ private List<String> fDefaultPageSortOrder;
/**
* <p>{@link CompletionProposalCategory} IDs sorted by the order they should
@@ -56,7 +55,7 @@ public abstract class AbstractCompletionProposalCategoriesConfiguration
* <code>{@link List}<{@link String}></code>
* <ul><li><b>values:</b> {@link CompletionProposalCategory} IDs</li></ul>
*/
- private List fOwnPageSortOrder;
+ private List<String> fOwnPageSortOrder;
/**
* <p>{@link CompletionProposalCategory} IDs that should not be displayed on
@@ -65,7 +64,7 @@ public abstract class AbstractCompletionProposalCategoriesConfiguration
* <code>{@link Set}<{@link String}></code>
* <ul><li><b>values:</b> {@link CompletionProposalCategory} IDs</li></ul>
*/
- private Set fShouldNotDisplayOnOwnPage;
+ private Set<String> fShouldNotDisplayOnOwnPage;
/**
* <p>{@link CompletionProposalCategory} IDs that should not be displayed on
@@ -74,16 +73,16 @@ public abstract class AbstractCompletionProposalCategoriesConfiguration
* <code>{@link Set}<{@link String}></code>
* <ul><li><b>values:</b> {@link CompletionProposalCategory} IDs</li></ul>
*/
- private Set fShouldNotDisplayOnDefaultPage;
+ private Set<String> 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();
}
@@ -208,14 +207,14 @@ public abstract class AbstractCompletionProposalCategoriesConfiguration
/**
* @see org.eclipse.wst.sse.ui.preferences.ICompletionProposalCategoriesConfigurationWriter#setPageOrder(java.util.List)
*/
- public void setPageOrder(List order) {
+ public void setPageOrder(List<String> order) {
this.fOwnPageSortOrder = order;
}
/**
* @see org.eclipse.wst.sse.ui.preferences.ICompletionProposalCategoriesConfigurationWriter#setDefaultPageOrder(java.util.List)
*/
- public void setDefaultPageOrder(List order) {
+ public void setDefaultPageOrder(List<String> order) {
this.fDefaultPageSortOrder = order;
}
@@ -314,7 +313,7 @@ public abstract class AbstractCompletionProposalCategoriesConfiguration
//parse either the default or user configuration preference
String preference;
- if(useDefaults) {
+ if (useDefaults) {
preference = getPreferenceStore().getDefaultString(getShouldNotDisplayOnOwnPagePrefKey());
} else {
preference = getPreferenceStore().getString(getShouldNotDisplayOnOwnPagePrefKey());
@@ -333,9 +332,9 @@ public abstract class AbstractCompletionProposalCategoriesConfiguration
private void saveShouldDisplayOnDefaultPageConfiguration() {
//create the preference string
StringBuffer defaultPageBuff = new StringBuffer();
- Iterator defaultPageIter = this.fShouldNotDisplayOnDefaultPage.iterator();
- while(defaultPageIter.hasNext()) {
- String categoryID = (String)defaultPageIter.next();
+ Iterator<String> defaultPageIter = this.fShouldNotDisplayOnDefaultPage.iterator();
+ while (defaultPageIter.hasNext()) {
+ String categoryID = defaultPageIter.next();
defaultPageBuff.append(categoryID + PREFERENCE_CATEGORY_SEPERATOR);
}
@@ -348,9 +347,9 @@ public abstract class AbstractCompletionProposalCategoriesConfiguration
*/
private void savePageSortOrderConfiguration() {
//create the preference string
- StringBuffer orderBuff = new StringBuffer();
- for(int i = 0; i < this.fOwnPageSortOrder.size(); ++i) {
- if(this.fOwnPageSortOrder.get(i) != null) {
+ StringBuilder orderBuff = new StringBuilder();
+ for (int i = 0; i < this.fOwnPageSortOrder.size(); ++i) {
+ if (this.fOwnPageSortOrder.get(i) != null) {
orderBuff.append(this.fOwnPageSortOrder.get(i) + PREFERENCE_CATEGORY_SEPERATOR);
}
}
@@ -364,8 +363,8 @@ public abstract class AbstractCompletionProposalCategoriesConfiguration
*/
private void saveDefaultPageSortOrderConfiguration() {
//create the preference string
- StringBuffer orderBuff = new StringBuffer();
- for(int i = 0; i < this.fDefaultPageSortOrder.size(); ++i) {
+ StringBuilder orderBuff = new StringBuilder();
+ for (int i = 0; i < this.fDefaultPageSortOrder.size(); ++i) {
if(this.fDefaultPageSortOrder.get(i) != null) {
orderBuff.append(this.fDefaultPageSortOrder.get(i) + PREFERENCE_CATEGORY_SEPERATOR);
}
@@ -381,10 +380,10 @@ public abstract class AbstractCompletionProposalCategoriesConfiguration
*/
private void saveShouldDisplayOnOwnPageConfiguration() {
//create the preference string
- StringBuffer buff = new StringBuffer();
- Iterator iter = this.fShouldNotDisplayOnOwnPage.iterator();
+ StringBuilder buff = new StringBuilder();
+ Iterator<String> iter = this.fShouldNotDisplayOnOwnPage.iterator();
while(iter.hasNext()) {
- String categoryID = (String)iter.next();
+ String categoryID = 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 a4c483efa7..17a02bf73b 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 IBM Corporation and others.
+ * Copyright (c) 2010, 2022 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 @@ public interface ICompletionProposalCategoriesConfigurationWriter extends
* @param order <code>{@link List}<{@link String}></code>
* <ul><li><b>values:</b> {@link CompletionProposalCategory} IDs</li></ul>
*/
- void setPageOrder(List order);
+ void setPageOrder(List<String> order);
/**
* <p>Sets the order in which the categories should be listed on the default page.
@@ -102,7 +102,7 @@ public interface ICompletionProposalCategoriesConfigurationWriter extends
* @param order <code>{@link List}<{@link String}></code>
* <ul><li><b>values:</b> {@link CompletionProposalCategory} IDs</li></ul>
*/
- void setDefaultPageOrder(List order);
+ void setDefaultPageOrder(List<String> order);
/**
* <p>Should load the default settings from wherever they are being stored</p>

Back to the top