Refine search
@Override public void documentPartitioningChanged(IDocument document, IRegion changedRegion) { if (!fDocumentChanging && fCachedRedrawState) { processDamage(new Region(changedRegion.getOffset(), changedRegion.getLength()), document); } else { fDocumentPartitioningChanged= true; fChangedDocumentPartitions= changedRegion; } }
@Override public boolean equals(Object o) { return super.equals(o) && o instanceof HighlightedRange && fKey.equals(((HighlightedRange)o).getKey()); }
/** * Sets the tag position if one is associated with the NLS element. * * @param start the start offset * @param length the length */ public void setTagPosition(int start, int length) { fTagPosition= new Region(start, length); }
private IRegion getIntersectingRegion(IRegion left, IRegion right) { int offset= Math.max(left.getOffset(), right.getOffset()); int exclusiveEndOffset= Math.min(exclusiveEnd(left), exclusiveEnd(right)); if (exclusiveEndOffset < offset) return null; return new Region(offset, exclusiveEndOffset - offset); }
/** * Returns whether this element has an associated $NON-NLS-*$ tag. * * @return <code>true</code> if the NLS element has an associated $NON-NLS-*$ tag */ public boolean hasTag() { return fTagPosition != null && fTagPosition.getLength() > 0; }
public int getOriginalOffset() { if (fOriginalLocation != null) { return fOriginalLocation.getOffset(); } return getOffset(); }
/** * Sets the tag position if one is associated with the NLS element. * * @param start the start offset * @param length the length */ public void setTagPosition(int start, int length) { fTagPosition= new Region(start, length); }
private IRegion getIntersectingRegion(IRegion left, IRegion right) { int offset= Math.max(left.getOffset(), right.getOffset()); int exclusiveEndOffset= Math.min(exclusiveEnd(left), exclusiveEnd(right)); if (exclusiveEndOffset < offset) return null; return new Region(offset, exclusiveEndOffset - offset); }
/** * Returns <code>true</code> if the NLS element has an asscociated $NON-NLS-*$ tag. * Otherwise <code>false</code> is returned. */ public boolean hasTag() { return fTagPosition != null && fTagPosition.getLength() > 0; }
public boolean existsConflict(String proposal, ContentAssistContext context) { // hidden node between lastCompleteNode and currentNode? INode lastCompleteNode = context.getLastCompleteNode(); Region replaceRegion = context.getReplaceRegion(); int nodeEnd = lastCompleteNode.getOffset() + lastCompleteNode.getLength(); if (nodeEnd < replaceRegion.getOffset()) return false; return existsConflict(lastCompleteNode, replaceRegion.getOffset(), proposal, context); }
@Override public void documentPartitioningChanged(IDocument document, IRegion changedRegion) { if (!fDocumentChanging && fCachedRedrawState) { processDamage(new Region(changedRegion.getOffset(), changedRegion.getLength()), document); } else { fDocumentPartitioningChanged= true; fChangedDocumentPartitions= changedRegion; } }
public NLSElement(String value, int start, int length, int index, boolean isEclipseNLS) { fValue= value; fIndex= index; Assert.isNotNull(fValue); fPosition= new Region(start, length); fIsEclipseNLS= isEclipseNLS; }
/** * Returns whether this element has an associated $NON-NLS-*$ tag. * * @return <code>true</code> if the NLS element has an associated $NON-NLS-*$ tag */ public boolean hasTag() { return fTagPosition != null && fTagPosition.getLength() > 0; }
private TextEdit createAddTagChange(NLSElement element) { int offset= element.getTagPosition().getOffset(); //to be changed String text= ' ' + element.getTagText(); return new InsertEdit(offset, text); }
@Override public boolean equals(Object o) { if (o instanceof TypedRegion) { TypedRegion r= (TypedRegion) o; return super.equals(r) && ((fType == null && r.getType() == null) || fType.equals(r.getType())); } return false; }
public void documentPartitioningChanged(IDocument document, IRegion changedRegion) { if (!fDocumentChanging && fCachedRedrawState) { processDamage(new Region(changedRegion.getOffset(), changedRegion.getLength()), document); } else { fDocumentPartitioningChanged= true; fChangedDocumentPartitions= changedRegion; } }
public NLSElement(String value, int start, int length, int index, boolean isEclipseNLS) { fValue= value; fIndex= index; Assert.isNotNull(fValue); fPosition= new Region(start, length); fIsEclipseNLS= isEclipseNLS; }