You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Papyrus events and functions do not respect the member doc string on hovers.
For properties, the doc string is shown on hovering.
To Reproduce
Steps to reproduce the behavior:
These doc strings are displayed for hovers
GroupAssemblystringPropertyFileNameHidden {The data file plugin name.}stringFunctionGet()
returnGetFileName()
EndFunctionEndPropertystringPropertyFileExtensionHidden {The data file plugin name.}stringFunctionGet()
returnGetFileExtension()
EndFunctionEndPropertystringPropertyFileHidden {The data file plugin.}stringFunctionGet()
returnGetFile()
EndFunctionEndPropertyEndGroup
These doc strings are NOT displayed.
; @virtualstringFunctionGetFileName()
{The data file plugin name.}return"Fallout4"EndFunction; @virtualstringFunctionGetFileExtension()
{The data file plugin extension.}return"esm"EndFunction; @virtualstringFunctionGetFile()
{The data file plugin.}returnFileName+"."+FileExtensionEndFunction
The documentation string for members is the ideal value for reading comments.
A strong argument for this is that Papyrus comments are tossed out on compilation while a doc string is preserved in the assembly.
If only the standard comments are supported for Intellisense then this may encourage people to stop using the doc string resulting in more undocumented papyrus scripts, in cases where source is not available.
An example of function member doc strings preserved in Papyrus assembly.
.info.source"E:\\Games\\Steam\\steamapps\\common\\Fallout 4\\Data\\Scripts\\Source\\System\\System\\Collections\\List.psc".modifyTime1563066640.compileTime1563329531.user"Scrivener07".computer"KS07".endInfo.userFlagsRef.flagmandatory5.flagconditional1.flagdefault2.flagcollapsedonbase4.flaghidden0.flagcollapsedonref3.endUserFlagsRef.objectTable.objectSystem:Collections:ListSystem:Collections:Collection.userFlags4.docString"Represents a list of objects that can be accessed by index.\nhttps://msdn.microsoft.com/en-us/library/6sh2ey19(v=vs.110).aspx".autoState.structTable.endStructTable.variableTable.variableItemsvar[]
.userFlags0.initialValueNone.endVariable.endVariableTable.propertyTable.property Count int
.userFlags1.docString"".function Get.userFlags0.docString"Gets the number of elements contained in the collection.".return int
.paramTable.endParamTable.localTable.local ::temp9 int
.endLocalTable.codeARRAYLENGTH ::temp9Items;@line 90RETURN ::temp9;@line 90.endCode.endFunction
.endProperty
.endPropertyTable.propertyGroupTable.propertyGroupCollection.userFlags0.docString"".property Count.endPropertyGroup.endPropertyGroupTable.stateTable.state
.function Typestatic.userFlags0.docString"".return system:collections:list.paramTable.endParamTable.localTable.local ::temp0system:activator.local ::temp1var.local ::temp2system:collections:list.endLocalTable.codeCALLSTATICsystem:activator This ::temp0 ;@line 15CALLMETHODType ::temp0 ::temp1 2106 ;@line 15CAST ::temp2 ::temp1;@line 15RETURN ::temp2;@line 15.endCode.endFunction
.function OnInit.userFlags0.docString"".return NONE.paramTable.endParamTable.localTable.local ::temp3var[]
.endLocalTable.codeARRAYCREATE ::temp30;@line 23ASSIGNItems ::temp3 ;@line 23.endCode.endFunction
.function IndexOf.userFlags0.docString"Determines the index of a specific item in the IList.".return int
.paramTable.paramvaluevar.endParamTable.localTable.local ::temp4 int
.endLocalTable.codeJUMPFvalue label1 ;@line 32ARRAYFINDELEMENTItems ::temp4 value 0 ;@line 33RETURN ::temp4;@line 33JUMPlabel0label1:
PROPGETInvalid self ::temp4 ;@line 35RETURN ::temp4;@line 35label0:
.endCode.endFunction
.function Contains.userFlags0.docString"Determines whether an element is in the IList.".return bool
.paramTable.paramvaluevar.endParamTable.localTable.local ::temp5 int
.local ::temp6 int
.local ::temp7 bool
.endLocalTable.codeCALLMETHODIndexOf self ::temp5 value ;@line 42PROPGETInvalid self ::temp6 ;@line 42COMPAREGT ::temp7 ::temp5 ::temp6;@line 42RETURN ::temp7;@line 42.endCode.endFunction
.function Add.userFlags0.docString"Calling this method always throws a NotSupportedException exception.".return NONE.paramTable.paramvaluevar.endParamTable.localTable.local ::nonevarnone.endLocalTable.codeARRAYADDELEMENTSItems value 1 ;@line 48.endCode.endFunction
.function Insert.userFlags0.docString"Inserts an item to the IList at the specified index.".return NONE.paramTable.paramindex int
.paramvaluevar.endParamTable.localTable.local ::nonevarnone.endLocalTable.codeARRAYINSERTELEMENTItems value index ;@line 54.endCode.endFunction
.function Remove.userFlags0.docString"Removes the first occurrence of a specific value from the IList.".return NONE.paramTable.paramvaluevar.endParamTable.localTable.local ::temp8 int
.local ::nonevarnone.localindex int
.endLocalTable.codeCALLMETHODIndexOf self ::temp8 value ;@line 60ASSIGNindex ::temp8 ;@line 60ARRAYREMOVEELEMENTSItems index 1 ;@line 61.endCode.endFunction
.function RemoveAt.userFlags0.docString"Removes the IList item at the specified index.".return NONE.paramTable.paramindex int
.endParamTable.localTable.local ::nonevarnone.endLocalTable.codeARRAYREMOVEELEMENTSItems index 1 ;@line 67.endCode.endFunction
.function Clear.userFlags0.docString"Removes all items from the IList.".return NONE.paramTable.endParamTable.localTable.local ::nonevarnone.endLocalTable.codeARRAYCLEARELEMENTSItems;@line 73.endCode.endFunction
.endState
.endStateTable.endObject.endObjectTable
The text was updated successfully, but these errors were encountered:
{The data file plugin name.} above a statement like a return isn't viable, but I think it's reasonable to include both doc comments and (contiguous) ; comments on any symbol declaration for language service features. (Useful in code, bad in CK, for example.)
Describe the bug
Papyrus events and functions do not respect the member doc string on hovers.
For properties, the doc string is shown on hovering.
To Reproduce
Steps to reproduce the behavior:
These doc strings are displayed for hovers
These doc strings are NOT displayed.
The documentation string for members is the ideal value for reading comments.
A strong argument for this is that Papyrus comments are tossed out on compilation while a doc string is preserved in the assembly.
If only the standard comments are supported for Intellisense then this may encourage people to stop using the doc string resulting in more undocumented papyrus scripts, in cases where source is not available.
An example of function member doc strings preserved in Papyrus assembly.
The text was updated successfully, but these errors were encountered: