Examples of AceFold


Examples of org.rstudio.studio.client.workbench.views.source.editors.text.ace.AceFold

         {
            // If no selection, unfold the closest fold on the current row
  
            Position pos = range.getStart();
  
            AceFold startCandidate = null;
            AceFold endCandidate = null;
  
            for (AceFold f : JsUtil.asIterable(docDisplay_.getFolds()))
            {
               if (startCandidate == null
                   && f.getStart().getRow() == pos.getRow()
                   && f.getStart().getColumn() >= pos.getColumn())
               {
                  startCandidate = f;
               }
  
               if (f.getEnd().getRow() == pos.getRow()
                   && f.getEnd().getColumn() <= pos.getColumn())
               {
                  endCandidate = f;
               }
            }
  
            if (startCandidate == null ^ endCandidate == null)
            {
               docDisplay_.unfold(startCandidate != null ? startCandidate
                                                          : endCandidate);
            }
            else if (startCandidate != null)
            {
               // Both are candidates; see which is closer
               int startDelta = startCandidate.getStart().getColumn() - pos.getColumn();
               int endDelta = pos.getColumn() - endCandidate.getEnd().getColumn();
               docDisplay_.unfold(startDelta <= endDelta? startCandidate
                                                        : endCandidate);
            }
         }
         else
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.