try {
action = LocalHistory.startAction(myProject, getActionName(myDirectory, inputString));
PsiElement[] psiElements = create(inputString, myDirectory);
myCreatedElements = new SmartPsiElementPointer[psiElements.length];
SmartPointerManager manager = SmartPointerManager.getInstance(myProject);
for (int i = 0; i < myCreatedElements.length; i++) {
myCreatedElements[i] = manager.createSmartPsiElementPointer(psiElements[i]);
}
}
catch (Exception ex) {
exception[0] = ex;
}