• Post Reply Bookmark Topic Watch Topic
  • New Topic

Need some help in StyledText.setText()  RSS feed

 
Chethan Sharma
Ranch Hand
Posts: 59
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

String finalOutput = "";
StringBuffer buffer = new StringBuffer();

StyledText outputArea = new StyledText(outputAreaGroup, SWT.MULTI
| SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL);
gridData = new GridData(SWT.FILL, SWT.FILL, true, true);
gridData.heightHint = 109;
gridData.widthHint = 755;
outputArea.setLayoutData(gridData);
outputArea.setEditable(false);

After performed some operation I will get large amount of data in a List (result).

List result = comd.getResult();
if (result != null && !result.isEmpty()) {
Iterator iter = result.iterator();
while (iter.hasNext()) {
buffer.append(iter.next());
}
finalOutput = buffer.toString();
}

//Up to here I have no problem.

But when I am trying to execute the outputArea.setText(finalOutput);
Here it takes so much time to set the data in a styled text.
The tool gets hanged for few mins and showing as Not responding in Task manager.

Please let me know how to handle this situation.

Thanks,
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!