Package org.locationtech.udig.omsbox.view.actions

Source Code of org.locationtech.udig.omsbox.view.actions.OmsModelsExecutionAction

/*
* uDig - User Friendly Desktop Internet GIS client
* (C) HydroloGIS - www.hydrologis.com
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* (http://www.eclipse.org/legal/epl-v10.html), and the HydroloGIS BSD
* License v1.0 (http://udig.refractions.net/files/hsd3-v10.html).
*/
package org.locationtech.udig.omsbox.view.actions;

import org.eclipse.jface.action.IAction;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.ui.IViewActionDelegate;
import org.eclipse.ui.IViewPart;

import org.locationtech.udig.omsbox.view.OmsBoxView;

/**
* @author Andrea Antonello (www.hydrologis.com)
*/
public class OmsModelsExecutionAction implements IViewActionDelegate {

    private IViewPart view;

    public void init( IViewPart view ) {
        this.view = view;
    }

    public void run( IAction action ) {
        if (view instanceof OmsBoxView) {
            OmsBoxView omsView = (OmsBoxView) view;
            try {
                omsView.runSelectedModule();
            } catch (Exception e) {
                e.printStackTrace();
            }
        }
    }

    public void selectionChanged( IAction action, ISelection selection ) {
    }

}
TOP

Related Classes of org.locationtech.udig.omsbox.view.actions.OmsModelsExecutionAction

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.