Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » DND - CNF dropAssistant doesn't get executed(The default drop assistant ResourceDropAssistantAdapter get's executed ignoring the custom dropAssistant)
DND - CNF dropAssistant doesn't get executed [message #1250834] Wed, 19 February 2014 16:49
Eclipse User is currently offline Eclipse UserFriend
Messages: 1
Registered: February 2014
Junior Member
Hi,

We have a dropAssistant defined for the extension point = "org.eclipse.ui.navigator.navigatorContent" along with possibleDropTargets. Also the possibleChildren are defined for the navigatorContent.

The definition looks perfect in the plugin.xml. But still the adapter class associated with our custom drop won't get called. While looking into the code for the same in the org.eclipse.ui.navigator.CommonDropAdapter.performDrop() method, I see the following behavior.

for (int i = 0; i < assistants.length; i++) {
            final CommonDropAdapterAssistant localAssistant = assistants[i];// <- gets all the assistants, our assistant comes at 1 index where as default ResourceDropAdapterAssistant at 0th in this array.

            SafeRunner.run(new NavigatorSafeRunnable() {
                public void run() throws Exception {
                    localAssistant.setCurrentEvent(event);
                    IStatus valid = localAssistant.validateDrop(target, getCurrentOperation(),
                            getCurrentTransfer());
                    if (valid != null && valid.isOK()) {
                        if (Policy.DEBUG_DND) {
                            System.out
                                    .println("CommonDropAdapter.drop assistant selected: " + localAssistant + " op: " + event.detail); //$NON-NLS-1$ //$NON-NLS-2$
                        }
                        localAssistant.handleDrop(CommonDropAdapter.this, event, target);
                        retValue[0] = true;//<- for the 0th assisstant ResourceDropAdapterAssistant code gets validated and sets this value true.                    }
                }
            });
            if (retValue[0])//<- so without executing the next dropAssistant i.e ours, the loop exits.
                return true;
        }



I don't see any default attribute to set, defined in the schema of navigatorContent.
Kindly let me know is there anything am missing here to make our custom drop assistant as the default.

Thanks.
Previous Topic:creating a URI containing Path Variables
Next Topic: Custom filename validation after copy paste into same directory
Goto Forum:
  


Current Time: Thu Apr 25 01:26:33 GMT 2024

Powered by FUDForum. Page generated in 0.02737 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top