Skip to main content

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 20:06
Marco Boldi is currently offline Marco BoldiFriend
Messages: 5
Registered: May 2013
Junior Member
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.

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

Current Time: Mon May 21 01:27:48 GMT 2018

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

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

Back to the top