public class EAResourceUIUtils
extends java.lang.Object
ProgressMonitorDialog
with the option to abort the loading. If it is aborted,
an InterruptedException
is thrown so the client can handle the incomplete model properly.Constructor and Description |
---|
EAResourceUIUtils() |
Modifier and Type | Method and Description |
---|---|
static EAResource |
loadEAResourceSilentWithProgressMonitorDialog(Shell shell,
IFile file,
boolean readOnly)
This method opens a
ProgressMonitorDialog and in its run method, calls
EAResourceUtils.loadEAResourceSilent(IFile, boolean, IProgressMonitor) for loading the given EA model. |
static EAResource |
loadEAResourceSilentWithProgressMonitorDialog(Shell shell,
URI uri,
boolean readOnly)
This method opens a
ProgressMonitorDialog and in its run method, calls
EAResourceUtils.loadEAResourceSilent(URI, boolean, IProgressMonitor) for loading the given EA model. |
static void |
resolveAllWithProgressDialog(Shell shell,
EObject object)
Resolve the given object and show the progress in a
ProgressMonitorDialog . |
static void |
resolveAllWithProgressDialog(Shell shell,
Resource resource)
Resolve the given resource and show the progress in a
ProgressMonitorDialog . |
public static EAResource loadEAResourceSilentWithProgressMonitorDialog(Shell shell, IFile file, boolean readOnly) throws java.lang.InterruptedException, java.io.FileNotFoundException
ProgressMonitorDialog
and in its run method, calls
EAResourceUtils.loadEAResourceSilent(IFile, boolean, IProgressMonitor)
for loading the given EA model.
This way, the user may cancel model loading if it takes too long.shell
- The shell for the progress monitor dialog.file
- The eap-file to be loaded.readOnly
- Whether or not the model should be loaded read-only.null
, if the resource could not be loaded.java.lang.InterruptedException
- In case the progress monitor was cancelled.java.io.FileNotFoundException
- In case the file could not be found.public static EAResource loadEAResourceSilentWithProgressMonitorDialog(Shell shell, URI uri, boolean readOnly) throws java.lang.InterruptedException, java.io.FileNotFoundException
ProgressMonitorDialog
and in its run method, calls
EAResourceUtils.loadEAResourceSilent(URI, boolean, IProgressMonitor)
for loading the given EA model. This
way, the user may cancel model loading if it takes too long.shell
- The shell for the progress monitor dialog.file
- The eap-file to be loaded.readOnly
- Whether or not the model should be loaded read-only.null
, if the resource could not be loaded.java.lang.InterruptedException
- In case the progress monitor was cancelled.java.io.FileNotFoundException
- In case the file could not be found.public static void resolveAllWithProgressDialog(Shell shell, Resource resource) throws java.lang.InterruptedException
ProgressMonitorDialog
.shell
- The shell for the dialog.resource
- A resource.java.lang.InterruptedException
- in case the progress monitor is canceled (e.g. by the user).public static void resolveAllWithProgressDialog(Shell shell, EObject object) throws java.lang.InterruptedException
ProgressMonitorDialog
.shell
- The shell for the dialog.object
- A model object.java.lang.InterruptedException
- in case the progress monitor is canceled (e.g. by the user).Copyright (c) 2015 itemis AG, and others. All rights reserved.