Question about the new project manager

Roberto Raggi roberto at kdevelop.org
Tue Sep 14 10:09:04 UTC 2004


Hi,

On Monday 13 September 2004 17:53, Adam Treat wrote:
> On Monday 13 September 2004 4:18 am, Roberto Raggi wrote:
> Well, here is the problem with that...  The 'importers' are designed to
> parse the various Makefile.am and .pro files and set up the project
> structure for the project editor.  But in your last email you said they
well more or less.. the KDevProjectEditor extends the KDevProjectImporter.. so 
"set up the project structure for the project editor" is not true :)

file kdevprojectmanager/interfaces/kdevprojecteditor.{h,cpp}

class KDevProjectEditor: public KDevProjectImporter
{
    Q_OBJECT
...
    virtual KDevProjectEditor *editor() const        // ### (1)
    { return const_cast<KDevProjectEditor*>(this); }

    virtual ProjectFileDom addFile(ProjectFolderDom target, const QString 
&name) = 0
..
};

if you are able provide the read/write support for your build tool you have to 
implements KDevProjectEditor directly and provides all the methods in the 
interface KDevProjectEditor + KDevProjectImporter.. KDevProjectManager will 
ask if there is an `Project Editor' associated with the 'Importer' using the 
method KDevProjectImporter::editor() that returns a valid pointer only if 
you're extending the KDevProjectEditor.



> were to only be used in READ mode as the project editor will actually be
> writing the information back.  Now, this doesn't make sense to me because
> you'll have to code the project editor to write the various Makefile.am,
why? KDevProjectManager doesn't generate .pro or .am files!! is your 
KDevProjectEditor plugin that has to generate the `build file' every the 
KDevProjectManager invokes a method of the KDevProjectEditor interface.

> I would suggest either creating explicit 'exporters' for the various
> buildtools and putting them under
this is a very good idea.. we can import a project using Automake and export 
it using qmake ;) pretty cool

ciao robe




More information about the KDevelop-devel mailing list