本文整理汇总了Java中com.intellij.ide.util.projectWizard.SettingsStep类的典型用法代码示例。如果您正苦于以下问题:Java SettingsStep类的具体用法?Java SettingsStep怎么用?Java SettingsStep使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
SettingsStep类属于com.intellij.ide.util.projectWizard包,在下文中一共展示了SettingsStep类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: modifySettingsStep
import com.intellij.ide.util.projectWizard.SettingsStep; //导入依赖的package包/类
@Nullable
@Override
public ModuleWizardStep modifySettingsStep(@NotNull SettingsStep settingsStep) {
if (myTemplate == null) {
return super.modifySettingsStep(settingsStep);
}
final WebProjectGenerator.GeneratorPeer peer = myTemplate.getPeer();
peer.buildUI(settingsStep);
return new ModuleWizardStep() {
@Override
public JComponent getComponent() {
return null;
}
@Override
public void updateDataModel() {
}
@Override
public boolean validate() throws ConfigurationException {
ValidationInfo info = peer.validate();
if (info != null) throw new ConfigurationException(info.message);
return true;
}
};
}
示例2: AndroidApplicationModifiedSettingsStep
import com.intellij.ide.util.projectWizard.SettingsStep; //导入依赖的package包/类
AndroidApplicationModifiedSettingsStep(@NotNull AndroidModuleBuilder builder, @NotNull SettingsStep settingsStep) {
super(builder, settingsStep);
final String applicationName = builder.getApplicationName();
if (applicationName != null && applicationName.length() > 0) {
settingsStep.getModuleNameField().setText(applicationName);
}
final String[] items = {TARGET_DO_NOT_CREATE_RUN_CONF, TARGET_SHOW_CHOOSER_DIALOG,
TARGET_USB_DEVICE, TARGET_EMULATOR};
myTargetDeviceCombo = new ComboBox(items);
settingsStep.addSettingsField("\u001BTarget device: ", myTargetDeviceCombo);
final String prevTargetMode = PropertiesComponent.getInstance().getValue(TARGET_SELECTION_MODE_FOR_NEW_MODULE_PROPERTY);
myTargetDeviceCombo.setSelectedItem(prevTargetMode != null && ArrayUtil.contains(prevTargetMode, items)
? prevTargetMode
: TARGET_SHOW_CHOOSER_DIALOG);
}
示例3: modifySettingsStep
import com.intellij.ide.util.projectWizard.SettingsStep; //导入依赖的package包/类
@Nullable
@Override
public ModuleWizardStep modifySettingsStep(@NotNull final SettingsStep settingsStep) {
if (myProjectType == null) {
return super.modifyProjectTypeStep(settingsStep);
}
switch (myProjectType) {
case APPLICATION:
return new AndroidApplicationModifiedSettingsStep(this, settingsStep);
case LIBRARY:
return new AndroidLibraryModifiedSettingsStep(this, settingsStep);
case TEST:
return new AndroidTestModifiedSettingsStep(this, settingsStep);
default:
LOG.error("Unknown project type " + myProjectType);
return super.modifyProjectTypeStep(settingsStep);
}
}
示例4: modifySettingsStep
import com.intellij.ide.util.projectWizard.SettingsStep; //导入依赖的package包/类
@Nullable
@Override
public ModuleWizardStep modifySettingsStep(@NotNull SettingsStep settingsStep) {
if (settingsStep instanceof ProjectSettingsStep) {
final ProjectSettingsStep projectSettingsStep = (ProjectSettingsStep)settingsStep;
if (myProjectId != null) {
final JTextField moduleNameField = settingsStep.getModuleNameField();
if (moduleNameField != null) {
moduleNameField.setText(myProjectId.getArtifactId());
}
projectSettingsStep.setModuleName(myProjectId.getArtifactId());
}
projectSettingsStep.bindModuleSettings();
}
return super.modifySettingsStep(settingsStep);
}
示例5: modifySettingsStep
import com.intellij.ide.util.projectWizard.SettingsStep; //导入依赖的package包/类
@Nullable
@Override
public ModuleWizardStep modifySettingsStep(@NotNull SettingsStep settingsStep) {
if (myTemplate == null) {
return super.modifySettingsStep(settingsStep);
}
WebProjectGenerator.GeneratorPeer peer = myTemplate.getPeer();
peer.buildUI(settingsStep);
return new ModuleWizardStep() {
@Override
public JComponent getComponent() {
return null;
}
@Override
public void updateDataModel() {
}
};
}
示例6: modifySettingsStep
import com.intellij.ide.util.projectWizard.SettingsStep; //导入依赖的package包/类
@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);
myLanguageComboBox.removeAllItems();
for (LanguageExtensionPoint extension : Extensions.<LanguageExtensionPoint>getExtensions(EduPluginConfigurator.EP_NAME, null)) {
String languageId = extension.getKey();
Language language = Language.findLanguageByID(languageId);
if (language == null) {
LOG.info("Language with id " + languageId + " not found");
continue;
}
myLanguageComboBox.addItem(new LanguageWrapper(language));
}
getWizardInputField("cclang", "", "Language:", myLanguageComboBox, comboBox -> (String) comboBox.getSelectedItem())
.addToSettings(settingsStep);
JTextArea descriptionField = myPanel.getDescriptionField();
descriptionField.setRows(4);
descriptionField.setBorder(null);
descriptionField.invalidate();
JBScrollPane scrollPane = new JBScrollPane(descriptionField);
scrollPane.setMinimumSize(scrollPane.getUI().getPreferredSize(descriptionField));
getWizardInputField("ccdescr", "", "Description:", scrollPane, pane -> descriptionField.getText()).addToSettings(settingsStep);
return javaSettingsStep;
}
示例7: modifyProjectTypeStep
import com.intellij.ide.util.projectWizard.SettingsStep; //导入依赖的package包/类
@Override
public ModuleWizardStep modifyProjectTypeStep(@NotNull SettingsStep settingsStep) {
return new SdkSettingsStep(settingsStep, this, new Condition<SdkTypeId>() {
@Override
public boolean value(SdkTypeId id) {
return PythonSdkType.getInstance() == id;
}
}) {
@Override
protected void onSdkSelected(Sdk sdk) {
setSdk(sdk);
}
};
}
示例8: AndroidTestModifiedSettingsStep
import com.intellij.ide.util.projectWizard.SettingsStep; //导入依赖的package包/类
public AndroidTestModifiedSettingsStep(@NotNull AndroidModuleBuilder builder, @NotNull SettingsStep settingsStep) {
super(builder, settingsStep);
myModulesCombo = new AndroidModulesComboBox();
myProject = settingsStep.getContext().getProject();
assert myProject != null : "test module can't be created as first module";
myModulesCombo.init(myProject);
settingsStep.addSettingsField("\u001BTested module: ", myModulesCombo);
}
示例9: updatePackageNameField
import com.intellij.ide.util.projectWizard.SettingsStep; //导入依赖的package包/类
private void updatePackageNameField(SettingsStep settingsStep) {
final String moduleName = settingsStep.getModuleNameField().getText().trim();
if (moduleName.length() > 0) {
myPackageNameField.setText(AndroidAppPropertiesEditor.getDefaultPackageNameByModuleName(moduleName));
}
}
示例10: AndroidModifiedSettingsStep
import com.intellij.ide.util.projectWizard.SettingsStep; //导入依赖的package包/类
AndroidModifiedSettingsStep(@NotNull final AndroidModuleBuilder builder, @NotNull SettingsStep settingsStep) {
super(settingsStep, builder, new Condition<SdkTypeId>() {
@Override
public boolean value(SdkTypeId sdkType) {
return builder.isSuitableSdkType(sdkType);
}
});
myBuilder = builder;
}
示例11: modifySettingsStep
import com.intellij.ide.util.projectWizard.SettingsStep; //导入依赖的package包/类
@Nullable
@Override
public ModuleWizardStep modifySettingsStep(@NotNull SettingsStep settingsStep) {
if (myWizardState.hasAttr(ATTR_APP_TITLE)) {
final String applicationName = myWizardState.getString(ATTR_APP_TITLE);
if (!applicationName.isEmpty()) {
settingsStep.getModuleNameField().setText(applicationName.replace(" ", ""));
}
}
return null;
}
示例12: GroovySdkForNewModuleWizardStep
import com.intellij.ide.util.projectWizard.SettingsStep; //导入依赖的package包/类
public GroovySdkForNewModuleWizardStep(ModuleBuilder moduleBuilder,
WizardContext wizardContext,
@Nullable MvcFramework framework,
SettingsStep settingsStep) {
super(framework, wizardContext, moduleBuilder.getContentEntryPath());
moduleBuilder.addModuleConfigurationUpdater(createModuleConfigurationUpdater());
if (settingsStep != null) {
myJavaStep = JavaModuleType.getModuleType().modifyProjectTypeStep(settingsStep, moduleBuilder);
settingsStep.addSettingsField("\u001B" + (framework == null ? "Groovy" : framework.getDisplayName()) + " library:", getPanel().getSimplePanel());
}
}
示例13: modifyProjectTypeStep
import com.intellij.ide.util.projectWizard.SettingsStep; //导入依赖的package包/类
@Nullable
public ModuleWizardStep modifyProjectTypeStep(@NotNull SettingsStep settingsStep, @NotNull final ModuleBuilder moduleBuilder) {
return ProjectWizardStepFactory.getInstance().createJavaSettingsStep(settingsStep, moduleBuilder, new Condition() {
@Override
public boolean value(Object o) {
return true;
}
public boolean value(SdkTypeId sdkType) {
return moduleBuilder.isSuitableSdkType(sdkType);
}
});
}
示例14: DefracModifiedSettingsStep
import com.intellij.ide.util.projectWizard.SettingsStep; //导入依赖的package包/类
public DefracModifiedSettingsStep(final SettingsStep settingsStep, final DefracModuleBuilder moduleBuilder) {
super(settingsStep, moduleBuilder, new Condition<SdkTypeId>() {
@Override
public boolean value(final SdkTypeId sdkTypeId) {
return moduleBuilder.isSuitableSdkType(sdkTypeId);
}
});
this.moduleBuilder = moduleBuilder;
if(myJdkComboBox.getSelectedJdk() != null) {
onSdkSelected(myJdkComboBox.getSelectedJdk());
}
}
示例15: modifySettingsStep
import com.intellij.ide.util.projectWizard.SettingsStep; //导入依赖的package包/类
@Nullable
@Override
public ModuleWizardStep modifySettingsStep(@NotNull SettingsStep settingsStep) {
return new SdkSettingsStep(settingsStep, this, new Condition<SdkTypeId>() {
@Override
public boolean value(SdkTypeId sdkType) {
return isSuitableSdkType(sdkType);
}
});
}