class SaveDef extends StateDef
{
	public SaveDef( String stateName, String savedStateName )
	{
		super( stateName );
		this.savedStateName = savedStateName;
	}

	//
	// Def
	//

	@Override
	public boolean resolve( Grammar grammar ) throws ResolutionException
	{<FILL_FUNCTION_BODY>}

	//
	// Object
	//

	@Override
	public String toString()
	{
		return super.toString() + " " + stateName + ", " + savedStateName;
	}

	// //////////////////////////////////////////////////////////////////////////
	// Private

	private final String savedStateName;
}

		State state = grammar.getState( stateName );
		State savedState = grammar.getState( savedStateName );

		// Only include a resolved state
		if( savedState.isResolved() )
		{
			if( placeHolder != null )
			{
				int location = state.getRules().indexOf( placeHolder );
				state.getRules().remove( placeHolder );
				state.addRuleAt( location, new SaveRule( savedState ) );
			}
			else
				state.addRule( new SaveRule( savedState ) );

			resolved = true;
			return true;
		}
		else if( placeHolder == null )
		{
			// Remember location
			placeHolder = new Rule();
			state.addRule( placeHolder );
		}

		return false;
	
<methods>public void <init>(java.lang.String) ,public java.lang.String getStateName() ,public java.lang.String toString() <variables>protected org.sikuli.support.ide.syntaxhighlight.grammar.Rule placeHolder,protected final non-sealed java.lang.String stateName