Author Topic: C.A.S.E plugin  (Read 6622 times)

SmileyMan

  • Guest
C.A.S.E plugin
« on: September 06, 2006, 04:47:47 am »
Hi there, big props to you Code::Blocks people - it's been my IDE of choice for six months now, and I've yet to find anything I didn't like!

I've been working on my own graphical modelling language, similar to UML, but:

a) much simpler
b) covering system design only
c) designed with C++ and its features in mind
d) designed to completely manage the code for a class-based library
e) designed to exist primarily in electronic form in a CASE tool
f) storable as XML

It's called CPPLM/ML (C++ Library Modelling/Markup Language) because I''m a fan of ugly names.

I've started putting my own CASE tool to use this using wxOGL to draw the interactive diagrams.  However, rather than having to run a separate tool to generate the code, and then have my C::B programs use it, it would be very cool if I could write it as a plugin to C::B.

The way I envisage it working in an ideal world would be:

1) Select File...New Project...New CPPLM/ML Project, and select a few basic parameters.
2) This would add a CPPLM/ML item to the workspace.  This wouldn't be the same as a normal C::B project, it would be handled completely by the plugin
3) Upon build instruction, the plugin would use the XML file to (re)generate the C++ code, and then compile as normal.

Now, browsing through the code, this doesn't look possible with the current interface, because the ProjectManager class is set up to deal specifically with cbProjects, which would mean that I would need to write something that derived from cbProject, which it doesn't seem designed to do.

The way forward might be to create a new IProjectItem interface class, and re-implement cbProject, ProjectManager and probably a whole bunch of other stuff in terms of it.  Then my plugin code could be implemented using the new interface, which would just contain the stuff that would be common to all similar types of item.  It'd make sense to create a new derivative of cbPlugin whilst I was at it too.

Can anyone confirm that I've got the above right, and that I can't do exactly what I want right now with C::B?  If so, I'll probably finish off my standalone CASE tool first before doing any work on changing C::B.  Also, are there any plans for any similar changes already afoot that I might be able to take advantage of in the future?

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: C.A.S.E plugin
« Reply #1 on: September 06, 2006, 08:47:23 am »
Quote
The way forward might be to create a new IProjectItem interface class, and re-implement cbProject, ProjectManager and probably a whole bunch of other stuff in terms of it.  Then my plugin code could be implemented using the new interface, which would just contain the stuff that would be common to all similar types of item.  It'd make sense to create a new derivative of cbPlugin whilst I was at it too.

Can anyone confirm that I've got the above right, and that I can't do exactly what I want right now with C::B?  If so, I'll probably finish off my standalone CASE tool first before doing any work on changing C::B.  Also, are there any plans for any similar changes already afoot that I might be able to take advantage of in the future?

Yes, you got it right. And yes, it will improve in the future. But we can't really make these changes now because we want to make a new release some time in the near future.
So, proceed writing your standalone tool and after C::B v1.0 is released, in the new development branch the interfaces will get a face-lift taking advantage of our gained experience on what is right/wrong/missing.
Be patient!
This bug will be fixed soon...

SmileyMan

  • Guest
Re: C.A.S.E plugin
« Reply #2 on: September 06, 2006, 10:25:02 am »
So, proceed writing your standalone tool and after C::B v1.0 is released, in the new development branch the interfaces will get a face-lift taking advantage of our gained experience on what is right/wrong/missing.
OK, that's cool.  For my part I shall be writing the UI in wxwidgets anyway, and I shall design the underlying structure with one eye on a future C::B integration.  I'll also add a CBP export facility for when people are happy with the design enough to fix it in place.

Having just re-read my post I realised that it might come across as a bit of a moan about the interface - sorry if you got this feeling.  It was more in the spirit of offering to help design and test the changes, which I'd be happy to get involved in.

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: C.A.S.E plugin
« Reply #3 on: September 06, 2006, 10:48:37 am »
Having just re-read my post I realised that it might come across as a bit of a moan about the interface - sorry if you got this feeling.  It was more in the spirit of offering to help design and test the changes, which I'd be happy to get involved in.

No, did not perceive it like that :).
As a matter of fact, it got us thinking because we 've hit this roadblock too before (regarding the projects tree) and we 're now discussing this...
Be patient!
This bug will be fixed soon...