diff options
author | pfullbright | 2011-02-25 20:46:36 +0000 |
---|---|---|
committer | pfullbright | 2011-02-25 20:46:36 +0000 |
commit | 5c2c8b97caca2250a85476095c6c9fa2be88f8a4 (patch) | |
tree | f366c4674d1c3347b846b9b230cc0c434eb94aa5 /jaxb/plugins | |
parent | 80617f83784aa681fe4086db5ba05fdba32c2a05 (diff) | |
download | webtools.dali-5c2c8b97caca2250a85476095c6c9fa2be88f8a4.tar.gz webtools.dali-5c2c8b97caca2250a85476095c6c9fa2be88f8a4.tar.xz webtools.dali-5c2c8b97caca2250a85476095c6c9fa2be88f8a4.zip |
added jaxb eclipselink core/ui plugins
Diffstat (limited to 'jaxb/plugins')
25 files changed, 718 insertions, 0 deletions
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/.classpath b/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/.classpath new file mode 100644 index 0000000000..587d7eb60e --- /dev/null +++ b/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/.classpath @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8"?> +<classpath> + <classpathentry kind="src" path="src"/> + <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/> + <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"> + <accessrules> + <accessrule kind="accessible" pattern="org/eclipse/jpt/common/core/**"/> + <accessrule kind="accessible" pattern="org/eclipse/jpt/common/eclipselink/core/**"/> + <accessrule kind="accessible" pattern="org/eclipse/jpt/common/utility/**"/> + <accessrule kind="accessible" pattern="org/eclipse/jpt/jaxb/core/**"/> + <accessrule kind="accessible" pattern="org/eclipse/wst/**"/> + </accessrules> + </classpathentry> + <classpathentry kind="output" path="bin"/> +</classpath> diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/.project b/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/.project new file mode 100644 index 0000000000..d899a36e49 --- /dev/null +++ b/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/.project @@ -0,0 +1,28 @@ +<?xml version="1.0" encoding="UTF-8"?> +<projectDescription> + <name>org.eclipse.jpt.jaxb.eclipselink.core</name> + <comment></comment> + <projects> + </projects> + <buildSpec> + <buildCommand> + <name>org.eclipse.jdt.core.javabuilder</name> + <arguments> + </arguments> + </buildCommand> + <buildCommand> + <name>org.eclipse.pde.ManifestBuilder</name> + <arguments> + </arguments> + </buildCommand> + <buildCommand> + <name>org.eclipse.pde.SchemaBuilder</name> + <arguments> + </arguments> + </buildCommand> + </buildSpec> + <natures> + <nature>org.eclipse.pde.PluginNature</nature> + <nature>org.eclipse.jdt.core.javanature</nature> + </natures> +</projectDescription> diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/.settings/org.eclipse.jdt.core.prefs b/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000000..e55a243174 --- /dev/null +++ b/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,12 @@ +#Thu Feb 17 16:49:58 EST 2011 +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5 +org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve +org.eclipse.jdt.core.compiler.compliance=1.5 +org.eclipse.jdt.core.compiler.debug.lineNumber=generate +org.eclipse.jdt.core.compiler.debug.localVariable=generate +org.eclipse.jdt.core.compiler.debug.sourceFile=generate +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.source=1.5
\ No newline at end of file diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/META-INF/MANIFEST.MF b/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/META-INF/MANIFEST.MF new file mode 100644 index 0000000000..c20c179de3 --- /dev/null +++ b/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/META-INF/MANIFEST.MF @@ -0,0 +1,22 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: %pluginName +Bundle-Vendor: %providerName +Bundle-SymbolicName: org.eclipse.jpt.jaxb.eclipselink.core;singleton:=true +Bundle-Version: 1.0.0.qualifier +Bundle-Activator: org.eclipse.jpt.jaxb.eclipselink.core.JptJaxbEclipseLinkCorePlugin +Bundle-ActivationPolicy: lazy +Bundle-ClassPath: . +Bundle-Localization: plugin +Bundle-RequiredExecutionEnvironment: J2SE-1.5 +Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.7.0,4.0.0)", + org.eclipse.jdt.core;bundle-version="[3.7.0,4.0.0)", + org.eclipse.jpt.common.core;bundle-version="[1.0.0,2.0.0)", + org.eclipse.jpt.common.eclipselink.core;bundle-version="[1.0.0,2.0.0)", + org.eclipse.jpt.common.utility;bundle-version="[2.0.0,3.0.0)", + org.eclipse.jpt.jaxb.core;bundle-version="[1.0.0,2.0.0)", + org.eclipse.jst.common.project.facet.core;bundle-version="[1.4.200,2.0.0)", + org.eclipse.jst.j2ee;bundle-version="[1.1.500,2.0.0)" +Export-Package: org.eclipse.jpt.jaxb.eclipselink.core, + org.eclipse.jpt.jaxb.eclipselink.core.internal.libval, + org.eclipse.jpt.jaxb.eclipselink.core.internal.v2_3 diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/about.html b/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/about.html new file mode 100644 index 0000000000..be534ba44f --- /dev/null +++ b/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/about.html @@ -0,0 +1,34 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN"> +<HTML> + +<head> +<title>About</title> +<meta http-equiv=Content-Type content="text/html; charset=ISO-8859-1"> +</head> + +<BODY lang="EN-US"> + +<H3>About This Content</H3> + +<P>May 02, 2008</P> + +<H3>License</H3> + +<P>The Eclipse Foundation makes available all content in this plug-in +("Content"). Unless otherwise indicated below, the Content is provided to you +under the terms and conditions of the Eclipse Public License Version 1.0 +("EPL"). A copy of the EPL is available at +<A href="http://www.eclipse.org/org/documents/epl-v10.php">http://www.eclipse.org/org/documents/epl-v10.php</A>. +For purposes of the EPL, "Program" will mean the Content.</P> + +<P>If you did not receive this Content directly from the Eclipse Foundation, the +Content is being redistributed by another party ("Redistributor") and different +terms and conditions may apply to your use of any object code in the Content. +Check the Redistributor's license that was provided with the Content. If no such +license exists, contact the Redistributor. Unless otherwise indicated below, the +terms and conditions of the EPL still apply to any source code in the Content +and such source code may be obtained at +<A href="http://www.eclipse.org/">http://www.eclipse.org/</A>.</P> + +</BODY> +</HTML> diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/build.properties b/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/build.properties new file mode 100644 index 0000000000..cf53a4f106 --- /dev/null +++ b/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/build.properties @@ -0,0 +1,19 @@ +################################################################################ +# Copyright (c) 2011 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 +################################################################################ +javacSource=1.5 +javacTarget=1.5 +source.. = src/ +output.. = bin/ +bin.includes = .,\ + META-INF/,\ + about.html,\ + plugin.xml,\ + plugin.properties +jars.compile.order = . diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/plugin.properties b/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/plugin.properties new file mode 100644 index 0000000000..a70771a5cd --- /dev/null +++ b/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/plugin.properties @@ -0,0 +1,26 @@ +################################################################################ +# Copyright (c) 2011 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 +################################################################################ +# ==================================================================== +# To code developer: +# Do NOT change the properties between this line and the +# "%%% END OF TRANSLATED PROPERTIES %%%" line. +# Make a new property name, append to the end of the file and change +# the code to use the new property. +# ==================================================================== + +# ==================================================================== +# %%% END OF TRANSLATED PROPERTIES %%% +# ==================================================================== + +pluginName = Dali Java Persistence Tools - EclipseLink MOXy Support - Core +providerName = Eclipse Web Tools Platform + +MOXY_PLATFORM_GROUP_LABEL = EclipseLink MOXy +MOXY_2_3_PLATFORM_LABEL = EclipseLink MOXy 2.3.x diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/plugin.xml b/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/plugin.xml new file mode 100644 index 0000000000..49dba7a13b --- /dev/null +++ b/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/plugin.xml @@ -0,0 +1,53 @@ +<?xml version="1.0" encoding="UTF-8"?> +<?eclipse version="3.2"?> +<!-- + Copyright (c) 2011 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 + --> + +<plugin> + + <extension + point="org.eclipse.jpt.jaxb.core.jaxbPlatforms"> + + <jaxbPlatformGroup + id="moxy" + label="%MOXY_PLATFORM_GROUP_LABEL"/> + + <jaxbPlatform + id="moxy_2_3" + label="%MOXY_2_3_PLATFORM_LABEL" + factoryClass="org.eclipse.jpt.jaxb.eclipselink.core.internal.v2_3.Moxy_2_3_PlatformDefinitionFactory" + group="moxy" + jaxbFacetVersion="2.2" + default="false"/> + + </extension> + + + <extension + point="org.eclipse.jpt.common.core.libraryValidators"> + + <libraryValidator + id="moxyUserLibraryValidator" + class="org.eclipse.jpt.jaxb.eclipselink.core.internal.libval.MoxyUserLibraryValidator"> + <enablement> + <and> + <with variable="libraryProvider"> + <test property="org.eclipse.jpt.common.core.extendsId" value="jaxb-user-library-provider"/> + </with> + <with variable="config"> + <test property="org.eclipse.jpt.jaxb.core.jaxbPlatformGroup" value="moxy"/> + </with> + </and> + </enablement> + </libraryValidator> + + </extension> + +</plugin> diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/JptJaxbEclipseLinkCorePlugin.java b/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/JptJaxbEclipseLinkCorePlugin.java new file mode 100644 index 0000000000..e69681806f --- /dev/null +++ b/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/JptJaxbEclipseLinkCorePlugin.java @@ -0,0 +1,73 @@ +/******************************************************************************* + * Copyright (c) 2011 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.jaxb.eclipselink.core; + +import org.eclipse.core.runtime.IStatus; +import org.eclipse.core.runtime.Plugin; +import org.eclipse.core.runtime.Status; +import org.osgi.framework.BundleContext; + +public class JptJaxbEclipseLinkCorePlugin + extends Plugin { + + // The plug-in ID + public static final String PLUGIN_ID = "org.eclipse.jpt.jaxb.eclipselink.core"; //$NON-NLS-1$ + + + // ********** singleton ********** + private static JptJaxbEclipseLinkCorePlugin INSTANCE; + + /** + * Return the singleton JPT EclipseLink plug-in. + */ + public static JptJaxbEclipseLinkCorePlugin instance() { + return INSTANCE; + } + + /** + * Log the specified status. + */ + public static void log(IStatus status) { + INSTANCE.getLog().log(status); + } + + /** + * Log the specified message. + */ + public static void log(String msg) { + log(new Status(IStatus.ERROR, PLUGIN_ID, IStatus.OK, msg, null)); + } + + /** + * Log the specified exception or error. + */ + public static void log(Throwable throwable) { + log(new Status(IStatus.ERROR, PLUGIN_ID, IStatus.OK, throwable.getLocalizedMessage(), throwable)); + } + + + // ********** plug-in implementation ********** + + public JptJaxbEclipseLinkCorePlugin() { + super(); + } + + @Override + public void start(BundleContext context) throws Exception { + super.start(context); + INSTANCE = this; + } + + @Override + public void stop(BundleContext context) throws Exception { + INSTANCE = null; + super.stop(context); + } +} diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/MoxyPlatform.java b/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/MoxyPlatform.java new file mode 100644 index 0000000000..cbf4880517 --- /dev/null +++ b/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/MoxyPlatform.java @@ -0,0 +1,30 @@ +/******************************************************************************* + * Copyright (c) 2011 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.jaxb.eclipselink.core; + +import org.eclipse.jpt.jaxb.core.JptJaxbCorePlugin; +import org.eclipse.jpt.jaxb.core.platform.JaxbPlatformDescription; +import org.eclipse.jpt.jaxb.core.platform.JaxbPlatformGroupDescription; + + +public class MoxyPlatform { + + public static final JaxbPlatformGroupDescription GROUP + = JptJaxbCorePlugin.getJaxbPlatformManager().getJaxbPlatformGroup("moxy"); //$NON-NLS-1$ + + public static final JaxbPlatformDescription VERSION_2_3 + = JptJaxbCorePlugin.getJaxbPlatformManager().getJaxbPlatform("moxy_2_3"); //$NON-NLS-1$ + + + /** + * Not for instantiation + */ + private MoxyPlatform() {} +} diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/libval/MoxyUserLibraryValidator.java b/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/libval/MoxyUserLibraryValidator.java new file mode 100644 index 0000000000..9cfa69693b --- /dev/null +++ b/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/libval/MoxyUserLibraryValidator.java @@ -0,0 +1,46 @@ +/******************************************************************************* + * Copyright (c) 2011 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.jaxb.eclipselink.core.internal.libval; + +import java.util.HashSet; +import java.util.Set; +import org.eclipse.core.runtime.IStatus; +import org.eclipse.jpt.common.core.libprov.JptLibraryProviderInstallOperationConfig; +import org.eclipse.jpt.common.core.libval.LibraryValidator; +import org.eclipse.jpt.common.eclipselink.core.internal.libval.EclipseLinkLibValUtil; +import org.eclipse.jpt.jaxb.core.internal.libprov.JaxbUserLibraryProviderInstallOperationConfig; +import org.eclipse.jpt.jaxb.core.platform.JaxbPlatformDescription; +import org.eclipse.jpt.jaxb.eclipselink.core.MoxyPlatform; +import org.eclipse.osgi.service.resolver.VersionRange; + + +/** + * Library validator for Moxy user libraries. + * + * In order to validate that the correct eclipselink.jar is present in the user library, the version + * class which appears in standard EclipseLink libraries will be examined and compared against the + * union of calculated version ranges, depending on the platform specified in the config. + */ +public class MoxyUserLibraryValidator + implements LibraryValidator { + + public IStatus validate(JptLibraryProviderInstallOperationConfig config) { + JaxbUserLibraryProviderInstallOperationConfig jaxbConfig + = (JaxbUserLibraryProviderInstallOperationConfig) config; + JaxbPlatformDescription platform = jaxbConfig.getJaxbPlatform(); + Set<VersionRange> versionRanges = new HashSet<VersionRange>(); + + if (MoxyPlatform.VERSION_2_3.equals(platform)) { + versionRanges.add(new VersionRange("[2.3, 3.0)")); //$NON-NLS-1$ + } + + return EclipseLinkLibValUtil.validate(jaxbConfig.resolve(), versionRanges); + } +} diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/v2_3/Moxy_2_3_PlatformDefinition.java b/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/v2_3/Moxy_2_3_PlatformDefinition.java new file mode 100644 index 0000000000..662480854c --- /dev/null +++ b/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/v2_3/Moxy_2_3_PlatformDefinition.java @@ -0,0 +1,46 @@ +/******************************************************************************* + * Copyright (c) 2011 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.jaxb.eclipselink.core.internal.v2_3; + +import org.eclipse.jpt.jaxb.core.JaxbFactory; +import org.eclipse.jpt.jaxb.core.internal.jaxb21.GenericJaxb_2_1_Factory; +import org.eclipse.jpt.jaxb.core.internal.jaxb22.AbstractJaxb_2_2_PlatformDefinition; +import org.eclipse.jpt.jaxb.core.platform.JaxbPlatformDefinition; +import org.eclipse.jpt.jaxb.core.platform.JaxbPlatformDescription; +import org.eclipse.jpt.jaxb.eclipselink.core.MoxyPlatform; + + +public class Moxy_2_3_PlatformDefinition + extends AbstractJaxb_2_2_PlatformDefinition { + + // singleton + private static final JaxbPlatformDefinition INSTANCE = new Moxy_2_3_PlatformDefinition(); + + /** + * Return the singleton. + */ + public static JaxbPlatformDefinition instance() { + return INSTANCE; + } + + + protected Moxy_2_3_PlatformDefinition() { + super(); + } + + + public JaxbPlatformDescription getDescription() { + return MoxyPlatform.VERSION_2_3; + } + + public JaxbFactory getFactory() { + return GenericJaxb_2_1_Factory.instance(); + } +} diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/v2_3/Moxy_2_3_PlatformDefinitionFactory.java b/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/v2_3/Moxy_2_3_PlatformDefinitionFactory.java new file mode 100644 index 0000000000..5eb34841ec --- /dev/null +++ b/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/v2_3/Moxy_2_3_PlatformDefinitionFactory.java @@ -0,0 +1,22 @@ +/******************************************************************************* + * Copyright (c) 2011 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.jaxb.eclipselink.core.internal.v2_3; + +import org.eclipse.jpt.jaxb.core.platform.JaxbPlatformDefinition; +import org.eclipse.jpt.jaxb.core.platform.JaxbPlatformDefinitionFactory; + + +public class Moxy_2_3_PlatformDefinitionFactory + implements JaxbPlatformDefinitionFactory { + + public JaxbPlatformDefinition buildJaxbPlatformDefinition() { + return Moxy_2_3_PlatformDefinition.instance(); + } +} diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.ui/.classpath b/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.ui/.classpath new file mode 100644 index 0000000000..c365bee0b5 --- /dev/null +++ b/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.ui/.classpath @@ -0,0 +1,16 @@ +<?xml version="1.0" encoding="UTF-8"?> +<classpath> + <classpathentry kind="src" path="src"/> + <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/> + <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"> + <accessrules> + <accessrule kind="accessible" pattern="org/eclipse/jpt/common/eclipselink/core/**"/> + <accessrule kind="accessible" pattern="org/eclipse/jpt/common/utility/**"/> + <accessrule kind="accessible" pattern="org/eclipse/jpt/common/ui/**"/> + <accessrule kind="accessible" pattern="org/eclipse/jpt/jaxb/core/**"/> + <accessrule kind="accessible" pattern="org/eclipse/jpt/jaxb/eclipselink/core/**"/> + <accessrule kind="accessible" pattern="org/eclipse/jpt/jaxb/ui/**"/> + </accessrules> + </classpathentry> + <classpathentry kind="output" path="bin"/> +</classpath> diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.ui/.cvsignore b/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.ui/.cvsignore new file mode 100644 index 0000000000..76e64421ad --- /dev/null +++ b/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.ui/.cvsignore @@ -0,0 +1,3 @@ +bin +@dot +temp.folder diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.ui/.project b/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.ui/.project new file mode 100644 index 0000000000..d5a24d6f79 --- /dev/null +++ b/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.ui/.project @@ -0,0 +1,28 @@ +<?xml version="1.0" encoding="UTF-8"?> +<projectDescription> + <name>org.eclipse.jpt.jaxb.eclipselink.ui</name> + <comment></comment> + <projects> + </projects> + <buildSpec> + <buildCommand> + <name>org.eclipse.jdt.core.javabuilder</name> + <arguments> + </arguments> + </buildCommand> + <buildCommand> + <name>org.eclipse.pde.ManifestBuilder</name> + <arguments> + </arguments> + </buildCommand> + <buildCommand> + <name>org.eclipse.pde.SchemaBuilder</name> + <arguments> + </arguments> + </buildCommand> + </buildSpec> + <natures> + <nature>org.eclipse.pde.PluginNature</nature> + <nature>org.eclipse.jdt.core.javanature</nature> + </natures> +</projectDescription> diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.ui/.settings/org.eclipse.jdt.core.prefs b/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.ui/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000000..2dd95438f8 --- /dev/null +++ b/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.ui/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,7 @@ +#Fri Feb 18 16:04:00 EST 2011 +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5 +org.eclipse.jdt.core.compiler.compliance=1.5 +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.source=1.5 diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.ui/META-INF/MANIFEST.MF b/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.ui/META-INF/MANIFEST.MF new file mode 100644 index 0000000000..a476f5e6d3 --- /dev/null +++ b/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.ui/META-INF/MANIFEST.MF @@ -0,0 +1,16 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: %pluginName +Bundle-Vendor: %providerName +Bundle-SymbolicName: org.eclipse.jpt.jaxb.eclipselink.ui;singleton:=true +Bundle-Version: 1.1.0.qualifier +Bundle-Activator: org.eclipse.jpt.jaxb.eclipselink.ui.JptJaxbEclipseLinkUiPlugin +Bundle-ActivationPolicy: lazy +Bundle-ClassPath: . +Bundle-Localization: plugin +Bundle-RequiredExecutionEnvironment: J2SE-1.5 +Export-Package: org.eclipse.jpt.jaxb.eclipselink.ui, + org.eclipse.jpt.jaxb.eclipselink.ui.internal.v2_3 +Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.7.0,4.0.0)", + org.eclipse.jpt.jaxb.ui;bundle-version="[1.1.0,2.0.0)", + org.eclipse.ui.workbench;bundle-version="[3.7.0,4.0.0)" diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.ui/about.html b/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.ui/about.html new file mode 100644 index 0000000000..be534ba44f --- /dev/null +++ b/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.ui/about.html @@ -0,0 +1,34 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN"> +<HTML> + +<head> +<title>About</title> +<meta http-equiv=Content-Type content="text/html; charset=ISO-8859-1"> +</head> + +<BODY lang="EN-US"> + +<H3>About This Content</H3> + +<P>May 02, 2008</P> + +<H3>License</H3> + +<P>The Eclipse Foundation makes available all content in this plug-in +("Content"). Unless otherwise indicated below, the Content is provided to you +under the terms and conditions of the Eclipse Public License Version 1.0 +("EPL"). A copy of the EPL is available at +<A href="http://www.eclipse.org/org/documents/epl-v10.php">http://www.eclipse.org/org/documents/epl-v10.php</A>. +For purposes of the EPL, "Program" will mean the Content.</P> + +<P>If you did not receive this Content directly from the Eclipse Foundation, the +Content is being redistributed by another party ("Redistributor") and different +terms and conditions may apply to your use of any object code in the Content. +Check the Redistributor's license that was provided with the Content. If no such +license exists, contact the Redistributor. Unless otherwise indicated below, the +terms and conditions of the EPL still apply to any source code in the Content +and such source code may be obtained at +<A href="http://www.eclipse.org/">http://www.eclipse.org/</A>.</P> + +</BODY> +</HTML> diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.ui/build.properties b/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.ui/build.properties new file mode 100644 index 0000000000..61f33554fb --- /dev/null +++ b/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.ui/build.properties @@ -0,0 +1,19 @@ +################################################################################ +# Copyright (c) 2011 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 +################################################################################ +javacSource = 1.5 +javacTarget = 1.5 +source.. = src/ +output.. = bin/ +bin.includes = .,\ + META-INF/,\ + about.html,\ + plugin.xml,\ + plugin.properties +jars.compile.order = . diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.ui/plugin.properties b/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.ui/plugin.properties new file mode 100644 index 0000000000..0720b7bd33 --- /dev/null +++ b/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.ui/plugin.properties @@ -0,0 +1,23 @@ +############################################################################### +# Copyright (c) 2011 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 +############################################################################### + +# ==================================================================== +# To code developer: +# Do NOT change the properties between this line and the +# "%%% END OF TRANSLATED PROPERTIES %%%" line. +# Make a new property name, append to the end of the file and change +# the code to use the new property. +# ==================================================================== + +# ==================================================================== +# %%% END OF TRANSLATED PROPERTIES %%% +# ==================================================================== +pluginName= Dali Java Persistence Tools - EclipseLink MOXy Support - UI +providerName=Eclipse Web Tools Platform diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.ui/plugin.xml b/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.ui/plugin.xml new file mode 100644 index 0000000000..b4b1e1e2d4 --- /dev/null +++ b/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.ui/plugin.xml @@ -0,0 +1,25 @@ +<?xml version="1.0" encoding="UTF-8"?> +<?eclipse version="3.2"?> +<!-- + Copyright (c) 2007, 2010 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 + --> + +<plugin> + + <extension + point="org.eclipse.jpt.jaxb.ui.jaxbPlatformUis"> + + <jaxbPlatformUi + id="moxy_2_3.ui" + jaxbPlatform="moxy_2_3" + class="org.eclipse.jpt.jaxb.eclipselink.ui.internal.v2_3.Moxy_2_3_PlatformUi"/> + + </extension> + +</plugin> diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.ui/src/org/eclipse/jpt/jaxb/eclipselink/ui/Activator.java b/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.ui/src/org/eclipse/jpt/jaxb/eclipselink/ui/Activator.java new file mode 100644 index 0000000000..39e81583dd --- /dev/null +++ b/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.ui/src/org/eclipse/jpt/jaxb/eclipselink/ui/Activator.java @@ -0,0 +1,30 @@ +package org.eclipse.jpt.jaxb.eclipselink.ui; + +import org.osgi.framework.BundleActivator; +import org.osgi.framework.BundleContext; + +public class Activator implements BundleActivator { + + private static BundleContext context; + + static BundleContext getContext() { + return context; + } + + /* + * (non-Javadoc) + * @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext) + */ + public void start(BundleContext bundleContext) throws Exception { + Activator.context = bundleContext; + } + + /* + * (non-Javadoc) + * @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext) + */ + public void stop(BundleContext bundleContext) throws Exception { + Activator.context = null; + } + +} diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.ui/src/org/eclipse/jpt/jaxb/eclipselink/ui/JptJaxbEclipseLinkUiPlugin.java b/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.ui/src/org/eclipse/jpt/jaxb/eclipselink/ui/JptJaxbEclipseLinkUiPlugin.java new file mode 100644 index 0000000000..78a56d9b25 --- /dev/null +++ b/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.ui/src/org/eclipse/jpt/jaxb/eclipselink/ui/JptJaxbEclipseLinkUiPlugin.java @@ -0,0 +1,69 @@ +/******************************************************************************* + * Copyright (c) 2011 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.jaxb.eclipselink.ui; + +import org.eclipse.core.runtime.IStatus; +import org.eclipse.core.runtime.Status; +import org.eclipse.ui.plugin.AbstractUIPlugin; + +/** + * The activator class controls the plug-in life cycle + * + * Provisional API: This interface is part of an interim API that is still + * under development and expected to change significantly before reaching + * stability. It is available at this early stage to solicit feedback from + * pioneering adopters on the understanding that any code that uses this API + * will almost certainly be broken (repeatedly) as the API evolves. + */ +@SuppressWarnings("nls") +public class JptJaxbEclipseLinkUiPlugin + extends AbstractUIPlugin { + + // The plug-in ID + public static final String PLUGIN_ID = "org.eclipse.jpt.jaxb.eclipselink.ui"; + + + // ********** singleton ********** + + private static JptJaxbEclipseLinkUiPlugin INSTANCE; + + /** + * Returns the singleton Plugin + */ + public static JptJaxbEclipseLinkUiPlugin instance() { + return INSTANCE; + } + + + // ********** error logging ********** + + public static void log(IStatus status) { + INSTANCE.getLog().log(status); + } + + public static void log(String msg) { + log(new Status(IStatus.ERROR, PLUGIN_ID, IStatus.OK, msg, null)); + } + + public static void log(Throwable throwable) { + log(new Status(IStatus.ERROR, PLUGIN_ID, IStatus.OK, throwable.getLocalizedMessage(), throwable)); + } + + + // ********** constructors ********** + + public JptJaxbEclipseLinkUiPlugin() { + super(); + if (INSTANCE != null) { + throw new IllegalStateException(); + } + INSTANCE = this; + } +} diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.ui/src/org/eclipse/jpt/jaxb/eclipselink/ui/internal/v2_3/Moxy_2_3_PlatformUi.java b/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.ui/src/org/eclipse/jpt/jaxb/eclipselink/ui/internal/v2_3/Moxy_2_3_PlatformUi.java new file mode 100644 index 0000000000..8f51d98830 --- /dev/null +++ b/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.ui/src/org/eclipse/jpt/jaxb/eclipselink/ui/internal/v2_3/Moxy_2_3_PlatformUi.java @@ -0,0 +1,22 @@ +/******************************************************************************* + * Copyright (c) 2011 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.jaxb.eclipselink.ui.internal.v2_3; + +import org.eclipse.jpt.jaxb.ui.internal.jaxb21.GenericJaxb_2_1_NavigatorUi; +import org.eclipse.jpt.jaxb.ui.navigator.JaxbNavigatorUi; +import org.eclipse.jpt.jaxb.ui.platform.JaxbPlatformUi; + +public class Moxy_2_3_PlatformUi + implements JaxbPlatformUi { + + public JaxbNavigatorUi getNavigatorUi() { + return GenericJaxb_2_1_NavigatorUi.instance(); + } +} |