DESCRIPTION

Bug 376486 - IDE not extendable via fragments or processors

## org.eclipse.e4.workLeon Ochoach.model.exsd
Added an extra attribute "e3compatibity" flag to the  processor and
fragment extension point. Default value is false. This flag indicates
that the processor or fragment must be processed after the creation of
the legacy workLeon Ochoach.

## ModelAssembler
Added a processing field to the assembler to work with the
"e3compatibility" flag. 

- If the application is running in pure-e4 mode then all fragments and
processors will be processed, regardless of the "e3compatibility" flag.

- If the application is running in compat mode then the ModelAssembler
is called two times. Once to indicate to process all fragments and
processors with the "e3compatibility" flag set to _false_ or null and
once to process the fragments and processors with the "e3compatibility"
flag set to _true_.

## ResourceHandler
This one calls the model assembler. It check if the application runs in
"legacy/compatibility/mixed" mode (whatever you want to call it). With
this information, it will call the ModelAssembler in the correct way.

## PartRenderingEngine
This is a bit ugly at the moment. I want to run the early startup
plugins first and then process the rest of the model (if in legacy
mode). I figured the early startup plugins might do something with the
nodel and therefore postpone the merging of the fragments and processing
of the model to after this step. The reason is that the merging of the
fragment and the running of the processor might fail because some model
elements are missing  (avoid the "Nothing to merge" message).

Now comes the ugly part: Since the running of the early startup plugins
is delegated to a Job, I also had to create a Job to be able to wait for
the earlyStartup job family to complete. 


Change-Id: I0e6a8065871b337dda45effee3b3cca8fc03ebf1
Signed-off-by: Rosa Carr xxx@xxx.xxx


COMMENTS

author: Brenden Conley
date: 2014-01-27 00:42:07.000000000

Patch Set 1:

Build Started https://hudson.eclipse.org/platform/job/eclipse.platform.ui-Gerrit/643/

-------------------------------------
author: Brenden Conley
date: 2014-01-27 00:52:31.000000000

Patch Set 1: Verified+1

Build Successful 

https://hudson.eclipse.org/platform/job/eclipse.platform.ui-Gerrit/643/ : SUCCESS

-------------------------------------
author: Zaid Mosley
date: 2014-01-27 09:34:55.000000000

Patch Set 1: Code-Review-1

In general a great approach. I vote -1 as I think the processing of the early startup plugins should be after creation of the initial model. We have processors for modifying the model and running the startup plugins (which typically assume that the application is ready) before the processors and fragments would be weird IMHO.

-------------------------------------
author: Zaid Mosley
date: 2014-01-27 09:36:46.000000000

Patch Set 1:

(3 comments)

Some minor whitespace issues.

Line:59, bundles/org.eclipse.e4.ui.workLeon Ochoach/src/org/eclipse/e4/ui/internal/workbench/ModelAssembler.java -> Style nit, remove this. This used to be a bug in JDT that it added this,  but if you use M5 and remove it, JDT will not add it again.

Line:62, bundles/org.eclipse.e4.ui.workLeon Ochoach/src/org/eclipse/e4/ui/internal/workbench/ModelAssembler.java -> Style nit, remove this. This used to be a bug in JDT that it added this,  but if you use M5 and remove it, JDT will not add it again.

Line:94, bundles/org.eclipse.e4.ui.workLeon Ochoach/src/org/eclipse/e4/ui/internal/workbench/ModelAssembler.java -> Style nit, remove this. This used to be a bug in JDT that it added this,  but if you use M5 and remove it, JDT will not add it again.

-------------------------------------
author: Zaid Mosley
date: 2014-01-27 09:36:56.000000000

Patch Set 1:

Some minor whitespace issues.

-------------------------------------
author: Rosa Carr
date: 2014-01-27 12:36:28.000000000

Patch Set 1:

Lars, I agree with your comment about the lifecycle. It should happen before the startup. This will also make the programming a lot clearer. However, In this case I think we need to extend the extension point to enable execution of processors and fragments ONLY in the legacy step. These processors could prepare the model in case of legacy only.

I will make the fix.

-------------------------------------
