Past Perfect Continuous
From TEFL World Wiki
Usage
We use the past perfect continuous to talk about a continuous temporary event which started happening in the past before another past event.
I had been learning English for six years before I went to England.
They had both been living in Paris for some time when they met.
Formation
We make the past perfect continuous by using the past perfect of the verb be + the present participle (-ing form) of the main verb.
{subject} + {had been} + {present participle}
I had been working for some time before I realized my mistake.
Before I arrived, she had been doing her homework.
