Java 类com.intellij.uiDesigner.quickFixes.ChangeFieldTypeFix 实例源码

项目:intellij-ce-playground    文件:MorphAction.java   
private static void updateBoundFieldType(final GuiEditor editor, final RadComponent oldComponent, final ComponentItem targetItem) {
  PsiField oldBoundField = BindingProperty.findBoundField(editor.getRootContainer(), oldComponent.getBinding());
  if (oldBoundField != null) {
    final PsiElementFactory factory = JavaPsiFacade.getInstance(editor.getProject()).getElementFactory();
    try {
      PsiType componentType = factory.createTypeFromText(targetItem.getClassName().replace('$', '.'), null);
      new ChangeFieldTypeFix(editor, oldBoundField, componentType).run();
    }
    catch (IncorrectOperationException e) {
      LOG.error(e);
    }
  }
}
项目:tools-idea    文件:MorphAction.java   
private static void updateBoundFieldType(final GuiEditor editor, final RadComponent oldComponent, final ComponentItem targetItem) {
  PsiField oldBoundField = BindingProperty.findBoundField(editor.getRootContainer(), oldComponent.getBinding());
  if (oldBoundField != null) {
    final PsiElementFactory factory = JavaPsiFacade.getInstance(editor.getProject()).getElementFactory();
    try {
      PsiType componentType = factory.createTypeFromText(targetItem.getClassName().replace('$', '.'), null);
      new ChangeFieldTypeFix(editor, oldBoundField, componentType).run();
    }
    catch (IncorrectOperationException e) {
      LOG.error(e);
    }
  }
}
项目:consulo-ui-designer    文件:MorphAction.java   
private static void updateBoundFieldType(final GuiEditor editor, final RadComponent oldComponent, final ComponentItem targetItem) {
  PsiField oldBoundField = BindingProperty.findBoundField(editor.getRootContainer(), oldComponent.getBinding());
  if (oldBoundField != null) {
    final PsiElementFactory factory = JavaPsiFacade.getInstance(editor.getProject()).getElementFactory();
    try {
      PsiType componentType = factory.createTypeFromText(targetItem.getClassName().replace('$', '.'), null);
      new ChangeFieldTypeFix(editor, oldBoundField, componentType).run();
    }
    catch (IncorrectOperationException e) {
      LOG.error(e);
    }
  }
}