Twitter github

Error Log View and You

So, given that I’ve seen two instances today where people have wanted to know how to use the log view within their applications, I figure a blog entry is in order. The log view currently lives within the PDE feature and specifically the org.eclipse.pde.runtime plug-in (or org.eclipse.ui.views.log in Eclipse 3.4 and beyond). To add the view to your application you need to do two things:

  1. Add a dependency on org.eclipse.pde.runtime (or org.eclipse.ui.views.log in Eclipse 3.4)
  2. Reference the view in your perspective with the id org.eclipse.pde.runtime.LogView (this is the same still in 3.4)

That’s it! Don’t believe me? Here’s the famous RCP Browser example with the log view (patch to help people out in 3.4, if in 3.3, simply replace org.eclipse.ui.views.log with org.eclipse.pde.runtime as a dependency in the MANIFEST.MF).:

  • Nirav Thaker

    This may be wrong place to ask it but how easy would it be to integrated ‘report bug or enhancement’ feature in RCP apps? I’d to hand-craft it in 3.2 days, not sure how it is organized inside. Opps, I think it’s not part of PDE but Mylyn..

  • Nirav Thaker

    This may be wrong place to ask it but how easy would it be to integrated ‘report bug or enhancement’ feature in RCP apps? I’d to hand-craft it in 3.2 days, not sure how it is organized inside. Opps, I think it’s not part of PDE but Mylyn..

  • Mik

    Yes, this feature is a part of Mylyn. Please file a bug if you would like to make it easier to consume by RCP apps, since the de-copuling of the Error Log view from PDE will mean that it can be put into a plug-in with minimal dependencies.

    http://www.eclipse.org/mylyn/bugs/

  • Mik

    Yes, this feature is a part of Mylyn. Please file a bug if you would like to make it easier to consume by RCP apps, since the de-copuling of the Error Log view from PDE will mean that it can be put into a plug-in with minimal dependencies.http://www.eclipse.org/mylyn/bugs/

  • Scott

    This worked perfectly…A question:

    Is there a way that I add the feature to my RCP application and only have it appear when a) either the user chooses it from a menu or b) there is an error in the application (e.g. auto appear)?

    Thank you in advance!

  • Scott

    This worked perfectly…A question:Is there a way that I add the feature to my RCP application and only have it appear when a) either the user chooses it from a menu or b) there is an error in the application (e.g. auto appear)?Thank you in advance!

  • Chris Aniszczyk (zx)

    I’d ask the question on the newsgroups Scott (www.eclipse.org/newsgroups).

    In essence, if you have the feature installed already, that means the log view plug-in is already enabled. If you want to toggle the log view you would probably need to create a new Action that would start / stop the plug-in based on user input.

    I think there’s a couple ways to do this but it’s better to continue your discussion on the newsgroups.

  • Chris Aniszczyk (zx)

    I’d ask the question on the newsgroups Scott (www.eclipse.org/newsgroups).In essence, if you have the feature installed already, that means the log view plug-in is already enabled. If you want to toggle the log view you would probably need to create a new Action that would start / stop the plug-in based on user input.I think there’s a couple ways to do this but it’s better to continue your discussion on the newsgroups.

  • andig

    Trying to do exactly this but am failing on 3.4, although the org.eclipse.ui.views.log dependency was added:

    !ENTRY org.eclipse.osgi 2 0 2008-06-24 19:51:09.921
    !MESSAGE The following is a complete list of bundles which are not resolved, see the prior log entry for the root cause if it exists:
    !SUBENTRY 1 org.eclipse.osgi 2 0 2008-06-24 19:51:09.921
    !MESSAGE Bundle initial@reference:file:../Delphi/workspace/org.eclipse.ui.examples.rcp.browser/ [27] was not resolved.
    !SUBENTRY 2 org.eclipse.ui.examples.rcp.browser 2 0 2008-06-24 19:51:09.921
    !MESSAGE Missing required bundle org.eclipse.ui.views.log_0.0.0.

    Any idea?

  • andig

    Trying to do exactly this but am failing on 3.4, although the org.eclipse.ui.views.log dependency was added:!ENTRY org.eclipse.osgi 2 0 2008-06-24 19:51:09.921!MESSAGE The following is a complete list of bundles which are not resolved, see the prior log entry for the root cause if it exists:!SUBENTRY 1 org.eclipse.osgi 2 0 2008-06-24 19:51:09.921!MESSAGE Bundle initial@reference:file:../Delphi/workspace/org.eclipse.ui.examples.rcp.browser/ [27] was not resolved.!SUBENTRY 2 org.eclipse.ui.examples.rcp.browser 2 0 2008-06-24 19:51:09.921!MESSAGE Missing required bundle org.eclipse.ui.views.log_0.0.0.Any idea?

  • Pretty good post.I found your website perfect for my needs. thanks for sharing the great ideas.