Create an Extension Library Project From Existing Code

  1. Create a new extension library project from the standard template.

    See Create an Extension Library Project From Template.

  2. Select the new project in the Projects window.
  3. Select File > Project Properties in the main window.
  4. Select Sources in the Project Properties window and click Add Source Root.
  5. Use the Add Source Folder window to navigate to and choose the folder containing your existing source code.

    When you add the source root to the project, you cannot use it again in another project. If the source root is already used in another project, the IDE will not permit you add it to the new project. If you want to use the source root in multiple projects, set it up as a separate project and add it to other projects as a compilation dependency between projects. See Setting Extension Library Dependencies.

  6. Verify the existing source code path is displayed in the Source Roots list and click OK to add it to the project.

    The IDE creates the project folder containing existing code, source packages, and libraries. You can view, create and edit the project source code in the Source Editor.

See Also: