@@ -41,7 +41,7 @@ public class ResetAction extends AnAction implements DumbAware {
|
||||
}
|
||||
|
||||
if (project == null) {
|
||||
MainDialog mainDialog = new MainDialog();
|
||||
MainDialog mainDialog = new MainDialog(ACTION_NAME);
|
||||
mainDialog.show();
|
||||
|
||||
return;
|
||||
|
||||
@@ -13,6 +13,7 @@ public class Constants {
|
||||
public static final PluginId PLUGIN_ID = CLASS_LOADER.getPluginId();
|
||||
public static final IdeaPluginDescriptor PLUGIN_DESC = PluginManager.getPlugin(PLUGIN_ID);
|
||||
public static final String PLUGIN_NAME = PLUGIN_DESC.getName();
|
||||
public static final String PLUGIN_VERSION = PLUGIN_DESC.getVersion();
|
||||
public static final String IDE_NAME = ApplicationNamesInfo.getInstance().getProductName();
|
||||
public static final String IDE_NAME_LOWER = IDE_NAME.toLowerCase();
|
||||
public static final String IDE_HASH = Integer.toHexString(FileUtil.pathHashCode(PathManager.getHomePath()));
|
||||
|
||||
@@ -6,10 +6,10 @@ import io.zhile.research.intellij.ier.ui.form.MainForm;
|
||||
import javax.swing.*;
|
||||
|
||||
public class MainDialog extends DialogWrapper {
|
||||
public MainDialog() {
|
||||
public MainDialog(String title) {
|
||||
super(true);
|
||||
init();
|
||||
setTitle("Eval Reset");
|
||||
setTitle(title);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -26,31 +26,6 @@
|
||||
</component>
|
||||
</children>
|
||||
</grid>
|
||||
<grid id="f8be5" layout-manager="FlowLayout" hgap="5" vgap="5" flow-align="2">
|
||||
<constraints border-constraint="South"/>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<component id="3e8db" class="javax.swing.JCheckBox" binding="chkResetAuto">
|
||||
<constraints/>
|
||||
<properties>
|
||||
<text value="Auto reset before per restart"/>
|
||||
</properties>
|
||||
</component>
|
||||
<component id="382d3" class="javax.swing.JButton" binding="btnReload">
|
||||
<constraints/>
|
||||
<properties>
|
||||
<text value="Reload"/>
|
||||
</properties>
|
||||
</component>
|
||||
<component id="7f8d9" class="javax.swing.JButton" binding="btnReset">
|
||||
<constraints/>
|
||||
<properties>
|
||||
<text value="Reset"/>
|
||||
</properties>
|
||||
</component>
|
||||
</children>
|
||||
</grid>
|
||||
<grid id="60ebc" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints border-constraint="Center"/>
|
||||
<properties/>
|
||||
@@ -94,6 +69,54 @@
|
||||
</grid>
|
||||
</children>
|
||||
</grid>
|
||||
<grid id="e427f" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints border-constraint="South"/>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<grid id="f8be5" layout-manager="FlowLayout" hgap="5" vgap="5" flow-align="2">
|
||||
<constraints border-constraint="Center"/>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<component id="3e8db" class="javax.swing.JCheckBox" binding="chkResetAuto">
|
||||
<constraints/>
|
||||
<properties>
|
||||
<text value="Auto reset before per restart"/>
|
||||
</properties>
|
||||
</component>
|
||||
<component id="382d3" class="javax.swing.JButton" binding="btnReload">
|
||||
<constraints/>
|
||||
<properties>
|
||||
<text value="Reload"/>
|
||||
</properties>
|
||||
</component>
|
||||
<component id="7f8d9" class="javax.swing.JButton" binding="btnReset">
|
||||
<constraints/>
|
||||
<properties>
|
||||
<text value="Reset"/>
|
||||
</properties>
|
||||
</component>
|
||||
</children>
|
||||
</grid>
|
||||
<grid id="ee6d2" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints border-constraint="West"/>
|
||||
<properties/>
|
||||
<border type="empty">
|
||||
<size top="0" left="5" bottom="0" right="5"/>
|
||||
</border>
|
||||
<children>
|
||||
<component id="fbfed" class="javax.swing.JLabel" binding="lblVersion">
|
||||
<constraints border-constraint="Center"/>
|
||||
<properties>
|
||||
<enabled value="false"/>
|
||||
<text value="v1.0.0"/>
|
||||
</properties>
|
||||
</component>
|
||||
</children>
|
||||
</grid>
|
||||
</children>
|
||||
</grid>
|
||||
</children>
|
||||
</grid>
|
||||
</form>
|
||||
|
||||
@@ -24,6 +24,7 @@ public class MainForm {
|
||||
private JLabel lblFound;
|
||||
private JLabel lblLastResetTimeLabel;
|
||||
private JCheckBox chkResetAuto;
|
||||
private JLabel lblVersion;
|
||||
|
||||
private final DialogWrapper dialogWrapper;
|
||||
private final DefaultListModel<String> listModel = new DefaultListModel<>();
|
||||
@@ -37,6 +38,8 @@ public class MainForm {
|
||||
boldFont(lblLastResetTimeLabel);
|
||||
reloadLastResetTime();
|
||||
|
||||
lblVersion.setText("v" + Constants.PLUGIN_VERSION);
|
||||
|
||||
chkResetAuto.setSelected(Resetter.isAutoReset());
|
||||
chkResetAuto.addActionListener(new AbstractAction() {
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user