本文整理汇总了Java中com.intellij.ui.EditorTextField.setDocument方法的典型用法代码示例。如果您正苦于以下问题:Java EditorTextField.setDocument方法的具体用法?Java EditorTextField.setDocument怎么用?Java EditorTextField.setDocument使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.intellij.ui.EditorTextField
的用法示例。
在下文中一共展示了EditorTextField.setDocument方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createUIComponents
import com.intellij.ui.EditorTextField; //导入方法依赖的package包/类
private void createUIComponents() {
myEditorTextField1 = new EditorTextField("", myProject, StdFileTypes.JAVA);
final JavaCodeFragmentFactory factory = JavaCodeFragmentFactory.getInstance(myProject);
PsiPackage defaultPackage = JavaPsiFacade.getInstance(myProject).findPackage("");
final PsiCodeFragment fragment = factory.createReferenceCodeFragment("", defaultPackage, true, true);
myEditorTextField1.setDocument(PsiDocumentManager.getInstance(myProject).getDocument(fragment));
}
示例2: createUIComponents
import com.intellij.ui.EditorTextField; //导入方法依赖的package包/类
private void createUIComponents() {
myEditorTextField1 = new EditorTextField("", myProject, JavaFileType.INSTANCE);
final JavaCodeFragmentFactory factory = JavaCodeFragmentFactory.getInstance(myProject);
PsiJavaPackage defaultPackage = JavaPsiFacade.getInstance(myProject).findPackage("");
final PsiCodeFragment fragment = factory.createReferenceCodeFragment("", defaultPackage, true, true);
myEditorTextField1.setDocument(PsiDocumentManager.getInstance(myProject).getDocument(fragment));
}
示例3: apply
import com.intellij.ui.EditorTextField; //导入方法依赖的package包/类
public void apply(@NotNull EditorTextField field, @NotNull String text) {
Project project = field.getProject();
if (project != null) {
field.setDocument(createDocument(project, text));
}
}
示例4: apply
import com.intellij.ui.EditorTextField; //导入方法依赖的package包/类
public void apply(@Nonnull EditorTextField field, @Nonnull String text) {
Project project = field.getProject();
if (project != null) {
field.setDocument(createDocument(project, text));
}
}