mirror of
https://github.com/carlrobertoh/ProxyAI.git
synced 2026-05-12 05:51:28 +00:00
262 - Support auto code formatting (#292)
This commit is contained in:
parent
2372eec3cf
commit
ae7f5d17db
5 changed files with 56 additions and 8 deletions
|
|
@ -43,6 +43,7 @@ public class ConfigurationComponent {
|
|||
private final JBTable table;
|
||||
private final JBCheckBox openNewTabCheckBox;
|
||||
private final JBCheckBox methodNameGenerationCheckBox;
|
||||
private final JBCheckBox autoFormattingCheckBox;
|
||||
private final JTextArea systemPromptTextArea;
|
||||
private final IntegerField maxTokensField;
|
||||
private final JBTextField temperatureField;
|
||||
|
|
@ -104,12 +105,16 @@ public class ConfigurationComponent {
|
|||
methodNameGenerationCheckBox = new JBCheckBox(
|
||||
CodeGPTBundle.get("configurationConfigurable.enableMethodNameGeneration.label"),
|
||||
configuration.isMethodRefactoringEnabled());
|
||||
autoFormattingCheckBox = new JBCheckBox(
|
||||
CodeGPTBundle.get("configurationConfigurable.autoFormatting.label"),
|
||||
configuration.isAutoFormattingEnabled());
|
||||
|
||||
mainPanel = FormBuilder.createFormBuilder()
|
||||
.addComponent(tablePanel)
|
||||
.addVerticalGap(4)
|
||||
.addComponent(openNewTabCheckBox)
|
||||
.addComponent(methodNameGenerationCheckBox)
|
||||
.addComponent(autoFormattingCheckBox)
|
||||
.addVerticalGap(4)
|
||||
.addComponent(new TitledSeparator(
|
||||
CodeGPTBundle.get("configurationConfigurable.section.assistant.title")))
|
||||
|
|
@ -267,6 +272,14 @@ public class ConfigurationComponent {
|
|||
methodNameGenerationCheckBox.setSelected(disableMethodNameGeneration);
|
||||
}
|
||||
|
||||
public boolean isAutoFormattingEnabled() {
|
||||
return autoFormattingCheckBox.isSelected();
|
||||
}
|
||||
|
||||
public void setAutoFormattingEnabled(boolean enabled) {
|
||||
autoFormattingCheckBox.setSelected(enabled);
|
||||
}
|
||||
|
||||
class RevertToDefaultsActionButton extends AnActionButton {
|
||||
|
||||
RevertToDefaultsActionButton() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue