1 /*******************************************************************************
2 * Copyright (c) 2007, 2010 Association for Decentralized Information Management
4 * All rights reserved. This program and the accompanying materials
5 * are made available under the terms of the Eclipse Public License v1.0
6 * which accompanies this distribution, and is available at
7 * http://www.eclipse.org/legal/epl-v10.html
10 * VTT Technical Research Centre of Finland - initial API and implementation
11 *******************************************************************************/
12 package org.simantics.team.ui.handlers;
14 import org.eclipse.core.commands.ExecutionEvent;
15 import org.eclipse.core.commands.ExecutionException;
16 import org.eclipse.jface.viewers.ISelection;
17 import org.eclipse.jface.viewers.IStructuredSelection;
18 import org.eclipse.jface.viewers.StructuredSelection;
19 import org.eclipse.ui.handlers.HandlerUtil;
20 import org.simantics.db.Session;
21 import org.simantics.db.service.LifecycleSupport;
22 import org.simantics.db.service.TeamSupport;
23 import org.simantics.team.Activator;
24 import org.simantics.ui.SimanticsUI;
25 import org.simantics.ui.workbench.handler.AbstractPreferenceHandler;
27 public class GetOutgoingHandler extends AbstractPreferenceHandler {
29 public GetOutgoingHandler() {
30 super(Activator.getDefault());
34 public Object execute(ExecutionEvent event) throws ExecutionException {
36 ISelection sel = HandlerUtil.getCurrentSelection(event);
37 IStructuredSelection ss = StructuredSelection.EMPTY;
38 if (sel instanceof IStructuredSelection)
39 ss = (IStructuredSelection) sel;
42 Session session = SimanticsUI.getSession();
43 TeamSupport ps = session.getService(TeamSupport.class);
44 LifecycleSupport support = session.getService(LifecycleSupport.class);
45 System.out.println("koss");
48 } /*catch (InternalException e) {