RAD not creating oxygen-editor.jar when built

Oxygen general issues.
bhootiya
Posts: 1
Joined: Wed Apr 29, 2015 4:33 pm

RAD not creating oxygen-editor.jar when built

Post by bhootiya »

hi,
My maven project for the editor is not building the oxygen-editor.jar file itself when built. I have to go manaually and change the jar file created during the build on the ROD_Editor module(ROD_Editor-0.7.jar) and rename it to oxygen-editor.jar to put it on the applets archive. Now, doing this my editor runs ok but, everytime i make some changes on the modeule(ROD_Editor) I have to re-package it and rename it again to make it work with the applet.

My other question is, what do i have to do to work with the drag and drop functionality provided on the editor. I found a interface that i am implementing called AuthorDnDListner which gives me some methods to use during the DnD process. But, if i try putting a debug or SOP inside any of the method to see if they are being called nothing happens. Non of those overridden methods print anything to the console. It behaves like the class just don't exists.

Code: Select all

public class RODAuthorDnDListener implements AuthorDnDListener {

Logger log = Logger.getLogger(RODAuthorDnDListener.class);

private AuthorAccess access;
@Override
public String getDescription() {
return "CUSTOM DND";

}

@Override
public boolean authorDragEnter(DropTargetDragEvent event) {
log.debug("yessssssss");
return false;
}

@Override
public boolean authorDragExit(DropTargetEvent event) {
log.debug("yessssssss");

return false;
}

@Override
public boolean authorDragOver(DropTargetDragEvent event) {
log.debug("yessssssss");
return false;
}

@Override
public boolean authorDrop(Transferable transferable, DropTargetDropEvent event) {
log.debug("yessssssss");
try {
if(transferable.getTransferData(DataFlavor.stringFlavor) instanceof String){
this.access.getDocumentController().insertText(this.access.getEditorAccess().getCaretOffset(), "we have the text");
}
}
catch (UnsupportedFlavorException e) {

e.printStackTrace();
}
catch (IOException e) {
e.printStackTrace();
}

return true;
}

@Override
public boolean authorSupportsFlavor(DataFlavor dataFlavor) {
log.debug("yessssssss");
return true;
}

@Override
public void init(AuthorAccess authorAccess) {
this.access = authorAccess;
log.debug("INIT author access");
}
}
Any help will be appreciated.
Radu
Posts: 9436
Joined: Fri Jul 09, 2004 5:18 pm

Re: RAD not creating oxygen-editor.jar when built

Post by Radu »

Hi,
My maven project for the editor is not building the oxygen-editor.jar file itself when built. I have to go manaually and change the jar file created during the build on the ROD_Editor module(ROD_Editor-0.7.jar) and rename it to oxygen-editor.jar to put it on the applets archive. Now, doing this my editor runs ok but, everytime i make some changes on the modeule(ROD_Editor) I have to re-package it and rename it again to make it work with the applet.
I'm sorry but I am not familiar with your setup and the contents of your Maven pom.xml files.
In a pom.xml you can also call ANT tasks if you want to automate certain things:

https://maven.apache.org/plugins/maven-antrun-plugin/
My other question is, what do i have to do to work with the drag and drop functionality provided on the editor. I found a interface that i am implementing called AuthorDnDListner which gives me some methods to use during the DnD process. But, if i try putting a debug or SOP inside any of the method to see if they are being called nothing happens. Non of those overridden methods print anything to the console. It behaves like the class just don't exists.
Does your project have an ExtensionsBundle Java extension already implemented?
If so, you should overwrite in it the method ro.sync.ecss.extensions.api.ExtensionsBundle.createAuthorAWTDndListener() and return your own implementation.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Post Reply