| Summary: | [reconciler] eclipse will always report null point error when a non-existing path is used for links | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] Equinox | Reporter: | Ben Xu <xufengbing> | ||||||
| Component: | p2 | Assignee: | DJ Houghton <dj.houghton> | ||||||
| Status: | RESOLVED FIXED | QA Contact: | |||||||
| Severity: | enhancement | ||||||||
| Priority: | P3 | CC: | loskutov, pascal | ||||||
| Version: | unspecified | ||||||||
| Target Milestone: | 3.7 M3 | ||||||||
| Hardware: | PC | ||||||||
| OS: | Linux | ||||||||
| Whiteboard: | |||||||||
| Attachments: |
|
||||||||
|
Description
Ben Xu
Created attachment 146638 [details]
patch code for this enhancement
Attachment patch is one solution for this use case:
add one property "optional" for the link content, only this property is set and set to "true",then eclipse will check the path very early and filter path if not exists.
for example, before enhancement, a link named help has the following content:
path=/data/help_contents
before this enhancement, if "/data/help_contents" not exist, eclipse will always report an error on startup.
after this enhancement, if this help link is intentionally used for add document later. The content of the help link can be specified as
path=/data/help_contents
optional=true
P.S. The patch is against latest CVS HEAD. Created attachment 177463 [details]
patch
Thanks for the patch but unfortunately with the current patch you won't get the original stack trace on startup, but you will get a new error message in the log file:
!MESSAGE Unable to determine link location from file: /tmp/eclipse/dropins/foo.link
I've attached a patch which will ignore non-existant optional repositories pointed to by link files.
Patch released to HEAD. Closing. Thanks for accepting the patch. I think one missing bit is some kind of documentation for the solution, which in my opinion belongs to the help package delivered with PDT. I think something like "Link file may contain an optional 'optional=true' argument. In such case, link directory must not necessarily exists." would be good. Opened bug 323649 to add the new attribute to the Help. There was a problem with tagging HEAD so this fix won't appear in integration builds until the first build after 3.7 M2. |