コード例 #1
0
  @Override
  public void setSourceModule(IModuleSource sourceModule) {

    super.setSourceModule(sourceModule);

    try {
      isSymfonySource =
          sourceModule
                  .getModelElement()
                  .getScriptProject()
                  .getProject()
                  .getNature(SymfonyNature.NATURE_ID)
              != null;
    } catch (CoreException e) {
      isSymfonySource = false;
      Logger.logException(e);
    }
  }
コード例 #2
0
  public PhpIndexingVisitor(IIndexingRequestor requestor, ISourceModule module) {
    this.requestor = requestor;

    List<PhpIndexingVisitorExtension> extensions =
        new ArrayList<PhpIndexingVisitorExtension>(extensionElements.length);
    for (IConfigurationElement element : extensionElements) {
      try {
        PhpIndexingVisitorExtension ext =
            (PhpIndexingVisitorExtension) element.createExecutableExtension(CLASS_ATTR);
        ext.setRequestor(requestor);
        // pass the ISourceModule over to the extension
        // in case it needs it during indexing
        ext.setSourceModule(module);
        extensions.add(ext);
      } catch (CoreException e) {
        Logger.logException(e);
      }
    }
    this.extensions = extensions.toArray(new PhpIndexingVisitorExtension[extensions.size()]);
  }
コード例 #3
0
  public PHPSourceElementRequestor(ISourceElementRequestor requestor, IModuleSource sourceModule) {
    super(requestor);

    // Load PHP source element requester extensions
    IConfigurationElement[] elements =
        Platform.getExtensionRegistry()
            .getConfigurationElementsFor(
                PHPCorePlugin.ID, "phpSourceElementRequestors"); // $NON-NLS-1$
    List<PHPSourceElementRequestorExtension> requestors =
        new ArrayList<PHPSourceElementRequestorExtension>(elements.length);
    for (IConfigurationElement element : elements) {
      try {
        PHPSourceElementRequestorExtension extension =
            (PHPSourceElementRequestorExtension)
                element.createExecutableExtension("class"); // $NON-NLS-1$
        extension.setRequestor(fRequestor);
        extension.setSourceModule(sourceModule);
        requestors.add(extension);
      } catch (CoreException e) {
        Logger.logException(e);
      }
    }
    extensions = requestors.toArray(new PHPSourceElementRequestorExtension[requestors.size()]);
  }