Developer forums (C::B DEVELOPMENT STRICTLY!) > Plugins development

Edit project as regular text file in editor plug-in

(1/3) > >>

killerbot:
Dear all,

I have developed a plug-in which allows you to open the project file in an editor pane, so you can view (and edit) it as the xml file it actually is.

The plug-in now foresees in 2 choices :
   - edit the project file
   - reload the project file (closing and opening it : mgiht ask to save in between if after modification it has not been saved yet)

The functionality can be accessed through :
  - the project menu (2 new entries : open project for edit , reload project)
  - right clicking on the project name in the project manager pane (2 new entries : open project for edit , reload project)

Install it by copying the ddl in the attached zip file into the CB plug-ins directory. The zip file also contains the cbp project and the sources. It has been developed and tested on Windows XP, so you might need to change the cbp to your setup accordingly.

Enjoy it,
kind regards,
Lieven

PS : I do have some requests for the core developers, here's my story.

When a file has been modified outside Code::Blocks, CB offers to reload it. This works for source files open in a editor pane, but this is not the case for the project file itself.

This plug-in I developed allows you to open the project file in an editor pane, so you can view (and edit) it as the xml file it actually is. After you edit the xml file, CB has no idea that the project file has to changed. It would be nice that CB also check this, so it can be automatically reloaded.

The plug-in now foresees in 2 choices :
   - edit the project file
   - reload the project file (closing and opening it : might ask to save in between if after modification it has not been saved yet)


So I have some questions :
   - Can the core CB developers adjust the code base so CB also checks for external modifications of the project file and offer to reload it as with source files ?
   - if the answer is no, could they pinpoint me the code that does the reloading of the source files, so I could change/adopt it myself  (I prefer a yes on the first quesion ;-) )?



[attachment deleted by admin]

thomas:
*shudders*

rickg22:
Thomas: What was that *shudder* for?

thomas:
For editing config files by hand while the program is running. Things like that make me shudder.  :P

rickg22:
Oh, I see. Anywyay, what do you think of editing the checkforexternallymodifiedfiles function?

I find that a valid point, since sometimes i update from CVS but the project isn't reloaded.

Navigation

[0] Message Index

[#] Next page

Go to full version