1 package org.simantics.document.linking.actions;
3 import org.eclipse.core.commands.AbstractHandler;
4 import org.eclipse.core.commands.ExecutionEvent;
5 import org.eclipse.core.commands.ExecutionException;
6 import org.eclipse.jface.viewers.ISelection;
7 import org.eclipse.ui.handlers.HandlerUtil;
8 import org.simantics.db.Resource;
9 import org.simantics.utils.ui.AdaptionUtils;
11 public class UpdateReferencesHandler extends AbstractHandler{
14 public Object execute(ExecutionEvent event) throws ExecutionException {
15 ISelection selection = HandlerUtil.getCurrentSelection(event);
16 Resource r = AdaptionUtils.adaptToSingle(selection, Resource.class);
19 UpdateReferencesAction action = new UpdateReferencesAction();
20 action.create(r).run();