This commit is contained in:
Egor.Ushakov
2016-02-11 14:41:10 +03:00
parent 047e6d7ff2
commit 87f5878d43
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2015 JetBrains s.r.o.
* Copyright 2000-2016 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -78,32 +78,22 @@ public class StackFrameDescriptorImpl extends NodeDescriptorImpl implements Stac
}
myMethodOccurrence = tracker.getMethodOccurrence(myUiIndex, myLocation.method());
myIsSynthetic = DebuggerUtils.isSynthetic(myMethodOccurrence.getMethod());
ApplicationManager.getApplication().runReadAction(new Runnable() {
@Override
public void run() {
mySourcePosition = ContextUtil.getSourcePosition(StackFrameDescriptorImpl.this);
final PsiFile file = mySourcePosition != null? mySourcePosition.getFile() : null;
if (file == null) {
myIsInLibraryContent = true;
}
else {
myBackgroundColor = FileColorManager.getInstance(file.getProject()).getFileColor(file);
final ProjectFileIndex projectFileIndex = ProjectRootManager.getInstance(getDebugProcess().getProject()).getFileIndex();
final VirtualFile vFile = file.getVirtualFile();
myIsInLibraryContent = vFile != null && (projectFileIndex.isInLibraryClasses(vFile) || projectFileIndex.isInLibrarySource(vFile));
}
ApplicationManager.getApplication().runReadAction(() -> {
mySourcePosition = ContextUtil.getSourcePosition(this);
final PsiFile file = mySourcePosition != null? mySourcePosition.getFile() : null;
if (file == null) {
myIsInLibraryContent = true;
}
else {
myBackgroundColor = FileColorManager.getInstance(file.getProject()).getFileColor(file);
final ProjectFileIndex projectFileIndex = ProjectRootManager.getInstance(getDebugProcess().getProject()).getFileIndex();
final VirtualFile vFile = file.getVirtualFile();
myIsInLibraryContent = vFile != null && (projectFileIndex.isInLibraryClasses(vFile) || projectFileIndex.isInLibrarySource(vFile));
}
});
}
catch (InternalException e) {
LOG.info(e);
myLocation = null;
myMethodOccurrence = tracker.getMethodOccurrence(0, null);
myIsSynthetic = false;
myIsInLibraryContent = false;
}
catch (EvaluateException e) {
catch (InternalException | EvaluateException e) {
LOG.info(e);
myLocation = null;
myMethodOccurrence = tracker.getMethodOccurrence(0, null);