Bug 16214 - Linking to an extension install/ unlinking
Summary: Linking to an extension install/ unlinking
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Update (deprecated - use Eclipse>Equinox>p2) (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows 2000
: P1 normal (vote)
Target Milestone: 2.0 M6   Edit
Assignee: Dejan Glozic CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-05-16 20:49 EDT by Vlad Klicnik CLA
Modified: 2002-05-19 13:40 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Vlad Klicnik CLA 2002-05-16 20:49:31 EDT
We need an ability to link to an extension install that was natively installed 
AFTER our product was installed.

Suggested UI interaction was to drill down using MyComputer to the extension 
install directory, and then provide a popup to link to it. Only extension 
installs can be linked to. An extension install directory is a directory 
containing an .eclipseextension file (as per Jim's spec). If the user selects 
to link to it, we actually need to create a "local site" that points to the 
eclipse/ subdirectory of the extension install.

There is a need for a corresponding "unlink" capability. The simplest way to 
implement this is likely as a popup off a local site in the Configuration view. 
Only extension sites explicitly linked via MyComputer should enable 
the "unlink" action.

Note: this needs isRemovable() on LocalSite, that 
(1) checks that there is .eclipseextension one level above the local site
(2) checks that the extension is not linked via link file (see 
PlatformConfiguration.isExternallyLinkedSite() ... need to make it public)

The last 2 are core changes.
Comment 1 Dejan Glozic CLA 2002-05-16 21:43:43 EDT
I added the first half of the function, but Core does not allow me to create 
the site. Scenario:

1) Create a directory d:\rational\extensions
2) Create a file d:\rational\extensions\.eclipseextension
3) Create a directory d:\rational\extensions\eclipse
4) Drill down from 'My Computer'. It will show 'extensions' as a local site and 
you can use pop-up menu to link to it. However, Core reports that 'eclipse' is 
part of anoter site and cannot be added.

We need a flag to distinguish between creating a new site to install features 
into and linking to an existing extension site.

Comment 2 Vlad Klicnik CLA 2002-05-17 13:22:05 EDT
Synch with core.boot. Contains ISiteEntry.isExternallyLinked() as api. For 
the "private" linking support (ie. via our UI), the method that checks whether 
a site can be unlinked should check the following:

* the site is an extension install site (ie. contains .eclipseextension just 
above the local site directory (ie. above the eclipse/ directory))
* the site is not natively linked (ie. we must not allow unlinking of natively 
installed links)

Only "privately" linked sites (ie. via our UI) can be allowed to be unlinked.
Comment 3 Christophe Elek CLA 2002-05-17 19:24:45 EDT
Released core code. Need to verify 
Comment 4 Vlad Klicnik CLA 2002-05-18 19:53:19 EDT
Tries with 0517 + HEAD (0518 at 6pm).

Does not work. Im an unable to add Red Dot as an extension install. What I have 
in the file system is

Red Dot Install/
   eclipse/
      .eclipseextension
      features/
         ... unzipped reddot feature
      plugins/
         ... unzipped reddot plugin

This should work for F1  (please note the file layout as per spec .... I messed 
this up in my original explanation of the function)
Comment 5 Dejan Glozic CLA 2002-05-18 19:54:58 EDT
Of course it does not work - the defect is still open. When I implement the 
code, it will work :-).
Comment 6 Dejan Glozic CLA 2002-05-19 13:40:56 EDT
Implemented as follows:

1) When drilling down My Computer object, a directory that 
contains .eclipseextension file is shown with a local site icon and no futhter 
drilling is possible. A special page for this object explains what a product 
extension is and what can be done with it (i.e. use pop-up menu to link it to 
your product).

2) Linking is performed using the new API (createLinked...). A message that 
restart is needed is shown. The new site immediately appears in the current 
configuration in 'Install Configurations' view.

3) If a site in current configuration returns true for isProductExtension and 
false to isNativelyLinked(), a pop-up menu action 'Unlink' appears when it is 
selected. When performed, it goes away and a message to restart is show.

The change is now in HEAD.