问题
I was looking for a way to provide users of an RCP application customized errors that will help them understand what causes some runtime errors. I created a custom Problems view and I create a marker each time an error occur. I'm showing in this view only markers of a custom marker type that are related to an annotation.
My questions:
1-Is there a better approach then this one ?
2-How to handle the errors that occur in a core plugin ? Is there a way to be notified in a ui plugin when an Activator method is called (like Activator.logError (..) ...) in a core plugin ?
回答1:
You can listen to logging events on the Eclipse log by calling:
Platform.addLogListener(listener);
where listener
implements org.eclipse.core.runtime.ILogListener
.
来源:https://stackoverflow.com/questions/45576195/custom-errors-in-eclipse-rcp-application