The IDE enables you to Create an Extension Library Project From Template or Create an Extension Library Project From Existing Code.
You can add more than one collection of existing sources (source roots) to a project, however, after you add them to the project they cannot be used in any other project. In addition, if the sources are already associated with another project, you cannot add them as a source root to the new project. To use existing sources in more than one project you must create them as libraries and include them in project properties as a dependency. See Setting Extension Library Dependencies.