If I recall, part of the project is to "swap" the locations of the trail and the rails between the ocean gateway and Fort Allen Park. They're both on State owned land, which runs from India Street around the Eastern Prom to the bridge.
I believe that part of the reason the railroad agreed to the switch was that it would get new track installed on the area taken by the current trail when it was all said and done. The track from the Portland Company area out to Fort Allen (the parcels currently under development) has been in rough shape since I've been there in 2006, with most work limited to replacing ties to keep the gauge in good shape, but not really lifting it out of ground all that much.
Something similar happened when the Ocean Gateway project was being done 2005-2008. Originally the tracks paralleled Commercial & Thames Streets all the way to Franklin street, with the platform being between Franklin Street and India Street, and the runaround being between India Street and Hancock Street. To allow access for the heavy machinery to access the job site, the city/state made the railroad pull up all track back to Portland Company on the promise that it would be put back when it was done. That turned out to be that they took up everything from Franklin Street all the way back to Portland Company. The city took the opportunity to widen the Thames Street sidewalks, paved part of the row to create part of the Eastern Prom trail, and installed light poles that encroach on the right of way.
When it came time to put the tracks back, the developers re-laid tracks back to the driveway entrance that was built across from Hancock Street, and refused to go further because it would cost quite a bit to cut in a crossing since the street had already been paved in. The city also informed the railroad that under no circumstances would the tracks be allowed beyond India street since that part of the ROW (India to Franklin) was owned by the city and not part of the lease the railroad had with the state. The railroad decided that a $50k+ crossing, plus whatever it would take to regrade\reinstall all the removed track for maybe another 400 feet of right of way wasn't worth the expenditure. The loss in visibility obviously outweighed that savings, but the railroad was pretty broke at the time (MNG Polar Express was still a few years away, and even that wasn't a cash cow in the early years like it is today).
Over the last 5 years or so the the developers mandated that the yard area be whittled down until all that's left that's on the developer owned property was the engine house. Now even the engine house (what was left of it) has been torn down and the track pulled up from the looks of it. The siding between the mainline and the engine house is technically on the State ROW, so that could be put back in and used for storage, but the yard and engine house were always on private property. There's been efforts to build some sort of building or another siding to store equipment off the mainline but on state owned row, but for reasons I'm not privy to haven't come to fruition.