Skip to content

Commit

Permalink
feat: 5.0.7 预发发布
Browse files Browse the repository at this point in the history
  • Loading branch information
[email protected] committed Apr 11, 2023
1 parent 9896779 commit 9f1cf0c
Showing 1 changed file with 8 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.plugins.mybaitslog;

import com.intellij.ide.util.PropertiesComponent;
import com.intellij.openapi.project.Project;

import java.awt.*;
import java.util.*;
Expand Down Expand Up @@ -35,7 +36,7 @@ public static class Idea {
public static final String DB_STARTUP_KEY = PROJECT_ID + "startup";


public static final String FORMAT_SQL = "formatsql:";
public static final String FORMAT_SQL_1 = PROJECT_ID + "SQL_FORMAT";

public static final String PARAMETERS = "SQLStructure:";

Expand Down Expand Up @@ -82,15 +83,15 @@ public static void setParameters(String value, String defaultValue) {
* @param value 值
*/
public static void setStartup(int value) {
PropertiesComponent.getInstance().setValue(DB_STARTUP_KEY, value, 1);
PropertiesComponent.getInstance().setValue(DB_STARTUP_KEY, Integer.toString(value), "1");
}

/**
* 获取启动过滤
*/
public static boolean getStartup() {
final int anInt = PropertiesComponent.getInstance().getInt(DB_STARTUP_KEY, 1);
return anInt == 1;
final String value = PropertiesComponent.getInstance().getValue(DB_STARTUP_KEY, "1");
return Integer.parseInt(value) == 1;
}

/**
Expand All @@ -99,15 +100,15 @@ public static boolean getStartup() {
* @param value 值
*/
public static void setFormatSql(int value) {
PropertiesComponent.getInstance().setValue(FORMAT_SQL, value, 1);
PropertiesComponent.getInstance().setValue(FORMAT_SQL_1, Integer.toString(value), "0");
}

/**
* 设置格式化
*/
public static boolean getFormatSql() {
final int anInt = PropertiesComponent.getInstance().getInt(FORMAT_SQL, 0);
return anInt == 1;
final String value = PropertiesComponent.getInstance().getValue(FORMAT_SQL_1, "0");
return Integer.parseInt(value) == 1;
}

/**
Expand Down

0 comments on commit 9f1cf0c

Please sign in to comment.