-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathSQLFormatterConfig.java
More file actions
39 lines (32 loc) · 1.15 KB
/
Copy pathSQLFormatterConfig.java
File metadata and controls
39 lines (32 loc) · 1.15 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
import com.intellij.openapi.components.PersistentStateComponent;
import com.intellij.openapi.components.ServiceManager;
import com.intellij.openapi.components.State;
import com.intellij.openapi.components.Storage;
import com.intellij.util.xmlb.XmlSerializerUtil;
import org.jetbrains.annotations.NotNull;
@State(
name = "SQLFormatterConfig",
storages = {
@Storage("intellij-plugin-SQLFormatter.xml")
}
)
public class SQLFormatterConfig implements PersistentStateComponent<SQLFormatterConfig> {
private boolean removeNewLineCode = false;
@Override
public SQLFormatterConfig getState() {
return this;
}
@Override
public void loadState(@NotNull SQLFormatterConfig config) {
XmlSerializerUtil.copyBean(config, this);
}
public static SQLFormatterConfig getInstance() {
return ServiceManager.getService(SQLFormatterConfig.class);
}
public boolean isRemoveNewLineCode() {
return removeNewLineCode;
}
public void setRemoveNewLineCode(boolean removeNewLineCode) {
this.removeNewLineCode = removeNewLineCode;
}
}