/** * Constructor for EmptyCommentRule. * @param successToken */ public EmptyCommentRule(IToken successToken) { super(new EmptyCommentDetector()); fSuccessToken= successToken; addWord("/**/", fSuccessToken); //$NON-NLS-1$ }
/** * Handles an incoming selection event. */ void handleSelectionChanged() { handleChange(new Change(TypingRun.SELECTION, -1)); }
@Override protected void aboutToBeReconciled() { JavaCompositeReconcilingStrategy strategy= (JavaCompositeReconcilingStrategy) getReconcilingStrategy(IDocument.DEFAULT_CONTENT_TYPE); strategy.aboutToBeReconciled(); }
protected void toggleShowInheritedMembers() { long flags= fInnerLabelProvider.getTextFlags(); flags ^= JavaElementLabels.ALL_POST_QUALIFIED; fInnerLabelProvider.setTextFlags(flags); fOutlineContentProvider.toggleShowInheritedMembers(); updateStatusFieldText(); fCategoryFilterActionGroup.setInput(getInputForCategories()); }
@Override public int following(int offset) { int first= fIterator.following(offset); if (eatFollowingWhitespace(offset, first)) { int second= fIterator.following(first); if (isWhitespace(first, second)) return second; } return first; }
@Override public int preceding(int offset) { int first= fIterator.preceding(offset); if (isWhitespace(first, offset)) { int second= fIterator.preceding(first); if (second != DONE && !isDelimiter(second, first)) return second; } return first; }
protected void setMatcherString(String pattern, boolean update) { fPattern= pattern; if (pattern.length() == 0 || !fSortByDefiningTypeAction.isChecked()) { super.setMatcherString(pattern, update); return; } boolean ignoreCase= pattern.toLowerCase().equals(pattern); String pattern2= "*" + JavaElementLabels.CONCAT_STRING + pattern; //$NON-NLS-1$ fStringMatcher= new OrStringMatcher(pattern, pattern2, ignoreCase, false); if (update) stringMatcherUpdated(); }
/** * Finds the lowest position in <code>fDocument</code> such that the position is >= <code>position</code> * and < <code>bound</code> and <code>fDocument.getChar(position) == ch</code> evaluates to <code>true</code> * and the position is in the default partition. * * @param position the first character position in <code>fDocument</code> to be considered * @param bound the first position in <code>fDocument</code> to not consider any more, with <code>bound</code> > <code>position</code>, or <code>UNBOUND</code> * @param ch the <code>char</code> to search for * @return the lowest position of <code>ch</code> in (<code>bound</code>, <code>position</code>] that resides in a Java partition, or <code>NOT_FOUND</code> if none can be found */ public int scanForward(int position, int bound, char ch) { return scanForward(position, bound, new CharacterMatch(ch)); }
/** * Creates a new word iterator. */ public JavaWordIterator() { fIterator= new JavaBreakIterator(); first(); }
/** * Finds the highest position in <code>fDocument</code> such that the position is <= <code>position</code> * and > <code>bound</code> and <code>fDocument.getChar(position) == ch</code> evaluates to <code>true</code> for at least one * ch in <code>chars</code> and the position is in the default partition. * * @param position the first character position in <code>fDocument</code> to be considered * @param bound the first position in <code>fDocument</code> to not consider any more, with <code>bound</code> < <code>position</code>, or <code>UNBOUND</code> * @param chars an array of <code>char</code> to search for * @return the highest position of one element in <code>chars</code> in (<code>bound</code>, <code>position</code>] that resides in a Java partition, or <code>NOT_FOUND</code> if none can be found */ public int scanBackward(int position, int bound, char[] chars) { return scanBackward(position, bound, new CharacterMatch(chars)); }
/** * Handles an incoming selection event. */ void handleSelectionChanged() { handleChange(new Change(TypingRun.SELECTION, -1)); }
protected void aboutToBeReconciled() { JavaCompositeReconcilingStrategy strategy= (JavaCompositeReconcilingStrategy) getReconcilingStrategy(IDocument.DEFAULT_CONTENT_TYPE); strategy.aboutToBeReconciled(); }
/** * Finds the lowest position in <code>fDocument</code> such that the position is >= <code>position</code> * and < <code>bound</code> and <code>fDocument.getChar(position) == ch</code> evaluates to <code>true</code> * and the position is in the default partition. * * @param position the first character position in <code>fDocument</code> to be considered * @param bound the first position in <code>fDocument</code> to not consider any more, with <code>bound</code> > <code>position</code>, or <code>UNBOUND</code> * @param ch the <code>char</code> to search for * @return the lowest position of <code>ch</code> in (<code>bound</code>, <code>position</code>] that resides in a Java partition, or <code>NOT_FOUND</code> if none can be found */ public int scanForward(int position, int bound, char ch) { return scanForward(position, bound, new CharacterMatch(ch)); }
/** * Constructor for EmptyCommentRule. * @param successToken */ public EmptyCommentRule(IToken successToken) { super(new EmptyCommentDetector()); fSuccessToken= successToken; addWord("/**/", fSuccessToken); //$NON-NLS-1$ }
/** * Creates a new word iterator. */ public JavaWordIterator() { fIterator= new JavaBreakIterator(); first(); }
/** * Handles an incoming selection event. */ void handleSelectionChanged() { handleChange(new Change(TypingRun.SELECTION, -1)); }
@Override protected void aboutToBeReconciled() { JavaCompositeReconcilingStrategy strategy= (JavaCompositeReconcilingStrategy) getReconcilingStrategy(IDocument.DEFAULT_CONTENT_TYPE); strategy.aboutToBeReconciled(); }
/** * Finds the lowest position in <code>fDocument</code> such that the position is >= <code>position</code> * and < <code>bound</code> and <code>fDocument.getChar(position) == ch</code> evaluates to <code>true</code> for at least one * ch in <code>chars</code> and the position is in the default partition. * * @param position the first character position in <code>fDocument</code> to be considered * @param bound the first position in <code>fDocument</code> to not consider any more, with <code>bound</code> > <code>position</code>, or <code>UNBOUND</code> * @param chars an array of <code>char</code> to search for * @return the lowest position of a non-whitespace character in [<code>position</code>, <code>bound</code>) that resides in a Java partition, or <code>NOT_FOUND</code> if none can be found */ public int scanForward(int position, int bound, char[] chars) { return scanForward(position, bound, new CharacterMatch(chars)); }