plugins/org.symbian.tools.tmw.ui/src/org/symbian/tools/tmw/internal/ui/importwizard/ApplicationImportWizard.java
equal
deleted
inserted
replaced
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())) { |