Have you looked at the org.eclipse.ui.examples.readmetool plugin? The Platform Developer Plugin Guide discusses this example, which demonstrates how to do a lot of basic plugin functionality.