Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Vogel2012-10-01 21:16:24 +0000
committerLars Vogel2012-10-01 21:17:40 +0000
commit851aa0c97bf1cfca79ce2312ce9d23394a718237 (patch)
tree51d00d31e14793e630a57ed49e8efbd6a8999b62 /bundles/org.eclipse.e4.tools.jdt.templates/templates
parent6d2199da1ec8874389465a6390ac09b1661fbf8c (diff)
downloadorg.eclipse.e4.tools-851aa0c97bf1cfca79ce2312ce9d23394a718237.tar.gz
org.eclipse.e4.tools-851aa0c97bf1cfca79ce2312ce9d23394a718237.tar.xz
org.eclipse.e4.tools-851aa0c97bf1cfca79ce2312ce9d23394a718237.zip
Cleanup of the e4 code templates
Diffstat (limited to 'bundles/org.eclipse.e4.tools.jdt.templates/templates')
-rw-r--r--bundles/org.eclipse.e4.tools.jdt.templates/templates/default-e4templates.properties0
-rw-r--r--bundles/org.eclipse.e4.tools.jdt.templates/templates/default-e4templates.xml27
2 files changed, 17 insertions, 10 deletions
diff --git a/bundles/org.eclipse.e4.tools.jdt.templates/templates/default-e4templates.properties b/bundles/org.eclipse.e4.tools.jdt.templates/templates/default-e4templates.properties
deleted file mode 100644
index e69de29b..00000000
--- a/bundles/org.eclipse.e4.tools.jdt.templates/templates/default-e4templates.properties
+++ /dev/null
diff --git a/bundles/org.eclipse.e4.tools.jdt.templates/templates/default-e4templates.xml b/bundles/org.eclipse.e4.tools.jdt.templates/templates/default-e4templates.xml
index f8cf7dc5..2f6c5404 100644
--- a/bundles/org.eclipse.e4.tools.jdt.templates/templates/default-e4templates.xml
+++ b/bundles/org.eclipse.e4.tools.jdt.templates/templates/default-e4templates.xml
@@ -16,33 +16,40 @@
<templates>
-<template name="inject-parent" description="Injected Parent Composite" id="org.eclipse.e4.tools.jdt.templates.parent" context="e4-members" enabled="true" autoinsert="false">@Inject
-Composite parent;</template>
+<template name="Inject - Composite" description="Injected Parent Composite" id="org.eclipse.e4.tools.jdt.templates.parent" context="e4-members" enabled="true" autoinsert="false">@Inject
+Composite parent;
+${imp:import(javax.inject.Inject)}
+</template>
-<template name="inject-preference" description="Injected Preference Value" id="org.eclipse.e4.tools.jdt.templates.preference" context="e4-members" enabled="true" autoinsert="false">@Inject
+<template name="Inject - Preference Value" description="Injected Preference Value" id="org.eclipse.e4.tools.jdt.templates.preference" context="e4-members" enabled="true" autoinsert="false">@Inject
void setPreferenceValue(@Named("preference-PREFERENCE_KEY") String preferenceValue) {
${cursor}
}</template>
-<template name="inject-preferences" description="Injected Preferences Service" id="org.eclipse.e4.tools.jdt.templates.preferences" context="e4-members" enabled="true" autoinsert="false">@Inject
+<template name="Inject - Preferences" description="Injected Preferences Service" id="org.eclipse.e4.tools.jdt.templates.preferences" context="e4-members" enabled="true" autoinsert="false">@Inject
IEclipsePreferences preferences;</template>
-<template name="inject-logger" description="Injected Logger" id="org.eclipse.e4.tools.jdt.templates.logger" context="e4-members" enabled="true" autoinsert="false">@Inject
+<template name="Inject - Logger" description="Injected Logger" id="org.eclipse.e4.tools.jdt.templates.logger" context="e4-members" enabled="true" autoinsert="false">@Inject
Logger logger;</template>
-<template name="inject-eventbroker" description="Injected Event Broker" id="org.eclipse.e4.tools.jdt.templates.eventbroker" context="e4-members" enabled="true" autoinsert="false">@Inject
-IEventBroker eventBroker;</template>
+<template name="Inject - Eventbroker" description="Injected Event Broker" id="org.eclipse.e4.tools.jdt.templates.eventbroker" context="e4-members" enabled="true" autoinsert="false">@Inject
+IEventBroker eventBroker;
+${imp:import(org.eclipse.e4.core.services.events.IEventBroker)}
+</template>
-<template name="inject-stylingengine" description="Injected Styling Engine" id="org.eclipse.e4.tools.jdt.templates.stylingengine" context="e4-members" enabled="true" autoinsert="false">@Inject
-IStylingEngine stylingEngine;</template>
-<template name="ininjectject-event" description="Event Handler Method" id="org.eclipse.e4.tools.jdt.templates.eventhandler" context="e4-members" enabled="true" autoinsert="false">@EventHandler("some/event/topic")
+<template name="Injectject - Event" description="Event Handler Method" id="org.eclipse.e4.tools.jdt.templates.eventhandler" context="e4-members" enabled="true" autoinsert="false">@EventHandler("some/event/topic")
void handleSomeEvent(Payload payloadObject) {
${cursor}
}</template>
+<template name="Inject - Styling Engine" description="Injected Styling Engine" id="org.eclipse.e4.tools.jdt.templates.stylingengine" context="e4-members" enabled="true" autoinsert="false">@Inject
+IStylingEngine stylingEngine;</template>
+
+
<template name="PostConstruct" description="Creates @PostConstruct method" id="org.eclipse.e4.tools.jdt.templates.init" context="e4-members" enabled="true" autoinsert="false">@PostConstruct
public void postConstruct(${type:newType(org.eclipse.swt.widgets.Composite)} parent) {
+ ${cursor}
}
${imp:import(javax.annotation.PostConstruct)}
</template>

Back to the top