org.symbian.tools.mtw.ui/src/org/symbian/tools/tmw/ui/UIUtils.java
changeset 468 a05c6e5cc7d9
parent 463 aea4c83725d8
equal deleted inserted replaced
467:5a2901872fcf 468:a05c6e5cc7d9
    26 import org.eclipse.jface.viewers.IStructuredSelection;
    26 import org.eclipse.jface.viewers.IStructuredSelection;
    27 import org.eclipse.ui.IEditorPart;
    27 import org.eclipse.ui.IEditorPart;
    28 import org.eclipse.ui.IWorkbenchPart;
    28 import org.eclipse.ui.IWorkbenchPart;
    29 import org.eclipse.ui.handlers.HandlerUtil;
    29 import org.eclipse.ui.handlers.HandlerUtil;
    30 import org.symbian.tools.tmw.core.TMWCore;
    30 import org.symbian.tools.tmw.core.TMWCore;
    31 import org.symbian.tools.tmw.core.projects.IMTWProject;
    31 import org.symbian.tools.tmw.core.projects.ITMWProject;
    32 
    32 
    33 public class UIUtils {
    33 public class UIUtils {
    34     public static IMTWProject getProjectFromCommandContext(ExecutionEvent event) {
    34     public static ITMWProject getProjectFromCommandContext(ExecutionEvent event) {
    35         IResource resource = null;
    35         IResource resource = null;
    36         IWorkbenchPart activePart = HandlerUtil.getActivePart(event);
    36         IWorkbenchPart activePart = HandlerUtil.getActivePart(event);
    37         if (activePart instanceof IEditorPart) {
    37         if (activePart instanceof IEditorPart) {
    38             resource = (IResource) ((IEditorPart) activePart).getEditorInput().getAdapter(IResource.class);
    38             resource = (IResource) ((IEditorPart) activePart).getEditorInput().getAdapter(IResource.class);
    39         } else {
    39         } else {