use of com.intellij.openapi.extensions.ExtensionPointName in project intellij-community by JetBrains.
the class EduCCModuleBuilder method modifySettingsStep.
@Nullable
@Override
public ModuleWizardStep modifySettingsStep(@NotNull SettingsStep settingsStep) {
ModuleWizardStep javaSettingsStep = ProjectWizardStepFactory.getInstance().createJavaSettingsStep(settingsStep, this, Conditions.alwaysTrue());
Function<JTextField, String> getValue = JTextComponent::getText;
getWizardInputField("ccname", "", "Name:", myPanel.getNameField(), getValue).addToSettings(settingsStep);
getWizardInputField("ccauthor", "", "Author:", myPanel.getAuthorField(), getValue).addToSettings(settingsStep);
LanguageExtensionPoint[] extensions = new ExtensionPointName<LanguageExtensionPoint>(EduCourseConfigurator.EP_NAME).getExtensions();
myLanguageComboBox.removeAllItems();
for (LanguageExtensionPoint extension : extensions) {
String languageId = extension.getKey();
Language language = Language.findLanguageByID(languageId);
if (language == null) {
LOG.info("Language with id " + languageId + " not found");
}
myLanguageComboBox.addItem(new LanguageWrapper(language));
}
getWizardInputField("cclang", "", "Language:", myLanguageComboBox, comboBox -> (String) comboBox.getSelectedItem()).addToSettings(settingsStep);
getWizardInputField("ccdescr", "", "Description:", myPanel.getDescriptionField(), JTextArea::getText).addToSettings(settingsStep);
return javaSettingsStep;
}
Aggregations