NetBeans Forums

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

UpdateUnitProviderFactory: add after remove

 
Post new topic   Reply to topic    NetBeans Forums -> NetBeans Platform Users
View previous topic :: View next topic  
Author Message
pjdm



Joined: 05 Nov 2010
Posts: 33

PostPosted: Mon Apr 16, 2012 11:22 am    Post subject: UpdateUnitProviderFactory: add after remove Reply with quote

I'm adding an UpdateUnitProvider like this.

Code:

final UpdateUnitProviderFactory uupf = UpdateUnitProviderFactory.getDefault();
final String name = "p_name";
final URL url = new URL("http://10.1.2.3");
uupf.create(name, "Display Name", url);


This works, and Tools -> Plugins -> Settings shows the newly added update centre. However, if I remove the update centre using Tools -> Plugins -> Settings -> Remove, and try adding it again, the update centre does not show in Tools -> Plugins -> Settings, even though the create() apparently succeeded.

Adding the update centre creates the file config\Preferences\org\netbeans\modules\autoupdate\p_name.properties. Removing it deletes that file and creates p_name_removed.properties. As long as this file exists, the update centre won't show up in Tools -> Plugins -> Settings.

What do I have to do to correctly add an update centre after it has been removed (without having to get users to manually delete the "_removed" file)?

Thanks.

PJDM
Back to top
pjdm



Joined: 05 Nov 2010
Posts: 33

PostPosted: Mon Apr 16, 2012 11:59 am    Post subject: Reply with quote

Found it after perusing the source: do a setEnable(true) after create().

PJDM
Back to top
Jiri Rechtacek
Posted via mailing list.





PostPosted: Tue Apr 17, 2012 12:10 pm    Post subject: [platform-dev] Re: UpdateUnitProviderFactory: add after remove Reply with quote

On 04/16/2012 01:22 PM, pjdm wrote:
Quote:
I'm adding an UpdateUnitProvider like this.


Code:

final UpdateUnitProviderFactory uupf =
UpdateUnitProviderFactory.getDefault(); final String name =
"p_name"; final URL url = new URL("http://10.1.2.3");
uupf.create(name, "Display Name", url);




This works, and Tools -> Plugins -> Settings shows the newly added
update centre. However, if I remove the update centre using Tools ->
Plugins -> Settings -> Remove, and try adding it again, the update
centre does not show in Tools -> Plugins -> Settings, even though
the create() apparently succeeded.

Adding the update centre creates the file
config\Preferences\org\netbeans\modules\autoupdate\p_name.properties.
Removing it deletes that file and creates p_name_removed.properties.
As long as this file exists, the update centre won't show up in Tools
-> Plugins -> Settings.

What do I have to do to correctly add an update centre after it has
been removed (without having to get users to manually delete the
"_removed" file)?

Best if you file a issue and attach a patch for your problem.

Jirka

Quote:

Thanks.

PJDM



Back to top
pjdm



Joined: 05 Nov 2010
Posts: 33

PostPosted: Wed Apr 18, 2012 11:06 am    Post subject: Re: UpdateUnitProviderFactory: add after remove Reply with quote

Is this actually a bug, or is setEnable() just something you have to do?

PJDM
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