Overview | Package | Class | Use | Tree | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.togethersoft.openapi.ide
Interface IdeErrorCheck

public interface IdeErrorCheck

Interface `IdeErrorCheck` provides error checking. Any class implementing this interface defines the `run` method that allows perform actions and set the `IdeErrorInfo` value in case of an error.

The `run` method is called from IdeManager.performCheck method that depends on the boolean value returned by `run` method:

- If no error occurred in the `run` method, returns `false`. Then `IdeManager.performCheck()` method returns `null` error information.
- If an error occurred in the `run()` method, sets the value of `IdeErrorCheck` object and returns `true`. In this case the `IdeManager.performCheck` method will return the `IdeErrorCheck` object with error information set by `run` method.

For example:

###

     import com.togethersoft.openapi.rwi.RwiElement;
     import com.togethersoft.openapi.rwi.RwiProperty;
     import com.togethersoft.openapi.ide.IdeAccess;
     public class MyCheck implements IdeErrorChek{
      private RwiElement myRwiElement=null;
      public boolean run(){
       // ...
       //somehow we have obtained myRwiElement representing an RwiElement
       if (myRwiElement.canSetProperty(RwiProperty.NAME,"newName")){
         return false;
       } else {
         IdeAccess.setErrorMessageInfo("for myRwiElement, the value of 'newName' can not be set as a value of RwiProperty.NAME property");
         return true;
       }
      }
     }Author:TogetherSoftSee Also: IdeManager.performCheck(com.togethersoft.openapi.ide.IdeErrorCheck), IdeManager.setErrorInfo(com.togethersoft.openapi.ide.IdeErrorInfo), IdeErrorInfo, IdeErrorInfoDefault Method Summary booleanrun()

    Method Detail
    runpublic boolean run()Overview Package   Class Use Tree Index Help  PREV CLASS  NEXT CLASS  FRAMES    NO FRAMESSUMMARY: INNER | FIELD | CONSTR | METHODDETAIL: FIELD | CONSTR | METHOD