@Override
  public boolean editInjectionInPlace(final PsiLanguageInjectionHost host) {
    if (!isMine(host)) return false;
    final Project project = host.getProject();
    final Configuration configuration = Configuration.getProjectInstance(project);
    final ArrayList<BaseInjection> injections = collectInjections(host, configuration);
    if (injections.isEmpty()) return false;
    final BaseInjection originalInjection = injections.get(0);
    final BaseInjection xmlInjection = createFrom(originalInjection);
    final BaseInjection newInjection =
      xmlInjection == null? showDefaultInjectionUI(project, originalInjection.copy()) : showInjectionUI(project, xmlInjection);
    if (newInjection != null) {
      configuration.replaceInjectionsWithUndo(
        project, host.getContainingFile(), Collections.singletonList(newInjection),
        Collections.singletonList(originalInjection),
        Collections.emptyList());
    }
    return true;
  }
@Override
  public boolean editInjectionInPlace(final PsiLanguageInjectionHost host)