BUG Community

Welcome! Log In

Forums BUG SDK VirtualBug thought

Subscribe to VirtualBug thought  13 posts, 4 voices

Log in to reply to this topic
Nov 8, 2007 11:53pm
Medium Bug Labs team finsprings 268 posts

It would be very useful if one could specify in the Run dialog which modules are plugged into the VirtualBUG. It gets really tedious having to select them every time you run it when developing an app. There’s already places to set the GPS and image data, so maybe extending that to have check boxes for the already-connected modules would do the trick.

Any thoughts?

Jan 31, 2008 10:40am
Img_missing_medium akravets 25 posts

Hi finsprings,

Issue has been added (http://bugcommunity.com/bugzilla/show_bug.cgi?id=87) for your proposal.
Jan 31, 2008 11:38am
Img_missing_medium MarcC 10 posts

I agree, it becomes a bit repetitive to wait for the bug to load and then have to click, choose your module, choose ok, especially when doing so numerous times an hour for multiple hour.

Feb 4, 2008 11:00am
Img_missing_medium akravets 25 posts

This feature has been implemented and is available in the latest integration build that can be downloaded here: http://buglabs.net/sdk

Feb 4, 2008 11:47am
Medium Bug Labs team finsprings 268 posts

That's great Alex!

So, I uninstalled Dragonfly and modified my repository setting to be .../integration/current and reinstalled Dragonfly (Update Installed only seems to search for Eclipse stuff).

However, I don't see any way to choose which modules are selected. The Run dialog just has the GPS and Images settings as it always has, and the selection dialog you get when adding a module looks the same too.

I looked at the bug report and you say
implemented module persistence using Configuration Admin
, but I don't know what the means.

So I'm probably just being dumb here, but where do I make my module selections sticky?
Feb 4, 2008 2:39pm
Img_missing_medium akravets 25 posts

Ah, sorry should have provided some how-to. So, this is how module persistence works:

In Virtual BUG Configuration under Concierge tab, in properties section there is a property com.buglabs.osgi.cm.storage. This property defines where different information about BUG is persisted and retrieved. So currently it is at $ECLIPSE_HOME/bug-configuration. This directory is needed because framework defines its own storage directory ($ECLIPSE_HOME/storage). However, by default this directory is wiped out on every restart (in our world it’s Virtual BUG) and in case where user wants clear state of the platform but not of the storage directory it would be a little bit confusing for the user. So, if you define com.buglabs.osgi.cm.storage property, that would be used for persistence, otherwise storage directory would be used. But I suggest for now define com.buglabs.osgi.cm.storage property.

When this property is set, every time you launch Virtual BUG and add modules, this information will be persisted in directory defined by com.buglabs.osgi.cm.storage.

So, if you launch Virtual BUG, add GPS and LCD module, restart Virtual BUG, GPS and LCD modules will automagically reappear.

Currently, there are no means of clearing custom storage directory, if you need to, you can go to $ECLIPSE_HOME/$com.buglabs.osgi.cm.storage and delete .bin files that represent persisted state. For modules this file is com.buglabs.bug.emulator.awt.bin.

If you have any questions or suggestions, please let us know.


Feb 4, 2008 2:40pm
Img_missing_medium akravets 25 posts

One more thing. On information about Configuration Admin please refer to this post: http://bugcommunity.com/forums/viewtopic.php?t=208

Feb 4, 2008 3:00pm
Medium Bug Labs team kschultz 107 posts

That's great Alex!
So I'm probably just being dumb here, but where do I make my module selections sticky?

I might be missing something here in Alex's technical discussion, but after I upgraded to the new SDK it just worked without any configuration/code changes. The BUG pops up initially with no modules, and then in my case I put in two, edited some code, and when I hit Run As->Virtual Bug it started up again with the two modules already plugged in. If you empty the modules by right clicking on the plugs and choosing "empty", it will start up again the way it used to. I too was expecting some kind of check box in the Run As dialog, but I think this is more intuitive, new users who didn't know about the limitation before would probably expect it to show them the moduels they had before without clicking and checkboxes, I'm pleased though, the time used to really add up before every time you ran a program. Thanks Alex.
Feb 4, 2008 3:21pm
Img_missing_medium akravets 25 posts

You are right Kevin, everything works "out of the box." I just wanted to clarify the use of com.buglabs.osgi.cm.storage because it mimics OSGi’s default storage directory but is not bound by how platform treats the storage directory.

In addition a user might want to change what this property defines to something like tmp/myStorage/configuration or whatever makes sense for him.

Feb 4, 2008 3:49pm
Medium Bug Labs team finsprings 268 posts

It wasn’t working for me until I defined com.buglabs.osgi.cm.storage, but now it is working great! Thanks for this Alex; it’s going to be a big time saver, as often as I have to restart the VirtualBug while trying to get my code to work :-)

Feb 4, 2008 3:57pm
Img_missing_medium akravets 25 posts

Excellent! Glad it worked out for you. But,

It wasn't working for me until I defined com.buglabs.osgi.cm.storage

You don't have the property set in Virtual BUG Launch Configuration? You would not have that property set if you were launching from custom Concierge Launch Configuration.
Feb 4, 2008 4:43pm
Medium Bug Labs team finsprings 268 posts

You don't have the property set in Virtual BUG Launch Configuration?

I opened the Run As dialog, selected Virtual Bug and all that first tab shows in the GPS and Image stuff. I clicked on the Concierge tab and it wasn't in the Property Name list, so I added it. Once I did that and ran I could see it create the .bin file in the directory I specified and it retained my module selections across launches.

Are you saying that it should already have been in that list?
Feb 4, 2008 5:12pm
Img_missing_medium akravets 25 posts

Ok, I know what happened here.

When you updated your current SDK the new code that defines storage property was installed. However, since you had old launch configuration it did not update that configuration. If you create new launch configuration off root Virtual BUG, com.buglabs.osgi.cm.storage property will be there.

I believe Eclipse platform follows the same convention where old launch configurations are not updated, you just have to create new ones.

Hope this helps

Log in to reply to this topic
Forums BUG SDK VirtualBug thought

Powered by Community Engine