@Override
public boolean performFinish() {
Bundle b = FrameworkUtil.getBundle(getClass());
BundleContext ctx = b.getBundleContext();
ServiceReference<RRobot> ref = ctx.getServiceReference(RRobot.class);
final RRobot r = ctx.getService(ref);
FileLoader loader = FileLoader.createLoader();
final RobotTask task = loader.loadTask(URI.createPlatformPluginURI("/at.bestsolution.efxclipse.tooling.pde.ui/generator-tasks/osgi-bundle.rtask", true));
final Map<String,Object> additionalData = new HashMap<>();
additionalData.put("Maven_GroupId", data.getTychoGroupId());
additionalData.put("Maven_RelengArtifactId", data.getTychoRelengArtifactId());
additionalData.put("Maven_RelengArtifactVersion", data.getTychoRelengArtifactVersion());
additionalData.put("Maven_RelengArtifactPath", data.getTychoRelengArtifactPath());
additionalData.put("BundleProject_bundleId",data.getSymbolicname());
additionalData.put("BundleProject_projectName",data.getSymbolicname());
additionalData.put("BundleProject_bundleName",data.getBundleDescription());
additionalData.put("BundleProject_bundleVendor", data.getVendor());
additionalData.put("BundleProject_bundleVersion", data.getVersion());
additionalData.put("BundleProject_EE", data.getEEnv());
additionalData.put("TychoIntegration", data.isTychoIntegration());
WorkspaceModifyOperation w = new WorkspaceModifyOperation() {
@Override
protected void execute(IProgressMonitor monitor) throws CoreException, InvocationTargetException, InterruptedException {
r.executeTask(monitor, task, additionalData);
}
};
try {
getContainer().run(true, true,w);