use of com.intellij.openapi.options.ShowSettingsUtil in project intellij-community by JetBrains.
the class EditInspectionToolsSettingsAction method editSettings.
public static boolean editSettings(final Project project, final InspectionProfileImpl inspectionProfile, final Consumer<ErrorsConfigurable> configurableAction) {
final ShowSettingsUtil settingsUtil = ShowSettingsUtil.getInstance();
final ErrorsConfigurable errorsConfigurable = new ProjectInspectionToolsConfigurable(ProjectInspectionProfileManager.getInstance(project)) {
@Override
protected boolean setActiveProfileAsDefaultOnApply() {
return false;
}
@Override
protected InspectionProfileImpl getCurrentProfile() {
return inspectionProfile;
}
};
return settingsUtil.editConfigurable(project, errorsConfigurable, () -> configurableAction.accept(errorsConfigurable));
}
use of com.intellij.openapi.options.ShowSettingsUtil in project intellij-community by JetBrains.
the class IntentionDescriptionPanel method setupPoweredByPanel.
private void setupPoweredByPanel(final IntentionActionMetaData actionMetaData) {
PluginId pluginId = actionMetaData == null ? null : actionMetaData.getPluginId();
JComponent owner;
if (pluginId == null) {
@NonNls String label = XmlStringUtil.wrapInHtml("<b>" + ApplicationNamesInfo.getInstance().getFullProductName() + "</b>");
owner = new JLabel(label);
} else {
final IdeaPluginDescriptor pluginDescriptor = PluginManager.getPlugin(pluginId);
HyperlinkLabel label = new HyperlinkLabel(CodeInsightBundle.message("powered.by.plugin", pluginDescriptor.getName()));
label.addHyperlinkListener(new HyperlinkListener() {
@Override
public void hyperlinkUpdate(HyperlinkEvent e) {
final ShowSettingsUtil util = ShowSettingsUtil.getInstance();
final PluginManagerConfigurable pluginConfigurable = new PluginManagerConfigurable(PluginManagerUISettings.getInstance());
final Project project = ProjectManager.getInstance().getDefaultProject();
util.editConfigurable(project, pluginConfigurable, () -> pluginConfigurable.select(pluginDescriptor));
}
});
owner = label;
}
//myPoweredByContainer.setVisible(true);
myPoweredByPanel.removeAll();
myPoweredByPanel.add(owner, BorderLayout.CENTER);
}
use of com.intellij.openapi.options.ShowSettingsUtil in project intellij-community by JetBrains.
the class AllFileTemplatesConfigurable method editCodeTemplate.
public static void editCodeTemplate(@NotNull final String templateId, Project project) {
final ShowSettingsUtil util = ShowSettingsUtil.getInstance();
final AllFileTemplatesConfigurable configurable = new AllFileTemplatesConfigurable(project);
util.editConfigurable(project, configurable, () -> {
configurable.myTabbedPane.setSelectedIndex(ArrayUtil.indexOf(configurable.myTabs, configurable.myCodeTemplatesList));
for (FileTemplate template : configurable.myCodeTemplatesList.getTemplates()) {
if (Comparing.equal(templateId, template.getName())) {
configurable.myCodeTemplatesList.selectTemplate(template);
break;
}
}
});
}
use of com.intellij.openapi.options.ShowSettingsUtil in project intellij-community by JetBrains.
the class CustomizeUIAction method actionPerformed.
public void actionPerformed(AnActionEvent e) {
final Project project = e.getData(CommonDataKeys.PROJECT);
final ShowSettingsUtil util = ShowSettingsUtil.getInstance();
util.editConfigurable(project, new CustomizationConfigurable());
}
use of com.intellij.openapi.options.ShowSettingsUtil in project android by JetBrains.
the class AndroidTemplateProjectStructureAction method actionPerformed.
@Override
public void actionPerformed(final AnActionEvent e) {
Project project = ProjectManagerEx.getInstanceEx().getDefaultProject();
AndroidProjectStructureConfigurable configurable = AndroidProjectStructureConfigurable.getInstance(project);
ShowSettingsUtil settings = ShowSettingsUtil.getInstance();
settings.editConfigurable(project, SettingsDialog.DIMENSION_KEY, configurable, true);
}
Aggregations