Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/xwt/org.eclipse.papyrus.xwt/src/org/eclipse/papyrus/xwt/converters/ObjectToISelection.java')
-rw-r--r--plugins/xwt/org.eclipse.papyrus.xwt/src/org/eclipse/papyrus/xwt/converters/ObjectToISelection.java14
1 files changed, 7 insertions, 7 deletions
diff --git a/plugins/xwt/org.eclipse.papyrus.xwt/src/org/eclipse/papyrus/xwt/converters/ObjectToISelection.java b/plugins/xwt/org.eclipse.papyrus.xwt/src/org/eclipse/papyrus/xwt/converters/ObjectToISelection.java
index 59cd56de292..4f0c171054f 100644
--- a/plugins/xwt/org.eclipse.papyrus.xwt/src/org/eclipse/papyrus/xwt/converters/ObjectToISelection.java
+++ b/plugins/xwt/org.eclipse.papyrus.xwt/src/org/eclipse/papyrus/xwt/converters/ObjectToISelection.java
@@ -4,7 +4,7 @@
* 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
- *
+ *
* Contributors:
* Soyatec - initial API and implementation
*******************************************************************************/
@@ -20,7 +20,7 @@ import org.eclipse.jface.viewers.StructuredSelection;
/**
* Safely SWT context values, it used to avoid a NullPointerException when set
* text values to SWT Widgets.
- *
+ *
* @author jliu
*/
public class ObjectToISelection implements IConverter {
@@ -35,13 +35,13 @@ public class ObjectToISelection implements IConverter {
* Object)
*/
public Object convert(Object fromObject) {
- if(fromObject == null) {
+ if (fromObject == null) {
return new StructuredSelection();
}
- if(fromObject instanceof Collection<?>) {
- return new StructuredSelection(((Collection<?>)fromObject).toArray());
- } else if(fromObject.getClass().isArray()) {
- return new StructuredSelection((Object[])fromObject);
+ if (fromObject instanceof Collection<?>) {
+ return new StructuredSelection(((Collection<?>) fromObject).toArray());
+ } else if (fromObject.getClass().isArray()) {
+ return new StructuredSelection((Object[]) fromObject);
}
return new StructuredSelection(fromObject);
}

Back to the top