Store Resource does not allow editing properties with EMF generated property editor [message #614214] |
Wed, 30 January 2008 10:09 |
Florian Hackenberger Messages: 123 Registered: July 2009 |
Senior Member |
|
|
Hi!
After having solved the dependency problems with the plugins required by
Teneo, I'm now running into an odd quirk of the JPOXResource implementation
(though it could be EMF itself too). If I store the .ejdo within the plugin
and open the EMF editor using the URL I get from:
FileLocator.find(Activator.getDefault().getBundle(), new
Path("ejdo/masterDataEditor.ejdo"), null);
(bundleentry://65/ejdo/masterDataEditor.ejdo), the Property editor does not
allow any modifications. If however, I create the editor using a 'file:/'
based URL (file://home/fhackenberger/Desktop/masterDataEditor.ejdo), the
EMF property editor works as expected.
The code for the creation of the editor looks as follows:
final Properties props = readPropFile(file);
JpoxUtil.getCreateDataStore(props);
// now use the editor props to find the correct editor
final String editorextension =
doTrim(props.getProperty(Constants.PROP_EDITOR_EXTENSTION));
final String editorid = doTrim(props.getProperty(Constants.PROP_EDITOR_ID));
final String foundEditorID = getEditorID(editorid, editorextension);
// and open it
// property editor works with: page.openEditor(new
// URIEditorInput(URI.createURI(
// "file://home/fhackenberger/Desktop/masterDataEditor.ejdo")),
// foundEditorID);
//property editor does not work with:
page.openEditor(new URIEditorInput(URI.createURI(file.toString())),
foundEditorID);
I had a look at the Teneo source code, but was unable to find anything
related to read-only resources. Could someone knowledgeable please
elaborate?
Cheers,
Florian
--
Florian Hackenberger
|
|
|
Powered by
FUDForum. Page generated in 0.03193 seconds