/*
         * List<? extends AStatement> statements = selectStatements(); if
         * (statements.isEmpty()) { throw new
         * RuntimeException("Not yet implemented when scope is empty"); }
         * 
         * Stmt newStmt =
         * CxxActions.getValidStatement(CollectionUtils.last(statements).getNode());
         * 
         * insertImpl(position, newStmt);
         * 
         * // Body becomes the parent of this statement return new CxxStatement(newStmt,
         * this);
         */
@Override
    public AJoinPoint insertEndImpl(AJoinPoint node) {
	Stmt newStmt = ClavaNodes.toStmt(node.getNode());
	// Preconditions.checkArgument(newStmt instanceof Stmt,
	// "Expected input of action scope.insertEnd to be a Stmt joinpoint, is a " +
	// node.getJoinPointType());
	CxxActions.insertStmt("after", scope, newStmt, getWeaverEngine());
	// return node;
	// TODO: Consider returning newStmt instead
	return CxxJoinpoints.create(newStmt);
	/*
	 * List<? extends AStatement> statements = selectStatements(); if
	 * (statements.isEmpty()) { throw new
	 * RuntimeException("Not yet implemented when scope is empty"); }
	 * 
	 * Stmt newStmt =
	 * CxxActions.getValidStatement(CollectionUtils.last(statements).getNode());
	 * 
	 * insertImpl(position, newStmt);
	 * 
	 * // Body becomes the parent of this statement return new CxxStatement(newStmt,
	 * this);
	 */
    }
// TODO: Consider returning newStmt instead
return CxxJoinpoints.create(newStmt);
/*
* List<? extends AStatement> statements = selectStatements(); if
* (statements.isEmpty()) { throw new
* RuntimeException("Not yet implemented when scope is empty"); }
*
* Stmt newStmt =
* CxxActions.getValidStatement(CollectionUtils.last(statements).getNode());
*
* insertImpl(position, newStmt);
*
* // Body becomes the parent of this statement return new CxxStatement(newStmt,
* this);
*/
}
@Override
public AJoinPoint insertEndImpl(AJoinPoint node) {
Stmt newStmt = ClavaNodes.toStmt(node.getNode());
// Preconditions.checkArgument(newStmt instanceof Stmt,
// "Expected input of action scope.insertEnd to be a Stmt joinpoint, is a " +
// node.getJoinPointType());
CxxActions.insertStmt("after", scope, newStmt, getWeaverEngine());
// return node;
// TODO: Consider returning newStmt instead
return CxxJoinpoints.create(newStmt);
/*
* List<? extends AStatement> statements = selectStatements(); if
* (statements.isEmpty()) { throw new
* RuntimeException("Not yet implemented when scope is empty"); }
*
* Stmt newStmt =
* CxxActions.getValidStatement(CollectionUtils.last(statements).getNode());
*
* insertImpl(position, newStmt);
*
* // Body becomes the parent of this statement return new CxxStatement(newStmt,
* this);
*/
}
@Override
public AJoinPoint insertEndImpl(AJoinPoint node) {
Stmt newStmt = ClavaNodes.toStmt(node.getNode());
// Preconditions.checkArgument(newStmt instanceof Stmt,
// "Expected input of action scope.insertEnd to be a Stmt joinpoint, is a " +
// node.getJoinPointType());
CxxActions.insertStmt("after", scope, newStmt, getWeaverEngine());
// return node;
// TODO: Consider returning newStmt instead
return CxxJoinpoints.create(newStmt);
/*
* List<? extends AStatement> statements = selectStatements(); if
* (statements.isEmpty()) { throw new
* RuntimeException("Not yet implemented when scope is empty"); }
*
* Stmt newStmt =
* CxxActions.getValidStatement(CollectionUtils.last(statements).getNode());
*
* insertImpl(position, newStmt);
*
* // Body becomes the parent of this statement return new CxxStatement(newStmt,
* this);
*/
}