NetBeans Forums

 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
  

saveProject method in ProjectFactory

 
Post new topic   Reply to topic    NetBeans Forums -> NetBeans Platform Users
View previous topic :: View next topic  
Author Message
Klaus Martinschitz
Posted via mailing list.





PostPosted: Mon Jul 13, 2009 6:52 pm    Post subject: saveProject method in ProjectFactory Reply with quote

Hi!

How do you use the saveProject method in the project factory. Is there a way to register a SaveCookie somewhere so that the disc icon becomes enabled and if clicked the saveProject method is called?

Thanks,

Bye,
Klaus
Back to top
Geertjan Wielenga
Posted via mailing list.





PostPosted: Mon Jul 13, 2009 6:57 pm    Post subject: saveProject method in ProjectFactory Reply with quote

Klaus Martinschitz wrote:
Quote:

Hi!



How do you use the saveProject method in the project factory. Is there
a way to register a SaveCookie somewhere so that the disc icon becomes
enabled and if clicked the saveProject method is called?



Thanks,



Bye,

Klaus

http://platform.netbeans.org/tutorials/nbm-projecttype.html

If more is needed [or if anyone reading this has more to add] please say
so and I will add it to the tutorial.

Gj
Back to top
Klaus Martinschitz
Posted via mailing list.





PostPosted: Mon Jul 13, 2009 7:15 pm    Post subject: saveProject method in ProjectFactory Reply with quote

Hi!

Thanks for fast answer. I implementet the ProjectState in my lookup and
wrote a recursive method to find the Project from one of my nodes. Then
I used myProject.getLookup(ProjectState.class).markModified(). But the
disc is still disabled. I can not find a hint to solve this problem in
the tutorial you suggested. Nevertheless, thanks a lot...

Regards,
Klaus

Geertjan Wielenga schrieb:
Quote:
Klaus Martinschitz wrote:
Quote:

Hi!



How do you use the saveProject method in the project factory. Is
there a way to register a SaveCookie somewhere so that the disc icon
becomes enabled and if clicked the saveProject method is called?



Thanks,



Bye,

Klaus

http://platform.netbeans.org/tutorials/nbm-projecttype.html

If more is needed [or if anyone reading this has more to add] please
say so and I will add it to the tutorial.

Gj
Back to top
Geertjan Wielenga
Posted via mailing list.





PostPosted: Mon Jul 13, 2009 7:19 pm    Post subject: saveProject method in ProjectFactory Reply with quote

Klaus Martinschitz wrote:
Quote:
Hi!

Thanks for fast answer. I implementet the ProjectState in my lookup and
wrote a recursive method to find the Project from one of my nodes. Then
I used myProject.getLookup(ProjectState.class).markModified(). But the
disc is still disabled. I can not find a hint to solve this problem in
the tutorial you suggested. Nevertheless, thanks a lot...

Regards,
Klaus


But there's no such thing, as far as I know, of saving a project. You
can save files in a project. But not a whole project. Unless someone
else has implemented that for their projects?

Gj
Quote:
Geertjan Wielenga schrieb:

Quote:
Klaus Martinschitz wrote:

Quote:
Hi!



How do you use the saveProject method in the project factory. Is
there a way to register a SaveCookie somewhere so that the disc icon
becomes enabled and if clicked the saveProject method is called?



Thanks,



Bye,

Klaus


http://platform.netbeans.org/tutorials/nbm-projecttype.html

If more is needed [or if anyone reading this has more to add] please
say so and I will add it to the tutorial.

Gj



Back to top
Klaus Martinschitz
Posted via mailing list.





PostPosted: Mon Jul 13, 2009 7:36 pm    Post subject: saveProject method in ProjectFactory Reply with quote

Hi!

I think I have got it now! The project should ONLY be saved if the
Platform is closed. Then, the user should see a dialog which ask him if
the modified project should be saved. However, I call my markModified
method but if I close my application the end dialog which should ask me
for a final save does not appear. So I still miss something.
I debugged my app and set a breakpoint in the saveProject method but it
is never called...

Regards,
Klaus

Geertjan Wielenga schrieb:
Quote:
Klaus Martinschitz wrote:
Quote:
Hi!

Thanks for fast answer. I implementet the ProjectState in my lookup and
wrote a recursive method to find the Project from one of my nodes. Then
I used myProject.getLookup(ProjectState.class).markModified(). But the
disc is still disabled. I can not find a hint to solve this problem in
the tutorial you suggested. Nevertheless, thanks a lot...

Regards,
Klaus


But there's no such thing, as far as I know, of saving a project. You
can save files in a project. But not a whole project. Unless someone
else has implemented that for their projects?

Gj
Quote:
Geertjan Wielenga schrieb:

Quote:
Klaus Martinschitz wrote:

Quote:
Hi!



How do you use the saveProject method in the project factory. Is
there a way to register a SaveCookie somewhere so that the disc icon
becomes enabled and if clicked the saveProject method is called?



Thanks,



Bye,

Klaus


http://platform.netbeans.org/tutorials/nbm-projecttype.html

If more is needed [or if anyone reading this has more to add] please
say so and I will add it to the tutorial.

Gj




Back to top
Display posts from previous:   
Post new topic   Reply to topic    NetBeans Forums -> NetBeans Platform Users All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo