[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [pdt-dev] Initialize buildpath and project structure in new project wizard

Hi Krzysztof,

at which point in your wizard is this code executed?



On Mon, Sep 19, 2011 at 9:52 AM, Krzysztof Maziarz <krzysztof.maziarz@xxxxxxxxxxxxxxxxxxxxxxx> wrote:
Hi Robert,

For me the following piece of code works fine:

IScriptProject scriptProject = DLTKCore.create(project.getProject());
if (scriptProject != null) {
       List<IBuildpathEntry> entries = new LinkedList<IBuildpathEntry>();

       IPath yiiFrameworkPath = new

       IBuildpathEntry entry = DLTKCore.newBuiltinEntry(yiiFrameworkPath, new
IAccessRule[0], new IBuildpathAttribute[0], new IPath[0], new IPath[0],
                       false, true);

       try {
               BuildPathUtils.addEntriesToBuildPath(scriptProject, entries);
       } catch (ModelException e) {
               YiiBundle.logError(e.getMessage(), e);

Best regards,

On Mon, 2011-09-19 at 09:21 +0200, Robert Gruendler wrote:
> Hi,
> i'm extending the PDT Project Wizard to initialize new Projects with the structure for the Symfony framework
> Basically i'm doing the following:
> 1. Iterate the skeleton project and create the project folders/files recursively.
> 2. Create a IBuildpathEntry for the source folders
> 3. Call init() passing the script project and the buildpathentries.
> The code of the wizard page can be found here:
> https://github.com/pulse00/Symfony-2-Eclipse-Plugin/blob/master/com.dubture.symfony.ui/src/com/dubture/symfony/ui/wizards/project/SymfonyProjectWizardThirdPage.java#L53
> The problem is that the Buildpathentries show up in the UI of the wizard and also the project structure is initialized correctly,
> but the .buildpath file does not contain the correct entries. It's the same like the default one from the PDT project wizard.
> Has anyone an idea what i'm missing here? Or is there a better way to achieve the initialization of a project?
> regards
> -robert
> _______________________________________________
> pdt-dev mailing list
> pdt-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/pdt-dev

pdt-dev mailing list