[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.platform.rcp] Re: Problems with the ResourceNavigator view

My mistake. I just looked up the first post about this and the tip to move the call to preStartup() was posted a week later. I had exactly the same refresh problems for a while, so I should have remembered.

Age

On 06-10-2004 18:06 PM, Steve Blass wrote:
moving
     WorkbenchAdapterBuilder.registerAdapters();
to preStartup will show existing resources at startup

-
Steve

Marcelo Gilman wrote:

Thanks Age for your answer. Your suggestion partially solved my problem. When the Resource perspective is first time shown, no resource is listed.
After creating a new folder or resource, the resources list is shown. As
if a "refresh" had been applied. What should I do in order to list the resources from the beginning?
Thank you for your help,
Marcelo.


Age Mooy wrote:


Add the following code to your WorkbenchAdvisor implementation:



  /**
   * @see org.eclipse.ui.application.WorkbenchAdvisor#postStartup()
   */
  public void postStartup() {
    super.postStartup();



    // This call is unfortunately necessary to hookup the
    // internal adapters that enable the resource navigator
    WorkbenchAdapterBuilder.registerAdapters();
  }



This has been asked and answered several times on this group and the platform group. Look at the archives for more details.



Age



On 05-10-2004 21:14 PM, Marcelo Gilman wrote:

I am trying to simply show the resources using the ResourceNavigator view.
I have projects and other resources defined in the runtime workspace but
no resource is shown in the viewer. I was debuging the code and as far as
I could see, it is related to the fact that the AdapterFactory is null for
the resources. I was trying to define the factory but due to my lack of experience with
the RCP framework, I didnŽt succeed. I would appreciate any help to solve this problem.
Marcelo.