mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-10 20:42:21 +02:00
Dictionary fixes for large containers, watch fixes for containers
This commit is contained in:
parent
5af6428bf4
commit
609dbfa256
5 changed files with 68 additions and 30 deletions
|
@ -77,7 +77,8 @@ namespace IDE
|
|||
New,
|
||||
OpenOrNew,
|
||||
Test,
|
||||
Run
|
||||
Run,
|
||||
GetVersion
|
||||
}
|
||||
|
||||
enum HotResolveState
|
||||
|
@ -9845,6 +9846,18 @@ namespace IDE
|
|||
}
|
||||
}
|
||||
|
||||
public FileVersionInfo GetVersionInfo()
|
||||
{
|
||||
if (mVersionInfo == null)
|
||||
{
|
||||
String exeFilePath = scope .();
|
||||
Environment.GetExecutableFilePath(exeFilePath);
|
||||
mVersionInfo = new .();
|
||||
mVersionInfo.GetVersionInfo(exeFilePath).IgnoreError();
|
||||
}
|
||||
return mVersionInfo;
|
||||
}
|
||||
|
||||
#if !CLI
|
||||
public override void Init()
|
||||
{
|
||||
|
@ -9970,10 +9983,7 @@ namespace IDE
|
|||
mAutoCompletePanel = new AutoCompletePanel();
|
||||
mAutoCompletePanel.mAutoDelete = false;
|
||||
|
||||
String exeFilePath = scope .();
|
||||
Environment.GetExecutableFilePath(exeFilePath);
|
||||
mVersionInfo = new .();
|
||||
mVersionInfo.GetVersionInfo(exeFilePath).IgnoreError();
|
||||
GetVersionInfo();
|
||||
OutputLine("IDE Started. Version {}.", mVersionInfo.FileVersion);
|
||||
|
||||
/*if (!mRunningTestScript)
|
||||
|
@ -11546,7 +11556,6 @@ namespace IDE
|
|||
{
|
||||
if (editData.mLoadedHash.GetKind() != .None)
|
||||
{
|
||||
File.WriteAllText(@"c:\temp\test.txt", editData.mQueuedContent).IgnoreError();
|
||||
editData.mLoadedHash = SourceHash.Create(editData.mLoadedHash.GetKind(), editData.mQueuedContent);
|
||||
}
|
||||
}) case .Err(let err))
|
||||
|
|
|
@ -210,7 +210,8 @@ namespace IDE.ui
|
|||
var propEntry = propEntryKV.value[0];
|
||||
if (propEntry.mPropertyName == "mFilter")
|
||||
{
|
||||
typeOptionsEntries.Add(propEntry);
|
||||
if (propEntry.mListViewItem != null)
|
||||
typeOptionsEntries.Add(propEntry);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -3128,6 +3128,7 @@ namespace IDE.ui
|
|||
});
|
||||
|
||||
// Fixits
|
||||
if ((mSourceViewPanel.mIsBeefSource) && (mSourceViewPanel.mProjectSource != null))
|
||||
{
|
||||
ResolveParams resolveParams = scope .();
|
||||
mSourceViewPanel.DoClassify(ResolveType.GetFixits, resolveParams, true);
|
||||
|
|
|
@ -51,7 +51,8 @@ namespace IDE.ui
|
|||
public String mAction ~ delete _;
|
||||
public List<String> mWarnings ~ DeleteContainerAndItems!(_);
|
||||
|
||||
public int32 mSeriesId = -1;
|
||||
public int32 mSeriesFirstVersion = -1;
|
||||
public int32 mSeriesVersion = -1;
|
||||
|
||||
public bool ParseCmd(List<StringView> cmd)
|
||||
{
|
||||
|
@ -444,7 +445,8 @@ namespace IDE.ui
|
|||
public DarkButton mMoreButton;
|
||||
public DarkButton mLessButton;
|
||||
public static int32 sIdx;
|
||||
public int32 mSeriesId = ++sIdx;
|
||||
public int32 mSeriesVersion = ++sIdx;
|
||||
public int32 mSeriesFirstVersion = mSeriesVersion;
|
||||
}
|
||||
|
||||
public class WatchRefreshButton : ButtonWidget
|
||||
|
@ -1179,7 +1181,7 @@ namespace IDE.ui
|
|||
|
||||
public void RemoveInvalidContinuationItems()
|
||||
{
|
||||
var lastValidListViewItem = this;
|
||||
/*var lastValidListViewItem = this;
|
||||
for (int32 idx = 1; idx < mWatchSeriesInfo.mCount; idx++)
|
||||
{
|
||||
int32 parentIdx = idx + mWatchSeriesInfo.mStartMemberIdx;
|
||||
|
@ -1203,9 +1205,9 @@ namespace IDE.ui
|
|||
}
|
||||
else
|
||||
lastValidListViewItem = watchListViewItem;
|
||||
}
|
||||
}*/
|
||||
|
||||
// This caused 'closing' opened items with Dictionay elements when stepping
|
||||
// This caused 'closing' opened items with Dictionary elements when stepping
|
||||
/*if (mWatchSeriesInfo.mAddrs != null)
|
||||
{
|
||||
int32 checkIdx = mWatchSeriesInfo.mStartMemberIdx + 1;
|
||||
|
@ -1214,7 +1216,7 @@ namespace IDE.ui
|
|||
WatchListViewItem watchListViewItem = (WatchListViewItem)mParentItem.mChildItems[checkIdx];
|
||||
if (watchListViewItem.mWatchSeriesInfo != mWatchSeriesInfo)
|
||||
break;
|
||||
mParentItem.RemoveChildItem(watchListViewItem);
|
||||
//mParentItem.RemoveChildItem(watchListViewItem);
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
@ -1328,6 +1330,7 @@ namespace IDE.ui
|
|||
bool wantsFillIn = (curY + ofsY + itemHeight >= 0) && (curY + ofsY < mListView.mHeight);
|
||||
bool wantsDelete = !wantsFillIn;
|
||||
bool forceDelete = false;
|
||||
bool forceFillIn = false;
|
||||
|
||||
if (mDisabled)
|
||||
{
|
||||
|
@ -1335,13 +1338,18 @@ namespace IDE.ui
|
|||
wantsDelete = false;
|
||||
}
|
||||
|
||||
if ((curWatchListViewItem != null) && (idx > 0) && (curWatchListViewItem.mWatchEntry.mSeriesId != mWatchSeriesInfo.mSeriesId))
|
||||
if ((curWatchListViewItem != null) && (idx > 0) && (curWatchListViewItem.mWatchEntry.mSeriesFirstVersion != mWatchSeriesInfo.mSeriesFirstVersion))
|
||||
{
|
||||
// This logic gets invoked for Beef array views....
|
||||
forceDelete = true;
|
||||
wantsFillIn = true;
|
||||
}
|
||||
|
||||
if ((curWatchListViewItem != null) && (idx > 0) && (curWatchListViewItem.mWatchEntry.mSeriesVersion != mWatchSeriesInfo.mSeriesVersion))
|
||||
{
|
||||
forceFillIn = true;
|
||||
}
|
||||
|
||||
if ((forceDelete) ||
|
||||
((wantsDelete) && (idx != 0) && (curWatchListViewItem != null) && (curWatchListViewItem.mChildAreaHeight == 0) && (!curWatchListViewItem.mIsSelected)))
|
||||
{
|
||||
|
@ -1350,16 +1358,26 @@ namespace IDE.ui
|
|||
curWatchListViewItem = null;
|
||||
}
|
||||
|
||||
if ((curWatchListViewItem == null) && (wantsFillIn))
|
||||
if (((curWatchListViewItem == null) && (wantsFillIn)) ||
|
||||
(forceFillIn))
|
||||
{
|
||||
prevWatchListViewItem.mBottomPadding = (curY - prevWatchListViewItem.mY) - prevWatchListViewItem.mSelfHeight - prevWatchListViewItem.mChildAreaHeight;
|
||||
curWatchListViewItem = (WatchListViewItem)mParentItem.CreateChildItemAtIndex(curMemberIdx);
|
||||
curWatchListViewItem.mVisible = false;
|
||||
if (curWatchListViewItem == null)
|
||||
curWatchListViewItem = (WatchListViewItem)mParentItem.CreateChildItemAtIndex(curMemberIdx);
|
||||
curWatchListViewItem.mX = mX;
|
||||
mWatchSeriesInfo.AddRef();
|
||||
curWatchListViewItem.mWatchSeriesInfo = mWatchSeriesInfo;
|
||||
curWatchListViewItem.mSeriesMemberIdx = idx;
|
||||
|
||||
if (curWatchListViewItem.mWatchSeriesInfo == null)
|
||||
{
|
||||
curWatchListViewItem.mVisible = false;
|
||||
mWatchSeriesInfo.AddRef();
|
||||
curWatchListViewItem.mWatchSeriesInfo = mWatchSeriesInfo;
|
||||
curWatchListViewItem.mSeriesMemberIdx = idx;
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.Assert(curWatchListViewItem.mWatchSeriesInfo == mWatchSeriesInfo);
|
||||
Debug.Assert(curWatchListViewItem.mSeriesMemberIdx == idx);
|
||||
}
|
||||
|
||||
Object[] formatParams = scope Object[mWatchSeriesInfo.mAddrsEntrySize + 1];
|
||||
formatParams[0] = idx;
|
||||
|
||||
|
@ -1401,8 +1419,10 @@ namespace IDE.ui
|
|||
evalStr.AppendF(mWatchSeriesInfo.mEvalTemplate, params formatParams);
|
||||
|
||||
watchListView.mWatchOwner.SetupListViewItem(curWatchListViewItem, dispStr, evalStr);
|
||||
curWatchListViewItem.mWatchEntry.mSeriesId = mWatchSeriesInfo.mSeriesId;
|
||||
curMemberIdx++;
|
||||
curWatchListViewItem.mWatchEntry.mSeriesFirstVersion = mWatchSeriesInfo.mSeriesFirstVersion;
|
||||
curWatchListViewItem.mWatchEntry.mSeriesVersion = mWatchSeriesInfo.mSeriesVersion;
|
||||
if (!forceFillIn)
|
||||
curMemberIdx++;
|
||||
}
|
||||
|
||||
|
||||
|
@ -1757,15 +1777,16 @@ namespace IDE.ui
|
|||
listViewItem.AllowDragging = true;
|
||||
listViewItem.mOpenOnDoubleClick = false;
|
||||
|
||||
var subViewItem = (DarkListViewItem)listViewItem.CreateSubItem(1);
|
||||
var subViewItem = (DarkListViewItem)listViewItem.GetOrCreateSubItem(1);
|
||||
subViewItem.Label = "";
|
||||
subViewItem.AllowDragging = true;
|
||||
|
||||
subViewItem = (DarkListViewItem)listViewItem.CreateSubItem(2);
|
||||
subViewItem = (DarkListViewItem)listViewItem.GetOrCreateSubItem(2);
|
||||
subViewItem.Label = "";
|
||||
subViewItem.AllowDragging = true;
|
||||
|
||||
((WatchListViewItem)listViewItem).mWatchEntry = watchEntry;
|
||||
|
||||
delete listViewItem.mWatchEntry;
|
||||
listViewItem.mWatchEntry = watchEntry;
|
||||
}
|
||||
|
||||
public void AddWatchItem(String name)
|
||||
|
@ -2352,7 +2373,7 @@ namespace IDE.ui
|
|||
// This keeps expanded items expanded when single stepping, but will cause them to refresh and close
|
||||
// when we are actually evaluating a different value with the same name in a different context
|
||||
if ((prevWatchSeriesInfo.mEvalTemplate == watchSeriesInfo.mEvalTemplate) && (prevWatchSeriesInfo.mDisplayTemplate == watchSeriesInfo.mDisplayTemplate))
|
||||
watchSeriesInfo.mSeriesId = prevWatchSeriesInfo.mSeriesId;
|
||||
watchSeriesInfo.mSeriesFirstVersion = prevWatchSeriesInfo.mSeriesFirstVersion;
|
||||
|
||||
memberItem.mWatchSeriesInfo.ReleaseRef();
|
||||
}
|
||||
|
|
|
@ -5307,6 +5307,8 @@ bool WinDebugger::ParseFormatInfo(DbgModule* dbgModule, const StringImpl& format
|
|||
while (formatFlags.length() > 0)
|
||||
{
|
||||
formatFlags = Trim(formatFlags);
|
||||
if (formatFlags.IsEmpty())
|
||||
break;
|
||||
if (formatFlags[0] != ',')
|
||||
{
|
||||
return false;
|
||||
|
@ -5731,6 +5733,7 @@ String WinDebugger::GetDictionaryItems(DbgCompileUnit* dbgCompileUnit, DebugVisu
|
|||
return "";
|
||||
}
|
||||
int entrySize = entriesPtr.mType->mTypeParam->GetByteCount();
|
||||
int bucketIdxSize = bucketsPtr.mType->mTypeParam->GetByteCount();
|
||||
|
||||
String addrs;
|
||||
|
||||
|
@ -5757,8 +5760,11 @@ String WinDebugger::GetDictionaryItems(DbgCompileUnit* dbgCompileUnit, DebugVisu
|
|||
encodeCount++;
|
||||
}
|
||||
else
|
||||
{
|
||||
nodeIdx = ReadMemory<int>(bucketsPtr.mPtr + bucketIdx * sizeof(int32));
|
||||
{
|
||||
if (bucketIdxSize == 4)
|
||||
nodeIdx = ReadMemory<int>(bucketsPtr.mPtr + bucketIdx * sizeof(int32));
|
||||
else
|
||||
nodeIdx = (int)ReadMemory<int64>(bucketsPtr.mPtr + bucketIdx * sizeof(int64));
|
||||
bucketIdx++;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue