feat: display notification on plugin updates

This commit is contained in:
Carl-Robert Linnupuu 2023-12-02 00:54:57 +02:00
parent 10b090e2d2
commit 1392775940
8 changed files with 125 additions and 4 deletions

View file

@ -41,6 +41,7 @@ public class ConfigurationComponent {
private final JPanel mainPanel;
private final JBTable table;
private final JBCheckBox checkForPluginUpdatesCheckBox;
private final JBCheckBox openNewTabCheckBox;
private final JBCheckBox methodNameGenerationCheckBox;
private final JBCheckBox autoFormattingCheckBox;
@ -99,6 +100,9 @@ public class ConfigurationComponent {
systemPromptTextArea.setColumns(60);
systemPromptTextArea.setRows(3);
checkForPluginUpdatesCheckBox = new JBCheckBox(
CodeGPTBundle.get("configurationConfigurable.checkForPluginUpdates.label"),
configuration.isCheckForPluginUpdates());
openNewTabCheckBox = new JBCheckBox(
CodeGPTBundle.get("configurationConfigurable.openNewTabCheckBox.label"),
configuration.isCreateNewChatOnEachAction());
@ -112,6 +116,7 @@ public class ConfigurationComponent {
mainPanel = FormBuilder.createFormBuilder()
.addComponent(tablePanel)
.addVerticalGap(4)
.addComponent(checkForPluginUpdatesCheckBox)
.addComponent(openNewTabCheckBox)
.addComponent(methodNameGenerationCheckBox)
.addComponent(autoFormattingCheckBox)
@ -256,6 +261,14 @@ public class ConfigurationComponent {
maxTokensField.setValue(maxTokens);
}
public boolean isCheckForPluginUpdates() {
return checkForPluginUpdatesCheckBox.isSelected();
}
public void setCheckForPluginUpdates(boolean checkForUpdates) {
checkForPluginUpdatesCheckBox.setSelected(checkForUpdates);
}
public boolean isCreateNewChatOnEachAction() {
return openNewTabCheckBox.isSelected();
}