Skip to main content
summaryrefslogtreecommitdiffstats
blob: a71061342a75a31d0936ec61ba75b750dc4d50cc (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
49
50
51
<%@ jet package="org.eclipse.e4.internal.tools.wizards.classes.templates" class="PartTemplate" imports="org.eclipse.e4.internal.tools.wizards.classes.NewPartClassWizard.PartClass" %>
<% PartClass domainClass = (PartClass)argument; %> 
<% if( domainClass.getPackageFragment() != null && domainClass.getPackageFragment().getElementName().trim().length() > 0 ) { %>
package <%= domainClass.getPackageFragment().getElementName() %>;
<% } %>

import javax.inject.Inject;
<% if( domainClass.isUsePostConstruct() ) { %>
import javax.annotation.PostConstruct;
import org.eclipse.swt.widgets.Composite;
<% } %>
<% 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()  %>(Composite parent) {
		//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