aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes Help!How to refresh view Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Help!How to refresh view" Watch "Help!How to refresh view" New topic
Author

Help!How to refresh view

swenling wen
Ranch Hand

Joined: Jun 07, 2006
Posts: 32
when I click a button,will generate a treeviewer in a viewpart,but can show the treeview only when I change the dimension of viewpart.How to show the treeviewer in a viewpart ?
Thanks
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10451
    
    8

What is "treeviewer" and "viewpart" ?


[How to ask questions] [Donate a pint, save a life!] [Onff-turn it on!]
swenling wen
Ranch Hand

Joined: Jun 07, 2006
Posts: 32
How to refresh viewpart?
Santhosh Kumar
Ranch Hand

Joined: Nov 07, 2000
Posts: 242
Are you referring to Swing or Eclipse SWT? either case, post some sample test case so it will be more clear.
swenling wen
Ranch Hand

Joined: Jun 07, 2006
Posts: 32
SWT!

getSite().getPage().addSelectionListener(new ISelectionListener() {
public void selectionChanged(final IWorkbenchPart workbenchPart,
final ISelection selection) {
IStructuredSelection structuredSelection = (IStructuredSelection) selection;
final TreeEntity treeEntity = (TreeEntity) structuredSelection
.getFirstElement();
setPartName(treeEntity.getName());
text.setText(treeEntity.getName());
try {
getSite().getPage().showView(CorporationView.ID,treeEntity.getName(),IWorkbenchPage.VIEW_CREATE);

//this,I will refresh another viewpart .How to do?
swenling wen
Ranch Hand

Joined: Jun 07, 2006
Posts: 32
SWT!

getSite().getPage().addSelectionListener(new ISelectionListener() {
public void selectionChanged(final IWorkbenchPart workbenchPart,
final ISelection selection) {
IStructuredSelection structuredSelection = (IStructuredSelection) selection;
final TreeEntity treeEntity = (TreeEntity) structuredSelection
.getFirstElement();
setPartName(treeEntity.getName());
text.setText(treeEntity.getName());
try {
getSite().getPage().showView(CorporationView.ID,treeEntity.getName(),IWorkbenchPage.VIEW_CREATE);

//this,I will refresh CorporationView .How to do?
swenling wen
Ranch Hand

Joined: Jun 07, 2006
Posts: 32
and again question,how to get the path of plugin project?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Help!How to refresh view