| /******************************************************************************* |
| * Copyright (c) 2009, 2016 Xored Software Inc and others. |
| * All rights reserved. This program and the accompanying materials |
| * are made available under the terms of the Eclipse Public License v1.0 |
| * which accompanies this distribution, and is available at |
| * http://www.eclipse.org/legal/epl-v10.html |
| * |
| * Contributors: |
| * Xored Software Inc - initial API and implementation and/or initial documentation |
| *******************************************************************************/ |
| package org.eclipse.rcptt.ecl.data.internal.commands; |
| |
| import org.eclipse.core.runtime.CoreException; |
| import org.eclipse.core.runtime.IStatus; |
| import org.eclipse.core.runtime.Status; |
| import org.eclipse.rcptt.ecl.core.Command; |
| import org.eclipse.rcptt.ecl.core.CoreFactory; |
| import org.eclipse.rcptt.ecl.core.EclString; |
| import org.eclipse.rcptt.ecl.data.commands.GetPageName; |
| import org.eclipse.rcptt.ecl.data.objects.Table; |
| import org.eclipse.rcptt.ecl.runtime.ICommandService; |
| import org.eclipse.rcptt.ecl.runtime.IProcess; |
| |
| public class GetPageNameService implements ICommandService { |
| |
| public IStatus service(Command command, IProcess context) |
| throws InterruptedException, CoreException { |
| GetPageName gpn = (GetPageName) command; |
| Table table = gpn.getTable(); |
| |
| String pageName = table.getPageName(); |
| EclString result = CoreFactory.eINSTANCE.createEclString(); |
| result.setValue(pageName); |
| |
| context.getOutput().write(result); |
| return Status.OK_STATUS; |
| } |
| |
| } |