mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
extensions for error attachments
This commit is contained in:
+2
-2
@@ -393,13 +393,13 @@ public class CodeCompletionHandlerBase implements CodeInsightActionHandler {
|
||||
if (!range.substring(fileCopy.getText()).equals(insertedElement.getText())) {
|
||||
LOG.error(LogMessageEx.createEvent("Inconsistent completion tree", "range=" + range + "\n" + DebugUtil.currentStackTrace(),
|
||||
createFileTextAttachment(fileCopy, originalFile), createAstAttachment(fileCopy, originalFile),
|
||||
new Attachment("Element at caret", insertedElement.getText())));
|
||||
new Attachment("Element at caret.txt", insertedElement.getText())));
|
||||
}
|
||||
return insertedElement;
|
||||
}
|
||||
|
||||
private static Attachment createAstAttachment(PsiFile fileCopy, final PsiFile originalFile) {
|
||||
return new Attachment(originalFile.getViewProvider().getVirtualFile().getPath() + " syntactic tree", DebugUtil.psiToString(fileCopy, false));
|
||||
return new Attachment(originalFile.getViewProvider().getVirtualFile().getPath() + " syntactic tree.txt", DebugUtil.psiToString(fileCopy, false));
|
||||
}
|
||||
|
||||
private static Attachment createFileTextAttachment(PsiFile fileCopy, final PsiFile originalFile) {
|
||||
|
||||
@@ -108,8 +108,8 @@ public class PhysicalDomParentStrategy implements DomParentStrategy {
|
||||
"navContext?.physical=" + (navContext != null && navContext.isPhysical()) + ";\n" +
|
||||
"myElement.physical=" + myElement.isPhysical() + ";\n" +
|
||||
"thatElement.physical=" + thatElement.isPhysical() + "\n" + DebugUtil.currentStackTrace(),
|
||||
new Attachment("Including tag text 1", curContext == null ? "null" : curContext.getText()),
|
||||
new Attachment("Including tag text 2", navContext == null ? "null" : navContext.getText())
|
||||
new Attachment("Including tag text 1.xml", curContext == null ? "null" : curContext.getText()),
|
||||
new Attachment("Including tag text 2.xml", navContext == null ? "null" : navContext.getText())
|
||||
));
|
||||
throw new AssertionError();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user