Updating 7.0 plugin to 8.0
I am working to update our plugin to run on IDEA 8.0 and am not sure about some changes.
I have quite a lot of references in the code to com.intellij.openapi.Disposable which is now showing as red. Is this because 8.0 still needs an external plugin dev kit of some sort or do I need to change to something else?
Regards,
MArkee
请先登录再写评论。
Hello mark,
You need to add util.jar to the classpath of your IDEA SDK.
--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"
Dmitry,
Thanks. That seems to fix almost everything.
Can you recommend any documentation on replacing readExternal/writeExternal which no longer work. I am using them just to store a couple of strings for configuration settings so I can remember users preferred settings.
Regards,
MArkee
Hello mark,
See another recent thread on this topic: http://www.jetbrains.net/devnet/message/5231641#5231641
--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"
Thanks for the link.
MArkee
I've got this all working except my loadState method never seems to be called so values are not ever loaded.
My class is
public class PDFFileTypeManagerImpl extends PDFFileTypeManager implements //ApplicationComponent, //JDOMExternalizable{
PersistentStateComponent<PDFFileTypeManagerImpl> {
and it is defined in plugin.xml as
<application-components>
<!--registers the filetype and sets it up-->
<component>
<implementation-class>org.jpedal.pdf.plugins.idea.fileTypes.impl.PDFFileTypeManagerImpl</implementation-class>
<interface-class>org.jpedal.pdf.plugins.idea.fileTypes.PDFFileTypeManager</interface-class>
</component>
Does it need to be defined elsewhere now or in a different way?
Regards,
MArk
Hello mark,
Did you specify the @State annotation on the class specifying where the settings
should be saved?
Also note that loadState() will only be called if the user has changed some
settings from their default values. The default state should be initialized
in the class constructor.
--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"