deprecate old configuration

This commit is contained in:
marhali 2022-04-09 12:40:00 +02:00
parent d7f34a35db
commit ba221786c1
4 changed files with 12 additions and 2 deletions

View File

@ -3,7 +3,10 @@ package de.marhali.easyi18n.action;
import com.intellij.icons.AllIcons;
import com.intellij.openapi.actionSystem.AnAction;
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 java.util.ResourceBundle;
@ -21,6 +24,6 @@ public class SettingsAction extends AnAction {
@Override
public void actionPerformed(@NotNull AnActionEvent e) {
new SettingsDialog(e.getProject()).showAndHandle();
ShowSettingsUtil.getInstance().showSettingsDialog(e.getProject(), ProjectSettingsConfigurable.class);
}
}

View File

@ -28,6 +28,7 @@ import java.util.ResourceBundle;
* Plugin configuration dialog.
* @author marhali
*/
@Deprecated
public class SettingsDialog {
private final Project project;

View File

@ -8,6 +8,7 @@ import org.jetbrains.annotations.Nullable;
* Represents the persistent settings which can be configured.
* @author marhali
*/
@Deprecated
public class SettingsState {
public static final String DEFAULT_PREVIEW_LOCALE = "en";

View File

@ -13,6 +13,7 @@ import org.jetbrains.annotations.NotNull;
* @author marhali
*/
@State(name = "EasyI18nSettings")
@Deprecated
public class SettingsService implements PersistentStateComponent<SettingsState> {
public static SettingsService getInstance(Project project) {
@ -30,6 +31,10 @@ public class SettingsService implements PersistentStateComponent<SettingsState>
return state;
}
public void setState(SettingsState state) {
this.state = state;
}
@Override
public void loadState(@NotNull SettingsState state) {
this.state = state;