Fix various issues about runShadow and polish ShadowApplicationPlugin
#1956
+107
−84
runShadow and polish ShadowApplicationPlugin
#1956