Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
小 白蛋
Intellij Community
Commits
e9760417
Commit
e9760417
authored
9 years ago
by
Egor.Ushakov
Browse files
Options
Download
Email Patches
Plain Diff
avoid exceptions on getContainingFile()
parent
933c8d74
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
java/debugger/impl/src/com/intellij/debugger/ui/AlternativeSourceNotificationProvider.java
+3
-5
...ij/debugger/ui/AlternativeSourceNotificationProvider.java
with
3 additions
and
5 deletions
+3
-5
java/debugger/impl/src/com/intellij/debugger/ui/AlternativeSourceNotificationProvider.java
+
3
-
5
View file @
e9760417
...
...
@@ -170,17 +170,15 @@ public class AlternativeSourceNotificationProvider extends EditorNotifications.P
final
DebuggerContextImpl
context
=
DebuggerManagerEx
.
getInstanceEx
(
project
).
getContext
();
final
DebuggerSession
session
=
context
.
getDebuggerSession
();
final
PsiClass
item
=
((
ComboBoxClassElement
)
switcher
.
getSelectedItem
()).
myClass
;
if
(
session
!=
null
)
{
final
VirtualFile
vFile
=
item
.
getContainingFile
().
getVirtualFile
();
if
(
session
!=
null
&&
vFile
!=
null
)
{
session
.
getProcess
().
getManagerThread
().
schedule
(
new
DebuggerCommandImpl
()
{
@Override
protected
void
action
()
throws
Exception
{
StackFrameProxyImpl
proxy
=
context
.
getFrameProxy
();
Location
location
=
proxy
!=
null
?
proxy
.
location
()
:
null
;
if
(
location
!=
null
)
{
VirtualFile
vFile
=
item
.
getContainingFile
().
getVirtualFile
();
if
(
vFile
!=
null
)
{
DebuggerUtilsEx
.
setAlternativeSourceUrl
(
location
.
declaringType
().
name
(),
vFile
.
getUrl
(),
project
);
}
DebuggerUtilsEx
.
setAlternativeSourceUrl
(
location
.
declaringType
().
name
(),
vFile
.
getUrl
(),
project
);
}
DebuggerUIUtil
.
invokeLater
(
new
Runnable
()
{
@Override
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Projects
Groups
Snippets
Help