]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/actions/AssignSymbolGroupsHandler.java
Fixed all line endings of the repository
[simantics/platform.git] / bundles / org.simantics.modeling.ui / src / org / simantics / modeling / ui / actions / AssignSymbolGroupsHandler.java
index 0a4a5765c079a8684843a99c5cb89ba15caeba63..36b32e756ed4a87c08e313b5cedc351442037e65 100644 (file)
@@ -1,38 +1,38 @@
-package org.simantics.modeling.ui.actions;\r
-\r
-import java.util.Collection;\r
-\r
-import org.eclipse.core.commands.AbstractHandler;\r
-import org.eclipse.core.commands.ExecutionEvent;\r
-import org.eclipse.core.commands.ExecutionException;\r
-import org.eclipse.jface.viewers.ISelection;\r
-import org.eclipse.jface.viewers.IStructuredSelection;\r
-import org.eclipse.ui.handlers.HandlerUtil;\r
-import org.simantics.db.Resource;\r
-import org.simantics.db.layer0.SelectionHints;\r
-import org.simantics.db.layer0.adapter.ActionFactory;\r
-import org.simantics.utils.ui.ISelectionUtils;\r
-\r
-/**\r
- * This class exists as a org.eclipse.ui.handler extension point counterpart for\r
- * AssignSymbolGroup ActionFactory due to lack of multi-selection support in the\r
- * modeled {@link ActionFactory} contributions.\r
- * \r
- * @author Tuukka Lehtonen <tuukka.lehtonen@semantum.fi>\r
- */\r
-public class AssignSymbolGroupsHandler extends AbstractHandler {\r
-\r
-       @Override\r
-       public Object execute(ExecutionEvent event) throws ExecutionException {\r
-               ISelection s = HandlerUtil.getCurrentSelection(event);\r
-               if (!(s instanceof IStructuredSelection))\r
-                       return null;\r
-\r
-               Collection<Resource> res = ISelectionUtils.getPossibleKeys(s, SelectionHints.KEY_MAIN, Resource.class);\r
-               if (!res.isEmpty())\r
-                       new AssignSymbolGroup().assignGroups(res);\r
-\r
-               return null;\r
-       }\r
-\r
-}\r
+package org.simantics.modeling.ui.actions;
+
+import java.util.Collection;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.ui.handlers.HandlerUtil;
+import org.simantics.db.Resource;
+import org.simantics.db.layer0.SelectionHints;
+import org.simantics.db.layer0.adapter.ActionFactory;
+import org.simantics.utils.ui.ISelectionUtils;
+
+/**
+ * This class exists as a org.eclipse.ui.handler extension point counterpart for
+ * AssignSymbolGroup ActionFactory due to lack of multi-selection support in the
+ * modeled {@link ActionFactory} contributions.
+ * 
+ * @author Tuukka Lehtonen <tuukka.lehtonen@semantum.fi>
+ */
+public class AssignSymbolGroupsHandler extends AbstractHandler {
+
+       @Override
+       public Object execute(ExecutionEvent event) throws ExecutionException {
+               ISelection s = HandlerUtil.getCurrentSelection(event);
+               if (!(s instanceof IStructuredSelection))
+                       return null;
+
+               Collection<Resource> res = ISelectionUtils.getPossibleKeys(s, SelectionHints.KEY_MAIN, Resource.class);
+               if (!res.isEmpty())
+                       new AssignSymbolGroup().assignGroups(res);
+
+               return null;
+       }
+
+}