Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » word-application hangs while running ole-element in background.
word-application hangs while running ole-element in background. [message #630854] Tue, 05 October 2010 10:36
Luke Mising name is currently offline Luke Mising nameFriend
Messages: 7
Registered: October 2010
Junior Member

i've created an ole-frame and clientsite to import and execute a makro inside a word-application. When is try to run the macro (it takes up to 5 min. to execute it) inside the native OleEditor of eclipse the operation will finish successfully. The code does look like this:

OleEditor editor = (OleEditor) IDE.openEditor(window.getActivePage(), job.getTemplate());


This operation will block the Ui for up to 5 minutes.Because of this i tried to execute the makro "in background".

The code does look like this:

final Display display = window.getWorkbench().getDisplay();
		display.asyncExec(new Runnable() {
			public void run() {

OleFrame frame = new OleFrame(shell, SWT.MODELESS);
				monitor.subTask("Creating Word-bridge");
				OleClientSite clientSite = new OleClientSite(frame, SWT.NULL, new File(openFilename));
				monitor.subTask("Handle word application");

				monitor.subTask("Import and running makro (this will take a couple of minutes)");
				InteropHelper.importAndRun(clientSite, makro.getAbsolutePath());


My problem is now that in the secound solution the Word-Application in background stops working for no reason!

I tried to figure out at which point the execution stops and it seems that it stop at the vb-code which moved the cursor in a loop. The code looks like this. Could it be that the ole-bridge has some problems with it? When i move the cursor a single line the code continuous...
Previous Topic:Is there any way to Rotate a widget.
Next Topic:context menu appears on mouseUp under Windows, but on mouseDown under Mac OS
Goto Forum:

Current Time: Sat Jan 25 10:24:36 GMT 2020

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

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

Back to the top