Class EditProductLineAction
- java.lang.Object
-
- net.ssehub.easy.producer.ui.internal.EditProductLineAction
-
- All Implemented Interfaces:
org.eclipse.ui.IActionDelegate,org.eclipse.ui.IObjectActionDelegate
public class EditProductLineAction extends java.lang.Object implements org.eclipse.ui.IObjectActionDelegateEASy contribution for the context menu of eclipse's package explorer. This class is needed to open the product line editor via the context menu.
-
-
Field Summary
Fields Modifier and Type Field Description private org.eclipse.core.resources.IProjectselectedProjectprivate org.eclipse.jface.viewers.IStructuredSelectionselectionprivate org.eclipse.swt.widgets.Shellshell
-
Constructor Summary
Constructors Constructor Description EditProductLineAction()Constructor for Action1.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static java.lang.ObjectgetAdapter(java.lang.Object adaptable, java.lang.Class clazz)Returns an adaptable object or null if the Object adaptable is neither an instance of the Class clazz nor an instance of IAdaptable.private org.eclipse.core.resources.IProjectgetProject()Returns the selected Project.private static java.lang.Object[]getSelectedAdaptables(org.eclipse.jface.viewers.ISelection selection, java.lang.Class clazz)Returns adaptable objects for the selected objects of the selection.voidrun(org.eclipse.jface.action.IAction action)voidselectionChanged(org.eclipse.jface.action.IAction action, org.eclipse.jface.viewers.ISelection selection)voidsetActivePart(org.eclipse.jface.action.IAction action, org.eclipse.ui.IWorkbenchPart targetPart)
-
-
-
Method Detail
-
setActivePart
public void setActivePart(org.eclipse.jface.action.IAction action, org.eclipse.ui.IWorkbenchPart targetPart)- Specified by:
setActivePartin interfaceorg.eclipse.ui.IObjectActionDelegate
-
run
public void run(org.eclipse.jface.action.IAction action)
- Specified by:
runin interfaceorg.eclipse.ui.IActionDelegate
-
selectionChanged
public void selectionChanged(org.eclipse.jface.action.IAction action, org.eclipse.jface.viewers.ISelection selection)- Specified by:
selectionChangedin interfaceorg.eclipse.ui.IActionDelegate
-
getSelectedAdaptables
private static java.lang.Object[] getSelectedAdaptables(org.eclipse.jface.viewers.ISelection selection, java.lang.Class clazz)Returns adaptable objects for the selected objects of the selection.- Parameters:
selection- Selected resources for which the adapter should be retrievedclazz- the comparing class- Returns:
- The selected objects
- See Also:
getAdapter(Object, Class)
-
getAdapter
public static java.lang.Object getAdapter(java.lang.Object adaptable, java.lang.Class clazz)Returns an adaptable object or null if the Object adaptable is neither an instance of the Class clazz nor an instance of IAdaptable.- Parameters:
adaptable- the object in questonclazz- the comparing class- Returns:
- An adaptable object or null if the Object adaptable is neither an instance of the Class c nor an instance of IAdaptable
-
getProject
private org.eclipse.core.resources.IProject getProject()
Returns the selected Project.- Returns:
- The selected project
-
-