There are mainly two situations when you need to use the Refresh function.
- The first time you do the Connect to Workspace to set up your local workspace.
- After you directly modified the source code outside of the PowerBuilder IDE.
The reason behind this is that PowerBuilder IDE doesn't load the code directly from the source code files. It only displays the code saved in the PBLs. Ideally, PowerBuilder should be managing all the synchronization automatically. The reality is that PowerBuilder only pulls the source code in to PBLs when you do a Git Pull. On the other hand, it only exports an object to the source code folder when you save it in the IDE. Synchronization of anything changes happened in other manners have to be taken care of manually.
So, as PBLs are only uploaded once during Add to Source Control. The later code changes are not reflected in the PBLs on the server. So the first time you download the code from the server, you need to do a manual Refresh.
Regards,
Tom Jiang
all these point that you mention are clear. So if you like to use branches in Git you also have to use the Refresh inside the Powerbuilder IDE because switching branches is not supported yet. But when knows Powerbuilder which source code file must be synchronized back into the pbl file? If I do Refresh again and again and again it seems that Powerbuilder import the same files again and again and again.
Refresh will scan the ws_objects folder and import new objects or update modified objects to PBLs. Some files may be imported again and again because the exported source code may differ from the code in PBLs due to formatting or line breaks, etc. So you can just ignore it and only need to do the Refresh once.
Regards,
Tom Jiang