Yep, you take Materials and Data with you, as they don't consume cargo space. With Commodities in your hold you can only switch to another ship if it has enough capacity.
Thanks guys, wasn't sure about this. Thought I might have to take my Adder to the engineer instead of the ship I wanted to upgrade. You've settled my concern, and ignorance, thanks again for taking the time to help!