Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions Src/LexText/LexTextDll/AreaListener.cs
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ protected virtual void Dispose(bool disposing)
Subscriber.Unsubscribe(EventConstants.SetToolFromName, SetToolFromName);
Subscriber.Unsubscribe(EventConstants.ReloadAreaTools, ReloadAreaTools);
Subscriber.Unsubscribe(EventConstants.GetContentControlParameters, GetContentControlParameters);
Subscriber.Unsubscribe(EventConstants.GetToolForList, GetToolForList);
Subscriber.Unsubscribe(EventConstants.SetInitialContentObject, SetInitialContentObject);

// Dispose managed resources here.
Expand Down Expand Up @@ -157,6 +158,7 @@ public void Init(Mediator mediator, PropertyTable propertyTable, XmlNode configu
Subscriber.Subscribe(EventConstants.SetToolFromName, SetToolFromName);
Subscriber.Subscribe(EventConstants.ReloadAreaTools, ReloadAreaTools);
Subscriber.Subscribe(EventConstants.GetContentControlParameters, GetContentControlParameters);
Subscriber.Subscribe(EventConstants.GetToolForList, GetToolForList);
}

private DateTime m_lastToolChange = DateTime.MinValue;
Expand Down Expand Up @@ -379,12 +381,11 @@ private bool FillListAreaList(UIListDisplayProperties display)
}

/// <summary>
/// This method is called BY REFLECTION through the mediator from LinkListener.FollowActiveLink, because the assembly dependencies
/// This method is called through the FwUtils Publisher/Subscriber from LinkListener.FollowActiveLink, because the assembly dependencies
/// are in the wrong direction. It finds the name of the tool we need to invoke to edit a given list.
/// The result is returned via the second element of the object array payload.
/// </summary>
/// <param name="parameters"></param>
/// <returns></returns>
public bool OnGetToolForList(object parameters)
private void GetToolForList(object parameters)
{
var realParams = (object[]) parameters;
var list = (ICmPossibilityList)realParams[0];
Expand All @@ -409,12 +410,11 @@ public bool OnGetToolForList(object parameters)
if (possibleList == list)
{
realParams[1] = toolName;
return true;
return;
}
}
// If it's not a known list, try custom.
realParams[1] = GetCustomListToolName(list);
return true;
}

#region Custom List Methods
Expand Down
4 changes: 1 addition & 3 deletions Src/xWorks/LinkListener.cs
Original file line number Diff line number Diff line change
Expand Up @@ -512,9 +512,7 @@ private bool FollowActiveLink(bool suspendLoadingRecord)
// Thus we've created this method (on AreaListener) which we call awkwardly throught the mediator.
var parameters = new object[2];
parameters[0] = majorObject;
#pragma warning disable 618 // suppress obsolete warning
m_mediator.SendMessage("GetToolForList", parameters);
#pragma warning restore 618
Publisher.Publish(new PublisherParameterObject(EventConstants.GetToolForList, parameters));
realTool = (string)parameters[1];
break;
case RnResearchNbkTags.kClassId:
Expand Down
Loading