public CommonarchiveFactory getArchiveFactory() { return CommonarchivePackage.eINSTANCE.getCommonarchiveFactory(); }
return; if (notification.getFeature().equals(CommonarchivePackage.eINSTANCE.getFile_URI()) && ((File) notification.getNotifier()).getContainer() == ContainerImpl.this) { fileIndex.remove(notification.getOldValue()); fileIndex.put(notification.getNewValue(), notification.getNotifier()); if (notification.getFeature().equals(CommonarchivePackage.eINSTANCE.getContainer_Files()) && notification.getNotifier() == ContainerImpl.this) { switch (notification.getEventType()) { case Notification.ADD : {
public CommonarchiveSwitch() { factory = (CommonarchiveFactory) CommonarchiveFactoryImpl.getPackage().getEFactoryInstance(); modelPackage = CommonarchiveFactoryImpl.getPackage(); }
private CommonarchiveFactory getCommonarchiveFactory() { return CommonarchivePackage.eINSTANCE.getCommonarchiveFactory(); }
public static CommonarchiveFactory getActiveFactory() { CommonarchivePackage pkg = getPackage(); if (pkg != null) return pkg.getCommonarchiveFactory(); return null; }
public void createModuleFile() throws SaveFailureException { try { CommonarchiveFactory caf = ((CommonarchivePackage) EPackage.Registry.INSTANCE.getEPackage(CommonarchivePackage.eNS_URI)).getCommonarchiveFactory(); EJBComponentLoadStrategyImpl ls = new EJBComponentLoadStrategyImpl(getComponent()); ls.setExportSource(isExportSource()); setModuleFile(caf.openEJBJarFile(ls, getDestinationPath().toOSString())); } catch (Exception e) { throw new SaveFailureException(EJBArchiveOpsResourceHandler.ARCHIVE_OPERATION_OpeningArchive, e); } }
public void export() throws SaveFailureException, CoreException, InvocationTargetException, InterruptedException { IProgressMonitor subMonitor = new SubProgressMonitor(progressMonitor, EXPORT_WORK); IArchive archiveFromComponent = null; try { archiveFromComponent = JavaEEArchiveUtilities.INSTANCE.openArchive(getComponent()); JavaEEQuickPeek quickPeek = JavaEEArchiveUtilities.INSTANCE.getJavaEEQuickPeek(archiveFromComponent); if (quickPeek.getJavaEEVersion() == J2EEConstants.JEE_5_0_ID) { saveArchive(archiveFromComponent, getDestinationPath().toOSString(), subMonitor); } else { CommonarchiveFactory caf = ((CommonarchivePackage) EPackage.Registry.INSTANCE.getEPackage(CommonarchivePackage.eNS_URI)).getCommonarchiveFactory(); AppClientComponentLoadStrategyImpl ls = new AppClientComponentLoadStrategyImpl(getComponent()); ls.setExportSource(isExportSource()); setModuleFile(caf.openApplicationClientFile(ls, getDestinationPath().toOSString())); ls.setProgressMonitor(subMonitor); getModuleFile().saveAsNoReopen(getDestinationPath().toOSString()); } } catch (SaveFailureException ex) { throw ex; } catch (Exception e) { throw new SaveFailureException(AppClientArchiveOpsResourceHandler.ARCHIVE_OPERATION_OpeningArchive, e); } finally { if (archiveFromComponent != null) JavaEEArchiveUtilities.INSTANCE.closeArchive(archiveFromComponent); subMonitor.done(); } }