Deprecated methods in openapi.jar Follow
Hello,
I've got a problem when replacing method ToolWindowManager.registerToolWindow(@NotNull String id,@NotNull JComponent component,@NotNull ToolWindowAnchor anchor); (which is deprecated) with ToolWindowManager.registerToolWindow(@NotNull String id, boolean canCloseContent, @NotNull ToolWindowAnchor anchor);
After I've made such change in my project, my window is not registered, it doesn't work.
Has anyone had the same problem?
ToolWindowManager lays in openapi.jar in package com.intellij.opeanapi.wm
Thanks
Please sign in to leave a comment.
Hello ALincoln,
After you've made this change, you also need to call ToolWindow.getContentManager().addContent()
to add your component to the toolwindow.
--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"
I'm sorry, maybe I don't understand smething but if I have:
ToolWindow window = manager.registerToolWindow(viewID, true, ToolWindowAnchor.BOTTOM);
ContentManager cm = window.getContentManager();
cm.addContent() - here I can't add a JComponent, because I need to add a JComponent toolWindow here.. addContent doesn't work with JComponent
Should I do:
ContentManager cm = window.getContentManager();
cm.getComponent().add(toolWindow);
Edited by: ALincoln on May 15, 2008 4:00 PM
Hello ALincoln,
Use PeerFactory.getContentFactory().createContent() to create a Content instance
for your component.
--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"
Should I use
instead deprecated
?
Hello Alex,
Yes, in IDEA 8 this is the correct API to use. ContentFactory.SERVICE is
not available in IDEA 7.
--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"