0
我正在構建一個切換器的角度。我想爲它使用一個按鈕。所以當我點擊一次它切換到perspective2,當我第二次點擊它切換回perspective1。我嘗試isOnTop,但它不工作。請幫忙。謝謝。E4獲得積極的角度ID或標籤
public class SwitchPerspectiveHandler {
@Execute
public void execute(MApplication app, EPartService partService, EModelService modelService) {
MPerspective xxx = (MPerspective) modelService.find("xxx", app);
MPerspective yyy = (MPerspective) modelService.find("yyy", app);
if (yyy.isOnTop()) {
partService.switchPerspective(xxx);
} else
partService.switchPerspective(yyy);
}
}