[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [e4-dev] Working with modeled UI and HEAD
|
Am 01.12.10 14:27, schrieb Paul Webster:
> On Tue, Nov 30, 2010 at 10:30 AM, Eric Moffatt <emoffatt@xxxxxxxxxx
> <mailto:emoffatt@xxxxxxxxxx>> wrote:
>
>
> I agree, the 'best practice' for addons should be that the same
> bundle that contains the code for the addon should also contain
> either a fragment or processor that 'installs' the addon into
> whatever base model it's applied to (I think it's Lars or Tom that
> came up with this one but I like it...;-).
> [... snip ...]
> Can we do it this way Paul ?
>
>
> Not without chicanery. Bundle fragments are processed in arbitrary
> order. The addons have to be added in a specific order.
>
As stated before this is NOT true. There is a rule in which the
ModelAssembler process them. if we have e.g. 3 bundles:
org.eclipse.e4.contexts
org.eclipse.e4.commands
org.eclipse.e4.bindings
Now if you put a commands dependency on bindings and a contexts
dependency on commands. The ModelAssembler guarantees that (see
ModelAssembler#topoSort):
a) context fragments are loaded
b) command fragments are loaded
c) binding fragments are loaded
Beside that if you use a ModelProcess you can rearrange the addons
whenever you want - as the current fragment system doesn't allow you to
contribute to any Application-Element you have to write a ModelProcessor.
Tom
--
B e s t S o l u t i o n . a t EDV Systemhaus GmbH
------------------------------------------------------------------------
tom schindl geschaeftsfuehrer/CEO
------------------------------------------------------------------------
eduard-bodem-gasse 5/1 A-6020 innsbruck phone ++43 512 935834