Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/service/palette/PaletteUtil.java')
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/service/palette/PaletteUtil.java17
1 files changed, 8 insertions, 9 deletions
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/service/palette/PaletteUtil.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/service/palette/PaletteUtil.java
index 7d78125c2d0..3e2c15877d8 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/service/palette/PaletteUtil.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/service/palette/PaletteUtil.java
@@ -7,7 +7,7 @@
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- * Mickaäl ADAM (ALL4TEC) mickael.adam@all4tec.net - Move from oep.uml.diagram.common, see bug 512343.
+ * Mickael ADAM (ALL4TEC) mickael.adam@all4tec.net - Move from oep.uml.diagram.common, see bug 512343.
*****************************************************************************/
package org.eclipse.papyrus.infra.gmfdiag.common.service.palette;
@@ -38,7 +38,6 @@ import org.eclipse.papyrus.infra.gmfdiag.common.Activator;
import org.eclipse.papyrus.infra.gmfdiag.common.messages.Messages;
import org.eclipse.papyrus.infra.gmfdiag.common.service.palette.PapyrusPaletteService.ProviderDescriptor;
import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.IMemento;
/**
* Utility class for palette.
@@ -125,7 +124,7 @@ public class PaletteUtil {
*/
@SuppressWarnings("unchecked")
public static List<PaletteContainer> getDirectChildContainers(PaletteContainer container) {
- List<PaletteContainer> containers = new ArrayList<PaletteContainer>();
+ List<PaletteContainer> containers = new ArrayList<>();
Iterator<PaletteEntry> it = container.getChildren().iterator();
while (it.hasNext()) {
PaletteEntry entry = it.next();
@@ -181,7 +180,7 @@ public class PaletteUtil {
* @return the list of tool entries or an empty list
*/
public static List<ToolEntry> getAllToolEntries(PaletteContainer container) {
- final List<ToolEntry> entries = new ArrayList<ToolEntry>();
+ final List<ToolEntry> entries = new ArrayList<>();
Iterator<PaletteEntry> it = container.getChildren().iterator();
while (it.hasNext()) {
PaletteEntry entry = it.next();
@@ -203,7 +202,7 @@ public class PaletteUtil {
* @return the list of entries
*/
public static List<PaletteEntry> getAllEntries(PaletteContainer container) {
- List<PaletteEntry> elements = new ArrayList<PaletteEntry>();
+ List<PaletteEntry> elements = new ArrayList<>();
for (Object object : container.getChildren()) {
if (object instanceof PaletteContainer) {
elements.add((PaletteContainer) object);
@@ -225,7 +224,7 @@ public class PaletteUtil {
* @return the set of available entries
*/
public static Set<? extends PaletteEntry> getAvailableEntries(IEditorPart part, ProviderPriority priority) {
- Set<? extends PaletteEntry> entries = new HashSet<PaletteEntry>();
+ Set<? extends PaletteEntry> entries = new HashSet<>();
// retrieve all provider for the given editor ID
PaletteRoot root = new PaletteRoot();
@@ -256,7 +255,7 @@ public class PaletteUtil {
* @return the set of available entries
*/
public static Map<String, PaletteEntry> getAvailableEntriesSet(IEditorPart part, ProviderPriority priority) {
- Map<String, PaletteEntry> entries = new HashMap<String, PaletteEntry>();
+ Map<String, PaletteEntry> entries = new HashMap<>();
// retrieve all provider for the given editor ID
PaletteRoot root = new PaletteRoot();
@@ -286,7 +285,7 @@ public class PaletteUtil {
*/
public static List<String> getStereotypeListFromString(String serializedForm) {
StringTokenizer tokenizer = new StringTokenizer(serializedForm, ","); //$NON-NLS-1$
- List<String> list = new ArrayList<String>();
+ List<String> list = new ArrayList<>();
while (tokenizer.hasMoreElements()) {
list.add(tokenizer.nextToken().trim());
}
@@ -318,7 +317,7 @@ public class PaletteUtil {
*/
public static Set<String> getProfileSetFromString(String serializedForm) {
StringTokenizer tokenizer = new StringTokenizer(serializedForm, ","); //$NON-NLS-1$
- Set<String> list = new HashSet<String>();
+ Set<String> list = new HashSet<>();
while (tokenizer.hasMoreElements()) {
list.add(tokenizer.nextToken());
}

Back to the top