diff options
author | Ed Merks | 2012-09-19 07:40:48 +0000 |
---|---|---|
committer | Ed Merks | 2012-09-19 07:40:48 +0000 |
commit | e96cc59df1cc280e5de8f5816ed09ebc160af753 (patch) | |
tree | 6977245e4e65f3891dcb96e3b6284b50c632b959 | |
parent | 60fbf731313d4664c8e74e840c1c2779f2af0955 (diff) | |
download | org.eclipse.emf-e96cc59df1cc280e5de8f5816ed09ebc160af753.tar.gz org.eclipse.emf-e96cc59df1cc280e5de8f5816ed09ebc160af753.tar.xz org.eclipse.emf-e96cc59df1cc280e5de8f5816ed09ebc160af753.zip |
[389864] Eliminate all warnings; build task jars automatically.
80 files changed, 781 insertions, 583 deletions
diff --git a/doc/org.eclipse.emf.doc-feature/feature.xml b/doc/org.eclipse.emf.doc-feature/feature.xml index 226bb42f5..ce733fee7 100644 --- a/doc/org.eclipse.emf.doc-feature/feature.xml +++ b/doc/org.eclipse.emf.doc-feature/feature.xml @@ -2,7 +2,7 @@ <feature id="org.eclipse.emf.doc" label="%featureName" - version="2.7.0.qualifier" + version="2.8.0.qualifier" provider-name="%providerName" image="eclipse_update_120.jpg" license-feature="org.eclipse.emf.license" diff --git a/doc/org.eclipse.emf.doc/META-INF/MANIFEST.MF b/doc/org.eclipse.emf.doc/META-INF/MANIFEST.MF index 83a93a21e..219792256 100644 --- a/doc/org.eclipse.emf.doc/META-INF/MANIFEST.MF +++ b/doc/org.eclipse.emf.doc/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: %pluginName Bundle-SymbolicName: org.eclipse.emf.doc; singleton:=true -Bundle-Version: 2.6.0.qualifier +Bundle-Version: 2.7.0.qualifier Bundle-Vendor: %providerName Bundle-Localization: plugin Require-Bundle: org.eclipse.help diff --git a/doc/org.eclipse.emf.doc/cvsdoc/.gitignore b/doc/org.eclipse.emf.doc/cvsdoc/.gitignore new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/doc/org.eclipse.emf.doc/cvsdoc/.gitignore diff --git a/doc/org.eclipse.emf.doc/news/.gitignore b/doc/org.eclipse.emf.doc/news/.gitignore new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/doc/org.eclipse.emf.doc/news/.gitignore diff --git a/examples/org.eclipse.emf.examples-feature/feature.xml b/examples/org.eclipse.emf.examples-feature/feature.xml index 352d86fab..e63318f13 100644 --- a/examples/org.eclipse.emf.examples-feature/feature.xml +++ b/examples/org.eclipse.emf.examples-feature/feature.xml @@ -2,7 +2,7 @@ <feature id="org.eclipse.emf.examples" label="%featureName" - version="2.8.0.qualifier" + version="2.9.0.qualifier" provider-name="%providerName" image="eclipse_update_120.jpg" license-feature="org.eclipse.emf.license" diff --git a/examples/org.eclipse.emf.examples.databinding.project.ui.rcp/META-INF/MANIFEST.MF b/examples/org.eclipse.emf.examples.databinding.project.ui.rcp/META-INF/MANIFEST.MF index fe6d7cfc0..9180ff556 100644 --- a/examples/org.eclipse.emf.examples.databinding.project.ui.rcp/META-INF/MANIFEST.MF +++ b/examples/org.eclipse.emf.examples.databinding.project.ui.rcp/META-INF/MANIFEST.MF @@ -4,7 +4,7 @@ Bundle-Name: %pluginName Bundle-Vendor: %providerName Bundle-Localization: plugin Bundle-SymbolicName: org.eclipse.emf.examples.databinding.project.ui.rcp;singleton:=true -Bundle-Version: 1.0.0.qualifier +Bundle-Version: 1.1.0.qualifier Bundle-Activator: org.eclipse.emf.example.databinding.project.ui.rcp.Activator Require-Bundle: org.eclipse.ui, org.eclipse.core.runtime, diff --git a/examples/org.eclipse.emf.examples.databinding.project.ui.rcp/src/org/eclipse/emf/example/databinding/project/ui/rcp/Activator.java b/examples/org.eclipse.emf.examples.databinding.project.ui.rcp/src/org/eclipse/emf/example/databinding/project/ui/rcp/Activator.java index 004b7df69..6c52f785e 100644 --- a/examples/org.eclipse.emf.examples.databinding.project.ui.rcp/src/org/eclipse/emf/example/databinding/project/ui/rcp/Activator.java +++ b/examples/org.eclipse.emf.examples.databinding.project.ui.rcp/src/org/eclipse/emf/example/databinding/project/ui/rcp/Activator.java @@ -39,6 +39,7 @@ public class Activator extends AbstractUIPlugin implements ServiceListener // The shared instance private static Activator plugin; + @SuppressWarnings("rawtypes") private ServiceTracker tracker; private IModelLoadingService loadingService; @@ -53,6 +54,7 @@ public class Activator extends AbstractUIPlugin implements ServiceListener } @Override + @SuppressWarnings({ "unchecked", "rawtypes" }) public void start(BundleContext context) throws Exception { super.start(context); @@ -117,6 +119,7 @@ public class Activator extends AbstractUIPlugin implements ServiceListener return null; } + @SuppressWarnings({ "rawtypes", "unchecked" }) public void serviceChanged(ServiceEvent event) { ServiceReference sr = event.getServiceReference(); diff --git a/features/org.eclipse.emf.codegen-feature/feature.xml b/features/org.eclipse.emf.codegen-feature/feature.xml index 6270720a3..bb4ee517a 100644 --- a/features/org.eclipse.emf.codegen-feature/feature.xml +++ b/features/org.eclipse.emf.codegen-feature/feature.xml @@ -2,7 +2,7 @@ <feature id="org.eclipse.emf.codegen" label="%featureName" - version="2.8.0.qualifier" + version="2.9.0.qualifier" provider-name="%providerName" image="eclipse_update_120.jpg" license-feature="org.eclipse.emf.license" diff --git a/features/org.eclipse.emf.common-feature/feature.xml b/features/org.eclipse.emf.common-feature/feature.xml index acb76ef07..41daedfda 100644 --- a/features/org.eclipse.emf.common-feature/feature.xml +++ b/features/org.eclipse.emf.common-feature/feature.xml @@ -2,7 +2,7 @@ <feature id="org.eclipse.emf.common" label="%featureName" - version="2.8.0.qualifier" + version="2.9.0.qualifier" provider-name="%providerName" license-feature="org.eclipse.emf.license" license-feature-version="2.7.0.qualifier"> diff --git a/features/org.eclipse.emf.databinding-feature/feature.xml b/features/org.eclipse.emf.databinding-feature/feature.xml index 20863fa6f..5dcbf2efa 100644 --- a/features/org.eclipse.emf.databinding-feature/feature.xml +++ b/features/org.eclipse.emf.databinding-feature/feature.xml @@ -2,7 +2,7 @@ <feature id="org.eclipse.emf.databinding" label="%featureName" - version="1.2.0.qualifier" + version="1.3.0.qualifier" provider-name="%providerName" license-feature="org.eclipse.emf.license" license-feature-version="2.7.0.qualifier"> diff --git a/features/org.eclipse.emf.databinding.edit-feature/feature.xml b/features/org.eclipse.emf.databinding.edit-feature/feature.xml index 22c8d9f48..65cf89422 100644 --- a/features/org.eclipse.emf.databinding.edit-feature/feature.xml +++ b/features/org.eclipse.emf.databinding.edit-feature/feature.xml @@ -2,7 +2,7 @@ <feature id="org.eclipse.emf.databinding.edit" label="%featureName" - version="1.2.0.qualifier" + version="1.3.0.qualifier" provider-name="%providerName" license-feature="org.eclipse.emf.license" license-feature-version="2.7.0.qualifier"> diff --git a/plugins/org.eclipse.emf.ant/.externalToolBuilders/org.eclipse.emf.ant.build.ant_tasks.launch b/plugins/org.eclipse.emf.ant/.externalToolBuilders/org.eclipse.emf.ant.build.ant_tasks.launch new file mode 100644 index 000000000..9e9435479 --- /dev/null +++ b/plugins/org.eclipse.emf.ant/.externalToolBuilders/org.eclipse.emf.ant.build.ant_tasks.launch @@ -0,0 +1,18 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<launchConfiguration type="org.eclipse.ant.AntBuilderLaunchConfigurationType"> +<stringAttribute key="org.eclipse.ant.ui.ATTR_ANT_CLEAN_TARGETS" value="clean.jars,"/> +<booleanAttribute key="org.eclipse.ant.ui.ATTR_TARGETS_UPDATED" value="true"/> +<booleanAttribute key="org.eclipse.ant.ui.DEFAULT_VM_INSTALL" value="false"/> +<booleanAttribute key="org.eclipse.ant.uiSET_INPUTHANDLER" value="false"/> +<stringAttribute key="org.eclipse.debug.core.ATTR_REFRESH_SCOPE" value="${working_set:<?xml version="1.0" encoding="UTF-8"?> <resources> <item path="/org.eclipse.emf.ant/ant_tasks" type="2"/> </resources>}"/> +<booleanAttribute key="org.eclipse.debug.core.capture_output" value="false"/> +<booleanAttribute key="org.eclipse.debug.ui.ATTR_CONSOLE_OUTPUT_ON" value="false"/> +<booleanAttribute key="org.eclipse.debug.ui.ATTR_LAUNCH_IN_BACKGROUND" value="false"/> +<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="org.eclipse.ant.ui.AntClasspathProvider"/> +<booleanAttribute key="org.eclipse.jdt.launching.DEFAULT_CLASSPATH" value="true"/> +<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.emf.ant"/> +<stringAttribute key="org.eclipse.ui.externaltools.ATTR_BUILD_SCOPE" value="${working_set:<?xml version="1.0" encoding="UTF-8"?> <resources> <item path="/org.eclipse.emf.ant/ant_tasks/emf.ant.tasks.jar" type="1"/> <item path="/org.eclipse.emf.ant/bin.tasks" type="2"/> </resources>}"/> +<stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="${workspace_loc:/org.eclipse.emf.ant/build.ant_tasks.ant}"/> +<stringAttribute key="org.eclipse.ui.externaltools.ATTR_RUN_BUILD_KINDS" value="incremental,auto,clean"/> +<booleanAttribute key="org.eclipse.ui.externaltools.ATTR_TRIGGERS_CONFIGURED" value="true"/> +</launchConfiguration> diff --git a/plugins/org.eclipse.emf.ant/.gitignore b/plugins/org.eclipse.emf.ant/.gitignore index 4f56d09a3..00ae2ffac 100644 --- a/plugins/org.eclipse.emf.ant/.gitignore +++ b/plugins/org.eclipse.emf.ant/.gitignore @@ -1,10 +1,2 @@ bin -bin.tasks -temp.folder -ant_tasks -build.xml -dev.properties -*.jar -*.args -@dot -@dot.log +bin.tasks
\ No newline at end of file diff --git a/plugins/org.eclipse.emf.ant/.project b/plugins/org.eclipse.emf.ant/.project index 525bc1f8d..f21199a4e 100644 --- a/plugins/org.eclipse.emf.ant/.project +++ b/plugins/org.eclipse.emf.ant/.project @@ -21,19 +21,6 @@ </arguments> </buildCommand> <buildCommand> - <name>org.eclipse.buckminster.ant.AntBuilder</name> - <arguments> - <dictionary> - <key>given.name</key> - <value>Internal Ant Builder support compile</value> - </dictionary> - <dictionary> - <key>script.file</key> - <value>libraries.ant</value> - </dictionary> - </arguments> - </buildCommand> - <buildCommand> <name>org.eclipse.emf.cdo.releng.version.VersionBuilder</name> <arguments> <dictionary> @@ -54,6 +41,19 @@ </dictionary> </arguments> </buildCommand> + <buildCommand> + <name>org.eclipse.ui.externaltools.ExternalToolBuilder</name> + <arguments> + <dictionary> + <key>LaunchConfigHandle</key> + <value><project>/.externalToolBuilders/org.eclipse.emf.ant.build.ant_tasks.launch</value> + </dictionary> + <dictionary> + <key>incclean</key> + <value>true</value> + </dictionary> + </arguments> + </buildCommand> </buildSpec> <natures> <nature>org.eclipse.pde.PluginNature</nature> diff --git a/plugins/org.eclipse.emf.ant/.settings/org.eclipse.pde.prefs b/plugins/org.eclipse.emf.ant/.settings/org.eclipse.pde.prefs new file mode 100644 index 000000000..c0ede4b6b --- /dev/null +++ b/plugins/org.eclipse.emf.ant/.settings/org.eclipse.pde.prefs @@ -0,0 +1,3 @@ +compilers.p.build.output.library=2 +compilers.p.build.source.library=2 +eclipse.preferences.version=1 diff --git a/plugins/org.eclipse.emf.ant/Eclipse Ant Runner.launch b/plugins/org.eclipse.emf.ant/Eclipse Ant Runner.launch deleted file mode 100644 index df0304130..000000000 --- a/plugins/org.eclipse.emf.ant/Eclipse Ant Runner.launch +++ /dev/null @@ -1,29 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<launchConfiguration type="org.eclipse.pde.ui.RuntimeWorkbench"> -<stringAttribute key="application" value="org.eclipse.ant.core.antRunner"/> -<booleanAttribute key="askclear" value="false"/> -<booleanAttribute key="automaticAdd" value="true"/> -<booleanAttribute key="automaticValidate" value="false"/> -<stringAttribute key="bootstrap" value=""/> -<stringAttribute key="checked" value="[NONE]"/> -<booleanAttribute key="clearConfig" value="true"/> -<booleanAttribute key="clearws" value="true"/> -<booleanAttribute key="clearwslog" value="false"/> -<stringAttribute key="configLocation" value="${workspace_loc}/.metadata/.plugins/org.eclipse.pde.core/Eclipse Ant Runner"/> -<booleanAttribute key="default" value="true"/> -<booleanAttribute key="includeOptional" value="true"/> -<stringAttribute key="location" value="${workspace_loc}/../runtime-ant"/> -<booleanAttribute key="org.eclipse.debug.core.appendEnvironmentVariables" value="true"/> -<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-buildfile ${resource_loc} -consoleLog"/> -<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/> -<stringAttribute key="pde.version" value="3.3"/> -<stringAttribute key="product" value="org.eclipse.sdk.ide"/> -<booleanAttribute key="show_selected_only" value="false"/> -<stringAttribute key="templateConfig" value="${target_home}\configuration\config.ini"/> -<booleanAttribute key="tracing" value="false"/> -<booleanAttribute key="useDefaultConfig" value="true"/> -<booleanAttribute key="useDefaultConfigArea" value="true"/> -<booleanAttribute key="useNamedJRE" value="true"/> -<booleanAttribute key="useProduct" value="false"/> -<booleanAttribute key="usefeatures" value="false"/> -</launchConfiguration> diff --git a/plugins/org.eclipse.emf.ant/ant_tasks/.gitignore b/plugins/org.eclipse.emf.ant/ant_tasks/.gitignore new file mode 100644 index 000000000..51d13af12 --- /dev/null +++ b/plugins/org.eclipse.emf.ant/ant_tasks/.gitignore @@ -0,0 +1 @@ +emf.ant.tasks.jar
\ No newline at end of file diff --git a/plugins/org.eclipse.emf.ant/build.ant_tasks.ant b/plugins/org.eclipse.emf.ant/build.ant_tasks.ant new file mode 100644 index 000000000..8440d8a97 --- /dev/null +++ b/plugins/org.eclipse.emf.ant/build.ant_tasks.ant @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project name="org.eclipse.emf.ant" default="build.jars" basedir="."> + <property name="jar.name" value="emf.ant.tasks"/> + <target name="build.jars"> + <jar destfile="ant_tasks/${jar.name}.jar"> + <fileset dir="bin.tasks"> + <include name="**/*.class"/> + </fileset> + </jar> + </target> + <target name="clean.jars"> + <delete file="ant_tasks/${jar.name}.jar" failonerror="false"/> + </target> +</project> diff --git a/plugins/org.eclipse.emf.ant/libraries.ant b/plugins/org.eclipse.emf.ant/libraries.ant deleted file mode 100644 index c594d803b..000000000 --- a/plugins/org.eclipse.emf.ant/libraries.ant +++ /dev/null @@ -1,107 +0,0 @@ -<project name="Build libraries" default="build"> - <macrodef name="propertyvalue"> - <attribute name="property" /> - <attribute name="name" /> - <sequential> - <property name="@{property}" value="${@{name}}" /> - </sequential> - </macrodef> - - <target name="-define.properties"> - <property prefix="build.properties." file="build.properties" /> - - <!-- remove the default entry (".") from the list --> - <pathconvert property="libraries"> - <filelist dir="${basedir}" files="${build.properties.jars.compile.order}" /> - <globmapper from="${basedir}/*" to="${basedir}/*" handledirsep="true" /> - </pathconvert> - - <path id="libraries" path="${libraries}" /> - - <pathconvert property="library.build.temp.dirs"> - <path refid="libraries" /> - <globmapper from="*" to="*-temp" /> - </pathconvert> - - <path id="library.build.temp.path" path="${library.build.temp.dirs}" /> - - <pathconvert property="library.build.stamps" refid="library.build.temp.path"> - <globmapper from="*" to="*/.stamp" /> - </pathconvert> - - <path id="library.stamps.path" path="${library.build.stamps}" /> - </target> - - <target name="build" depends="-define.properties"> - <touch mkdirs="true" verbose="false"> - <path refid="library.stamps.path" /> - </touch> - - <subant genericantfile="${ant.file}" target="-build.library" inheritall="true"> - <path refid="library.build.temp.path" /> - <property name="original.basedir" value="${basedir}" /> - </subant> - - <delete includeemptydirs="true"> - <path refid="library.stamps.path" /> - <path refid="library.build.temp.path" /> - </delete> - </target> - - <target name="-build.library"> - <pathconvert property="library" dirsep="/"> - <path location="${basedir}" /> - <globmapper from="${original.basedir}/*-temp" to="*" handledirsep="true" /> - </pathconvert> - - <propertyvalue property="source.dir" name="build.properties.source.${library}" /> - - <condition property="output.definition" value="build.properties.output.${library}" else="build.properties.output.."> - <isset property="build.properties.output.${library}" /> - </condition> - - <propertyvalue property="target.dir" name="${output.definition}" /> - - <condition property="excludes" value=""> - <not> - <isset property="build.properties.exclude.${library}" /> - </not> - </condition> - - <propertyvalue property="excludes" name="build.properties.exclude.${library}" /> - - <echo message="Library...: ${library}" /> - <echo message="Source dir: ${source.dir}" /> - <echo message="Target dir: ${target.dir}" /> - <echo message="Excludes..: ${excludes}" /> - - <property name="library.path" location="${original.basedir}/${library}" /> - - <jar destfile="${library.path}"> - <fileset dir="${original.basedir}/${target.dir}" excludes="${excludes}"> - <present targetdir="${original.basedir}/${source.dir}"> - <mapper> - <filtermapper> - <replaceregex pattern="(?:\$$.+)?\.class$$" replace=".java" /> - </filtermapper> - </mapper> - </present> - </fileset> - </jar> - - <eclipse.convertPath fileSystemPath="${library.path}" property="library.workspace.path" /> - <eclipse.refreshLocal resource="${library.workspace.path}" depth="infinite" /> - </target> - - <target name="clean" depends="-define.properties"> - <!-- remove the libaries --> - <delete includeemptydirs="true"> - <path refid="library.stamps.path" /> - <path refid="library.build.temp.path" /> - <path refid="libraries" /> - </delete> - - <eclipse.convertPath fileSystemPath="${basedir}" property="project.workspace.path" /> - <eclipse.refreshLocal resource="${project.workspace.path}" depth="infinite" /> - </target> -</project> diff --git a/plugins/org.eclipse.emf.codegen/META-INF/MANIFEST.MF b/plugins/org.eclipse.emf.codegen/META-INF/MANIFEST.MF index a6b2ad18a..120a578e6 100644 --- a/plugins/org.eclipse.emf.codegen/META-INF/MANIFEST.MF +++ b/plugins/org.eclipse.emf.codegen/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: %pluginName Bundle-SymbolicName: org.eclipse.emf.codegen; singleton:=true -Bundle-Version: 2.8.0.qualifier +Bundle-Version: 2.9.0.qualifier Bundle-ClassPath: . Bundle-Activator: org.eclipse.emf.codegen.CodeGenPlugin$Implementation Bundle-Vendor: %providerName diff --git a/plugins/org.eclipse.emf.codegen/src/org/eclipse/emf/codegen/merge/java/facade/ast/ASTFacadeHelper.java b/plugins/org.eclipse.emf.codegen/src/org/eclipse/emf/codegen/merge/java/facade/ast/ASTFacadeHelper.java index 1de1aac81..fac988d1e 100644 --- a/plugins/org.eclipse.emf.codegen/src/org/eclipse/emf/codegen/merge/java/facade/ast/ASTFacadeHelper.java +++ b/plugins/org.eclipse.emf.codegen/src/org/eclipse/emf/codegen/merge/java/facade/ast/ASTFacadeHelper.java @@ -53,6 +53,7 @@ import org.eclipse.emf.codegen.merge.java.JMerger; import org.eclipse.emf.codegen.merge.java.facade.FacadeHelper; import org.eclipse.emf.codegen.merge.java.facade.JCompilationUnit; import org.eclipse.emf.codegen.merge.java.facade.JNode; +import org.eclipse.emf.codegen.util.CodeGenUtil; import org.eclipse.emf.common.util.BasicDiagnostic; import org.eclipse.emf.common.util.Diagnostic; import org.eclipse.emf.common.util.DiagnosticException; @@ -244,7 +245,7 @@ public class ASTFacadeHelper extends FacadeHelper { // caching parser does not parse 2nd file in the same way (javadoc of package for example) // hence, new parser is created every time this method is called - ASTParser astParser = ASTParser.newParser(AST.JLS3); + ASTParser astParser = CodeGenUtil.EclipseUtil.newASTParser(); astParser.setCompilerOptions(getJavaCoreOptions()); return astParser; } diff --git a/plugins/org.eclipse.emf.codegen/src/org/eclipse/emf/codegen/util/CodeGenUtil.java b/plugins/org.eclipse.emf.codegen/src/org/eclipse/emf/codegen/util/CodeGenUtil.java index 7b13d389a..129403e6f 100644 --- a/plugins/org.eclipse.emf.codegen/src/org/eclipse/emf/codegen/util/CodeGenUtil.java +++ b/plugins/org.eclipse.emf.codegen/src/org/eclipse/emf/codegen/util/CodeGenUtil.java @@ -12,6 +12,7 @@ package org.eclipse.emf.codegen.util; import java.io.IOException; import java.io.PrintStream; +import java.lang.reflect.Field; import java.net.URL; import java.util.ArrayList; import java.util.Collection; @@ -50,6 +51,8 @@ import org.eclipse.jdt.core.IJavaProject; import org.eclipse.jdt.core.JavaConventions; import org.eclipse.jdt.core.JavaCore; import org.eclipse.jdt.core.JavaModelException; +import org.eclipse.jdt.core.dom.AST; +import org.eclipse.jdt.core.dom.ASTParser; import org.eclipse.osgi.util.ManifestElement; import org.eclipse.emf.codegen.CodeGenPlugin; @@ -1008,6 +1011,36 @@ public class CodeGenUtil public static class EclipseUtil { + /** + * A constant that will always represent the latest language level supported by the version of JDT in the installed runtime. + * It will determine the + */ + private static final int JLS; + static + { + @SuppressWarnings("deprecation") + int jls = AST.JLS3; + try + { + Field field = AST.class.getField("JLS4"); + jls = (Integer)field.get(null); + } + catch (Throwable exception) + { + // Ignore the absence of the new version support in older runtimes. + } + JLS = jls; + } + + /** + * Return an ASTParser that supports the latest language level in the version of the JDT in the installed runtime. + * @since 2.9 + */ + public static ASTParser newASTParser() + { + return ASTParser.newParser(JLS); + } + public static class StreamProgressMonitor extends NullProgressMonitor { protected PrintStream printStream; @@ -1074,6 +1107,10 @@ public class CodeGenUtil try { Bundle bundle = Platform.getBundle(pluginID); + + // Ignore this redundant cast for compatibility with Eclipse 3.5. + // + @SuppressWarnings("cast") String requires = (String)bundle.getHeaders().get(Constants.BUNDLE_CLASSPATH); if (requires == null) { diff --git a/plugins/org.eclipse.emf.codegen/src/org/eclipse/emf/codegen/util/ImportManager.java b/plugins/org.eclipse.emf.codegen/src/org/eclipse/emf/codegen/util/ImportManager.java index cfd10764b..20b2a9257 100644 --- a/plugins/org.eclipse.emf.codegen/src/org/eclipse/emf/codegen/util/ImportManager.java +++ b/plugins/org.eclipse.emf.codegen/src/org/eclipse/emf/codegen/util/ImportManager.java @@ -24,7 +24,6 @@ import java.util.regex.Pattern; import org.eclipse.core.runtime.NullProgressMonitor; import org.eclipse.emf.common.EMFPlugin; -import org.eclipse.jdt.core.dom.AST; import org.eclipse.jdt.core.dom.ASTParser; import org.eclipse.jdt.core.dom.CompilationUnit; import org.eclipse.jdt.core.dom.ImportDeclaration; @@ -675,7 +674,7 @@ public class ImportManager public static List<String> getCompilationUnitImports(String compilationUnitContents) { List<String> result = new ArrayList<String>(); - ASTParser parser = ASTParser.newParser(AST.JLS3); + ASTParser parser = CodeGenUtil.EclipseUtil.newASTParser(); parser.setSource(compilationUnitContents.toCharArray()); CompilationUnit compilationUnit = (CompilationUnit)parser.createAST(new NullProgressMonitor()); for (Iterator<?> i = compilationUnit.imports().iterator(); i.hasNext();) diff --git a/plugins/org.eclipse.emf.common/META-INF/MANIFEST.MF b/plugins/org.eclipse.emf.common/META-INF/MANIFEST.MF index 19f6e4758..548714a08 100644 --- a/plugins/org.eclipse.emf.common/META-INF/MANIFEST.MF +++ b/plugins/org.eclipse.emf.common/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: %pluginName Bundle-SymbolicName: org.eclipse.emf.common;singleton:=true -Bundle-Version: 2.8.0.qualifier +Bundle-Version: 2.9.0.qualifier Bundle-ClassPath: . Bundle-Activator: org.eclipse.emf.common.CommonPlugin$Implementation Bundle-Vendor: %providerName diff --git a/plugins/org.eclipse.emf.common/src/org/eclipse/emf/common/archive/ArchiveURLConnection.java b/plugins/org.eclipse.emf.common/src/org/eclipse/emf/common/archive/ArchiveURLConnection.java index c40f840be..be4d09c49 100644 --- a/plugins/org.eclipse.emf.common/src/org/eclipse/emf/common/archive/ArchiveURLConnection.java +++ b/plugins/org.eclipse.emf.common/src/org/eclipse/emf/common/archive/ArchiveURLConnection.java @@ -336,6 +336,7 @@ public class ArchiveURLConnection extends URLConnection getOutputStream(false, timeStamp).close(); } + @SuppressWarnings("resource") private OutputStream getOutputStream(boolean delete, long timeStamp) throws IOException { // Create the delegate URL diff --git a/plugins/org.eclipse.emf.converter/src/org/eclipse/emf/converter/ui/ModelConverterDescriptorSelectionPage.java b/plugins/org.eclipse.emf.converter/src/org/eclipse/emf/converter/ui/ModelConverterDescriptorSelectionPage.java index 992b6de33..7fc0cdb99 100644 --- a/plugins/org.eclipse.emf.converter/src/org/eclipse/emf/converter/ui/ModelConverterDescriptorSelectionPage.java +++ b/plugins/org.eclipse.emf.converter/src/org/eclipse/emf/converter/ui/ModelConverterDescriptorSelectionPage.java @@ -128,11 +128,14 @@ public abstract class ModelConverterDescriptorSelectionPage extends WizardSelect return Platform.getPreferencesService().getString(ConverterPlugin.ID, modelConverterManager.getClass().getName(), "", null); } + @SuppressWarnings("deprecation") + private static final InstanceScope INSTANCE_SCOPE = new InstanceScope(); + public void performFinish() { if (descriptor != null) { - IEclipsePreferences node = new InstanceScope().getNode(ConverterPlugin.ID); + IEclipsePreferences node = INSTANCE_SCOPE.getNode(ConverterPlugin.ID); node.put(modelConverterManager.getClass().getName(), descriptor.getID()); try { diff --git a/plugins/org.eclipse.emf.databinding.edit/META-INF/MANIFEST.MF b/plugins/org.eclipse.emf.databinding.edit/META-INF/MANIFEST.MF index 8d3881f5f..04eb768d6 100644 --- a/plugins/org.eclipse.emf.databinding.edit/META-INF/MANIFEST.MF +++ b/plugins/org.eclipse.emf.databinding.edit/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: %pluginName Bundle-SymbolicName: org.eclipse.emf.databinding.edit;singleton:=true -Bundle-Version: 1.2.0.qualifier +Bundle-Version: 1.3.0.qualifier Bundle-ClassPath: . Bundle-Activator: org.eclipse.emf.databinding.edit.DataBindingEditPlugin$Implementation Bundle-Vendor: %providerName diff --git a/plugins/org.eclipse.emf.databinding.edit/src/org/eclipse/emf/databinding/edit/internal/EMFEditValuePropertyDecorator.java b/plugins/org.eclipse.emf.databinding.edit/src/org/eclipse/emf/databinding/edit/internal/EMFEditValuePropertyDecorator.java index 651a0a986..e41f0c806 100644 --- a/plugins/org.eclipse.emf.databinding.edit/src/org/eclipse/emf/databinding/edit/internal/EMFEditValuePropertyDecorator.java +++ b/plugins/org.eclipse.emf.databinding.edit/src/org/eclipse/emf/databinding/edit/internal/EMFEditValuePropertyDecorator.java @@ -139,16 +139,19 @@ public class EMFEditValuePropertyDecorator extends ValueProperty implements IEMF return new EMFEditObservableValueDecorator(editingDomain, delegate.observeDetail(master), eStructuralFeature); } + @SuppressWarnings("all") public IObservableList observeDetail(IObservableList master) { return new EMFEditObservableListDecorator(editingDomain, delegate.observeDetail(master), eStructuralFeature); } + @SuppressWarnings("all") public IObservableMap observeDetail(IObservableSet master) { return new EMFEditObservableMapDecorator(editingDomain, delegate.observeDetail(master), eStructuralFeature); } + @SuppressWarnings("all") public IObservableMap observeDetail(IObservableMap master) { return new EMFEditObservableMapDecorator(editingDomain, delegate.observeDetail(master), eStructuralFeature); diff --git a/plugins/org.eclipse.emf.databinding/META-INF/MANIFEST.MF b/plugins/org.eclipse.emf.databinding/META-INF/MANIFEST.MF index eb1a7b720..cd2d40442 100644 --- a/plugins/org.eclipse.emf.databinding/META-INF/MANIFEST.MF +++ b/plugins/org.eclipse.emf.databinding/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: %pluginName Bundle-SymbolicName: org.eclipse.emf.databinding; singleton:=true -Bundle-Version: 1.2.0.qualifier +Bundle-Version: 1.3.0.qualifier Bundle-ClassPath: . Bundle-Activator: org.eclipse.emf.databinding.DataBindingPlugin$Implementation Bundle-Vendor: %providerName diff --git a/plugins/org.eclipse.emf.databinding/src/org/eclipse/emf/databinding/internal/EMFValuePropertyDecorator.java b/plugins/org.eclipse.emf.databinding/src/org/eclipse/emf/databinding/internal/EMFValuePropertyDecorator.java index 02e95e170..52219892a 100644 --- a/plugins/org.eclipse.emf.databinding/src/org/eclipse/emf/databinding/internal/EMFValuePropertyDecorator.java +++ b/plugins/org.eclipse.emf.databinding/src/org/eclipse/emf/databinding/internal/EMFValuePropertyDecorator.java @@ -132,16 +132,28 @@ public class EMFValuePropertyDecorator extends ValueProperty implements IEMFValu return new EMFObservableValueDecorator(delegate.observeDetail(master), eStructuralFeature); } + /* + * Suppress missing override warning to maintain compatibility with Eclipse 3.5. + */ + @SuppressWarnings("all") public IObservableList observeDetail(IObservableList master) { return new EMFObservableListDecorator(delegate.observeDetail(master), eStructuralFeature); } + /* + * Suppress missing override warning to maintain compatibility with Eclipse 3.5. + */ + @SuppressWarnings("all") public IObservableMap observeDetail(IObservableSet master) { return new EMFObservableMapDecorator(delegate.observeDetail(master), eStructuralFeature); } + /* + * Suppress missing override warning to maintain compatibility with Eclipse 3.5. + */ + @SuppressWarnings("all") public IObservableMap observeDetail(IObservableMap master) { return new EMFObservableMapDecorator(delegate.observeDetail(master), eStructuralFeature); diff --git a/plugins/org.eclipse.emf.ecore/src/org/eclipse/emf/ecore/util/FeatureMapUtil.java b/plugins/org.eclipse.emf.ecore/src/org/eclipse/emf/ecore/util/FeatureMapUtil.java index 56927fa93..e6b42acd9 100644 --- a/plugins/org.eclipse.emf.ecore/src/org/eclipse/emf/ecore/util/FeatureMapUtil.java +++ b/plugins/org.eclipse.emf.ecore/src/org/eclipse/emf/ecore/util/FeatureMapUtil.java @@ -37,7 +37,6 @@ import org.eclipse.emf.ecore.EStructuralFeature; import org.eclipse.emf.ecore.ETypedElement; import org.eclipse.emf.ecore.InternalEObject; import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.emf.ecore.impl.EStructuralFeatureImpl; import org.eclipse.emf.ecore.util.FeatureMap.Entry; import org.eclipse.emf.ecore.xml.type.ProcessingInstruction; import org.eclipse.emf.ecore.xml.type.XMLTypeFactory; diff --git a/plugins/org.eclipse.emf.example.installer/EMF Example Installer.launch b/plugins/org.eclipse.emf.example.installer/EMF Example Installer.launch new file mode 100644 index 000000000..ba4b4ea8d --- /dev/null +++ b/plugins/org.eclipse.emf.example.installer/EMF Example Installer.launch @@ -0,0 +1,24 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<launchConfiguration type="org.eclipse.ant.AntLaunchConfigurationType"> +<booleanAttribute key="org.eclipse.ant.ui.DEFAULT_VM_INSTALL" value="false"/> +<booleanAttribute key="org.eclipse.ant.uiSET_INPUTHANDLER" value="false"/> +<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS"> +<listEntry value="/org.eclipse.emf.example.installer/generateEMFExampleBuilders.ant"/> +</listAttribute> +<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES"> +<listEntry value="1"/> +</listAttribute> +<listAttribute key="org.eclipse.jdt.launching.CLASSPATH"> +<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry containerPath="org.eclipse.jdt.launching.JRE_CONTAINER" path="1" type="4"/> "/> +<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry id="org.eclipse.ant.ui.classpathentry.antHome"> <memento default="true"/> </runtimeClasspathEntry> "/> +<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry id="org.eclipse.ant.ui.classpathentry.extraClasspathEntries"> <memento/> </runtimeClasspathEntry> "/> +<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/org.eclipse.emf.releng/bin" path="3" type="2"/> "/> +</listAttribute> +<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="org.eclipse.ant.ui.AntClasspathProvider"/> +<booleanAttribute key="org.eclipse.jdt.launching.DEFAULT_CLASSPATH" value="false"/> +<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.emf.example.installer"/> +<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.ant.ui.AntClasspathProvider"/> +<stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="${workspace_loc:/org.eclipse.emf.example.installer/generateEMFExampleBuilders.ant}"/> +<stringAttribute key="org.eclipse.ui.externaltools.ATTR_TOOL_ARGUMENTS" value="-Dbuild.project=${project_loc:/org.eclipse.emf.example.installer} -Dreleng.location=${project_loc:/org.eclipse.emf.releng}"/> +<stringAttribute key="process_factory_id" value="org.eclipse.ant.ui.remoteAntProcessFactory"/> +</launchConfiguration> diff --git a/plugins/org.eclipse.emf.example.installer/copyExampleLib.ant b/plugins/org.eclipse.emf.example.installer/copyExampleLib.ant new file mode 100644 index 000000000..54905b7e1 --- /dev/null +++ b/plugins/org.eclipse.emf.example.installer/copyExampleLib.ant @@ -0,0 +1,67 @@ +<?xml version="1.0"?> +<!-- + Copyright (c) 2012 Eclispe contributors 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 +--> +<project name="copyExampleLib" basedir=".."> + + <property name="examples.path" value="org.eclipse.emf.example.installer/examples" /> + <basename file="${build.project}" property="project" /> + + <macrodef name="copyExample"> + <attribute name="project" /> + <sequential> + <delete includeemptydirs="true" failonerror="false"> + <fileset dir="${examples.path}/@{project}"> + <include name="**" /> + </fileset> + </delete> + + <copy todir="${examples.path}/@{project}" overwrite="true"> + <fileset dir="@{project}"> + <exclude name=".externalToolBuilders/" /> + <exclude name="database/" /> + <exclude name="bin/" /> + <exclude name=".settings/org.eclipse.mylyn*" /> + <exclude name=".settings/org.eclipse.pde.api.tools.prefs" /> + <exclude name="**/.gitignore" /> + <include name="**" /> + </fileset> + </copy> + + <replaceregexp file="${examples.path}/@{project}/.project" + byline="false" + flags="sg" + match="\s*<buildCommand>\s+<name>org.eclipse.ui.externaltools.ExternalToolBuilder.*?</buildCommand>" + replace="" /> + + <replaceregexp file="${examples.path}/@{project}/.project" + byline="false" + flags="s" + match="\s*<buildCommand>\s+<name>org.eclipse.pde.api.tools.apiAnalysisBuilder.*?</buildCommand>" + replace="" /> + + <replaceregexp file="${examples.path}/@{project}/.project" + byline="false" + flags="s" + match="\s*<buildCommand>\s+<name>org.eclipse.emf.cdo.releng.version.VersionBuilder.*?</buildCommand>" + replace="" /> + + <replaceregexp file="${examples.path}/@{project}/.project" + byline="false" + flags="s" + match="\s*<nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>" + replace="" /> + + <replaceregexp file="${examples.path}/@{project}/.project" + byline="false" + flags="s" + match="\s*<nature>org.eclipse.emf.cdo.releng.version.VersionNature</nature>" + replace="" /> + </sequential> + </macrodef> + +</project> diff --git a/plugins/org.eclipse.emf.example.installer/generateEMFExampleBuilders.ant b/plugins/org.eclipse.emf.example.installer/generateEMFExampleBuilders.ant new file mode 100644 index 000000000..8762f8b01 --- /dev/null +++ b/plugins/org.eclipse.emf.example.installer/generateEMFExampleBuilders.ant @@ -0,0 +1,18 @@ +<?xml version="1.0"?> +<!-- + Copyright (c) 2012 Eclipse contributors 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 +--> +<project name="generateExampleBuilders" default="main"> + + <target name="main"> + <echo message="${releng.location}"></echo> + <java fork="false" classpath="${releng.location}/bin" classname="org.eclipse.emf.releng.GenerateExampleBuilders"> + <arg value="${build.project}" /> + </java> + </target> + +</project> diff --git a/plugins/org.eclipse.emf.exporter/META-INF/MANIFEST.MF b/plugins/org.eclipse.emf.exporter/META-INF/MANIFEST.MF index 576a45bb9..dd42e28f6 100644 --- a/plugins/org.eclipse.emf.exporter/META-INF/MANIFEST.MF +++ b/plugins/org.eclipse.emf.exporter/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: %pluginName Bundle-SymbolicName: org.eclipse.emf.exporter; singleton:=true -Bundle-Version: 2.6.0.qualifier +Bundle-Version: 2.7.0.qualifier Bundle-ClassPath: . Bundle-Activator: org.eclipse.emf.exporter.ExporterPlugin$Implementation Bundle-Vendor: %providerName diff --git a/plugins/org.eclipse.emf.exporter/src/org/eclipse/emf/exporter/ui/contribution/base/ModelExporterWizard.java b/plugins/org.eclipse.emf.exporter/src/org/eclipse/emf/exporter/ui/contribution/base/ModelExporterWizard.java index 291fec09c..10cbaa34f 100644 --- a/plugins/org.eclipse.emf.exporter/src/org/eclipse/emf/exporter/ui/contribution/base/ModelExporterWizard.java +++ b/plugins/org.eclipse.emf.exporter/src/org/eclipse/emf/exporter/ui/contribution/base/ModelExporterWizard.java @@ -97,9 +97,12 @@ public abstract class ModelExporterWizard extends ModelConverterWizard modelExporter.setSaveExporter(preferencesService.getBoolean(ExporterPlugin.ID, PREFERENCE_SAVE_EXPORTER, false, null)); } + @SuppressWarnings("deprecation") + private static final InstanceScope INSTANCE_SCOPE = new InstanceScope(); + protected void writePreferencesSettings() { - IEclipsePreferences node = new InstanceScope().getNode(ExporterPlugin.ID); + IEclipsePreferences node = INSTANCE_SCOPE.getNode(ExporterPlugin.ID); ModelExporter modelExporter = getModelExporter(); node.putBoolean(PREFERENCE_SAVE_PACKAGE_URI, modelExporter.isSaveEPackageArtifactURI()); diff --git a/plugins/org.eclipse.emf.gwt.ecore/src/org/eclipse/emf/ecore/util/FeatureMapUtil.java b/plugins/org.eclipse.emf.gwt.ecore/src/org/eclipse/emf/ecore/util/FeatureMapUtil.java index 9fc4c2227..05cf4ea58 100644 --- a/plugins/org.eclipse.emf.gwt.ecore/src/org/eclipse/emf/ecore/util/FeatureMapUtil.java +++ b/plugins/org.eclipse.emf.gwt.ecore/src/org/eclipse/emf/ecore/util/FeatureMapUtil.java @@ -37,7 +37,6 @@ import org.eclipse.emf.ecore.EStructuralFeature; import org.eclipse.emf.ecore.ETypedElement; import org.eclipse.emf.ecore.InternalEObject; import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.emf.ecore.impl.EStructuralFeatureImpl; import org.eclipse.emf.ecore.util.FeatureMap.Entry; import org.eclipse.emf.ecore.xml.type.ProcessingInstruction; import org.eclipse.emf.ecore.xml.type.XMLTypeFactory; diff --git a/plugins/org.eclipse.emf.importer.ecore/.externalToolBuilders/org.eclipse.emf.importer.ecore.build.ant_tasks.launch b/plugins/org.eclipse.emf.importer.ecore/.externalToolBuilders/org.eclipse.emf.importer.ecore.build.ant_tasks.launch new file mode 100644 index 000000000..7f1808bc6 --- /dev/null +++ b/plugins/org.eclipse.emf.importer.ecore/.externalToolBuilders/org.eclipse.emf.importer.ecore.build.ant_tasks.launch @@ -0,0 +1,18 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<launchConfiguration type="org.eclipse.ant.AntBuilderLaunchConfigurationType"> +<stringAttribute key="org.eclipse.ant.ui.ATTR_ANT_CLEAN_TARGETS" value="clean.jars,"/> +<booleanAttribute key="org.eclipse.ant.ui.ATTR_TARGETS_UPDATED" value="true"/> +<booleanAttribute key="org.eclipse.ant.ui.DEFAULT_VM_INSTALL" value="false"/> +<booleanAttribute key="org.eclipse.ant.uiSET_INPUTHANDLER" value="false"/> +<stringAttribute key="org.eclipse.debug.core.ATTR_REFRESH_SCOPE" value="${working_set:<?xml version="1.0" encoding="UTF-8"?> <resources> <item path="/org.eclipse.emf.importer.ecore/ant_tasks" type="2"/> </resources>}"/> +<booleanAttribute key="org.eclipse.debug.core.capture_output" value="false"/> +<booleanAttribute key="org.eclipse.debug.ui.ATTR_CONSOLE_OUTPUT_ON" value="false"/> +<booleanAttribute key="org.eclipse.debug.ui.ATTR_LAUNCH_IN_BACKGROUND" value="false"/> +<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="org.eclipse.ant.ui.AntClasspathProvider"/> +<booleanAttribute key="org.eclipse.jdt.launching.DEFAULT_CLASSPATH" value="true"/> +<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.emf.importer.ecore"/> +<stringAttribute key="org.eclipse.ui.externaltools.ATTR_BUILD_SCOPE" value="${working_set:<?xml version="1.0" encoding="UTF-8"?> <resources> <item path="/org.eclipse.emf.importer.ecore/ant_tasks/importer.ecore.tasks.jar" type="1"/> <item path="/org.eclipse.emf.importer.ecore/bin.tasks" type="2"/> </resources>}"/> +<stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="${workspace_loc:/org.eclipse.emf.importer.ecore/build.ant_tasks.ant}"/> +<stringAttribute key="org.eclipse.ui.externaltools.ATTR_RUN_BUILD_KINDS" value="incremental,auto,clean"/> +<booleanAttribute key="org.eclipse.ui.externaltools.ATTR_TRIGGERS_CONFIGURED" value="true"/> +</launchConfiguration> diff --git a/plugins/org.eclipse.emf.importer.ecore/.gitignore b/plugins/org.eclipse.emf.importer.ecore/.gitignore index 638dd98ce..00ae2ffac 100644 --- a/plugins/org.eclipse.emf.importer.ecore/.gitignore +++ b/plugins/org.eclipse.emf.importer.ecore/.gitignore @@ -1,10 +1,2 @@ bin -bin.tasks -ant_tasks -build.xml -temp.folder -*.jar -@dot -@dot.log -*.args -${buildDirectory} +bin.tasks
\ No newline at end of file diff --git a/plugins/org.eclipse.emf.importer.ecore/.project b/plugins/org.eclipse.emf.importer.ecore/.project index 80726bab9..2a4d927a7 100644 --- a/plugins/org.eclipse.emf.importer.ecore/.project +++ b/plugins/org.eclipse.emf.importer.ecore/.project @@ -21,19 +21,6 @@ </arguments> </buildCommand> <buildCommand> - <name>org.eclipse.buckminster.ant.AntBuilder</name> - <arguments> - <dictionary> - <key>given.name</key> - <value>Internal Ant Builder support compile</value> - </dictionary> - <dictionary> - <key>script.file</key> - <value>libraries.ant</value> - </dictionary> - </arguments> - </buildCommand> - <buildCommand> <name>org.eclipse.emf.cdo.releng.version.VersionBuilder</name> <arguments> <dictionary> @@ -54,6 +41,19 @@ </dictionary> </arguments> </buildCommand> + <buildCommand> + <name>org.eclipse.ui.externaltools.ExternalToolBuilder</name> + <arguments> + <dictionary> + <key>LaunchConfigHandle</key> + <value><project>/.externalToolBuilders/org.eclipse.emf.importer.ecore.build.ant_tasks.launch</value> + </dictionary> + <dictionary> + <key>incclean</key> + <value>true</value> + </dictionary> + </arguments> + </buildCommand> </buildSpec> <natures> <nature>org.eclipse.pde.PluginNature</nature> diff --git a/plugins/org.eclipse.emf.importer.ecore/.settings/org.eclipse.pde.prefs b/plugins/org.eclipse.emf.importer.ecore/.settings/org.eclipse.pde.prefs new file mode 100644 index 000000000..c0ede4b6b --- /dev/null +++ b/plugins/org.eclipse.emf.importer.ecore/.settings/org.eclipse.pde.prefs @@ -0,0 +1,3 @@ +compilers.p.build.output.library=2 +compilers.p.build.source.library=2 +eclipse.preferences.version=1 diff --git a/plugins/org.eclipse.emf.importer.ecore/ant_tasks/.gitignore b/plugins/org.eclipse.emf.importer.ecore/ant_tasks/.gitignore new file mode 100644 index 000000000..d2237f050 --- /dev/null +++ b/plugins/org.eclipse.emf.importer.ecore/ant_tasks/.gitignore @@ -0,0 +1 @@ +importer.ecore.tasks.jar
\ No newline at end of file diff --git a/plugins/org.eclipse.emf.importer.ecore/build.ant_tasks.ant b/plugins/org.eclipse.emf.importer.ecore/build.ant_tasks.ant new file mode 100644 index 000000000..1c5410e51 --- /dev/null +++ b/plugins/org.eclipse.emf.importer.ecore/build.ant_tasks.ant @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project name="org.eclipse.emf.importer.ecore" default="build.jars" basedir="."> + <property name="jar.name" value="importer.ecore.tasks"/> + <target name="build.jars"> + <jar destfile="ant_tasks/${jar.name}.jar"> + <fileset dir="bin.tasks"> + <include name="**/*.class"/> + </fileset> + </jar> + </target> + <target name="clean.jars"> + <delete file="ant_tasks/${jar.name}.jar" failonerror="false"/> + </target> +</project> diff --git a/plugins/org.eclipse.emf.importer.ecore/build.properties b/plugins/org.eclipse.emf.importer.ecore/build.properties index 8f14ee56e..08e16fda9 100644 --- a/plugins/org.eclipse.emf.importer.ecore/build.properties +++ b/plugins/org.eclipse.emf.importer.ecore/build.properties @@ -14,7 +14,7 @@ source.. = src/ output.. = bin/ source.ant_tasks/importer.ecore.tasks.jar = tasks/ output.ant_tasks/importer.ecore.tasks.jar = bin.tasks/ -jars.extra.classpath = ../org.eclipse.emf.ant/ant_tasks/emf.ant.tasks.jar +extra.ant_tasks/importer.ecore.tasks.jar = platform:/plugin/org.eclipse.emf.ant/ant_tasks/emf.ant.tasks.jar exclude.. = **/doc-files/** exclude.ant_tasks/importer.ecore.tasks.jar = **/doc-files/** diff --git a/plugins/org.eclipse.emf.importer.ecore/libraries.ant b/plugins/org.eclipse.emf.importer.ecore/libraries.ant deleted file mode 100644 index c594d803b..000000000 --- a/plugins/org.eclipse.emf.importer.ecore/libraries.ant +++ /dev/null @@ -1,107 +0,0 @@ -<project name="Build libraries" default="build"> - <macrodef name="propertyvalue"> - <attribute name="property" /> - <attribute name="name" /> - <sequential> - <property name="@{property}" value="${@{name}}" /> - </sequential> - </macrodef> - - <target name="-define.properties"> - <property prefix="build.properties." file="build.properties" /> - - <!-- remove the default entry (".") from the list --> - <pathconvert property="libraries"> - <filelist dir="${basedir}" files="${build.properties.jars.compile.order}" /> - <globmapper from="${basedir}/*" to="${basedir}/*" handledirsep="true" /> - </pathconvert> - - <path id="libraries" path="${libraries}" /> - - <pathconvert property="library.build.temp.dirs"> - <path refid="libraries" /> - <globmapper from="*" to="*-temp" /> - </pathconvert> - - <path id="library.build.temp.path" path="${library.build.temp.dirs}" /> - - <pathconvert property="library.build.stamps" refid="library.build.temp.path"> - <globmapper from="*" to="*/.stamp" /> - </pathconvert> - - <path id="library.stamps.path" path="${library.build.stamps}" /> - </target> - - <target name="build" depends="-define.properties"> - <touch mkdirs="true" verbose="false"> - <path refid="library.stamps.path" /> - </touch> - - <subant genericantfile="${ant.file}" target="-build.library" inheritall="true"> - <path refid="library.build.temp.path" /> - <property name="original.basedir" value="${basedir}" /> - </subant> - - <delete includeemptydirs="true"> - <path refid="library.stamps.path" /> - <path refid="library.build.temp.path" /> - </delete> - </target> - - <target name="-build.library"> - <pathconvert property="library" dirsep="/"> - <path location="${basedir}" /> - <globmapper from="${original.basedir}/*-temp" to="*" handledirsep="true" /> - </pathconvert> - - <propertyvalue property="source.dir" name="build.properties.source.${library}" /> - - <condition property="output.definition" value="build.properties.output.${library}" else="build.properties.output.."> - <isset property="build.properties.output.${library}" /> - </condition> - - <propertyvalue property="target.dir" name="${output.definition}" /> - - <condition property="excludes" value=""> - <not> - <isset property="build.properties.exclude.${library}" /> - </not> - </condition> - - <propertyvalue property="excludes" name="build.properties.exclude.${library}" /> - - <echo message="Library...: ${library}" /> - <echo message="Source dir: ${source.dir}" /> - <echo message="Target dir: ${target.dir}" /> - <echo message="Excludes..: ${excludes}" /> - - <property name="library.path" location="${original.basedir}/${library}" /> - - <jar destfile="${library.path}"> - <fileset dir="${original.basedir}/${target.dir}" excludes="${excludes}"> - <present targetdir="${original.basedir}/${source.dir}"> - <mapper> - <filtermapper> - <replaceregex pattern="(?:\$$.+)?\.class$$" replace=".java" /> - </filtermapper> - </mapper> - </present> - </fileset> - </jar> - - <eclipse.convertPath fileSystemPath="${library.path}" property="library.workspace.path" /> - <eclipse.refreshLocal resource="${library.workspace.path}" depth="infinite" /> - </target> - - <target name="clean" depends="-define.properties"> - <!-- remove the libaries --> - <delete includeemptydirs="true"> - <path refid="library.stamps.path" /> - <path refid="library.build.temp.path" /> - <path refid="libraries" /> - </delete> - - <eclipse.convertPath fileSystemPath="${basedir}" property="project.workspace.path" /> - <eclipse.refreshLocal resource="${project.workspace.path}" depth="infinite" /> - </target> -</project> diff --git a/plugins/org.eclipse.emf.importer.java/.externalToolBuilders/org.eclipse.emf.importer.java.build.ant_tasks.launch b/plugins/org.eclipse.emf.importer.java/.externalToolBuilders/org.eclipse.emf.importer.java.build.ant_tasks.launch new file mode 100644 index 000000000..210e1df04 --- /dev/null +++ b/plugins/org.eclipse.emf.importer.java/.externalToolBuilders/org.eclipse.emf.importer.java.build.ant_tasks.launch @@ -0,0 +1,18 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<launchConfiguration type="org.eclipse.ant.AntBuilderLaunchConfigurationType"> +<stringAttribute key="org.eclipse.ant.ui.ATTR_ANT_CLEAN_TARGETS" value="clean.jars,"/> +<booleanAttribute key="org.eclipse.ant.ui.ATTR_TARGETS_UPDATED" value="true"/> +<booleanAttribute key="org.eclipse.ant.ui.DEFAULT_VM_INSTALL" value="false"/> +<booleanAttribute key="org.eclipse.ant.uiSET_INPUTHANDLER" value="false"/> +<stringAttribute key="org.eclipse.debug.core.ATTR_REFRESH_SCOPE" value="${working_set:<?xml version="1.0" encoding="UTF-8"?> <resources> <item path="/org.eclipse.emf.importer.java/ant_tasks" type="2"/> </resources>}"/> +<booleanAttribute key="org.eclipse.debug.core.capture_output" value="false"/> +<booleanAttribute key="org.eclipse.debug.ui.ATTR_CONSOLE_OUTPUT_ON" value="false"/> +<booleanAttribute key="org.eclipse.debug.ui.ATTR_LAUNCH_IN_BACKGROUND" value="false"/> +<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="org.eclipse.ant.ui.AntClasspathProvider"/> +<booleanAttribute key="org.eclipse.jdt.launching.DEFAULT_CLASSPATH" value="true"/> +<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.emf.importer.java"/> +<stringAttribute key="org.eclipse.ui.externaltools.ATTR_BUILD_SCOPE" value="${working_set:<?xml version="1.0" encoding="UTF-8"?> <resources> <item path="/org.eclipse.emf.importer.java/ant_tasks/importer.java.tasks.jar" type="1"/> <item path="/org.eclipse.emf.importer.java/bin.tasks" type="2"/> </resources>}"/> +<stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="${workspace_loc:/org.eclipse.emf.importer.java/build.ant_tasks.ant}"/> +<stringAttribute key="org.eclipse.ui.externaltools.ATTR_RUN_BUILD_KINDS" value="incremental,auto,clean"/> +<booleanAttribute key="org.eclipse.ui.externaltools.ATTR_TRIGGERS_CONFIGURED" value="true"/> +</launchConfiguration> diff --git a/plugins/org.eclipse.emf.importer.java/.gitignore b/plugins/org.eclipse.emf.importer.java/.gitignore index 638dd98ce..00ae2ffac 100644 --- a/plugins/org.eclipse.emf.importer.java/.gitignore +++ b/plugins/org.eclipse.emf.importer.java/.gitignore @@ -1,10 +1,2 @@ bin -bin.tasks -ant_tasks -build.xml -temp.folder -*.jar -@dot -@dot.log -*.args -${buildDirectory} +bin.tasks
\ No newline at end of file diff --git a/plugins/org.eclipse.emf.importer.java/.project b/plugins/org.eclipse.emf.importer.java/.project index 6a7284a75..7d93eb0f1 100644 --- a/plugins/org.eclipse.emf.importer.java/.project +++ b/plugins/org.eclipse.emf.importer.java/.project @@ -21,19 +21,6 @@ </arguments> </buildCommand> <buildCommand> - <name>org.eclipse.buckminster.ant.AntBuilder</name> - <arguments> - <dictionary> - <key>given.name</key> - <value>Internal Ant Builder support compile</value> - </dictionary> - <dictionary> - <key>script.file</key> - <value>libraries.ant</value> - </dictionary> - </arguments> - </buildCommand> - <buildCommand> <name>org.eclipse.emf.cdo.releng.version.VersionBuilder</name> <arguments> <dictionary> @@ -54,6 +41,19 @@ </dictionary> </arguments> </buildCommand> + <buildCommand> + <name>org.eclipse.ui.externaltools.ExternalToolBuilder</name> + <arguments> + <dictionary> + <key>LaunchConfigHandle</key> + <value><project>/.externalToolBuilders/org.eclipse.emf.importer.java.build.ant_tasks.launch</value> + </dictionary> + <dictionary> + <key>incclean</key> + <value>true</value> + </dictionary> + </arguments> + </buildCommand> </buildSpec> <natures> <nature>org.eclipse.jdt.core.javanature</nature> diff --git a/plugins/org.eclipse.emf.importer.java/.settings/org.eclipse.pde.prefs b/plugins/org.eclipse.emf.importer.java/.settings/org.eclipse.pde.prefs new file mode 100644 index 000000000..c0ede4b6b --- /dev/null +++ b/plugins/org.eclipse.emf.importer.java/.settings/org.eclipse.pde.prefs @@ -0,0 +1,3 @@ +compilers.p.build.output.library=2 +compilers.p.build.source.library=2 +eclipse.preferences.version=1 diff --git a/plugins/org.eclipse.emf.importer.java/META-INF/MANIFEST.MF b/plugins/org.eclipse.emf.importer.java/META-INF/MANIFEST.MF index c7fe750db..82f8a43f1 100644 --- a/plugins/org.eclipse.emf.importer.java/META-INF/MANIFEST.MF +++ b/plugins/org.eclipse.emf.importer.java/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: %pluginName Bundle-SymbolicName: org.eclipse.emf.importer.java; singleton:=true -Bundle-Version: 2.6.0.qualifier +Bundle-Version: 2.7.0.qualifier Bundle-ClassPath: . Bundle-Activator: org.eclipse.emf.importer.java.JavaImporterPlugin$Implementation Bundle-Vendor: %providerName diff --git a/plugins/org.eclipse.emf.importer.java/ant_tasks/.gitignore b/plugins/org.eclipse.emf.importer.java/ant_tasks/.gitignore new file mode 100644 index 000000000..2d349ccca --- /dev/null +++ b/plugins/org.eclipse.emf.importer.java/ant_tasks/.gitignore @@ -0,0 +1 @@ +importer.java.tasks.jar
\ No newline at end of file diff --git a/plugins/org.eclipse.emf.importer.java/build.ant_tasks.ant b/plugins/org.eclipse.emf.importer.java/build.ant_tasks.ant new file mode 100644 index 000000000..a01279efd --- /dev/null +++ b/plugins/org.eclipse.emf.importer.java/build.ant_tasks.ant @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project name="org.eclipse.emf.importer.java" default="build.jars" basedir="."> + <property name="jar.name" value="importer.java.tasks"/> + <target name="build.jars"> + <jar destfile="ant_tasks/${jar.name}.jar"> + <fileset dir="bin.tasks"> + <include name="**/*.class"/> + </fileset> + </jar> + </target> + <target name="clean.jars"> + <delete file="ant_tasks/${jar.name}.jar" failonerror="false"/> + </target> +</project> diff --git a/plugins/org.eclipse.emf.importer.java/build.properties b/plugins/org.eclipse.emf.importer.java/build.properties index 808bebb7b..9aedeb39a 100644 --- a/plugins/org.eclipse.emf.importer.java/build.properties +++ b/plugins/org.eclipse.emf.importer.java/build.properties @@ -15,6 +15,6 @@ output.. = bin/ exclude.. = **/doc-files/** source.ant_tasks/importer.java.tasks.jar = tasks/ output.ant_tasks/importer.java.tasks.jar = bin.tasks/ -jars.extra.classpath = ../org.eclipse.emf.ant/ant_tasks/emf.ant.tasks.jar +extra.ant_tasks/importer.java.tasks.jar = platform:/plugin/org.eclipse.emf.ant/ant_tasks/emf.ant.tasks.jar exclude.ant_tasks/importer.java.tasks.jar = **/doc-files/** diff --git a/plugins/org.eclipse.emf.importer.java/libraries.ant b/plugins/org.eclipse.emf.importer.java/libraries.ant deleted file mode 100644 index c594d803b..000000000 --- a/plugins/org.eclipse.emf.importer.java/libraries.ant +++ /dev/null @@ -1,107 +0,0 @@ -<project name="Build libraries" default="build"> - <macrodef name="propertyvalue"> - <attribute name="property" /> - <attribute name="name" /> - <sequential> - <property name="@{property}" value="${@{name}}" /> - </sequential> - </macrodef> - - <target name="-define.properties"> - <property prefix="build.properties." file="build.properties" /> - - <!-- remove the default entry (".") from the list --> - <pathconvert property="libraries"> - <filelist dir="${basedir}" files="${build.properties.jars.compile.order}" /> - <globmapper from="${basedir}/*" to="${basedir}/*" handledirsep="true" /> - </pathconvert> - - <path id="libraries" path="${libraries}" /> - - <pathconvert property="library.build.temp.dirs"> - <path refid="libraries" /> - <globmapper from="*" to="*-temp" /> - </pathconvert> - - <path id="library.build.temp.path" path="${library.build.temp.dirs}" /> - - <pathconvert property="library.build.stamps" refid="library.build.temp.path"> - <globmapper from="*" to="*/.stamp" /> - </pathconvert> - - <path id="library.stamps.path" path="${library.build.stamps}" /> - </target> - - <target name="build" depends="-define.properties"> - <touch mkdirs="true" verbose="false"> - <path refid="library.stamps.path" /> - </touch> - - <subant genericantfile="${ant.file}" target="-build.library" inheritall="true"> - <path refid="library.build.temp.path" /> - <property name="original.basedir" value="${basedir}" /> - </subant> - - <delete includeemptydirs="true"> - <path refid="library.stamps.path" /> - <path refid="library.build.temp.path" /> - </delete> - </target> - - <target name="-build.library"> - <pathconvert property="library" dirsep="/"> - <path location="${basedir}" /> - <globmapper from="${original.basedir}/*-temp" to="*" handledirsep="true" /> - </pathconvert> - - <propertyvalue property="source.dir" name="build.properties.source.${library}" /> - - <condition property="output.definition" value="build.properties.output.${library}" else="build.properties.output.."> - <isset property="build.properties.output.${library}" /> - </condition> - - <propertyvalue property="target.dir" name="${output.definition}" /> - - <condition property="excludes" value=""> - <not> - <isset property="build.properties.exclude.${library}" /> - </not> - </condition> - - <propertyvalue property="excludes" name="build.properties.exclude.${library}" /> - - <echo message="Library...: ${library}" /> - <echo message="Source dir: ${source.dir}" /> - <echo message="Target dir: ${target.dir}" /> - <echo message="Excludes..: ${excludes}" /> - - <property name="library.path" location="${original.basedir}/${library}" /> - - <jar destfile="${library.path}"> - <fileset dir="${original.basedir}/${target.dir}" excludes="${excludes}"> - <present targetdir="${original.basedir}/${source.dir}"> - <mapper> - <filtermapper> - <replaceregex pattern="(?:\$$.+)?\.class$$" replace=".java" /> - </filtermapper> - </mapper> - </present> - </fileset> - </jar> - - <eclipse.convertPath fileSystemPath="${library.path}" property="library.workspace.path" /> - <eclipse.refreshLocal resource="${library.workspace.path}" depth="infinite" /> - </target> - - <target name="clean" depends="-define.properties"> - <!-- remove the libaries --> - <delete includeemptydirs="true"> - <path refid="library.stamps.path" /> - <path refid="library.build.temp.path" /> - <path refid="libraries" /> - </delete> - - <eclipse.convertPath fileSystemPath="${basedir}" property="project.workspace.path" /> - <eclipse.refreshLocal resource="${project.workspace.path}" depth="infinite" /> - </target> -</project> diff --git a/plugins/org.eclipse.emf.importer.java/src/org/eclipse/emf/importer/java/builder/JavaEcoreBuilder.java b/plugins/org.eclipse.emf.importer.java/src/org/eclipse/emf/importer/java/builder/JavaEcoreBuilder.java index 555d3ec53..252a611a0 100644 --- a/plugins/org.eclipse.emf.importer.java/src/org/eclipse/emf/importer/java/builder/JavaEcoreBuilder.java +++ b/plugins/org.eclipse.emf.importer.java/src/org/eclipse/emf/importer/java/builder/JavaEcoreBuilder.java @@ -598,6 +598,9 @@ public class JavaEcoreBuilder Bundle bundle = Platform.getBundle(pluginID); if (bundle != null) { + // Ignore this for Eclipse 3.5 compatibility. + // + @SuppressWarnings("cast") String requires = (String)bundle.getHeaders().get(Constants.REQUIRE_BUNDLE); if (requires != null) { diff --git a/plugins/org.eclipse.emf.importer.rose/.externalToolBuilders/org.eclipse.emf.importer.rose.build.ant_tasks.launch b/plugins/org.eclipse.emf.importer.rose/.externalToolBuilders/org.eclipse.emf.importer.rose.build.ant_tasks.launch new file mode 100644 index 000000000..9efc65d80 --- /dev/null +++ b/plugins/org.eclipse.emf.importer.rose/.externalToolBuilders/org.eclipse.emf.importer.rose.build.ant_tasks.launch @@ -0,0 +1,18 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<launchConfiguration type="org.eclipse.ant.AntBuilderLaunchConfigurationType"> +<stringAttribute key="org.eclipse.ant.ui.ATTR_ANT_CLEAN_TARGETS" value="clean.jars,"/> +<booleanAttribute key="org.eclipse.ant.ui.ATTR_TARGETS_UPDATED" value="true"/> +<booleanAttribute key="org.eclipse.ant.ui.DEFAULT_VM_INSTALL" value="false"/> +<booleanAttribute key="org.eclipse.ant.uiSET_INPUTHANDLER" value="false"/> +<stringAttribute key="org.eclipse.debug.core.ATTR_REFRESH_SCOPE" value="${working_set:<?xml version="1.0" encoding="UTF-8"?> <resources> <item path="/org.eclipse.emf.importer.rose/ant_tasks" type="2"/> </resources>}"/> +<booleanAttribute key="org.eclipse.debug.core.capture_output" value="false"/> +<booleanAttribute key="org.eclipse.debug.ui.ATTR_CONSOLE_OUTPUT_ON" value="false"/> +<booleanAttribute key="org.eclipse.debug.ui.ATTR_LAUNCH_IN_BACKGROUND" value="false"/> +<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="org.eclipse.ant.ui.AntClasspathProvider"/> +<booleanAttribute key="org.eclipse.jdt.launching.DEFAULT_CLASSPATH" value="true"/> +<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.emf.importer.rose"/> +<stringAttribute key="org.eclipse.ui.externaltools.ATTR_BUILD_SCOPE" value="${working_set:<?xml version="1.0" encoding="UTF-8"?> <resources> <item path="/org.eclipse.emf.importer.rose/ant_tasks/importer.rose.tasks.jar" type="1"/> <item path="/org.eclipse.emf.importer.rose/bin.tasks" type="2"/> </resources>}"/> +<stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="${workspace_loc:/org.eclipse.emf.importer.rose/build.ant_tasks.ant}"/> +<stringAttribute key="org.eclipse.ui.externaltools.ATTR_RUN_BUILD_KINDS" value="incremental,auto,clean"/> +<booleanAttribute key="org.eclipse.ui.externaltools.ATTR_TRIGGERS_CONFIGURED" value="true"/> +</launchConfiguration> diff --git a/plugins/org.eclipse.emf.importer.rose/.gitignore b/plugins/org.eclipse.emf.importer.rose/.gitignore index 638dd98ce..00ae2ffac 100644 --- a/plugins/org.eclipse.emf.importer.rose/.gitignore +++ b/plugins/org.eclipse.emf.importer.rose/.gitignore @@ -1,10 +1,2 @@ bin -bin.tasks -ant_tasks -build.xml -temp.folder -*.jar -@dot -@dot.log -*.args -${buildDirectory} +bin.tasks
\ No newline at end of file diff --git a/plugins/org.eclipse.emf.importer.rose/.project b/plugins/org.eclipse.emf.importer.rose/.project index 19b92f869..5972b1b47 100644 --- a/plugins/org.eclipse.emf.importer.rose/.project +++ b/plugins/org.eclipse.emf.importer.rose/.project @@ -21,19 +21,6 @@ </arguments> </buildCommand> <buildCommand> - <name>org.eclipse.buckminster.ant.AntBuilder</name> - <arguments> - <dictionary> - <key>given.name</key> - <value>Internal Ant Builder support compile</value> - </dictionary> - <dictionary> - <key>script.file</key> - <value>libraries.ant</value> - </dictionary> - </arguments> - </buildCommand> - <buildCommand> <name>org.eclipse.emf.cdo.releng.version.VersionBuilder</name> <arguments> <dictionary> @@ -54,6 +41,19 @@ </dictionary> </arguments> </buildCommand> + <buildCommand> + <name>org.eclipse.ui.externaltools.ExternalToolBuilder</name> + <arguments> + <dictionary> + <key>LaunchConfigHandle</key> + <value><project>/.externalToolBuilders/org.eclipse.emf.importer.rose.build.ant_tasks.launch</value> + </dictionary> + <dictionary> + <key>incclean</key> + <value>true</value> + </dictionary> + </arguments> + </buildCommand> </buildSpec> <natures> <nature>org.eclipse.jdt.core.javanature</nature> diff --git a/plugins/org.eclipse.emf.importer.rose/.settings/org.eclipse.pde.prefs b/plugins/org.eclipse.emf.importer.rose/.settings/org.eclipse.pde.prefs new file mode 100644 index 000000000..9a50510a5 --- /dev/null +++ b/plugins/org.eclipse.emf.importer.rose/.settings/org.eclipse.pde.prefs @@ -0,0 +1,32 @@ +compilers.f.unresolved-features=1 +compilers.f.unresolved-plugins=2 +compilers.incompatible-environment=1 +compilers.p.build=1 +compilers.p.build.bin.includes=1 +compilers.p.build.encodings=2 +compilers.p.build.java.compiler=2 +compilers.p.build.java.compliance=1 +compilers.p.build.missing.output=2 +compilers.p.build.output.library=2 +compilers.p.build.source.library=2 +compilers.p.build.src.includes=1 +compilers.p.deprecated=2 +compilers.p.discouraged-class=1 +compilers.p.internal=1 +compilers.p.missing-packages=2 +compilers.p.missing-version-export-package=2 +compilers.p.missing-version-import-package=2 +compilers.p.missing-version-require-bundle=2 +compilers.p.no-required-att=0 +compilers.p.not-externalized-att=1 +compilers.p.unknown-attribute=1 +compilers.p.unknown-class=1 +compilers.p.unknown-element=1 +compilers.p.unknown-identifier=1 +compilers.p.unknown-resource=1 +compilers.p.unresolved-ex-points=0 +compilers.p.unresolved-import=0 +compilers.s.create-docs=false +compilers.s.doc-folder=doc +compilers.s.open-tags=1 +eclipse.preferences.version=1 diff --git a/plugins/org.eclipse.emf.importer.rose/ant_tasks/.gitignore b/plugins/org.eclipse.emf.importer.rose/ant_tasks/.gitignore new file mode 100644 index 000000000..e82bf8997 --- /dev/null +++ b/plugins/org.eclipse.emf.importer.rose/ant_tasks/.gitignore @@ -0,0 +1 @@ +importer.rose.tasks.jar
\ No newline at end of file diff --git a/plugins/org.eclipse.emf.importer.rose/build.ant_tasks.ant b/plugins/org.eclipse.emf.importer.rose/build.ant_tasks.ant new file mode 100644 index 000000000..7e81326a4 --- /dev/null +++ b/plugins/org.eclipse.emf.importer.rose/build.ant_tasks.ant @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project name="org.eclipse.emf.importer.rose" default="build.jars" basedir="."> + <property name="jar.name" value="importer.rose.tasks"/> + <target name="build.jars"> + <jar destfile="ant_tasks/${jar.name}.jar"> + <fileset dir="bin.tasks"> + <include name="**/*.class"/> + </fileset> + </jar> + </target> + <target name="clean.jars"> + <delete file="ant_tasks/${jar.name}.jar" failonerror="false"/> + </target> +</project> diff --git a/plugins/org.eclipse.emf.importer.rose/build.properties b/plugins/org.eclipse.emf.importer.rose/build.properties index 745f2f25a..5c5756440 100644 --- a/plugins/org.eclipse.emf.importer.rose/build.properties +++ b/plugins/org.eclipse.emf.importer.rose/build.properties @@ -15,7 +15,7 @@ source.. = src/ output.. = bin/ source.ant_tasks/importer.rose.tasks.jar = tasks/ output.ant_tasks/importer.rose.tasks.jar = bin.tasks/ -jars.extra.classpath = ../org.eclipse.emf.ant/ant_tasks/emf.ant.tasks.jar +extra.ant_tasks/importer.rose.tasks.jar = platform:/plugin/org.eclipse.emf.ant/ant_tasks/emf.ant.tasks.jar exclude.. = **/doc-files/** exclude.ant_tasks/importer.rose.tasks.jar = **/doc-files/** diff --git a/plugins/org.eclipse.emf.importer.rose/libraries.ant b/plugins/org.eclipse.emf.importer.rose/libraries.ant deleted file mode 100644 index c594d803b..000000000 --- a/plugins/org.eclipse.emf.importer.rose/libraries.ant +++ /dev/null @@ -1,107 +0,0 @@ -<project name="Build libraries" default="build"> - <macrodef name="propertyvalue"> - <attribute name="property" /> - <attribute name="name" /> - <sequential> - <property name="@{property}" value="${@{name}}" /> - </sequential> - </macrodef> - - <target name="-define.properties"> - <property prefix="build.properties." file="build.properties" /> - - <!-- remove the default entry (".") from the list --> - <pathconvert property="libraries"> - <filelist dir="${basedir}" files="${build.properties.jars.compile.order}" /> - <globmapper from="${basedir}/*" to="${basedir}/*" handledirsep="true" /> - </pathconvert> - - <path id="libraries" path="${libraries}" /> - - <pathconvert property="library.build.temp.dirs"> - <path refid="libraries" /> - <globmapper from="*" to="*-temp" /> - </pathconvert> - - <path id="library.build.temp.path" path="${library.build.temp.dirs}" /> - - <pathconvert property="library.build.stamps" refid="library.build.temp.path"> - <globmapper from="*" to="*/.stamp" /> - </pathconvert> - - <path id="library.stamps.path" path="${library.build.stamps}" /> - </target> - - <target name="build" depends="-define.properties"> - <touch mkdirs="true" verbose="false"> - <path refid="library.stamps.path" /> - </touch> - - <subant genericantfile="${ant.file}" target="-build.library" inheritall="true"> - <path refid="library.build.temp.path" /> - <property name="original.basedir" value="${basedir}" /> - </subant> - - <delete includeemptydirs="true"> - <path refid="library.stamps.path" /> - <path refid="library.build.temp.path" /> - </delete> - </target> - - <target name="-build.library"> - <pathconvert property="library" dirsep="/"> - <path location="${basedir}" /> - <globmapper from="${original.basedir}/*-temp" to="*" handledirsep="true" /> - </pathconvert> - - <propertyvalue property="source.dir" name="build.properties.source.${library}" /> - - <condition property="output.definition" value="build.properties.output.${library}" else="build.properties.output.."> - <isset property="build.properties.output.${library}" /> - </condition> - - <propertyvalue property="target.dir" name="${output.definition}" /> - - <condition property="excludes" value=""> - <not> - <isset property="build.properties.exclude.${library}" /> - </not> - </condition> - - <propertyvalue property="excludes" name="build.properties.exclude.${library}" /> - - <echo message="Library...: ${library}" /> - <echo message="Source dir: ${source.dir}" /> - <echo message="Target dir: ${target.dir}" /> - <echo message="Excludes..: ${excludes}" /> - - <property name="library.path" location="${original.basedir}/${library}" /> - - <jar destfile="${library.path}"> - <fileset dir="${original.basedir}/${target.dir}" excludes="${excludes}"> - <present targetdir="${original.basedir}/${source.dir}"> - <mapper> - <filtermapper> - <replaceregex pattern="(?:\$$.+)?\.class$$" replace=".java" /> - </filtermapper> - </mapper> - </present> - </fileset> - </jar> - - <eclipse.convertPath fileSystemPath="${library.path}" property="library.workspace.path" /> - <eclipse.refreshLocal resource="${library.workspace.path}" depth="infinite" /> - </target> - - <target name="clean" depends="-define.properties"> - <!-- remove the libaries --> - <delete includeemptydirs="true"> - <path refid="library.stamps.path" /> - <path refid="library.build.temp.path" /> - <path refid="libraries" /> - </delete> - - <eclipse.convertPath fileSystemPath="${basedir}" property="project.workspace.path" /> - <eclipse.refreshLocal resource="${project.workspace.path}" depth="infinite" /> - </target> -</project> diff --git a/releng/org.eclipse.emf.releng/.classpath b/releng/org.eclipse.emf.releng/.classpath new file mode 100644 index 000000000..18d70f02c --- /dev/null +++ b/releng/org.eclipse.emf.releng/.classpath @@ -0,0 +1,6 @@ +<?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/JavaSE-1.6"/> + <classpathentry kind="output" path="bin"/> +</classpath> diff --git a/releng/org.eclipse.emf.releng/.gitignore b/releng/org.eclipse.emf.releng/.gitignore new file mode 100644 index 000000000..ba077a403 --- /dev/null +++ b/releng/org.eclipse.emf.releng/.gitignore @@ -0,0 +1 @@ +bin diff --git a/releng/org.eclipse.emf.releng/.project b/releng/org.eclipse.emf.releng/.project new file mode 100644 index 000000000..8c2bef3d4 --- /dev/null +++ b/releng/org.eclipse.emf.releng/.project @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="UTF-8"?> +<projectDescription> + <name>org.eclipse.emf.releng</name> + <comment></comment> + <projects> + </projects> + <buildSpec> + <buildCommand> + <name>org.eclipse.jdt.core.javabuilder</name> + <arguments> + </arguments> + </buildCommand> + </buildSpec> + <natures> + <nature>org.eclipse.jdt.core.javanature</nature> + </natures> +</projectDescription> diff --git a/releng/org.eclipse.emf.releng/.settings/org.eclipse.jdt.core.prefs b/releng/org.eclipse.emf.releng/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 000000000..8000cd6ca --- /dev/null +++ b/releng/org.eclipse.emf.releng/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,11 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 +org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve +org.eclipse.jdt.core.compiler.compliance=1.6 +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.6 diff --git a/releng/org.eclipse.emf.releng/exampleBuilderTemplates/copyExample.ant b/releng/org.eclipse.emf.releng/exampleBuilderTemplates/copyExample.ant new file mode 100644 index 000000000..b97bde5cb --- /dev/null +++ b/releng/org.eclipse.emf.releng/exampleBuilderTemplates/copyExample.ant @@ -0,0 +1,12 @@ +<?xml version="1.0"?> +<project name="copyExample" default="main" basedir="../.."> + + <property name="installer" value="#INSTALLER_PROJECT#" /> + <import file="../../${installer}/copyExampleLib.ant" optional="true" /> + <basename file="${build.project}" property="project" /> + + <target name="main"> + <copyExample project="${project}" /> + </target> + +</project> diff --git a/releng/org.eclipse.emf.releng/exampleBuilderTemplates/template.launch b/releng/org.eclipse.emf.releng/exampleBuilderTemplates/template.launch new file mode 100644 index 000000000..13c7073cb --- /dev/null +++ b/releng/org.eclipse.emf.releng/exampleBuilderTemplates/template.launch @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<launchConfiguration type="org.eclipse.ant.AntBuilderLaunchConfigurationType"> +<booleanAttribute key="org.eclipse.ant.ui.ATTR_TARGETS_UPDATED" value="true"/> +<booleanAttribute key="org.eclipse.ant.ui.DEFAULT_VM_INSTALL" value="false"/> +<booleanAttribute key="org.eclipse.ant.uiSET_INPUTHANDLER" value="false"/> +<stringAttribute key="org.eclipse.debug.core.ATTR_REFRESH_SCOPE" value="${working_set:<?xml version="1.0" encoding="UTF-8"?> <resources> #REFRESH_RESOURCES#</resources>}"/> +<booleanAttribute key="org.eclipse.debug.core.capture_output" value="false"/> +<booleanAttribute key="org.eclipse.debug.ui.ATTR_CONSOLE_OUTPUT_ON" value="false"/> +<booleanAttribute key="org.eclipse.debug.ui.ATTR_LAUNCH_IN_BACKGROUND" value="false"/> +<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="org.eclipse.ant.ui.AntClasspathProvider"/> +<booleanAttribute key="org.eclipse.jdt.launching.DEFAULT_CLASSPATH" value="true"/> +<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value=""/> +<booleanAttribute key="org.eclipse.ui.externaltools.ATTR_BUILDER_ENABLED" value="true"/> +<stringAttribute key="org.eclipse.ui.externaltools.ATTR_BUILD_SCOPE" value="${working_set:<?xml version="1.0" encoding="UTF-8"?> <resources> #RELEVANT_RESOURCES#</resources>}"/> +<stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="${build_project}/.externalToolBuilders/copyExample.ant"/> +<stringAttribute key="org.eclipse.ui.externaltools.ATTR_RUN_BUILD_KINDS" value="incremental,auto,"/> +<stringAttribute key="org.eclipse.ui.externaltools.ATTR_TOOL_ARGUMENTS" value="-Dbuild.project=${build_project}"/> +<booleanAttribute key="org.eclipse.ui.externaltools.ATTR_TRIGGERS_CONFIGURED" value="true"/> +</launchConfiguration> diff --git a/releng/org.eclipse.emf.releng/exampleBuilderTemplates/template.project b/releng/org.eclipse.emf.releng/exampleBuilderTemplates/template.project new file mode 100644 index 000000000..97d0290f7 --- /dev/null +++ b/releng/org.eclipse.emf.releng/exampleBuilderTemplates/template.project @@ -0,0 +1,14 @@ + <buildCommand> + <name>org.eclipse.ui.externaltools.ExternalToolBuilder</name> + <triggers>auto,full,incremental,</triggers> + <arguments> + <dictionary> + <key>LaunchConfigHandle</key> + <value><project>/.externalToolBuilders/#EXAMPLE_PROJECT#.launch</value> + </dictionary> + <dictionary> + <key>incclean</key> + <value>true</value> + </dictionary> + </arguments> + </buildCommand> diff --git a/releng/org.eclipse.emf.releng/src/org/eclipse/emf/releng/GenerateExampleBuilders.java b/releng/org.eclipse.emf.releng/src/org/eclipse/emf/releng/GenerateExampleBuilders.java new file mode 100644 index 000000000..6a453d805 --- /dev/null +++ b/releng/org.eclipse.emf.releng/src/org/eclipse/emf/releng/GenerateExampleBuilders.java @@ -0,0 +1,253 @@ +/* + * Copyright (c) 2012 Eclipse contributors 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 + */ +package org.eclipse.emf.releng; + +import org.xml.sax.Attributes; +import org.xml.sax.SAXException; +import org.xml.sax.helpers.DefaultHandler; + +import javax.xml.parsers.SAXParser; +import javax.xml.parsers.SAXParserFactory; + +import java.io.BufferedReader; +import java.io.BufferedWriter; +import java.io.File; +import java.io.FileInputStream; +import java.io.FileReader; +import java.io.FileWriter; +import java.io.IOException; +import java.io.InputStream; +import java.util.HashMap; +import java.util.Map; +import java.util.Map.Entry; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +public class GenerateExampleBuilders +{ + private static final String TOKEN_EXAMPLE_PROJECT = "#EXAMPLE_PROJECT#"; + + private static final String TOKEN_INSTALLER_PROJECT = "#INSTALLER_PROJECT#"; + + private static final String TOKEN_RELEVANT_RESOURCES = "#RELEVANT_RESOURCES#"; + + private static final String TOKEN_REFRESH_RESOURCES = "#REFRESH_RESOURCES#"; + + private static final String NL = System.getProperty("line.separator"); + + public static void main(String[] args) throws Exception + { + if (true) + { + System.err.println("##"); + return; + } + File installerPoject = new File(args[0]).getCanonicalFile(); + File pluginXML = new File(installerPoject, "plugin.xml"); + System.out.println("Analyzing " + pluginXML); + + SAXParser parser = SAXParserFactory.newInstance().newSAXParser(); + XMLHandler handler = new XMLHandler(installerPoject); + InputStream in = new FileInputStream(pluginXML); + + try + { + parser.parse(in, handler); + } + finally + { + in.close(); + } + } + + private static void processProjectDescriptor(File exampleProject, File installerPoject, String targetFolder) + throws Exception + { + String exampleProjectName = exampleProject.getName(); + String targetPath = installerPoject.getName() + "/" + targetFolder; + + StringBuilder relevantResources = new StringBuilder(); + relevantResources.append(getItemPath(targetPath, 2)); + + for (File file : exampleProject.listFiles()) + { + String name = file.getName(); + int type = file.isDirectory() ? 2 : 1; + + if (!"bin".equals(name)) + { + String path = exampleProjectName + "/" + name; + relevantResources.append(getItemPath(path, type)); + } + } + + Map<String, String> substitutes = new HashMap<String, String>(); + addSubtitute(substitutes, TOKEN_EXAMPLE_PROJECT, exampleProject.getName()); + addSubtitute(substitutes, TOKEN_INSTALLER_PROJECT, installerPoject.getName()); + addSubtitute(substitutes, TOKEN_RELEVANT_RESOURCES, relevantResources.toString()); + addSubtitute(substitutes, TOKEN_REFRESH_RESOURCES, getItemPath(new File(targetPath).getParent(), 2)); + + copy(exampleProject, substitutes, "copyExample.ant", ".externalToolBuilders/copyExample.ant"); + copy(exampleProject, substitutes, "template.launch", ".externalToolBuilders/" + exampleProjectName + ".launch"); + + updateProjectDescription(exampleProject, substitutes); + } + + private static void copy(File targetProject, Map<String, String> substitutes, String template, String targetPath) + throws IOException + { + File source = getTemplate(targetProject.getParentFile(), template); + String content = substitute(readFile(source), substitutes); + + File target = new File(targetProject, targetPath); + System.out.println(" Generating " + target.getCanonicalPath()); + writeFile(target, content); + } + + private static void updateProjectDescription(File targetProject, Map<String, String> substitutes) throws IOException + { + File snippetTemplate = getTemplate(targetProject.getParentFile(), "template.project"); + String snippet = substitute(readFile(snippetTemplate), substitutes); + + File descriptionFile = new File(targetProject, ".project"); + String description = readFile(descriptionFile); + System.out.println(" Updating " + descriptionFile.getCanonicalPath()); + + if (description.indexOf(snippet) != -1) + { + // Nothing to update + return; + } + + String newDescription = description; + + Pattern pattern = Pattern.compile( + "(\\s*<buildCommand>.*?</buildCommand>)*(\\s*<buildCommand>.*?<value><project>/\\.externalToolBuilders/" + + targetProject.getName().replace(".", "\\.") + "\\.launch</value>.*?</buildCommand>)", Pattern.DOTALL); + Matcher matcher = pattern.matcher(description); + if (matcher.find()) + { + String remove = matcher.group(2); + newDescription = newDescription.replace(remove, ""); + } + + newDescription = newDescription.replaceFirst("[ \\t]*</buildSpec>", snippet + "\t</buildSpec>"); + if (!newDescription.equals(description)) + { + writeFile(descriptionFile, newDescription); + } + } + + private static String readFile(File file) throws IOException + { + StringBuilder result = new StringBuilder(); + FileReader in = null; + + try + { + in = new FileReader(file); + BufferedReader reader = new BufferedReader(in); + + String line; + while ((line = reader.readLine()) != null) + { + result.append(line); + result.append(NL); + } + + return result.toString(); + } + finally + { + if (in != null) + { + in.close(); + } + } + } + + private static void writeFile(File file, String content) throws IOException + { + FileWriter out = null; + + try + { + out = new FileWriter(file); + @SuppressWarnings("resource") + BufferedWriter writer = new BufferedWriter(out); + + writer.write(content); + writer.flush(); + } + finally + { + if (out != null) + { + out.close(); + } + } + } + + private static String getItemPath(String resource, int type) + { + return "<item path="/" + resource.replace('\\', '/') + "" type="" + type + + ""/> "; + } + + private static File getTemplate(File root, String template) + { + return new File(root, "org.eclipse.emf.releng/exampleBuilderTemplates/" + template); + } + + private static void addSubtitute(Map<String, String> substitutes, String token, String substitute) + { + System.out.println(" " + token + " = " + substitute); + substitutes.put(token, substitute); + } + + private static String substitute(String content, Map<String, String> substitutes) + { + for (Entry<String, String> entry : substitutes.entrySet()) + { + content = content.replace(entry.getKey(), entry.getValue()); + } + + return content; + } + + private static class XMLHandler extends DefaultHandler + { + private File installerPoject; + + public XMLHandler(File installerPoject) + { + this.installerPoject = installerPoject; + } + + @Override + public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException + { + if ("projectDescriptor".equalsIgnoreCase(qName)) + { + try + { + String name = attributes.getValue("name"); + String contentURI = attributes.getValue("contentURI"); + File exampleProject = new File(installerPoject, "../" + name).getCanonicalFile(); + + System.out.println(" Processing " + name + " --> " + contentURI); + processProjectDescriptor(exampleProject, installerPoject, contentURI); + } + catch (Exception ex) + { + ex.printStackTrace(); + } + } + } + } +} diff --git a/tests/org.eclipse.emf.test.core/src/org/eclipse/emf/test/core/ecore/URIConverterTest.java b/tests/org.eclipse.emf.test.core/src/org/eclipse/emf/test/core/ecore/URIConverterTest.java index 5b081cf0e..29a487359 100644 --- a/tests/org.eclipse.emf.test.core/src/org/eclipse/emf/test/core/ecore/URIConverterTest.java +++ b/tests/org.eclipse.emf.test.core/src/org/eclipse/emf/test/core/ecore/URIConverterTest.java @@ -104,7 +104,8 @@ public class URIConverterTest extends TestCase { if (!(inputStream instanceof BufferedInputStream)) { - inputStream = new BufferedInputStream(inputStream); + BufferedInputStream bufferedInputStream = new BufferedInputStream(inputStream); + inputStream = bufferedInputStream; } StringBuilder sb = new StringBuilder(); diff --git a/tests/org.eclipse.emf.test.databinding/META-INF/MANIFEST.MF b/tests/org.eclipse.emf.test.databinding/META-INF/MANIFEST.MF index 9915136e1..c1f0cd92c 100644 --- a/tests/org.eclipse.emf.test.databinding/META-INF/MANIFEST.MF +++ b/tests/org.eclipse.emf.test.databinding/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: %pluginName Bundle-SymbolicName: org.eclipse.emf.test.databinding;singleton:=true -Bundle-Version: 1.0.0.qualifier +Bundle-Version: 1.1.0.qualifier Bundle-ClassPath: . Bundle-Vendor: %providerName Bundle-Localization: plugin diff --git a/tests/org.eclipse.emf.test.databinding/src/org/eclipse/emf/test/databinding/EMFPropertiesTest.java b/tests/org.eclipse.emf.test.databinding/src/org/eclipse/emf/test/databinding/EMFPropertiesTest.java index ea51d5c73..a0d18f769 100644 --- a/tests/org.eclipse.emf.test.databinding/src/org/eclipse/emf/test/databinding/EMFPropertiesTest.java +++ b/tests/org.eclipse.emf.test.databinding/src/org/eclipse/emf/test/databinding/EMFPropertiesTest.java @@ -457,7 +457,7 @@ public class EMFPropertiesTest extends TestCase IEMFListProperty lProp1 = EMFProperties.list(EmfdbPackage.Literals.A__BLIST); IEMFValueProperty vProp1 = lProp1.value(new ListElementAccess<Object>() { - + @Override public int getReadValueIndex(List<Object> list) { return 0; @@ -475,7 +475,7 @@ public class EMFPropertiesTest extends TestCase IEMFValueProperty vProp3 = lProp2.value(new ListElementAccess<Object>() { - + @Override public int getReadValueIndex(List<Object> list) { return list.size() - 1; diff --git a/tests/org.eclipse.emf.test.databinding/src/org/eclipse/emf/test/databinding/emfdb/impl/DImpl.java b/tests/org.eclipse.emf.test.databinding/src/org/eclipse/emf/test/databinding/emfdb/impl/DImpl.java index e8cb0b5ca..6f8d9f9e1 100644 --- a/tests/org.eclipse.emf.test.databinding/src/org/eclipse/emf/test/databinding/emfdb/impl/DImpl.java +++ b/tests/org.eclipse.emf.test.databinding/src/org/eclipse/emf/test/databinding/emfdb/impl/DImpl.java @@ -20,7 +20,6 @@ import org.eclipse.emf.ecore.impl.EObjectImpl; import org.eclipse.emf.ecore.util.EObjectContainmentEList; import org.eclipse.emf.ecore.util.InternalEList; -import org.eclipse.emf.ecore.util.EObjectResolvingEList; import org.eclipse.emf.test.databinding.emfdb.D; import org.eclipse.emf.test.databinding.emfdb.E; diff --git a/tests/org.eclipse.emf.test.databinding/src/org/eclipse/emf/test/databinding/emfdb/util/EmfdbSwitch.java b/tests/org.eclipse.emf.test.databinding/src/org/eclipse/emf/test/databinding/emfdb/util/EmfdbSwitch.java index 97edcd6e0..bafc8f919 100644 --- a/tests/org.eclipse.emf.test.databinding/src/org/eclipse/emf/test/databinding/emfdb/util/EmfdbSwitch.java +++ b/tests/org.eclipse.emf.test.databinding/src/org/eclipse/emf/test/databinding/emfdb/util/EmfdbSwitch.java @@ -10,10 +10,7 @@ */ package org.eclipse.emf.test.databinding.emfdb.util; -import java.util.List; - import java.util.Map; -import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.EObject; import org.eclipse.emf.ecore.EPackage; diff --git a/tests/org.eclipse.emf.test.tools/META-INF/MANIFEST.MF b/tests/org.eclipse.emf.test.tools/META-INF/MANIFEST.MF index 7edf844d4..bb4271c2e 100644 --- a/tests/org.eclipse.emf.test.tools/META-INF/MANIFEST.MF +++ b/tests/org.eclipse.emf.test.tools/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: %pluginName Bundle-SymbolicName: org.eclipse.emf.test.tools;singleton:=true -Bundle-Version: 2.7.0.qualifier +Bundle-Version: 2.8.0.qualifier Bundle-ClassPath: test.tools.jar Bundle-Vendor: %providerName Bundle-Localization: plugin diff --git a/tests/org.eclipse.emf.test.tools/src/org/eclipse/emf/test/tools/ImportManager.java b/tests/org.eclipse.emf.test.tools/src/org/eclipse/emf/test/tools/ImportManager.java index ceb2bfd36..0ab29215c 100644 --- a/tests/org.eclipse.emf.test.tools/src/org/eclipse/emf/test/tools/ImportManager.java +++ b/tests/org.eclipse.emf.test.tools/src/org/eclipse/emf/test/tools/ImportManager.java @@ -23,7 +23,6 @@ import java.util.regex.Matcher; import java.util.regex.Pattern; import org.eclipse.core.runtime.NullProgressMonitor; -import org.eclipse.jdt.core.dom.AST; import org.eclipse.jdt.core.dom.ASTParser; import org.eclipse.jdt.core.dom.CompilationUnit; import org.eclipse.jdt.core.dom.ImportDeclaration; @@ -185,7 +184,7 @@ class OldImportManager public static void addCompilationUnitImports (Set<String> importedPackages, Map<String, String> shortNameToImportMap, String compilationUnitContents) { - ASTParser parser = ASTParser.newParser(AST.JLS3); + ASTParser parser = CodeGenUtil.EclipseUtil.newASTParser(); parser.setSource(compilationUnitContents.toCharArray()); CompilationUnit compilationUnit = (CompilationUnit)parser.createAST(new NullProgressMonitor()); for (Iterator<?> i = compilationUnit.imports().iterator(); i.hasNext();) diff --git a/tests/org.eclipse.emf.test.tools/src/org/eclipse/emf/test/tools/ant/AntTest.java b/tests/org.eclipse.emf.test.tools/src/org/eclipse/emf/test/tools/ant/AntTest.java index 7fc424471..75f5fa47e 100644 --- a/tests/org.eclipse.emf.test.tools/src/org/eclipse/emf/test/tools/ant/AntTest.java +++ b/tests/org.eclipse.emf.test.tools/src/org/eclipse/emf/test/tools/ant/AntTest.java @@ -17,6 +17,8 @@ import junit.framework.Test; import junit.framework.TestCase; import junit.framework.TestSuite; +import org.eclipse.core.resources.IWorkspace; +import org.eclipse.core.resources.IWorkspaceDescription; import org.eclipse.core.resources.ResourcesPlugin; import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.Path; @@ -252,6 +254,17 @@ public class AntTest extends TestCase public void suiteTearDown() throws Exception { + // Ensure that there is no build running while we delete the files. + // + IWorkspace workspace = ResourcesPlugin.getWorkspace(); + IWorkspaceDescription description = workspace.getDescription(); + if (description.isAutoBuilding()) + { + description.setAutoBuilding(false); + workspace.setDescription(description); + } + workspace.build(15, null); + TestUtil.delete(EXAMPLES_COPY_DIR); } diff --git a/tests/org.eclipse.emf.test.tools/src/org/eclipse/emf/test/tools/merger/ASTTest.java b/tests/org.eclipse.emf.test.tools/src/org/eclipse/emf/test/tools/merger/ASTTest.java index 3a069eb47..35d778309 100644 --- a/tests/org.eclipse.emf.test.tools/src/org/eclipse/emf/test/tools/merger/ASTTest.java +++ b/tests/org.eclipse.emf.test.tools/src/org/eclipse/emf/test/tools/merger/ASTTest.java @@ -18,7 +18,6 @@ import junit.framework.Test; import junit.framework.TestCase; import junit.framework.TestSuite; -import org.eclipse.jdt.core.dom.AST; import org.eclipse.jdt.core.dom.ASTNode; import org.eclipse.jdt.core.dom.ASTParser; import org.eclipse.jdt.core.dom.ArrayCreation; @@ -51,6 +50,7 @@ import org.eclipse.jface.text.Document; import org.eclipse.jface.text.IDocument; import org.eclipse.text.edits.TextEdit; +import org.eclipse.emf.codegen.util.CodeGenUtil; import org.eclipse.emf.test.common.TestUtil; import org.eclipse.emf.test.tools.AllSuites; @@ -90,7 +90,7 @@ protected void setUp() throws Exception { String content = TestUtil.readFile(CLASS_FILE, false); - ASTParser astParser = ASTParser.newParser(AST.JLS3); + ASTParser astParser = CodeGenUtil.EclipseUtil.newASTParser(); astParser.setSource(content.toCharArray()); CompilationUnit compilationUnit = (CompilationUnit)astParser.createAST(null); @@ -421,7 +421,7 @@ protected void setUp() throws Exception public void testWrite() throws Exception { // read String source = TestUtil.readFile(CLASS_FILE, false); - ASTParser astParser = ASTParser.newParser(AST.JLS3); + ASTParser astParser = CodeGenUtil.EclipseUtil.newASTParser(); astParser.setSource(source.toCharArray()); CompilationUnit sourceCu = (CompilationUnit)astParser.createAST(null); astParser.setSource(source.toCharArray()); |