Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/infra/emf/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/utils/ServiceUtilsForSelection.java')
-rw-r--r--plugins/infra/emf/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/utils/ServiceUtilsForSelection.java16
1 files changed, 8 insertions, 8 deletions
diff --git a/plugins/infra/emf/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/utils/ServiceUtilsForSelection.java b/plugins/infra/emf/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/utils/ServiceUtilsForSelection.java
index 04de7290287..c79aba34c57 100644
--- a/plugins/infra/emf/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/utils/ServiceUtilsForSelection.java
+++ b/plugins/infra/emf/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/utils/ServiceUtilsForSelection.java
@@ -1,6 +1,6 @@
/*****************************************************************************
* Copyright (c) 2012 CEA LIST.
- *
+ *
* 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
@@ -22,15 +22,15 @@ import org.eclipse.papyrus.infra.core.utils.AbstractServiceUtils;
/**
* ServiceUtils based on an ISelection.
- *
+ *
* Expects an IStructuredSelection containing at least one EObject (It then relies on ServiceUtilsForEObject to retrieve the ServicesRegistry)
- *
+ *
* @author Camille Letavernier
*/
public class ServiceUtilsForSelection extends AbstractServiceUtils<ISelection> {
private ServiceUtilsForSelection() {
- //Singleton
+ // Singleton
}
private static ServiceUtilsForSelection instance = new ServiceUtilsForSelection();
@@ -41,13 +41,13 @@ public class ServiceUtilsForSelection extends AbstractServiceUtils<ISelection> {
@Override
public ServicesRegistry getServiceRegistry(ISelection from) throws ServiceException {
- if(from instanceof IStructuredSelection) {
- IStructuredSelection selection = (IStructuredSelection)from;
+ if (from instanceof IStructuredSelection) {
+ IStructuredSelection selection = (IStructuredSelection) from;
Iterator<?> selectionIterator = selection.iterator();
- while(selectionIterator.hasNext()) {
+ while (selectionIterator.hasNext()) {
Object selectedElement = selectionIterator.next();
EObject selectedEObject = EMFHelper.getEObject(selectedElement);
- if(selectedEObject != null) {
+ if (selectedEObject != null) {
return ServiceUtilsForEObject.getInstance().getServiceRegistry(selectedEObject);
}
}

Back to the top