org.symbian.tools.mtw.ui/src/org/symbian/tools/tmw/ui/navigator/PackagingInformationDecorator.java
equal
deleted
inserted
replaced
22 import org.eclipse.core.runtime.IAdaptable; |
22 import org.eclipse.core.runtime.IAdaptable; |
23 import org.eclipse.jface.viewers.IDecoration; |
23 import org.eclipse.jface.viewers.IDecoration; |
24 import org.eclipse.jface.viewers.ILabelProviderListener; |
24 import org.eclipse.jface.viewers.ILabelProviderListener; |
25 import org.eclipse.jface.viewers.ILightweightLabelDecorator; |
25 import org.eclipse.jface.viewers.ILightweightLabelDecorator; |
26 import org.symbian.tools.tmw.core.TMWCore; |
26 import org.symbian.tools.tmw.core.TMWCore; |
27 import org.symbian.tools.tmw.core.projects.IMTWProject; |
27 import org.symbian.tools.tmw.core.projects.ITMWProject; |
28 import org.symbian.tools.tmw.core.runtimes.IPackager; |
28 import org.symbian.tools.tmw.core.runtimes.IPackager; |
29 import org.symbian.tools.tmw.ui.TMWCoreUI; |
29 import org.symbian.tools.tmw.ui.TMWCoreUI; |
30 |
30 |
31 public class PackagingInformationDecorator implements ILightweightLabelDecorator { |
31 public class PackagingInformationDecorator implements ILightweightLabelDecorator { |
32 |
32 |
36 resource = (IResource) element; |
36 resource = (IResource) element; |
37 } else if (element instanceof IAdaptable) { |
37 } else if (element instanceof IAdaptable) { |
38 resource = (IResource) ((IAdaptable) element).getAdapter(IResource.class); |
38 resource = (IResource) ((IAdaptable) element).getAdapter(IResource.class); |
39 } |
39 } |
40 if (resource != null && resource.isAccessible()) { |
40 if (resource != null && resource.isAccessible()) { |
41 IMTWProject project = TMWCore.create(resource.getProject()); |
41 ITMWProject project = TMWCore.create(resource.getProject()); |
42 if (project != null) { |
42 if (project != null) { |
43 IPackager packager = TMWCore.getRuntimesManager().getPackager(project); |
43 IPackager packager = TMWCore.getRuntimesManager().getPackager(project); |
44 if (packager.getPathInPackage(resource) != null) { |
44 if (packager.getPathInPackage(resource) != null) { |
45 decoration.addOverlay(TMWCoreUI.getImages().getExcludedIconDescriptor(), IDecoration.TOP_RIGHT); |
45 decoration.addOverlay(TMWCoreUI.getImages().getExcludedIconDescriptor(), IDecoration.TOP_RIGHT); |
46 } |
46 } |