Skip to content

Commit 48beaac

Browse files
committed
Remove log methods from activator in xml compare examples
ILog provides useful methods to do it now.
1 parent eaf366e commit 48beaac

File tree

2 files changed

+4
-13
lines changed

2 files changed

+4
-13
lines changed

team/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLPlugin.java

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,8 @@
2424
import org.eclipse.core.runtime.Assert;
2525
import org.eclipse.core.runtime.IConfigurationElement;
2626
import org.eclipse.core.runtime.IExtensionRegistry;
27-
import org.eclipse.core.runtime.IStatus;
2827
import org.eclipse.core.runtime.ListenerList;
2928
import org.eclipse.core.runtime.Platform;
30-
import org.eclipse.core.runtime.Status;
3129
import org.eclipse.jface.preference.IPreferenceStore;
3230
import org.eclipse.jface.resource.ImageDescriptor;
3331
import org.eclipse.swt.widgets.Control;
@@ -377,14 +375,6 @@ private static void setActiveWorkbenchWindow(WindowRef windowRef) {
377375
}
378376
}
379377

380-
public static void log(Throwable e) {
381-
log(new Status(IStatus.ERROR, getPluginId(), IStatus.ERROR, "Internal Error", e)); //$NON-NLS-1$
382-
}
383-
384-
public static void log(IStatus status) {
385-
getDefault().getLog().log(status);
386-
}
387-
388378
public static String getPluginId() {
389379
return getDefault().getBundle().getSymbolicName();
390380
}

team/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLStructureCreator.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
import org.eclipse.compare.structuremergeviewer.IStructureComparator;
3232
import org.eclipse.compare.structuremergeviewer.IStructureCreator;
3333
import org.eclipse.core.runtime.CoreException;
34+
import org.eclipse.core.runtime.ILog;
3435
import org.eclipse.jface.text.BadLocationException;
3536
import org.eclipse.jface.text.Document;
3637
import org.eclipse.jface.text.IDocument;
@@ -595,15 +596,15 @@ public IStructureComparator getStructure(Object input) {
595596
if (XMLStructureCreator.DEBUG_MODE)
596597
System.out.println("End of parse"); //$NON-NLS-1$
597598
} catch (SAXParseException e) {
598-
XMLPlugin.log(e);
599+
ILog.get().error(e.getMessage(), e);
599600
return null;
600601
} catch (Exception e) {
601-
XMLPlugin.log(e);
602+
ILog.get().error(e.getMessage(), e);
602603
return null;
603604
}
604605
return root;
605606
} catch (CoreException ex) {
606-
XMLPlugin.log(ex);
607+
ILog.get().error(ex.getMessage(), ex);
607608
}
608609
return null;
609610
}

0 commit comments

Comments
 (0)