EU plans legislation for economic diversification