• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Carey Brown
  • Mikalai Zaikin
Bartenders:
  • Lou Hamers
  • Piet Souris
  • Frits Walraven

Help!How to refresh view

 
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Bartender
Posts: 11497
19
Android Google Web Toolkit Mac Eclipse IDE Ubuntu Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What is "treeviewer" and "viewpart" ?
 
swenling wen
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
How to refresh viewpart?
 
Ranch Hand
Posts: 242
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 32
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 32
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 32
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
and again question,how to get the path of plugin project?
 
He repaced his skull with glass. So you can see his brain. Kinda like this tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic