Page 1 of 1

Use TextTransfer in an AuthorDnDListener

Posted: Mon Sep 16, 2013 3:13 pm
by SSC
Hello,

we are using the Eclipse embedded Oxygen Author version 15.

It seems that the org.eclipse.swt.dnd.TextTransfer cannot be used in an com.oxygenxml.editor.editors.author.AuthorDnDListener

I just tried to extend our existing AuthorDnDListener and added the TextTransfer to it.
But when I try to drop text onto the editor it is not allowed, even though I do set the droptargetevent.detail to DND.DROP_COPY.

So I´d implemented another very simple AuthorDnDListener, but it does not work either.

Code: Select all


public class TextDnDListener implements AuthorDnDListener {

private AuthorAccess access;

@Override
public String getDescription() {
return null;
}

@Override
public boolean isAuthorEventOfInterest(DropTargetEvent droptargetevent) {
return true;
}

@Override
public Transfer[] getAuthorTransfers() {
return new Transfer[] { TextTransfer.getInstance() };
}

@Override
public void authorDragEnter(DropTargetEvent droptargetevent) {
droptargetevent.detail = DND.DROP_COPY;
}

@Override
public void authorDragLeave(DropTargetEvent droptargetevent) {
}

@Override
public void authorDragOperationChanged(DropTargetEvent droptargetevent) {
droptargetevent.detail = DND.DROP_COPY;
}

@Override
public void authorDragOver(DropTargetEvent droptargetevent) {
droptargetevent.detail = DND.DROP_COPY;
}

@Override
public void authorDrop(DropTargetEvent droptargetevent) {
if (TextTransfer.getInstance().isSupportedType(
droptargetevent.currentDataType)) {
String data = (String) droptargetevent.data;
access.getDocumentController().insertText(0, data);
}
}

@Override
public void authorDropAccept(DropTargetEvent droptargetevent) {
}

@Override
public void init(AuthorAccess authoraccess) {
this.access = authoraccess;
}

}
Can you tell me what I have to do in order to use the org.eclipse.swt.dnd.TextTransfer?

Best regards,

Simon

Re: Use TextTransfer in an AuthorDnDListener

Posted: Tue Sep 17, 2013 12:52 pm
by Radu
Hi Simon,

Indeed Oxygen's own drop listener is interested in text drop events and processes them before they get a chance to be sent to the custom drop handler (which were created as API more to handle special flavors and not the common text one)..
But even if Oxygen's handler gets called, it will still call API from the interface ro.sync.ecss.extensions.api.AuthorSchemaAwareEditingHandlerAdapter.handlePasteFragment(int, AuthorDocumentFragment[], int, AuthorAccess) which would allow you to intercept the call and if the text was inserted by DnD.

For example for DITA you could take a look at:

ro.sync.ecss.extensions.dita.DITASchemaAwareEditingHandler.handlePasteFragment(int, AuthorDocumentFragment[], int, AuthorAccess)

Regards,
Radu

Re: Use TextTransfer in an AuthorDnDListener

Posted: Tue Sep 17, 2013 4:15 pm
by SSC
Hello Radu,

this would mean that I have to extend every custom AuthorSchemaAwareEditingHandlerAdapter of every Framework.

Here is my suggested sample code for DITA.

Code: Select all



public class TextPasteModifyingExtensionsBundle extends DITAExtensionsBundle{

private AuthorSchemaAwareEditingHandlerAdapter authorSchemaAwareEditingSupportAdapter;

public TextPasteModifyingExtensionsBundle(){
authorSchemaAwareEditingSupportAdapter = new TextPasteModifyingEditingHandler();
}

@override
public AuthorSchemaAwareEditingHandler getAuthorSchemaAwareEditingHandler() {
return authorSchemaAwareEditingSupportAdapter;
}
}

public class TextPasteModifyingEditingHandler extends DITASchemaAwareEditingHandler{
@Override
public boolean handlePasteFragment(int offset, AuthorDocumentFragment[] fragmentsToInsert,
int actionId, AuthorAccess authorAccess) throws InvalidEditException {

if(fragmentsToInsert contains certain information){
// do our custom stuff
}else{
super.handlePasteFragment(int offset, AuthorDocumentFragment[] fragmentsToInsert,
int actionId, AuthorAccess authorAccess);
}
}
}
The problem here is that I do not have access to framework´s custom handler and bundles (i.e. DITASchemaAwareEditingHandler and DITAExtensionsBundle) in order to extend those classes. :(

Do you have a different solution or idea to offer a custom "TextPasteModifyingEditingHandler"?

In this case it unfortunately has to be a TextTransfer, because it comes from a Browser Application where only text transfer is used.

Best regards,

Simon

Re: Use TextTransfer in an AuthorDnDListener

Posted: Thu Sep 19, 2013 5:00 pm
by Radu
Hi Simon,
The problem here is that I do not have access to framework´s custom handler and bundles (i.e. DITASchemaAwareEditingHandler and DITAExtensionsBundle) in order to extend those classes. :(
You should find complete Java sources for all our frameworks in our Author SDK:

http://www.oxygenxml.com/oxygen_sdk.htm ... horing_SDK
Do you have a different solution or idea to offer a custom "TextPasteModifyingEditingHandler"?
Maybe we could offer the possibility to set in the Extensions tab (Document Type Edit Dialog) an individual AuthorSchemaAwareEditingHandler implementation (which would still need to extend the proper base XML vocabulary implementation) instead of extending the entire extensions bundle. What would you think of this approach?

Regards,
Radu

Re: Use TextTransfer in an AuthorDnDListener

Posted: Tue Sep 24, 2013 11:51 am
by SSC
Radu wrote:Maybe we could offer the possibility to set in the Extensions tab (Document Type Edit Dialog) an individual AuthorSchemaAwareEditingHandler implementation (which would still need to extend the proper base XML vocabulary implementation) instead of extending the entire extensions bundle. What would you think of this approach?
This would definitely a much better approach than letting me copy all your sample implementations of your the ro.sync.ecss.extensions.api.ExtensionsBundle in order to alternate every ro.sync.ecss.extensions.api.AuthorSchemaAwareEditingHandler.

But even though I wonder why you do not allow your customers to alternate the behavior of the TextTransfer.
I mean your Interface already has such a method like com.oxygenxml.editor.editors.author.AuthorDnDListener.isAuthorEventOfInterest(DropTargetEvent), where you would be able to determine, if your implementation of the TextTransfer should be used or the one of your customer.

I would prefer the second idea much more or do you see any problems in the approach with the AuthorDnDListener.isAuthorEventOfInterest(DropTargetEvent)?

And do you have an idea, when this could be available?

Best regards,

Simon

Re: Use TextTransfer in an AuthorDnDListener

Posted: Tue Sep 24, 2013 12:27 pm
by Radu
Hi Simon,

I added an issue to analyze the idea of having the "AuthorDnDListener" also receive dropped text events if it is interested in them. But I am not sure we will have the time to implement anything in time for version 15.1 which will be available in a couple a weeks. I'll try to update this post after I look better in the code.

Regards,
Radu

Re: Use TextTransfer in an AuthorDnDListener

Posted: Tue Sep 24, 2013 3:12 pm
by Radu
Hi Simon,

I made some code changes on our side and managed to increase the priority for the API DND listener to also get asked if it is interested in text drops, the code on the API side with which I tested was something like:

Code: Select all

public com.oxygenxml.editor.editors.author.AuthorDnDListener createAuthorSWTDndListener() {
return new AuthorDnDListener() {

private AuthorAccess access;

@Override
public String getDescription() {
return "CUSTOM TEXT DND";
}

@Override
public boolean isAuthorEventOfInterest(DropTargetEvent event) {
System.err.println(event.currentDataType);
System.err.println("CHECK IS INTERESTING");
if (TextTransfer.getInstance().isSupportedType(event.currentDataType)) {
return true;
}
return false;
}

@Override
public void init(AuthorAccess access) {
this.access = access;
System.err.println("INIT............");
}

@Override
public Transfer[] getAuthorTransfers() {
return new Transfer[] {TextTransfer.getInstance()};
}

@Override
public void authorDropAccept(DropTargetEvent event) {
System.err.println("DROP ACCEPT");
}

@Override
public void authorDrop(DropTargetEvent event) {
System.err.println("DROP");
if(event.data instanceof String) {
this.access.getDocumentController().insertText(this.access.getEditorAccess().getCaretOffset(), ((String)event.data).toUpperCase());
}
}

@Override
public void authorDragOver(DropTargetEvent event) {
System.err.println("DRAG OVER...............");
//Move the caret.
((Composite)this.access.getEditorAccess().getAuthorComponent()).setFocus();
Point pt = access.getEditorAccess().getLocationRelativeToEditorFromScreen(event.x, event.y);
AuthorViewToModelInfo vtm = access.getEditorAccess().viewToModel(pt.x, pt.y);
this.access.getEditorAccess().setCaretPosition(vtm.getOffset());
}

@Override
public void authorDragOperationChanged(DropTargetEvent event) {
System.err.println("DRAG OP CHANGED");
}

@Override
public void authorDragLeave(DropTargetEvent event) {
System.err.println("DRAG LEAVE");
}

@Override
public void authorDragEnter(DropTargetEvent event) {
System.err.println("DRAG ENTER");
}
};
};
My small example worked with the changes. I'll try to push these changes in the Oxygen 15.1 beta kit which will be made available on the Oxygen Users List in a couple of days.
So if you register (or maybe you already are registered) on our users list:

http://www.oxygenxml.com/mailinglists.html#oxygen-user

you will probably receive notification of an Oxygen 15.1 Editor beta kit (including Eclipse plugin) and you can try with that one.

Regards,
Radu

Re: Use TextTransfer in an AuthorDnDListener

Posted: Wed Sep 25, 2013 11:46 am
by SSC
Hello Radu,

that sounds great. :)

Yesterday I´d spend some time in copying the functionality of your SDKs DITAExtensionsBundle and DITASchemaAwareEditingHandler in order to provide my own implemenentation for the handlePasteFragment method, which cumbersome and ugly.

So if the isAuthorEventOfInterest returns true only our custom DnDListener will be used and if false is returned your default TextDnDListener will be used, right?

I am really looking forward to it.

And of couse I am already registered at your mailinglist. :wink:

Best regards,

Simon

Re: Use TextTransfer in an AuthorDnDListener

Posted: Tue Oct 15, 2013 12:14 pm
by SSC
Hello Radu,

I´d just testet this DnD functionality of Oxygen 15.1 and recognized that the de.kgucms.kgu.tps.client.oxygen.extensions.pimod.authordndlistener.PIModAuthorDndListener.isAuthorEventOfInterest(DropTargetEvent) is called two times.

The first time, the isAuthorEventOfInterest is invoked, I can receive the actually dragged String with the following code:

Code: Select all

 
String textContent = (String) TextTransfer.getInstance()
.nativeToJava(event.currentDataType);
The second time the nativeToJave Method unfortunately always returns null so that I cannot determine, if I am really interested in the event or rather your TextTransfer implementation should be used.

Here are the interesting methods:

Code: Select all


 @Override
public boolean isAuthorEventOfInterest(DropTargetEvent event) {
if (TextTransfer.getInstance().isSupportedType(
event.currentDataType)) {
String textContent = (String) TextTransfer.getInstance()
.nativeToJava(event.currentDataType);
if (textContent instanceof String) {
return textContent.startsWith(TEXT_DROP_PREFIX);
}
}
return false;
}

@Override
public void authorDrop(DropTargetEvent event) {
if (TextTransfer.getInstance().isSupportedType(
event.currentDataType)) {
Object nativeToJava = event.data;
if (null == nativeToJava) {
nativeToJava = TextTransfer.getInstance().nativeToJava(
event.currentDataType);
}
if (nativeToJava instanceof String
&& ((String) nativeToJava)
.startsWith(LIVE_PREVIEW_TEXT_DROP_PREFIX)) {
String dropInformation = ((String) nativeToJava)
.substring(LIVE_PREVIEW_TEXT_DROP_PREFIX.length());
insertDropInformation(dropInformation,
getCorrectDropLocation(event));
}
}
}
Do you have an idea, why TextTransfer.getInstance().nativeToJava(event.currentDataType); returns null, when the isAuthorEventOfInterest(...) method is invoked a second time?

Best regards,

Simon

Re: Use TextTransfer in an AuthorDnDListener

Posted: Tue Oct 15, 2013 1:25 pm
by Radu
Hi Simon,

You can add a

Code: Select all

new Exception().printStackTrace();
line on the isAuthorEventOfInterest callback to see from where it gets called.
I looked at the code but we do not modify the DropTargetEvent in any way on our side to remove the data from it.

I could not reproduce the issue on my side, I had two editors opened in Eclipse side-by-side, one in the Author mode and one in the Text mode, I dragged text from the editor opened in the Text mode, dragged and dropped it in the other editor opened in the Author mode, all events (drag start, over, drop) contained the text in the DropTargetEvent. Could you try such an experiment yourself?

Regards,
Radu

Re: Use TextTransfer in an AuthorDnDListener

Posted: Tue Oct 15, 2013 5:07 pm
by SSC
Hello Radu,

just as you suggested I printed the stacktrace.
Here is the console output, when I just enter the editor area.

Code: Select all



kguPreviewRefNodenote

java.lang.Exception
at de.kgucms.kgu.tps.client.oxygen.extensions.pimod.authordndlistener.PIModAuthorDndListener.isAuthorEventOfInterest(PIModAuthorDndListener.java:85)
at com.oxygenxml.editor.editors.author.d.b(Unknown Source)
at com.oxygenxml.editor.editors.yb.dragOver(Unknown Source)
at org.eclipse.swt.dnd.DNDListener.handleEvent(DNDListener.java:80)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1077)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1062)
at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:774)
at org.eclipse.swt.dnd.DropTarget.DragOver(DropTarget.java:366)
at org.eclipse.swt.dnd.DropTarget$3.method4(DropTarget.java:250)
at org.eclipse.swt.internal.ole.win32.COMObject.callback4(COMObject.java:101)
at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method)
at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:2531)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3752)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2640)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2604)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2438)
at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:671)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:664)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at com.teamcenter.rac.contmgmt.client.DcApplication.start(DcApplication.java:209)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:369)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:620)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:575)
at org.eclipse.equinox.launcher.Main.run(Main.java:1408)
at org.eclipse.equinox.launcher.Main.main(Main.java:1384)

null
null

java.lang.Exception
at de.kgucms.kgu.tps.client.oxygen.extensions.pimod.authordndlistener.PIModAuthorDndListener.isAuthorEventOfInterest(PIModAuthorDndListener.java:85)
at com.oxygenxml.editor.editors.author.d.b(Unknown Source)
at com.oxygenxml.editor.editors.yb.dragOver(Unknown Source)
at org.eclipse.swt.dnd.DNDListener.handleEvent(DNDListener.java:80)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1077)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1062)
at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:774)
at org.eclipse.swt.dnd.DropTarget.DragOver(DropTarget.java:366)
at org.eclipse.swt.dnd.DropTarget$3.method4(DropTarget.java:250)
at org.eclipse.swt.internal.ole.win32.COMObject.callback4(COMObject.java:101)
at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method)
at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:2531)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3752)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2640)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2604)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2438)
at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:671)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:664)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at com.teamcenter.rac.contmgmt.client.DcApplication.start(DcApplication.java:209)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:369)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:620)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:575)
at org.eclipse.equinox.launcher.Main.run(Main.java:1408)
at org.eclipse.equinox.launcher.Main.main(Main.java:1384)

null

java.lang.Exception
at de.kgucms.kgu.tps.client.oxygen.extensions.pimod.authordndlistener.PIModAuthorDndListener.isAuthorEventOfInterest(PIModAuthorDndListener.java:85)
at com.oxygenxml.editor.editors.author.d.b(Unknown Source)
at com.oxygenxml.editor.editors.yb.dragOver(Unknown Source)
at org.eclipse.swt.dnd.DNDListener.handleEvent(DNDListener.java:80)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1077)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1062)
at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:774)
at org.eclipse.swt.dnd.DropTarget.DragOver(DropTarget.java:366)
at org.eclipse.swt.dnd.DropTarget$3.method4(DropTarget.java:250)
at org.eclipse.swt.internal.ole.win32.COMObject.callback4(COMObject.java:101)
at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method)
at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:2531)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3752)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2640)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2604)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2438)
at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:671)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:664)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at com.teamcenter.rac.contmgmt.client.DcApplication.start(DcApplication.java:209)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:369)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:620)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:575)
at org.eclipse.equinox.launcher.Main.run(Main.java:1408)
at org.eclipse.equinox.launcher.Main.main(Main.java:1384)
java.lang.Exception
at de.kgucms.kgu.tps.client.oxygen.extensions.pimod.authordndlistener.PIModAuthorDndListener.isAuthorEventOfInterest(PIModAuthorDndListener.java:85)
at com.oxygenxml.editor.editors.author.d.b(Unknown Source)
at com.oxygenxml.editor.editors.yb.dragOver(Unknown Source)
at org.eclipse.swt.dnd.DNDListener.handleEvent(DNDListener.java:80)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1077)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1062)
at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:774)
at org.eclipse.swt.dnd.DropTarget.DragOver(DropTarget.java:366)
at org.eclipse.swt.dnd.DropTarget$3.method4(DropTarget.java:250)
at org.eclipse.swt.internal.ole.win32.COMObject.callback4(COMObject.java:101)
at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method)
at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:2531)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3752)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2640)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2604)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2438)
at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:671)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:664)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at com.teamcenter.rac.contmgmt.client.DcApplication.start(DcApplication.java:209)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:369)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:620)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:575)
at org.eclipse.equinox.launcher.Main.run(Main.java:1408)
at org.eclipse.equinox.launcher.Main.main(Main.java:1384)
java.lang.Exception
at de.kgucms.kgu.tps.client.oxygen.extensions.pimod.authordndlistener.PIModAuthorDndListener.isAuthorEventOfInterest(PIModAuthorDndListener.java:85)
at com.oxygenxml.editor.editors.author.d.b(Unknown Source)
at com.oxygenxml.editor.editors.yb.dragOver(Unknown Source)
at org.eclipse.swt.dnd.DNDListener.handleEvent(DNDListener.java:80)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1077)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1062)
at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:774)
at org.eclipse.swt.dnd.DropTarget.DragOver(DropTarget.java:366)
at org.eclipse.swt.dnd.DropTarget$3.method4(DropTarget.java:250)
at org.eclipse.swt.internal.ole.win32.COMObject.callback4(COMObject.java:101)
at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method)
at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:2531)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3752)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2640)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2604)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2438)
at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:671)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:664)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at com.teamcenter.rac.contmgmt.client.DcApplication.start(DcApplication.java:209)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:369)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:620)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:575)
at org.eclipse.equinox.launcher.Main.run(Main.java:1408)
at org.eclipse.equinox.launcher.Main.main(Main.java:1384)

null
null

java.lang.Exception
at de.kgucms.kgu.tps.client.oxygen.extensions.pimod.authordndlistener.PIModAuthorDndListener.isAuthorEventOfInterest(PIModAuthorDndListener.java:85)
at com.oxygenxml.editor.editors.author.d.b(Unknown Source)
at com.oxygenxml.editor.editors.yb.dragOver(Unknown Source)
at org.eclipse.swt.dnd.DNDListener.handleEvent(DNDListener.java:80)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1077)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1062)
at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:774)
at org.eclipse.swt.dnd.DropTarget.DragOver(DropTarget.java:366)
at org.eclipse.swt.dnd.DropTarget$3.method4(DropTarget.java:250)
at org.eclipse.swt.internal.ole.win32.COMObject.callback4(COMObject.java:101)
at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method)
at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:2531)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3752)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2640)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2604)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2438)
at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:671)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:664)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at com.teamcenter.rac.contmgmt.client.DcApplication.start(DcApplication.java:209)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:369)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:620)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:575)
at org.eclipse.equinox.launcher.Main.run(Main.java:1408)
at org.eclipse.equinox.launcher.Main.main(Main.java:1384)

null
null

java.lang.Exception
at de.kgucms.kgu.tps.client.oxygen.extensions.pimod.authordndlistener.PIModAuthorDndListener.isAuthorEventOfInterest(PIModAuthorDndListener.java:85)
at com.oxygenxml.editor.editors.author.d.b(Unknown Source)
at com.oxygenxml.editor.editors.yb.dragOver(Unknown Source)
at org.eclipse.swt.dnd.DNDListener.handleEvent(DNDListener.java:80)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1077)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1062)
at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:774)
at org.eclipse.swt.dnd.DropTarget.DragOver(DropTarget.java:366)
at org.eclipse.swt.dnd.DropTarget$3.method4(DropTarget.java:250)
at org.eclipse.swt.internal.ole.win32.COMObject.callback4(COMObject.java:101)
at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method)
at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:2531)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3752)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2640)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2604)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2438)
at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:671)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:664)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at com.teamcenter.rac.contmgmt.client.DcApplication.start(DcApplication.java:209)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:369)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:620)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:575)
at org.eclipse.equinox.launcher.Main.run(Main.java:1408)
at org.eclipse.equinox.launcher.Main.main(Main.java:1384)

null

java.lang.Exception
at de.kgucms.kgu.tps.client.oxygen.extensions.pimod.authordndlistener.PIModAuthorDndListener.isAuthorEventOfInterest(PIModAuthorDndListener.java:85)
at com.oxygenxml.editor.editors.author.d.b(Unknown Source)
at com.oxygenxml.editor.editors.yb.dragOver(Unknown Source)
at org.eclipse.swt.dnd.DNDListener.handleEvent(DNDListener.java:80)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1077)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1062)
at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:774)
at org.eclipse.swt.dnd.DropTarget.DragOver(DropTarget.java:366)
at org.eclipse.swt.dnd.DropTarget$3.method4(DropTarget.java:250)
at org.eclipse.swt.internal.ole.win32.COMObject.callback4(COMObject.java:101)
at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method)
at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:2531)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3752)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2640)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2604)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2438)
at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:671)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:664)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at com.teamcenter.rac.contmgmt.client.DcApplication.start(DcApplication.java:209)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:369)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:620)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:575)
at org.eclipse.equinox.launcher.Main.run(Main.java:1408)
at org.eclipse.equinox.launcher.Main.main(Main.java:1384)

null

java.lang.Exception
at de.kgucms.kgu.tps.client.oxygen.extensions.pimod.authordndlistener.PIModAuthorDndListener.isAuthorEventOfInterest(PIModAuthorDndListener.java:85)
at com.oxygenxml.editor.editors.author.d.b(Unknown Source)
at com.oxygenxml.editor.editors.yb.dragOver(Unknown Source)
at org.eclipse.swt.dnd.DNDListener.handleEvent(DNDListener.java:80)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1077)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1062)
at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:774)
at org.eclipse.swt.dnd.DropTarget.DragOver(DropTarget.java:366)
at org.eclipse.swt.dnd.DropTarget$3.method4(DropTarget.java:250)
at org.eclipse.swt.internal.ole.win32.COMObject.callback4(COMObject.java:101)
at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method)
at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:2531)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3752)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2640)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2604)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2438)
at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:671)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:664)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at com.teamcenter.rac.contmgmt.client.DcApplication.start(DcApplication.java:209)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:369)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:620)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:575)
at org.eclipse.equinox.launcher.Main.run(Main.java:1408)
at org.eclipse.equinox.launcher.Main.main(Main.java:1384)

null

java.lang.Exception
at de.kgucms.kgu.tps.client.oxygen.extensions.pimod.authordndlistener.PIModAuthorDndListener.isAuthorEventOfInterest(PIModAuthorDndListener.java:85)
at com.oxygenxml.editor.editors.author.d.b(Unknown Source)
at com.oxygenxml.editor.editors.yb.dragOver(Unknown Source)
at org.eclipse.swt.dnd.DNDListener.handleEvent(DNDListener.java:80)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1077)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1062)
at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:774)
at org.eclipse.swt.dnd.DropTarget.DragOver(DropTarget.java:366)
at org.eclipse.swt.dnd.DropTarget$3.method4(DropTarget.java:250)
at org.eclipse.swt.internal.ole.win32.COMObject.callback4(COMObject.java:101)
at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method)
at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:2531)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3752)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2640)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2604)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2438)
at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:671)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:664)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at com.teamcenter.rac.contmgmt.client.DcApplication.start(DcApplication.java:209)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:369)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:620)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:575)
at org.eclipse.equinox.launcher.Main.run(Main.java:1408)
at org.eclipse.equinox.launcher.Main.main(Main.java:1384)

null

java.lang.Exception
at de.kgucms.kgu.tps.client.oxygen.extensions.pimod.authordndlistener.PIModAuthorDndListener.isAuthorEventOfInterest(PIModAuthorDndListener.java:85)
at com.oxygenxml.editor.editors.author.d.b(Unknown Source)
at com.oxygenxml.editor.editors.yb.dragOver(Unknown Source)
at org.eclipse.swt.dnd.DNDListener.handleEvent(DNDListener.java:80)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1077)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1062)
at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:774)
at org.eclipse.swt.dnd.DropTarget.DragOver(DropTarget.java:366)
at org.eclipse.swt.dnd.DropTarget$3.method4(DropTarget.java:250)
at org.eclipse.swt.internal.ole.win32.COMObject.callback4(COMObject.java:101)
at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method)
at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:2531)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3752)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2640)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2604)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2438)
at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:671)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:664)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at com.teamcenter.rac.contmgmt.client.DcApplication.start(DcApplication.java:209)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:369)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:620)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:575)
at org.eclipse.equinox.launcher.Main.run(Main.java:1408)
at org.eclipse.equinox.launcher.Main.main(Main.java:1384)

null

java.lang.Exception
at de.kgucms.kgu.tps.client.oxygen.extensions.pimod.authordndlistener.PIModAuthorDndListener.isAuthorEventOfInterest(PIModAuthorDndListener.java:85)
at com.oxygenxml.editor.editors.author.d.b(Unknown Source)
at com.oxygenxml.editor.editors.yb.dragOver(Unknown Source)
at org.eclipse.swt.dnd.DNDListener.handleEvent(DNDListener.java:80)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1077)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1062)
at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:774)
at org.eclipse.swt.dnd.DropTarget.DragOver(DropTarget.java:366)
at org.eclipse.swt.dnd.DropTarget$3.method4(DropTarget.java:250)
at org.eclipse.swt.internal.ole.win32.COMObject.callback4(COMObject.java:101)
at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method)
at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:2531)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3752)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2640)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2604)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2438)
at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:671)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:664)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at com.teamcenter.rac.contmgmt.client.DcApplication.start(DcApplication.java:209)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:369)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:620)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:575)
at org.eclipse.equinox.launcher.Main.run(Main.java:1408)
at org.eclipse.equinox.launcher.Main.main(Main.java:1384)

null

java.lang.Exception
at de.kgucms.kgu.tps.client.oxygen.extensions.pimod.authordndlistener.PIModAuthorDndListener.isAuthorEventOfInterest(PIModAuthorDndListener.java:85)
at com.oxygenxml.editor.editors.author.d.b(Unknown Source)
at com.oxygenxml.editor.editors.yb.dropAccept(Unknown Source)
at org.eclipse.swt.dnd.DNDListener.handleEvent(DNDListener.java:100)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1077)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1062)
at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:774)
at org.eclipse.swt.dnd.DropTarget.Drop(DropTarget.java:418)
at org.eclipse.swt.dnd.DropTarget$3.method6(DropTarget.java:258)
at org.eclipse.swt.internal.ole.win32.COMObject.callback6(COMObject.java:119)
at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method)
at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:2531)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3752)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2640)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2604)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2438)
at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:671)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:664)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at com.teamcenter.rac.contmgmt.client.DcApplication.start(DcApplication.java:209)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:369)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:620)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:575)
at org.eclipse.equinox.launcher.Main.run(Main.java:1408)
at org.eclipse.equinox.launcher.Main.main(Main.java:1384)

null

java.lang.Exception
at de.kgucms.kgu.tps.client.oxygen.extensions.pimod.authordndlistener.PIModAuthorDndListener.isAuthorEventOfInterest(PIModAuthorDndListener.java:85)
at com.oxygenxml.editor.editors.author.d.b(Unknown Source)
at com.oxygenxml.editor.editors.yb.drop(Unknown Source)
at org.eclipse.swt.dnd.DNDListener.handleEvent(DNDListener.java:90)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1077)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1062)
at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:774)
at org.eclipse.swt.dnd.DropTarget.Drop(DropTarget.java:456)
at org.eclipse.swt.dnd.DropTarget$3.method6(DropTarget.java:258)
at org.eclipse.swt.internal.ole.win32.COMObject.callback6(COMObject.java:119)
at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method)
at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:2531)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3752)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2640)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2604)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2438)
at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:671)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:664)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at com.teamcenter.rac.contmgmt.client.DcApplication.start(DcApplication.java:209)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:369)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:620)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:575)
at org.eclipse.equinox.launcher.Main.run(Main.java:1408)
at org.eclipse.equinox.launcher.Main.main(Main.java:1384)

15:18:56,586 60169 ERROR [ main ] ro.sync.ecss.strictediting.p - Problem during paste of document fragment, both fragment and text content are null
Here is the code according to the output:

Code: Select all


 @Override
public boolean isAuthorEventOfInterest(DropTargetEvent event) {
if (TextTransfer.getInstance().isSupportedType(
event.currentDataType)) {
String textContent = (String) TextTransfer.getInstance()
.nativeToJava(event.currentDataType);
// print textContent
System.out.println(textContent);

if (textContent instanceof String) {
return textContent.startsWith(TEXT_DROP_PREFIX);
}
}
// print stack
new Exception().printStackTrace();

return false;
}
So I do print the textcontent and then a stacktrace all the time the isAuthorEventOfInterest method is invoked.

Even your classes alert an error:

15:18:56,586 60169 ERROR [ main ] ro.sync.ecss.strictediting.p - Problem during paste of document fragment, both fragment and text content are null

This is the output, when I do the native to java conversion in every method:

The first value is the name of the method and the second one the result of the nativeToJava Method.

Code: Select all


isAuthorEventOfInterest - kguPreviewRefNodenote
authorDragEnter - null
isAuthorEventOfInterest - null
isAuthorEventOfInterest - null
isAuthorEventOfInterest - null
isAuthorEventOfInterest - null
isAuthorEventOfInterest - null
isAuthorEventOfInterest - null
isAuthorEventOfInterest - null
isAuthorEventOfInterest - null
isAuthorEventOfInterest - null
isAuthorEventOfInterest - null
isAuthorEventOfInterest - null
isAuthorEventOfInterest - null
isAuthorEventOfInterest - null
isAuthorEventOfInterest - null
isAuthorEventOfInterest - null
isAuthorEventOfInterest - null
isAuthorEventOfInterest - null
isAuthorEventOfInterest - null
isAuthorEventOfInterest - null
isAuthorEventOfInterest - null
isAuthorEventOfInterest - null
isAuthorEventOfInterest - null
isAuthorEventOfInterest - null
isAuthorEventOfInterest - null
isAuthorEventOfInterest - null
isAuthorEventOfInterest - null
isAuthorEventOfInterest - null
isAuthorEventOfInterest - null
isAuthorEventOfInterest - null
isAuthorEventOfInterest - null
isAuthorEventOfInterest - null
isAuthorEventOfInterest - null
isAuthorEventOfInterest - null
isAuthorEventOfInterest - null
isAuthorEventOfInterest - null
isAuthorEventOfInterest - null
isAuthorEventOfInterest - null
isAuthorEventOfInterest - null
isAuthorEventOfInterest - null
isAuthorEventOfInterest - null
isAuthorEventOfInterest - null
isAuthorEventOfInterest - null
isAuthorEventOfInterest - null
isAuthorEventOfInterest - null
isAuthorEventOfInterest - null
isAuthorEventOfInterest - null
isAuthorEventOfInterest - null
isAuthorEventOfInterest - null
isAuthorEventOfInterest - null
isAuthorEventOfInterest - null
isAuthorEventOfInterest - null
isAuthorEventOfInterest - null
isAuthorEventOfInterest - null
isAuthorEventOfInterest - null
isAuthorEventOfInterest - null
isAuthorEventOfInterest - null
isAuthorEventOfInterest - null
isAuthorEventOfInterest - null
isAuthorEventOfInterest - null
isAuthorEventOfInterest - null
isAuthorEventOfInterest - null
isAuthorEventOfInterest - null
isAuthorEventOfInterest - null
isAuthorEventOfInterest - null
isAuthorEventOfInterest - null
isAuthorEventOfInterest - null
isAuthorEventOfInterest - null
isAuthorEventOfInterest - null
isAuthorEventOfInterest - null
isAuthorEventOfInterest - null
isAuthorEventOfInterest - null
isAuthorEventOfInterest - null
isAuthorEventOfInterest - null
isAuthorEventOfInterest - null
isAuthorEventOfInterest - null
15:45:37,136 6299 ERROR [ main ] ro.sync.ecss.strictediting.p - Problem during paste of document fragment, both fragment and text content are null
So at some point the content becomes null. :(

As an aside the drag comes from a webbrowser:
Here is the JavaScript Code:

Code: Select all



// attach event listener for DnD
element.addEventListener('dragstart', handleDragStart, false);
element.addEventListener('dragover', handleDragOver, false);

function handleDragStart(e) {

var idAttr = e.target.getAttribute('id');

e.dataTransfer.effectAllowed='copyMove';
e.dataTransfer.setData('text', 'kguPreviewRefNode'+idAttr);
e.dataTransfer.setDragImage(ev.target,0,0);

return true;
}

function handleDragOver(e){
e.preventDefault();
}
The JavaScript Code works well, when I use your TextDnDLister and just override the ro.sync.ecss.extensions.api.AuthorSchemaAwareEditingHandlerAdapter.handlePasteFragment(...) method.

Best regards,

Simon

Re: Use TextTransfer in an AuthorDnDListener

Posted: Fri Oct 18, 2013 2:26 pm
by Radu
Hi Simon,

Here's how I tested. I created and opened in the Web Browser (Windows 7, Firefox) a "test.html" with the content:

Code: Select all

<!DOCTYPE html SYSTEM "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>TEST</title>
</head>
<body>
<p id="para">THIS IS PARA </p>
<script type="text/javascript">
function handleDragStart(e) {
console.log("EVENIMENT ", e);
e.dataTransfer.effectAllowed='copyMove';
e.dataTransfer.setData('text', 'kguPreviewRefNode');
return true;
}

function handleDragOver(e){
e.preventDefault();
}
var element = document.getElementById("para");
// attach event listener for DnD
element.addEventListener('dragstart', handleDragStart, false);
element.addEventListener('dragover', handleDragOver, false);

</script>
</body>
</html>
My extensions bundle implementation had this method overwritten:

Code: Select all

  /**
* @see ro.sync.ecss.extensions.api.ExtensionsBundle#createAuthorSWTDndListener()
*/
@Override
public AuthorDnDListener createAuthorSWTDndListener() {
return new AuthorDnDListener() {
@Override
public String getDescription() {
return null;
}

@Override
public boolean isAuthorEventOfInterest(DropTargetEvent event) {
System.err.println("CHECK INTERESTING " + event);
System.err.println("CURRENT " + event.currentDataType);
if (TextTransfer.getInstance().isSupportedType(
event.currentDataType)) {
System.err.println("WE HAVE TEXT");
String textContent = (String) TextTransfer.getInstance()
.nativeToJava(event.currentDataType);
// print textContent
System.err.println(textContent);

if (textContent instanceof String) {
return textContent.startsWith("kgu");
}
}
// print stack
new Exception().printStackTrace();

return false;
}
@Override
public void init(AuthorAccess access) {
}

@Override
public Transfer[] getAuthorTransfers() {
return null;
}

@Override
public void authorDropAccept(DropTargetEvent event) {
System.err.println("DROP ACCEPT CALLED");
}

@Override
public void authorDrop(DropTargetEvent event) {
System.err.println("DROP");
}

@Override
public void authorDragOver(DropTargetEvent event) {
}
@Override
public void authorDragOperationChanged(DropTargetEvent event) {
}
@Override
public void authorDragLeave(DropTargetEvent event) {
}
@Override
public void authorDragEnter(DropTargetEvent event) {
}
};
}
I dragged from the browser to an XML opened in the Author mode. All events which came on isAuthorEventOfInterest has the relevant text inside them and so they were accepted. When I dropped the "authorDrop" callback was called.

Could you also test such a small example on your side?

Regards,
Radu

Re: Use TextTransfer in an AuthorDnDListener

Posted: Fri Nov 08, 2013 2:12 pm
by SSC
Hello Radu,

could you please add the new HTML 5 draggable="true" attribute to your <p> xml element?

Code: Select all


<p id="para" draggable="true">THIS IS PARA </p>
I recognised that it works without the draggable attribute, but in case the draggable attribute is set I do only once get the kguPreviewRefNode text from the nativeToJave method and all other times the de.kgucms.kgu.tps.client.oxygen.extensions.pimod.authordndlistener.TestDnDListener.isAuthorEventOfInterest(DropTargetEvent) is invoked the nativeToJava method returns always null.

You should be able to reproduce this behavior, when you set the HTML 5 draggable="true" attribute.

I do not know what goes wrong internally, but in our "workaround" for Oxygen 15.0, when I do override the de.kgucms.kgu.tps.client.oxygen.extensions.pimod.extensionsbundle.PiModSchemaAwareEditingHandler.handlePasteFragment(int, AuthorDocumentFragment[], int, AuthorAccess) method I can get the kguPreviewRefNode text, which is in the AuthorDocumentFragment, which is passed.

Do you have an Idea, why the nativeToJava method does return the kguPreviewRefNode text only once?

Best regards,

Simon

Re: Use TextTransfer in an AuthorDnDListener

Posted: Fri Nov 08, 2013 2:33 pm
by SSC
Hi Radu,

one important thing I forgot to mention is that the Eclipse internal org.eclipse.swt.browser.Browser is used and not an external browser like firefox.
The org.eclipse.swt.browser.Browser internally used the Microsoft Internet-Explorer, but unfortunately with the standalone Microsoft Internet-Explorer it also works.
It just does not work with the Eclipse internal one.

But somehow you are able to manage it, because of the fact that I can get the kguPreviewRefNode in the ro.sync.ecss.extensions.api.AuthorSchemaAwareEditingHandlerAdapter.handlePasteFragment(int, AuthorDocumentFragment[], int, AuthorAccess), which I have overridden.

Best regards,

Simon

Re: Use TextTransfer in an AuthorDnDListener

Posted: Fri Nov 08, 2013 2:38 pm
by SSC
Hi Radu,

one last hint.
We do use the org.eclipse.swt.browser.Browser of Eclipse 3.7

So to reproduce it, you should use the Eclipse 3.7 internal browser, load your HTML sample with the HTML 5 draggable="true" attribute and your sample AuthorDnDListener.

Best regards,

Simon

Re: Use TextTransfer in an AuthorDnDListener

Posted: Fri Nov 08, 2013 3:42 pm
by Radu
Hi Simon,

I reproduced the issue setting the "draggable" attribute on the paragraph and by loading the HTML in the internal Eclipse browser, then dropping.
Indeed initially the text was in the event on the initial callback of isAuthorEventOfInterest(DropTargetEvent) and on subsequent callbacks it was not there anymore.

Here's what I found out:

The first time the code requests TextTransfer.getInstance() .nativeToJava(event.currentDataType); on the event, it receives the correct text from it.
On subsequent times, even in the same method, nothing is returned.
This is either requested by your code in the custom DND listener or by the Oxygen code. But the Oxygen code does not request the text when dragging over the editor, it requests it only when dropping it.

You can try this code in your custom DND handler:

Code: Select all

      @Override
public boolean isAuthorEventOfInterest(DropTargetEvent event) {
if (TextTransfer.getInstance().isSupportedType(
event.currentDataType)) {
System.err.println("WE HAVE TEXT");
String textContent = (String) TextTransfer.getInstance()
.nativeToJava(event.currentDataType);
// print textContent WILL WORK
System.err.println(textContent);

textContent = (String) TextTransfer.getInstance()
.nativeToJava(event.currentDataType);
// print textContent WILL NOT WORK ANYMORE
System.err.println(textContent);
return false;
}
return false;
}
In the same method TextTransfer.getInstance().nativeToJava(event.currentDataType) gets called twice, the first time it works and the second time it does not.

So Oxygen's default behavior works because Oxygen requests the text content from the event only once, when the object is dropped.

In my opinion this is a bug somewhere in the Eclipse platform.

Regards,
Radu