Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » Natures supposed to be stateless?
Natures supposed to be stateless? [message #203754] Sun, 29 February 2004 17:15 Go to next message
Eclipse UserFriend
Originally posted by: Lamont_Gilbert.rigidsoftware.com

When I make a nature and add it to the project, i dont get the same
nature back. Digging through the code I see that natures are cloned
upon adding. This means that natures must not supposed to maintain any
state!?!

I didn't know that nor read it anywhere.

Would someone verify that a Nature should not maintain any project state
information since the project is not guaranteed to return the same
instance at every request for the nature?




--
Respectfully,


CL Gilbert

"Verily, verily, I say unto you, He that entereth not by the door() into
the sheepfold{}, but climbeth up some other *way, the same is a thief
and a robber." John 10:1

GnuPG Key Fingerprint:
82A6 8893 C2A1 F64E A9AD 19AE 55B2 4CD7 80D2 0A2D

For a free Java interface to Freechess.org see
http://www.rigidsoftware.com/Chess/chess.html
Re: Natures supposed to be stateless? [message #203880 is a reply to message #203754] Mon, 01 March 2004 02:29 Go to previous messageGo to next message
Eclipse UserFriend
> When I make a nature and add it to the project, i dont get the same
> nature back. Digging through the code I see that natures are cloned
> upon adding. This means that natures must not supposed to maintain any
> state!?!
>
> I didn't know that nor read it anywhere.
>
> Would someone verify that a Nature should not maintain any project state
> information since the project is not guaranteed to return the same
> instance at every request for the nature?

As far as I know its simply an id added to a project. But you may set
persistent properties to any project.


Bye,

Martin (Kersten)
Re: Natures supposed to be stateless? [message #204418 is a reply to message #203880] Mon, 01 March 2004 20:12 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: smesh.openrules.com

In 2.X IProjectNature is:

public interface IProjectNature {
public void configure() throws CoreException;
public void deconfigure() throws CoreException;
public IProject getProject();
public void setProject(IProject project);
}

You can use setProject()...

Sam Mesh - http://openrules.com
Life is very short, and there's no time,
For coding and testing, my friend.


>>When I make a nature and add it to the project, i dont get the same
>>nature back. Digging through the code I see that natures are cloned
>>upon adding. This means that natures must not supposed to maintain any
>>state!?!
Re: Natures supposed to be stateless? [message #204562 is a reply to message #204418] Tue, 02 March 2004 09:53 Go to previous message
Eclipse UserFriend
Originally posted by: richkulp.NO.SPAM.us.ibm.com

Natures by themselves are stateless. If a nature needs state, it needs
to reconstruct the state when it receives the setProject call. Eclipse
calls setProject after it creates the nature. No one else should call
setProject().

--
Thanks, Rich Kulp

Previous Topic:Plugin export problem when MANIFEST in it
Next Topic:java.lang.OutOfMemoryError
Goto Forum:
  


Current Time: Fri Apr 25 01:22:12 EDT 2025

Powered by FUDForum. Page generated in 0.03056 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top