Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » How General Are Natures ?
How General Are Natures ? [message #306443] Fri, 28 July 2006 17:04 Go to next message
Eclipse UserFriend
I am developing a plugin that depends on a small amount of persistent
data. I could persist it as a project resource, or as project metadata.
Initially I've chosen the metadata approach and implemented the data as
the X property on a project properties extension page.

A problem with this approach is that the X property appears on every
project, which is redundant. Most projects have no need for the X data.

Can I create and use an 'X' nature to limit presentation of the X
project property to projects that have the X nature?

The docs specify how to customize builds according to natures, but I
suspect/hope that natures are more general than that,

Bill
Re: How General Are Natures ? [message #306471 is a reply to message #306443] Mon, 31 July 2006 08:23 Go to previous messageGo to next message
Eclipse UserFriend
Bill Winspur wrote:
> I am developing a plugin that depends on a small amount of persistent
> data. I could persist it as a project resource, or as project metadata.
> Initially I've chosen the metadata approach and implemented the data as
> the X property on a project properties extension page.
>
> A problem with this approach is that the X property appears on every
> project, which is redundant. Most projects have no need for the X data.
>
> Can I create and use an 'X' nature to limit presentation of the X
> project property to projects that have the X nature?

yes, when you create your property page add a filter, like <filter
name="nature" value="org.eclipse.jdt.core.javanature"/>

Check out the extension point description, the IActionFilter interface,
and examples in the org.eclipse.jdt.ui plugin.

Later,
PW
Re: How General Are Natures ? [message #306807 is a reply to message #306471] Sat, 05 August 2006 15:45 Go to previous messageGo to next message
Eclipse UserFriend
Paul Webster wrote:
> Bill Winspur wrote:
>
>> I am developing a plugin that depends on a small amount of persistent
>> data. I could persist it as a project resource, or as project
>> metadata. Initially I've chosen the metadata approach and implemented
>> the data as the X property on a project properties extension page.
>>
>> A problem with this approach is that the X property appears on every
>> project, which is redundant. Most projects have no need for the X data.
>>
>> Can I create and use an 'X' nature to limit presentation of the X
>> project property to projects that have the X nature?
>
>
> yes, when you create your property page add a filter, like <filter
> name="nature" value="org.eclipse.jdt.core.javanature"/>
>
> Check out the extension point description, the IActionFilter interface,
> and examples in the org.eclipse.jdt.ui plugin.
>
> Later,
> PW
Paul, thanks - exactly the guidance I needed, Bill.
Re: How General Are Natures ? [message #307197 is a reply to message #306471] Tue, 15 August 2006 14:01 Go to previous message
Eclipse UserFriend
Originally posted by: john.eclipsefaq.org

This will work, but if your only requirement is filtering of the
property view, then a nature seems like a bit of overkill. You can get
the same effect by adding a persistent property
(IResource.setPersistentProperty), and then use the
IResourceActionFilter.PERSISTENT_PROPERTY filter name.
--

Paul Webster wrote:
> Bill Winspur wrote:
>
>> I am developing a plugin that depends on a small amount of persistent
>> data. I could persist it as a project resource, or as project
>> metadata. Initially I've chosen the metadata approach and implemented
>> the data as the X property on a project properties extension page.
>>
>> A problem with this approach is that the X property appears on every
>> project, which is redundant. Most projects have no need for the X data.
>>
>> Can I create and use an 'X' nature to limit presentation of the X
>> project property to projects that have the X nature?
>
>
> yes, when you create your property page add a filter, like <filter
> name="nature" value="org.eclipse.jdt.core.javanature"/>
>
> Check out the extension point description, the IActionFilter interface,
> and examples in the org.eclipse.jdt.ui plugin.
>
> Later,
> PW
Previous Topic:Linked Resource Problem
Next Topic:Launching framework
Goto Forum:
  


Current Time: Thu May 08 11:01:33 EDT 2025

Powered by FUDForum. Page generated in 0.03408 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top