本文整理汇总了Java中com.intellij.openapi.options.UnnamedConfigurable.apply方法的典型用法代码示例。如果您正苦于以下问题:Java UnnamedConfigurable.apply方法的具体用法?Java UnnamedConfigurable.apply怎么用?Java UnnamedConfigurable.apply使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.intellij.openapi.options.UnnamedConfigurable
的用法示例。
在下文中一共展示了UnnamedConfigurable.apply方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: apply
import com.intellij.openapi.options.UnnamedConfigurable; //导入方法依赖的package包/类
public void apply() throws ConfigurationException {
ExportToHTMLSettings exportToHTMLSettings = ExportToHTMLSettings.getInstance(myProject);
if (myRbCurrentFile.isSelected()){
exportToHTMLSettings.setPrintScope(PrintSettings.PRINT_FILE);
}
else if (myRbSelectedText.isSelected()){
exportToHTMLSettings.setPrintScope(PrintSettings.PRINT_SELECTED_TEXT);
}
else if (myRbCurrentPackage.isSelected()){
exportToHTMLSettings.setPrintScope(PrintSettings.PRINT_DIRECTORY);
}
exportToHTMLSettings.setIncludeSubpackages(myCbIncludeSubpackages.isSelected());
exportToHTMLSettings.PRINT_LINE_NUMBERS = myCbLineNumbers.isSelected();
exportToHTMLSettings.OPEN_IN_BROWSER = myCbOpenInBrowser.isSelected();
exportToHTMLSettings.OUTPUT_DIRECTORY = myTargetDirectoryField.getText();
for (UnnamedConfigurable printOption : myExtensions) {
printOption.apply();
}
}
示例2: doOKAction
import com.intellij.openapi.options.UnnamedConfigurable; //导入方法依赖的package包/类
protected void doOKAction() {
for (String vcsName : myVcsNameToConfigurableMap.keySet()) {
UnnamedConfigurable configurable = myVcsNameToConfigurableMap.get(vcsName);
if (configurable != null && configurable.isModified()) {
try {
configurable.apply();
}
catch (ConfigurationException e) {
Messages.showErrorDialog(VcsBundle.message("message.text.unable.to.save.settings", e.getMessage()),
VcsBundle.message("message.title.unable.to.save.settings"));
}
}
}
final JComboBox vcsesToUpdate = myVcsesToUpdate;
if (vcsesToUpdate != null) {
final VcsDescriptor wrapper = (VcsDescriptor) myVcses.getSelectedValue();
vcsesToUpdate.setSelectedItem(wrapper);
final ComboBoxModel model = vcsesToUpdate.getModel();
for(int i = 0; i < model.getSize(); i++){
final Object vcsWrapper = model.getElementAt(i);
if (vcsWrapper instanceof VcsDescriptor){
final VcsDescriptor defaultVcsWrapper = (VcsDescriptor) vcsWrapper;
if (defaultVcsWrapper.equals(wrapper)){
vcsesToUpdate.setSelectedIndex(i);
break;
}
}
}
}
super.doOKAction();
}
示例3: apply
import com.intellij.openapi.options.UnnamedConfigurable; //导入方法依赖的package包/类
public void apply() throws ConfigurationException {
mySettingsForm.getData(myImportingSettings);
MavenServerManager.getInstance().setMavenEmbedderVMOptions(myEmbedderVMOptions.getText());
String jdk = myEmbedderJdk.getSelectedValue();
if(jdk != null) {
MavenServerManager.getInstance().setEmbedderJdk(jdk);
}
for (final UnnamedConfigurable additionalConfigurable : myAdditionalConfigurables) {
additionalConfigurable.apply();
}
}
示例4: apply
import com.intellij.openapi.options.UnnamedConfigurable; //导入方法依赖的package包/类
public void apply() throws ConfigurationException {
mySettingsForm.getData(myImportingSettings);
MavenServerManager.getInstance().setUseMaven2(!myUseMaven3CheckBox.isSelected());
MavenServerManager.getInstance().setMavenEmbedderVMOptions(myEmbedderVMOptions.getText());
for (final UnnamedConfigurable additionalConfigurable : myAdditionalConfigurables) {
additionalConfigurable.apply();
}
}