How to Get Project Parameter
Hi everyone,
In my plugin, I'm trying to make a tool window.
public void createToolWindowContent(Project project, ToolWindow toolWindow)
{
myToolWindow = toolWindow;
this.createTable(project);
ContentFactory contentFactory = ContentFactory.SERVICE.getInstance();
Content content = contentFactory.createContent(myToolWindowContent, "", false);
myToolWindow.getContentManager().addContent(content);
}
But I need to refresh my table in tool window. So, I need to call createTable method in different classes or methods. But I don't know how to get project parameter.
I tried this but it returns null:
public void createToolWindowContent(Project project, ToolWindow toolWindow)
{
myToolWindow = toolWindow;
myProject = project
this.createTable(MyProject);
ContentFactory contentFactory = ContentFactory.SERVICE.getInstance();
Content content = contentFactory.createContent(myToolWindowContent, "", false);
myToolWindow.getContentManager().addContent(content);
}
When I tried to use myProject as parameter, it returns null.
Please sign in to leave a comment.
Hi everyone, I need this project variable asap.ProjectManager.GetInstance().getDefaultProject or ProjectManager.GetInsance().getOpenProjects()[0] wont work. I need something more reliable. Please help.