src/java/isac/wsdialog/DialogGuide.java
author wneuper
Wed, 23 Feb 2005 14:19:00 +0100
changeset 2129 13047b731e42
parent 2082 1f418b3acd49
child 2132 630e014f478b
permissions -rw-r--r--
java-050223a-UserSettingsStart: alles geht wieder nach der
ExtremeProgramming Session von gestern
     1 package isac.wsdialog;
     2 
     3 import isac.bridge.*;
     4 import isac.util.*;
     5 import isac.util.formulae.*;
     6 import isac.util.interfaces.*;
     7 import isac.util.tactics.*;
     8 import isac.util.usersettings.UserSettings;
     9 
    10 import java.io.Serializable;
    11 import java.net.MalformedURLException;
    12 import java.rmi.*;
    13 import java.rmi.registry.LocateRegistry;
    14 import java.rmi.server.UnicastRemoteObject;
    15 import java.util.Vector;
    16 
    17 import org.apache.log4j.Logger;
    18 
    19 /**
    20  * The DialogGuide moderates the communication between two instances working on
    21  * the same CalcTree object. One of these instances is the user, the other a
    22  * math engine. Most probably, the user's GUI, the DialogGuide and the math
    23  * engine reside on different machines and communicate with each other by means
    24  * of RMI.
    25  * 
    26  * @author Alan Krempler
    27  */
    28 public class DialogGuide extends UnicastRemoteObject implements DGuide,
    29 		IToUser, Serializable {
    30 
    31 	static Logger logger_ = Logger.getLogger(BridgeRMI.class.getName());
    32 
    33 	protected CalcTree calc_tree_;
    34 
    35 	//protected CalcHead calc_head_;
    36 
    37 	protected CalcHead calc_head_sub_;
    38 
    39 	protected MathEngine math_engine_;
    40 
    41 	protected int phase_;
    42 
    43 	private Vector datachange_listeners_;
    44 
    45 	private IToWorksheet ui_control_listener_;
    46 	
    47 	protected UserSettings user_settings_;
    48 
    49 	/**
    50 	 * @param ME_path
    51 	 *            URL of the math engine to be used
    52 	 * @throws RemoteException
    53 	 */
    54 	public DialogGuide(String ME_path) throws RemoteException {
    55 		super();
    56 		this.rmiBind();
    57 		datachange_listeners_ = new Vector();
    58 		MathEngine.init(ME_path);
    59 		math_engine_ = MathEngine.getMathEngine();
    60 		phase_ = DIALOGPHASE_IDLE;
    61 	}
    62 
    63 	/**
    64 	 * at the beginning of a calculation as well as of a subproblem
    65 	 * 
    66 	 * @param calc_head
    67 	 *            empty (formalization stored invisibly in the calcTree)
    68 	 * @return calc_head with viestyle set
    69 	 */
    70 	// FIXME.WN040906 do NOT return calc_head, like Formula in solve-phase
    71 	// and like trymatch etc. see below
    72 	CalcHead startSpecifying(CalcHead calc_head) {
    73 		int calchead_view;
    74 		String setting_value;
    75 		
    76 		// set viewstyle according to user settings
    77 		
    78 		// dummy return of getValue() call until class is completed
    79 		// setting_value = user_settings_.getValue("DefaultCalcHeadView");
    80 		setting_value = null;
    81 		
    82 		if (setting_value == null)
    83 			calchead_view = CalcHead.VIEWSTYLE_SINGLELINE;
    84 		else
    85 			calchead_view =  Integer.parseInt(setting_value);
    86 		calc_head.setViewStyle(calchead_view);
    87 		
    88 		
    89 		phase_ = DIALOGPHASE_SPECIFY;
    90 		
    91 		//		 dummy return of getValue() call until class is completed
    92 		// if (user_settings_.getValue("SkipSpecifyingPhase").equals("1")) {
    93 		
    94 		if (true) {
    95 			calc_tree_.completeCalcHead();
    96 			try {
    97 				notifyUserAction(new UserAction(IUIElement.UI_SPECIFY_CALCULATE_1));
    98 			} catch (RemoteException e) {
    99 				// TODO Auto-generated catch block
   100 				e.printStackTrace();
   101 			} catch (DialogProtocolException e) {
   102 				// TODO Auto-generated catch block
   103 				e.printStackTrace();
   104 			}
   105 		}
   106 		
   107 		return calc_head; //WN040906 this is NOT completed !!!
   108 		// FIXME.WN040906 do NOT return calc_head, like Formula in solve-phase
   109 	}
   110 
   111 	// FIXME.WN040906 do NOT return calc_head, like Formula in solve-phase
   112 	public CalcTree startCalculation(int user_id, Formalization f,
   113 			int start_from, int requested_calchead_view) {
   114 
   115 		ICalcIterator temp_iterator;
   116 		
   117 		calc_tree_ = math_engine_.startCalculation(f);
   118 		temp_iterator = calc_tree_.iterator();
   119 		try {
   120 			temp_iterator.moveRoot();
   121 			startSpecifying((CalcHead) temp_iterator.getFormula());
   122 		} catch (RemoteException e) {
   123 			// TODO Auto-generated catch block
   124 			e.printStackTrace();
   125 		}
   126 		// AK removed duplicate completeCalcHead() call 20050222
   127 		// the correct call is in startCalculation()
   128 		// calc_tree_.completeCalcHead();
   129 
   130 		// for the moment, all requests for a view are honored
   131 		//  WN040825 calc_head_.setViewStyle(requested_calchead_view);
   132 		// --->startSpecifying
   133 
   134 		// for testing purposes: if starting an example from the collection,
   135 		// have everything filled in by the KI
   136 		//  WN040825 if (start_from == STARTFROM_EXAMPLE) { --->startSpecifying ?
   137 
   138 		// old-style filling the fields of the calc-head by setting
   139 		// the HELP_ME flag
   140 		// calc_head_.setCalcHeadStatus(CalcHead.CALCHEAD_HELP_ME);
   141 		// }
   142 
   143 		// test code; this protocol is now controlled by the presentation layer
   144 		// do {
   145 		// checkCalcHead()
   146 		// } while (false); // status != ok
   147 		// newCalculation(calc_head_);
   148 		phase_ = DIALOGPHASE_SPECIFY;
   149 		//WN040825 return calc_head_;
   150 		return calc_tree_;
   151 	}
   152 
   153 	public void newCalculation(CalcHead calcHead) {
   154 		try {
   155 			calc_tree_.startSolving();
   156 		} catch (Exception e) {
   157 			// TODO Auto-generated catch block
   158 			e.printStackTrace();
   159 		}
   160 		// calc_tree_ = MathEngine.getMathEngine().startSolving(calcHead);
   161 		calc_tree_.addDataChangeListener(this);
   162 		phase_ = DIALOGPHASE_SOLVE;//WN041122 nein ???!!!???
   163 	}
   164 
   165 	/*
   166 	 * (non-Javadoc)
   167 	 * 
   168 	 * @see isac.wsdialog.IToUser#calcChanged(isac.wsdialog.CalcChangedEvent)
   169 	 */
   170 	public void calcChanged(CalcChangedEvent event) throws RemoteException {
   171 		logger_.fatal(" WS<-. . : calcChanged (unc="
   172 				+ event.getLastUnchangedFormula().toSMLString() + ", del="
   173 				+ event.getLastDeletedFormula().toSMLString() + ", gen="
   174 				+ event.getLastGeneratedFormula().toSMLString());
   175 		ICalcElement calc_elem;
   176 
   177 		try {
   178 			for (int i = 0; i < datachange_listeners_.size(); i++) {
   179 				((IToUser) datachange_listeners_.elementAt(i))
   180 						.calcChanged(event);
   181 			}
   182 			ICalcIterator last_formula = event.getFirstChangedFormula();
   183 			// while searching for last formula, mark intermediate CalcHeads as
   184 			// not
   185 			// to be edited
   186 			// try {
   187 //			while (!last_formula.isLast()) {
   188 //				if (last_formula.getElement().getType() == ICalcElement.CALCEL_CALCHEAD) {
   189 //					last_formula.getElement().setViewStyle(
   190 //							CalcHead.VIEWSTYLE_IN_CALC);
   191 //				}
   192 //				last_formula.moveDown();
   193 //				//TODO last_formula.moveDown.. WN040824 DG may limit the level
   194 //				// down
   195 //			}
   196 //
   197 //			// for now, do not specify the CalcHead, just display it.
   198 //			calc_elem = last_formula.getElement();
   199 //
   200 //			if (calc_elem.getType() == ICalcElement.CALCEL_CALCHEAD) {
   201 //				//WN040826 phase_ = DIALOGPHASE_SPECIFY; --->startSpecifying
   202 //				//WN040826
   203 //				// calc_elem.setViewStyle(CalcHead.VIEWSTYLE_SINGLELINE);--->startSpecifying
   204 //
   205 //				//WN040826calc_head = startSpecifying((CalcHead) calc_elem);
   206 //				// --->startSpecifying
   207 //				startSpecifying((CalcHead) calc_elem);
   208 //				//WN040826 math_engine_.completeCalcHead(calc_head);
   209 //				// --->startSpecifying
   210 //			} else {
   211 //				phase_ = DIALOGPHASE_SOLVE;
   212 //			}
   213 		} catch (Exception e) {
   214 			e.printStackTrace();
   215 		}
   216 	}
   217 
   218 	/**
   219 	 * @deprecated Use {@link #notifyUserAction(IUserAction)}instead
   220 	 */
   221 	public void modifyCalcHead(CalcHead calc_head) {
   222 		// MathEngine.getMathEngine().modifyCalcHead(calc_head);
   223 		calc_tree_.modifyCalcHead(calc_head);
   224 	}
   225 
   226 	/*
   227 	 * (non-Javadoc)
   228 	 * 
   229 	 * @see isac.wsdialog.IToCalc#iterator()
   230 	 */
   231 	public ICalcIterator iterator() {
   232 		try {
   233 			return new DialogIterator((CalcIterator) calc_tree_.iterator());
   234 		} catch (Exception e) {
   235 			e.printStackTrace();
   236 		}
   237 		return null;
   238 	}
   239 
   240 	/**
   241 	 * @see isac.wsdialog.IToCalc#addListener(isac.wsdialog.IToUser)
   242 	 */
   243 	public boolean addDataChangeListener(IToUser listener)
   244 			throws RemoteException {
   245 		if (datachange_listeners_.contains(listener)) {
   246 			return false;
   247 		} else {
   248 			datachange_listeners_.add(listener);
   249 		}
   250 		return true;
   251 	}
   252 
   253 	public boolean registerUIControlListener(IToWorksheet listener)
   254 			throws RemoteException {
   255 		//		if (ui_control_listener_ != null) {
   256 		//			ui_control_listener_.doUIAction(new UserAction(UI_DO_DETACH));
   257 		//		}
   258 		ui_control_listener_ = listener;
   259 		return true;
   260 	}
   261 
   262 	public Tactic fetchProposedTactic() {
   263 		return calc_tree_.fetchProposedTactic();
   264 	}
   265 
   266 	public Tactic[] fetchApplicableTactics(int scope) {
   267 		return calc_tree_.fetchApplicableTactics(scope);
   268 	}
   269 
   270 	/**
   271 	 * @deprecated Use {@link #notifyUserAction(IUserAction)}instead
   272 	 */
   273 	public int setNextTactic(Tactic tactic) {
   274 		return calc_tree_.setNextTactic(tactic);
   275 	}
   276 
   277 	/**
   278 	 * @deprecated Use {@link #notifyUserAction(IUserAction)}instead
   279 	 */
   280 	public int autoCalculate(int scope, int nSteps) {
   281 		return calc_tree_.autoCalculate(scope, nSteps);
   282 	}
   283 
   284 	/**
   285 	 * @deprecated Use {@link #notifyUserAction(IUserAction)}instead
   286 	 */
   287 	public void tryMatch(CalcHead ch, CalcHeadCompoundID problemID)
   288 			throws NotInSpecificationPhaseException {
   289 
   290 		// MathEngine.getMathEngine().tryMatch(ch, problemID);
   291 		math_engine_.tryMatch(ch, problemID);
   292 	}
   293 
   294 	/**
   295 	 * @deprecated Use {@link #notifyUserAction(IUserAction)}instead
   296 	 */
   297 	public void tryRefine(CalcHead ch, CalcHeadCompoundID problemID)
   298 			throws NotInSpecificationPhaseException {
   299 
   300 		// MathEngine.getMathEngine().tryRefine(ch , problemID);
   301 		math_engine_.tryRefine(ch, problemID);
   302 	}
   303 
   304 	public ICalcIterator getActiveFormula() {
   305 		return calc_tree_.getActiveFormula();
   306 	}
   307 
   308 	/**
   309 	 * @throws RemoteException
   310 	 * @deprecated Use {@link #notifyUserAction(IUserAction)}instead
   311 	 */
   312 	public int replaceFormula(CalcFormula newFormula) throws RemoteException {
   313 		return calc_tree_.replaceFormula(newFormula);
   314 	}
   315 
   316 	/**
   317 	 * @throws RemoteException
   318 	 * @deprecated Use {@link #notifyUserAction(IUserAction)}instead
   319 	 */
   320 	public int appendFormula(CalcFormula newFormula) throws RemoteException {
   321 		return calc_tree_.appendFormula(newFormula);
   322 	}
   323 
   324 	/**
   325 	 * @deprecated Use {@link #notifyUserAction(IUserAction)}instead
   326 	 */
   327 	public void moveActiveFormula(ICalcIterator newActiveFormula) {
   328 		calc_tree_.moveActiveFormula(newActiveFormula);
   329 	}
   330 
   331 	/**
   332 	 * Notify the Dialog Guide about interaction from the User
   333 	 * 
   334 	 * @param action
   335 	 * @return true, if the action has been processed, false if the processing
   336 	 *         the action has been denied
   337 	 * @throws RemoteException
   338 	 *  
   339 	 */
   340 	public boolean notifyUserAction(IUserAction action)
   341 			throws DialogProtocolException, RemoteException {
   342 		int request = action.getActionID();
   343 		logger_.fatal(" WS->DG: notifyUserAction request= " + request);
   344 
   345 		//*********** set and check DIALOGPHASE *******************
   346 		// two userActions dont care about the dialogphase
   347 		switch (request) {
   348 		case (UI_CALCULATE_1):
   349 			if (getActiveFormula().onCalcHead()) {
   350 				request = UI_SPECIFY_CALCULATE_1;
   351 				phase_ = DIALOGPHASE_SPECIFY;
   352 			} else {
   353 				request = UI_SOLVE_CALCULATE_1;
   354 				phase_ = DIALOGPHASE_SOLVE;
   355 			}
   356 		break;
   357 		case (UI_CALCULATE_ALL):
   358 			if (getActiveFormula().onCalcHead()) {
   359 				request = UI_SPECIFY_CALCULATE_ALL;
   360 				phase_ = DIALOGPHASE_SPECIFY;
   361 			} else {
   362 				request = UI_SOLVE_CALCULATE_ALL;
   363 				phase_ = DIALOGPHASE_SOLVE;
   364 			}
   365 		}
   366 			
   367 		// al other userActions belong to a certain dialogphase
   368 		switch (phase_) {
   369 		case DIALOGPHASE_IDLE:
   370 			throw new DialogProtocolException(request, phase_);
   371 		case DIALOGPHASE_SPECIFY:
   372 			if (request < UI_DUMMY_FIRST_SPECIFY
   373 					|| request > UI_DUMMY_LAST_SPECIFY)
   374 				throw new DialogProtocolException(request, phase_);
   375 			break;
   376 		case DIALOGPHASE_SOLVE:
   377 			if (request < UI_DUMMY_FIRST_SOLVE || request > UI_DUMMY_LAST_SOLVE)
   378 				throw new DialogProtocolException(request, phase_);
   379 			break;
   380 		}
   381 
   382 		//*********** handle IUserAction's **********************
   383 		CalcHead calc_head = new CalcHead();//?WN0502023?????????
   384 		try {
   385 			calc_head = (CalcHead) calc_tree_.iterator().getFormula();
   386 		} catch (Exception e) {
   387 			e.printStackTrace();
   388 		}
   389 		switch (request) {
   390 		case UI_SPECIFY_TRY_MATCH:
   391 			try {
   392 				tryMatch(calc_head, ((UserActionOnCalcHeadCompoundID) action)
   393 						.getObjectID());
   394 			} catch (NotInSpecificationPhaseException e) {
   395 				throw new DialogMathException(request, phase_, e);
   396 			}
   397 			break;
   398 
   399 		case UI_SPECIFY_TRY_REFINE:
   400 			try {
   401 				tryRefine(calc_head, ((UserActionOnCalcHeadCompoundID) action)
   402 						.getObjectID());
   403 			} catch (NotInSpecificationPhaseException e) {
   404 				throw new DialogMathException(request, phase_, e);
   405 			}
   406 			break;
   407 
   408 		case UI_SPECIFY_CHANGE_VIEW:
   409 			calc_head.setViewStyle(((UserActionOnInt) action).getInt());
   410 			break;
   411 
   412 		case UI_SPECIFY_COMPLETE_CALCHEAD:
   413 			calc_tree_.completeCalcHead();
   414 			// old-style filling the fields of the calc-head by setting
   415 			// the HELP_ME flag
   416 			// calc_head_.setCalcHeadStatus(CalcHead.CALCHEAD_HELP_ME);
   417 			// modifyCalcHead(calc_head_);
   418 			break;
   419 		case UI_SPECIFY_COMPLETE_METHOD:
   420 		case UI_SPECIFY_COMPLETE_THEORY:
   421 		case UI_SPECIFY_COMPLETE_PROBLEM:
   422 		case UI_SPECIFY_COMPLETE_GIVEN:
   423 		case UI_SPECIFY_COMPLETE_FIND:
   424 		case UI_SPECIFY_COMPLETE_RELATE:
   425 			throw new DialogNotImplementedException(request, phase_);
   426 
   427 		case UI_SPECIFY_CHECK_CALCHEAD:
   428 			modifyCalcHead(calc_head);
   429 			break;
   430 
   431 		// was: newCalculation()
   432 		case UI_SPECIFY_CALCULATE_1:
   433 		case UI_SPECIFY_CALCULATE_ALL:
   434 			modifyCalcHead(calc_head);
   435 			if (calc_head.getCalcHeadStatus() != CalcHead.CALCHEAD_CORRECT)
   436 				return false;
   437 
   438 			try {
   439 				calc_tree_.startSolving();
   440 			} catch (Exception e) {
   441 				// TODO Auto-generated catch block
   442 				e.printStackTrace();
   443 			}
   444 			// calc_tree_ = MathEngine.getMathEngine().startSolving(calcHead);
   445 			calc_tree_.addDataChangeListener(this);
   446 			//if (user_settings_.getValue(""))
   447 			calc_tree_.completeCalcHead();
   448 			//@@@@@@@WN050223
   449 			
   450 			phase_ = DIALOGPHASE_SOLVE;
   451 		// fall through to calculate
   452 
   453 		case UI_SOLVE_CALCULATE_1:
   454 			//why not at (*) here ?
   455 		case UI_SOLVE_CALCULATE_ALL:
   456 			switch (request) {
   457 			case UI_SPECIFY_CALCULATE_ALL:
   458 			case UI_SOLVE_CALCULATE_ALL:
   459 				autoCalculate(SCOPE_CALCULATION, 0);
   460 				break;
   461 			case UI_SPECIFY_CALCULATE_1://???
   462 				// break;
   463 			default:
   464 				autoCalculate(SCOPE_CALCULATION, 1);//why not at (*) above ?
   465 				break;
   466 			}
   467 			break;
   468 
   469 		case UI_SOLVE_CALCULATE_SUBPROBLEM:
   470 			autoCalculate(SCOPE_SUBPROBLEM, 0);
   471 			break;
   472 
   473 		case UI_SOLVE_EDIT_ACTIVE_FORMULA:
   474 			ui_control_listener_.doUIAction(new UserAction(UI_DO_EDIT_FORMULA));
   475 			break;
   476 
   477 		case UI_SOLVE_EDIT_ACTIVE_FORMULA_COMPLETE:
   478 			CalcFormula formula = (CalcFormula) ((UserActionOnCalcElement) action)
   479 					.getCalcElement();
   480 			// if the position is null, the formula did not exist, so we try to
   481 			// append a new formula
   482 			if (formula.getPosition() == null) {
   483 				appendFormula(formula);
   484 			} else {
   485 				replaceFormula(formula);
   486 			}
   487 			break;
   488 
   489 		case UI_SOLVE_APPEND_USER_FORMULA:
   490 			// appendFormula((Formula) ((UserActionOnCalcElement)
   491 			// action).getCalcElement());
   492 			ui_control_listener_
   493 					.doUIAction(new UserAction(UI_DO_APPEND_FORMULA));
   494 			break;
   495 
   496 		case UI_SOLVE_MOVE_ACTIVE_FORMULA:
   497 			moveActiveFormula(((UserActionOnIterator) action).getPosition());
   498 			break;
   499 
   500 		case UI_SOLVE_GET_PROPOSED_TACTIC:
   501 			throw new DialogNotImplementedException(request, phase_);
   502 
   503 		case UI_SOLVE_GET_APPLICABLE_TACTICS:
   504 			throw new DialogNotImplementedException(request, phase_);
   505 
   506 		case UI_SOLVE_SET_NEXT_TACTIC:
   507 			setNextTactic((Tactic) ((UserActionOnCalcElement) action)
   508 					.getCalcElement());
   509 			//WN041126 extracted from isac.bridge.CalcTree#setNextTactic @@@
   510 			//autoCalculate(SCOPE_CALCULATION, 1);
   511 			break;
   512 
   513 		case UI_SOLVE_HELP_ENTERING_FORMULA:
   514 			throw new DialogNotImplementedException(request, phase_);
   515 
   516 		case UI_SOLVE_SHOW_ASSUMPTIONS:
   517 			throw new DialogNotImplementedException(request, phase_);
   518 
   519 		case UI_SOLVE_SHOW_DETAILS:
   520 			throw new DialogNotImplementedException(request, phase_);
   521 
   522 		default:
   523 			throw new DialogUnknownActionException(request, phase_);
   524 		}
   525 		return true;
   526 	}
   527 
   528 	private void rmiBind() {
   529 		if (System.getSecurityManager() == null) {
   530 			System.setSecurityManager(new RMISecurityManager());
   531 		}
   532 
   533 		try {
   534 			LocateRegistry.createRegistry(1099);
   535 		} catch (java.rmi.RemoteException exc2) {
   536 			System.err.println("can not create registry: " + exc2.getMessage());
   537 		}
   538 
   539 		String name = "//localhost/isac-DialogGuide";
   540 		try {
   541 			System.out.println("try to bind as " + name);
   542 			Naming.rebind(name, this);
   543 			System.out.println("Dialog Guide bound to " + name);
   544 			//WN040906 was Object Manager ...
   545 		} catch (java.rmi.ConnectException e) {
   546 			System.err.println("failed to contact as " + name
   547 					+ " (creating RMI-Server on localhost: 1099)");
   548 		} catch (RemoteException e) {
   549 			// TODO Auto-generated catch block
   550 			e.printStackTrace();
   551 		} catch (MalformedURLException e) {
   552 			// TODO Auto-generated catch block
   553 			e.printStackTrace();
   554 		}
   555 	}
   556 
   557 	public static void main(String[] args) {
   558 		try {
   559 			new DialogGuide(args[0]);
   560 
   561 		} catch (RemoteException e) {
   562 			e.printStackTrace();
   563 		}
   564 	}
   565 
   566 	/*
   567 	 * (non-Javadoc)
   568 	 * 
   569 	 * @see isac.util.interfaces.IToCalc#startSolving()
   570 	 */
   571 	public void startSolving() throws Exception {
   572 		// TODO Auto-generated method stub
   573 
   574 	}
   575 
   576 	/*
   577 	 * (non-Javadoc)
   578 	 * 
   579 	 * @see isac.util.interfaces.IToCalc#completeCalcHead(isac.util.formulae.CalcHead)
   580 	 */
   581 	public void completeCalcHead(CalcHead calcHead) {
   582 		// TODO Auto-generated method stub
   583 
   584 	}
   585 
   586 	/*
   587 	 * (non-Javadoc)
   588 	 * 
   589 	 * @see isac.util.interfaces.IToCalc#completeCalcHead(isac.util.formulae.CalcHead,
   590 	 *      int)
   591 	 */
   592 	public void completeCalcHead(CalcHead calcHead, int completeItem) {
   593 		// TODO Auto-generated method stub
   594 
   595 	}
   596 
   597 	/*
   598 	 * (non-Javadoc)
   599 	 * 
   600 	 * @see isac.util.interfaces.IToCalc#completeCalcHead()
   601 	 */
   602 	public void completeCalcHead() throws RemoteException {
   603 		// TODO Auto-generated method stub WN050223
   604 
   605 	}
   606 
   607 	/**
   608 	 * @deprecated Use {@link #notifyUserAction(IUserAction)}instead
   609 	 * 
   610 	 * @see isac.util.interfaces.IToCalc#intermediateSteps(isac.util.interfaces.ICalcIterator)
   611 	 */
   612 	public int intermediateSteps(ICalcIterator i) throws RemoteException {
   613 		// TODO Auto-generated method stub
   614 		return 0;
   615 	}
   616 
   617 	/*
   618 	 * (non-Javadoc)
   619 	 * 
   620 	 * @see isac.util.interfaces.IToCalc#getElementsFromTo(isac.util.interfaces.ICalcIterator,
   621 	 *      isac.util.interfaces.ICalcIterator, java.lang.Integer, boolean)
   622 	 */
   623 	public Vector getElementsFromTo(ICalcIterator iterator_from,
   624 			ICalcIterator iterator_to, Integer level,
   625 			boolean result_includes_tactics) throws RemoteException {
   626 		// TODO Auto-generated method stub
   627 		return null;
   628 	}
   629 
   630 }