Migration to 0.9.0 documentation? [message #1613728] |
Thu, 12 February 2015 16:31  |
Eclipse User |
|
|
|
Hi guys,
at first: congratulations for the new release :) Good work!
At second: I just saw that my code regarding the generic API has compile
errors. Do you provide any documentation about migration issues?
Especially 2 things are needed for my case:
1) index filtering:
BaseIndexOptions options = new BaseIndexOptions();
options.setResourceFilterConfiguration(new IBaseIndexResourceFilter() {
@Override
public boolean isResourceFiltered(Resource resource) {
// PathMap URI scheme is used to refer to JDK classes
return "pathmap".equals(resource.getURI().scheme());
}
});
The method isResourceFiltered(..) doesn't exist anymore.
2) engine creation:
IncQueryEngine engine = IncQueryEngine.on(resourceSet);
the on(..) method is deprecated.
How can I proceed here?
cheers,
Jan
|
|
|
Re: Migration to 0.9.0 documentation? [message #1614558 is a reply to message #1613728] |
Fri, 13 February 2015 05:22   |
Eclipse User |
|
|
|
Hi,
thank you for pointing out these issues in our documentation. We believed, version 0.9 does not require special migration steps, and left out the migration guide deliberately, but I guess, we were wrong here.
1) The method was renamed to withResourceFiltered() that creates a copy of the configuration. This was done to avoid problematic cases when it called after an engine was initialized from the configuration, this configuration would be inconsistent with the correct settings.
On the other hand, this plain renaming was not a good idea. To help with the issue, I am putting back the old methods with a deprecation comment to use the old ones, and we will have a quick bugfix version where this change would be included.
2) This change was done to make IncQuery less EMF-dependent, and the concept of Scopes were introduced. EMF scopes created for the old versions can be created with new EMFScope(Notifier) call, and this can be added as a parameter. We have added a deprecation message to original on method to help migrating to the new version. Your code should be like
IncQueryEngine engine = IncQueryEngine.on(new EMFScope(resourceSet));
Did you have any other issues with the generic API that was not clear or needed documenting? We would be very grateful for finding these gaps in our documentation, and try to make it better.
Cheers,
Zoltán
|
|
|
|
|
|
Re: Migration to 0.9.0 documentation? [message #1642961 is a reply to message #1642889] |
Sun, 01 March 2015 04:48  |
Eclipse User |
|
|
|
Thanks!
Am 01.03.2015 um 09:59 schrieb Zoltan Ujhelyi:
> Hi Jan,
>
> the change here is that the withResourceFilterConfiguration() method
> creates a new instance of the BaseIndexOptions and returns it after the
> method is called. This allows setting multiple properties in a
> fluent-like API, but you have to use the last instance. This change was
> done to keep BaseIndexOptions immutable after created. In other words, I
> suggest using it as follows:
>
> BaseIndexOptions options = new
> BaseIndexOptions().withResourceFilterConfiguration(new
> IBaseIndexResourceFilter() {
> ..
> }
>
> Cheers,
> Zoltán
|
|
|
Powered by
FUDForum. Page generated in 0.03856 seconds