API guide

Variable Provider API

With EGradle 2.0 the editor can be installed without EGradle IDE, so users can decide to use it together with alternative IDEs.

To provide hyper linking with variables the editor uses a provider interface which can be implemented by IDE to support variable content.

	
    public interface de.jcup.egradle.eclipse.api.VariableProvider {
	
        Map<String, String> getVariables(IEditorInput editorInput);
		
    }
	
The provider can be added by extension point de.jcup.egradle.eclipse.extension.variableprovider. Here an example:
	
    <!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
    <!--                          VARIABLE PROVIDER                           -->
    <!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
    <extension point id="de.jcup.egradle.eclipse.extension.variableprovider" >
	
        <provider class="de.jcup.egradle.eclipse.ide.EGradleIdeVariableProvider"/>
     
    </extension>
	
	

EGradle supports e.g. "rootproject.projectDir".

Top