How can I get the IFolder of the plugin that is currently running (my
Basically what I want to do is access several files and folders in
Templates folder under my plugin and copy them over to the new project.
Plugins don't have IFolders; only projects in the workspace do. You should access resources via the Bundle.getEntry(/path/to/resource) or Class.getResourceAsStream(/path/to/resource) -- preferably the latter, if you're just coping the data out as a template, becuase then it's a fairly simple read/write copy, and secondly it's more efficient than the Bundle.getEntry() way in the scenario where the plugin is packed.
will any of the above allow me to navigate folder structure inside the
Lets say I have a folder Templates in my plugin and in this folder I have
some folder structure. Is it posible to duplicate this folder structure in
the new project?
You could probably enumerate through the entries via Bundle.getEntry. You can't do the same with Class.getResource() though as you'll need to know the name of the resource you're looking up. But as long as you know how to read the folder structure, then you can easily process it. For example, you could have the folder structure in a plain text file and use that to create directories, or (even better) compress your templates into a Zip file (say template.zip) and then use the Java APIs to extract the contents of that Zip file into your new project location.