-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathUserLogin.java
More file actions
56 lines (47 loc) · 2.12 KB
/
UserLogin.java
File metadata and controls
56 lines (47 loc) · 2.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
package testpluginproject;
import org.eclipse.core.runtime.preferences.InstanceScope;
import org.eclipse.jface.preference.BooleanFieldEditor;
import org.eclipse.jface.preference.ComboFieldEditor;
import org.eclipse.jface.preference.DirectoryFieldEditor;
import org.eclipse.jface.preference.FieldEditorPreferencePage;
import org.eclipse.jface.preference.RadioGroupFieldEditor;
import org.eclipse.jface.preference.StringFieldEditor;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchPreferencePage;
import org.eclipse.ui.preferences.ScopedPreferenceStore;
public class UserLogin extends FieldEditorPreferencePage implements IWorkbenchPreferencePage {
public UserLogin() {
super(GRID);
}
public void createFieldEditors() {
addField(new StringFieldEditor("USERNAME", "Unity ID:", getFieldEditorParent()));
addField(new StringFieldEditor("EMAIL", "NCSU Email:", getFieldEditorParent()));
String[][] semesterOptions = {
{"Fall", "Fall"},
{"Spring", "Spring"},
{"Summer 1", "Summer1"},
{"Summer 2", "Summer2"},
{"Summer 1 and 2", "Summer1&2"},
};
addField(new ComboFieldEditor("SEMESTER", "Semester:", semesterOptions, getFieldEditorParent()));
String[][] courseOptions = {
{"CSC116", "116"},
{"CSC216", "216"},
{"CSC316", "316"},
{"CSC416", "416"},
};
addField(new ComboFieldEditor("COURSE", "Course Number:", courseOptions, getFieldEditorParent()));
String[][] sectionOptions = {
{"Section 001", "001"},
{"Section 002", "002"},
{"Section 003", "003"}
};
addField(new ComboFieldEditor("SECTION", "Section:", sectionOptions, getFieldEditorParent()));
}
@Override
public void init(IWorkbench workbench) {
// second parameter is typically the plug-in id
setPreferenceStore(new ScopedPreferenceStore(InstanceScope.INSTANCE, "csc.plugin.prefs.page"));
setDescription("CSC Student Info");
}
}