/** * @see com.ibm.etools.commonarchive.Archive */ public void setManifest(java.util.jar.Manifest aManifest) { setManifest((ArchiveManifest) new org.eclipse.jst.j2ee.commonarchivecore.internal.helpers.ArchiveManifestImpl(aManifest)); }
public ArchiveManifest makeManifest(InputStream in) throws IOException { ArchiveManifest mf = new ArchiveManifestImpl(in); setManifest(mf); return mf; }
public ArchiveManifest makeManifest() { ArchiveManifest mf = new ArchiveManifestImpl(); setManifest(mf); return mf; }
public ArchiveManifest copy(ArchiveManifest mf) { try { ByteArrayOutputStream out = new ByteArrayOutputStream(); mf.write(out); InputStream in = new ByteArrayInputStream(out.toByteArray()); return new ArchiveManifestImpl(in); } catch (IOException iox) { //This should almost never happen, unless there is an issure with memory allocation throw new ArchiveRuntimeException(CommonArchiveResourceHandler.IOException_occurred_while_EXC_, iox); // = "IOException occurred while copying manifest" } }
private static ArchiveManifest getArchiveManifest(final IFile manifestFile) throws ExecutionException { InputStream in = null; try { in = manifestFile.getContents(); ArchiveManifest mf = new ArchiveManifestImpl(new Manifest(in)); return mf; } catch (CoreException ce) { throw new ExecutionException(RefactorResourceHandler.getString("error_reading_manifest"), ce); } catch (IOException io) { throw new ExecutionException(RefactorResourceHandler.getString("error_reading_manifest"), io); } finally { if (in != null) { try { in.close(); } catch (IOException weTried) { //Ignore } } } }
public static ArchiveManifest readManifest(IFile aFile) { InputStream in = null; try { if (aFile == null || !aFile.exists()) return null; in = aFile.getContents(); return new ArchiveManifestImpl(in); } catch (Exception ex) { org.eclipse.jem.util.logger.proxy.Logger.getLogger().logError(ex); return null; } finally { if (in != null) { try { in.close(); } catch (IOException weTried) { } } } }
try { in = manifestFile.getContents(); manifest = new ArchiveManifestImpl(in); } catch (CoreException ce) { throw new IOException(ce.getLocalizedMessage());
public static ArchiveManifest readManifest(IProject p) { InputStream in = null; try { IFile aFile = getManifestFile(p); if (aFile == null || !aFile.exists()) return null; in = aFile.getContents(); return new ArchiveManifestImpl(in); } catch (Exception ex) { org.eclipse.jem.util.logger.proxy.Logger.getLogger().logError(ex); return null; } finally { if (in != null) { try { in.close(); } catch (IOException weTried) { } } } }
try { in = iManifest.getContents(); ArchiveManifest mf = new ArchiveManifestImpl(new Manifest(in)); model.primSetManifest(mf); } catch (CoreException e) { Logger.getLogger().logError(e); model.primSetManifest(new ArchiveManifestImpl()); } catch (IOException iox) { Logger.getLogger().logError(iox); model.primSetManifest(new ArchiveManifestImpl()); caughtManifestException = iox; } finally {
public void selectEAR(int index) { ArchiveManifest mf = new ArchiveManifestImpl((ArchiveManifestImpl) getArchive().getManifest()); JavaEEArchiveUtilities.INSTANCE.closeArchive(earFile); selectedEARComponent = availableEARComponents[index]; initializeSelection(mf); fireNotification(new ClasspathModelEvent(ClasspathModelEvent.EAR_PROJECT_CHANGED)); }
public IStatus execute(IProgressMonitor monitor, IAdaptable adaptable) throws ExecutionException { IFile file = (IFile)model.getProperty(UpdateManifestDataModelProperties.MANIFEST_FILE); String classPathValue = model.getStringProperty(UpdateManifestDataModelProperties.JAR_LIST_TEXT_UI); try { ArchiveManifest mf = J2EEProjectUtilities.readManifest(file); if (mf == null) mf = new ArchiveManifestImpl(); mf.addVersionIfNecessary(); if (model.getBooleanProperty(UpdateManifestDataModelProperties.MERGE)) { mf.mergeClassPath(ArchiveUtil.getTokens(classPathValue)); } else { mf.setClassPath(classPathValue); } if (model.isPropertySet(UpdateManifestDataModelProperties.MAIN_CLASS)) { mf.setMainClass(model.getStringProperty(UpdateManifestDataModelProperties.MAIN_CLASS)); } J2EEProjectUtilities.writeManifest(file, mf); } catch (java.io.IOException ex) { throw new ExecutionException(ex.getMessage(),ex); } return OK_STATUS; }
ArchiveManifest mf = J2EEProjectUtilities.readManifest(p); if (mf == null) mf = new ArchiveManifestImpl(); mf.addVersionIfNecessary(); if (replace)
try { in = manifestFile.getContents(); ArchiveManifest manifest = new ArchiveManifestImpl(in); manifestClasspath = manifest.getClassPathTokenized(); } catch (IOException e) {