Java 类com.intellij.ui.JavaReferenceEditorUtil 实例源码

项目:intellij-ce-playground    文件:PackageChooserDialog.java   
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);
}
项目:intellij-ce-playground    文件:PsiTypeControl.java   
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);
}
项目:intellij-ce-playground    文件:ReplaceConstructorWithFactoryDialog.java   
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();
}
项目:intellij-ce-playground    文件:PsiUtilEx.java   
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);
  }
}
项目:tools-idea    文件:PsiTypeControl.java   
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);
}
项目:tools-idea    文件:ReplaceConstructorWithFactoryDialog.java   
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();
}
项目:tools-idea    文件:PsiUtilEx.java   
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);
  }
}
项目:consulo-java    文件:PsiTypeControl.java   
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);
}
项目:consulo-java    文件:ReplaceConstructorWithFactoryDialog.java   
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();
}
项目:consulo-java    文件:PsiUtilEx.java   
@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);
  }
}