Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Plugin Development Environment (PDE) » Text widget to implement a tail command(Text widget to implement a tail command)
Text widget to implement a tail command [message #1059613] Mon, 20 May 2013 16:06
Marco Boldi is currently offline Marco Boldi
Messages: 1
Registered: May 2013
Junior Member
Hello,
I'm trying to implement the tail command and show it in a text command limited to 1000 lines, how can I implement such limitation, I think:
1) create an arrayList
2) add each new line to the arrayList
3) if the arrayList dimension is greater than 1000 then, clear the text widget, remove one line from the arraylist (the index 0) and rewrite the text content.
4) if the arraylist dimension is < 1000 then, add the line to the arraylist and the text widget.

What do you think? is there a better way to do this ? , I'm a worried about the performance impact of the step 3.

Thanks
Marco.
Previous Topic:Product generation packages plugins in folder or jar?
Next Topic:felix dm shell not working in application
Goto Forum:
  


Current Time: Thu Aug 28 09:23:40 EDT 2014

Powered by FUDForum. Page generated in 0.02399 seconds