Skip to content

Commit

Permalink
Fix some deprecations (#289)
Browse files Browse the repository at this point in the history
  • Loading branch information
thepieterdc authored Apr 20, 2024
1 parent edd72c0 commit 79e1e3b
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,13 @@
public final class DodonaLoginDialog extends DialogWrapper {
@NonNls
private static final String API_TOKEN_URL = "https://dodona-edu.github.io/guides/creating-an-api-token/";

private final DodonaLoginPanel loginPanel;

private DodonaServer server;
private String token;
private User user;

/**
* DodonaLoginDialog constructor.
*
Expand All @@ -54,21 +54,21 @@ public final class DodonaLoginDialog extends DialogWrapper {
*/
public DodonaLoginDialog(@Nullable final Project project,
@Nullable final Component parent) {
super(project, parent, false, IdeModalityType.PROJECT);
super(project, parent, false, IdeModalityType.IDE);

this.loginPanel = new DodonaLoginPanel(project);

this.setOKButtonText(DodonaBundle.message("auth.dialog.sign_in"));
this.setTitle(DodonaBundle.message("auth.dialog.title"));
this.init();
}

@Nonnull
@Override
protected JComponent createCenterPanel() {
return this.loginPanel;
}

@Nonnull
@Override
protected JPanel createSouthAdditionalPanel() {
Expand All @@ -80,7 +80,7 @@ protected JPanel createSouthAdditionalPanel() {
}))
.addToRight(new JBLabel(AllIcons.Ide.External_link_arrow));
}

@Override
protected void doOKAction() {
final EmptyProgressIndicator indicator = new EmptyProgressIndicator(ModalityState.stateForComponent(this.loginPanel));
Expand All @@ -96,18 +96,18 @@ protected void doOKAction() {
}
});
}

@NotNull
@Override
protected List<ValidationInfo> doValidateAll() {
return this.loginPanel.doValidateAll();
}

@Override
public JComponent getPreferredFocusedComponent() {
return this.loginPanel.getPreferredFocus();
}

/**
* Gets the server url.
*
Expand All @@ -117,7 +117,7 @@ public JComponent getPreferredFocusedComponent() {
public DodonaServer getServer() {
return this.server;
}

/**
* Gets the authentication token.
*
Expand All @@ -126,7 +126,7 @@ public DodonaServer getServer() {
public String getToken() {
return this.token;
}

/**
* Gets the authenticated user.
*
Expand All @@ -136,4 +136,4 @@ public String getToken() {
public User getUser() {
return this.user;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@
*/
public final class SubmissionDetailsDialog extends DialogWrapper {
private static final Action[] NO_ACTIONS = {};

private final SubmissionDetailsPanel detailsPanel;

/**
* SubmissionCodeDialog constructor.
*
Expand All @@ -42,29 +42,29 @@ public SubmissionDetailsDialog(final Project project,
final DodonaExecutorHolder executor,
final SubmissionInfo submissionInfo,
@Nullable final Component parent) {
super(project, parent, false, IdeModalityType.PROJECT);
super(project, parent, false, IdeModalityType.IDE);
this.detailsPanel = new SubmissionDetailsPanel(
project, executor, submissionInfo
);

// Set the title of the dialog.
this.setTitle(DodonaBundle.message("dialog.submission_details.title"));

this.init();
}

@NotNull
@Override
protected Action[] createActions() {
return NO_ACTIONS;
}

@Nonnull
@Override
protected JComponent createCenterPanel() {
return this.detailsPanel;
}

@Override
public void dispose() {
Disposer.dispose(this.detailsPanel);
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/META-INF/plugin.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!-- DO NOT ALTER THE INDENTATION OF THIS FILE AS THIS WILL BREAK THINGS -->
<idea-plugin url="https://plugins.jetbrains.com/plugin/11166-dodona">
<idea-plugin url="https://plugins.jetbrains.com/plugin/11166-dodona" requires-restart="false">
<id>be.ugent.piedcler.dodona</id>
<name>Dodona</name>

Expand Down

0 comments on commit 79e1e3b

Please sign in to comment.