Skip to main content



      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
Eclipse UserFriend
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: Mon Jul 07 18:58:49 EDT 2025

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

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

Back to the top