mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
cleanup
This commit is contained in:
+2
-2
@@ -190,7 +190,7 @@ public class StorageUtil {
|
||||
public static boolean contentEquals(@NotNull final Document document, @NotNull final IFile file) {
|
||||
try {
|
||||
final Pair<String, String> pair = loadFile(file);
|
||||
return pair.first == null ? false : pair.first.equals(printDocumentToString(document, pair.second));
|
||||
return pair.first != null && pair.first.equals(printDocumentToString(document, pair.second));
|
||||
}
|
||||
catch (IOException e) {
|
||||
LOG.debug(e);
|
||||
@@ -201,7 +201,7 @@ public class StorageUtil {
|
||||
public static boolean contentEquals(@NotNull final Element element, @NotNull final IFile file) {
|
||||
try {
|
||||
final Pair<String, String> pair = loadFile(file);
|
||||
return pair.first == null ? false : pair.first.equals(printElement(element, pair.second));
|
||||
return pair.first != null && pair.first.equals(printElement(element, pair.second));
|
||||
}
|
||||
catch (IOException e) {
|
||||
LOG.debug(e);
|
||||
|
||||
@@ -164,7 +164,6 @@ public class ProgressWindow extends BlockingProgressIndicator implements Disposa
|
||||
final DialogWrapper popup = myDialog.myPopup;
|
||||
if (popup != null) {
|
||||
myFocusTrackback.registerFocusComponent(new FocusTrackback.ComponentQuery() {
|
||||
@SuppressWarnings({"ConstantConditions"})
|
||||
public Component getComponent() {
|
||||
return popup.getPreferredFocusedComponent();
|
||||
}
|
||||
@@ -250,7 +249,7 @@ public class ProgressWindow extends BlockingProgressIndicator implements Disposa
|
||||
if (isDialogShowing()) {
|
||||
if (myFocusTrackback != null) {
|
||||
myFocusTrackback.setWillBeSheduledForRestore();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
UIUtil.invokeLaterIfNeeded(new Runnable() {
|
||||
@@ -260,11 +259,12 @@ public class ProgressWindow extends BlockingProgressIndicator implements Disposa
|
||||
if (myDialog != null) {
|
||||
myDialog.hide();
|
||||
}
|
||||
|
||||
|
||||
if (myFocusTrackback != null) {
|
||||
if (wasShowing) {
|
||||
myFocusTrackback.restoreFocus();
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
myFocusTrackback.consume();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user