Can I send a stacktrace into to a stacktrace console?

Answered

Hello,

I think I saw once a Stacktrace console in IntelliJ, but I cannot find any reference in the Community Edition source code.

 

If exists, howe can I sand a stacktrace there (in String format) so that it is shown to the user? Ideally it should be opened from the event log notification of by triggering an action linked to a button.


Best
Michele

0
2 comments

See `com.intellij.unscramble.AnalyzeStacktraceUtil#addConsole`
https://github.com/JetBrains/intellij-community/blob/master/platform/lang-impl/src/com/intellij/unscramble/AnalyzeStacktraceUtil.java#L62

Ex, this is how "Analyze Stack Trace" dialog is implemented: 
https://github.com/JetBrains/intellij-community/blob/master/platform/lang-impl/src/com/intellij/unscramble/AnalyzeStacktraceDialog.java#L54

To add action to the com.intellij.notification.Notification, you can use `Notification.addAction` method (see also `com.intellij.notification.NotificationAction`)

0

Thanks a lot, it works very well!

0

Please sign in to leave a comment.