Anyone know how to use the JDOMExternalizable interface?

I can't figure out what I'm supposed to be reading/writing.

I have this basic code

public void writeExternal(org.jdom.Element p_element) throws
WriteExternalException
{
DefaultJDOMExternalizer.writeExternal(this, p_element);
}


What kind of object is the Externalizer expecting? What is it writing? How
does it get the data from the object I give it to write? Is there any
documentation on this stuff besides the generic javadocs help that just has
method calls but no explanations?

Thanks,

harpstein


3 comments

Harpstein wrote:

I can't figure out what I'm supposed to be reading/writing.

I have this basic code

public void writeExternal(org.jdom.Element p_element) throws
WriteExternalException
{
DefaultJDOMExternalizer.writeExternal(this, p_element);
}


What kind of object is the Externalizer expecting? What is it writing? How
does it get the data from the object I give it to write? Is there any
documentation on this stuff besides the generic javadocs help that just has
method calls but no explanations?

check the faq and search for jdom ...
http://www.intellij.org/twiki/bin/view/Main/PluginDocumentation

you are adressing 2 things with your mail
- how to use JDomExternalizable
simple jdom api... do what you want :))

- and the convinient method in DefaultJDOMEx...
witch exports all public fields of the first argument

a good test is to include some debug output in your writeExternal method
and the check of the project-files of the project (your entires (if they
are saved) are children of you plugin id).

i find it a bit tricky how the externalizablemethods are called at
startup .. you should debug this too :))
i havent made or found an exact description of the startupbehaviour

cK

0

thanks for the link to the community. That looks like it'll help quite a
bit.

One more question though... How do I log debug stuff? I've tried
System.out.println() but nothing shows up in the .log file and IDEA support
said they don't have a debug mode so there is no console output to view.

-harpstein


"Christian Köstlin" <gizmo@flopcode.com> wrote in message
news:bmme27$kc1$1@is.intellij.net...

Harpstein wrote:

I can't figure out what I'm supposed to be reading/writing.

>

I have this basic code

>

public void writeExternal(org.jdom.Element p_element) throws
WriteExternalException
{
DefaultJDOMExternalizer.writeExternal(this, p_element);
}

>
>

What kind of object is the Externalizer expecting? What is it writing?

How

does it get the data from the object I give it to write? Is there any
documentation on this stuff besides the generic javadocs help that just

has

method calls but no explanations?

check the faq and search for jdom ...
http://www.intellij.org/twiki/bin/view/Main/PluginDocumentation

>

you are adressing 2 things with your mail
- how to use JDomExternalizable
simple jdom api... do what you want :))

>

- and the convinient method in DefaultJDOMEx...
witch exports all public fields of the first argument

>

a good test is to include some debug output in your writeExternal method
and the check of the project-files of the project (your entires (if they
are saved) are children of you plugin id).

>

i find it a bit tricky how the externalizablemethods are called at
startup .. you should debug this too :))
i havent made or found an exact description of the startupbehaviour

>

cK

>


0

There's a Logger class. Not sure what IDEA version it appeared in, but I
think you should have it? I assume you're coding to the release version.

Harpstein wrote:

thanks for the link to the community. That looks like it'll help quite a
bit.

One more question though... How do I log debug stuff? I've tried
System.out.println() but nothing shows up in the .log file and IDEA support
said they don't have a debug mode so there is no console output to view.

-harpstein


"Christian Köstlin" <gizmo@flopcode.com> wrote in message
news:bmme27$kc1$1@is.intellij.net...

>>Harpstein wrote:
>>
>>>I can't figure out what I'm supposed to be reading/writing.
>>>
>>>I have this basic code
>>>
>>> public void writeExternal(org.jdom.Element p_element) throws
>>>WriteExternalException
>>> {
>>> DefaultJDOMExternalizer.writeExternal(this, p_element);
>>> }
>>>
>>>
>>>What kind of object is the Externalizer expecting? What is it writing?


How

>>>does it get the data from the object I give it to write? Is there any
>>>documentation on this stuff besides the generic javadocs help that just


has

>>>method calls but no explanations?
>>
>>check the faq and search for jdom ...
>>http://www.intellij.org/twiki/bin/view/Main/PluginDocumentation
>>
>>you are adressing 2 things with your mail
>>- how to use JDomExternalizable
>> simple jdom api... do what you want :))
>>
>>- and the convinient method in DefaultJDOMEx...
>> witch exports all public fields of the first argument
>>
>>a good test is to include some debug output in your writeExternal method
>>and the check of the project-files of the project (your entires (if they
>>are saved) are children of you plugin id).
>>
>>i find it a bit tricky how the externalizablemethods are called at
>>startup .. you should debug this too :))
>>i havent made or found an exact description of the startupbehaviour
>>
>>cK
>>



--

Erb

==============================================================
"Most of you are familiar with the virtues of a programmer.
There are three, of course: laziness, impatience, and hubris."
- Larry Wall
==============================================================

0

Please sign in to leave a comment.