mirror of https://github.com/rusefi/RomRaider.git
Fix up Static method references due to changes to Setting class.
This commit is contained in:
parent
ff935ee165
commit
34c31f87be
|
@ -338,7 +338,7 @@ public class Settings implements Serializable {
|
|||
}
|
||||
|
||||
public void setLoggerDefinitionFilePath(String loggerDefinitionFilePath) {
|
||||
this.loggerDefinitionFilePath = loggerDefinitionFilePath;
|
||||
Settings.loggerDefinitionFilePath = loggerDefinitionFilePath;
|
||||
}
|
||||
|
||||
public String getLoggerOutputDirPath() {
|
||||
|
@ -382,7 +382,7 @@ public class Settings implements Serializable {
|
|||
}
|
||||
|
||||
public void setLoggerProfileFilePath(String loggerProfileFilePath) {
|
||||
this.loggerProfileFilePath = loggerProfileFilePath;
|
||||
Settings.loggerProfileFilePath = loggerProfileFilePath;
|
||||
}
|
||||
|
||||
public void setLoggerOutputDirPath(String loggerOutputDirPath) {
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
|
||||
package com.romraider.logger.ecu.ui.swing.menubar.action;
|
||||
|
||||
import com.romraider.Settings;
|
||||
import com.romraider.logger.ecu.EcuLogger;
|
||||
import static com.romraider.logger.ecu.ui.swing.menubar.util.FileHelper.getDefinitionFileChooser;
|
||||
import static com.romraider.logger.ecu.ui.swing.menubar.util.FileHelper.getFile;
|
||||
|
@ -44,7 +45,8 @@ public final class LoggerDefinitionLocationAction extends AbstractAction {
|
|||
}
|
||||
|
||||
private void setDefinitionLocationDialog() throws Exception {
|
||||
File lastConfigPath = getFile(logger.getSettings().getLoggerDefinitionFilePath());
|
||||
logger.getSettings();
|
||||
File lastConfigPath = getFile(Settings.getLoggerDefinitionFilePath());
|
||||
JFileChooser fc = getDefinitionFileChooser(lastConfigPath);
|
||||
if (fc.showOpenDialog(logger) == APPROVE_OPTION) {
|
||||
String path = fc.getSelectedFile().getAbsolutePath();
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
|
||||
package com.romraider.logger.ecu.ui.swing.menubar.action;
|
||||
|
||||
import com.romraider.Settings;
|
||||
import com.romraider.logger.ecu.EcuLogger;
|
||||
import com.romraider.swing.menubar.action.AbstractAction;
|
||||
import java.awt.event.ActionEvent;
|
||||
|
@ -31,7 +32,8 @@ public final class ReloadProfileAction extends AbstractAction {
|
|||
|
||||
public void actionPerformed(ActionEvent actionEvent) {
|
||||
try {
|
||||
logger.loadUserProfile(logger.getSettings().getLoggerProfileFilePath());
|
||||
logger.getSettings();
|
||||
logger.loadUserProfile(Settings.getLoggerProfileFilePath());
|
||||
} catch (Exception e) {
|
||||
logger.reportError(e);
|
||||
}
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
|
||||
package com.romraider.logger.ecu.ui.swing.menubar.action;
|
||||
|
||||
import com.romraider.Settings;
|
||||
import com.romraider.logger.ecu.EcuLogger;
|
||||
import static com.romraider.logger.ecu.ui.swing.menubar.util.FileHelper.saveProfileToFile;
|
||||
import com.romraider.swing.menubar.action.AbstractAction;
|
||||
|
@ -40,7 +41,8 @@ public final class SaveProfileAction extends AbstractAction {
|
|||
}
|
||||
|
||||
private void saveProfile() throws Exception {
|
||||
File lastProfileFile = new File(logger.getSettings().getLoggerProfileFilePath());
|
||||
logger.getSettings();
|
||||
File lastProfileFile = new File(Settings.getLoggerProfileFilePath());
|
||||
String profileFilePath = saveProfileToFile(logger.getCurrentProfile(), lastProfileFile);
|
||||
logger.getSettings().setLoggerProfileFilePath(profileFilePath);
|
||||
logger.reportMessageInTitleBar("Profile: " + profileFilePath);
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
|
||||
package com.romraider.logger.ecu.ui.swing.menubar.action;
|
||||
|
||||
import com.romraider.Settings;
|
||||
import com.romraider.logger.ecu.EcuLogger;
|
||||
import static com.romraider.logger.ecu.ui.swing.menubar.util.FileHelper.getFile;
|
||||
import static com.romraider.logger.ecu.ui.swing.menubar.util.FileHelper.getProfileFileChooser;
|
||||
|
@ -46,7 +47,8 @@ public final class SaveProfileAsAction extends AbstractAction {
|
|||
}
|
||||
|
||||
private void saveProfileAs() throws Exception {
|
||||
File lastProfileFile = getFile(logger.getSettings().getLoggerProfileFilePath());
|
||||
logger.getSettings();
|
||||
File lastProfileFile = getFile(Settings.getLoggerProfileFilePath());
|
||||
JFileChooser fc = getProfileFileChooser(lastProfileFile);
|
||||
if (fc.showSaveDialog(logger) == APPROVE_OPTION) {
|
||||
File selectedFile = fc.getSelectedFile();
|
||||
|
|
|
@ -272,12 +272,12 @@ public final class DOMSettingsBuilder {
|
|||
|
||||
// definition path
|
||||
IIOMetadataNode definition = new IIOMetadataNode("definition");
|
||||
definition.setAttribute("path", settings.getLoggerDefinitionFilePath());
|
||||
definition.setAttribute("path", Settings.getLoggerDefinitionFilePath());
|
||||
loggerSettings.appendChild(definition);
|
||||
|
||||
// profile path
|
||||
IIOMetadataNode profile = new IIOMetadataNode("profile");
|
||||
profile.setAttribute("path", settings.getLoggerProfileFilePath());
|
||||
profile.setAttribute("path", Settings.getLoggerProfileFilePath());
|
||||
loggerSettings.appendChild(profile);
|
||||
|
||||
// file logging
|
||||
|
|
|
@ -239,7 +239,7 @@ public final class DOMSettingsUnmarshaller {
|
|||
settings.setLoggerParameterListState(unmarshallAttribute(n, "showlist", true));
|
||||
|
||||
} else if (n.getNodeType() == ELEMENT_NODE && n.getNodeName().equalsIgnoreCase("definition")) {
|
||||
settings.setLoggerDefinitionFilePath(unmarshallAttribute(n, "path", settings.getLoggerDefinitionFilePath()));
|
||||
settings.setLoggerDefinitionFilePath(unmarshallAttribute(n, "path", Settings.getLoggerDefinitionFilePath()));
|
||||
|
||||
} else if (n.getNodeType() == ELEMENT_NODE && n.getNodeName().equalsIgnoreCase("profile")) {
|
||||
settings.setLoggerProfileFilePath(unmarshallAttribute(n, "path", ""));
|
||||
|
|
Loading…
Reference in New Issue