mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-10 04:22:20 +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,
|
New,
|
||||||
OpenOrNew,
|
OpenOrNew,
|
||||||
Test,
|
Test,
|
||||||
Run
|
Run,
|
||||||
|
GetVersion
|
||||||
}
|
}
|
||||||
|
|
||||||
enum HotResolveState
|
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
|
#if !CLI
|
||||||
public override void Init()
|
public override void Init()
|
||||||
{
|
{
|
||||||
|
@ -9970,10 +9983,7 @@ namespace IDE
|
||||||
mAutoCompletePanel = new AutoCompletePanel();
|
mAutoCompletePanel = new AutoCompletePanel();
|
||||||
mAutoCompletePanel.mAutoDelete = false;
|
mAutoCompletePanel.mAutoDelete = false;
|
||||||
|
|
||||||
String exeFilePath = scope .();
|
GetVersionInfo();
|
||||||
Environment.GetExecutableFilePath(exeFilePath);
|
|
||||||
mVersionInfo = new .();
|
|
||||||
mVersionInfo.GetVersionInfo(exeFilePath).IgnoreError();
|
|
||||||
OutputLine("IDE Started. Version {}.", mVersionInfo.FileVersion);
|
OutputLine("IDE Started. Version {}.", mVersionInfo.FileVersion);
|
||||||
|
|
||||||
/*if (!mRunningTestScript)
|
/*if (!mRunningTestScript)
|
||||||
|
@ -11546,7 +11556,6 @@ namespace IDE
|
||||||
{
|
{
|
||||||
if (editData.mLoadedHash.GetKind() != .None)
|
if (editData.mLoadedHash.GetKind() != .None)
|
||||||
{
|
{
|
||||||
File.WriteAllText(@"c:\temp\test.txt", editData.mQueuedContent).IgnoreError();
|
|
||||||
editData.mLoadedHash = SourceHash.Create(editData.mLoadedHash.GetKind(), editData.mQueuedContent);
|
editData.mLoadedHash = SourceHash.Create(editData.mLoadedHash.GetKind(), editData.mQueuedContent);
|
||||||
}
|
}
|
||||||
}) case .Err(let err))
|
}) case .Err(let err))
|
||||||
|
|
|
@ -210,6 +210,7 @@ namespace IDE.ui
|
||||||
var propEntry = propEntryKV.value[0];
|
var propEntry = propEntryKV.value[0];
|
||||||
if (propEntry.mPropertyName == "mFilter")
|
if (propEntry.mPropertyName == "mFilter")
|
||||||
{
|
{
|
||||||
|
if (propEntry.mListViewItem != null)
|
||||||
typeOptionsEntries.Add(propEntry);
|
typeOptionsEntries.Add(propEntry);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -3128,6 +3128,7 @@ namespace IDE.ui
|
||||||
});
|
});
|
||||||
|
|
||||||
// Fixits
|
// Fixits
|
||||||
|
if ((mSourceViewPanel.mIsBeefSource) && (mSourceViewPanel.mProjectSource != null))
|
||||||
{
|
{
|
||||||
ResolveParams resolveParams = scope .();
|
ResolveParams resolveParams = scope .();
|
||||||
mSourceViewPanel.DoClassify(ResolveType.GetFixits, resolveParams, true);
|
mSourceViewPanel.DoClassify(ResolveType.GetFixits, resolveParams, true);
|
||||||
|
|
|
@ -51,7 +51,8 @@ namespace IDE.ui
|
||||||
public String mAction ~ delete _;
|
public String mAction ~ delete _;
|
||||||
public List<String> mWarnings ~ DeleteContainerAndItems!(_);
|
public List<String> mWarnings ~ DeleteContainerAndItems!(_);
|
||||||
|
|
||||||
public int32 mSeriesId = -1;
|
public int32 mSeriesFirstVersion = -1;
|
||||||
|
public int32 mSeriesVersion = -1;
|
||||||
|
|
||||||
public bool ParseCmd(List<StringView> cmd)
|
public bool ParseCmd(List<StringView> cmd)
|
||||||
{
|
{
|
||||||
|
@ -444,7 +445,8 @@ namespace IDE.ui
|
||||||
public DarkButton mMoreButton;
|
public DarkButton mMoreButton;
|
||||||
public DarkButton mLessButton;
|
public DarkButton mLessButton;
|
||||||
public static int32 sIdx;
|
public static int32 sIdx;
|
||||||
public int32 mSeriesId = ++sIdx;
|
public int32 mSeriesVersion = ++sIdx;
|
||||||
|
public int32 mSeriesFirstVersion = mSeriesVersion;
|
||||||
}
|
}
|
||||||
|
|
||||||
public class WatchRefreshButton : ButtonWidget
|
public class WatchRefreshButton : ButtonWidget
|
||||||
|
@ -1179,7 +1181,7 @@ namespace IDE.ui
|
||||||
|
|
||||||
public void RemoveInvalidContinuationItems()
|
public void RemoveInvalidContinuationItems()
|
||||||
{
|
{
|
||||||
var lastValidListViewItem = this;
|
/*var lastValidListViewItem = this;
|
||||||
for (int32 idx = 1; idx < mWatchSeriesInfo.mCount; idx++)
|
for (int32 idx = 1; idx < mWatchSeriesInfo.mCount; idx++)
|
||||||
{
|
{
|
||||||
int32 parentIdx = idx + mWatchSeriesInfo.mStartMemberIdx;
|
int32 parentIdx = idx + mWatchSeriesInfo.mStartMemberIdx;
|
||||||
|
@ -1203,9 +1205,9 @@ namespace IDE.ui
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
lastValidListViewItem = watchListViewItem;
|
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)
|
/*if (mWatchSeriesInfo.mAddrs != null)
|
||||||
{
|
{
|
||||||
int32 checkIdx = mWatchSeriesInfo.mStartMemberIdx + 1;
|
int32 checkIdx = mWatchSeriesInfo.mStartMemberIdx + 1;
|
||||||
|
@ -1214,7 +1216,7 @@ namespace IDE.ui
|
||||||
WatchListViewItem watchListViewItem = (WatchListViewItem)mParentItem.mChildItems[checkIdx];
|
WatchListViewItem watchListViewItem = (WatchListViewItem)mParentItem.mChildItems[checkIdx];
|
||||||
if (watchListViewItem.mWatchSeriesInfo != mWatchSeriesInfo)
|
if (watchListViewItem.mWatchSeriesInfo != mWatchSeriesInfo)
|
||||||
break;
|
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 wantsFillIn = (curY + ofsY + itemHeight >= 0) && (curY + ofsY < mListView.mHeight);
|
||||||
bool wantsDelete = !wantsFillIn;
|
bool wantsDelete = !wantsFillIn;
|
||||||
bool forceDelete = false;
|
bool forceDelete = false;
|
||||||
|
bool forceFillIn = false;
|
||||||
|
|
||||||
if (mDisabled)
|
if (mDisabled)
|
||||||
{
|
{
|
||||||
|
@ -1335,13 +1338,18 @@ namespace IDE.ui
|
||||||
wantsDelete = false;
|
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....
|
// This logic gets invoked for Beef array views....
|
||||||
forceDelete = true;
|
forceDelete = true;
|
||||||
wantsFillIn = true;
|
wantsFillIn = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ((curWatchListViewItem != null) && (idx > 0) && (curWatchListViewItem.mWatchEntry.mSeriesVersion != mWatchSeriesInfo.mSeriesVersion))
|
||||||
|
{
|
||||||
|
forceFillIn = true;
|
||||||
|
}
|
||||||
|
|
||||||
if ((forceDelete) ||
|
if ((forceDelete) ||
|
||||||
((wantsDelete) && (idx != 0) && (curWatchListViewItem != null) && (curWatchListViewItem.mChildAreaHeight == 0) && (!curWatchListViewItem.mIsSelected)))
|
((wantsDelete) && (idx != 0) && (curWatchListViewItem != null) && (curWatchListViewItem.mChildAreaHeight == 0) && (!curWatchListViewItem.mIsSelected)))
|
||||||
{
|
{
|
||||||
|
@ -1350,15 +1358,25 @@ namespace IDE.ui
|
||||||
curWatchListViewItem = null;
|
curWatchListViewItem = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((curWatchListViewItem == null) && (wantsFillIn))
|
if (((curWatchListViewItem == null) && (wantsFillIn)) ||
|
||||||
|
(forceFillIn))
|
||||||
{
|
{
|
||||||
prevWatchListViewItem.mBottomPadding = (curY - prevWatchListViewItem.mY) - prevWatchListViewItem.mSelfHeight - prevWatchListViewItem.mChildAreaHeight;
|
prevWatchListViewItem.mBottomPadding = (curY - prevWatchListViewItem.mY) - prevWatchListViewItem.mSelfHeight - prevWatchListViewItem.mChildAreaHeight;
|
||||||
|
if (curWatchListViewItem == null)
|
||||||
curWatchListViewItem = (WatchListViewItem)mParentItem.CreateChildItemAtIndex(curMemberIdx);
|
curWatchListViewItem = (WatchListViewItem)mParentItem.CreateChildItemAtIndex(curMemberIdx);
|
||||||
curWatchListViewItem.mVisible = false;
|
|
||||||
curWatchListViewItem.mX = mX;
|
curWatchListViewItem.mX = mX;
|
||||||
|
if (curWatchListViewItem.mWatchSeriesInfo == null)
|
||||||
|
{
|
||||||
|
curWatchListViewItem.mVisible = false;
|
||||||
mWatchSeriesInfo.AddRef();
|
mWatchSeriesInfo.AddRef();
|
||||||
curWatchListViewItem.mWatchSeriesInfo = mWatchSeriesInfo;
|
curWatchListViewItem.mWatchSeriesInfo = mWatchSeriesInfo;
|
||||||
curWatchListViewItem.mSeriesMemberIdx = idx;
|
curWatchListViewItem.mSeriesMemberIdx = idx;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Debug.Assert(curWatchListViewItem.mWatchSeriesInfo == mWatchSeriesInfo);
|
||||||
|
Debug.Assert(curWatchListViewItem.mSeriesMemberIdx == idx);
|
||||||
|
}
|
||||||
|
|
||||||
Object[] formatParams = scope Object[mWatchSeriesInfo.mAddrsEntrySize + 1];
|
Object[] formatParams = scope Object[mWatchSeriesInfo.mAddrsEntrySize + 1];
|
||||||
formatParams[0] = idx;
|
formatParams[0] = idx;
|
||||||
|
@ -1401,7 +1419,9 @@ namespace IDE.ui
|
||||||
evalStr.AppendF(mWatchSeriesInfo.mEvalTemplate, params formatParams);
|
evalStr.AppendF(mWatchSeriesInfo.mEvalTemplate, params formatParams);
|
||||||
|
|
||||||
watchListView.mWatchOwner.SetupListViewItem(curWatchListViewItem, dispStr, evalStr);
|
watchListView.mWatchOwner.SetupListViewItem(curWatchListViewItem, dispStr, evalStr);
|
||||||
curWatchListViewItem.mWatchEntry.mSeriesId = mWatchSeriesInfo.mSeriesId;
|
curWatchListViewItem.mWatchEntry.mSeriesFirstVersion = mWatchSeriesInfo.mSeriesFirstVersion;
|
||||||
|
curWatchListViewItem.mWatchEntry.mSeriesVersion = mWatchSeriesInfo.mSeriesVersion;
|
||||||
|
if (!forceFillIn)
|
||||||
curMemberIdx++;
|
curMemberIdx++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1757,15 +1777,16 @@ namespace IDE.ui
|
||||||
listViewItem.AllowDragging = true;
|
listViewItem.AllowDragging = true;
|
||||||
listViewItem.mOpenOnDoubleClick = false;
|
listViewItem.mOpenOnDoubleClick = false;
|
||||||
|
|
||||||
var subViewItem = (DarkListViewItem)listViewItem.CreateSubItem(1);
|
var subViewItem = (DarkListViewItem)listViewItem.GetOrCreateSubItem(1);
|
||||||
subViewItem.Label = "";
|
subViewItem.Label = "";
|
||||||
subViewItem.AllowDragging = true;
|
subViewItem.AllowDragging = true;
|
||||||
|
|
||||||
subViewItem = (DarkListViewItem)listViewItem.CreateSubItem(2);
|
subViewItem = (DarkListViewItem)listViewItem.GetOrCreateSubItem(2);
|
||||||
subViewItem.Label = "";
|
subViewItem.Label = "";
|
||||||
subViewItem.AllowDragging = true;
|
subViewItem.AllowDragging = true;
|
||||||
|
|
||||||
((WatchListViewItem)listViewItem).mWatchEntry = watchEntry;
|
delete listViewItem.mWatchEntry;
|
||||||
|
listViewItem.mWatchEntry = watchEntry;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void AddWatchItem(String name)
|
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
|
// 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
|
// 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))
|
if ((prevWatchSeriesInfo.mEvalTemplate == watchSeriesInfo.mEvalTemplate) && (prevWatchSeriesInfo.mDisplayTemplate == watchSeriesInfo.mDisplayTemplate))
|
||||||
watchSeriesInfo.mSeriesId = prevWatchSeriesInfo.mSeriesId;
|
watchSeriesInfo.mSeriesFirstVersion = prevWatchSeriesInfo.mSeriesFirstVersion;
|
||||||
|
|
||||||
memberItem.mWatchSeriesInfo.ReleaseRef();
|
memberItem.mWatchSeriesInfo.ReleaseRef();
|
||||||
}
|
}
|
||||||
|
|
|
@ -5307,6 +5307,8 @@ bool WinDebugger::ParseFormatInfo(DbgModule* dbgModule, const StringImpl& format
|
||||||
while (formatFlags.length() > 0)
|
while (formatFlags.length() > 0)
|
||||||
{
|
{
|
||||||
formatFlags = Trim(formatFlags);
|
formatFlags = Trim(formatFlags);
|
||||||
|
if (formatFlags.IsEmpty())
|
||||||
|
break;
|
||||||
if (formatFlags[0] != ',')
|
if (formatFlags[0] != ',')
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
|
@ -5731,6 +5733,7 @@ String WinDebugger::GetDictionaryItems(DbgCompileUnit* dbgCompileUnit, DebugVisu
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
int entrySize = entriesPtr.mType->mTypeParam->GetByteCount();
|
int entrySize = entriesPtr.mType->mTypeParam->GetByteCount();
|
||||||
|
int bucketIdxSize = bucketsPtr.mType->mTypeParam->GetByteCount();
|
||||||
|
|
||||||
String addrs;
|
String addrs;
|
||||||
|
|
||||||
|
@ -5758,7 +5761,10 @@ String WinDebugger::GetDictionaryItems(DbgCompileUnit* dbgCompileUnit, DebugVisu
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
if (bucketIdxSize == 4)
|
||||||
nodeIdx = ReadMemory<int>(bucketsPtr.mPtr + bucketIdx * sizeof(int32));
|
nodeIdx = ReadMemory<int>(bucketsPtr.mPtr + bucketIdx * sizeof(int32));
|
||||||
|
else
|
||||||
|
nodeIdx = (int)ReadMemory<int64>(bucketsPtr.mPtr + bucketIdx * sizeof(int64));
|
||||||
bucketIdx++;
|
bucketIdx++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue