-package org.simantics.document.linking.actions;\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.ui.handlers.HandlerUtil;\r
-import org.simantics.db.Resource;\r
-import org.simantics.utils.ui.AdaptionUtils;\r
-\r
-public class UpdateReferencesHandler extends AbstractHandler{\r
- \r
- @Override\r
- public Object execute(ExecutionEvent event) throws ExecutionException {\r
- ISelection selection = HandlerUtil.getCurrentSelection(event);\r
- Resource r = AdaptionUtils.adaptToSingle(selection, Resource.class);\r
- if (r == null)\r
- return null;\r
- UpdateReferencesAction action = new UpdateReferencesAction();\r
- action.create(r).run();\r
- return null;\r
- }\r
-\r
-}\r
+package org.simantics.document.linking.actions;
+
+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.ui.handlers.HandlerUtil;
+import org.simantics.db.Resource;
+import org.simantics.utils.ui.AdaptionUtils;
+
+public class UpdateReferencesHandler extends AbstractHandler{
+
+ @Override
+ public Object execute(ExecutionEvent event) throws ExecutionException {
+ ISelection selection = HandlerUtil.getCurrentSelection(event);
+ Resource r = AdaptionUtils.adaptToSingle(selection, Resource.class);
+ if (r == null)
+ return null;
+ UpdateReferencesAction action = new UpdateReferencesAction();
+ action.create(r).run();
+ return null;
+ }
+
+}