Add back SampleRobot Template

Add GettingStarted example based on IterativeRobot

Change-Id: Ic8caec4f62b7bdbaae7fafedfec5859b2f936809
This commit is contained in:
Kevin O'Connor
2014-08-14 07:46:49 -04:00
parent 70d09de2e9
commit 597e209c09
9 changed files with 190 additions and 5 deletions

View File

@@ -35,7 +35,7 @@ public class NewProjectMainPage extends WizardPage {
private Text worldText;
private Button worldButton;
Button iterativeRobot, commandRobot;
Button iterativeRobot, commandRobot, sampleRobot;
private boolean showPackage;
private boolean showProjectTypes;
private TeamNumberPage teamNumberPage;
@@ -109,6 +109,12 @@ public class NewProjectMainPage extends WizardPage {
gd = new GridData(GridData.FILL_HORIZONTAL);
gd.widthHint = 300;
commandRobot.setLayoutData(gd);
sampleRobot = new Button(projectTypeGroup, SWT.RADIO | SWT.WRAP);
sampleRobot.setText("Sample Robot: A robot project used for small sample programs or for highly advanced programs with more complete control over program flow");
gd = new GridData(GridData.FILL_HORIZONTAL);
gd.widthHint = 300;
sampleRobot.setLayoutData(gd);
}
label = new Label(container, SWT.NULL);
@@ -214,6 +220,7 @@ public class NewProjectMainPage extends WizardPage {
public ProjectType getProjectType() {
if (!showProjectTypes) return null;
else if (iterativeRobot.getSelection()) return types.get(ProjectType.ITERATIVE);
else if (sampleRobot.getSelection()) return types.get(ProjectType.SAMPLE);
else return types.get(ProjectType.COMMAND_BASED);
}

View File

@@ -4,7 +4,7 @@ import java.net.URL;
import java.util.Map;
public interface ProjectType {
String SIMPLE = "SIMPLE";
String SAMPLE = "SAMPLE";
String ITERATIVE = "ITERATIVE";
String COMMAND_BASED = "COMMAND_BASED";