Search and replace with IDE script?

Can I do a global search and replace with an IDE script? My Mime Parser is as good as done. It has some extra checks that belong to my app and not in the code I want to sell. A couple of replaces get rid of this code. As developer I want to automate. I had a look at the documentation but didn’t find anything.

I think we discussed this in the past in the Forum and if i remember correct, it’s not possible. But maybe Arbed can do it?

Good idea, I’ll ask him if Arbed can do that.

Then separate them.

Idea 1:

  • create a Method performAdditionalChecks in your ParserClass (which doesn’t do anything)
  • use a SubClass ParserClassMyApp in your App, which implements your app specific checks

Idea 2:

  • use Events in your ParserClass
  • implement the Events only in your App

@Jürg Otter: my code is called with a simple

dim s as myClass(some options) dim e as string = s.geterror

So there is no chance for an event. Back to the drawing board.

externalize projects items
make 2 projects
one with the code, one without.
changes in the items will be saved to the other projects
only need to recompile the other project once in a while.

Why do you think so?
If you add and implement the “app specific” Event as a Method in your App:

dim s as New ParserClass2("test-options") AddHandler s.getErrorAppSpecific, AddressOf self.getErrorAppSpecific dim e as string = s.geterror RemoveHandler s.getErrorAppSpecific, AddressOf self.getErrorAppSpecific
See this example project, where I’ve quickly tried the two ideas.

  • ParserClass1: the one you would release to the public, ParserClass1ForMyApp: the Subclass you would use in your app
  • ParserClass2: the one you would release to the public using Events, implemented in your own app using AddHandler
    I still think the best approach is to separate the “public Class” (which can be used in other projects, be sold, whatever) and the “only-myapp-related things”. Maybe one of the two ideas works for your needs.