Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[Dltk-dev] Customising project creation

Hi,

I want to create a script project with a fixed set of source
directories and other folders. DLTK 2.0 uses the ProjectCreator for
this.

Is it the right approach to overwrite this ProjectCreator? In this
case, for the initBuildpath() the default implementation only allows
to have either:
1. one single source directory specified in the
PreferenceConstants.SRC_SRCNAME. I want to have multiple src folder
(let's say 3)
2. the project as source directory
3. a buildpath detector. This I don't know exactly how to use because
I don't know if
fCurrProject.getFile(IScriptProjectFilenames.BUILDPATH_FILENAME).exists().
(In my particular scenario I USE but I DON"T show the wizard's 2nd
page because I don't let users modify the default project structure
and make the wizard simpler).

Is this the way you expect (to have people write their own
ProjectCreator) or are there other ways (new creation steps, other
functionality I don't see, etc.)?

So I tried to make my own ProjectCreator and overwrite
initBuildpath(). Unfortunately the
ProjectWizardUtils.getDefaultBuildpathEntry(fLocation) method is not
visible outside the dltk package where it is defined. So I cannot add
the default/selected interpreter. Is there a nicer way to do this
other than:
- copy the functionality or
- call the super.initBuildPath() and extract it from there and discard
the other entries
?

I also want to create some other folders in a project and it doesn't
seem natural to hack it in the same initBuildPath method of my
ProjectCreator. Is there another better place to build this (add a new
step, etc.)?


Thanks!


-- 
MSc Gabriel Petrovay
Mobile: +41(0)787978034
www.28msec.com


Back to the top