How to create/obtain a property from Tool Window

Unofficial Content

To add a node in the ToolWindow Preferences section; add a class inheriting from AbstractPackageUI and overide the GetPreferencesNodes() method; for example:

public override IEnumerable<IModelTreeNode> GetPreferencesNodes()
{
	yield return new MyPreferencesNode();
}

Then, you need to implement the IModelTreeNode interface to create your own node preferences; to make it easier you can inherit directly from AbstractNode or VirtualNode: for example:

public class MyPreferencesNode: VirtualNode
{
	public MyPreferencesNode()
	: base("Icon text", Resources.SelectedIcon, Resources.UnselectedIcon, false)) // Last parameter (false) details if it is a subnode container
	{
	}
	public override void DoDefaultAction()
	{
		// Show your own Tool Window using the UIService
                try
                {
                    UIServices.ToolWindows.FocusToolWindow(new Guid("your Tool Window GUID"));
                }
                catch (Exception e)
                {
                    // TODO
                }
	}
}