Hi ForumI am porting a Tool for ArcMap to a Java Addin, and I want to listen to Document events.In the Tools init() function, I do the following, which I found here:((MxDocument)mxDoc).addIDocumentEventsListener(new IDocumentEventsAdapter(){
@Override public void openDocument(IDocumentEventsOpenDocumentEvent e){
JOptionPane.showMessageDialog(null, "Hey: Document opened!");
}
});However, with this code in its init() function, ArcMap hangs and never opens any Document.ArcMap did not hang when I tried the newDocument event instead, however a Document that is closed and re-opened will not fire the the newDocument Event.So, if someone could answer any of my questions here, that would be nice:1) Are we supposed to fire a super.openDocument(e); after having done our own logic? I tried that, but it did not seem to change anything.2) Could it be, that I should rather listen to Events in an Extension than in this Tool?It might be, that Extensions are loaded first..3) Any other suggestions?In the hope of an answerMarianne Wiese