if (callFrames != null &&
callFrames.length() > 0 &&
contextDepth > 0)
{
view_.setCallFrames(callFrames, enteringDebugMode);
CallFrame browseFrame = callFrames.get(
contextDepth_ - 1);
String newBrowseFile = browseFrame.getAliasedFileName().trim();
boolean sourceChanged = false;
// check to see if the file we're about to switch to contains unsaved
// changes. if it does, use the source supplied by the server, even if
// the server thinks the document is clean.
if (fileContainsUnsavedChanges(newBrowseFile))
{
useBrowseSources = true;
}
// if the file is different or we're swapping into or out of the source
// viewer, turn off highlighting in the old file before turning it on
// in the new one. avoid this in the case where the file is different
// but both frames are viewed from source, since in this case an
// unnecessary close and reopen of the source viewer would be
// triggered.
if ((!newBrowseFile.equals(currentBrowseFile_) ||
useBrowseSources != useCurrentBrowseSource_) &&
!(useBrowseSources && useCurrentBrowseSource_))
{
openOrUpdateFileBrowsePoint(false, false);
}
useCurrentBrowseSource_ = useBrowseSources;
if (!currentBrowseSource_.equals(functionCode))
{
currentBrowseSource_ = functionCode;
sourceChanged = true;
}
// highlight the active line in the file now being debugged
currentBrowseFile_ = newBrowseFile;
currentBrowsePosition_ = browseFrame.getRange();
currentFunctionLineNumber_ = browseFrame.getFunctionLineNumber();
openOrUpdateFileBrowsePoint(true, sourceChanged);
}
else
{
openOrUpdateFileBrowsePoint(false, false);