24 import org.eclipse.wst.common.project.facet.core.runtime.RuntimeManager; |
24 import org.eclipse.wst.common.project.facet.core.runtime.RuntimeManager; |
25 import org.eclipse.wst.common.project.facet.ui.IDecorationsProvider; |
25 import org.eclipse.wst.common.project.facet.ui.IDecorationsProvider; |
26 import org.eclipse.wst.jsdt.core.IJavaScriptProject; |
26 import org.eclipse.wst.jsdt.core.IJavaScriptProject; |
27 import org.eclipse.wst.jsdt.internal.ui.IJsGlobalScopeContainerInitializerExtension; |
27 import org.eclipse.wst.jsdt.internal.ui.IJsGlobalScopeContainerInitializerExtension; |
28 import org.symbian.tools.tmw.core.TMWCore; |
28 import org.symbian.tools.tmw.core.TMWCore; |
29 import org.symbian.tools.tmw.core.projects.IMTWProject; |
29 import org.symbian.tools.tmw.core.projects.ITMWProject; |
30 import org.symbian.tools.tmw.core.runtimes.IMobileWebRuntime; |
30 import org.symbian.tools.tmw.core.runtimes.IMobileWebRuntime; |
31 |
31 |
32 @SuppressWarnings("restriction") |
32 @SuppressWarnings("restriction") |
33 public class TMWGlobalScopeContainerUI implements IJsGlobalScopeContainerInitializerExtension { |
33 public class TMWGlobalScopeContainerUI implements IJsGlobalScopeContainerInitializerExtension { |
34 |
34 |
35 public ImageDescriptor getImage(IPath containerPath, String element, IJavaScriptProject project) { |
35 public ImageDescriptor getImage(IPath containerPath, String element, IJavaScriptProject project) { |
36 final IMTWProject p = TMWCore.create(project.getProject()); |
36 final ITMWProject p = TMWCore.create(project.getProject()); |
37 if (p != null) { |
37 if (p != null) { |
38 final IMobileWebRuntime runtime = p.getTargetRuntime(); |
38 final IMobileWebRuntime runtime = p.getTargetRuntime(); |
39 if (runtime != null) { |
39 if (runtime != null) { |
40 final IRuntime r = RuntimeManager.getRuntime(runtime.getId()); |
40 final IRuntime r = RuntimeManager.getRuntime(runtime.getId()); |
41 final IDecorationsProvider decorationsProvider = (IDecorationsProvider) r |
41 final IDecorationsProvider decorationsProvider = (IDecorationsProvider) r |