plugins/org.symbian.tools.tmw.ui/src/org/symbian/tools/tmw/internal/ui/importwizard/ApplicationImportWizard.java
changeset 483 109da596fa9d
parent 481 e908ec135fa1
child 485 df4f55e8569e
equal deleted inserted replaced
482:2973198ae2a9 483:109da596fa9d
   173         return true;
   173         return true;
   174     }
   174     }
   175 
   175 
   176     public void init(IWorkbench workbench, IStructuredSelection selection) {
   176     public void init(IWorkbench workbench, IStructuredSelection selection) {
   177         file = null;
   177         file = null;
   178         if (selection instanceof IStructuredSelection && !selection.isEmpty()) {
   178         if (!selection.isEmpty()) {
   179             Object element = (selection).getFirstElement();
   179             Object element = (selection).getFirstElement();
   180             if (element instanceof IAdaptable) {
   180             if (element instanceof IAdaptable) {
   181                 IResource resource = (IResource) ((IAdaptable) element).getAdapter(IResource.class);
   181                 IResource resource = (IResource) ((IAdaptable) element).getAdapter(IResource.class);
   182                 if (resource != null && resource.getType() == IResource.FILE
   182                 if (resource != null && resource.getType() == IResource.FILE
   183                         && "wgz".equalsIgnoreCase(resource.getProjectRelativePath().getFileExtension())) {
   183                         && "wgz".equalsIgnoreCase(resource.getProjectRelativePath().getFileExtension())) {