Bug 4922 [EditorMgmt] Need ability to open a file in eclipse from the command line
We need to be able to register eclipse as the default editor for a file type with the OS. This will allow double clicking on a file and opening it in eclipse. This is important for being able to view a .java file in a zip etc. I don't think it should be a problem to get the file name from the command line through to the workbech application which will be able to determine what editor to use. The question is where to put it in the workspace. I think the easiest answer is to just create a "miscellaneous" project mapped to the file's location. Remember this is not a project for "real work", its just a way of allowing the file to be viewed/edited using an eclipse editor.
bundles/org.eclipse.ui.ide.application/src/org/eclipse/ui/internal/ide/application/IDEApplication.java
/**
	 * The name of the folder containing metadata information for the workspace.
	 */
    public static final String METADATA_FOLDER = ".metadata"; 
    private static final String VERSION_FILENAME = "version.ini"; 
    private static final String WORKSPACE_VERSION_KEY = "org.eclipse.core.runtime"; 
    private static final String WORKSPACE_VERSION_VALUE = "1"; 
    private static final String PROP_EXIT_CODE = "eclipse.exitcode"; 
    /**
     * A special return code that will be recognized by the launcher and used to
     * restart the workbench.
     */
    private static final Integer EXIT_RELAUNCH = new Integer(24);
    /**
     * The ID of the application plug-in
     */
	public static final String PLUGIN_ID = "org.eclipse.ui.ide.application"; 
    /**
     * Creates a new IDE application.
     */
    public IDEApplication() {
        
    }
    /* (non-Javadoc)
     * @see org.eclipse.equinox.app.IApplication#start(org.eclipse.equinox.app.IApplicationContext context)
     */
    public Object start(IApplicationContext appContext) throws Exception {
        Display display = createDisplay();
        try {