Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » Which component to use...
Which component to use... [message #195183] Tue, 20 February 2007 13:57 Go to next message
Sebastien Pennec is currently offline Sebastien PennecFriend
Messages: 31
Registered: July 2009
Member
Hello,

I'm pretty new to developing plugins, and to these newsgroups, so please direct me to
the right group if I'm not posting correctly :)

I'd like to develop a plugin that is a kind of Console. I have a Collection of
objects, (collection that is supposed to grow) and I want to display a String that is
based on these object's content.
I also need to be able to color a part of the String that is displayed.

Up to here, I have a plugin that has a View, and a TableViewer. The viewer is used
with a manager, that holds the collection of objets to be displayed. A
ContentProvider and a LabelProvider are also here to provide, well, content and
labels :).

This situation is not really bad as is, but is slow. The objects are coming in the
collection pretty fast and the view is not refreshed fast enough. So I thought about
using a TextViewer.

Is it going to be faster with a TextViewer? I've seen that it uses Document objects
as its content. Can I easily add lines to the document when a new objects is added to
my Collection? Or should I use other components, such as IOConsole, which seems to
provide an OutputStream to add content to it?

Any help would be highly appreciated :)

Cheers,

Sébastien
Re: Which component to use... [message #195191 is a reply to message #195183] Tue, 20 February 2007 16:43 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: krzysztofHMMMMdaniel.gmail.com

Hi

Just a quick suggestion:

Maybe looking closer at eclipse console would help you?

It is pretty fast, has colors etc.

It is quite possible you can adapt it for your purposes.

Regards,

Chris
Re: Which component to use... [message #195199 is a reply to message #195191] Tue, 20 February 2007 17:01 Go to previous messageGo to next message
Sebastien Pennec is currently offline Sebastien PennecFriend
Messages: 31
Registered: July 2009
Member
Hi Chris,

This is exactly what I'm doing at the moment :)

I've found that the MessageConsole is quite often used, and I'm able to send messages
to it.

The problem is that, until now, I've been able to create a MessageConsole, register
it and display it in the Console View. What I want to do is display the
MessageConsole in my own view, and this I haven't succeeded yet. :(

Do you have any advice on doing that? I didn't find any information about it by
Googleing...

My view extends ViewPart. In the createPartControl() method, I'm creating the
MessageConsole. I guess that I have to create a component that displays the console
and takes the parent composite of my View...

Thanks for your help,

Regards,

Sébastien


Krzysztof Daniel wrote:
> Hi
>
> Just a quick suggestion:
>
> Maybe looking closer at eclipse console would help you?
>
> It is pretty fast, has colors etc.
>
> It is quite possible you can adapt it for your purposes.
>
> Regards,
>
> Chris
Re: Which component to use... -> Display a MessageConsole in my own view [message #195385 is a reply to message #195191] Wed, 21 February 2007 16:22 Go to previous message
Sebastien Pennec is currently offline Sebastien PennecFriend
Messages: 31
Registered: July 2009
Member
Hi Chris,

I've seen the IOConsole class and MessageConsole class.

So far, I've been able to create the MessageConsole and add it to the ConsoleView,
but I'm having quite a lot of trouble trying to display the MessageConsole in my own
view.

My view first extended ViewPart. After checking the ConsoleView class, I've tried to
make my view extend PageBookView. If I understand the way it should work (at least, I
think), I'm having several issues...

First, I thought that I could create my page in the doCreatePage() method with the
following code:

protected PageRec doCreatePage(IWorkbenchPart wPart) {
MyConsoleWorkbenchPart part = (MyConsoleWorkbenchPart ) wPart;
IConsole console = part.getConsole();
IPageBookViewPage page = console.createPage(this);
initPage(page);
page.createControl(getPageBook());
PageRec rec = new PageRec(wPart, page);
return rec;
}

This is inspired by the code that is in the ConsoleView's doCreatePart() method.

By doing this, my view *has* to implement IConsoleView, or the line:

IPageBookViewPage page = console.createPage(this);

does not compile. By reading the javadoc of IConsoleView, I am not intended to
implement this class... any idea on how to do it without implementing the interface?
I've found that the only implementation of the class is the ConsoleView, which is not
meant to be used by client since it is in an internal package.

I am finally back to extending a ViewPart, and trying to find a way to display the
MessageConsole inside the view... my goal is just to create some container that will
display my MessageConsole...

Any help on that would be great!

Thanks,

Sébastien



Krzysztof Daniel wrote:
> Hi
>
> Just a quick suggestion:
>
> Maybe looking closer at eclipse console would help you?
>
> It is pretty fast, has colors etc.
>
> It is quite possible you can adapt it for your purposes.
>
> Regards,
>
> Chris
Previous Topic:Unable to view javadoc
Next Topic:Post-Build Step
Goto Forum:
  


Current Time: Wed Apr 24 20:12:42 GMT 2024

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

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

Back to the top