当前位置: 首页>>代码示例>>Java>>正文


Java JavaReferenceEditorUtil类代码示例

本文整理汇总了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);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:24,代码来源:PackageChooserDialog.java

示例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);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:12,代码来源:PsiTypeControl.java

示例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();
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:14,代码来源:ReplaceConstructorWithFactoryDialog.java

示例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);
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:9,代码来源:PsiUtilEx.java

示例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);
  }
}
 
开发者ID:consulo,项目名称:consulo-java,代码行数:10,代码来源:PsiUtilEx.java


注:本文中的com.intellij.ui.JavaReferenceEditorUtil类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。