56
EMF.Edit The Force Unleashed! cloudchaser32000 (cc) http://www.flickr.com/photos/22566089@N03/5983182747/ Mikaël Barbero Obeo

EMF.Edit the Force Unleashed!

Embed Size (px)

DESCRIPTION

 

Citation preview

Page 1: EMF.Edit the Force Unleashed!

EMF.EditThe Force Unleashed!

cloudchaser32000 (cc) http://www.flickr.com/photos/22566089@N03/5983182747/

Mikaël BarberoObeo

Page 2: EMF.Edit the Force Unleashed!

Did you ever code a rich client application:

- without EMF?

- with EMF?

Page 3: EMF.Edit the Force Unleashed!

What is EM F ?

Page 4: EMF.Edit the Force Unleashed!

FromModels...

(cc) Alan Dean http://www.flickr.com/photos/60041018@N00/3513723662

Page 5: EMF.Edit the Force Unleashed!

...to Java Beans

(cc) The Wanderer's Eye http://www.flickr.com/photos/8997331@N04/5237447939

Page 6: EMF.Edit the Force Unleashed!

OnSteroïds

(cc) Tama Leaver http://www.flickr.com/photos/75815807@N00/2409717875

Page 7: EMF.Edit the Force Unleashed!

(cc) Яick Harris http://www.flickr.com/photos/37153080@N00/430890004

Page 8: EMF.Edit the Force Unleashed!

More about the

Steroïds

(cc) Sterlic http://www.flickr.com/photos/27482959@N08/5559534294

Page 9: EMF.Edit the Force Unleashed!

EMF.Edit

(cc) alexliivet http://www.flickr.com/photos/23108377@N07/7018977935

Page 10: EMF.Edit the Force Unleashed!

NotifyFramework

CommandFramework

ChangeRecorder

(cc)

sha

nkar

, shi

v ht

tp://

ww

w.fl

ickr

.com

/pho

tos/

1472

2496

@N

04/2

3683

4620

2

(cc)

Cra

zy D

iam

ond

http

://w

ww

.flic

kr.c

om/p

hoto

s/48

4464

24@

N00

/450

5142

495

Page 11: EMF.Edit the Force Unleashed!

NotifyFramework

CommandFramework

ChangeRecorder

(cc)

sha

nkar

, shi

v ht

tp://

ww

w.fl

ickr

.com

/pho

tos/

1472

2496

@N

04/2

3683

4620

2

Page 12: EMF.Edit the Force Unleashed!

Observer—

Adapter

Observable—

Notifier

notifies

registers

Page 13: EMF.Edit the Force Unleashed!

Notification Message from the Observable to the Observer

5

Page 14: EMF.Edit the Force Unleashed!

Notification

EventType

Add

RemoveAdapter

Set

Unset Remove

AddMany

RemoveMany

Resolve

Page 15: EMF.Edit the Force Unleashed!

Stop Delivering Notifications

(cc)

chu

bsto

ck h

ttp:

//ww

w.fl

ickr

.com

/pho

tos/

2149

7715

@N

08/2

0798

8500

2

Page 16: EMF.Edit the Force Unleashed!

{{

For all model elements

In Genmodel

Set «Model / Suppress Notification» to false

For one model elements

On EObject instance

call #eSetDeliver(false)

Page 17: EMF.Edit the Force Unleashed!

EContent AdapterListener of Containment Tree

Page 18: EMF.Edit the Force Unleashed!

EContent AdapterListener of Containment Tree

eAdapters().add(EContentAdapter)

Page 19: EMF.Edit the Force Unleashed!

EContent AdapterListener of Containment Tree

eAdapters().add(EContentAdapter)

Page 20: EMF.Edit the Force Unleashed!

3... 2... 1... Action!

Page 22: EMF.Edit the Force Unleashed!

NotifyFramework

CommandFramework

ChangeRecorder

(cc)

Cra

zy D

iam

ond

http

://w

ww

.flic

kr.c

om/p

hoto

s/48

4464

24@

N00

/450

5142

495

Page 23: EMF.Edit the Force Unleashed!

What is a?

(cc) jDevaun http://www.flickr.com/photos/34316967@N04/3838807132

Page 24: EMF.Edit the Force Unleashed!

Executability

Page 25: EMF.Edit the Force Unleashed!

Executability

Undoability

Page 26: EMF.Edit the Force Unleashed!

Executability

Undoability

Redo

Page 27: EMF.Edit the Force Unleashed!

Result

Page 28: EMF.Edit the Force Unleashed!

Result

Aected Objects

Page 29: EMF.Edit the Force Unleashed!

Result

Aected Objects

Label / Description

Page 30: EMF.Edit the Force Unleashed!

GenericCommands

Set

Replace

Add

Remove

Move

Copy

Page 31: EMF.Edit the Force Unleashed!

High-levelCommands

CreateChild

Paste from Clipboard

Delete

Cut To Clipboard

Copy to Clipboard

Drag & Drop

Page 32: EMF.Edit the Force Unleashed!

(c) Simon Cox, Sept 2012

Page 33: EMF.Edit the Force Unleashed!

(c) Simon Cox, Sept 2012

Stack

Command

Page 34: EMF.Edit the Force Unleashed!

3... 2... 1... Action!

Page 35: EMF.Edit the Force Unleashed!

https://gist.github.com/mbarbero/77c81a93b5f63c441207

Code available

Page 36: EMF.Edit the Force Unleashed!

NotifyFramework

CommandFramework

ChangeRecorder

Page 37: EMF.Edit the Force Unleashed!
Page 38: EMF.Edit the Force Unleashed!

Change ModelBird view

ChangeDescription

apply() applyAndReverse()

Map<EObject, Changes>

EObject(from ecore)

FeatureChange

dataValue : String

EStructuralFeature(from ecore)

referenceValue

key

objectChanges [*]

value [*]

feature

Page 39: EMF.Edit the Force Unleashed!

Change RecorderListener of Containment Tree

ChangeRecorder

Page 40: EMF.Edit the Force Unleashed!

Change RecorderListener of Containment Tree

ChangeRecorder

Listen to

Page 41: EMF.Edit the Force Unleashed!

Change RecorderListener of Containment Tree

ChangeRecorder

Listen to Creates

Change model

Page 42: EMF.Edit the Force Unleashed!

Change Command

(cc) fdecomite http://www.flickr.com/photos/21649179@N00/6478685035

Page 43: EMF.Edit the Force Unleashed!

Change Command

Execute

Page 44: EMF.Edit the Force Unleashed!

Change Command

Execute

Change recorder

Page 45: EMF.Edit the Force Unleashed!

Change Command

Execute Undo Redo

Change recorder

Page 46: EMF.Edit the Force Unleashed!

Change Command

Execute Undo Redo

applyAndReverseChange recorder

Page 47: EMF.Edit the Force Unleashed!

3... 2... 1... Action!

Page 48: EMF.Edit the Force Unleashed!

https://gist.github.com/mbarbero/6e6b88ee61ce7e2e57

Code available

Page 49: EMF.Edit the Force Unleashed!

What you should remember

(cc) debaird™ http://www.flickr.com/photos/48889107219@N01/239460739

Page 50: EMF.Edit the Force Unleashed!

What you should remember

Page 51: EMF.Edit the Force Unleashed!

Adapter + ChangeModel

What you should remember

ChangeRecorder=

Page 52: EMF.Edit the Force Unleashed!

Adapter + ChangeModel

Command + ChangeRecorder

What you should remember

ChangeRecorder ChangeCommand= =

Page 53: EMF.Edit the Force Unleashed!

Adapter + ChangeModel

Command + ChangeRecorder

Steroïds for Your App

What you should remember

ChangeRecorder ChangeCommand+

Page 54: EMF.Edit the Force Unleashed!

Q & A

(cc) Instant Vantage http://www.flickr.com/photos/44312356@N04/6023508805

Page 55: EMF.Edit the Force Unleashed!

Mikaël [email protected]+Mikaël Barbero@mikbarbero

Obeohttp://www.obeo.fr

(cc) TheAlieness GiselaGiardino²³ http://www.flickr.com/photos/36613169@N00/304120801/

Page 56: EMF.Edit the Force Unleashed!

Give Feedback

1} Sign in www.eclipsecon.org

2} Select Session Evaluate

3} Vote +1, 0 or -1

(cc)

Den

is D

ervi

sevi

c ht

tp://

ww

w.fl

ickr

.com

/pho

tos/

2397

9265

@N

07/4

7455

2050

1/