Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [ice-dev] Next Assignment

Menghan,

I implemented one of these, so you can coordinate with Nick and JiSoo to start doing this for their pieces. Here's the commit that will show you everything I changed.

https://github.com/eclipse/ice/commit/36e781ce42cc9dc2c7cb982554c3128287a17e93

If you start at the bottom of that page, you will see that I moved the XMLPersistenceExtensionFactory.getItemBuilders() operation to ItemBuilder. If you look at ItemBuilder.getItemBuilders() you will see that the only difference from the original is that I added a line to create a logger. For every interface where you do this, you need to also create a test for it. See ItemBuilderTester, which I also just committed, for an example. (Your tests should look nearly identical.)

Aside from that, the only things to watch out for are Java Versions and whether or not you should return an array or a single instance. In the first case, if your code will not compile and says the new static interface method isn't found, then you need to update the Execution Environment in your Manifest file and the Java Build Path (right click and select Properties) to both say Java 1.8. In the latter, that depends on whether you are pulling a single service or multiple instances of the same service.

You can get started on this in Core.java. Lines 263 to 279 can be replaced with four lines:

ItemBuilder [] builders = ItemBuilder.getBuilders();
for (ItemBuilder builder : builders) {
    register(builder);
}

After that, you can use the code above it at lines 244-257 to create a new IPersistenceProvider.getProvider() operation, similar to ItemBuilder.getItemBuilders(), that returns the IPersistenceProvider.

And definitely fire back to the list if you have questions. We can all help you and this is new to us too.

Jay


On Thu, Oct 8, 2015 at 2:15 PM, Jay Jay Billings <jayjaybillings@xxxxxxxxx> wrote:
Menghan,

Sounds good. I'll try to put together an example for you tonight.

Jay

On Thu, Oct 8, 2015 at 2:14 PM, Menghan Li <menghanli723@xxxxxxxxx> wrote:
Hi Jay,

I can move the code onto the interfaces as static interface methods. That way I won't  interrupt Nick's, Fangzhou's and Jisoo's original plans. 

Once I finish this, I'll work on refactoring the FormEditor. 

How's this sound?

Best,
Menghan

On Thu, Oct 8, 2015 at 1:48 PM, Jay Jay Billings <jayjaybillings@xxxxxxxxx> wrote:
Menghan,

I just took a look at your last pull request. Neither of those interfaces are actually in regular use and they will probably be marked as deprecated in a future release. Someone could still use them now though, so it is good that we have extension points for them.

So, instead, you could move on to create more extension points in the viz bundles or ui, depending on where Fangzhou and JiSoo are respectively. Alternatively, you could coordinate with Nick to work on code in the Core.

If Nick is working on writing code for the IJAXBClassProvider and the ICompositeItemBuilder, you could help by either writing the code for one of those directly or by moving code onto the interfaces as static interface methods. I can put together an example of the latter if you want to work on that.

If neither of those appeal to you, then let me know. You could probably get started on refactoring the FormEditor to take extension points too, which I could also show you.

Jay

--
Jay Jay Billings
Oak Ridge National Laboratory
Twitter Handle: @jayjaybillings




--
Jay Jay Billings
Oak Ridge National Laboratory
Twitter Handle: @jayjaybillings



--
Jay Jay Billings
Oak Ridge National Laboratory
Twitter Handle: @jayjaybillings

Back to the top