-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathJmePluginState.java
More file actions
53 lines (46 loc) · 1.11 KB
/
Copy pathJmePluginState.java
File metadata and controls
53 lines (46 loc) · 1.11 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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
package com.ss.jme.plugin;
import com.intellij.util.xmlb.annotations.Property;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
/**
* The main state of this plugin.
*
* @author JavaSaBr
*/
@Getter
@EqualsAndHashCode
public class JmePluginState {
@NotNull
private static final String DEFAULT_JMB_PATH = "";
@NotNull
@Property
private String jmbPath;
JmePluginState() {
this.jmbPath = DEFAULT_JMB_PATH;
}
/**
* Copies state from the instance.
*
* @param other the other state instance.
*/
void copyOf(@Nullable JmePluginState other) {
if (other == null) {
this.jmbPath = DEFAULT_JMB_PATH;
} else {
this.jmbPath = other.jmbPath;
}
}
/**
* Sets the path to jMB.
*
* @param jmbPath the path to jMB.
*/
public void setJmbPath(@Nullable String jmbPath) {
this.jmbPath = jmbPath == null ? DEFAULT_JMB_PATH : jmbPath;
}
public String getJmbPath() {
return this.jmbPath;
}
}