It's all about the answers!

Ask a question

Changeset Copy URL - Inconsistent Behaviour in Eclipse

vijayakumar ramesh (105443) | asked May 02 '17, 10:18 a.m.


when this URL is opened in the browser is works fine.

When it is provided to the Class URI
String url =https://
 URI uri = URI.create(url);
StandardContextProvider contextProvider = new StandardContextProvider(null);, contextProvider);
when it opens in Eclipse Change Summary view - shows in the Unresolved State

This behaviour is inconsistent for same url in Eclipse and browser - why is it so?
It is also observed that in eclipse for some URL's it works fine and some not- being inconsistent.

Use Case:
when user provides Copy URL  (https://local-
****.com/ccm/resource/itemOid/ as input

in the back ground code uses API's
URI uri = URI.create(url);
StandardContextProvider contextProvider = new StandardContextProvider(null);, contextProvider);

One answer

permanent link
David Lafreniere (4.2k7) | answered Jun 20, 1:49 p.m.
The Change Summary code was not written to parse out the workspace part of the URL. Internally, the URL handler just pulls out the change set ID, and tells the Change Summary view to open that change set.

The Change Summary view has it's own logic on how to compute the context to use... I think it will check if you have any workspaces/streams loaded/tracked in the Pending Changes view (that contains the component of the change set), and it will use that context. It's possible if nothing is loaded in the Pending Changes view, then the Change Summary view will not have a context (or it could have the wrong one). The good news is that there is a button on the Change Summary view toolbar called "Select location to resolve paths" which can be used (in the odd chance the context picked does not have all the parent paths). This feature (ability to change contexts) is not available in the web UI unfortunately. Keep in mind, the way it works in the Eclipse client makes sense for the majority of use cases (most normal work flows do not have URLs opened up in the Eclipse client.).

Feel free to open an enhancement request to see if the context could be stripped out of the change set URL and used instead of a workspace loaded in the Pending Changes view.

Your answer

Register or to post your answer.