public class SelectionUtil extends Object
Modifier and Type | Field and Description |
---|---|
static int |
JAR_FILE |
static int |
POM_FILE |
static int |
PROJECT_WITH_NATURE |
static int |
PROJECT_WITHOUT_NATURE |
static int |
UNSUPPORTED |
static int |
WORKING_SET |
Constructor and Description |
---|
SelectionUtil() |
Modifier and Type | Method and Description |
---|---|
static ArtifactKey |
getArtifactKey(Object element) |
static List<org.eclipse.ui.IWorkingSet> |
getAssignedWorkingSets(Object element) |
static int |
getElementType(Object element)
Checks which type the given element belongs to.
|
static org.apache.maven.project.MavenProject |
getMavenProject(org.eclipse.ui.IEditorInput editorInput,
org.eclipse.core.runtime.IProgressMonitor monitor) |
static org.eclipse.core.runtime.IPath |
getSelectedLocation(org.eclipse.jface.viewers.IStructuredSelection selection) |
static org.eclipse.ui.IWorkingSet |
getSelectedWorkingSet(org.eclipse.jface.viewers.IStructuredSelection selection) |
static int |
getSelectionType(org.eclipse.jface.viewers.IStructuredSelection selection)
Checks which type the given selection belongs to.
|
static <T> T |
getType(Object element,
Class<T> type)
Checks if the object belongs to a given type and returns it or a suitable adapter.
|
static org.eclipse.ui.IWorkingSet |
getWorkingSet(Object element) |
public static final int UNSUPPORTED
public static final int PROJECT_WITH_NATURE
public static final int PROJECT_WITHOUT_NATURE
public static final int POM_FILE
public static final int JAR_FILE
public static final int WORKING_SET
public static int getSelectionType(org.eclipse.jface.viewers.IStructuredSelection selection)
public static int getElementType(Object element)
public static <T> T getType(Object element, Class<T> type)
public static org.eclipse.core.runtime.IPath getSelectedLocation(org.eclipse.jface.viewers.IStructuredSelection selection)
public static org.eclipse.ui.IWorkingSet getSelectedWorkingSet(org.eclipse.jface.viewers.IStructuredSelection selection)
public static org.eclipse.ui.IWorkingSet getWorkingSet(Object element)
public static List<org.eclipse.ui.IWorkingSet> getAssignedWorkingSets(Object element)
public static ArtifactKey getArtifactKey(Object element) throws org.eclipse.core.runtime.CoreException
org.eclipse.core.runtime.CoreException
public static org.apache.maven.project.MavenProject getMavenProject(org.eclipse.ui.IEditorInput editorInput, org.eclipse.core.runtime.IProgressMonitor monitor) throws org.eclipse.core.runtime.CoreException
org.eclipse.core.runtime.CoreException
Copyright © 2005-2013 Sonatype, Inc.. All Rights Reserved.