I am trying to register a toolWindow programmatically using the below code. However, when I use RegisterToolWindowTask programmatically, I get a warning saying that it is marked illegal. I just wanted to know whether the below way is correct way to do it or not. I also want to change contents of this toolWindow later from different classes.
toolWindowManager = ToolWindowManager.getInstance(project!!)
val task = RegisterToolWindowTask(taskName,
sideTool = true,
canCloseContent = true,
canWorkInDumbMode = true,
shouldBeAvailable = false)