Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7529931
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T04:46:20+00:00 2026-05-30T04:46:20+00:00

My ultimate goal is to create an eclipse plugin that sets up a PDT

  • 0

My ultimate goal is to create an eclipse plugin that sets up a PDT project, but with some added builders (and custom build scripts) as well as a specific folder layout (and different folders should be treated as source and some as regular folders).

I’ve looked at / followed eclipse plugin development tutorials, and ok. I get the gist of creating a wizard that creates a file, but I’m having trouble trying to figure out how to create a project, and more importantly, make that project associated with the PDT (PHP Development Tools) feature.

Answer:

I did stumble upon a solution myself before the answer was given, but it’s quite similar.

First, WizardNewProjectCreationPage was used as the first page of my wizard.

Second, on performFinish() I ran the following code:

        IProgressMonitor    m           = new NullProgressMonitor();
        IWorkspaceRoot      root        = ResourcesPlugin.getWorkspace().getRoot();
        IProject            project     = root.getProject(_pageOne.getProjectName());

        if (!project.exists())
        {
            IProjectDescription desc = project.getWorkspace().newProjectDescription(project.getName());
            URI projectLocation = _pageOne.getLocationURI();
            // desc.setLocationURI(projectLocation);

            String[]            natures     = desc.getNatureIds();
            String[]            newNatures  = new String[natures.length + 1];

            System.arraycopy(natures, 0, newNatures, 0, natures.length);
            newNatures[natures.length] = PHPNature.ID;

            desc.setNatureIds(newNatures);
            project.create(desc, m);
            project.open(m);
        }
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T04:46:21+00:00Added an answer on May 30, 2026 at 4:46 am

    how to create a project

    Take a look at BasicNewProjectResourceWizard.createNewProject() method.

    make that project associated with the PDT (PHP Development Tools) feature

    You need to add “org.eclipse.php.core.PHPNature” to the project (that’s what Add PHP Support… action does). Use IProjectDescription.setNatureIds().

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

The ultimate goal of this project is to send low level input (so that
My ultimate goal is to have a menu that adds a class to the
I'm working on a project where there is data visualization. My ultimate goal is
The ultimate goal is to specify contracts for a class that resides in an
My ultimate goal is to build a web crawler capable of downloading all of
My ultimate goal is to do some programming for the Angstrom Linux (or Debian
My ultimate goal is to create a pivot-table view in MySQL with dynamic columns
My ultimate goal is to load controls as plugins, for use as DocumentContent in
My ultimate goal is to allow users to select a file from a dialog
Here is my ultimate goal... to take this xml file.. <?xml version=1.0?> <Songs> <Song>

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.