1

使い方のアドバイスをお願いします

org.eclipse.swt.ole.win32.OleFrame

非UIスレッドで?非 UI スレッド スローで行われる場合は、「OleFrame」を作成します。UIスレッドと非UIスレッドの違いは知っています。私が達成しようとしているのはorg.eclipse.swt.ole.win32.OleAutomation、「IRunnableWithProgress」で使用することです

追加する

for(;mShell.getDisplay().readAndDispatch(););

mShellコンストラクターで指定されます)各OLE呼び出しの後、少しは役立ちますが、十分ではありません...

どんな助けでも大歓迎です。

OutlookHelper outlook = new OutlookHelper(mShell, mModel.getEmailToAddresses(), "Feedback report", emailInfo.body, attachment);
new ProgressMonitorDialog(mShell).run(true, false, outlook);

.

public class OutlookHelper implements IRunnableWithProgress {
    public void run(final IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
        monitor.beginTask("Sending...", IProgressMonitor.UNKNOWN);
        send(monitor);      
        monitor.done();
    }

    private void send(IProgressMonitor monitor) throws InterruptedException {

        monitor.subTask("Creating OLE frame");
        // Will block UI thread here ...
        final OleFrame frame = new OleFrame(mShell, SWT.NONE);

        monitor.subTask("Starting Outlook application");
        // Will block UI thread here ...
        OleClientSite site = new OleClientSite(frame, SWT.NONE, "Outlook.Application");
        ...
    }   
}
4

0 に答える 0