Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "PDT/Contributing"

< PDT
(PDT Team Project Set)
(17 intermediate revisions by 4 users not shown)
Line 1: Line 1:
 
[[Category:PDT]]
 
[[Category:PDT]]
 
== Quick guide ==
 
== Quick guide ==
Following is a two-step guide to get and build PDT:
+
Following is a two-step guide to get and build PDT source code:
  
 
1. Get PDT source code:
 
1. Get PDT source code:
  
   cvs -d :pserver:anonymous@dev.eclipse.org:/cvsroot/tools co org.eclipse.pdt
+
   git clone http://git.eclipse.org/gitroot/pdt/org.eclipse.pdt.git
 +
  # or if you're eclipse user and/or PDT committer: git clone ssh://committerid@git.eclipse.org:29418/pdt/org.eclipse.pdt.git
  
 
2. Build PDT using Maven:
 
2. Build PDT using Maven:
  
 
   cd org.eclipse.pdt/org.eclipse.pdt.releng
 
   cd org.eclipse.pdt/org.eclipse.pdt.releng
   mvn clean install
+
   mvn clean install                             // build and run all tests
 +
  mvn clean install -DskipTests                // build and ignore all tests
 +
  mvn clean install -DskipPdtPerformanceTests  // build and skip performance tests only (recommend)
 +
 
 +
3. Build PDT release:
 +
 
 +
  cd org.elcipse.pdt/org.eclipse.pdt.releng
 +
  mvn clean install -Prelease                  // this will produce normalized, signed and packed release, inside eclipse.org infrastructure
 +
  mvn clean install -Prelease -DskipSign        // this will produce normalized and packed release
  
 
== Working with PDT source code in Eclipse ==
 
== Working with PDT source code in Eclipse ==
  
# To comfortably edit PDT source code you will need Eclipse JDT and PDE. Ideally Eclipse Classic package from Eclipse downloads page is what you need.
+
# To comfortably edit PDT source code you will need Eclipse JDT and PDE. Ideally Eclipse Classic package from Eclipse downloads page is what you need. Great addition can be m2eclipse.
 
# Check out PDT plugins to Eclipse workspace. Select the XML text below and save it to file projectSet.psf
 
# Check out PDT plugins to Eclipse workspace. Select the XML text below and save it to file projectSet.psf
 
# In Eclipse, choose File->Import, select Team->Team Project Set and choose projectSet.psf file created in step 2. After finishing the import wizard, you should see all PDT source code in your workspace. Source code might not be compiling yet
 
# In Eclipse, choose File->Import, select Team->Team Project Set and choose projectSet.psf file created in step 2. After finishing the import wizard, you should see all PDT source code in your workspace. Source code might not be compiling yet
 
# Find file org.eclipse.php.core/Resources/parserTools/build.xml and launch it as Ant Build. This will generate PHP language parser classes.
 
# Find file org.eclipse.php.core/Resources/parserTools/build.xml and launch it as Ant Build. This will generate PHP language parser classes.
 
# Install missing dependencies:
 
# Install missing dependencies:
 +
## Dynamic Languages Toolkit - Core Frameworks
 +
## Dynamic Languages Toolkit - Core H2 Index Frameworks (uncheck "Group items by category" to see this one)
 +
## Eclipse Web Developer Tools
 +
## Eclipse XML Editors and Tools
 +
# In preferences (Window->Preferences->Plug-in Development->API Baselines), switch "Missing API baseline" to "Warning" or "Ignore".
 
# You can now run PDT in Eclipse self-hosting mode. Click on any of PDT projects and choose Run As->Eclipse Application
 
# You can now run PDT in Eclipse self-hosting mode. Click on any of PDT projects and choose Run As->Eclipse Application
# Three of the projects that you downloaded are PDT Unit tests: org.eclipse.php.core.performance.tests, org.eclipse.php.ui.tests and org.eclipse.php.core.tests. You can launch UnitTests by finding AllTests class in each of the projects (org.eclipse.php.core.tests.AllTests, org.eclipse.php.core.tests.performance.AllTests, org.eclipse.dltk.ui.tests.AllTests) and launch it as JUnit Plug-in test.
+
 
 +
== Preparing and sending patches ==
 +
 
 +
When you decide to send us your new amazing patch, please read this articles how to do it:
 +
 
 +
# [http://wiki.eclipse.org/Development_Resources/Contributing_via_Git#Eclipse_Foundation_Contributor_License_Agreement Make sure you are signed Eclipse Foundation Contributor License Agreement]
 +
# [http://wiki.eclipse.org/Gerrit#Using_Gerrit_with_the_git_command_line Configure Gerrit with git]
 +
# [http://wiki.eclipse.org/Development_Resources/Contributing_via_Git#via_Gerrit Prepare patch and send it to Gerrit]
 +
 
 +
== Sonar ==
 +
Sonar is used in order to track Code Quality:
 +
# Sonar dashboard: https://dev.eclipse.org/sonar/dashboard/index/91769#https://dev.eclipse.org/sonar/dashboard/index/91769
 +
# Reports are ganerated based on dedicated build: https://hudson.eclipse.org/pdt/job/pdt-sonar/#https://hudson.eclipse.org/pdt/job/pdt-sonar
  
 
== PDT Team Project Set ==
 
== PDT Team Project Set ==
 +
You can quickly set up your Eclipse workspace using the following [http://help.eclipse.org/kepler/index.jsp?topic=%2Forg.eclipse.platform.doc.user%2Ftasks%2Ftasks-cvs-project-set.htm Team Project Set]. Save the following text into a file named "pdt.psf"; use "File > Import > Team Project Set" to import that file.
  
 
   <?xml version="1.0" encoding="UTF-8"?>
 
   <?xml version="1.0" encoding="UTF-8"?>
 
   <psf version="2.0">
 
   <psf version="2.0">
   <provider id="org.eclipse.team.cvs.core.cvsnature">
+
   <provider id="org.eclipse.egit.core.GitProvider">
   <project reference="1.0,:pserver:dev.eclipse.org:/cvsroot/tools,org.eclipse.pdt/plugins/org.eclipse.php.core,org.eclipse.php.core"/>
+
   <project reference="1.0,http://git.eclipse.org/gitroot/pdt/org.eclipse.pdt.git,master,plugins/org.eclipse.php.core"/>
   <project reference="1.0,:pserver:dev.eclipse.org:/cvsroot/tools,org.eclipse.pdt/plugins/org.eclipse.php.core.parser,org.eclipse.php.core.parser"/>
+
   <project reference="1.0,http://git.eclipse.org/gitroot/pdt/org.eclipse.pdt.git,master,plugins/org.eclipse.php.core.parser"/>
   <project reference="1.0,:pserver:dev.eclipse.org:/cvsroot/tools,org.eclipse.pdt/tests/org.eclipse.php.core.performance.tests,org.eclipse.php.core.performance.tests"/>
+
   <project reference="1.0,http://git.eclipse.org/gitroot/pdt/org.eclipse.pdt.git,master,plugins/org.eclipse.php.debug.core"/>
   <project reference="1.0,:pserver:dev.eclipse.org:/cvsroot/tools,org.eclipse.pdt/tests/org.eclipse.php.core.tests,org.eclipse.php.core.tests"/>
+
   <project reference="1.0,http://git.eclipse.org/gitroot/pdt/org.eclipse.pdt.git,master,plugins/org.eclipse.php.debug.daemon"/>
   <project reference="1.0,:pserver:dev.eclipse.org:/cvsroot/tools,org.eclipse.pdt/plugins/org.eclipse.php.debug.core,org.eclipse.php.debug.core"/>
+
   <project reference="1.0,http://git.eclipse.org/gitroot/pdt/org.eclipse.pdt.git,master,plugins/org.eclipse.php.debug.ui"/>
   <project reference="1.0,:pserver:dev.eclipse.org:/cvsroot/tools,org.eclipse.pdt/plugins/org.eclipse.php.debug.daemon,org.eclipse.php.debug.daemon"/>
+
   <project reference="1.0,http://git.eclipse.org/gitroot/pdt/org.eclipse.pdt.git,master,plugins/org.eclipse.php.help"/>
   <project reference="1.0,:pserver:dev.eclipse.org:/cvsroot/tools,org.eclipse.pdt/plugins/org.eclipse.php.debug.ui,org.eclipse.php.debug.ui"/>
+
   <project reference="1.0,http://git.eclipse.org/gitroot/pdt/org.eclipse.pdt.git,master,plugins/org.eclipse.php.mylyn.ui"/>
   <project reference="1.0,:pserver:dev.eclipse.org:/cvsroot/tools,org.eclipse.pdt/plugins/org.eclipse.php.help,org.eclipse.php.help"/>
+
   <project reference="1.0,http://git.eclipse.org/gitroot/pdt/org.eclipse.pdt.git,master,plugins/org.eclipse.php.server.core"/>
   <project reference="1.0,:pserver:dev.eclipse.org:/cvsroot/tools,org.eclipse.pdt/plugins/org.eclipse.php.server.core,org.eclipse.php.server.core"/>
+
   <project reference="1.0,http://git.eclipse.org/gitroot/pdt/org.eclipse.pdt.git,master,plugins/org.eclipse.php.server.ui"/>
   <project reference="1.0,:pserver:dev.eclipse.org:/cvsroot/tools,org.eclipse.pdt/plugins/org.eclipse.php.server.ui,org.eclipse.php.server.ui"/>
+
   <project reference="1.0,http://git.eclipse.org/gitroot/pdt/org.eclipse.pdt.git,master,plugins/org.eclipse.php.ui"/>
   <project reference="1.0,:pserver:dev.eclipse.org:/cvsroot/tools,org.eclipse.pdt/plugins/org.eclipse.php.ui,org.eclipse.php.ui"/>
+
   <project reference="1.0,http://git.eclipse.org/gitroot/pdt/org.eclipse.pdt.git,master,plugins/org.eclipse.php.formatter.core"/>
   <project reference="1.0,:pserver:dev.eclipse.org:/cvsroot/tools,org.eclipse.pdt/tests/org.eclipse.php.ui.tests,org.eclipse.php.ui.tests"/>
+
   <project reference="1.0,http://git.eclipse.org/gitroot/pdt/org.eclipse.pdt.git,master,plugins/org.eclipse.php.formatter.ui"/>
 
   </provider>
 
   </provider>
 
   </psf>
 
   </psf>
 +
 +
== Developer Resources ==
 +
After setting up PDT source code please have a look at a set of docs we have for our developers on [[PDT#Developer_Resources]] page.

Revision as of 15:53, 6 July 2014

Quick guide

Following is a two-step guide to get and build PDT source code:

1. Get PDT source code:

 git clone http://git.eclipse.org/gitroot/pdt/org.eclipse.pdt.git
 # or if you're eclipse user and/or PDT committer: git clone ssh://committerid@git.eclipse.org:29418/pdt/org.eclipse.pdt.git 

2. Build PDT using Maven:

 cd org.eclipse.pdt/org.eclipse.pdt.releng
 mvn clean install                             // build and run all tests
 mvn clean install -DskipTests                 // build and ignore all tests
 mvn clean install -DskipPdtPerformanceTests   // build and skip performance tests only (recommend)

3. Build PDT release:

 cd org.elcipse.pdt/org.eclipse.pdt.releng
 mvn clean install -Prelease                   // this will produce normalized, signed and packed release, inside eclipse.org infrastructure
 mvn clean install -Prelease -DskipSign        // this will produce normalized and packed release

Working with PDT source code in Eclipse

  1. To comfortably edit PDT source code you will need Eclipse JDT and PDE. Ideally Eclipse Classic package from Eclipse downloads page is what you need. Great addition can be m2eclipse.
  2. Check out PDT plugins to Eclipse workspace. Select the XML text below and save it to file projectSet.psf
  3. In Eclipse, choose File->Import, select Team->Team Project Set and choose projectSet.psf file created in step 2. After finishing the import wizard, you should see all PDT source code in your workspace. Source code might not be compiling yet
  4. Find file org.eclipse.php.core/Resources/parserTools/build.xml and launch it as Ant Build. This will generate PHP language parser classes.
  5. Install missing dependencies:
    1. Dynamic Languages Toolkit - Core Frameworks
    2. Dynamic Languages Toolkit - Core H2 Index Frameworks (uncheck "Group items by category" to see this one)
    3. Eclipse Web Developer Tools
    4. Eclipse XML Editors and Tools
  6. In preferences (Window->Preferences->Plug-in Development->API Baselines), switch "Missing API baseline" to "Warning" or "Ignore".
  7. You can now run PDT in Eclipse self-hosting mode. Click on any of PDT projects and choose Run As->Eclipse Application

Preparing and sending patches

When you decide to send us your new amazing patch, please read this articles how to do it:

  1. Make sure you are signed Eclipse Foundation Contributor License Agreement
  2. Configure Gerrit with git
  3. Prepare patch and send it to Gerrit

Sonar

Sonar is used in order to track Code Quality:

  1. Sonar dashboard: https://dev.eclipse.org/sonar/dashboard/index/91769#https://dev.eclipse.org/sonar/dashboard/index/91769
  2. Reports are ganerated based on dedicated build: https://hudson.eclipse.org/pdt/job/pdt-sonar/#https://hudson.eclipse.org/pdt/job/pdt-sonar

PDT Team Project Set

You can quickly set up your Eclipse workspace using the following Team Project Set. Save the following text into a file named "pdt.psf"; use "File > Import > Team Project Set" to import that file.

 <?xml version="1.0" encoding="UTF-8"?>
 <psf version="2.0">
 <provider id="org.eclipse.egit.core.GitProvider">
 <project reference="1.0,http://git.eclipse.org/gitroot/pdt/org.eclipse.pdt.git,master,plugins/org.eclipse.php.core"/>
 <project reference="1.0,http://git.eclipse.org/gitroot/pdt/org.eclipse.pdt.git,master,plugins/org.eclipse.php.core.parser"/>
 <project reference="1.0,http://git.eclipse.org/gitroot/pdt/org.eclipse.pdt.git,master,plugins/org.eclipse.php.debug.core"/>
 <project reference="1.0,http://git.eclipse.org/gitroot/pdt/org.eclipse.pdt.git,master,plugins/org.eclipse.php.debug.daemon"/>
 <project reference="1.0,http://git.eclipse.org/gitroot/pdt/org.eclipse.pdt.git,master,plugins/org.eclipse.php.debug.ui"/>
 <project reference="1.0,http://git.eclipse.org/gitroot/pdt/org.eclipse.pdt.git,master,plugins/org.eclipse.php.help"/>
 <project reference="1.0,http://git.eclipse.org/gitroot/pdt/org.eclipse.pdt.git,master,plugins/org.eclipse.php.mylyn.ui"/>
 <project reference="1.0,http://git.eclipse.org/gitroot/pdt/org.eclipse.pdt.git,master,plugins/org.eclipse.php.server.core"/>
 <project reference="1.0,http://git.eclipse.org/gitroot/pdt/org.eclipse.pdt.git,master,plugins/org.eclipse.php.server.ui"/>
 <project reference="1.0,http://git.eclipse.org/gitroot/pdt/org.eclipse.pdt.git,master,plugins/org.eclipse.php.ui"/>
 <project reference="1.0,http://git.eclipse.org/gitroot/pdt/org.eclipse.pdt.git,master,plugins/org.eclipse.php.formatter.core"/>
 <project reference="1.0,http://git.eclipse.org/gitroot/pdt/org.eclipse.pdt.git,master,plugins/org.eclipse.php.formatter.ui"/>
 </provider>
 </psf>

Developer Resources

After setting up PDT source code please have a look at a set of docs we have for our developers on PDT#Developer_Resources page.

Back to the top