EPartService is null after hiding a Part [message #642995] |
Fri, 03 December 2010 10:40  |
Eclipse User |
|
|
|
Hi,
I try to change the visible Part by calling a Command. This is the Handler-Code:
public class ShowPart2 {
@Inject
private EPartService service;
@Execute
public void execute() {
MPart partToShow = this.service.findPart("part2");
MPart partToHide = this.service.findPart("part1");
if (partToShow != null) {
if (partToHide != null) {
this.service.hidePart(partToHide);
}
this.service.showPart(partToShow, PartState.VISIBLE);
}
}
}
While debugging i saw the following:
partToShow, partToHide and service are NOT null until hidePart is called. After this, service is null and a NullPointerException is thrown when showPart is called.
How can this be?
thanx,
mike
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.10974 seconds