public final class ECPHandlerHelper extends Object
| Modifier and Type | Method and Description |
|---|---|
static org.eclipse.emf.ecore.EObject |
addModelElement(ECPProject ecpProject,
org.eclipse.swt.widgets.Shell shell,
boolean open)
Add a new
EObject to the root of an ECPProject. |
static org.eclipse.emf.ecore.EObject |
addModelElement(org.eclipse.emf.ecore.resource.Resource resource,
org.eclipse.swt.widgets.Shell activeShell,
boolean open) |
static void |
changeCloseState(ECPProject[] closeables,
String currentType)
This method closes/opens an array of ECPProject.
|
static void |
checkout(List<ECPCheckoutSource> checkoutObjects,
org.eclipse.swt.widgets.Shell shell)
This method allows to checkout a list of
ECPCheckoutSource into the workspace. |
static ECPProject |
createProject(org.eclipse.swt.widgets.Shell shell)
This method creates a new project.
|
static ECPRepository |
createRepository(org.eclipse.swt.widgets.Shell shell)
This method created a new Repository.
|
static void |
deleteHandlerHelper(List<ECPContainer> deletables,
org.eclipse.swt.widgets.Shell shell)
Deletes the provided
ECPContainer elements. |
static void |
deleteModelElement(ECPProject project,
Collection<Object> objects)
This helper method is used to delete model elements from a project.
|
static void |
filterProjectPackages(ECPProject ecpProject,
org.eclipse.swt.widgets.Shell shell)
This method allows the user to filter the visible packages and classes.
|
static void |
openModelElement(Object me,
ECPProject ecpProject)
This opens the model element.
|
static void |
openProjectProperties(ECPProject project,
boolean editable,
org.eclipse.swt.widgets.Shell shell)
Opens a Dialog showing the properties of the provided
ECPProject. |
static void |
openRepositoryProperties(ECPRepository repository,
boolean editable,
org.eclipse.swt.widgets.Shell shell)
Opens a Dialog showing the properties of the provided
ECPRepository. |
static void |
saveProject(ECPProject project)
Triggers the save on an
ECPProject. |
static boolean |
showDirtyProjectsDialog(org.eclipse.swt.widgets.Shell shell)
Opens a dialog to save dirty projects.
|
public static void checkout(List<ECPCheckoutSource> checkoutObjects, org.eclipse.swt.widgets.Shell shell)
ECPCheckoutSource into the workspace.checkoutObjects - the List of ECPCheckoutSource to checkoutshell - the Shell to use for diplaying UIpublic static void deleteModelElement(ECPProject project, Collection<Object> objects)
project - the project to delete fromobjects - the model elements to deletepublic static ECPProject createProject(org.eclipse.swt.widgets.Shell shell)
shell - the shell for displaying the wizardECPProjectpublic static org.eclipse.emf.ecore.EObject addModelElement(ECPProject ecpProject, org.eclipse.swt.widgets.Shell shell, boolean open)
EObject to the root of an ECPProject.ecpProject - the ECPProject to add the EObject toshell - the Shell used to display the UIopen - whether to open the corresponding editor or notEObjectpublic static org.eclipse.emf.ecore.EObject addModelElement(org.eclipse.emf.ecore.resource.Resource resource,
org.eclipse.swt.widgets.Shell activeShell,
boolean open)
resource - the resourceactiveShell - current active shellopen - if model element should be directly opened in an editor after it is added to project.public static void filterProjectPackages(ECPProject ecpProject, org.eclipse.swt.widgets.Shell shell)
ecpProject - the project to filtershell - the Shell to use for UIpublic static ECPRepository createRepository(org.eclipse.swt.widgets.Shell shell)
shell - the shell for the WizardECPRepositorypublic static void changeCloseState(ECPProject[] closeables, String currentType)
closeables - the ECPProjects to change the state forcurrentType - the action to dopublic static void deleteHandlerHelper(List<ECPContainer> deletables, org.eclipse.swt.widgets.Shell shell)
ECPContainer elements.deletables - the List of ECPContainers to deleteshell - the shell to use for UIpublic static void saveProject(ECPProject project)
ECPProject.project - the project to save the changes onpublic static void openModelElement(Object me, ECPProject ecpProject)
me - ModelElement to open
the view that requested the open model elementecpProject - the ECPProject of the model elementpublic static void openProjectProperties(ECPProject project, boolean editable, org.eclipse.swt.widgets.Shell shell)
ECPProject.project - the project whose properties should be showneditable - whether the properties should be editableshell - the Shell to use for the dialogpublic static void openRepositoryProperties(ECPRepository repository, boolean editable, org.eclipse.swt.widgets.Shell shell)
ECPRepository.repository - the repository whose properties should be showneditable - whether the properties should be editableshell - the Shell to use for the dialogpublic static boolean showDirtyProjectsDialog(org.eclipse.swt.widgets.Shell shell)
shell - to open the dialog inCopyright © 2016. All rights reserved.