Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

Eclipse Plug-in Developer Guide
Previous Page Home Next Page

Contributing a property page

You can contribute a property page for an object by using the org.eclipse.ui.propertyPages extension point. An object's property page is invoked using the Properties menu in any view that shows objects, such as the resource navigator view.  This menu is available when a single object is selected. 

The readme tool contributes two property pages.

<extension
     point = "org.eclipse.ui.propertyPages">
        <page
           id="org.eclipse.ui.examples.readmetool.FilePage"
           name="%PropertiesPage.filePage"
	   objectClass="org.eclipse.core.resources.IFile"
	   class="org.eclipse.ui.examples.readmetool.ReadmeFilePropertyPage"
           nameFilter="*.readme">
        </page>
         <page
            id="org.eclipse.ui.examples.readmetool.FilePage2"
            name="%PropertiesPage.filePage2"
 	   objectClass="org.eclipse.core.resources.IFile"
 	   class="org.eclipse.ui.examples.readmetool.ReadmeFilePropertyPage2"
            nameFilter="*.readme">
         </page>
  </extension>

When you define a property page, you specify the objectClass for which this page is valid.  Objects of this class will include your page when the properties are shown.  You may optionally supply a nameFilter that further refines the class.  In the readme tool example, both pages are contributed for objects of type IFile with a .readme file extension.

Property pages are not limited to workbench resources.  All objects showing up in the workbench (even domain-specific objects created by other plug-ins) may have property pages.  Any plug-in may register property pages for any object type.

Property pages look a lot like preference pages, except there is no hierarchy or categorization of property pages. In the dialog below, both readme property pages appear in the main list of pages.

Properties dialog with readme entries


 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire