/*******************************************************************************
* Copyright (c) 2008, 2011 Thomas Holland (thomas@innot.de) and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Thomas Holland - initial API and implementation
*******************************************************************************/
package de.innot.avreclipse.core.targets.tools;
import de.innot.avreclipse.core.targets.ITargetConfiguration;
import de.innot.avreclipse.core.targets.ITargetConfigurationTool;
import de.innot.avreclipse.core.targets.IToolFactory;
import de.innot.avreclipse.core.targets.ToolManager;
/**
* @author Thomas Holland
* @since
*
*/
public class AvrdudeToolFactory implements IToolFactory {
/*
* (non-Javadoc)
* @see de.innot.avreclipse.core.targets.IToolFactory#getId()
*/
public String getId() {
return AvrdudeTool.ID;
}
/*
* (non-Javadoc)
* @see de.innot.avreclipse.core.targets.IToolFactory#getName()
*/
public String getName() {
return AvrdudeTool.NAME;
}
/*
* (non-Javadoc)
* @see de.innot.avreclipse.core.targets.IToolFactory#isType(java.lang.String)
*/
public boolean isType(String tooltype) {
// AvrdudeTool is a programmer tool
if (ToolManager.AVRPROGRAMMERTOOL.equals(tooltype)) {
return true;
}
return false;
}
/*
* (non-Javadoc)
* @see
* de.innot.avreclipse.core.targets.IToolFactory#createTool(de.innot.avreclipse.core.targets
* .ITargetConfiguration)
*/
public ITargetConfigurationTool createTool(ITargetConfiguration hc) {
return new AvrdudeTool(hc);
}
}