Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
Copyright (c) 2011, 2012 SAP AG 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: Lazar Kirchev, SAP AG - initial API and implementation /
package org.eclipse.equinox.console.commands;
public class ManCommand {
	public ManCommand(BundleContext context) {
		this. = context;
	}
	public void startService() {
		Dictionary<StringObjectprops = new Hashtable<StringObject>();
		props.put(."equinox");
		props.put(.new String[] {"man"});
		.registerService(ManCommand.class.getName(), thisprops);
	}
	public void man(CommandSession sessionString... argsthrows Exception {
		StringBuilder builder = null;
		if (args.length > 0) {
			builder = new StringBuilder();
			for(String arg : args) {
				builder.append(arg);
				builder.append(" ");
			}
		}
		String cmdForExecution = null;
		if (builder != null) {
			cmdForExecution = "equinox:help" + " " + builder.toString().trim();
else {
			cmdForExecution = "equinox:help";
		}
		session.execute(cmdForExecution);
	}
New to GrepCode? Check out our FAQ X