Author Topic: change the file name plugins\codecompletion\nativeparser.cpp to parsemanager.cpp  (Read 5197 times)

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 6025
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Hi, I think the file name and class name is not correct, and I want to change the file name from "nativeparser.cpp" to "parsemanager.cpp", in-fact, I have already comments in the header file:

Code
/** @brief NativeParser class is just like a manager class to control Parser objects.
 *
 * Normally, Each C::B Project (cbp) will have an associated Parser object.
 * In another mode, all C::B projects belong to a C::B workspace share a single Parser object.
 * Nativeparser will manage all the Parser objects.
 */
class NativeParser : public wxEvtHandler, NativeParserBase
{

I see the clangd_client already has the file name changes.

I think I can handle the cbp file changes, the class name changes, but I'm not sure how to change the auto-tools build system. Any dev can help with this? Maybe, I just need to commit the changes, and you can help to change the other build system files? Thanks.
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 6025
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
OK, patch file created, see attachment.

I have patches for all the cbp files.

Any objections?
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7670
    • My Best Post
You likely need to edit "src\codeblocks\src\plugins\codecompletion\Makefile.am"
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline blauzahn

  • Almost regular
  • **
  • Posts: 179
@ollydbg: I always find names like *manager rather nondescriptive, like *object, *system, *thing.

As usual: Naming is hard.

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 6025
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
You likely need to edit "src\codeblocks\src\plugins\codecompletion\Makefile.am"

Thanks Tim.

I will modify this file and push all the commits with "- CC:" log message prefix.

If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 6025
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
@ollydbg: I always find names like *manager rather nondescriptive, like *object, *system, *thing.

As usual: Naming is hard.

Yes.  Naming is hard.

Thanks for the suggestion.  Currently the parse manager class try to add a new parse or delete a finished parse.  So the new name should be better than the old name "native parser".

If we find a better name we can change it later.
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.