[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
I think you will have to explain it a little bit :-)
I should probably add that there are actually two related decisions
in the newly proposed design:
1. Source elements now don't have a getSourceFile() method or the like
to get at their corresponding "module". Such method, if necessary or desired,
can be provided by model implementor, probably in model-specific terms.
In Handly itself, there are currently a couple of places (only)
where a similar functionality is required:
* SourceConstruct#getOpenableParent() -- default implementation now returns
the first ancestor that is not ISourceConstruct (previously it returned
the source file). Strictly speaking, there is no guarantee that the returned
element is necessarily a "module" (whatever it might be), but then it is not
required by the contract of the method (it needs the first "openable" ancestor,
not the "module" per se). Besides, this default implementation can always be
overriden by model implementor if necessary. So not a big deal probably.
* SourceElementUtil#getElementAt(ISourceElement element, int position)
previously received a source file as the first argument and reconciled it
before requesting the source element at the given position. Now it checks
whether the given element is a source file or has a source file as its
ancestor, and if so, it will reconcile the source file.
2. There is no "root interface" for "modules" (such as the previously proposed
IModule). We have no sufficient evidence yet whether such a common interface
would necessarily be required. We can always introduce it when/if the need
clearly arises, hopefully even without breaking backwards compatibility.
Best regards,
Vladimir
Hi Vladimir,
I think you will have to explain it a little bit :-)
If I understand correctly, the "binary file" classes are supposed to inherit directly from ISourceElement, right? The price is that there is no place where to put common functionality that would apply to any "source container", but we really don't know if there is going to be some significant such functionality and it's better to keep it simple to start with. There's always a version 2.0 to do such things in :-)
I think it looks good, but it's a bit difficult to be 100% sure until I try to implement it.
regards,
Vlad