Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[Dltk-dev] question on console view color style

In ScriptConsoleViewer.java,

 

public static class ConsoleDocumentListener implements IDocumentListener {

protected void addToPartitioner(int start, String content,

                        boolean isInput, int colorStyle) {

}

 

}

 

The content is tokenized inside addToPartitioner. There is comment stating that

// Content has to be tokenized in order for style and

                  // hyperlinks to display correctly

 

Since the result of the tokenization on certain content produces too many token, it becomes a performance issue. I want to add style on the whole content at one call like:

addToPartitioner(viewer, new StyleRange(start,

                        content.length(), AnsiColorHelper.COLOR_BLACK,

                        null, SWT.BOLD));

 

But it does not work just like what the comment indicated. Would you please explain me why it does not work?

 

Thanks,

Rong

=======
Notice: This e-mail message, together with any attachments, contains
information of Symyx Technologies, Inc. or any of its affiliates or
subsidiaries that may be confidential, proprietary, copyrighted,
privileged and/or protected work product, and is meant solely for
the intended recipient. If you are not the intended recipient, and
have received this message in error, please contact the sender
immediately, permanently delete the original and any copies of this
email and any attachments thereto.

Back to the top