package jp.co.cybec.laxide.editpolicies;

import jp.co.cybec.laxide.model.commands.DirectEditCommand;

import org.eclipse.gef.commands.Command;
import org.eclipse.gef.editpolicies.DirectEditPolicy;
import org.eclipse.gef.requests.DirectEditRequest;

/**
 * 直接編集用のEditPolicy ファイル名：LetsAjaxDirectEditPolicy.java
 * 
 * @author nakamura 作成時刻：14:44:14
 * 
 */
public class LetsAjaxDirectEditPolicy extends DirectEditPolicy {
	protected Command getDirectEditCommand(DirectEditRequest request) {
		DirectEditCommand command = new DirectEditCommand();
		command.setModel(getHost().getModel());
		// セル・エディタから現在のテキストを取得する
		command.setText((String) request.getCellEditor().getValue());
		return command;
	}

	protected void showCurrentEditValue(DirectEditRequest request) {
	}
}
