drools-eclipse/org.drools.eclipse/src/main/java/org/drools/eclipse/editors/completion/AbstractCompletionProcessor.java
protected String readBackwards(int documentOffset, IDocument doc) throws BadLocationException {
        int startPart = doc.getPartition(documentOffset).getOffset();
        String prefix = doc.get(startPart, documentOffset - startPart);
        return prefix;
    }
protected String readBackwards(int documentOffset, IDocument doc) throws BadLocationException {
        int startPart = doc.getPartition(documentOffset).getOffset();
        String prefix = doc.get(startPart, documentOffset - startPart);
        return prefix;
    }
protected String readBackwards ( int documentOffset , IDocument doc ) throws BadLocationException { int startPart = doc . getPartition ( documentOffset ) . getOffset ( ) ; String prefix = doc . get ( startPart , documentOffset - startPart ) ; return prefix ; }
Read some text from behind the cursor position.
This provides context to both filter what is shown based
on what the user has typed in, and also to provide more information for the
list of suggestions based on context.
Read some text from behind the cursor position . This provides context to both filter what is shown based on what the user has typed in and also to provide more information for the list of suggestions based on context .