Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing all Assert Usages #1096

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,11 @@ protected AbstractMMLButtonDialog(final JFrame frame, final boolean modal, final

/**
* This override forces the preferences for this class to be tracked in MML instead of MegaMek
* @throws Exception if there's an issue initializing the preferences. Normally this means
* a component has <strong>not</strong> had its name value set.
*/
@Override
protected void setPreferences() {
protected void setPreferences() throws Exception {
setPreferences(MegaMekLab.getMMLPreferences().forClass(getClass()));
}
}
7 changes: 5 additions & 2 deletions megameklab/src/megameklab/ui/dialog/AbstractMMLDialog.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
* Inheriting classes must call initialize() in their constructors and override createCenterPane().
*/
public abstract class AbstractMMLDialog extends AbstractDialog {

//region Constructors
/**
* This creates a non-modal AbstractMMLDialog using the default MML dialog resource bundle. This is
* the normal constructor to use for an AbstractMMLDialog.
Expand All @@ -53,12 +53,15 @@ protected AbstractMMLDialog(final JFrame frame, final boolean modal, final Resou
final String name, final String title) {
super(frame, modal, resources, name, title);
}
//endregion Constructors

/**
* This override forces the preferences for this class to be tracked in MML instead of MegaMek
* @throws Exception if there's an issue initializing the preferences. Normally this means
* a component has <strong>not</strong> had its name value set.
*/
@Override
protected void setPreferences() {
protected void setPreferences() throws Exception {
setPreferences(MegaMekLab.getMMLPreferences().forClass(getClass()));
}
}