SGXSDKScannerInfoCollector.java 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. ///////////////////////////////////////////////////////////////////////////
  2. // Copyright (c) 2018 Intel Corporation. //
  3. // //
  4. // All rights reserved. This program and the accompanying materials //
  5. // are made available under the terms of the Eclipse Public License v1.0 //
  6. // which accompanies this distribution, and is available at //
  7. // http://www.eclipse.org/legal/epl-v10.html //
  8. // //
  9. // Contributors: //
  10. // Intel Corporation - initial implementation and documentation //
  11. ///////////////////////////////////////////////////////////////////////////
  12. package com.intel.sgx.discovery;
  13. import java.util.List;
  14. import java.util.Map;
  15. import org.eclipse.cdt.make.core.scannerconfig.IDiscoveredPathManager.IDiscoveredPathInfo;
  16. import org.eclipse.cdt.make.core.scannerconfig.IScannerInfoCollector3;
  17. import org.eclipse.cdt.make.core.scannerconfig.IScannerInfoCollectorCleaner;
  18. import org.eclipse.cdt.make.core.scannerconfig.InfoContext;
  19. import org.eclipse.cdt.make.core.scannerconfig.ScannerInfoTypes;
  20. import org.eclipse.cdt.managedbuilder.scannerconfig.IManagedScannerInfoCollector;
  21. import org.eclipse.core.resources.IProject;
  22. import org.eclipse.core.resources.IResource;
  23. import org.eclipse.core.runtime.CoreException;
  24. import org.eclipse.core.runtime.IProgressMonitor;
  25. /*
  26. * This code has been taken from the NDK plugin for Linux. If there is an update to this code there, then refactor this code.
  27. */
  28. public class SGXSDKScannerInfoCollector implements IScannerInfoCollector3,IScannerInfoCollectorCleaner,IManagedScannerInfoCollector{
  29. private SGXSDKDiscoveredPathInfo sgxPathInfo;
  30. @Override
  31. public void setProject(IProject project) {
  32. throw new Error("Not implemented");
  33. }
  34. @Override
  35. public void updateScannerConfiguration(IProgressMonitor monitor)
  36. throws CoreException {
  37. sgxPathInfo.update(monitor);
  38. }
  39. @Override
  40. public IDiscoveredPathInfo createPathInfoObject() {
  41. return sgxPathInfo;
  42. }
  43. @Override
  44. public void contributeToScannerConfig(Object resource, @SuppressWarnings("rawtypes") Map scannerInfo) {
  45. throw new Error("Not implemented");
  46. }
  47. @SuppressWarnings("rawtypes")
  48. @Override
  49. public List getCollectedScannerInfo(Object resource, ScannerInfoTypes type) {
  50. throw new Error("Not implemented");
  51. }
  52. @Override
  53. public Map<String, String> getDefinedSymbols() {
  54. throw new Error("Not implemented");
  55. }
  56. @Override
  57. public List<String> getIncludePaths() {
  58. throw new Error("Not implemented");
  59. }
  60. @Override
  61. public void deleteAllPaths(IResource resource) {
  62. throw new Error("Not implemented");
  63. }
  64. @Override
  65. public void deleteAllSymbols(IResource resource) {
  66. throw new Error("Not implemented");
  67. }
  68. @Override
  69. public void deletePath(IResource resource, String path) {
  70. throw new Error("Not implemented");
  71. }
  72. @Override
  73. public void deleteSymbol(IResource resource, String symbol) {
  74. throw new Error("Not implemented");
  75. }
  76. @Override
  77. public void deleteAll(IResource resource) {
  78. sgxPathInfo.delete();
  79. }
  80. @Override
  81. public void setInfoContext(InfoContext context) {
  82. sgxPathInfo = new SGXSDKDiscoveredPathInfo(context.getProject());
  83. }
  84. }