Bug 234376

Summary: New Plug-in project with property page template uses deprecated elements
Product: [Eclipse Project] PDE Reporter: Curtis Windatt <curtis.windatt.public>
Component: UIAssignee: Chris Aniszczyk <caniszczyk>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: caniszczyk, contact, lesojones, remy.suen
Version: 3.4Keywords: bugday
Target Milestone: 3.5 M4   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
patch
caniszczyk: iplog+
mylyn/context/zip none

Description Curtis Windatt CLA 2008-05-28 10:39:12 EDT
From bug 234351.

Using the new plug-in project wizard, generate a new project using the 'with property page' template.

The plugin.xml will contain something similar to the following

<extension
         point="org.eclipse.ui.propertyPages">
      <page
            objectClass="org.eclipse.core.resources.IFile"
            name="Sample Page"
            nameFilter="*.*"
            class="test3.properties.SamplePropertyPage"
            id="test3.properties.samplePropertyPage">
      </page>
   </extension>

The objectClass element is deprecated.  We shouldn't have a template that uses deprecated code as an example for new users.
Comment 1 Curtis Windatt CLA 2008-05-28 10:40:31 EDT
Marking as bug day as it should be a simple fix.  Also marking as 3.4 RC3, as this would be a good polish item for 3.4.
Comment 2 Chris Aniszczyk CLA 2008-05-28 11:16:48 EDT
Not a stop ship issue. We will look at 3.5

This is a bit tricky because this was deprecated in 3.3... so we need special logic in our template to accommodate this.

The fix would be to do something like this instead of objectClass...

<enabledWhen>
            <instanceof
                  value="org.eclipse.core.resources.IFile">
            </instanceof>
         </enabledWhen>
Comment 3 Chris Aniszczyk CLA 2008-11-03 16:44:43 EST
Right up your alley Benjamin ;)?
Comment 4 Benjamin Cabé CLA 2008-11-03 16:49:24 EST
okidokie ;)
Comment 5 Benjamin Cabé CLA 2008-11-03 17:03:08 EST
Created attachment 116874 [details]
patch
Comment 6 Chris Aniszczyk CLA 2008-11-04 16:17:21 EST
Thanks Benjamin, you rock!
Comment 7 Chris Aniszczyk CLA 2008-11-04 16:17:25 EST
Created attachment 117009 [details]
mylyn/context/zip