Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

load class

  • Loading branch information...
commit a87fa799400e52a6a6da53d085118a8d097141a6 1 parent cea65bb
@JPMoresmau authored
View
39 net.sf.eclipsefp.haskell.ui/src/net/sf/eclipsefp/haskell/ui/internal/scion/ScionManager.java
@@ -225,6 +225,7 @@ public void run() {
if (doBrowserSetup){
// ensure class is loaded
BrowserLocalDatabaseRebuildJob.class.toString();
+ BrowserLocalDatabaseRebuildJobListener.class.toString();
browserSetup();
}
@@ -807,7 +808,25 @@ private HaskellConsole getBWHaskellConsole(final IProject project) {
return hCon;
}
+ private class BrowserLocalDatabaseRebuildJobListener extends JobChangeAdapter{
+ @Override
+ public void done( final IJobChangeEvent event ) {
+ if (event.getResult().isOK()) {
+ loadHackageDatabase();
+ } else {
+ Display.getDefault().syncExec( new Runnable() {
+ @Override
+ public void run() {
+ MessageDialog.openError( Display.getDefault().getActiveShell(),
+ UITexts.scionBrowserRebuildingDatabaseError_title,
+ UITexts.scionBrowserRebuildingDatabaseError_message );
+ }
+ } );
+ }
+ super.done( event );
+ }
+ }
/** Specialized Job class that manages rebuilding the Browser database.
* Based in the work of B. Scott Michel.
@@ -821,25 +840,7 @@ public BrowserLocalDatabaseRebuildJob(final String jobTitle) {
super(jobTitle);
// If the build failed, there will be some indication of why it failed.
- addJobChangeListener( new JobChangeAdapter() {
- @Override
- public void done( final IJobChangeEvent event ) {
- if (event.getResult().isOK()) {
- loadHackageDatabase();
- } else {
- Display.getDefault().syncExec( new Runnable() {
- @Override
- public void run() {
- MessageDialog.openError( Display.getDefault().getActiveShell(),
- UITexts.scionBrowserRebuildingDatabaseError_title,
- UITexts.scionBrowserRebuildingDatabaseError_message );
- }
- } );
- }
-
- super.done( event );
- }
- });
+ addJobChangeListener( new BrowserLocalDatabaseRebuildJobListener());
}
@Override
Please sign in to comment.
Something went wrong with that request. Please try again.