plugins/org.symbian.tools.wrttools/src/org/symbian/tools/wrttools/core/libraries/PlatformServicesTypeProvider.java
equal
deleted
inserted
replaced
25 import org.eclipse.wst.jsdt.core.infer.IInferenceFile; |
25 import org.eclipse.wst.jsdt.core.infer.IInferenceFile; |
26 import org.eclipse.wst.jsdt.core.infer.InferEngine; |
26 import org.eclipse.wst.jsdt.core.infer.InferEngine; |
27 import org.eclipse.wst.jsdt.core.infer.InferrenceProvider; |
27 import org.eclipse.wst.jsdt.core.infer.InferrenceProvider; |
28 import org.eclipse.wst.jsdt.core.infer.RefactoringSupport; |
28 import org.eclipse.wst.jsdt.core.infer.RefactoringSupport; |
29 import org.eclipse.wst.jsdt.core.infer.ResolutionConfiguration; |
29 import org.eclipse.wst.jsdt.core.infer.ResolutionConfiguration; |
30 import org.symbian.tools.wrttools.util.ProjectUtils; |
30 import org.symbian.tools.tmw.core.TMWCore; |
31 |
31 |
32 public class PlatformServicesTypeProvider implements InferrenceProvider { |
32 public class PlatformServicesTypeProvider implements InferrenceProvider { |
33 public static final String ID = "org.symbian.tools.wrttools.platformservices"; |
33 public static final String ID = "org.symbian.tools.wrttools.platformservices"; |
34 |
34 |
35 public int applysTo(IInferenceFile scriptFile) { |
35 public int applysTo(IInferenceFile scriptFile) { |
38 Path path = new Path(String.valueOf(fileName)); |
38 Path path = new Path(String.valueOf(fileName)); |
39 if (path.segmentCount() > 1) { |
39 if (path.segmentCount() > 1) { |
40 IFile file = ResourcesPlugin.getWorkspace().getRoot().getFile(path); |
40 IFile file = ResourcesPlugin.getWorkspace().getRoot().getFile(path); |
41 if (file.exists()) { |
41 if (file.exists()) { |
42 IProject project = file.getProject(); |
42 IProject project = file.getProject(); |
43 if (ProjectUtils.hasWrtNature(project)) { |
43 if (TMWCore.create(project) != null) { |
44 return InferrenceProvider.MAYBE_THIS; |
44 return InferrenceProvider.MAYBE_THIS; |
45 } |
45 } |
46 } |
46 } |
47 } |
47 } |
48 } |
48 } |