IParseTree getDeepestLocationSpanning( int start, int end ) { if( _parser == null ) { return null; } else { List<IParseTree> locations = _parser.getLocations(); return IParseTree.Search.getDeepestLocationSpanning( locations, start - _parser.getOffsetShift(), end - _parser.getOffsetShift(), true ); } }
IParseTree getDeepestLocationSpanning( int start, int end ) { if( _parser == null ) { return null; } else { List<IParseTree> locations = _parser.getLocations(); return IParseTree.Search.getDeepestLocationSpanning( locations, start - _parser.getOffsetShift(), end - _parser.getOffsetShift(), true ); } }
private int getOffsetShift() { return _gsEditor.getParser().getOffsetShift(); }
private int getOffsetShift() { return _gsEditor.getParser().getOffsetShift(); }
public IParseTree getDeepestStatementLocationAtPos( int iPos, boolean bStrict ) { if( _parser == null ) { return null; } else { List<IParseTree> locations = _parser.getLocations(); return IParseTree.Search.getDeepestStatementLocation( locations, iPos - _parser.getOffsetShift(), bStrict ); } }
IParseTree getDeepestLocation( int iPos, boolean strict ) { if( _parser == null ) { return null; } else { List<IParseTree> locations = _parser.getLocations(); return IParseTree.Search.getDeepestLocation( locations, iPos - _parser.getOffsetShift(), strict ); } }
public IParseTree getDeepestStatementLocationAtPos( int iPos ) { List<IParseTree> locations = _parser.getLocations(); return IParseTree.Search.getDeepestStatementLocation( locations, iPos - _parser.getOffsetShift(), false ); }
IParseTree getDeepestLocation( int iPos, boolean strict ) { if( _parser == null ) { return null; } else { List<IParseTree> locations = _parser.getLocations(); return IParseTree.Search.getDeepestLocation( locations, iPos - _parser.getOffsetShift(), strict ); } }
public IParseTree getDeepestStatementLocationAtPos( int iPos ) { List<IParseTree> locations = _parser.getLocations(); return IParseTree.Search.getDeepestStatementLocation( locations, iPos - _parser.getOffsetShift(), false ); }
public IParseTree getDeepestStatementLocationAtPos( int iPos, boolean bStrict ) { if( _parser == null ) { return null; } else { List<IParseTree> locations = _parser.getLocations(); return IParseTree.Search.getDeepestStatementLocation( locations, iPos - _parser.getOffsetShift(), bStrict ); } }
private void fixCase() { ReplaceChunk replaceChunk = getReplaceChunk( _sourceOfIssue, _gosuEditor.getText() ); if( replaceChunk != null ) { try { int offsetShift = _gosuEditor.getParser().getOffsetShift(); _editor.getDocument().remove( replaceChunk.offset + offsetShift, replaceChunk.length ); _editor.getDocument().insertString( replaceChunk.offset + offsetShift, replaceChunk.replaceText, null ); } catch( BadLocationException e ) { throw new RuntimeException( e ); } } }
private void fixCase() { ReplaceChunk replaceChunk = getReplaceChunk( _sourceOfIssue, _gosuEditor.getText() ); if( replaceChunk != null ) { try { int offsetShift = _gosuEditor.getParser().getOffsetShift(); _editor.getDocument().remove( replaceChunk.offset + offsetShift, replaceChunk.length ); _editor.getDocument().insertString( replaceChunk.offset + offsetShift, replaceChunk.replaceText, null ); } catch( BadLocationException e ) { throw new RuntimeException( e ); } } }
IExpression getExpressionAtPos( int iPos ) { IParseTree locationBeforeDot = IParseTree.Search.getDeepestLocation( _parser.getLocations(), iPos - _parser.getOffsetShift(), true ); if( locationBeforeDot != null ) { IParsedElement pe = locationBeforeDot.getParsedElement(); if( pe instanceof IExpression ) { return (IExpression)pe; } } return null; }
IExpression getExpressionAtPos( int iPos ) { IParseTree locationBeforeDot = IParseTree.Search.getDeepestLocation( _parser.getLocations(), iPos - _parser.getOffsetShift(), true ); if( locationBeforeDot != null ) { IParsedElement pe = locationBeforeDot.getParsedElement(); if( pe instanceof IExpression ) { return (IExpression)pe; } } return null; }
int getPositionAtStartOfExpressionAtCaret() { IParseTree locationBeforeDot = IParseTree.Search.getDeepestLocation( _parser.getLocations(), _editor.getCaretPosition() - _parser.getOffsetShift(), true ); return locationBeforeDot.getOffset(); }
int getPositionAtStartOfExpressionAtCaret() { IParseTree locationBeforeDot = IParseTree.Search.getDeepestLocation( _parser.getLocations(), _editor.getCaretPosition() - _parser.getOffsetShift(), true ); return locationBeforeDot.getOffset(); }
public IExpression getExpressionContainingCharacterBeforeCaret() { int iPos = _editor.getCaretPosition() - _parser.getOffsetShift(); IParseTree locationBeforeDot = IParseTree.Search.getDeepestLocation( _parser.getLocations(), iPos - 1, iPos, true ); if( locationBeforeDot != null ) { IParsedElement pe = locationBeforeDot.getParsedElement(); if( pe instanceof IExpression ) { return (IExpression)pe; } } return null; }
public IExpression getExpressionContainingCharacterBeforeCaret() { int iPos = _editor.getCaretPosition() - _parser.getOffsetShift(); IParseTree locationBeforeDot = IParseTree.Search.getDeepestLocation( _parser.getLocations(), iPos - 1, iPos, true ); if( locationBeforeDot != null ) { IParsedElement pe = locationBeforeDot.getParsedElement(); if( pe instanceof IExpression ) { return (IExpression)pe; } } return null; }
@Override public void run() { if( getGosuDocument().getLocations() == null ) { _editor.repaint(); } getGosuDocument().setLocations( locations ); getGosuDocument().setLocationsOffset( _parser.getOffsetShift() ); } } );
void displayJavadocHelp( IParseTree parseTree ) { String strHelpText = getContextHelp( parseTree ); if( strHelpText == null ) { return; } try { dismissCompletionPopup(); Rectangle rcCaretBounds = _editor.modelToView( parseTree.getOffset() + _parser.getOffsetShift() ); _javadocPopup = new JavadocPopup( strHelpText, this ); if( rcCaretBounds != TEST_RECTANGLE ) { _javadocPopup.show( _editor, rcCaretBounds.x, rcCaretBounds.y + rcCaretBounds.height ); } EventQueue.invokeLater( () -> { _editor.requestFocus(); _editor.repaint(); } ); } catch( BadLocationException e ) { editor.util.EditorUtilities.handleUncaughtException( e ); } }