if (disableSave) return; File file = getActualLocation(getLocation()); File jarFile = getActualLocation(getLocation(), JAR_EXTENSION); boolean compress = "true".equalsIgnoreCase(getProperty(PROP_COMPRESSED)); //$NON-NLS-1$ try { new MetadataRepositoryIO(getProvisioningAgent()).write(this, output); } catch (IOException e) { LogHelper.log(new Status(IStatus.ERROR, Activator.ID, ProvisionException.REPOSITORY_FAILED_WRITE, "Error saving metadata repository: " + getLocation(), e)); //$NON-NLS-1$
if (disableSave) return; File file = getActualLocation(getLocation()); File jarFile = getActualLocation(getLocation(), JAR_EXTENSION); boolean compress = "true".equalsIgnoreCase(getProperty(PROP_COMPRESSED)); //$NON-NLS-1$ try { new MetadataRepositoryIO(getProvisioningAgent()).write(this, output); } catch (IOException e) { LogHelper.log(new Status(IStatus.ERROR, Activator.ID, ProvisionException.REPOSITORY_FAILED_WRITE, "Error saving metadata repository: " + getLocation(), e)); //$NON-NLS-1$
if (disableSave) return; File file = getActualLocation(getLocation()); File jarFile = getActualLocation(getLocation(), JAR_EXTENSION); boolean compress = "true".equalsIgnoreCase(getProperty(PROP_COMPRESSED)); //$NON-NLS-1$ try { new MetadataRepositoryIO(getProvisioningAgent()).write(this, output); } catch (IOException e) { LogHelper.log(new Status(IStatus.ERROR, Activator.ID, ProvisionException.REPOSITORY_FAILED_WRITE, "Error saving metadata repository: " + getLocation(), e)); //$NON-NLS-1$
@Override public String setProperty(String key, String newValue, IProgressMonitor monitor) { try { String oldValue = null; synchronized (this) { oldValue = super.setProperty(key, newValue, monitor); if (oldValue == newValue || (oldValue != null && oldValue.equals(newValue))) return oldValue; save(); } //force repository manager to reload this repository because it caches properties MetadataRepositoryManager manager = (MetadataRepositoryManager) getProvisioningAgent().getService(IMetadataRepositoryManager.SERVICE_NAME); if (manager.removeRepository(getLocation())) manager.addRepository(this); return oldValue; } finally { if (monitor != null) monitor.done(); } }
@Override public String setProperty(String key, String newValue, IProgressMonitor monitor) { try { String oldValue = null; synchronized (this) { oldValue = super.setProperty(key, newValue, monitor); if (oldValue == newValue || (oldValue != null && oldValue.equals(newValue))) return oldValue; save(); } //force repository manager to reload this repository because it caches properties MetadataRepositoryManager manager = (MetadataRepositoryManager) getProvisioningAgent().getService(IMetadataRepositoryManager.SERVICE_NAME); if (manager.removeRepository(getLocation())) manager.addRepository(this); return oldValue; } finally { if (monitor != null) monitor.done(); } }
@Override public String setProperty(String key, String newValue, IProgressMonitor monitor) { try { String oldValue = null; synchronized (this) { oldValue = super.setProperty(key, newValue, monitor); if (oldValue == newValue || (oldValue != null && oldValue.equals(newValue))) return oldValue; save(); } //force repository manager to reload this repository because it caches properties MetadataRepositoryManager manager = (MetadataRepositoryManager) getProvisioningAgent().getService(IMetadataRepositoryManager.SERVICE_NAME); if (manager.removeRepository(getLocation())) manager.addRepository(this); return oldValue; } finally { if (monitor != null) monitor.done(); } }