# Uses of Interface
org.eclipse.e4.ui.model.application.MApplication

Packages that use MApplication
Package
Description
org.eclipse.e4.ui.model.application
Application programming interfaces describing the Eclipse 4 application model elements.
org.eclipse.e4.ui.model.fragment
Application programming interfaces describing the Eclipse 4 fragment model elements.
org.eclipse.e4.ui.workbench
Application programming interfaces describing Eclipse 4 handlers and the workbench.
org.eclipse.ui
Application programming interfaces for interaction with and extension of the Eclipse Platform User Interface.

## Uses of MApplication in org.eclipse.e4.ui.model.application

Methods in org.eclipse.e4.ui.model.application that return MApplication
Modifier and Type
Method
Description
`MApplication`
MApplicationFactory.`createApplication()`
Returns a new object of class 'Application'.

## Uses of MApplication in org.eclipse.e4.ui.model.fragment

Methods in org.eclipse.e4.ui.model.fragment with parameters of type MApplication
Modifier and Type
Method
Description
`List<MApplicationElement>`
MModelFragment.`merge(MApplication application)`
Merges this MModelFragment into an MApplication.

## Uses of MApplication in org.eclipse.e4.ui.workbench

Methods in org.eclipse.e4.ui.workbench that return MApplication
Modifier and Type
Method
Description
`MApplication`
IWorkbench.`getApplication()`
Methods in org.eclipse.e4.ui.workbench with parameters of type MApplication
Modifier and Type
Method
Description
`org.eclipse.emf.ecore.resource.Resource`
IModelResourceHandler.`createResourceWithApp(MApplication theApp)`
Creates a resource with an app Model, used for saving copies of the main app model.

## Uses of MApplication in org.eclipse.ui

Methods in org.eclipse.ui that return types with arguments of type MApplication
Modifier and Type
Method
Description
`static Optional<MApplication>`
PlatformUI.`getApplication()`
This methods allows code of eclipse.ui to gracefully migrate to E4 as it has the following properties: It does not throw an exception but returns an empty optional if something is not ready (yet or anymore) so code can choose how to handle this (e.g. use `Optional.orElseThrow()` if required or `Optional.orElse(Object)` if a fallback exits. If this is is actually a (ui) Workbench running, this is returned and could be used If not the service registry is searched for an org.eclipse.e4.ui.workbench.IWorkbench so code can run inside a pure E4 (e.g.