Page 1 of 1

CGM support for eclipse oxygen author pre 19

Posted: Mon Apr 27, 2020 1:17 pm
by SNO
Hi,
as you describe in your description on git hub "https://github.com/oxygenxml/oxygenxml. ... rt.eclipse" this addon is only running on oxygen post version 19.
What exactly is the reason that it is not running on previous versions?

I use the eclipse version of the oxygen author.

Re: CGM support for eclipse oxygen author pre 19

Posted: Mon Apr 27, 2020 2:55 pm
by sorin_carbunaru
Hello,

The add-on needs some code/API from the Oxygen Eclipse Plugin that was not available prior to version 19.0.

By the way, please note that versions 19.x of Oxygen have reached their end-of-maintenance and end-of-support milestones.

Regards,
Sorin Carbunaru
oXygen XML

Re: CGM support for eclipse oxygen author pre 19

Posted: Tue Apr 28, 2020 2:03 pm
by SNO
Hi,

thanx for your answer, i know that these versions are EOL but is there a possibility to extend oxygen 17 eclipse version to display CGM files?
Do you have a link to some customization guides for custom image renderer?

Thanx very much

Re: CGM support for eclipse oxygen author pre 19

Posted: Tue Apr 28, 2020 4:35 pm
by adrian_sorop
Hello,

Before Oxygen 19, rendering CGM images in Author Mode was mad using a third party library from bdaum.

Here is a documentaion link from Oxygen's 17 Eclipse distribution: Customize Oxygen XML Editor plugin to Render CGM Images Version 17.0

The main issue is that the used third party is no longer available...officially.

If you manage to find the third party and follow the documentaion steps you should be able to render CGM files in Oxygen's eclipse plugin.

Let me know how this works,
Have a nice day,
Adrian S.

Re: CGM support for eclipse oxygen author pre 19

Posted: Tue Apr 28, 2020 6:13 pm
by SNO
yes this addon is not available any more,

What is the extension point of oxygen this addon was using? So I could write my own addon using JCGM.

Best regards

Re: CGM support for eclipse oxygen author pre 19

Posted: Tue Apr 28, 2020 6:38 pm
by adrian_sorop
I could write my own addon using JCGM
If you want to write an add-on that uses the JCGM for versions before 19.0 don't do it. The classes will not be loaded by Oxygen and won't work.
Oxygen's versions 17 and 18 internal code relies on bdaum's CGM Panel Third party's API.

Re: CGM support for eclipse oxygen author pre 19

Posted: Wed Apr 29, 2020 8:22 am
by Radu
Hi,

As Adrian said, we added in Oxygen 19.0 the support for using JCGM to load CGM images when the extra JAR library was added to the classpath.
Looking at how our code looked in Oxygen 19.0 we do have I think two possible workarounds (but I have not tested them):
1) If in the Oxygen Eclipse plugin's classpath (as defined in its MANIFEST.MF file) there is a Java library which uses the standard java JAI Image IO API to register a CGM image handler (via it's MANIFEST.MF/services file), this JAR library should be used to render the CGM image in the Author mode. I think this approach should work also with Oxygen 17
2) In Oxygen 18 we added our specific API to add image handlers. In the Oxygen plugin.xml there is an extension point called com.oxygenxml.editor.workspaceAccessPlugin. The API com.oxygenxml.workspace.api.eclipse.EclipseWorkspaceAccessPluginExtension.pluginStarted(EclipsePluginWorkspace) should be called when the Oxygen plugin is initialized and you can use the ro.sync.exml.workspace.impl.WorkspaceUtilitiesImpl.getImageUtilities() API to add a custom image handler.

https://www.oxygenxml.com/InstData/Edit ... ndler.html

Regards,
Radu