Java Eclipse: programmatically import plugins and snippets

I need to programmatically import .jar into my workspace, just like using the menu:
Import β†’ Plugin Development β†’ Plugins and Snippets.

Here I find the code for importing a java project:

Description IProjectDescription = ResourcesPlugin.getWorkspace (). loadProjectDescription (new path ("PROJECT_PATH / .project"));

Project IProject = ResourcesPlugin.getWorkspace (). GetRoot (). GetProject (description.getName ())


project.create (description, null);
project.open (zero);

But I do not have .project on the .jar file. Can you help me?

thanks

+6
source share
1 answer

You are close, do it all, and then create an IFile object and read the Jar file in the IFile object. The documentation contains some useful snippets of code to show you how to do this.

+2
source

Source: https://habr.com/ru/post/920695/


All Articles