Package it.baeyens.arduino.actions

Source Code of it.baeyens.arduino.actions.NewSketchHandler

package it.baeyens.arduino.actions;

import it.baeyens.arduino.common.ArduinoInstancePreferences;
import it.baeyens.arduino.ui.NewArduinoSketchWizard;

import org.eclipse.core.commands.AbstractHandler;
import org.eclipse.core.commands.ExecutionEvent;
import org.eclipse.core.commands.ExecutionException;
import org.eclipse.jface.wizard.IWizard;
import org.eclipse.jface.wizard.WizardDialog;
import org.eclipse.ui.console.ConsolePlugin;

public class NewSketchHandler extends AbstractHandler {

    @Override
    public Object execute(ExecutionEvent event) throws ExecutionException {
  if (!ArduinoInstancePreferences.isConfigured(true))
      return null;
  IWizard wizard = new NewArduinoSketchWizard();
  WizardDialog wd = new WizardDialog(ConsolePlugin.getStandardDisplay().getActiveShell(), wizard);
  wd.setTitle(wizard.getWindowTitle());
  wd.open();
  return null;
    }
}
TOP

Related Classes of it.baeyens.arduino.actions.NewSketchHandler

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.