문제

I am new to eclipse e4 application. I have a menu item open handler, when i click on it the filedialog appears and I can select the files and I should display the selected files on the view part.

Can anyone please help me how to update the view from the handler?

도움이 되었습니까?

해결책

You can use EPartService to find your part in the handler:

@Execute
void execute(EPartService partService)
{
  MPart part = partService.findPart("part id ");

  // TODO use FileDialog

  YourClass yourClass = (YourClass)part.getObject();

  // TODO call a method in YourClass to set the table input
}

where YourClass is the class you defined for the part. You then just need to add a method to YourClass that you can call to set the table input. "part id" is the id you specified for the MPart in the application model.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top