@Override public IOleAutomation getAutomation() { if (oleAutomationLazy == null) { oleAutomationLazy = new OleAutomationImpl(new OleAutomation(getOleControlSite())); } return oleAutomationLazy; }
static String getTypeInfo(final OleAutomation auto) { final StringBuilder result = new StringBuilder(); final TYPEATTR typeattr = auto.getTypeInfoAttributes(); if (typeattr != null) { if (typeattr.cFuncs > 0) { result.append("Functions :\n"); } for (int i = 0; i < typeattr.cFuncs; i++) { final OleFunctionDescription description = auto.getFunctionDescription(i); result.append(getInvokeKind(description.invokeKind) + " (id = " + description.id + ") : " + "\n\tSignature : " + getTypeName(description.returnType) + " " + description.name + "(" + getFunctionDescription(description) + ")" + "\n\tDescription : " + description.documentation + "\n\tHelp File : " + description.helpFile + "\n"); } if (typeattr.cVars > 0) { result.append("\n\nVariables :\n"); } for (int i = 0; i < typeattr.cVars; i++) { final OlePropertyDescription data = auto.getPropertyDescription(i); result.append("PROPERTY (id = " + data.id + ") :" + "\n\tName : " + data.name + "\n\tType : " + getTypeName(data.type) + "\n"); } } return result.toString(); }
OleAutomationImpl(final OleAutomation oleAutomation) { Assert.paramNotNull(oleAutomation, "oleAutomation"); this.oleAutomation = oleAutomation; this.oleEventObservable = new OleEventObservable(oleAutomation); this.oleEventObservable.setSwtOleControlSite(getOleControlSite()); }
OleEventObservable(final OleAutomation oleAutomation) { this.oleAutomation = oleAutomation; this.listenersMap = new HashMap<Integer, Tuple<OleListener, Set<IOleEventListener>>>(); }