mirror of
https://github.com/esp8266/Arduino.git
synced 2025-06-16 11:21:18 +03:00
Restored Preferences static delegate methods and marking them as @Deprecated
This commit is contained in:
@ -309,7 +309,7 @@ public class Base {
|
|||||||
// Save the preferences. For GUI mode, this happens in the quit
|
// Save the preferences. For GUI mode, this happens in the quit
|
||||||
// handler, but for other modes we should also make sure to save
|
// handler, but for other modes we should also make sure to save
|
||||||
// them.
|
// them.
|
||||||
Preferences.save();
|
PreferencesData.save();
|
||||||
|
|
||||||
if (parser.isInstallBoard()) {
|
if (parser.isInstallBoard()) {
|
||||||
ContributionsIndexer indexer = new ContributionsIndexer(BaseNoGui.getSettingsFolder());
|
ContributionsIndexer indexer = new ContributionsIndexer(BaseNoGui.getSettingsFolder());
|
||||||
@ -988,7 +988,7 @@ public class Base {
|
|||||||
storeSketches();
|
storeSketches();
|
||||||
|
|
||||||
// Save out the current prefs state
|
// Save out the current prefs state
|
||||||
Preferences.save();
|
PreferencesData.save();
|
||||||
|
|
||||||
// Since this wasn't an actual Quit event, call System.exit()
|
// Since this wasn't an actual Quit event, call System.exit()
|
||||||
System.exit(0);
|
System.exit(0);
|
||||||
@ -1035,7 +1035,7 @@ public class Base {
|
|||||||
editor.internalCloseRunner();
|
editor.internalCloseRunner();
|
||||||
}
|
}
|
||||||
// Save out the current prefs state
|
// Save out the current prefs state
|
||||||
Preferences.save();
|
PreferencesData.save();
|
||||||
|
|
||||||
if (!OSUtils.isMacOS()) {
|
if (!OSUtils.isMacOS()) {
|
||||||
// If this was fired from the menu or an AppleEvent (the Finder),
|
// If this was fired from the menu or an AppleEvent (the Finder),
|
||||||
|
@ -2309,7 +2309,7 @@ public class Editor extends JFrame implements RunnerListener {
|
|||||||
// Store information on who's open and running
|
// Store information on who's open and running
|
||||||
// (in case there's a crash or something that can't be recovered)
|
// (in case there's a crash or something that can't be recovered)
|
||||||
base.storeSketches();
|
base.storeSketches();
|
||||||
Preferences.save();
|
PreferencesData.save();
|
||||||
|
|
||||||
// opening was successful
|
// opening was successful
|
||||||
return true;
|
return true;
|
||||||
|
@ -24,6 +24,7 @@ package processing.app;
|
|||||||
import processing.app.helpers.FileUtils;
|
import processing.app.helpers.FileUtils;
|
||||||
import processing.app.helpers.OSUtils;
|
import processing.app.helpers.OSUtils;
|
||||||
import processing.app.helpers.PreferencesHelper;
|
import processing.app.helpers.PreferencesHelper;
|
||||||
|
import processing.app.helpers.PreferencesMap;
|
||||||
import processing.app.legacy.PApplet;
|
import processing.app.legacy.PApplet;
|
||||||
|
|
||||||
import javax.swing.*;
|
import javax.swing.*;
|
||||||
@ -854,12 +855,69 @@ public class Preferences {
|
|||||||
dialog.setVisible(true);
|
dialog.setVisible(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Deprecated
|
||||||
static protected void save() {
|
protected static void save() {
|
||||||
PreferencesData.save();
|
PreferencesData.save();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Deprecated
|
||||||
|
public static String get(String attribute) {
|
||||||
|
return PreferencesData.get(attribute);
|
||||||
|
}
|
||||||
|
|
||||||
// .................................................................
|
@Deprecated
|
||||||
|
public static String get(String attribute, String defaultValue) {
|
||||||
|
return PreferencesData.get(attribute, defaultValue);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Deprecated
|
||||||
|
public static boolean has(String key) {
|
||||||
|
return PreferencesData.has(key);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Deprecated
|
||||||
|
public static void remove(String key) {
|
||||||
|
PreferencesData.remove(key);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Deprecated
|
||||||
|
public static void set(String attribute, String value) {
|
||||||
|
PreferencesData.set(attribute, value);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Deprecated
|
||||||
|
public static boolean getBoolean(String attribute) {
|
||||||
|
return PreferencesData.getBoolean(attribute);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Deprecated
|
||||||
|
public static void setBoolean(String attribute, boolean value) {
|
||||||
|
PreferencesData.setBoolean(attribute, value);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Deprecated
|
||||||
|
public static int getInteger(String attribute) {
|
||||||
|
return PreferencesData.getInteger(attribute);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Deprecated
|
||||||
|
public static int getInteger(String attribute, int defaultValue) {
|
||||||
|
return PreferencesData.getInteger(attribute, defaultValue);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Deprecated
|
||||||
|
public static void setInteger(String key, int value) {
|
||||||
|
PreferencesData.setInteger(key, value);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Deprecated
|
||||||
|
public static PreferencesMap getMap() {
|
||||||
|
return PreferencesData.getMap();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Deprecated
|
||||||
|
public static void setDoSave(boolean value) {
|
||||||
|
PreferencesData.setDoSave(value);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user