What technique do you use when browsing sample code?
Let's say that you want to write a plugin for IDEA. You probably have
a few samples that you want to keep on hand during development.
How do you do that? I can think of a number of ways:
a. Open as separate projects.
b. Add as modules to your own project.
c. Add as libraries.
d. Open as File.
e. Use separate Notepad.
I want syntax highlighting and browsing available, which rules out d and e.
Opening as separate project means that I have to configure a project that I
may not be interested in. Also, there's no natural link between my project
and the sample project.
Adding the sample code as a module means that the sample will be built along
with my project. I'm not interested in that.
Adding the sample code as a library requires class files. Also, if I'm not
careful, the sample code will be included in my plugin.
What's the best practice here?
I can imagine a feature where you can add the root of a source tree as
sample code. This sample code should be syntax highlighted and browsable, but
it should not be built. Also, it should not be possible to refer to it from