Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Navigator problems in rcp app
Navigator problems in rcp app [message #260923] Mon, 12 July 2004 22:03 Go to next message
Jeff Lawson is currently offline Jeff LawsonFriend
Messages: 26
Registered: July 2009
Junior Member
Hi,

In April 2004, Steven Wingfield mentioned that he was having difficulty
getting the Resource Navigator to work correctly in and RCP application
but no one was able to respond:

http://dev.eclipse.org/newslists/news.eclipse.platform/msg17 983.html

In particular, although various actions indicate that the RCP application
seems to be aware of the existence of previously created projects, the
Resource Navigator (i) shows blank tree items for projects created during
the current session and (ii) fails to show projects created during
previous sessions.

I am having exactly the same experience and would appreciate receiving
help from anyone who knows how to remedy the RCP Resource Navigator
problem. Thanks.


Jeff
Re: Navigator problems in rcp app [message #261043 is a reply to message #260923] Tue, 13 July 2004 09:23 Go to previous messageGo to next message
Stephane  fournier is currently offline Stephane fournierFriend
Messages: 340
Registered: July 2009
Senior Member
Look at the post RCP & Resource Navigator (again) just below.
It is not complety done but it gonna be further...

Stephane

Jeff Lawson wrote:

> Hi,

> In April 2004, Steven Wingfield mentioned that he was having difficulty
> getting the Resource Navigator to work correctly in and RCP application
> but no one was able to respond:

> http://dev.eclipse.org/newslists/news.eclipse.platform/msg17 983.html

> In particular, although various actions indicate that the RCP application
> seems to be aware of the existence of previously created projects, the
> Resource Navigator (i) shows blank tree items for projects created during
> the current session and (ii) fails to show projects created during
> previous sessions.

> I am having exactly the same experience and would appreciate receiving
> help from anyone who knows how to remedy the RCP Resource Navigator
> problem. Thanks.


> Jeff
Re: Navigator problems in rcp app [message #261189 is a reply to message #261043] Tue, 13 July 2004 15:37 Go to previous messageGo to next message
Jeff Lawson is currently offline Jeff LawsonFriend
Messages: 26
Registered: July 2009
Junior Member
Thanks Stephane.

I noticed the reference to WorkbenchAdapterBuilder.registerAdapters() last
night and updated my code appropriately. I found that I can now see my
projects plus their names in the Resource Navigator tree and that .project
files have an icon. Unfortunately, the projects don't have an icon and
when I delete projects they seem to disappear _but_ upon re-running my
application the projects are back (actually, the references are back, the
projects themselves were deleted).

I'm going to look into workspace saving because that's probably what's not
happening at the moment and I think I’ll probably be able to sort out the
missing icon issue too.


I find it difficult to gripe about Eclipse, it being so wonderful, and I
know that documentation is always something that most of us prefer to put
off. Nonetheless, it is unfortunate that (i) documentation for so many
'straightforward' scenarios plug-in is often non-existent and (ii) when
someone is kind enough to respond to resolve such problems the solutions
turn out to involve internal code. Developers could conclude that the
Eclipse people don't want third-party plug-ins to be written. Obviously
this is not the case. I have always thought that the documentation is out
by an order of magnitude in detail.*

There is certainly plenty of scope for someone to write a good plug-in
book (unlike the latest plug-in book which is just a rehash of the online
documentation).


Jeff

* For example, I found that adapting the standard ‘New Java Project’
wizard by adding many new steps was particularly nightmare-ish. Even
simple things take much time to resolve: like changing the standard
behaviour of allowing the user to press Esc to dismiss the wizard: I allow
it in the early steps but prompt for confirmation after a significant
amount of data has been entered.



Stephane fournier wrote:

> Look at the post RCP & Resource Navigator (again) just below.
> It is not complety done but it gonna be further...

> Stephane

> Jeff Lawson wrote:

> > Hi,

> > In April 2004, Steven Wingfield mentioned that he was having difficulty
> > getting the Resource Navigator to work correctly in and RCP application
> > but no one was able to respond:

> > http://dev.eclipse.org/newslists/news.eclipse.platform/msg17 983.html

> > In particular, although various actions indicate that the RCP application
> > seems to be aware of the existence of previously created projects, the
> > Resource Navigator (i) shows blank tree items for projects created during
> > the current session and (ii) fails to show projects created during
> > previous sessions.

> > I am having exactly the same experience and would appreciate receiving
> > help from anyone who knows how to remedy the RCP Resource Navigator
> > problem. Thanks.


> > Jeff
Re: Navigator problems in rcp app [message #261419 is a reply to message #261189] Wed, 14 July 2004 11:16 Go to previous messageGo to next message
Jeff Lawson is currently offline Jeff LawsonFriend
Messages: 26
Registered: July 2009
Junior Member
Chris Laffra pointed me to http://eclipsefaq.org where I found:

Chapter 17. Workspace and Resources API
How and when do I save the workspace?

which prompted me to search the Eclipse source where I discovered that:

org.eclipse.ui.internal.ide.IDEWorkbenchAdvisor

stores the workspace during:

WorkbenchAdvisor.postShutdown()


Also, be sure to do:

configurer.setSaveAndRestore(true);

in:

WorkbenchAdvisor.initialize()



Jeff


Jeff Lawson wrote:

> Thanks Stephane.

> I noticed the reference to WorkbenchAdapterBuilder.registerAdapters() last
> night and updated my code appropriately. I found that I can now see my
> projects plus their names in the Resource Navigator tree and that .project
> files have an icon. Unfortunately, the projects don't have an icon and
> when I delete projects they seem to disappear _but_ upon re-running my
> application the projects are back (actually, the references are back, the
> projects themselves were deleted).

> I'm going to look into workspace saving because that's probably what's not
> happening at the moment and I think I’ll probably be able to sort out the
> missing icon issue too.


> I find it difficult to gripe about Eclipse, it being so wonderful, and I
> know that documentation is always something that most of us prefer to put
> off. Nonetheless, it is unfortunate that (i) documentation for so many
> 'straightforward' scenarios plug-in is often non-existent and (ii) when
> someone is kind enough to respond to resolve such problems the solutions
> turn out to involve internal code. Developers could conclude that the
> Eclipse people don't want third-party plug-ins to be written. Obviously
> this is not the case. I have always thought that the documentation is out
> by an order of magnitude in detail.*

> There is certainly plenty of scope for someone to write a good plug-in
> book (unlike the latest plug-in book which is just a rehash of the online
> documentation).


> Jeff

> * For example, I found that adapting the standard ‘New Java Project’
> wizard by adding many new steps was particularly nightmare-ish. Even
> simple things take much time to resolve: like changing the standard
> behaviour of allowing the user to press Esc to dismiss the wizard: I allow
> it in the early steps but prompt for confirmation after a significant
> amount of data has been entered.



> Stephane fournier wrote:

> > Look at the post RCP & Resource Navigator (again) just below.
> > It is not complety done but it gonna be further...

> > Stephane

> > Jeff Lawson wrote:

> > > Hi,

> > > In April 2004, Steven Wingfield mentioned that he was having difficulty
> > > getting the Resource Navigator to work correctly in and RCP application
> > > but no one was able to respond:

> > > http://dev.eclipse.org/newslists/news.eclipse.platform/msg17 983.html

> > > In particular, although various actions indicate that the RCP application
> > > seems to be aware of the existence of previously created projects, the
> > > Resource Navigator (i) shows blank tree items for projects created during
> > > the current session and (ii) fails to show projects created during
> > > previous sessions.

> > > I am having exactly the same experience and would appreciate receiving
> > > help from anyone who knows how to remedy the RCP Resource Navigator
> > > problem. Thanks.


> > > Jeff
Re: Navigator problems in rcp app [message #261640 is a reply to message #261419] Thu, 15 July 2004 06:56 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: andreas.rummler.tu-ilmenau.de

Jeff Lawson schrieb:

> org.eclipse.ui.internal.ide.IDEWorkbenchAdvisor
> stores the workspace during:
> WorkbenchAdvisor.postShutdown()

It seems, if we struggle all together we can get that navigator
working ... ;-D

In the meantime I've managed to resolve the missing-icons-issue: All
the default icons need to be registered. This code mas copied from
the IDEWorkbenchAdvisor:

public void initialize( IWorkbenchConfigurer configurer ) {
...
String PATH_ETOOL = ICONS_PATH + "etool16/"; // enabled toolbar icons
Bundle ideBundle = Platform.getBundle( IDEWorkbenchPlugin.IDE_WORKBENCH );
declareWorkbenchImage( ideBundle, ISharedImages.IMG_TOOL_NEW_WIZARD, PATH_ETOOL + "new_wiz.gif", true );
...
}


private void declareWorkbenchImage( Bundle ideBundle, String symbolicName, String path, boolean shared ) {
URL url = ideBundle.getEntry( path );
ImageDescriptor desc = ImageDescriptor.createFromURL( url );
getWorkbenchConfigurer().declareImage( symbolicName, desc, shared );
}


Hope this helps ...

Best regards,

Andreas Rummler


--
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ++++++++++++
+ Andreas Rummler +
+ Technical University of Ilmenau, Germany (__) +
+ Department Of Electronic Circuits & Systems (oo) +
+ \/-------\ +
+ MAIL: mailto:arummler@acm.org || | \ +
+ MAIL: mailto:andreas.rummler@tu-ilmenau.de ||----|| * +
+ WEB : http://www.inf-technik.tu-ilmenau.de/~rummler ~~ ~~ +
+ PGP : http://www.inf-technik.tu-ilmenau.de/~rummler/public.pgp +
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ++++++++++++

"Programming today is a race between software engineers striving to
build bigger and better idiot-proof programs and the universe trying
to produce bigger and better idiots. So far, the universe is winning."
Richard Cook
Re: Navigator problems in rcp app [message #262418 is a reply to message #261640] Mon, 19 July 2004 17:53 Go to previous message
Jeff Lawson is currently offline Jeff LawsonFriend
Messages: 26
Registered: July 2009
Junior Member
Hi Andreas,

Thank you, I now have icons.

The next step is to strip out all the context menu stuff that I don't
need. I'm using feature-based self-hosting and have imported _all_ the
Eclipse features and plug-ins so I'm assuming that when I cut back to just
those that are needed by my RCP the undesired actions will go too.


Jeff


Andreas Rummler wrote:

> Jeff Lawson schrieb:

> > org.eclipse.ui.internal.ide.IDEWorkbenchAdvisor
> > stores the workspace during:
> > WorkbenchAdvisor.postShutdown()

> It seems, if we struggle all together we can get that navigator
> working ... ;-D

> In the meantime I've managed to resolve the missing-icons-issue: All
> the default icons need to be registered. This code mas copied from
> the IDEWorkbenchAdvisor:

> public void initialize( IWorkbenchConfigurer configurer ) {
> ...
> String PATH_ETOOL = ICONS_PATH + "etool16/"; // enabled toolbar icons
> Bundle ideBundle = Platform.getBundle( IDEWorkbenchPlugin.IDE_WORKBENCH );
> declareWorkbenchImage( ideBundle, ISharedImages.IMG_TOOL_NEW_WIZARD,
PATH_ETOOL + "new_wiz.gif", true );
> ...
> }


> private void declareWorkbenchImage( Bundle ideBundle, String symbolicName,
String path, boolean shared ) {
> URL url = ideBundle.getEntry( path );
> ImageDescriptor desc = ImageDescriptor.createFromURL( url );
> getWorkbenchConfigurer().declareImage( symbolicName, desc, shared );
> }


> Hope this helps ...

> Best regards,

> Andreas Rummler
Previous Topic:Multiple log4j contexts with tomcat and Eclipse
Next Topic:Re: Problem finding plugin location.
Goto Forum:
  


Current Time: Sat Sep 21 01:42:48 GMT 2024

Powered by FUDForum. Page generated in 0.04663 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top