Class EclipseEnvironmentBridge

    • Constructor Detail

      • EclipseEnvironmentBridge

        public EclipseEnvironmentBridge​(org.eclipse.jdt.core.IJavaProject javaProject)
        Instantiate for IJavaProject specific bridging.
        Parameters:
        javaProject - IJavaProject.
      • EclipseEnvironmentBridge

        public EclipseEnvironmentBridge()
        Initialise for non IJavaProject specific bridging.
    • Method Detail

      • init

        public void init​(org.eclipse.swt.widgets.Shell parentShell)
        Initialise.
        Parameters:
        parentShell - Parent Shell.
      • dispose

        public void dispose()
                     throws java.io.IOException
        Disposes of resources.
        Throws:
        java.io.IOException - If fails to dispose.
      • isClassOnClassPath

        public boolean isClassOnClassPath​(java.lang.String className)
                                   throws java.lang.Exception
        Description copied from interface: EnvironmentBridge
        Indicates if Class on the Class path.
        Specified by:
        isClassOnClassPath in interface EnvironmentBridge
        Parameters:
        className - Name of the Class.
        Returns:
        true if Class on the Class path.
        Throws:
        java.lang.Exception - If fails to determine if on Class path.
      • isSuperType

        public boolean isSuperType​(java.lang.String className,
                                   java.lang.String superTypeName)
                            throws java.lang.Exception
        Description copied from interface: EnvironmentBridge
        Indicates if super type.
        Specified by:
        isSuperType in interface EnvironmentBridge
        Parameters:
        className - Name of Class.
        superTypeName - Super type Class.
        Returns:
        true if super type Class.
        Throws:
        java.lang.Exception - If fails to determine if super type.
      • loadClass

        public <T> java.lang.Class<? extends T> loadClass​(java.lang.String className,
                                                          java.lang.Class<T> superType)
                                                   throws java.lang.Exception
        Description copied from interface: EnvironmentBridge
        Loads the Class.
        Specified by:
        loadClass in interface EnvironmentBridge
        Type Parameters:
        T - Super type.
        Parameters:
        className - Name of Class.
        superType - Super type required of Class.
        Returns:
        Class.
        Throws:
        java.lang.Exception - If fails to load the Class.
      • getClassLoader

        public java.lang.ClassLoader getClassLoader()
                                             throws java.lang.Exception
        Description copied from interface: EnvironmentBridge
        Obtains the ClassLoader.
        Specified by:
        getClassLoader in interface EnvironmentBridge
        Returns:
        ClassLoader.
        Throws:
        java.lang.Exception - If fails to obtain ClassLoader.
      • isResourceOnClassPath

        public boolean isResourceOnClassPath​(java.lang.String resourcePath)
                                      throws java.lang.Exception
        Description copied from interface: EnvironmentBridge
        Indicates if the resource is on the Class path.
        Specified by:
        isResourceOnClassPath in interface EnvironmentBridge
        Parameters:
        resourcePath - Resource path.
        Returns:
        true if the resource is on the Class path.
        Throws:
        java.lang.Exception - If fails to determine if on Class path.
      • getPreference

        public java.lang.String getPreference​(java.lang.String preferenceId)
        Description copied from interface: EnvironmentBridge
        Obtains the preference.
        Specified by:
        getPreference in interface EnvironmentBridge
        Parameters:
        preferenceId - Preference identifier.
        Returns:
        Preference value or null if no configured.
      • setPreference

        public void setPreference​(java.lang.String preferenceId,
                                  java.lang.String value)
        Description copied from interface: EnvironmentBridge
        Specifies the preference value.
        Specified by:
        setPreference in interface EnvironmentBridge
        Parameters:
        preferenceId - Preference identifier.
        value - Value for the preference.
      • resetPreference

        public void resetPreference​(java.lang.String preferenceId)
        Description copied from interface: EnvironmentBridge
        Resets the preference to default value.
        Specified by:
        resetPreference in interface EnvironmentBridge
        Parameters:
        preferenceId - Preference identifier.