Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Vogel2015-06-15 21:39:30 +0000
committerLars Vogel2015-07-12 03:29:04 +0000
commitbc9a632ae33bc39e0ff148529367482d32e7706b (patch)
tree40488763305aabd295fa55db5fd28552f1c13687
parent87a7a2bd938af74f14e59b68fcd18b4a06785a3a (diff)
downloadeclipse.platform.ui.tools-bc9a632ae33bc39e0ff148529367482d32e7706b.tar.gz
eclipse.platform.ui.tools-bc9a632ae33bc39e0ff148529367482d32e7706b.tar.xz
eclipse.platform.ui.tools-bc9a632ae33bc39e0ff148529367482d32e7706b.zip
Bug 470226 - [Templates] Provide template to inject ESelectionService as
field and rename existing field templates Change-Id: I6059d80f1089e7b15ae34edda63ed8da562afd0c Signed-off-by: Lars Vogel <Lars.Vogel@vogella.com>
-rw-r--r--bundles/org.eclipse.e4.tools.jdt.templates/templates/default-e4templates.xml9
1 files changed, 4 insertions, 5 deletions
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 025f5b34..4f546a4c 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,11 +16,6 @@
<templates>
-<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 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}
@@ -37,6 +32,10 @@ IEventBroker eventBroker;
${imp:import(org.eclipse.e4.core.services.events.IEventBroker)}
</template>
+<template name="ESelection service as field" description="Injected ESEectionService" id="org.eclipse.e4.tools.jdt.templates.selectionservice" context="e4-members" enabled="true" autoinsert="false">@Inject
+ESelectionService selectionService;
+${imp:import(org.eclipse.e4.ui.workbench.modeling.ESelectionService)}
+</template>
<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) {

Back to the top