[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
|
[platform-dev] Hiding certain portions of text
|
- From: "Donny Kurniawan" <donny.kurniawan@xxxxxxxxx>
- Date: Thu, 19 Apr 2007 15:23:45 +1000
- Delivered-to: platform-dev@eclipse.org
- Dkim-signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=Q3+fLv9q4BuCXgwAULUkiAAvV7fepUe+I7PKKqUXzFlKYlRsUlgU6nSIhU+oMLhY1IEaW2FYc/GNhKJ7+3DddKSb1+0ODh8xphWzB3zfrauHoz8oRLdMYQqc1+KvYzPYMhhVyxVzOsXHJ4sh+hM1PxLuVVjyEFHVEighiCnpc1k=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=BWz2Q4OXeVLm/covWohpRbdwjlOQlpBWQ0sy34HeuTBkMR71+TgrohEU6BIUuWUtmv7RMjrrp6uFiNbZ1euJ5IizJ6IfnMB3FbwCxX9oBm9u1K7VV1v+UbQQFNPxaTk3Vy6WSeCddeUjhvmW6j0UNIaWui0O1P8eoi0x+xGXSuw=
Hello,
I want to create an editor that can hide certain portions of text.
For example: I want to hide all comments in a C program.
printf("1");
// Hide Me A
printf("2");
// Hide Me B
printf("3");
I just want to hide the comments in the file without actually removing
the comments in the underlying file.
I know it's possible since Eclipse Text Folding / Projection is able
to do hide/show portions of the document.
Browsing the APIs, I found about ITextViewer.setVisibleRegion(int
start, int length). Is there a similar method that accepts an array of
text regions?
If it's not supported by the Eclipse Text infrastructure, what is the
best way to implement this?
Thanks,
Best regards.