Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [cdt-dev] RE:Adding listener to MBS enumerated option

Hi Harish,

 

The value handler mechanism does not work appropriately for the CDT <= 3.0.1

You will have to use the current CDT sources from CVS or wait for the upcoming CDT 3.0.2 and 3.1 releases to take a full advantage of the value handler mechanism.

The value handler mechanism is the only way to monitor the option value change for now.

 

>'isDirty' which is true only when value of that option gets changed. But

that is private variable so I can't access. So is there any other way by

which I can check if that value is changed.

You can use the Option.isDirty() to check the option dirty state if necessary.

 

Regards,

Mikhail

 

 

-----Original Message-----
From: cdt-dev-bounces@xxxxxxxxxxx [mailto:cdt-dev-bounces@xxxxxxxxxxx] On Behalf Of Harish Dewan
Sent: Monday, January 23, 2006 7:11 PM
To: cdt-dev@xxxxxxxxxxx
Subject: [cdt-dev] RE:Adding listener to MBS enumerated option

 

 

Hi all,

Thanks a lot for your timely help. I have tried following two things,

but I have few more issues regarding that

1)    I tried setting 'applicabilityCalculator' for my option.

Function 'IOptionApplicability.isOptionEnabled()' is called many times.

While debugging it seems that it is called twice when I click on that

option and twice more when I change its value. So if I have a message

box in that code it will get call four times. So how do I check that my

message box gets called only once and that too after value gets change.

 

2)    Also I tried using 'valueHandler' and in that 'EVENT_APPLY' that

is value of event is 4 when 'OK' button is clicked. Putting a message

box over there works but it will get called even if value of that

combobox is not changed.

To check that value I have noticed that there is a private Boolean

variable

'isDirty' which is true only when value of that option gets changed. But

that is private variable so I can't access. So is there any other way by

which I can check if that value is changed.

 

Thanks a lot in advance.

 

Best Regards,

Harish Dewan

System Executive , Advanced Technology Solutions - Semiconductor

Solutions Group | KPIT Cummins Infosystems Ltd. | +91 020 2538 2358 x

421 | harishd@xxxxxxxxxxxxxxx | www.kpitcummins.com

 

 

Message: 3

Date: Mon, 23 Jan 2006 19:48:21 +0530

From: "Harish Dewan" <harishd@xxxxxxxxxxxxxxx>

Subject: [cdt-dev] Adding listener to MBS enumerated option

To: <cdt-dev@xxxxxxxxxxx>

Message-ID: <4A1BE23A7B777442B60F4B4916AE0F1309EBACC5@xxxxxxxxxxxxx>

Content-Type: text/plain; charset="us-ascii"

 

Hi all,

 

I have an enumerated option which has enumeratedOptionValues added. When

the user changes the value of that enumerated option (combo box), I need

to display a message box.

 

So can you please guide me how to add listener to combo box of MBS.

 

 

 

Thanks in advance.

 

 

 

Best Regards,

 

Harish Dewan

 

System Executive , Advanced Technology Solutions - Semiconductor

Solutions Group | KPIT Cummins Infosystems Ltd. | +91 020 2538 2358 x

421 | harishd@xxxxxxxxxxxxxxx | www.kpitcummins.com

<outbind://98-0000000008562836FBEEF741ACED3990CA9A70BD64DE2900/www.kpitc

ummins.com> 

 

 

 

-------------- next part --------------

An HTML attachment was scrubbed...

URL:

http://eclipse.org/pipermail/cdt-dev/attachments/20060123/f866be6b/attac

hment.html

 

------------------------------

 

Message: 4

Date: Mon, 23 Jan 2006 15:34:56 +0100

From: wieant@xxxxxxxxx (Wieant Nielander)

Subject: Re: [cdt-dev] Adding listener to MBS enumerated option

To: "CDT General developers list." <cdt-dev@xxxxxxxxxxx>

Message-ID: <20060123143456.GA31197@xxxxxxxxx>

Content-Type: text/plain; charset=us-ascii

 

 

> I have an enumerated option which has enumeratedOptionValues added.

When

> the user changes the value of that enumerated option (combo box), I

need

> to display a message box.

>

> So can you please guide me how to add listener to combo box of MBS.

 

You might try to set the 'applicabilityCalculator' attribute on the

enumerated option. Each time the user changes an option with that enum

option in view the method IOptionApplicability.isOptionEnabled() will be

called, and you can possibly abuse that method to check the selected

enum and popup the message box.

 

Regards,

  Wieant

 

 

------------------------------

 

Message: 5

Date: Mon, 23 Jan 2006 17:37:57 +0300

From: "Sennikovsky, Mikhail" <mikhail.sennikovsky@xxxxxxxxx>

Subject: RE: [cdt-dev] Adding listener to MBS enumerated option

To: "CDT General developers list." <cdt-dev@xxxxxxxxxxx>

Message-ID: <AFFB534DFDE16E44B5413E9F8B8E2AD20166A3E3@NNSMSX401>

Content-Type: text/plain; charset="us-ascii"

 

Hi Harish,

 

 

 

You can specify the option value handler in your option definition to

monitor and handle the option value change.

 

In order to do that, you will have to set the "valueHandler" option

attribute to the class name that implements the

org.eclipse.cdt.managedbuilder.core.ImanagedOptionValueHandler

interface.

 

After that, in order to handle the option change event, you will need to

handle the EVENT_APPLY event (see the ImanagedOptionValueHandler

interface definition)

 

 

 

Regards,

 

Mikhail

 

 

 

_______________________________________________

cdt-dev mailing list

cdt-dev@xxxxxxxxxxx

https://dev.eclipse.org/mailman/listinfo/cdt-dev


Back to the top