ide/src/wombat/gui/frames/MainFrame.java
public void stopAllThreads(final boolean silent, final boolean andRestart) {
		if (silent || JOptionPane.YES_OPTION == JOptionPane.showConfirmDialog(
				this, 
				"Stopping will reset the current Petite process.\nAre you sure you want to do this?", 
				"Confirm Stop", JOptionPane.YES_NO_OPTION)) {
			
			// If we want to restart Petite, add a listener to do just that.
			if (andRestart) {
				Petite.addPetiteListener(new PetiteListener() {
					@Override public void onStop() {
						// Create the new Petite.
						initPetite();
						
						// Add add a listener to reset the display state when the new Petite is ready.
						Petite.addPetiteListener(new PetiteListener() {
							@Override public void onReady() {
								// Tell the user it worked.
								History.setText(">>> Execution halted <<<<\n\n");
						    	History.goToEnd();
						    	
						    	// Don't stack these up.
						    	Petite.removePetiteListener(this);
						    	
						    	// Reenable running code.
						    	setRunning(false);
							}
							
							@Override public void onOutput(String output) {}
							@Override public void onError(Exception ex) {}
							@Override public void onStop() {};
							@Override public void onReset() {};
						});
					}

					@Override public void onReset() {}
					@Override public void onReady() {}
					@Override public void onOutput(String output) {}
					@Override public void onError(Exception ex) {}
				});
			}
				
			// Now, actually stop Petite.
			Petite.stop();
		}
	}
/**
	 * Stop all running worker threads.
	 */
Stop all running worker threads.
Stop all running worker threads .
public void stopAllThreads(final boolean silent, final boolean andRestart) {
		if (silent || JOptionPane.YES_OPTION == JOptionPane.showConfirmDialog(
				this, 
				"Stopping will reset the current Petite process.\nAre you sure you want to do this?", 
				"Confirm Stop", JOptionPane.YES_NO_OPTION)) {
			if (andRestart) {
				Petite.addPetiteListener(new PetiteListener() {
					@Override public void onStop() {
						initPetite();
						Petite.addPetiteListener(new PetiteListener() {
							@Override public void onReady() {
								History.setText(">>> Execution halted <<<<\n\n");
						    	History.goToEnd();
						    	Petite.removePetiteListener(this);
						    	setRunning(false);
							}
							@Override public void onOutput(String output) {}
							@Override public void onError(Exception ex) {}
							@Override public void onStop() {};
							@Override public void onReset() {};
						});
					}
					@Override public void onReset() {}
					@Override public void onReady() {}
					@Override public void onOutput(String output) {}
					@Override public void onError(Exception ex) {}
				});
			}
			Petite.stop();
		}
	}
public void stopAllThreads ( final boolean silent , final boolean andRestart ) { if ( silent || JOptionPane . YES_OPTION == JOptionPane . showConfirmDialog ( this , "Stopping will reset the current Petite process.\nAre you sure you want to do this?" , "Confirm Stop" , JOptionPane . YES_NO_OPTION ) ) { if ( andRestart ) { Petite . addPetiteListener ( new PetiteListener ( ) { @ Override public void onStop ( ) { initPetite ( ) ; Petite . addPetiteListener ( new PetiteListener ( ) { @ Override public void onReady ( ) { History . setText ( ">>> Execution halted <<<<\n\n" ) ; History . goToEnd ( ) ; Petite . removePetiteListener ( this ) ; setRunning ( false ) ; } @ Override public void onOutput ( String output ) { } @ Override public void onError ( Exception ex ) { } @ Override public void onStop ( ) { } ; @ Override public void onReset ( ) { } ; } ) ; } @ Override public void onReset ( ) { } @ Override public void onReady ( ) { } @ Override public void onOutput ( String output ) { } @ Override public void onError ( Exception ex ) { } } ) ; } Petite . stop ( ) ; } }
Stop all running worker threads.
Stop all running worker threads .
// If we want to restart Petite, add a listener to do just that. // Create the new Petite. // Add add a listener to reset the display state when the new Petite is ready. // Tell the user it worked. // Don't stack these up. // Reenable running code. // Now, actually stop Petite.