deprecate old configuration
This commit is contained in:
parent
d7f34a35db
commit
ba221786c1
@ -3,7 +3,10 @@ package de.marhali.easyi18n.action;
|
|||||||
import com.intellij.icons.AllIcons;
|
import com.intellij.icons.AllIcons;
|
||||||
import com.intellij.openapi.actionSystem.AnAction;
|
import com.intellij.openapi.actionSystem.AnAction;
|
||||||
import com.intellij.openapi.actionSystem.AnActionEvent;
|
import com.intellij.openapi.actionSystem.AnActionEvent;
|
||||||
import de.marhali.easyi18n.dialog.SettingsDialog;
|
import com.intellij.openapi.options.ShowSettingsUtil;
|
||||||
|
|
||||||
|
import de.marhali.easyi18n.settings.ProjectSettingsConfigurable;
|
||||||
|
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
import java.util.ResourceBundle;
|
import java.util.ResourceBundle;
|
||||||
@ -21,6 +24,6 @@ public class SettingsAction extends AnAction {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void actionPerformed(@NotNull AnActionEvent e) {
|
public void actionPerformed(@NotNull AnActionEvent e) {
|
||||||
new SettingsDialog(e.getProject()).showAndHandle();
|
ShowSettingsUtil.getInstance().showSettingsDialog(e.getProject(), ProjectSettingsConfigurable.class);
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -28,6 +28,7 @@ import java.util.ResourceBundle;
|
|||||||
* Plugin configuration dialog.
|
* Plugin configuration dialog.
|
||||||
* @author marhali
|
* @author marhali
|
||||||
*/
|
*/
|
||||||
|
@Deprecated
|
||||||
public class SettingsDialog {
|
public class SettingsDialog {
|
||||||
|
|
||||||
private final Project project;
|
private final Project project;
|
||||||
|
@ -8,6 +8,7 @@ import org.jetbrains.annotations.Nullable;
|
|||||||
* Represents the persistent settings which can be configured.
|
* Represents the persistent settings which can be configured.
|
||||||
* @author marhali
|
* @author marhali
|
||||||
*/
|
*/
|
||||||
|
@Deprecated
|
||||||
public class SettingsState {
|
public class SettingsState {
|
||||||
|
|
||||||
public static final String DEFAULT_PREVIEW_LOCALE = "en";
|
public static final String DEFAULT_PREVIEW_LOCALE = "en";
|
||||||
|
@ -13,6 +13,7 @@ import org.jetbrains.annotations.NotNull;
|
|||||||
* @author marhali
|
* @author marhali
|
||||||
*/
|
*/
|
||||||
@State(name = "EasyI18nSettings")
|
@State(name = "EasyI18nSettings")
|
||||||
|
@Deprecated
|
||||||
public class SettingsService implements PersistentStateComponent<SettingsState> {
|
public class SettingsService implements PersistentStateComponent<SettingsState> {
|
||||||
|
|
||||||
public static SettingsService getInstance(Project project) {
|
public static SettingsService getInstance(Project project) {
|
||||||
@ -30,6 +31,10 @@ public class SettingsService implements PersistentStateComponent<SettingsState>
|
|||||||
return state;
|
return state;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setState(SettingsState state) {
|
||||||
|
this.state = state;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void loadState(@NotNull SettingsState state) {
|
public void loadState(@NotNull SettingsState state) {
|
||||||
this.state = state;
|
this.state = state;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user