Skip to main content
summaryrefslogtreecommitdiffstats
blob: a6b0b1cad64436618c1e38693c55eb9369ab884a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
<%@ jet package="org.eclipse.e4.tools.emf.editor3x.templates" class="PartTemplate" imports="org.eclipse.e4.tools.emf.editor3x.wizard.NewPartClassWizard.PartClass" %>
<% PartClass domainClass = (PartClass)argument; %> 
package <%= domainClass.getPackageFragment().getElementName() %>;

import javax.inject.Inject;
<% if( domainClass.isUsePostConstruct() ) { %>
import javax.annotation.PostConstruct;
<% } %>
<% if( domainClass.isUsePredestroy() ) { %>
import javax.annotation.PreDestroy;
<% } %>
<% if( domainClass.isUseFocus() ) { %>
import org.eclipse.e4.ui.di.Focus;
<% } %>
<% if( domainClass.isUsePersist() ) { %>
import org.eclipse.e4.ui.di.Persist;
<% } %>

public class <%= domainClass.getName() %> {
	@Inject
	public <%= domainClass.getName() %>() {
		//TODO Your code here
	}
	<% if( domainClass.isUsePostConstruct() ) { %>
	@PostConstruct
	public void <%= domainClass.getPostConstructMethodName()  %>() {
		//TODO Your code here
	}
	<% } %>
	<% if( domainClass.isUsePredestroy() ) { %>
	@PreDestroy
	public void <%= domainClass.getPreDestroyMethodName()  %>() {
		//TODO Your code here
	}
	<% } %>
	<% if( domainClass.isUseFocus() ) { %>
	@Focus
	public void <%= domainClass.getFocusMethodName() %>() {
		//TODO Your code here
	}
	<% } %>
	<% if( domainClass.isUsePersist() ) { %>
	@Persist
	public void <%= domainClass.getPersistMethodName() %>() {
		//TODO Your code here
	}
	<% } %>
}

Back to the top