Package org.eclipse.wst.sse.ui.internal.comment

Examples of org.eclipse.wst.sse.ui.internal.comment.CommentingStrategy.apply()


            //toggle the comment on the line
            if(commentType != null) {
              if(commentType.alreadyCommenting(this.fDocument, lineTypedRegions)) {
                commentType.remove(this.fDocument, lineRegion.getOffset(), lineRegion.getLength(), true);
              } else {
                commentType.apply(this.fDocument, lineRegion.getOffset(), lineRegion.getLength());
              }
            }
          }
          monitor.worked(1);
        }
View Full Code Here


       
        ITypedRegion[] typedRegions = document.computePartitioning(textSelection.getOffset(), textSelection.getLength());
        CommentingStrategy commentType = CommentingStrategyRegistry.getDefault().getBlockCommentingStrategy(model.getContentTypeIdentifier(), typedRegions);
       
        if(commentType != null) {
          commentType.apply(document, textSelection.getOffset(), textSelection.getLength());
        }
      }
    } catch (BadLocationException e) {
      Logger.logException("The given selection " + textSelection + " must be invalid", e); //$NON-NLS-1$ //$NON-NLS-2$
    } finally {
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.