本文整理汇总了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);
}