Skip to content

Commit

Permalink
Use new ILog.of(...) method instead of Platform.getLog(...)
Browse files Browse the repository at this point in the history
  • Loading branch information
laeubi committed Jun 27, 2023
1 parent f885ca8 commit 4e1237e
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Bundle-SymbolicName: org.eclipse.equinox.p2.ui.importexport;singleton:=true
Bundle-Version: 1.4.100.qualifier
Bundle-Vendor: %providerName
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime;bundle-version="[3.27.0,4.0.0)",
org.eclipse.core.runtime;bundle-version="[3.28.0,4.0.0)",
org.eclipse.equinox.p2.ui,
org.eclipse.equinox.p2.extensionlocation,
org.eclipse.equinox.p2.metadata;bundle-version="2.1.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public boolean performFinish() {
// cancelled by user
return false;
} catch (Exception e) {
Platform.getLog(Platform.getBundle(Constants.Bundle_ID)).log(new Status(IStatus.ERROR, Constants.Bundle_ID, e.getMessage(), e));
ILog.of(Platform.getBundle(Constants.Bundle_ID)).log(new Status(IStatus.ERROR, Constants.Bundle_ID, e.getMessage(), e));
MessageBox messageBox = new MessageBox(this.getShell(), SWT.ICON_ERROR);
messageBox.setMessage(e.getMessage() == null ? "Unknown error" : e.getMessage()); //$NON-NLS-1$
messageBox.open();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,13 +127,13 @@ public void linkActivated(HyperlinkEvent event) {
prefCommand.executeWithChecks(new ExecutionEvent(prefCommand, para, null, null));
}
} catch (ExecutionException e) {
Platform.getLog(Platform.getBundle(Constants.Bundle_ID)).log(new Status(IStatus.ERROR, Constants.Bundle_ID, e.getMessage(), e));
ILog.of(Platform.getBundle(Constants.Bundle_ID)).log(new Status(IStatus.ERROR, Constants.Bundle_ID, e.getMessage(), e));
} catch (NotDefinedException e) {
Platform.getLog(Platform.getBundle(Constants.Bundle_ID)).log(new Status(IStatus.ERROR, Constants.Bundle_ID, e.getMessage(), e));
ILog.of(Platform.getBundle(Constants.Bundle_ID)).log(new Status(IStatus.ERROR, Constants.Bundle_ID, e.getMessage(), e));
} catch (NotEnabledException e) {
Platform.getLog(Platform.getBundle(Constants.Bundle_ID)).log(new Status(IStatus.ERROR, Constants.Bundle_ID, e.getMessage(), e));
ILog.of(Platform.getBundle(Constants.Bundle_ID)).log(new Status(IStatus.ERROR, Constants.Bundle_ID, e.getMessage(), e));
} catch (NotHandledException e) {
Platform.getLog(Platform.getBundle(Constants.Bundle_ID)).log(new Status(IStatus.ERROR, Constants.Bundle_ID, e.getMessage(), e));
ILog.of(Platform.getBundle(Constants.Bundle_ID)).log(new Status(IStatus.ERROR, Constants.Bundle_ID, e.getMessage(), e));
}
}
});
Expand Down
4 changes: 2 additions & 2 deletions bundles/org.eclipse.equinox.p2.ui.sdk/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %bundleName
Bundle-SymbolicName: org.eclipse.equinox.p2.ui.sdk;singleton:=true
Bundle-Version: 1.3.0.qualifier
Bundle-Version: 1.3.100.qualifier
Bundle-Activator: org.eclipse.equinox.internal.p2.ui.sdk.ProvSDKUIActivator
Bundle-Vendor: %providerName
Bundle-Localization: plugin
Export-Package: org.eclipse.equinox.internal.p2.ui.sdk;x-internal:=true,
org.eclipse.equinox.internal.p2.ui.sdk.prefs;x-internal:=true
Require-Bundle: org.eclipse.ui;bundle-version="3.6.0",
org.eclipse.core.runtime,
org.eclipse.core.runtime;bundle-version="[3.28.0,4.0.0)",
org.eclipse.equinox.p2.ui;bundle-version="2.6.0"
Import-Package: javax.xml.parsers,
org.bouncycastle.bcpg;version="1.69.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
import java.util.HashSet;
import java.util.Set;
import java.util.regex.Pattern;
import org.eclipse.core.runtime.Platform;
import org.eclipse.core.runtime.ILog;
import org.eclipse.equinox.internal.p2.ui.sdk.prefs.PreferenceConstants;
import org.eclipse.equinox.p2.core.IAgentLocation;
import org.eclipse.equinox.p2.engine.IProfileRegistry;
Expand Down Expand Up @@ -97,7 +97,7 @@ private void updatePreferences() {
try {
pref.flush();
} catch (BackingStoreException e) {
Platform.getLog(SimpleLicenseManager.class).error("Persisting remembered licenses failed", e); //$NON-NLS-1$
ILog.of(SimpleLicenseManager.class).error("Persisting remembered licenses failed", e); //$NON-NLS-1$
}
}
}

0 comments on commit 4e1237e

Please sign in to comment.