|
|
|
|
|
Re: Can Oomph import code templates? [message #1843339 is a reply to message #1843280] |
Sat, 24 July 2021 05:02 |
Frank Benoit Messages: 179 Registered: July 2009 |
Senior Member |
|
|
https://git.eclipse.org/c/oomph/org.eclipse.oomph.git/tree/plugins/org.eclipse.oomph.setup/src/org/eclipse/oomph/setup/impl/PreferenceTaskImpl.java#n977
Line 977
I think the problem is the configured attribute name, is should not be "id", but instead "name".
registry.put(URI.createURI("//instance/org.eclipse.jdt.ui/org.eclipse.jdt.ui.text.custom_templates"), new Factory() //$NON-NLS-1$
{
public PreferenceHandler create(URI key)
{
//return new XMLPreferenceHandler(key, "template", new String[] { "id" }, null); //$NON-NLS-1$ //$NON-NLS-2$
return new XMLPreferenceHandler(key, "template", new String[] { "name" }, null); //$NON-NLS-1$ //$NON-NLS-2$
}
});
An entry looks like this:
<template autoinsert="true" context="java" deleted="false" description="D..." enabled="true" name="doc">...</template>
|
|
|
Re: Can Oomph import code templates? [message #1843340 is a reply to message #1843280] |
Sat, 24 July 2021 05:02 |
Frank Benoit Messages: 179 Registered: July 2009 |
Senior Member |
|
|
https://git.eclipse.org/c/oomph/org.eclipse.oomph.git/tree/plugins/org.eclipse.oomph.setup/src/org/eclipse/oomph/setup/impl/PreferenceTaskImpl.java#n977
Line 977
I think the problem is the configured attribute name, is should not be "id", but instead "name".
registry.put(URI.createURI("//instance/org.eclipse.jdt.ui/org.eclipse.jdt.ui.text.custom_templates"), new Factory() //$NON-NLS-1$
{
public PreferenceHandler create(URI key)
{
//return new XMLPreferenceHandler(key, "template", new String[] { "id" }, null); //$NON-NLS-1$ //$NON-NLS-2$
return new XMLPreferenceHandler(key, "template", new String[] { "name" }, null); //$NON-NLS-1$ //$NON-NLS-2$
}
});
An entry looks like this:
<template autoinsert="true" context="java" deleted="false" description="D..." enabled="true" name="doc">...</template>
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04042 seconds