Skip to main content



      Home
Home » Eclipse Projects » Rich Client Platform (RCP) » How to incorporate Eclipse 'problems' view into an RCP application
How to incorporate Eclipse 'problems' view into an RCP application [message #449616] Tue, 16 May 2006 17:38 Go to next message
Eclipse UserFriend
Originally posted by: rjohnson.mincron.com

Does anyone have experience incorporating the standard Eclipse 'Problems' view into an RCP application? In this way, validation errors from business logic could be displayed in the problems view. And the problems list could be filterable, to relate to specific forms.

The problems view does not appear to be a standard JFace component, but I was hoping to leverage that logic in an RCP application.
Re: How to incorporate Eclipse 'problems' view into an RCP application [message #449628 is a reply to message #449616] Wed, 17 May 2006 03:31 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: Stephen.Egan.csiro.au

Hi,
You can't (or at least shouldn't) access the problem view directly. The=
=

trick is to use the IMarker interface. Here's an example snippet:

private IMarker createMarker(IResource aResource, String aMessage, =

Element element) {
try {
IMarker marker =3D aResource.createMarker(IMarker.PROBLEM);
marker.setAttribute(IMarker.PRIORITY, IMarker.PRIORITY_HIGH);
marker.setAttribute(IMarker.SEVERITY, IMarker.SEVERITY_ERROR);
marker.setAttribute(IMarker.MESSAGE, aMessage);
=

if (element !=3D null)
if (!element.getGuid().equals(""))
marker.setAttribute("GUID", element.getGuid());
}
catch (CoreException ce) {
logger.warning("Marker not created for " + aResource.getName()
+ " - " + ce.getMessage());
}

return null;
}

The "GUID" attribute shows how you can assign arbitrary attributes to th=
e =

marker that are relevant to your own application.


You can then display the problem view using a line similar to this:
=

page.showView(IPageLayout.ID_PROBLEM_VIEW);

where page is an IWorkbenchPage.

Hope this helps,

//Stephen

On Wed, 17 May 2006 07:38:09 +1000, Randy Johnson <rjohnson@mincron.com>=
=

wrote:

> Does anyone have experience incorporating the standard Eclipse =

> 'Problems' view into an RCP application? In this way, validation error=
s =

> from business logic could be displayed in the problems view. And the =

> problems list could be filterable, to relate to specific forms.
>
> The problems view does not appear to be a standard JFace component, bu=
t =

> I was hoping to leverage that logic in an RCP application.



-- =

Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
Re: How to incorporate Eclipse 'problems' view into an RCP application [message #449688 is a reply to message #449628] Wed, 17 May 2006 16:25 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: rjohnson.mincron.com

Thanks for the info! Of course, this prompts another question. Using RCP, must I create a view and register it with the platform? If I just try to to show the problems view, RCP tells me the view is not found, implying that I needed to create it via extensions first.
Re: How to incorporate Eclipse 'problems' view into an RCP application [message #449695 is a reply to message #449688] Wed, 17 May 2006 20:47 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: Stephen.Egan.csiro.au

You will need to include the org.eclipse.core.resources plugin in your =

dependencies to access the IMarker interface, and the org.eclipse.ui.ide=
=

plugin to add the Problem View. Besides that, you can open up the Probl=
em =

view programmatically using the constant IPageLayout.ID_PROBLEM_VIEW as =
=

mentioned in the last post, or through the Window>Show View menu (assumi=
ng =

that you have that menu in your application).

//Stephen

On Thu, 18 May 2006 06:25:20 +1000, Randy Johnson <rjohnson@mincron.com>=
=

wrote:

> Thanks for the info! Of course, this prompts another question. Using =

> RCP, must I create a view and register it with the platform? If I just=
=

> try to to show the problems view, RCP tells me the view is not found, =
=

> implying that I needed to create it via extensions first.



-- =

Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
Re: How to incorporate Eclipse 'problems' view into an RCP application [message #449697 is a reply to message #449695] Wed, 17 May 2006 23:01 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: rdjohnson.kingwoodcable.com

Thanks again! So, now, when I add the org.eclipse.org.ui.ide plugin, and then launch the application, I get an error "Missing required bundle org.eclipse.ui.ide_0.0.0.".

I'm sure I'm missing something simple. I copied the jar file for this plugin to the target environment's plugins directory. What else do I need to do?
Re: How to incorporate Eclipse 'problems' view into an RCP application [message #449704 is a reply to message #449697] Thu, 18 May 2006 07:46 Go to previous messageGo to next message
Eclipse UserFriend
Randy Johnson wrote:
> Thanks again! So, now, when I add the org.eclipse.org.ui.ide plugin, and then launch the application, I get an error "Missing required bundle org.eclipse.ui.ide_0.0.0.".
>
> I'm sure I'm missing something simple. I copied the jar file for this plugin to the target environment's plugins directory. What else do I need to do?

This normally happens if you've launched your RCP app once, and then add
dependencies to one of the plugins. You need to go to the Run>Run...
menu, find your launch config, and make sure all of the new plugins are
included.

Later,
PW
Re: How to incorporate Eclipse 'problems' view into an RCP application [message #449776 is a reply to message #449704] Fri, 19 May 2006 01:19 Go to previous message
Eclipse UserFriend
Originally posted by: Stephen.Egan.csiro.au

Or alternatively click the "Synchronize" link under the "testing" sectio=
n =

of you .product file's "Overview" page (assuming that you have defined a=
=

product). You'll also need to ensure that all required plugins are in t=
he =

..product's configuration list first.

//Stephen

> This normally happens if you've launched your RCP app once, and then a=
dd =

> dependencies to one of the plugins. You need to go to the Run>Run... =
=

> menu, find your launch config, and make sure all of the new plugins ar=
e =

> included.
>
> Later,
> PW



-- =

Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
Previous Topic:Use selection tag to control visibility of a view?
Next Topic:RCP and “Link with editor” view action…
Goto Forum:
  


Current Time: Sun Aug 31 10:55:38 EDT 2025

Powered by FUDForum. Page generated in 0.04743 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top