Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [platform-dev] Hiding certain portions of text

Please ask on the newsgroup.

Dani


                                                                           
             "Donny Kurniawan"                                             
             <donny.kurniawan@                                             
             gmail.com>                                                 To 
             Sent by:                  platform-dev@xxxxxxxxxxx            
             platform-dev-boun                                          cc 
             ces@xxxxxxxxxxx                                               
                                                                   Subject 
                                       [platform-dev] Hiding certain       
             19.04.2007 07:23          portions of text                    
                                                                           
                                                                           
             Please respond to                                             
             "Eclipse platform                                             
                  general                                                  
             developers list."                                             
             <platform-dev@ecl                                             
                 ipse.org>                                                 
                                                                           
                                                                           




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.
_______________________________________________
platform-dev mailing list
platform-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/platform-dev




Back to the top