Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.resources.WorkspaceJob;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.ILog;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
Expand All @@ -35,15 +36,13 @@
import org.eclipse.swt.widgets.Display;
import org.eclipse.ui.IMarkerResolution;
import org.eclipse.ui.IMarkerResolutionGenerator2;
import org.eclipse.ui.internal.UIPlugin;
import org.eclipse.ui.internal.ide.IDEWorkbenchPlugin;
import org.eclipse.ui.views.markers.WorkbenchMarkerResolution;

/**
* Provides a resolution for warning markers on projects without an explicit
* encoding setting.
*/
@SuppressWarnings("restriction")
public class ProjectEncodingMarkerResolutionGenerator implements IMarkerResolutionGenerator2 {

@Override
Expand All @@ -54,7 +53,7 @@ public IMarkerResolution[] getResolutions(IMarker marker) {
IMarkerResolution[] resolutions = { new ExplicitEncodingResolution(defaultCharset) };
return resolutions;
} catch (CoreException e) {
UIPlugin.getDefault().getLog().log(e.getStatus());
ILog.of(ProjectEncodingMarkerResolutionGenerator.class).log(e.getStatus());
return new IMarkerResolution[0];
}
}
Expand Down Expand Up @@ -117,7 +116,7 @@ public void run(IMarker marker) {
try {
charsetManager.setCharsetFor(project.getFullPath(), charset);
} catch (CoreException e) {
UIPlugin.getDefault().getLog().log(e.getStatus());
ILog.of(ProjectEncodingMarkerResolutionGenerator.class).log(e.getStatus());
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,6 @@ public static void log(int severity, int aCode, String aMessage,
* Record a status against this plugin's log.
*/
public static void log(IStatus aStatus) {
//getDefault().getLog().log(aStatus);
logJob.log(aStatus);
logJob.schedule(LOG_DELAY);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
*******************************************************************************/
package org.eclipse.ui.internal;

import org.eclipse.core.runtime.ILog;
import org.eclipse.core.runtime.Platform;
import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;
import org.eclipse.core.runtime.preferences.DefaultScope;
Expand Down Expand Up @@ -156,7 +157,7 @@ public void initializeDefaultPreferences() {
.getSingleton());
}
} catch (BackingStoreException e) {
UIPlugin.getDefault().getLog().error(e.getLocalizedMessage(), e);
ILog.of(UIPreferenceInitializer.class).error(e.getLocalizedMessage(), e);
}

rootNode
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@

import org.osgi.service.prefs.BackingStoreException;

import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
import org.eclipse.core.runtime.ILog;
import org.eclipse.core.runtime.preferences.InstanceScope;

import org.eclipse.jface.preference.IPreferenceStore;
Expand Down Expand Up @@ -77,7 +76,7 @@ public TemplateStore getTemplateStore() {
try {
fStore.load();
} catch (IOException e) {
JavaEditorExamplePlugin.getDefault().getLog().log(new Status(IStatus.ERROR, "org.eclipse.ui.examples.javaeditor", IStatus.OK, "", e)); //$NON-NLS-1$ //$NON-NLS-2$
ILog.of(TemplateEditorUI.class).error("", e); //$NON-NLS-1$
}
}
return fStore;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
import java.io.InputStream;

import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.ILog;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.NullProgressMonitor;
Expand Down Expand Up @@ -74,7 +75,7 @@ public static void delete(final IProject project, boolean deleteContent) {
i= MAX_RETRY;
} catch (CoreException x) {
if (i == MAX_RETRY - 1) {
FileBuffersTestPlugin.getDefault().getLog().log(x.getStatus());
ILog.of(ResourceHelper.class).log(x.getStatus());
// throw x;
}
try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
*******************************************************************************/
package org.eclipse.ltk.ui.refactoring.tests;

import org.eclipse.core.runtime.ILog;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;

Expand All @@ -35,7 +36,7 @@ public static String getPluginId() {
}

public static void log(IStatus status) {
getDefault().getLog().log(status);
ILog.get().log(status);
}

public static void log(Throwable e) {
Expand Down
Loading