mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-08 19:48:20 +02:00
Added extension methods to navigation bar
This commit is contained in:
parent
3560554127
commit
3c8bb9bed9
2 changed files with 7 additions and 2 deletions
|
@ -17,6 +17,7 @@ namespace IDE.ui
|
|||
{
|
||||
Unknown,
|
||||
Method,
|
||||
ExtMethod,
|
||||
Property,
|
||||
Class,
|
||||
Enum,
|
||||
|
@ -111,6 +112,7 @@ namespace IDE.ui
|
|||
switch(lineData)
|
||||
{
|
||||
case "method": entry.mEntryType = .Method;
|
||||
case "extmethod": entry.mEntryType = .ExtMethod;
|
||||
case "property": entry.mEntryType = .Property;
|
||||
case "class": entry.mEntryType = .Class;
|
||||
case "enum": entry.mEntryType = .Enum;
|
||||
|
@ -151,6 +153,7 @@ namespace IDE.ui
|
|||
switch (entry.mEntryType)
|
||||
{
|
||||
case .Method: menuItem.mIconImage = DarkTheme.sDarkTheme.GetImage(.Method);
|
||||
case .ExtMethod: menuItem.mIconImage = DarkTheme.sDarkTheme.GetImage(.ExtMethod);
|
||||
case .Property: menuItem.mIconImage = DarkTheme.sDarkTheme.GetImage(.Property);
|
||||
case .Class: menuItem.mIconImage = DarkTheme.sDarkTheme.GetImage(.Type_Class);
|
||||
case .Enum: menuItem.mIconImage = DarkTheme.sDarkTheme.GetImage(.Type_ValueType);
|
||||
|
|
|
@ -3841,7 +3841,7 @@ void BfCompiler::ProcessAutocompleteTempType()
|
|||
{
|
||||
if (((methodDef->mMethodType == BfMethodType_Normal) || (methodDef->mMethodType == BfMethodType_Operator) ||
|
||||
(methodDef->mMethodType == BfMethodType_Ctor) || (methodDef->mMethodType == BfMethodType_Dtor) ||
|
||||
(methodDef->mMethodType == BfMethodType_Mixin)) &&
|
||||
(methodDef->mMethodType == BfMethodType_Mixin) || (methodDef->mMethodType == BfMethodType_Extension)) &&
|
||||
(methodDef->mMethodDeclaration != NULL))
|
||||
{
|
||||
methodText = methodDef->ToString();
|
||||
|
@ -3859,7 +3859,9 @@ void BfCompiler::ProcessAutocompleteTempType()
|
|||
refNode = methodDeclaration->mNameNode;
|
||||
module->UpdateSrcPos(refNode, (BfSrcPosFlags)(BfSrcPosFlag_NoSetDebugLoc | BfSrcPosFlag_Force));
|
||||
|
||||
methodText += StrFormat("\tmethod\t%d\t%d", module->mCurFilePosition.mCurLine, module->mCurFilePosition.mCurColumn);
|
||||
const char* typeStr = (methodDef->mMethodType == BfMethodType_Extension) ? "extmethod" : "method";
|
||||
|
||||
methodText += StrFormat("\t%s\t%d\t%d", typeStr, module->mCurFilePosition.mCurLine, module->mCurFilePosition.mCurColumn);
|
||||
|
||||
autoCompleteResultString += methodText;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue