eclipse-equinox / p2

Eclipse Public License 2.0
15 stars 41 forks source link

removeJvmArg touchpoint doesn't work with multiple lines #572

Open mickaelistria opened 1 day ago

mickaelistria commented 1 day ago

I've got a p2.inf with

instructions.configure=\
org.eclipse.equinox.p2.touchpoint.eclipse.addJvmArg(jvmArg:\
--add-opens\n\
jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED\n\
--add-opens\n\
jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED\n\
--add-opens\n\
jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED\n\
--add-opens\n\
jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED\n\
--add-opens\n\
jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED\n\
--add-opens\n\
jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED\n\
--add-opens\n\
jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED\n\
--add-opens\n\
jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED\n\
--add-opens\n\
jdk.javadoc/jdk.javadoc.internal.doclets.formats.html.taglets.snippet=ALL-UNNAMED\n\
--add-opens\n\
jdk.javadoc/jdk.javadoc.internal.doclets.formats.html.taglets=ALL-UNNAMED\n\
--add-opens\n\
jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED\n\
--add-opens\n\
jdk.compiler/com.sun.tools.javac.jvm=ALL-UNNAMED\n\
--add-opens\n\
jdk.compiler/com.sun.tools.javac.model=ALL-UNNAMED\n\
--add-opens\n\
jdk.compiler/com.sun.tools.javac.platform=ALL-UNNAMED\n\
--add-opens\n\
jdk.compiler/com.sun.tools.javac.resources=ALL-UNNAMED\n\
-DICompilationUnitResolver=org.eclipse.jdt.core.dom.JavacCompilationUnitResolver\n\
-DAbstractImageBuilder.compilerFactory=org.eclipse.jdt.internal.javac.JavacCompilerFactory\n\
-DCompilationUnit.DOM_BASED_OPERATIONS=true\n\
-DCompilationUnit.codeComplete.DOM_BASED_OPERATIONS=true_\n\
-DSourceIndexer.DOM_BASED_INDEXER=true);

instructions.unconfigure=\
org.eclipse.equinox.p2.touchpoint.eclipse.removeJvmArg(jvmArg:\n\
--add-opens\n\
jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED\n\
--add-opens\n\
jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED\n\
--add-opens\n\
jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED\n\
--add-opens\n\
jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED\n\
--add-opens\n\
jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED\n\
--add-opens\n\
jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED\n\
--add-opens\n\
jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED\n\
--add-opens\n\
jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED\n\
--add-opens\n\
jdk.javadoc/jdk.javadoc.internal.doclets.formats.html.taglets.snippet=ALL-UNNAMED\n\
--add-opens\n\
jdk.javadoc/jdk.javadoc.internal.doclets.formats.html.taglets=ALL-UNNAMED\n\
--add-opens\n\
jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED\n\
--add-opens\n\
jdk.compiler/com.sun.tools.javac.jvm=ALL-UNNAMED\n\
--add-opens\n\
jdk.compiler/com.sun.tools.javac.model=ALL-UNNAMED\n\
--add-opens\n\
jdk.compiler/com.sun.tools.javac.platform=ALL-UNNAMED\n\
--add-opens\n\
jdk.compiler/com.sun.tools.javac.resources=ALL-UNNAMED\n\
-DICompilationUnitResolver=org.eclipse.jdt.core.dom.JavacCompilationUnitResolver\n\
-DAbstractImageBuilder.compilerFactory=org.eclipse.jdt.internal.javac.JavacCompilerFactory\n\
-DCompilationUnit.DOM_BASED_OPERATIONS=true\n\
-DCompilationUnit.codeComplete.DOM_BASED_OPERATIONS=true_\n\
-DSourceIndexer.DOM_BASED_INDEXER=true);

The installation works well: the lines are added to eclipse.ini, and are in turn each one read as a separate VM arg. All fine.

But the removeJvmArg does nothing as it expects a single argument and isn't able to process multiple lines. It'd be good if the RemoveJVMArgumentAction could be augmented to support mulitple args (1 per line).

mickaelistria commented 1 day ago

The feature would have to be enabled slightly deeper, in org.eclipse.equinox.internal.provisional.frameworkadmin.LauncherData