Skip to content

Commit

Permalink
[eclipse-platform#866] code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
ghentschke committed Apr 18, 2024
1 parent 84c14aa commit 4df9ed1
Showing 1 changed file with 2 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
import org.eclipse.core.runtime.Platform;
import org.eclipse.core.runtime.preferences.PreferenceMetadata;
import org.eclipse.jface.dialogs.Dialog;
import org.eclipse.jface.dialogs.DialogPage;
import org.eclipse.jface.dialogs.IMessageProvider;
import org.eclipse.jface.layout.GridDataFactory;
import org.eclipse.jface.preference.IPreferenceStore;
Expand Down Expand Up @@ -193,13 +192,9 @@ private static String validateDelay(String value) {

private void updateStatus(String errorMessage) {
setValid(errorMessage == null);
applyToStatusLine(this, errorMessage);
}

private static void applyToStatusLine(DialogPage page, String errorMessage) {
var messageType = errorMessage == null ? IMessageProvider.NONE : IMessageProvider.ERROR;
page.setMessage(errorMessage, messageType);
page.setErrorMessage(errorMessage);
setMessage(errorMessage, messageType);
setErrorMessage(errorMessage);
}

private static int parseInteger(Object value) throws NumberFormatException {
Expand Down

0 comments on commit 4df9ed1

Please sign in to comment.