how to add new action inside content completion window

Having trouble installing Oxygen? Got a bug to report? Post it all here.
SmitaPatil
Posts: 93
Joined: Mon Aug 08, 2022 2:32 pm

how to add new action inside content completion window

Post by SmitaPatil »

Hi Team,

In below screenshot, I have kept cursor just after start tag of judge.line and I pressed Enter. In content completion window first action is New Judge.line, However as cursor is inside judge.line its not valid operation so we want to change this action to custom action which we have or change it to Split Judge.line action, otherwise we want to at least remove this action.
image.png
image.png (34.96 KiB) Viewed 638 times
Can you please share any documentation or method which will help me to achieve it?
Please let me know if you have any doubts.

Thanks & Regards,
Smita
Bogdan Dumitru
Site Admin
Posts: 142
Joined: Tue Mar 20, 2018 5:28 pm

Re: how to add new action inside content completion window

Post by Bogdan Dumitru »

Hello Smita,

Do you have the showAllPossibleElementsInCCList option configured to "true"?
Bogdan Dumitru
http://www.oxygenxml.com
SmitaPatil
Posts: 93
Joined: Mon Aug 08, 2022 2:32 pm

Re: how to add new action inside content completion window

Post by SmitaPatil »

Hi Bogdan,

Yes, showAllPossibleElementsInCCList option configured to true.
Bogdan Dumitru
Site Admin
Posts: 142
Joined: Tue Mar 20, 2018 5:28 pm

Re: how to add new action inside content completion window

Post by Bogdan Dumitru »

Hi,

Ok, that explains why "New judge.line" item is present in content completion even though the "judge.line" isn't valid in that context.

To replace an element with an action see the Configure Content Completion to Insert a Certain XML Structure topic. Hope this is what you're looking for.
Bogdan Dumitru
http://www.oxygenxml.com
SmitaPatil
Posts: 93
Joined: Mon Aug 08, 2022 2:32 pm

Re: how to add new action inside content completion window

Post by SmitaPatil »

Hi Bogdan,

Its not just for Judge.line element. for all element its the same.
Here in below screenshot, in replacement for , We have to give element name as New Judge.line right?
then only I can replace it. I wanted to override general new or split functionality.
is there any way override this New/split action for all elements
image.png
image.png (16.46 KiB) Viewed 608 times
I hope you got my requirement.
Please let me know if you have doubt?

Thanks & Regards,
Smita
Bogdan Dumitru
Site Admin
Posts: 142
Joined: Tue Mar 20, 2018 5:28 pm

Re: how to add new action inside content completion window

Post by Bogdan Dumitru »

Hi,

Unfortunately, there is no way to replace built-in "New [Element]" and "Split" actions with custom ones for all elements.
Bogdan Dumitru
http://www.oxygenxml.com
SmitaPatil
Posts: 93
Joined: Mon Aug 08, 2022 2:32 pm

Re: how to add new action inside content completion window

Post by SmitaPatil »

Hi Team,

Thank you for the reply.
Is there any possibility of getting API or configuration to replace or remove the NEW/ SPLIT function? if yes, can you please tell time when it will be available.
I have kept cursor inside cite.query and pressed enter.
List of elements was visible as shown in below screenshot.
However, first option is coming as split attorney.line even though my cursor is inside cite.query.

image.png
image.png (45.48 KiB) Viewed 583 times


first option should have been split cite query right as I am inside cite.query
Can you please look into it?

Thanks & Regards,
Smita
Post Reply