Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6216105
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T07:10:28+00:00 2026-05-24T07:10:28+00:00

I am currently working on a little Eclipse plugin and I have to deal

  • 0

I am currently working on a little Eclipse plugin and I have to deal with the classic ‘plugin.xml’ stuff, such as the creation of a nature:

<extension
    id="aplugin.natures.MyNature.NATURE_ID.id"
    name="Sample Project Nature"
    point="org.eclipse.core.resources.natures">

Now in this particular example, I must, somewhere in my plugin code, give this ‘id’ as a String to some Eclipse function. So I need to create a specific class like:

package aplugin.natures;

public class MyNature implements IProjectNature {
    public static final String NATURE_ID = "aplugin.natures.MyNature.NATURE_ID.id"; //$NON-NLS-1$
}

And here comes my problem, I got some copy and paste of my ‘id’. I must admit that I am not very proud of it.

So my question is, does someone know a way to use the ‘NATURE_ID’ field in the ‘MyNature’ class directly in the ‘plugin.xml’ file ?.

In the end I wish to write something like:

<extension id="${aplugin.natures.MyNature.NATURE_ID}" ... >
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T07:10:29+00:00Added an answer on May 24, 2026 at 7:10 am

    That is not possible by design.

    The idea is that the Eclipse core can load the plugin.xml files for all resolved plug-ins/bundles without loading/activating the plug-ins. Resolving your construct above would normally require Eclipse to resolve all references for the class – MyNature in this case – which can easily lead to the activation of many other dependent plug-ins. Not good.

    So – by design – all data in plugin.xml must be self-contained. (With the possible exception of localized strings).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a question, I'm currently working on a little project of mine and
I'm currently working on a device with very little memory (4MB) and I have
I am currently working on a wordpress theme and I have a little problem
I am currently working on my own little project, but I have a little
I am currently working on a web application where I have encountered a little
A little backstory, currently I'm working on implementing a triangle rendering system in Expression2
I`m currently working on a script, and I have the following situation. function somnicefunction()
I am currently working on a little backup script from some firebird databases and
Hy guys! I am currently working on a little WPF project using MVVM via
I am currently working on my own little web crawler thingy and was wondering...

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.