Add project setting support.
Fix a bug about closing tab.