Permalink
Browse files

Make a synced refresh of workspace before reading generated file

Solves bug 3563
  • Loading branch information...
1 parent 5025fed commit dc058e5f5e5122830a10b90563f0aaa53a3abb01 @goglepox goglepox committed Sep 11, 2013
@@ -103,6 +103,18 @@ public Object execute(ExecutionEvent event) throws ExecutionException {
.getContentType().isKindOf( cmlType ) ) {
String output =balloon.generate3Dcoordinates( input.getRawLocation()
.toOSString() );
+ Display.getDefault().syncExec( new Runnable(){
+ public void run() {
+ for (IResource res : final_foldersToRefresh){
+ try {
+ res.refreshLocal( IResource.DEPTH_ONE, new NullProgressMonitor() );
+ } catch ( CoreException e ) {
+ logger.error( "Could not refresh resource: " + res + " - " + e.getMessage() );
+ }
+ }
+
+ }
+ });
ICDKManager cdk = net.bioclipse.cdk.business.Activator
.getDefault().getJavaCDKManager();
List<ICDKMolecule> molecules = cdk.loadMolecules(output);

0 comments on commit dc058e5

Please sign in to comment.