本文整理匯總了Java中org.eclipse.jface.text.IDocument.set方法的典型用法代碼示例。如果您正苦於以下問題:Java IDocument.set方法的具體用法?Java IDocument.set怎麽用?Java IDocument.set使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.eclipse.jface.text.IDocument
的用法示例。
在下文中一共展示了IDocument.set方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: createViewerWithVariables
import org.eclipse.jface.text.IDocument; //導入方法依賴的package包/類
/**
* @param composite parent for source viewer
* @param styles style bit for source viewer
* @return source viewer object
*/
public static SourceViewer createViewerWithVariables(Composite composite, int styles) {
IDocument document = new Document();
StringBuffer buff = new StringBuffer();
buff.append("\n package "+HYDROGRAPH_COMPILATIONUNIT_PACKAGE+";\n\n");
buff.append(getImports());
buff.append("public class " + VIEWER_CLASS_NAME + currentId + " {\n\n\n");
buff.append("\tpublic " + "String" +"myFunction(){\n");
buff.append(ExpressionEditorStyledText.RETURN_STATEMENT);
int length = buff.toString().length();
String defaultValue = " ";
buff.append(defaultValue + "\n\n\n;\t\n}\n}");
document.set(buff.toString());
return initializeViewer(composite,styles,document,length);
}
示例2: reload
import org.eclipse.jface.text.IDocument; //導入方法依賴的package包/類
public void reload(String toAppend) {
IDocument doc = jsEditor.getDocumentProvider().getDocument(getEditorInput());
doc.set(step.getExpression() + toAppend);
}
示例3: reload
import org.eclipse.jface.text.IDocument; //導入方法依賴的package包/類
public void reload(String toAppend) {
IDocument doc = jsEditor.getDocumentProvider().getDocument(getEditorInput());
doc.set(statement.getExpression() + toAppend);
}
示例4: reload
import org.eclipse.jface.text.IDocument; //導入方法依賴的package包/類
public void reload(String toAppend) {
IDocument doc = jsEditor.getDocumentProvider().getDocument(getEditorInput());
doc.set(transaction.handlers + toAppend);
}
示例5: reload
import org.eclipse.jface.text.IDocument; //導入方法依賴的package包/類
public void reload(String toAppend) {
IDocument doc = jsEditor.getDocumentProvider().getDocument(getEditorInput());
doc.set(treeObject.getFunction() + toAppend);
}