30 import org.eclipse.wst.jsdt.core.IIncludePathEntry; |
30 import org.eclipse.wst.jsdt.core.IIncludePathEntry; |
31 import org.eclipse.wst.jsdt.core.JavaScriptCore; |
31 import org.eclipse.wst.jsdt.core.JavaScriptCore; |
32 import org.osgi.framework.Bundle; |
32 import org.osgi.framework.Bundle; |
33 import org.symbian.tools.tmw.core.TMWCore; |
33 import org.symbian.tools.tmw.core.TMWCore; |
34 import org.symbian.tools.tmw.core.projects.IFacetIncludePathProvider; |
34 import org.symbian.tools.tmw.core.projects.IFacetIncludePathProvider; |
35 import org.symbian.tools.tmw.core.projects.IMTWProject; |
35 import org.symbian.tools.tmw.core.projects.ITMWProject; |
36 |
36 |
37 public class StaticIncludePathProvider implements IFacetIncludePathProvider { |
37 public class StaticIncludePathProvider implements IFacetIncludePathProvider { |
38 private final IConfigurationElement element; |
38 private final IConfigurationElement element; |
39 private IIncludePathEntry[] entries; |
39 private IIncludePathEntry[] entries; |
40 |
40 |
41 public StaticIncludePathProvider(IConfigurationElement element) { |
41 public StaticIncludePathProvider(IConfigurationElement element) { |
42 this.element = element; |
42 this.element = element; |
43 } |
43 } |
44 |
44 |
45 public IIncludePathEntry[] getEntries(IMTWProject project) { |
45 public IIncludePathEntry[] getEntries(ITMWProject project) { |
46 if (entries == null) { |
46 if (entries == null) { |
47 final String name = element.getContributor().getName(); |
47 final String name = element.getContributor().getName(); |
48 final String path = element.getAttribute("file"); |
48 final String path = element.getAttribute("file"); |
49 final Bundle bundle = Platform.getBundle(name); |
49 final Bundle bundle = Platform.getBundle(name); |
50 final URL url = FileLocator.find(bundle, new Path(path), null); |
50 final URL url = FileLocator.find(bundle, new Path(path), null); |