|
Re: How to dynamically set the View Part Name and Content [message #900823 is a reply to message #630174] |
Wed, 08 August 2012 15:45 |
|
Hi,
I am sorry I am maybe too late, but I want to post the solution for other people who wants to know how to do it.
You have two options... one could be with an action like this:
private Action changeTitleAction = new Action() {
public void run() {
String title = getPartName();
ChangeTitleDialog dialog = new ChangeTitleDialog(getViewSite().getShell(), title);
if (dialog.open() == org.eclipse.jface.window.Window.OK) {
changePartName(dialog.getTitle());
}
}
public String getText() {
return Messages.lblChangeTitle;
};
public org.eclipse.jface.resource.ImageDescriptor getImageDescriptor() {
return null;
};
}
public void changePartName(String name) {
setPartName(name);
Display.getCurrent().update();
};
;
or yout could dinamically change the ViewPart name with
setPartName(name);
Display.getCurrent().update();
once the view is initialited.
Hope that helps
|
|
|
|
Powered by
FUDForum. Page generated in 0.03943 seconds