2

I have this neat set of resource filters in one of my Eclipse workspace projects, and I want to use them in another project. I tried copying the relevant XML snippets from one .project file to another - but that just makes the project fail to open and given an error message about invalid data. I don't know what's invalid... I tried both simple copy-paste and altering IDs of filters to make them different than the other project's.

What do I do?

einpoklum
  • 118,144
  • 57
  • 340
  • 684
  • My guess is you have a typo in the XML as I just tried copying the snippet between two `.project` files and it worked. (This is assuming you are talking about ` .. `) – Jonah Graham Nov 17 '15 at 18:48
  • It's difficult to have a typo when you do Ctrl+C and Ctrl+V but I'll try again from scratch (now my .profile file is busted somehow.) – einpoklum Nov 17 '15 at 18:54
  • I copied just the ` .. ` part of one .project file to another one. Perhaps you could post the .project file contents, it may be easy to spot the error that way. – Jonah Graham Nov 17 '15 at 19:22
  • There is currently no such possibility: https://stackoverflow.com/a/55418466/5626568 – ℛɑƒæĿᴿᴹᴿ Mar 29 '19 at 13:27
  • @ℛɑƒæĿ: Link suggests it is actually possible, just not via Eclipse itself. To the extent that we could generate IDs, this should not be very difficult... – einpoklum Mar 29 '19 at 13:54
  • @einpoklum I agree with you that it may be possible, but I consider it impractical. Creating a random ID and putting it in your project's .project is not a good practice because I've had problems trying to make settings like this and Eclipse corrupts the workspace metadata. But if you consider a possibility I respect your opinion but do it carefully. – ℛɑƒæĿᴿᴹᴿ Mar 29 '19 at 14:19
  • @ℛɑƒæĿ Why can't we generate IDs the same way Eclipse generates them, except in a small script to add resource filters to a project? – einpoklum Mar 29 '19 at 14:34
  • 1
    We don't know how eclipse generate theses IDs and if they use it in other modules. There are risks of eclipse generating duplicate IDs or use these IDs in other parts of the code. It's possible this is just an unecessary preocupation, but how I don't know what Eclipse do it in background I don't recommend assume this risk. – ℛɑƒæĿᴿᴹᴿ Mar 29 '19 at 17:32

0 Answers0