code: public static Import buildTailoredImport(
  			Instance instanceThatUseTheImport,
  			String exportingInstancePath,
  			String exportingInstanceComponent,
  			Map<String,String> exportedVariables ) {
  
  		Import imp = new Import( exportingInstancePath, exportingInstanceComponent );
  		if( exportedVariables != null && ! exportedVariables.isEmpty()) {
  
  			Component comp = instanceThatUseTheImport.getComponent();
  			for( ImportedVariable var : ComponentHelpers.findAllImportedVariables( comp ).values()) {
  				String importedVariable = var.getName();
  
  				// Deal with imports
  				if( var.getName().endsWith( "." + Constants.WILDCARD )) {
  					String prefix = VariableHelpers.parseVariableName( importedVariable ).getKey();
  					for( Map.Entry<String,String> entry : exportedVariables.entrySet()) {
  						String exportedVariable = entry.getKey();
  						if( Utils.isEmptyOrWhitespaces( exportedVariable ))
  							continue;
  
  						String exportedVarPrefix = VariableHelpers.parseVariableName( exportedVariable ).getKey();
  						if( prefix.equals( exportedVarPrefix ))
  							imp.getExportedVars().put( entry.getKey(), entry.getValue());
  					}
  				}
  
  				// Deal with the usual (and most simple!) case
  				else if( exportedVariables.containsKey( importedVariable ))
  					imp.getExportedVars().put( importedVariable, exportedVariables.get( importedVariable ));
  			}
  		}
  
  		return imp;
  	}
docs: Builds an import where only the right variables are contained.
  <p>
  As an example, if a component imports Toto.var1 and Toto.var2, and that
  Toto exports var1, var2 and var3, then the component only needs to see
  var1 and var2 in its imports. No need to keep var3.
  </p>
  <p>
  This method also deals with wild card imports.
  </p>
  
  @param instanceThatUseTheImport the instance that will use the import
  @param exportingInstancePath the path of the instance that exports variables
  @param exportingInstanceComponent the component name of the instance that exports variables
  @param exportedVariables the variables to add in the imports
  @return a non-null import