Skip to content

Commit a441844

Browse files
committed
Use ILog.of(Class).error in IDEApplication version-file logger
Replaces the cross-bundle call to org.eclipse.ui.internal.ide.StatusUtil .newError(...) in IDEApplication#writeVersion with ILog.of(IDEApplication .class).error(message, throwable), and drops the now-unused StatusUtil import. Behavior changes: - Plug-in id moves from "org.eclipse.ui.ide" (IDE_WORKBENCH constant in the called StatusUtil) to "org.eclipse.ui.ide.application", which is the bundle that actually emits the version-file write failure. - The previous IDEWorkbenchPlugin.log(message, status) helper emitted two separate log entries (one for the message, one for the status); this now produces a single coherent entry whose status carries both the context message and the throwable, removing the dependency on the potentially-null e.getLocalizedMessage().
1 parent d6a1501 commit a441844

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

  • bundles/org.eclipse.ui.ide.application/src/org/eclipse/ui/internal/ide/application

bundles/org.eclipse.ui.ide.application/src/org/eclipse/ui/internal/ide/application/IDEApplication.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636

3737
import org.eclipse.core.runtime.IConfigurationElement;
3838
import org.eclipse.core.runtime.IExecutableExtension;
39+
import org.eclipse.core.runtime.ILog;
3940
import org.eclipse.core.runtime.IProduct;
4041
import org.eclipse.core.runtime.IStatus;
4142
import org.eclipse.core.runtime.OperationCanceledException;
@@ -74,7 +75,6 @@
7475
import org.eclipse.ui.internal.ide.IDEInternalPreferences;
7576
import org.eclipse.ui.internal.ide.IDEWorkbenchMessages;
7677
import org.eclipse.ui.internal.ide.IDEWorkbenchPlugin;
77-
import org.eclipse.ui.internal.ide.StatusUtil;
7878
import org.eclipse.ui.preferences.ScopedPreferenceStore;
7979
import org.osgi.framework.Bundle;
8080
import org.osgi.framework.Version;
@@ -838,8 +838,7 @@ private static void writeWorkspaceVersion() {
838838
try (OutputStream output = new FileOutputStream(versionFile)) {
839839
props.store(output, null);
840840
} catch (IOException e) {
841-
IDEWorkbenchPlugin.log("Could not write version file", //$NON-NLS-1$
842-
StatusUtil.newError(e));
841+
ILog.of(IDEApplication.class).error("Could not write version file", e); //$NON-NLS-1$
843842
}
844843
}
845844

0 commit comments

Comments
 (0)