Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Test and Performance Tools Platform (TPTP) » IAgentStateModifier & IProcessStateModifier issues...
IAgentStateModifier & IProcessStateModifier issues... [message #98177] Tue, 08 May 2007 04:06 Go to next message
Eclipse UserFriend
Originally posted by: guyfromindia.gmail.com

This doubt is for the 'GUI' guys...

I have an agent running inside my Eclipse instance (plugin). I have also
implemented custom control providers for the process, agent and toolbar...
because want to have control over 'attach', 'detatch', 'start', 'pause',
'terminate', etc.

More specifically, I want to have control over 'terminate', because I cannot
allow the user to terminate the agent, which in turn kills my Eclipse (same
process).

By extending "AbstractProcessControlProvider", I can handle 'terminate' when
the user chooses the terminate item on the *process* context menu.

<problem>
But, 'terminate' on the *agent's* context menu is still handled by
" org.eclipse.tptp.trace.ui.provisional.control.provider.Proce ssControlProvider ",
even though I have implemented the
"org.eclipse.hyades.trace.ui.controllableEntity" extension point...
</problem>

Unfortunately,
org.eclipse.tptp.trace.ui.provisional.control.provider.IAgen tStateModifier
only allows me to implement attach, detatch, start, pause, etc... but NOT
terminate!

Please advice..
-Raj
Re: IAgentStateModifier & IProcessStateModifier issues... [message #98412 is a reply to message #98177] Fri, 11 May 2007 00:28 Go to previous messageGo to next message
No real name is currently offline No real nameFriend
Messages: 404
Registered: July 2009
Senior Member
Hi Raj,

What does your extension point look like? Are you explicitly associating a
control provider with an agent entity? See below for an example:

<control associatedAgentId =
"org.eclipse.tptp.trace.ui.loggingAgentDiscoverer">
<entity type = "process" class =
" org.eclipse.tptp.trace.ui.provisional.control.provider.Proce ssControlProvider "/>
<entity type = "agent" class =
" org.eclipse.tptp.trace.ui.internal.control.provider.applicat ion.AgentDiscovererControlProvider "/>
</control>

The control provider that you associate with an agent should be an extension
of AbstractAgentControlProvider, which is an extension of
ProcessControlProvider. All you need to do is overwrite
getProcessStateModifier() and have it return an instance of the process
state modifier you're using for your process control provider. See the
snippet below:

class MyAgentControlProvider extends AbstractAgentControlProvider
{
//overwrite getProcessStateModifier()
public IProcessStateModifier getProcessStateModifier()
{
//return an instance of the process state modifier you're using for
your process control provider
}

// overwirte the agent state modifier()...
}

Thanks,

Ali Mehregani



"Raj" <guyfromindia@gmail.com> wrote in message
news:f1osv7$ti$1@build.eclipse.org...
> This doubt is for the 'GUI' guys...
>
> I have an agent running inside my Eclipse instance (plugin). I have also
> implemented custom control providers for the process, agent and toolbar...
> because want to have control over 'attach', 'detatch', 'start', 'pause',
> 'terminate', etc.
>
> More specifically, I want to have control over 'terminate', because I
> cannot allow the user to terminate the agent, which in turn kills my
> Eclipse (same process).
>
> By extending "AbstractProcessControlProvider", I can handle 'terminate'
> when the user chooses the terminate item on the *process* context menu.
>
> <problem>
> But, 'terminate' on the *agent's* context menu is still handled by
> " org.eclipse.tptp.trace.ui.provisional.control.provider.Proce ssControlProvider ",
> even though I have implemented the
> "org.eclipse.hyades.trace.ui.controllableEntity" extension point...
> </problem>
>
> Unfortunately,
> org.eclipse.tptp.trace.ui.provisional.control.provider.IAgen tStateModifier
> only allows me to implement attach, detatch, start, pause, etc... but NOT
> terminate!
>
> Please advice..
> -Raj
>
>
Re: IAgentStateModifier & IProcessStateModifier issues... [message #98454 is a reply to message #98412] Fri, 11 May 2007 15:20 Go to previous message
Eclipse UserFriend
Originally posted by: guyfromindia.gmail.com

>>> All you need to do is overwrite getProcessStateModifier() and have it
>>> return an instance of the process state modifier you're using for your
>>> process control provider.

Hello Ali,
I was doing everything mentioned below, except override
getProcessStateModifier...
That did it! Thanks for your valuable input...

Thx
Raj


"Ali Mehregani" <amehrega@ca.ibm.com> wrote in message
news:f20dcd$jrl$1@build.eclipse.org...
> Hi Raj,
>
> What does your extension point look like? Are you explicitly associating
> a control provider with an agent entity? See below for an example:
>
> <control associatedAgentId =
> "org.eclipse.tptp.trace.ui.loggingAgentDiscoverer">
> <entity type = "process" class =
> " org.eclipse.tptp.trace.ui.provisional.control.provider.Proce ssControlProvider "/>
> <entity type = "agent" class =
> " org.eclipse.tptp.trace.ui.internal.control.provider.applicat ion.AgentDiscovererControlProvider "/>
> </control>
>
> The control provider that you associate with an agent should be an
> extension of AbstractAgentControlProvider, which is an extension of
> ProcessControlProvider. All you need to do is overwrite
> getProcessStateModifier() and have it return an instance of the process
> state modifier you're using for your process control provider. See the
> snippet below:
>
> class MyAgentControlProvider extends AbstractAgentControlProvider
> {
> //overwrite getProcessStateModifier()
> public IProcessStateModifier getProcessStateModifier()
> {
> //return an instance of the process state modifier you're using
> for your process control provider
> }
>
> // overwirte the agent state modifier()...
> }
>
> Thanks,
>
> Ali Mehregani
>
>
>
> "Raj" <guyfromindia@gmail.com> wrote in message
> news:f1osv7$ti$1@build.eclipse.org...
>> This doubt is for the 'GUI' guys...
>>
>> I have an agent running inside my Eclipse instance (plugin). I have also
>> implemented custom control providers for the process, agent and
>> toolbar...
>> because want to have control over 'attach', 'detatch', 'start', 'pause',
>> 'terminate', etc.
>>
>> More specifically, I want to have control over 'terminate', because I
>> cannot allow the user to terminate the agent, which in turn kills my
>> Eclipse (same process).
>>
>> By extending "AbstractProcessControlProvider", I can handle 'terminate'
>> when the user chooses the terminate item on the *process* context menu.
>>
>> <problem>
>> But, 'terminate' on the *agent's* context menu is still handled by
>> " org.eclipse.tptp.trace.ui.provisional.control.provider.Proce ssControlProvider ",
>> even though I have implemented the
>> "org.eclipse.hyades.trace.ui.controllableEntity" extension point...
>> </problem>
>>
>> Unfortunately,
>> org.eclipse.tptp.trace.ui.provisional.control.provider.IAgen tStateModifier
>> only allows me to implement attach, detatch, start, pause, etc... but NOT
>> terminate!
>>
>> Please advice..
>> -Raj
>>
>>
>
>
Previous Topic:Problem in running TPTP Plugin junit with java 1.4
Next Topic:Invalid preference page path error
Goto Forum:
  


Current Time: Tue Mar 19 08:53:31 GMT 2024

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

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

Back to the top