Class JavaPropReference

java.lang.Object
com.iizix.prop.PropReference
com.iizigo.java.JavaPropReference

public class JavaPropReference extends PropReference
The property reference class subclassing the PropReference to provide special functions for Java files.
Author:
Christopher Mindus
  • Constructor Details

    • JavaPropReference

      public JavaPropReference(String name, Class<?>[] supportedClasses, IPropReference listener)
      Constructs a new property reference without property owner. It is recommended to always use an owner property, so preferably the constructor PropReference(GProp owner, String name, Class [] supportedClasses, IPropReference listener) should be used.

      The class is used without checking for superclasses or subclasses, it must be a direct class match.

      If the listener parameter is null, no property listener is used, thus this class will be safe and cannot cause memory leaks, but the real-time change notification is lost.

      Parameters:
      name - The reference name.
      supportedClasses - Array of supported classes for the referenced property, or null for no check.
      listener - The listener, or null for none.
  • Method Details

    • resolve

      public int resolve(org.eclipse.core.resources.IFile file, boolean doReCheck, GEvent triggerEvent)
      Attempts to resolve the property name.
      Parameters:
      file - The Java source file.
      doReCheck - Force a re-check flag.
      triggerEvent - Event that triggered this call, null for none.
      Returns:
      Value indicating success to resolve:
      • 1 (one) for completed successfully with correct class (if this applies),
      • 0 (zero) indicating failure,
      • -1 (minus one) indicating project is loading and references should not be processed.