Subject: Re: com3205:HW6
From: Kojarski Sergei (email@example.com)
Date: Tue Nov 19 2002 - 19:23:13 EST
I suppose that we can build communication between checker and Eclipse by
using sockets. But, you know, it's not the best (though) solution.
The other way to orginize communication is (I HAVEN'T CHECKED IT!!!!
TRY!!! IT SHOULD WORK!!!):
1. Register your view as DebugEventListener
(see org.eclipse.debug.core.DebugPlugin docs)
Using this listener you'll be able to get source object that
describes running application. You are interested in IProcess objects.
2. You can add output/error stream listeners to this IProcess
3. In your checker print lines in some format, so you can understand in
your plugin what line is being printed to the stream by checker.
4. To find out what (running) project actually complaining you need to
extend format of messages with the name of the project. You can do it by
rewriting checker code on copying, just like you do with GlobalPreffered
or Stable pointcuts. SO, your checker will complain errors, that contains
project name, plugin intercepts those messages, decides, whether it should
be reflected in the view or not etc.
As you can understand, this way is not trivial, but I suspect it's the
To find out more about views / Viewer models just take a look at the
folder. It contains an example I presented in the class.
I believe, it's helpful.
> I was wondering if you could provide some advice. I've got a decent
> view plug-in established, created by extending AbstractUIPlugin in one
> class and ViewPart in another. But, I'm struggling to decide how to
> connect the LoD error messages with this view. My LoD checker writes
> error messages to a file, and also writes to the console, so I would
> like to capture this output, possibly with a listener. I'm assuming we
> do not want the LoD checker to have any knowledge of the view plugin.
> Am I moving in the right direction? Also, can you recommend any other
> sources of information aside from the articles "Creating an Eclipse
> View" and "How to use the JFace Tree Viewer"? Thank you for your time.
This archive was generated by hypermail 2b28 : Tue Nov 19 2002 - 19:23:15 EST