/******************************************************************************* * Copyright (c) 2004, 2013 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * IBM Corporation - initial API and implementation *******************************************************************************/ package org.eclipse.ant.internal.launching; import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer; import org.eclipse.core.runtime.preferences.DefaultScope; import org.eclipse.core.runtime.preferences.IEclipsePreferences; import org.osgi.service.prefs.BackingStoreException; public class AntLaunchingPreferenceInitializer extends AbstractPreferenceInitializer { public AntLaunchingPreferenceInitializer() { super(); } /* * (non-Javadoc) * * @seeorg.eclipse.core.runtime.preferences.AbstractPreferenceInitializer# initializeDefaultPreferences() */ @Override public void initializeDefaultPreferences() { IEclipsePreferences node = DefaultScope.INSTANCE.getNode(AntLaunching.getUniqueIdentifier()); if (node != null) { node.putInt(IAntLaunchingPreferenceConstants.ANT_COMMUNICATION_TIMEOUT, 20000); try { node.flush(); } catch (BackingStoreException e) { // do nothing } } } }