Page 1 of 1

Fetching list of validation problems list

Posted: Fri Aug 13, 2021 1:58 pm
by Srinarayan
Hi team

We are implementing a java plugin for oxygen editor to ignore some new validations in oxygen v23.0.

I am trying to use the class ro.sync.exml.workspace.api.editor.validation.ValidationProblems to get the list of all validation problems present in oxygen. I am trying to use its method getProblemsList(). But I am confused how to get the instance of this class in my java code.

Can you please guide us on how can I list all the validation problems?

Regards
Srinarayan

Re: Fetching list of validation problems list

Posted: Fri Aug 13, 2021 2:49 pm
by alex_jitianu
Hello,

You need to add a ro.sync.exml.workspace.api.editor.validation.ValidationProblemsFilter first. The API of interest is ro.sync.exml.workspace.api.editor.WSEditor.addValidationProblemsFilter(ValidationProblemsFilter) . Please see the Create a customized XML validator post for more details:

Best regards,
Alex

Re: Fetching list of validation problems list

Posted: Wed Aug 18, 2021 11:06 am
by Srinarayan
Hello,

Can you please tell how can I deploy and activate this type of plugin in eclipse client? I wanted to know in which folder of eclipse client should I place this jar file and how can I configure oxygen to use this jar file for validation?

Regards
Srinarayan

Re: Fetching list of validation problems list

Posted: Wed Aug 18, 2021 1:28 pm
by alex_jitianu
Hello,

First you need to create an Eclipse plugin that depends on the Oxygen plugin. There is a sample project named oxygen-sample-eclipse-plugin available in our sdk.
In this plugin you can use the workspaceAccessPlugin extension point in this plugin

Code: Select all

    <extension point="com.oxygenxml.editor.workspaceAccessPlugin">
        <implementation class="my.package.WSPluginExtensionImpl"/>;
    </extension>
where my.package.WSPluginExtensionImpl extends com.oxygenxml.workspace.api.eclipse.EclipseWorkspaceAccessPluginExtension

Your implementation will receive a com.oxygenxml.workspace.api.eclipse.EclipsePluginWorkspace instance on the pluginStarted() callback. This instace has methods for accessing the editors, like getEditorAccess(URL location, int editingArea).

Best regards,
Alex

Re: Fetching list of validation problems list

Posted: Mon Aug 23, 2021 9:56 am
by Srinarayan
Hi

While preparing the plugin, I came across an error "Bundle 'com.oxygenxml.editor' cannot be resolved". Can you please tell what could have caused this error in my setup? I have downloaded oxygen sample plugin project "oxygen-sample-eclipse-plugin" but there I am getting this error.

Regards
Srinarayan

Re: Fetching list of validation problems list

Posted: Mon Aug 23, 2021 3:00 pm
by Radu
Hi Srinarayan,

In your Eclipse workbench you need to install the Oxygen Eclipse plugin:

https://www.oxygenxml.com/xml_editor/do ... os=Eclipse

https://www.oxygenxml.com/xml_author/do ... os=Eclipse

did you install the Oxygen XML Editor Eclipse plugin, or the Oxygen XML Author Eclipse plugin? Because they have different plugin IDs.

Regards,
Radu

Re: Fetching list of validation problems list

Posted: Tue Aug 24, 2021 10:25 am
by Srinarayan
Hi Radu

Thank you for your response that issue is resolved. We are using oxygen author. I am making a plugin for the oxygen author. I have deployed my plugin in eclipse client. I made a plugin project as mentioned by Alex in above posts and my class my.package.WSPluginExtensionImpl extends com.oxygenxml.workspace.api.eclipse.EclipseWorkspaceAccessPluginExtension. But when I open the eclipse client I get this error

"org.eclipse.core.runtime.CoreException: Plug-in myGroup.eclipse.WSPluginExtensionImpl was unable to load class myGroup.eclipse.WSPluginExtensionImpl"

My plugin is unable to load the activator class. Is there anything specific I need to take care? What can be the reasons for this error?

Regards
Srinarayan

Re: Fetching list of validation problems list

Posted: Tue Aug 24, 2021 11:39 am
by Srinarayan
my plugin.xml contains

<plugin>
<extension point="com.oxygenxml.author.workspaceAccessPlugin">
<implementation class="myGroup.eclipse.WSPluginExtensionImpl"/>;
</extension>

</plugin>

Re: Fetching list of validation problems list

Posted: Tue Aug 24, 2021 11:40 am
by Radu
Hi,

Maybe you can zip your entire project and send it via email to support@oxygenxml.com and we can try to take a look at it.

Regards,
Radu

Re: Fetching list of validation problems list

Posted: Tue Aug 31, 2021 10:40 am
by Srinarayan
Hi Radu,

I have mailed you my package on support@oxygenxml.com with subject line "Fetching list of validation problems list". I mailed again yesterday to ask for any update. My email ID is srinarayan.00@wipro.com. If you have any update on the plugin kindly reply.

Regards
Srinarayan

Re: Fetching list of validation problems list

Posted: Tue Aug 31, 2021 11:04 am
by Radu
Hi,

I looked on our support email Inbox, looked in the trash, spam folders, I'm sorry but I cannot find your email anywhere.
Can you send us the samples using the feedback form instead?
https://www.oxygenxml.com/techSupport.html

Regards,
Radu

Re: Fetching list of validation problems list

Posted: Tue Aug 31, 2021 12:36 pm
by Srinarayan
Hi

I have sent you the package using feedback form. Can you confirm you got my feedback and the package?

Regards
Srinarayan

Re: Fetching list of validation problems list

Posted: Tue Aug 31, 2021 1:00 pm
by Radu
Hi Srinarayan,

I got your feedback and I'll try to find some time to take a look at it.

Regards,
Radu

Re: Fetching list of validation problems list

Posted: Tue Aug 31, 2021 1:46 pm
by Radu
Hi,

Edit the "META-INF/MANIFEST.MF" and remove this line from it:

Code: Select all

Bundle-Activator: myGroup.eclipse.WSPluginExtensionImpl
because the WSPluginExtensionImpl is an extension point, it is not your plugin's implementation of the bundle activator interface.
And it should work as an extension point, without the need to create another class which implements the Eclipse "Activator" class.

Regards,
Radu