Commit e1c6003a authored by Robert Smith's avatar Robert Smith
Browse files

Merge branch 'next' of https://github.com/eclipse/ice into next

parents e1bc4841 3daa8230
......@@ -129,7 +129,7 @@ public class LaunchNewICEHandler extends AbstractHandler {
"org.eclipse.ice.parent", "org.eclipse.ice.product", "org.eclipse.ice.repository");
for (IProject p : root.getProjects()) {
String name = p.getName();
if (!currentPlugins.contains(p.getName()) && !name.contains("test")
if (!currentPlugins.contains(p.getName()) && !name.endsWith(".test")
&& !name.contains("Tutorial")
&& !name.contains("target.") && !name.contains("feature")
&& !pluginsToIgnore.contains(name)) {
......
......@@ -12,15 +12,16 @@
*******************************************************************************/
package org.eclipse.ice.projectgeneration.wizards;
import java.io.ByteArrayInputStream;
import java.io.File;
import java.io.IOException;
import java.lang.reflect.InvocationTargetException;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.nio.file.StandardOpenOption;
import static java.nio.file.StandardCopyOption.*;
import java.util.Arrays;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IProjectDescription;
import org.eclipse.core.resources.IResource;
......@@ -271,29 +272,25 @@ public class NewICEItemProjectWizard extends NewPluginProjectFromTemplateWizard
* Update the new project manifest to have required packages imported.
*/
private void updateManifest() {
IProject project = fProjectProvider.getProject();
IFile manifestFile = project.getFolder("META-INF").getFile("MANIFEST.MF");
String packageBase = fProjectProvider.getProjectName();
String sep = System.getProperty("file.separator");
String manifestFile = fProjectProvider.getLocationPath().makeAbsolute().toOSString() + sep
+ fProjectProvider.getProjectName() + sep + "META-INF" + sep + "MANIFEST.MF";
StringBuilder manifestLines = new StringBuilder();
manifestLines.append("Import-Package: org.eclipse.ice.datastructures.form,\n");
manifestLines.append(" org.eclipse.ice.io.serializable,\n");
manifestLines.append(" org.eclipse.ice.item,\n");
manifestLines.append(" org.eclipse.ice.item.jobLauncher,\n");
manifestLines.append(" org.eclipse.ice.item.model,\n");
manifestLines.append(" org.eclipse.ice.datastructures.entry,\n");
manifestLines.append(" org.eclipse.ice.datastructures.ICEObject,\n");
manifestLines.append(" org.eclipse.core.resources,\n");
manifestLines.append(" org.eclipse.core.runtime,\n");
manifestLines.append(" org.eclipse.core.runtime.jobs,\n");
manifestLines.append(" org.slf4j\n");
manifestLines.append("Import-Package: org.slf4j\n");
manifestLines.append("Export-Package: " + packageBase + ".model,\n");
manifestLines.append(" " + packageBase + ".launcher\n");
manifestLines.append("Require-Bundle: org.eclipse.core.resources,\n");
manifestLines.append(" org.eclipse.core.runtime,\n");
manifestLines.append(" org.eclipse.ice.item,\n");
manifestLines.append(" org.eclipse.ice.datastructures,\n");
manifestLines.append(" org.eclipse.ice.io\n");
// Append to the MANIFEST.MF IFile
try {
Files.write(Paths.get(manifestFile), manifestLines.toString().getBytes(), StandardOpenOption.APPEND);
} catch (IOException e) {
logger.error(getClass().getName() + " Exception!", e);
manifestFile.appendContents(new ByteArrayInputStream(manifestLines.toString().getBytes()), IResource.FORCE,
null);
} catch (CoreException e) {
e.printStackTrace();
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment