Bug 428866 - [patch] org.eclipse.core.resources.builders template does not work
Summary: [patch] org.eclipse.core.resources.builders template does not work
Status: RESOLVED FIXED
Alias: None
Product: PDE
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.3.1   Edit
Hardware: PC Mac OS X
: P3 normal (vote)
Target Milestone: 4.4 M7   Edit
Assignee: Szymon Ptaszkiewicz CLA
QA Contact:
URL:
Whiteboard:
Keywords: contributed
Depends on:
Blocks:
 
Reported: 2014-02-24 02:17 EST by Hendrik Renken CLA
Modified: 2014-03-27 17:56 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Hendrik Renken CLA 2014-02-24 02:17:43 EST
1. Start with a fresh eclipse installation and an empty workspace.
2. Create a plugin project (e.g. "MyProject")
3. Add a dependency to org.eclipse.core.resources plugin
4. Go to the "Extension" Tab, click "Add". Search in the list for "org.eclipse.core.resources.builders"
5. Select the available "Project Builder and Nature" Template
6. Leave everything as is and click finish
7. Through the LaunchConfiguration start a new eclipse with the new plugin
8. Create an empty project in the new workspace
9. Try to add the SampleNature - this does not work. The menu entry in the Configure submenu is not available.
Comment 1 Hendrik Renken CLA 2014-02-24 02:19:13 EST
I should add: Tested with Eclipse 4.3.1, 4.3.2Rc4a and 4.4.0 M5

The Menu-item does not show up in any of the eclipse installations.
Comment 2 Szymon Ptaszkiewicz CLA 2014-02-24 04:41:20 EST
Reproduced on I20140218-0800. I tested it also on 3.8.2 and it contains a different template without command. I'm not sure what is the correct behaviour here. Moving to UI for comment.
Comment 3 Paul Webster CLA 2014-02-24 11:41:56 EST
Szymon, that template should have been contributed by o.e.core.resources (although it might live in the PDE repo).  What does o.e.core.resources expect to do in that scenario?

PW
Comment 4 Paul Webster CLA 2014-02-24 11:47:22 EST
eclipse.pde.ui/ui/org.eclipse.pde.ui.templates/src/org/eclipse/pde/internal/ui/templates/ide/BuilderTemplate.java

The change was added for bug 395795

The Configure menu change might not work on all projects because it has an instanceof check in the visibleWhen instead of <adapt ...><test ...></adapt>

PW
Comment 5 Szymon Ptaszkiewicz CLA 2014-03-07 12:34:34 EST
The usual scenario is that it is nature that is added or removed via menu and builders associated with this nature are added or removed via IProjectNature#configure/deconfigure. The thing that got changed in bug 395795 is that now the label says about enabling/disabling builder but it actually adds/removes nature.

The hint with <adapt ...><test ...></adapt> fixes the problem. Thanks Paul!
Comment 6 Szymon Ptaszkiewicz CLA 2014-03-10 07:52:05 EDT
Fix in Gerrit: https://git.eclipse.org/r/#/c/23119/ Moving to PDE for review.
Comment 8 Curtis Windatt CLA 2014-03-27 17:56:45 EDT
Note that in a separate commit I updated the manifest version for the template bundle as it hadn't been modified for 4.4.