0

I have a custom project nature and created a new project that has this new custom nature. What I am trying to do now, is extend the properties of that project, so when it is selected e.g. in package explorer view, not only the standard project properties are shown in the (standard) property-view but also customized ones (like the nature of the selected project - but only for a project that has my custom nature)

Is this possible with standard eclipse extension points? I have doubts since I don't have my own class where I could register a property-descriptor, just a new nature.

ROMANIA_engineer
  • 54,432
  • 29
  • 203
  • 199
angrybobcat
  • 268
  • 1
  • 10
  • If you want to extend the _Eclipse Property View_, see [this article](https://www.eclipse.org/articles/Article-Properties-View/properties-view.html) and [this article](https://eclipse.org/articles/Article-Tabbed-Properties/tabbed_properties_view.html) for the _Tabbed Properties View_. – Rüdiger Herrmann Apr 20 '15 at 17:14
  • Thank you - I have already known both links you provided but both are about providing properties for new instances of classes which are under my control. In my case here I dont have a new class, since the instance of IProject is managed by eclipse itself. – angrybobcat Apr 20 '15 at 17:18
  • I don't know of a way to do this. – greg-449 Apr 21 '15 at 07:08

1 Answers1

0

You should be able to define a project properties page without a project class, as I've done in the Haskell plugin:

 <page
        name="%projectFlagsPP_name"
        class="net.sf.eclipsefp.haskell.ui.properties.UserFlagsPP"
        id="net.sf.eclipsefp.haskell.ui.properties.UserFlagsPP">
     <filter
           name="nature"
           value="net.sf.eclipsefp.haskell.core.project.HaskellNature">
     </filter>
     <filter
           name="open"
           value="true">
     </filter>
     <enabledWhen>
        <adapt type="org.eclipse.core.resources.IProject" />
     </enabledWhen>
  </page>

And then the java code starts like:

public class UserFlagsPP extends PropertyPage implements
IWorkbenchPreferencePage {

This says that the property page will appear for a IProject that has the Haskell Nature...

JP Moresmau
  • 7,388
  • 17
  • 31
  • Thank you, but I think I did not explain myself precisely enough: I am not trying to add a new property page for my project (which is the one found under "preferences" i guess?) Instead I want to show a new line in the property view - the one which is used to display information about the current selection (that can also be a piece of code, a particular file, a class, and so on...) – angrybobcat Apr 20 '15 at 16:48
  • Ah yes, right clicking on a project and choosing properties is not the same as seeing the properties view when a project is selected. Sorry. – JP Moresmau Apr 20 '15 at 17:41