/** Renders the document. This allows the model to be safely rendered in the presence of currency, if the model supports being updated asynchronously. The given runnable will be executed in a way that allows it to safely read the model with no changes while the runnable is being executed. The runnable itself may not make any mutations. @param runnable The runnable. **/ public void render (Runnable runnable) { document_.render (runnable); }
/** * {@inheritDoc} */ public void render(Runnable r) { delegate.render(r); }
/** * {@inheritDoc} */ @Override public void render(Runnable r) { delegate.render(r); }
public static int findLastBracket(final Tree tree, final CompilationUnitTree cu, final SourcePositions positions, final Document doc) { final int[] result = new int[1]; doc.render(new Runnable() { public void run() { result[0] = findLastBracketImpl(tree, cu, positions, doc); } }); return result[0]; }
public static Token<JavaTokenId> getToken(final CompilationInfo info, final Document doc, final TreePath tree) { @SuppressWarnings("unchecked") final Token<JavaTokenId>[] result = new Token[1]; doc.render(new Runnable() { public void run() { result[0] = createHighlightImpl(info, doc, tree); } }); return result[0]; }
/** * {@inheritDoc} */ @Override public void render(Runnable r) { delegate.render(r); }
public void render( final Runnable r ) { document.render( r ); } }
public void render(Runnable r) { original.render(r); }
public void render( final Runnable r ) { document.render( r ); } }
@Override public int getOffset( JTextComponent component ) { Document document = component.getDocument(); document.render( this ); return myOffset; }
public Boolean call() { sharp = true; final Document doc = component.getDocument(); doc.render(this); return res; } }
public static boolean isIncludeCompletionEnabled(final Document doc, final int offset) { final AtomicBoolean out = new AtomicBoolean(false); doc.render(new Runnable() { @Override public void run() { out.set(isIncludeCompletionEnabledImpl(doc, offset)); } }); return out.get(); }
public boolean equals(Object whatever) { if (!(whatever instanceof Caret)) { return super.equals(whatever); } sharp = false; final Document doc = component.getDocument(); doc.render(this); return res; }
public static boolean isCompletionEnabled(final Document doc, final int offset, final int queryType) { final AtomicBoolean out = new AtomicBoolean(false); doc.render(new Runnable() { @Override public void run() { out.set(isCompletionEnabledImpl(doc, offset, queryType)); } }); return out.get(); }
static TokenItem<TokenId> getToken(final Document doc, final int offset) { final AtomicReference<TokenItem<TokenId>> out = new AtomicReference<TokenItem<TokenId>>(); doc.render(new Runnable() { @Override public void run() { out.set(CndTokenUtilities.getTokenCheckPrev(doc, offset)); } }); return out.get(); }
public static boolean isPreprocessorDirectiveCompletionEnabled(final Document doc, final int offset) { final AtomicBoolean out = new AtomicBoolean(false); doc.render(new Runnable() { @Override public void run() { out.set(isPreprocessorDirectiveCompletionEnabledImpl(doc, offset)); } }); return out.get(); }
@Override public void modify(final Context context) { assert context != null; context.document().render(new Runnable() { @Override public void run() { modifyUnderWriteLock(context); } }); }
public static int findBodyStart(final CompilationInfo info, final Tree cltree, final CompilationUnitTree cu, final SourcePositions positions, final Document doc) { Kind kind = cltree.getKind(); if (!TreeUtilities.CLASS_TREE_KINDS.contains(kind) && kind != Kind.METHOD) throw new IllegalArgumentException("Unsupported kind: "+ kind); final int[] result = new int[1]; doc.render(new Runnable() { public void run() { result[0] = findBodyStartImpl(info, cltree, cu, positions, doc); } }); return result[0]; }
private void refreshColors() { colorSettings = (FontColorSettings)colorSource.allInstances().iterator().next(); document().render(new Runnable() { @Override public void run() { int end = document().getLength(); fireEvent(EditorViewFactoryChange.createList(0, end, EditorViewFactoryChange.Type.CHARACTER_CHANGE)); } }); }
private FunctionInfo prepareFunctionInfo(final CsmReference ref, final Document doc) { final FunParamsTokenProcessor tp = new FunParamsTokenProcessor(doc); if (doc != null) { doc.render(new Runnable() { @Override public void run() { CndTokenUtilities.processTokens(tp, doc, ref.getStartOffset(), doc.getLength()); } }); } return tp.getFunctionInfo(); }