EAP 992 - Project.putUserData() no longer around...

I just noticed the Project.putUserData() method is no longer available in
the new EAP.

I just used this in my plugin :( Doesn't anyone deprecate things in
IntelliJ?

Mark


--
Discouragement is a dissatisfaction with the past, a distaste for the
present, and a distrust of the future - Maree De Jong, CLCA.

10 comments
Comment actions Permalink


Mark Derricutt wrote:

I just noticed the Project.putUserData() method is no longer available in
the new EAP.


Bah. Looks like you've been hit even harder than I am. I used Editor.put|getUserData(String)
but now UserDataHolder.put|getUserData() takes a com.intellij.util.Key object as
argument. Looks like it should be no prob to convert, but annoying (especially for all the
plugin users out there) anyway.

I just used this in my plugin :( Doesn't anyone deprecate things in
IntelliJ?


JDOMExternalizableList is now gone completely. I wonder what the motivation for this move
was. At least an intermediate step with deprecating these methods/classes would have been
required IMHO. Even if it's EAP and things may change, I don't see any technical reason why
deprecating this stuff was not possible, which would have saved a lot of plugin developers and
users a lot of trouble. I'm sorry to say that, but this not the way to make people happy...

Sascha


0
Comment actions Permalink

Yes, we've changed UserDataHolder to accept Key class as key only. Sorry for
unconvenience.

--
Valentin Kipiatkov
JetBrains, Inc
http://www.intellij.com
"Develop with pleasure!"

"Sascha Weinreuter" <sascha.weinreuter@NOSPAM-cit.de> wrote in message
news:br4anm$uij$1@is.intellij.net...
>

Mark Derricutt wrote:

I just noticed the Project.putUserData() method is no longer available

in

the new EAP.

>

Bah. Looks like you've been hit even harder than I am. I used

Editor.put|getUserData(String)

but now UserDataHolder.put|getUserData() takes a com.intellij.util.Key

object as

argument. Looks like it should be no prob to convert, but annoying

(especially for all the

plugin users out there) anyway.

>

I just used this in my plugin :( Doesn't anyone deprecate things in
IntelliJ?

>

JDOMExternalizableList is now gone completely. I wonder what the

motivation for this move

was. At least an intermediate step with deprecating these methods/classes

would have been

required IMHO. Even if it's EAP and things may change, I don't see any

technical reason why

deprecating this stuff was not possible, which would have saved a lot of

plugin developers and

users a lot of trouble. I'm sorry to say that, but this not the way to

make people happy...
>

Sascha

>
>


0
Comment actions Permalink


Valentin Kipiatkov (JetBrains) wrote:

Yes, we've changed UserDataHolder to accept Key class as key only. Sorry for
unconvenience.


What about the missing JDOMExternalizeableList? I hope you don't mind that I use the
source code from an older openapi_stub.jar as a workaround...

Sascha


0
Comment actions Permalink

On Tue, 09 Dec 2003 12:12:52 +0100, Sascha Weinreuter wrote:

Bah. Looks like you've been hit even harder than I am. I used
Editor.put|getUserData(String) but now UserDataHolder.put|getUserData()
takes a com.intellij.util.Key object as argument. Looks like it should be
no prob to convert, but annoying (especially for all the plugin users
out there) anyway.


Ahh - UserDataHolder. I'll go look at it.

Actually, maybe there's a better way for what I want. My plugin has two
components, the main plugin, and the configurable, I was storing a
reference to my configurable model object in the Project/userData so it
could be shared. Maybe theres a more proper way for this>?



0
Comment actions Permalink

On Tue, 09 Dec 2003 19:13:14 +0300, Valentin Kipiatkov (JetBrains) wrote:

Yes, we've changed UserDataHolder to accept Key class as key only. Sorry
for unconvenience.


How does one use this Key class? Looking at it uses Generics......


--
Discouragement is a dissatisfaction with the past, a distaste for the
present, and a distrust of the future - Maree De Jong, CLCA.

0
Comment actions Permalink

On Tue, 09 Dec 2003 19:13:14 +0300, Valentin Kipiatkov (JetBrains) wrote:

Yes, we've changed UserDataHolder to accept Key class as key only. Sorry
for unconvenience.


Also, which .jar is the Key class found in?

--
Discouragement is a dissatisfaction with the past, a distaste for the
present, and a distrust of the future - Maree De Jong, CLCA.

0
Comment actions Permalink

It has been renamed to JDOMExternalizeableStringList. This class extends ArrayList]]> which is VERY unfortunate as I am sure you know already from my previous posts since IDEA won't understand the template base class unless you are running in generic mode.
All your files that are using the inherited entry points from ArrayList will show up with errors.

Other than that you can as you mentioned copy the old implementation (which I did ;) and hopefully IntelliJ guys won't mind.

Jacques

0
Comment actions Permalink

On Tue, 09 Dec 2003 19:13:14 +0300, Valentin Kipiatkov (JetBrains) wrote:

Yes, we've changed UserDataHolder to accept Key class as key only. Sorry
for unconvenience.


So how do we use this Valentin? I can't even -FIND- the Key class ( not
in idea.jar or openapi.jar ). Let alone conceive how to use the generic'd
type.

And unlike Alain and co, I don't -really- want to hack in the old OpenAPI
if I can...

0
Comment actions Permalink

My plugin has two
components, the main plugin, and the configurable, I
was storing a
reference to my configurable model object in the
Project/userData so it
could be shared. Maybe theres a more proper way for
this>?


Sounds like you should make your Configuration a ProjectComponent itself and obtain it by calling project.getComponent(YourConfiguration.class)

Is this what you need?


Sascha

0
Comment actions Permalink

On Fri, 12 Dec 2003 11:13:55 +0000, Sascha Weinreuter wrote:

and obtain it by calling project.getComponent(YourConfiguration.class)


Aha! That works ;-)(

Mark

0

Please sign in to leave a comment.