diff options
author | Brian Vosburgh | 2012-10-25 16:56:36 +0000 |
---|---|---|
committer | Brian Vosburgh | 2012-10-25 16:57:01 +0000 |
commit | ef1a67545c1240c1d9c025e6a036c8daf652bec8 (patch) | |
tree | e7199d90bd74cd06102f662c400de589e52bb125 /jpa | |
parent | 1156b510fe36008cd6dda280483785f0f8086136 (diff) | |
download | webtools.dali-ef1a67545c1240c1d9c025e6a036c8daf652bec8.tar.gz webtools.dali-ef1a67545c1240c1d9c025e6a036c8daf652bec8.tar.xz webtools.dali-ef1a67545c1240c1d9c025e6a036c8daf652bec8.zip |
fix EclipseLinkJpaPreferencesTests that failed in build
Diffstat (limited to 'jpa')
2 files changed, 58 insertions, 0 deletions
diff --git a/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/META-INF/MANIFEST.MF b/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/META-INF/MANIFEST.MF index 1c444422ef..c73f26aa7b 100644 --- a/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/META-INF/MANIFEST.MF +++ b/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/META-INF/MANIFEST.MF @@ -4,6 +4,7 @@ Bundle-Name: %pluginName Bundle-Vendor: %providerName Bundle-SymbolicName: org.eclipse.jpt.jpa.eclipselink.core.tests;singleton:=true Bundle-Version: 2.3.0.qualifier +Bundle-Activator: org.eclipse.jpt.jpa.eclipselink.core.tests.internal.plugin.JptJpaEclipseLinkCoreTestsPlugin Bundle-ActivationPolicy: lazy Bundle-ClassPath: . Bundle-Localization: plugin diff --git a/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/plugin/JptJpaEclipseLinkCoreTestsPlugin.java b/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/plugin/JptJpaEclipseLinkCoreTestsPlugin.java new file mode 100644 index 0000000000..ad93244d89 --- /dev/null +++ b/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/plugin/JptJpaEclipseLinkCoreTestsPlugin.java @@ -0,0 +1,57 @@ +/******************************************************************************* + * Copyright (c) 2012 Oracle. 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: + * Oracle - initial API and implementation + ******************************************************************************/ +package org.eclipse.jpt.jpa.eclipselink.core.tests.internal.plugin; + +import org.eclipse.jpt.common.core.internal.utility.JptPlugin; + +/** + * Configure the core for testing:<ul> + * <li>do not flush preferences + * </ul> + * The WTP build executes + * {@link org.eclipse.jpt.jpa.eclipselink.core.tests.internal.JptJpaEclipseLinkCoreMiscTests} + * standalone + * (as opposed to within + * {@link org.eclipse.jpt.jpa.eclipselink.core.tests.internal.JptJpaEclipseLinkCoreTests}). + * As a result, the + * {@link org.eclipse.jpt.jpa.core.tests.internal.plugin.JptJpaCoreTestsPlugin} + * is not loaded (as it is when executing + * {@link org.eclipse.jpt.jpa.eclipselink.core.tests.internal.JptJpaEclipseLinkCoreTests}). + * So we need to stop preference flushes {@link #start_() here} also. + */ +public class JptJpaEclipseLinkCoreTestsPlugin + extends JptPlugin +{ + // ********** singleton ********** + + private static JptJpaEclipseLinkCoreTestsPlugin INSTANCE; + + public static JptJpaEclipseLinkCoreTestsPlugin instance() { + return INSTANCE; + } + + + // ********** Dali plug-in ********** + + public JptJpaEclipseLinkCoreTestsPlugin() { + super(); + } + + @Override + protected void start_() throws Exception { + super.start_(); + JptPlugin.FlushPreferences = false; + } + + @Override + protected void setInstance(JptPlugin plugin) { + INSTANCE = (JptJpaEclipseLinkCoreTestsPlugin) plugin; + } +} |