本文整理汇总了Java中com.intellij.ui.JavaReferenceEditorUtil类的典型用法代码示例。如果您正苦于以下问题:Java JavaReferenceEditorUtil类的具体用法?Java JavaReferenceEditorUtil怎么用?Java JavaReferenceEditorUtil使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
JavaReferenceEditorUtil类属于com.intellij.ui包,在下文中一共展示了JavaReferenceEditorUtil类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: setupPathComponent
import com.intellij.ui.JavaReferenceEditorUtil; //导入依赖的package包/类
private void setupPathComponent(final JPanel northPanel) {
northPanel.add(new TextFieldAction() {
@Override
public void linkSelected(LinkLabel aSource, Object aLinkData) {
toggleShowPathComponent(northPanel, this);
}
}, BorderLayout.EAST);
myPathEditor = new EditorTextField(JavaReferenceEditorUtil.createDocument("", myProject, false), myProject, StdFileTypes.JAVA);
myPathEditor.addDocumentListener(new DocumentAdapter() {
@Override
public void documentChanged(DocumentEvent e) {
myAlarm.cancelAllRequests();
myAlarm.addRequest(new Runnable() {
@Override
public void run() {
updateTreeFromPath();
}
}, 300);
}
});
myPathEditor.setBorder(BorderFactory.createEmptyBorder(0, 0, 2, 0));
northPanel.add(myPathEditor, BorderLayout.SOUTH);
}
示例2: createMainComponent
import com.intellij.ui.JavaReferenceEditorUtil; //导入依赖的package包/类
protected PsiTypePanel createMainComponent(PsiTypePanel boundedComponent, final Project project) {
if (boundedComponent == null) {
boundedComponent = new PsiTypePanel();
}
return PsiClassControl.initReferenceEditorWithBrowseButton(boundedComponent,
new ReferenceEditorWithBrowseButton(null, project, new Function<String, Document>() {
public Document fun(final String s) {
return JavaReferenceEditorUtil.createTypeDocument(s, project);
}
}, ""), this);
}
示例3: ReplaceConstructorWithFactoryDialog
import com.intellij.ui.JavaReferenceEditorUtil; //导入依赖的package包/类
ReplaceConstructorWithFactoryDialog(Project project, PsiMethod constructor, PsiClass containingClass) {
super(project, true);
myContainingClass = containingClass;
myConstructor = constructor;
myIsInner = myContainingClass.getContainingClass() != null
&& !myContainingClass.hasModifierProperty(PsiModifier.STATIC);
setTitle(ReplaceConstructorWithFactoryHandler.REFACTORING_NAME);
myTfTargetClassName = JavaReferenceEditorUtil.createReferenceEditorWithBrowseButton(new ChooseClassAction(), "", project, true);
init();
}
示例4: createDocument
import com.intellij.ui.JavaReferenceEditorUtil; //导入依赖的package包/类
public static Document createDocument(final String s, final Project project) {
if (ApplicationManager.getApplication().isUnitTestMode() || project.isDefault()) {
return new DocumentImpl(s);
}
else {
return JavaReferenceEditorUtil.createTypeDocument(s, project);
}
}
示例5: createDocument
import com.intellij.ui.JavaReferenceEditorUtil; //导入依赖的package包/类
@RequiredReadAction
public static Document createDocument(final String s, final Project project) {
if (ApplicationManager.getApplication().isUnitTestMode() || project.isDefault()) {
return new DocumentImpl(s);
}
else {
return JavaReferenceEditorUtil.createTypeDocument(s, project);
}
}