1. Ludek Nesnidal
  2. PowerBuilder
  3. Monday, 24 June 2024 20:57 PM UTC

Any advise on searching a text with wildcard characters in all libraries? Similarly replacing same text with new string in all libraries? 

Ludek Nesnidal Accepted Answer Pending Moderation
  1. Wednesday, 26 June 2024 16:36 PM UTC
  2. PowerBuilder
  3. # 1

This is what I am missing in PowerBuilder IDE ... Screenshot from NetBeans

Comment
There are no comments made yet.
David Peace (Powersoft) Accepted Answer Pending Moderation
  1. Wednesday, 26 June 2024 16:06 PM UTC
  2. PowerBuilder
  3. # 2

Hi Ludek

We have, over the years, developd a script based find and replace for this purpose developed in PowerBuilder. Basically it reads all the exported source (in our case it gets it from source control). We code a PB function to find and replace what we want and then if the function changes the code it checks the changes back into source control and a get latest will bring those changes in.

The beauty of coding in PowerScript is that you can have as much complex logic as you like for the find and replace. The engine ot read the files and process them is easily developed too.

You could use Chris' suggestion and then write a quick PB program to do what you want.

Food for thought.

 

David

Comment
  1. Ludek Nesnidal
  2. Wednesday, 26 June 2024 16:32 PM UTC
Unfortunately PB UI does not provide good search/replace functionality out of box like other good IDE (like more mature - Netbeans, InteliJ etc...). So as workaround I will use solution from Chris in combination with Notepad++ (which in my opinion has the best text search/replace implementation). THX
  1. Helpful
  1. David Peace (Powersoft)
  2. Wednesday, 26 June 2024 16:36 PM UTC
Yes, that'll work. :0)
  1. Helpful
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Monday, 24 June 2024 21:13 PM UTC
  2. PowerBuilder
  3. # 3

Hi Ludek;

  FWIW: what I do is use PB's native Source Code Control feature. Once the native SCC is active & you check out all your objects, their source code will now be exported into the native SCC's target folder. Then you can use any 3rd party product to make global fille changes. Once the required changes are done to all the files, then perform a Get latest. That should bring all the objects updated source code back into their respective PBL's.

  Of course, a full backup before doing this would be most prudent. HTH 

Regards ... Chris 

Comment
  1. Chris Pollach @Appeon
  2. Monday, 24 June 2024 23:02 PM UTC
In PB 2025's new "Solution" that can replace the current "WorkSpace" & PBL's, the Solution will then make all object classes external files.
  1. Helpful
  1. Arnd Schmidt
  2. Thursday, 27 June 2024 21:40 PM UTC
@Chris: So the answer is NO?
  1. Helpful
  1. Chris Pollach @Appeon
  2. Friday, 28 June 2024 15:20 PM UTC
AFAIK NO in the next release .. as the object source as external files will allow the PB developer to edit them with the best tools they have.

For the future though, a refactoring feature in the IDE could certainly be done but that will be up to the product / engineering teams to decide.
  1. Helpful
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.