资源简介
osgi自定义控制台命令一章中对应的bundle
代码片段和文件信息
package com.ferry.testcommand;
import org.eclipse.osgi.framework.console.CommandInterpreter;
import org.eclipse.osgi.framework.console.CommandProvider;
import org.osgi.framework.BundleActivator;
import org.osgi.framework.BundleContext;
public class CustomizedCommand implements CommandProvider BundleActivator {
@Override
public void start(BundleContext context) throws Exception {
context.registerService(CommandProvider.class.getName()
new CustomizedCommand() null);
}
@Override
public void stop(BundleContext arg0) throws Exception {
// TODO Auto-generated method stub
}
public void _say(CommandInterpreter ci) {
ci.print(“said:“ + ci.nextArgument());
}
@Override
public String getHelp() {
return “\tsay – say what you input\n“;
}
}
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2012-05-22 11:02 com.ferry.testCommand\
文件 376 2012-05-21 17:30 com.ferry.testCommand\.classpath
文件 682 2012-05-21 17:30 com.ferry.testCommand\.project
目录 0 2012-05-22 11:02 com.ferry.testCommand\.settings\
文件 364 2012-05-21 17:30 com.ferry.testCommand\.settings\org.eclipse.jdt.core.prefs
文件 121 2012-05-21 17:30 com.ferry.testCommand\.settings\org.eclipse.pde.core.prefs
目录 0 2012-05-22 11:02 com.ferry.testCommand\bin\
目录 0 2012-05-22 11:02 com.ferry.testCommand\bin\com\
目录 0 2012-05-22 11:02 com.ferry.testCommand\bin\com\ferry\
目录 0 2012-05-22 11:02 com.ferry.testCommand\bin\com\ferry\testcommand\
文件 1611 2012-05-22 11:01 com.ferry.testCommand\bin\com\ferry\testcommand\CustomizedCommand.class
文件 80 2012-05-21 17:30 com.ferry.testCommand\build.properties
目录 0 2012-05-22 11:02 com.ferry.testCommand\me
文件 379 2012-05-21 17:51 com.ferry.testCommand\me
目录 0 2012-05-22 11:02 com.ferry.testCommand\src\
目录 0 2012-05-22 11:02 com.ferry.testCommand\src\com\
目录 0 2012-05-22 11:02 com.ferry.testCommand\src\com\ferry\
目录 0 2012-05-22 11:02 com.ferry.testCommand\src\com\ferry\testcommand\
文件 809 2012-05-21 17:49 com.ferry.testCommand\src\com\ferry\testcommand\CustomizedCommand.java
文件 1364409 2012-04-23 09:58 org.eclipse.osgi_3.7.2.v20120110-1415.jar
评论
共有 条评论