Bug 303053 - Support links between WikiText source files
Summary: Support links between WikiText source files
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Mylyn (show other bugs)
Version: 1.2   Edit
Hardware: All All
: P3 enhancement with 1 vote (vote)
Target Milestone: 1.3.0   Edit
Assignee: David Green CLA
QA Contact:
URL:
Whiteboard:
Keywords: noteworthy
Depends on:
Blocks:
 
Reported: 2010-02-17 07:15 EST by Heribert Schütz CLA
Modified: 2011-01-05 11:24 EST (History)
0 users

See Also:


Attachments
a first crack (12.05 KB, patch)
2010-02-23 01:25 EST, David Green CLA
no flags Details | Diff
mylyn/context/zip (304.30 KB, application/octet-stream)
2010-02-23 01:26 EST, David Green CLA
no flags Details
mylyn/context/zip (28.69 KB, application/octet-stream)
2010-02-23 19:39 EST, David Green CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Heribert Schütz CLA 2010-02-17 07:15:30 EST
Build Identifier: 20090920-1017

It would be nice if WikiText behaved like this:
(a) Links are highlighted and "control-clickable" in the "Textile Source"
    view.
(b) Both in "Textile Source" and "Preview" mode, following a link to a textile
    file should open the linked file in a wikitext editor.  (Ideally the link
    target would be opened in source mode if we come from source mode and it
    would be opened in preview mode if we come from preview mode.  But that's
    a detail that's not too important.)
(c) When foo.textile and bar.textile are converted to foo.html and bar.html
    then the corresponding link in foo.html should point to bar.html.

Of course textile and html are only examples here.  The same holds, e.g., for mediawiki and PDF.

Items (a) and (b) would give WikiText the feel of an "interpreted" language where you need no explicit "compilation" step to HTML.  This makes it easy to use and extend wiki files at the same time.  Item (c) allows to do the compilation nevertheless when needed.

Some details:
- I'm currently using Mylyn WikiText 1.2.0.v20091215-0000-e3x
- See also this forum discussion:
  http://www.eclipse.org/forums/index.php?t=msg&th=162405&start=0&

Reproducible: Always

Steps to Reproduce:
1. Have two files foo.textile and bar.textile in the same directory.
2. Let the file foo.textile contain a link "bar":bar.textile
3. Open foo.textile and use the "Textile Source" view.
4. Notice that the link is neither highlighted nor does it act as a link.
5. Switch to "Preview" mode.
6. Notice that "bar" now is a link.
7. Click the link.
8. Notice that bar.textile is opened in a browser tab
   rather than a wikitext editor tab.  So you cannot edit bar.textile here.
Comment 1 David Green CLA 2010-02-17 11:13:18 EST
Thanks for the excellent feature request.
Comment 2 David Green CLA 2010-02-23 01:25:47 EST
Created attachment 159891 [details]
a first crack

Attached an implementation of hyperlinks in the markup editor.  Creates CTRL+click (or Command+click on a mac) hyperlinks to similarly named files in the workspace.  Links are created for relative links to files that exist in the workspace with the correct path, matching files based on path and name without file extension.

The implementation does not affect hyperlinks in the editor preview.
Comment 3 David Green CLA 2010-02-23 01:26:06 EST
Created attachment 159892 [details]
mylyn/context/zip
Comment 4 David Green CLA 2010-02-23 19:39:48 EST
Modified patch committed to CVS.

I don't see a good way of presenting these hyperlinks in the editor preview.  These hyperlinks may resolve to more than one target file, in which case multiple hyperlinks are presented when CTRL+hovering in the source viewer.  In the preview there's no easy way to do this since it's an embedded web browser.

Resolving as fixed.  If it's important that the link behaviour in the preview be modified please open a new bug.
Comment 5 David Green CLA 2010-02-23 19:39:52 EST
Created attachment 160021 [details]
mylyn/context/zip