throw Exceptions.sneakyThrow(_e);
}
}
<<<<<<< HEAD
=======
private void createFolder(final IContainer container) {
try {
boolean _exists = container.exists();
boolean _not = (!_exists);
if (_not) {
IContainer _parent = container.getParent();
this.createFolder(_parent);
((IFolder) container).create(true, false, null);
}
} catch (Throwable _e) {
throw Exceptions.sneakyThrow(_e);
}
}
private void addExportedPackage(final IJavaProject pluginProject, final String... exportedPackages) {
try {
IProject _project = pluginProject.getProject();
final IFile manifestFile = _project.getFile("META-INF/MANIFEST.MF");
final InputStream manifestContent = manifestFile.getContents();
Manifest _xtrycatchfinallyexpression = null;
try {
_xtrycatchfinallyexpression = new Manifest(manifestContent);
} finally {
manifestContent.close();
}
final Manifest manifest = _xtrycatchfinallyexpression;
final Attributes attrs = manifest.getMainAttributes();
boolean _containsKey = attrs.containsKey("Export-Package");
if (_containsKey) {
Object _get = attrs.get("Export-Package");
String _plus = (_get + ",");
String _join = IterableExtensions.join(((Iterable>)Conversions.doWrapArray(exportedPackages)), ",");
String _plus_1 = (_plus + _join);
attrs.putValue("Export-Package", _plus_1);
} else {
String _join_1 = IterableExtensions.join(((Iterable>)Conversions.doWrapArray(exportedPackages)), ",");
attrs.putValue("Export-Package", _join_1);
}
final ByteArrayOutputStream out = new ByteArrayOutputStream();
manifest.write(out);
byte[] _byteArray = out.toByteArray();
final ByteArrayInputStream in = new ByteArrayInputStream(_byteArray);
BufferedInputStream _bufferedInputStream = new BufferedInputStream(in);
manifestFile.setContents(_bufferedInputStream, true, true, null);
} catch (Throwable _e) {
throw Exceptions.sneakyThrow(_e);
}
}
>>>>>>> 58b1917cb17efb59c557fb8bed8d877f99191d27
} |