If you already commited it to the TeamServer, you can check it out from there.
Otherwise this action can not be undone :(
If the other suggestion (not committing, and clicking 'revert' in the change dock) doesn't work, you could always try the 'reverse merge' option.
The 'reverse merge' is very similar to a revert action on other versioning systems.
A bit of background on the 'reverse merge', Mendix can't do a 'revert' because of all the consistency checking and automatic activities that we have implemented. Imaging renaming an entity, this automatically renames the entity everywhere in your application. If you do a pure revert in the domain model (the same as it works on other repos), the entity will be reverted back to it's original name. However since you only reverted the domain model all your pages and microflows now point to the entity name that isn't there anymore.
Well this behavior sucks, so our R&D team decided to implement the reverse merge feature, this feature reverses the changes you made. If in the original commit you renamed your 'Customer' entity to 'Client' and you do a reverse merge the modeler will reverse that change by renaming the 'Client' entity to 'Customer' and automatically performing all other actions you would normally expect with a rename. (this reverse merge works for all CRUD actions in your model)
Knowing what the reverse merge does, you could choose that option. If you mess up this process, don't commit an just delete the whole project folder from your computer and check it out again. The reverse merge happens on your local machine first, so if you don't commit you can't break things, just be prepared to remove your app from your computer and download it again from the teamserver.
When you have the project open, go to menu item 'Project' / 'More versioning options' / 'Reverse merge changes'. In the popup you select the revision, these numbers are inclusive so it will include (reverse) the revisions you've selected and everything in between. In your case only select the commit that you want to reverse, e.g. if in the history you see that commit 123 is the commit in which you've deleted the module, select start: 123, and end: 123
If you click 'OK' the modeler will evaluate the changes and do the reverse of what you did in the commit. In other words, in your commit you've deleted the module with all it's content. The reverse is to create that module and all it's content.
Once the modeler says it's done, open the changes dock and read through the entire list to confirm that you really want to 'reverse' everything. If you see something here that you don't want, right click on the change and click 'revert change'. This brings that document back to the same state as it was before you started this.
The only caveat is that this process is only seamless if you follow what we teach in the versioning topic of the training.
Use descriptive messages when committing: Otherwise you can't find the commit that you want to revert
Commit frequently and commit small increments: If you commit a full day of work, and you only want to delete 1 small piece of 8 hours of modelling, it's going to be a very tedious process to sift through all the changes.
Just to stated one more hopefully obvious thing, if there was data in these entities that are now back. That data will not be recovered through this process. This will only bring back the entities, pages, and logic, but not the application data. But if you've never deployed to your server, or if you can still restore a backup the data will be fine.
If you haven't commited to the teamserver you can check the
'changes dock' and revert the change with the righ mouse button in order to revert the deletion.
Create a new branchline from the Mainline's latest revision before the revision in which you removed the module. Open the new branchline in your modeler, export the module to disk and import the module from disk into your Mainline.