Bug 220296 - [Preferences] PreferenceLinkArea should support multiple pages
Summary: [Preferences] PreferenceLinkArea should support multiple pages
Status: NEW
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.4   Edit
Hardware: PC Windows XP
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Platform UI Triaged CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-02-25 17:42 EST by Nitin Dahyabhai CLA
Modified: 2019-09-06 16:16 EDT (History)
2 users (show)

See Also:


Attachments
patch implementing extra constructor (3.69 KB, patch)
2008-02-25 17:42 EST, Nitin Dahyabhai CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Nitin Dahyabhai CLA 2008-02-25 17:42:36 EST
Created attachment 90699 [details]
patch implementing extra constructor

The PreferenceLinkArea is very useful for linking between preference pages, but it doesn't support linking to more than one page at a time.  It would be useful to support this for cleaner page layouts and less fragile hackery with the page names and ids on the caller's end.
Comment 1 Remy Suen CLA 2008-02-25 19:33:10 EST
(In reply to comment #0)
> Created an attachment (id=90699) [details]
> patch implementing extra constructor

The 'if (result == null)' conditional statement needs to close earlier right after the MessageFormat call in my opinion. Otherwise, if result is null, the Link widget never has any text set on it.

Also, trying to click a link right now doesn't seem to open any pages. The SelectionEvent's text has apostrophes around it whereas the String returned from pageTitles.get(int) doesn't, so the equals(String) call fails.
Comment 2 Remy Suen CLA 2008-02-25 19:34:04 EST
Sorry, I mean, if result isn't null, then text is never set.
Comment 3 Remy Suen CLA 2008-02-25 21:29:36 EST
The apostrophes are caused by the NLS messages themselves.

IDEWorkspacePreference_relatedLink = See <a>''{0}''</a> for workspace startup and shutdown preferences.

I do not know we should try to circumvent this. Do we want to put the <a> tags inside? Do we want to strip out the apostrophes? Should we use string manipulation magic in the implementation of the widgetSelected(SelectionEvent) to handle these cases? There are no apostrophes in Java > Editor or Java > Editor > Mark Occurrences, but there are in places like Java > Debug and General > Workspace, so there isn't really a standard. ;(
Comment 4 Remy Suen CLA 2008-02-25 21:31:17 EST
(In reply to comment #3)
> I do not know we should try to circumvent this.

I mean, I do not know _how_ we should try to circumvent this.
Comment 5 Susan McCourt CLA 2009-07-09 19:29:46 EDT
As per http://wiki.eclipse.org/Platform_UI/Bug_Triage_Change_2009
Comment 6 Eclipse Webmaster CLA 2019-09-06 16:16:15 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.