NetBeans Forums

 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
  

get information of which line is hidden/collapse in editor

 
Post new topic   Reply to topic    NetBeans Forums -> NetBeans Platform Users
View previous topic :: View next topic  
Author Message
mcheung63



Joined: 18 Dec 2014
Posts: 144
Location: Hong Kong

PostPosted: Fri Mar 17, 2017 7:55 pm    Post subject: get information of which line is hidden/collapse in editor Reply with quote

hi
how to get information of which line is hidden/collapse in editor? I use the following code to get character colour, but no information of which line is hidden

HighlightsContainer hc = HighlightingManager.getInstance(jtc).getBottomHighlights();
HighlightsSequence hq = hc.getHighlights(0, document.getLength());
while (hq.moveNext()) {
AttributeSet as = hq.getAttributes();
Color color=as.getAttribute(StyleConstants.Foreground);
}

thanks
from Peter=
Back to top
emi



Joined: 14 Aug 2009
Posts: 245

PostPosted: Sat Mar 18, 2017 8:15 pm    Post subject: get information of which line is hidden/collapse in editor Reply with quote

See Editor Code Folding.


--emi





On Fri, Mar 17, 2017 at 9:53 PM, Peter Cheung <address-removed ([email]address-removed[/email])> wrote:
Quote:
hi
  how to get information of which line is hidden/collapse in editor? I use the following code to get character colour, but no information of which line is hidden

HighlightsContainer hc = HighlightingManager.getInstance(jtc).getBottomHighlights();
HighlightsSequence hq = hc.getHighlights(0, document.getLength());
while (hq.moveNext()) {
        AttributeSet as = hq.getAttributes();
        Color color=as.getAttribute(StyleConstants.Foreground);
}

thanks
from Peter
Back to top
mcheung63



Joined: 18 Dec 2014
Posts: 144
Location: Hong Kong

PostPosted: Thu Mar 23, 2017 6:19 am    Post subject: Reply with quote

Here is my solution http://peter.kingofcoders.com/?p=2284
thanks
Back to top
Display posts from previous:   
Post new topic   Reply to topic    NetBeans Forums -> NetBeans Platform Users All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo