targetMenu.removeAll();
WsdlTestStep testStep = null;
WsdlTestCase testCase = null;
WsdlTestSuite testSuite = null;
WsdlProject project = null;
WsdlMockService mockService = null;
WsdlMockResponse mockResponse = null;
SecurityTest securityTest = null;
if( modelItem instanceof WsdlTestStep )
{
testStep = ( WsdlTestStep )modelItem;
testCase = testStep.getTestCase();
testSuite = testCase.getTestSuite();
project = testSuite.getProject();
}
else if( modelItem instanceof WsdlTestCase )
{
testCase = ( WsdlTestCase )modelItem;
testSuite = testCase.getTestSuite();
project = testSuite.getProject();
}
else if( modelItem instanceof WsdlTestSuite )
{
testSuite = ( WsdlTestSuite )modelItem;
project = testSuite.getProject();
}
else if( modelItem instanceof WsdlMockService )
{
project = ( ( WsdlMockService )modelItem ).getProject();
}
else if( modelItem instanceof WsdlMockResponse )
{
mockResponse = ( WsdlMockResponse )modelItem;
mockService = ( mockResponse ).getMockOperation().getMockService();
project = mockService.getProject();
}
else if( modelItem instanceof WsdlProject )
{
project = ( WsdlProject )modelItem;
}
else if( modelItem instanceof AbstractHttpRequestInterface<?> )
{
project = ( ( AbstractHttpRequest<?> )modelItem ).getOperation().getInterface().getProject();
}
else if( modelItem instanceof Operation )
{
project = ( WsdlProject )( ( Operation )modelItem ).getInterface().getProject();
}
else if( modelItem instanceof SecurityTest )
{
securityTest = ( SecurityTest )modelItem;
testCase = securityTest.getTestCase();
testSuite = testCase.getTestSuite();
project = testSuite.getProject();
}
TestPropertyHolder globalProperties = PropertyExpansionUtils.getGlobalProperties();
if( globalProperties.getProperties().size() > 0 )
targetMenu.add( createPropertyMenu( "Global", globalProperties ) );
if( project != null )
targetMenu.add( createPropertyMenu( "Project: [" + project.getName() + "]", project ) );
if( testSuite != null )
targetMenu.add( createPropertyMenu( "TestSuite: [" + testSuite.getName() + "]", testSuite ) );
if( mockService != null )