Skip to main content



      Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Intro and RCP
Intro and RCP [message #459237] Wed, 29 November 2006 09:23 Go to next message
Eclipse UserFriend
> This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.

--B_3247629833_15243208
Content-type: text/plain;
charset="US-ASCII"
Content-transfer-encoding: 7bit

Trying to implement Intro and ran into strange behavior. If I include
(uncomment) the following code in my makeActions method in the
ActionBarAdvisor, then my application opens and immediately closes. The
action is an IWorkbenchAction. This occurs even though I have not yet put
it into the menu itself (I did originally, but am trying to narrow down the
problem).

// introAction = ActionFactory.INTRO.create(window); //
register(introAction);

--B_3247629833_15243208
Content-type: text/html;
charset="US-ASCII"
Content-transfer-encoding: quoted-printable

<HTML>
<HEAD>
<TITLE>Intro and RCP</TITLE>
</HEAD>
<BODY>
<FONT FACE=3D"Verdana, Helvetica, Arial"><SPAN STYLE=3D'font-size:12.0px'>Tryin=
g to implement Intro and ran into strange behavior. &nbsp;If I include (unco=
mment) the following code in my makeActions method in the ActionBarAdvisor, =
then my application opens and immediately closes. &nbsp;The action is an IWo=
rkbenchAction. &nbsp;This occurs even though I have not yet put it into the =
menu itself (I did originally, but am trying to narrow down the problem). &n=
bsp;<BR>
<BR>
// &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;introAction =3D ActionFactory.IN=
TRO.create(window);
// &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;register(introAction); </SPAN><=
/FONT>
</BODY>
</HTML>


--B_3247629833_15243208--
Re: Intro and RCP [message #459430 is a reply to message #459237] Fri, 01 December 2006 05:06 Go to previous messageGo to next message
Eclipse UserFriend
J Michael Dean schrieb:
> Trying to implement Intro and ran into strange behavior. If I include
> (uncomment) the following code in my makeActions method in the
> ActionBarAdvisor, then my application opens and immediately closes. The
> action is an IWorkbenchAction. This occurs even though I have not yet
> put it into the menu itself (I did originally, but am trying to narrow
> down the problem).
>
> // introAction = ActionFactory.INTRO.create(window); //
> register(introAction);

My unqualified guess is that you have e. g. a NullPointerException.
It's a good idea to use -consoleLog as a parameter to the Application,
so you can see exceptions such as that.
Re: Intro and RCP [message #459446 is a reply to message #459430] Fri, 01 December 2006 09:31 Go to previous messageGo to next message
Eclipse UserFriend
Thanks. Did not know about -consoleLog and of course you are correct. This
is the kind of tip that ought to be in bold letters in Eclipse books.

- Mike


On 12/1/06 3:06 AM, in article ekourh$gne$1@utils.eclipse.org, "Nicolai
Czempin" <exquisitus@example.com> wrote:

> J Michael Dean schrieb:
>> Trying to implement Intro and ran into strange behavior. If I include
>> (uncomment) the following code in my makeActions method in the
>> ActionBarAdvisor, then my application opens and immediately closes. The
>> action is an IWorkbenchAction. This occurs even though I have not yet
>> put it into the menu itself (I did originally, but am trying to narrow
>> down the problem).
>>
>> // introAction = ActionFactory.INTRO.create(window); //
>> register(introAction);
>
> My unqualified guess is that you have e. g. a NullPointerException.
> It's a good idea to use -consoleLog as a parameter to the Application,
> so you can see exceptions such as that.
Re: Intro and RCP [message #459448 is a reply to message #459430] Fri, 01 December 2006 10:07 Go to previous messageGo to next message
Eclipse UserFriend
Having the log demonstrates the NPE but it is occurring in the ActionFactory
when it tries to instantiate an IntroAction; there is an attempt to create
an IntroDescriptor and this fails, leaving me with a null introDescriptor.

I have built the sample RCP that creates static intro screen, and when I
trace this the introDescriptor is properly created. I cannot find any
differences in the basic application code.

Has anyone encountered this type of issue? Thanks in advance.



On 12/1/06 3:06 AM, in article ekourh$gne$1@utils.eclipse.org, "Nicolai
Czempin" <exquisitus@example.com> wrote:

> J Michael Dean schrieb:
>> Trying to implement Intro and ran into strange behavior. If I include
>> (uncomment) the following code in my makeActions method in the
>> ActionBarAdvisor, then my application opens and immediately closes. The
>> action is an IWorkbenchAction. This occurs even though I have not yet
>> put it into the menu itself (I did originally, but am trying to narrow
>> down the problem).
>>
>> // introAction = ActionFactory.INTRO.create(window); //
>> register(introAction);
>
> My unqualified guess is that you have e. g. a NullPointerException.
> It's a good idea to use -consoleLog as a parameter to the Application,
> so you can see exceptions such as that.
Re: Intro and RCP [message #459451 is a reply to message #459448] Fri, 01 December 2006 11:20 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: romaric.charton.gmail.com

Well, yes just a few hours ago ... ;-)

NPE is launched because Platform didn't have a product so
test the existence of it with a Platform.getProduct()
and create/register/ure the intro action only if the product is !=null

Once you will have a product configured, the intro will show up
=> use the launch configuration => launch product

Good luck,

Sincerely,

R.C

J Michael Dean a écrit :
> Having the log demonstrates the NPE but it is occurring in the ActionFactory
> when it tries to instantiate an IntroAction; there is an attempt to create
> an IntroDescriptor and this fails, leaving me with a null introDescriptor.
>
> I have built the sample RCP that creates static intro screen, and when I
> trace this the introDescriptor is properly created. I cannot find any
> differences in the basic application code.
>
> Has anyone encountered this type of issue? Thanks in advance.
>
>
>
> On 12/1/06 3:06 AM, in article ekourh$gne$1@utils.eclipse.org, "Nicolai
> Czempin" <exquisitus@example.com> wrote:
>
>> J Michael Dean schrieb:
>>> Trying to implement Intro and ran into strange behavior. If I include
>>> (uncomment) the following code in my makeActions method in the
>>> ActionBarAdvisor, then my application opens and immediately closes. The
>>> action is an IWorkbenchAction. This occurs even though I have not yet
>>> put it into the menu itself (I did originally, but am trying to narrow
>>> down the problem).
>>>
>>> // introAction = ActionFactory.INTRO.create(window); //
>>> register(introAction);
>> My unqualified guess is that you have e. g. a NullPointerException.
>> It's a good idea to use -consoleLog as a parameter to the Application,
>> so you can see exceptions such as that.
>
Re: Intro and RCP [message #459494 is a reply to message #459451] Sat, 02 December 2006 13:05 Go to previous message
Eclipse UserFriend
I have a product - in fact am building the application from the product
configuration. But I went to the product file again and launched from
there, and now it is working. I have changed no code, etc., so am
perplexed, except that now it works. Thanks.


On 12/1/06 9:20 AM, in article ekpkp6$isj$1@utils.eclipse.org, "Romaric
Charton" <romaric.charton@gmail.com> wrote:

> Well, yes just a few hours ago ... ;-)
>
> NPE is launched because Platform didn't have a product so
> test the existence of it with a Platform.getProduct()
> and create/register/ure the intro action only if the product is !=null
>
> Once you will have a product configured, the intro will show up
> => use the launch configuration => launch product
>
> Good luck,
>
> Sincerely,
>
> R.C
>
> J Michael Dean a écrit :
>> Having the log demonstrates the NPE but it is occurring in the ActionFactory
>> when it tries to instantiate an IntroAction; there is an attempt to create
>> an IntroDescriptor and this fails, leaving me with a null introDescriptor.
>>
>> I have built the sample RCP that creates static intro screen, and when I
>> trace this the introDescriptor is properly created. I cannot find any
>> differences in the basic application code.
>>
>> Has anyone encountered this type of issue? Thanks in advance.
>>
>>
>>
>> On 12/1/06 3:06 AM, in article ekourh$gne$1@utils.eclipse.org, "Nicolai
>> Czempin" <exquisitus@example.com> wrote:
>>
>>> J Michael Dean schrieb:
>>>> Trying to implement Intro and ran into strange behavior. If I include
>>>> (uncomment) the following code in my makeActions method in the
>>>> ActionBarAdvisor, then my application opens and immediately closes. The
>>>> action is an IWorkbenchAction. This occurs even though I have not yet
>>>> put it into the menu itself (I did originally, but am trying to narrow
>>>> down the problem).
>>>>
>>>> // introAction = ActionFactory.INTRO.create(window); //
>>>> register(introAction);
>>> My unqualified guess is that you have e. g. a NullPointerException.
>>> It's a good idea to use -consoleLog as a parameter to the Application,
>>> so you can see exceptions such as that.
>>
Previous Topic:buddy classloading troubles
Next Topic:New user of RCP
Goto Forum:
  


Current Time: Thu Mar 20 15:07:42 EDT 2025

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

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

Back to the top