Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 393797

Summary: Extension point schema editor opens as read-only from plugin.xml editor
Product: [Eclipse Project] PDE Reporter: Curtis Windatt <curtis.windatt.public>
Component: UIAssignee: Curtis Windatt <curtis.windatt.public>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: jstuckey, markus.kell.r, mike.pawlowski, stepper, wassim.melhem
Version: 3.8   
Target Milestone: 4.3 M4   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Bug Depends on: 172721    
Bug Blocks:    

Description Curtis Windatt CLA 2012-11-07 13:05:36 EST
+++ This bug was initially created as a clone of Bug #172721 +++

This problem was fixed some time ago, but is broken again in 3.8.1 and 4.3.  I suspect the regression is from Bug 313187.

The schema location is now returning an absolute file system path, rather than a workspace relative path.


Build ID:  I20061214-1445

Steps To Reproduce:
1. Open a plugin.xml file for a plugin which declares 1 or more extension points
2. From the 'Extension Points' tab in the editor select the 'Open extension point schema' link.
3. The editor opens read-only.

Is this intentional?  If so it was surprising.  You are in an editor that is modifiable editing a resource that is associated with the contents of that editor.


More information:
Comment 1 Curtis Windatt CLA 2012-11-07 13:21:18 EST
I'm now seeing two different problems, in my host I only get read only files.  In my target the schemaURL conversion is choking on the space in my workspace path.
Comment 2 Curtis Windatt CLA 2012-11-08 12:59:28 EST
Fixed in master

http://git.eclipse.org/c/pde/eclipse.pde.ui.git/commit/?id=637ebae68b9a222c33ab9ff4054fb2d3d76ea4f5

1) When grabbing schema files from external source bundles, the returned url will not be encoded.  Javadoc also updated to state this.  We now use URIUtil to create the combined jar/path entry.
2) The action has been rewritten to avoid unnecessary string manipulation.  Instead we use URIUtil to encode and find the file.
3) To fix the original read-only problem I tweaked the comparison of file path or workspace root.
Comment 3 Curtis Windatt CLA 2012-11-08 16:02:19 EST
The original fix included changes to SchemaUtil to encode the url before opening a connection.  This is unecessary and causes URISyntaxExceptions because URIUtils doesn't handle jar:file: style urls.

I've reverted the changes in that file.

http://git.eclipse.org/c/pde/eclipse.pde.ui.git/commit/?id=b83b13bf82f37a4a9f49847f732bc5a9f6228312
Comment 4 Curtis Windatt CLA 2012-12-11 15:02:47 EST
Verified in I20121211-0800