Hi
I'd like to write an extension such that if the user drags one or more methods/properties from Solution Explorer and drops them onto the Text Editor; I give them the option to generate some code. For example; if we had a class Customer with properties Name and Age, and the VS user drags "Age" from the Solution Explorer, I could search for an appropriate variable near the drop location and prefix the variablename onto the age.
Ie. the example below:
class MyTest {
void myFunc() {
var myCustomer = new Customer();
// drop here
}
}
The user finds the Customer class in SE, and drags age and drops it as indicated.
The plugin identifies a local variable "myCustomer" and insert the code "myCustomer.Age" instead of the huge XML document currently dropped.
I have implemented IDropHandlerProvider but cannot get it to intercept this particular drop operation. Can you advise?