Re: com3205:HW6


Subject: Re: com3205:HW6
From: Kojarski Sergei (kojarski@ccs.neu.edu)
Date: Tue Nov 19 2002 - 20:43:41 EST


Actually, it's not necessary to include "project name" information into
checker. We can obtain project name from:
IProcess.getLaunch().getLaunchConfiguration().getAttribute(IJavaLaunchConfigurationConstants.ATTR_PROJECT_NAME,"")
and it'll return as project name.

Sergei.

On Tue, 19 Nov 2002, Kojarski Sergei wrote:

>
> Hi Jeff,
>
> 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.
> (org.eclipse.debug.core.model.IProcess)
>
> 2. You can add output/error stream listeners to this IProcess
> (smth like
> IProcess.getStreamsProxy().getOutputStreamMonitor().addListener(IStreamListener
> listener) )
>
> 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
> best one.
>
> To find out more about views / Viewer models just take a look at the
> http://www.ccs.neu.edu/home/lieber/com3205/f02/eclipse/src/
> folder. It contains an example I presented in the class.
> I believe, it's helpful.
>
> Good luck,
> Sergei.
>
>
> > Sergei,
> > 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.
> > Jeff
> >
> >
>



This archive was generated by hypermail 2b28 : Tue Nov 19 2002 - 20:43:42 EST