Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 141540 | Differences between
and this patch

Collapse All | Expand All

(-)plugin.properties (+2 lines)
Lines 31-33 Link Here
31
JVMTI_ANALYSIS_TYPE_THRD_NAME			= Thread Analysis
31
JVMTI_ANALYSIS_TYPE_THRD_NAME			= Thread Analysis
32
JVMTI_ANALYSIS_TYPE_THRD_DESC			= Analyze the execution of your application threads
32
JVMTI_ANALYSIS_TYPE_THRD_DESC			= Analyze the execution of your application threads
33
33
34
JVMTI_ANALYSIS_TYPE_PROBE_NAME			= Probe Insertion
35
JVMTI_ANALYSIS_TYPE_PROBE_DESC			= Insert user-defined or imported probes into your class at runtime
(-)plugin.xml (+37 lines)
Lines 14-19 Link Here
14
				<applicableType id = "org.eclipse.tptp.analysisType.jvmti.execution"/>
14
				<applicableType id = "org.eclipse.tptp.analysisType.jvmti.execution"/>
15
    <applicableType id="org.eclipse.tptp.analysisType.jvmti.heap"/>
15
    <applicableType id="org.eclipse.tptp.analysisType.jvmti.heap"/>
16
    <applicableType id="org.eclipse.tptp.analysisType.jvmti.thread"/>
16
    <applicableType id="org.eclipse.tptp.analysisType.jvmti.thread"/>
17
   <applicableType id="org.eclipse.tptp.analysisType.jvmti.probe"/>
17
			</analysis>		
18
			</analysis>		
18
			
19
			
19
			<!-- This data collector can't co-exist with the jvmpi data collector -->
20
			<!-- This data collector can't co-exist with the jvmpi data collector -->
Lines 42-47 Link Here
42
     <coexistanceViolation>
43
     <coexistanceViolation>
43
        <rule analysisTypeId="org.eclipse.tptp.analysisType.jvmti.thread"/>
44
        <rule analysisTypeId="org.eclipse.tptp.analysisType.jvmti.thread"/>
44
     </coexistanceViolation> 
45
     </coexistanceViolation> 
46
      <coexistanceViolation>
47
        <rule analysisTypeId="org.eclipse.tptp.analysisType.jvmti.probeInsertion"/>
48
     </coexistanceViolation>
45
		</analysisType>
49
		</analysisType>
46
  <analysisType
50
  <analysisType
47
        configurationId="org.eclipse.tptp.trace.jvmti.heapConfiguration"
51
        configurationId="org.eclipse.tptp.trace.jvmti.heapConfiguration"
Lines 55-60 Link Here
55
     <coexistanceViolation>
59
     <coexistanceViolation>
56
        <rule analysisTypeId="org.eclipse.tptp.analysisType.jvmti.execution"/>
60
        <rule analysisTypeId="org.eclipse.tptp.analysisType.jvmti.execution"/>
57
     </coexistanceViolation>
61
     </coexistanceViolation>
62
      <coexistanceViolation>
63
        <rule analysisTypeId="org.eclipse.tptp.analysisType.jvmti.probeInsertion"/>
64
     </coexistanceViolation>
58
  </analysisType>
65
  </analysisType>
59
  <analysisType
66
  <analysisType
60
        configurationId="org.eclipse.tptp.trace.jvmti.threadConfiguration"
67
        configurationId="org.eclipse.tptp.trace.jvmti.threadConfiguration"
Lines 68-73 Link Here
68
     <coexistanceViolation>
75
     <coexistanceViolation>
69
        <rule analysisTypeId="org.eclipse.tptp.analysisType.jvmti.execution"/>
76
        <rule analysisTypeId="org.eclipse.tptp.analysisType.jvmti.execution"/>
70
     </coexistanceViolation>
77
     </coexistanceViolation>
78
      <coexistanceViolation>
79
        <rule analysisTypeId="org.eclipse.tptp.analysisType.jvmti.probeInsertion"/>
80
     </coexistanceViolation>
81
  </analysisType>
82
  <!-- The analysis type for Probe Insertion in JVMTI -->
83
  <!-- added for enhancement 141450-->
84
   <analysisType
85
        configurationId="org.eclipse.tptp.trace.jvmti.probeInsertion"
86
        validator ="org.eclipse.tptp.platform.jvmti.client.internal.analysistypes.TIProbekitLaunchValidator"
87
        description="%JVMTI_ANALYSIS_TYPE_PROBE_DESC"
88
        icon="icons/full/obj16/probekitinst.gif"
89
        id="org.eclipse.tptp.analysisType.jvmti.probe"
90
        name="%JVMTI_ANALYSIS_TYPE_PROBE_NAME">
91
        <coexistanceViolation>
92
        <rule analysisTypeId="org.eclipse.tptp.analysisType.jvmti.heap"/>
93
     </coexistanceViolation>
94
     <coexistanceViolation>
95
        <rule analysisTypeId="org.eclipse.tptp.analysisType.jvmti.thread"/>
96
     </coexistanceViolation>
97
     <coexistanceViolation>
98
        <rule analysisTypeId="org.eclipse.tptp.analysisType.jvmti.execution"/>
99
     </coexistanceViolation>
71
  </analysisType>
100
  </analysisType>
72
	</extension>
101
	</extension>
73
	
102
	
Lines 97-106 Link Here
97
			class = "org.eclipse.tptp.platform.jvmti.client.internal.analysistypes.TITimeAnalysisConfig"
126
			class = "org.eclipse.tptp.platform.jvmti.client.internal.analysistypes.TITimeAnalysisConfig"
98
			dialogTitle = "%JVMTI_DATA_COLLECTOR_CONF_TITILE">
127
			dialogTitle = "%JVMTI_DATA_COLLECTOR_CONF_TITILE">
99
		</configuration>
128
		</configuration>
129
		<!--Commented out to disable the Edit Options page until the remainder of the code is committed -->
130
		<!--Liz Dancy-->
131
		<configuration
132
			id = "org.eclipse.tptp.trace.jvmti.probeInsertion"
133
			class = "org.eclipse.tptp.platform.jvmti.client.internal.analysistypes.TIProbeInsertionAnalysisConfig"
134
			dialogTitle = "%JVMTI_DATA_COLLECTOR_CONF_TITILE">
135
		</configuration>
100
  <configuration
136
  <configuration
101
        class="org.eclipse.tptp.platform.jvmti.client.internal.analysistypes.TIHeapAnalysisConfig"
137
        class="org.eclipse.tptp.platform.jvmti.client.internal.analysistypes.TIHeapAnalysisConfig"
102
        dialogTitle="%JVMTI_DATA_COLLECTOR_CONF_TITILE"
138
        dialogTitle="%JVMTI_DATA_COLLECTOR_CONF_TITILE"
103
        id="org.eclipse.tptp.trace.jvmti.heapConfiguration"/>
139
        id="org.eclipse.tptp.trace.jvmti.heapConfiguration"/>
140
        
104
	</extension>	
141
	</extension>	
105
	
142
	
106
	<!-- Declare the agent for the JVMTI agent -->	
143
	<!-- Declare the agent for the JVMTI agent -->	
(-)META-INF/MANIFEST.MF (-1 / +3 lines)
Lines 14-20 Link Here
14
 org.eclipse.tptp.platform.models;bundle-version="[4.2.0,5.0.0)",
14
 org.eclipse.tptp.platform.models;bundle-version="[4.2.0,5.0.0)",
15
 org.eclipse.ui.console,
15
 org.eclipse.ui.console,
16
 org.eclipse.debug.ui,
16
 org.eclipse.debug.ui,
17
 org.eclipse.jface.text
17
 org.eclipse.jface.text,
18
 org.eclipse.tptp.platform.probekit.launch,
19
 org.eclipse.hyades.probekit
18
Eclipse-LazyStart: true
20
Eclipse-LazyStart: true
19
Bundle-Vendor: %providerName
21
Bundle-Vendor: %providerName
20
Bundle-RequiredExecutionEnvironment: J2SE-1.4
22
Bundle-RequiredExecutionEnvironment: J2SE-1.4
(-)src/org/eclipse/tptp/platform/jvmti/client/internal/analysistypes/TIProbeInsertionAnalysisConfig.java (+62 lines)
Added Link Here
1
/**********************************************************************
2
 * Copyright (c) 2007 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
6
 * http://www.eclipse.org/legal/epl-v10.html
7
 * 
8
 * Contributors: 
9
 * IBM - Initial API and implementation
10
 * @author ldancy
11
 **********************************************************************/
12
13
package org.eclipse.tptp.platform.jvmti.client.internal.analysistypes;
14
15
import org.eclipse.debug.core.ILaunchConfiguration;
16
import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
17
import org.eclipse.swt.widgets.Composite;
18
import org.eclipse.tptp.platform.jvmti.client.internal.analysistypes.TIProbeInsertionConfPage.ProbeInsertionConfigurationPage;
19
import org.eclipse.tptp.trace.ui.internal.launcher.application.AbstractConfiguration;
20
public class TIProbeInsertionAnalysisConfig extends AbstractConfiguration 
21
{
22
	
23
	 public  TIProbeInsertionAnalysisConfig() 
24
	 {
25
			super(new Class[] { TIProbeInsertionAnalysisOpt.class });		
26
	 }
27
28
	 public static class TIProbeInsertionAnalysisOpt extends ProbeInsertionConfigurationPage
29
	 {
30
		 private  TIProbeInsertionAnalysisUI probeUI ; 
31
		private ILaunchConfiguration launchConfiguration;
32
		
33
		
34
			public TIProbeInsertionAnalysisOpt()
35
			{
36
				probeUI = new TIProbeInsertionAnalysisUI(); 
37
			}
38
			 public void reset(ILaunchConfiguration launchConfiguration)
39
			{
40
					this.launchConfiguration = launchConfiguration;
41
					
42
			}
43
			 
44
			public void createControl(Composite parent)
45
			{
46
				try{
47
				probeUI.createControl(parent);
48
				
49
				}
50
				catch(Exception e)
51
				{
52
					//TODO:Handle Exception
53
				}
54
			}
55
			
56
			
57
			
58
		}	
59
		
60
}
61
62
(-)src/org/eclipse/tptp/platform/jvmti/client/internal/analysistypes/TIProbeInsertionAnalysisUI.java (+164 lines)
Added Link Here
1
/**********************************************************************
2
 * Copyright (c) 2007 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
6
 * http://www.eclipse.org/legal/epl-v10.html
7
 * 
8
 * Contributors: 
9
 * IBM - Initial API and implementation
10
 * @author ldancy
11
 **********************************************************************/
12
13
14
package org.eclipse.tptp.platform.jvmti.client.internal.analysistypes;
15
16
import java.util.ArrayList;
17
import java.util.List;
18
import java.util.Vector;
19
20
import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
21
import org.eclipse.hyades.trace.ui.internal.util.FilterSetElement;
22
import org.eclipse.hyades.trace.ui.internal.util.FilterTableElement;
23
import org.eclipse.hyades.trace.ui.launcher.ProfilingAttribute;
24
import org.eclipse.hyades.trace.ui.launcher.ProfilingSetsManagerCopy;
25
import org.eclipse.swt.widgets.Composite;
26
import org.eclipse.swt.widgets.TableItem;
27
import org.eclipse.tptp.platform.probekit.launch.internal.ProbekitLaunchUI;
28
import org.eclipse.tptp.platform.probekit.registry.ProbeRegistryEntry;
29
import org.eclipse.tptp.platform.probekit.util.ProbeLaunchConfigString;
30
import org.eclipse.tptp.trace.ui.provisional.launcher.DataCollectionEngineAttribute;
31
32
	public class TIProbeInsertionAnalysisUI 
33
	{
34
		private static ProbekitLaunchUI probeUI = new ProbekitLaunchUI();
35
		
36
		
37
		public Composite createControl (Composite parent)
38
		{
39
		 return probeUI.CreateControl(parent, null, false);
40
		}
41
		
42
		/**
43
		 * Returns the launch configuration attrributes associated with this
44
		 * Probe or set of probes
45
		 * @return
46
		 */
47
		public Vector getAttributes()
48
		{
49
			Vector attributes = new Vector();
50
			int iCheckedCount = 0;
51
			if (probeUI.getProbeSets()!=null &&! probeUI.getProbeSets().isDisposed()){
52
			int iNumProbeSets = probeUI.getProbeSets().getItemCount();
53
			if (iNumProbeSets > 0) {
54
				TableItem[] items = probeUI.getProbeSets().getItems();
55
				for (int i = 0; i < iNumProbeSets; i++) {
56
					ProbeRegistryEntry entry = (ProbeRegistryEntry) items[i]
57
							.getData();
58
					if (entry != null) {
59
						String strValueID = entry.getId();
60
61
						ProbeLaunchConfigString probe = new ProbeLaunchConfigString();
62
						probe.addProbeID(strValueID);
63
						if (items[i].getChecked()) {
64
							// ProbeLaunchConfigString probe = new
65
							// ProbeLaunchConfigString();
66
							// probe.addProbeID(strValueID);
67
							//
68
							// /RATLC00379812 - Probekit launch UI needs to be
69
							// updated to support 2-tier filtering.
70
							// /if (!entry.hasTargets())
71
							// /{
72
							boolean bMatchingSetFound = false;
73
							FilterSetElement set = probeUI.getManager()
74
									.getDefaultFilterSet();
75
76
							// build filter string
77
							ArrayList attrs = null;
78
							StringBuffer filterStr = new StringBuffer();
79
							if (set != null) {
80
								attrs = set.getChildren();
81
								for (int idx = 0; idx < attrs.size(); idx++) {
82
									FilterTableElement elem = (FilterTableElement) attrs
83
											.get(idx);
84
									filterStr.append(elem.getText());
85
									if (elem.getMethod().length() > 0)
86
										filterStr
87
												.append(":").append(elem.getMethod()); //$NON-NLS-1$
88
									filterStr
89
											.append(":").append(elem.getVisibility()); //$NON-NLS-1$
90
									filterStr.append("&"); //$NON-NLS-1$
91
								}
92
							}
93
94
							if (bMatchingSetFound) {
95
								probe.addFilters(filterStr.toString());
96
							} else {
97
								// Filter set was deleted or renamed or set to null
98
								// to use profiling filters
99
								probe.useDefaultFilters();
100
							}
101
							// /}
102
103
							String strName = ProbeLaunchConfigString.LAUNCH_CONFIG_NAME_PREFIX
104
									+ probeUI.PROBE_LAUNCH_UNIQUE_PROBESPEC_SUFFIX
105
									+ iCheckedCount;
106
							String strValueProbeLaunch = probe.toString();
107
108
							DataCollectionEngineAttribute attributeProbe = new DataCollectionEngineAttribute(
109
									strName, strValueProbeLaunch);
110
							
111
							attributes.add(attributeProbe);
112
113
							iCheckedCount++;
114
115
116
						}
117
					}
118
					
119
					
120
				}
121
			}}
122
			
123
				return attributes;
124
			
125
			
126
		}
127
		
128
		public boolean storeAttributes (ILaunchConfigurationWorkingCopy configurationWC){
129
			boolean probesSelected = false;
130
			int iSelectedProbes = 0;
131
			int iAvailableProbes = probeUI.getProbeSets().getItemCount();
132
			List namesOfSelected = null ;
133
			if (iAvailableProbes > 0) {
134
				TableItem[] items = probeUI.getProbeSets().getItems();
135
				for (int i = 0; i < iAvailableProbes; i++) {
136
					if (items[i].getChecked()) {
137
						//namesOfSelected.add(items[i].getText());
138
						iSelectedProbes++;
139
					}
140
				}
141
			}
142
			if (iAvailableProbes == 0 || iSelectedProbes == 0) {
143
				// create a new attribute to keep track of whether any probes have 
144
				//been selected for insertion or not
145
				configurationWC.setAttribute("anyProbesSelected",false);
146
				
147
			} else {
148
				// this will be retrieved by validateConfiguration
149
				// if there are no probes selected the Profile button will be disabled
150
				// and an approprite error message will be displayed
151
				configurationWC.setAttribute("anyProbesSelected", true);
152
				configurationWC.setAttribute("saved", true);
153
				configurationWC.setAttribute("selectedItems",namesOfSelected );
154
				probesSelected = true;
155
			}
156
			probeUI.saveSelections();
157
			return probesSelected;
158
		}
159
				
160
		
161
			
162
	}
163
	
164
	
(-)src/org/eclipse/tptp/platform/jvmti/client/internal/analysistypes/TIProbekitLaunchValidator.java (+42 lines)
Added Link Here
1
/**********************************************************************
2
 * Copyright (c) 2007 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
6
 * http://www.eclipse.org/legal/epl-v10.html
7
 * 
8
 * Contributors: 
9
 * IBM - Initial API and implementation
10
 * @author ldancy
11
 **********************************************************************/
12
package org.eclipse.tptp.platform.jvmti.client.internal.analysistypes;
13
14
import org.eclipse.core.runtime.IStatus;
15
import org.eclipse.core.runtime.Status;
16
import org.eclipse.debug.core.ILaunchConfiguration;
17
import org.eclipse.hyades.trace.ui.UIPlugin;
18
import org.eclipse.tptp.trace.ui.internal.launcher.core.LauncherMessages;
19
import org.eclipse.tptp.trace.ui.provisional.launcher.ILaunchValidator;
20
21
public class TIProbekitLaunchValidator implements ILaunchValidator {
22
23
	public IStatus validateConfiguration(ILaunchConfiguration configuration){
24
		Status noProbesSelected = null;
25
		try{
26
			boolean probesSelected = configuration.getAttribute("anyProbesSelected", false);
27
			if (!probesSelected)
28
			{
29
				// then we want to display an error message indicating that no probes have been selected for insertion 
30
				// and we want the Profile button to be disabled
31
				 noProbesSelected = new Status(Status.ERROR, UIPlugin.getPluginId(),LauncherMessages.ERROR_NO_PROBES_SELECTED);
32
			}
33
		}
34
		catch(Exception e){
35
			
36
		}
37
		return noProbesSelected;
38
	}
39
	public IStatus launchNotification(ILaunchConfiguration config){
40
		return null;
41
	}
42
}
(-)src/org/eclipse/tptp/platform/jvmti/client/internal/analysistypes/TIProbeInsertionConfPage.java (+114 lines)
Added Link Here
1
/**********************************************************************
2
 * Copyright (c) 2007 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
6
 * http://www.eclipse.org/legal/epl-v10.html
7
 * 
8
 * Contributors: 
9
 * IBM - Initial API and implementation
10
 * @author ldancy
11
 **********************************************************************/
12
13
package org.eclipse.tptp.platform.jvmti.client.internal.analysistypes;
14
15
import java.util.Vector;
16
17
import org.eclipse.debug.core.ILaunchConfiguration;
18
import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
19
import org.eclipse.hyades.trace.ui.internal.core.TraceUIImages;
20
import org.eclipse.jface.resource.ImageDescriptor;
21
import org.eclipse.swt.widgets.Composite;
22
import org.eclipse.tptp.platform.jvmti.client.internal.TIPlugin;
23
import org.eclipse.tptp.trace.ui.internal.launcher.application.AbstractConfiguration;
24
import org.eclipse.tptp.trace.ui.internal.launcher.core.LauncherMessages;
25
import org.eclipse.tptp.trace.ui.provisional.launcher.IStatusListener;
26
27
public class TIProbeInsertionConfPage extends AbstractConfiguration
28
{	
29
	/**
30
	 * Constructor - Add the execution time configuration page
31
	 */
32
	public TIProbeInsertionConfPage()
33
	{
34
		super(new Class[] {ProbeInsertionConfigurationPage.class});
35
	}
36
37
	
38
	/**
39
	 * The probe insertion configuration page.
40
	 * 
41
	 * @author Liz Dancy
42
	 */
43
	public static class ProbeInsertionConfigurationPage extends ExtendedConfigurationPage
44
	{
45
		private ILaunchConfiguration launchConfiguration;
46
		public TIProbeInsertionAnalysisUI pr;
47
		public ProbeInsertionConfigurationPage()
48
		{
49
			pr = new TIProbeInsertionAnalysisUI(); 
50
		}
51
		
52
		public ImageDescriptor getWizardBanner()
53
		{
54
			return TraceUIImages.INSTANCE.getImageDescriptor(TraceUIImages.IMG_PROF_SET_WIZ_BAN);
55
		}
56
		
57
		public void addErrorListener(final IStatusListener statusListener)
58
		{
59
			
60
		}
61
		/*
62
		 * Returns the title of the page
63
		 * @see org.eclipse.tptp.trace.ui.provisional.launcher.IConfigurationPage#getTitle()
64
		 */
65
		public String getTitle()
66
		{
67
			 String title = TIPlugin
68
			    .getResourceString("JVMTI_ANALYSIS_TYPE_PROBE_NAME");
69
			return title;
70
		}
71
		public void reset(ILaunchConfiguration launchConfiguration)
72
		{
73
			this.launchConfiguration = launchConfiguration;
74
			
75
		}
76
		/**
77
		 * Returns the name of this configuration page
78
		 */
79
		public String getPageName()
80
		{
81
			return this.getClass().getName();
82
		}
83
		/**
84
		 * Return the description associated with this configuration page. 
85
		 * This may eventually move out to the ProbekitLaunchUI
86
		 * getDescription().
87
		 */
88
		public String getDescription()
89
		{
90
			// to keep the same LAF as the JVMPI probe analysis description
91
		return  LauncherMessages.CONFIGURATION_PROFILING_TYPE_DESC;
92
		}
93
		
94
		public boolean storeAttributes(ILaunchConfigurationWorkingCopy configurationWC)
95
		{
96
			
97
			return pr.storeAttributes(configurationWC);
98
			    
99
		}
100
		/**
101
		 * Calls the JVMTI-specific getAttributes()method
102
		 */
103
		public Vector getAttributes()
104
		{
105
			return pr.getAttributes();
106
		}
107
		
108
		public void createControl(Composite parent)
109
		{
110
			pr.createControl(parent);
111
		}
112
		
113
	}
114
}
(-)src/org/eclipse/tptp/platform/probekit/launch/internal/ProbekitLaunchImages.java (+1 lines)
Lines 13-18 Link Here
13
13
14
import org.eclipse.hyades.ui.internal.util.ImageManager;
14
import org.eclipse.hyades.ui.internal.util.ImageManager;
15
15
16
16
/**
17
/**
17
 * Image manager for the Probekit Launch plugin.
18
 * Image manager for the Probekit Launch plugin.
18
 */
19
 */
(-)src/org/eclipse/tptp/platform/probekit/launch/internal/config/ProbekitProfilingType.java (-500 / +56 lines)
Lines 78-83 Link Here
78
import org.eclipse.tptp.platform.probekit.builder.ProbeNature;
78
import org.eclipse.tptp.platform.probekit.builder.ProbeNature;
79
import org.eclipse.tptp.platform.probekit.launch.internal.ProbekitLaunchImages;
79
import org.eclipse.tptp.platform.probekit.launch.internal.ProbekitLaunchImages;
80
import org.eclipse.tptp.platform.probekit.launch.internal.ProbekitLaunchPlugin;
80
import org.eclipse.tptp.platform.probekit.launch.internal.ProbekitLaunchPlugin;
81
import org.eclipse.tptp.platform.probekit.launch.internal.ProbekitLaunchUI;
81
import org.eclipse.tptp.platform.probekit.registry.ProbeRegistry;
82
import org.eclipse.tptp.platform.probekit.registry.ProbeRegistry;
82
import org.eclipse.tptp.platform.probekit.registry.ProbeRegistryEntry;
83
import org.eclipse.tptp.platform.probekit.registry.ProbeRegistryEntry;
83
import org.eclipse.tptp.platform.probekit.util.InvalidProbeBundleException;
84
import org.eclipse.tptp.platform.probekit.util.InvalidProbeBundleException;
Lines 88-141 Link Here
88
89
89
/**
90
/**
90
 * @author gweidner
91
 * @author gweidner
91
 * 
92
 * @modified by ldancy
92
 * See also org.eclipse.hyades.trace.ui.internal.core.TraceProfileOverviewUI.
93
 * See also org.eclipse.hyades.trace.ui.internal.core.TraceProfileOverviewUI.
93
 */
94
 */
94
public class ProbekitProfilingType implements IExtendedProfilingType,
95
public class ProbekitProfilingType implements IExtendedProfilingType {
95
		SelectionListener {
96
	
97
	/**
98
	 * Class variables necessary for keeping the IProfilingType
99
	 * interfcaes happy as well as for those IProfilingType
100
	 * methods we which to keep separate from the
101
	 * JVMTI implementation. The remainder of the old class variables have
102
	 * been moved to org.eclipse.tptp.platform.probekit.launch.ProbekitLaunchUI
103
	 * Liz Dancy; Enhancement 141540
104
	 */
105
	
96
	private Composite _form;
106
	private Composite _form;
97
107
98
	private Table _tblProbeSets;
108
 	private ProbePropertiesUI _propertiesUI;
99
100
	private Button _refreshData;
101
 
102
	private ProbePropertiesUI _propertiesUI;
103
104
	private Text _lblTitle;
105
106
	private TabFolder _folder;
107
108
	private ProfilingSetsManagerCopy _managerCopy;
109
110
	private ProbeRegistry _registry;
111
109
112
	private IDialogSettings _settings;
110
	private IDialogSettings _settings;
113
111
114
	private String _description;
112
	private ProbekitLaunchUI probeUI;
115
113
	
116
	private String _warning;
114
	
117
115
	
118
	protected HashMap _mapProbeFilters;
116
	
119
117
	
120
	protected Map _filterSetsCopy;
121
122
	private final static int PROBE_NAME_INDEX = 0;
123
124
	private final static int PROBE_PREFILTERED_INDEX = 1;
125
126
	private final static int PROBE_IMPORTED_INDEX = 2;
127
128
	private final static int PROBE_ID_INDEX = 3;
129
130
	public final static String PROBE_LAUNCH_SELECTION_ATTRIBUTE_STRING = "org.eclipse.tptp.platform.probekit.launch.internal.PROBEUI"; //$NON-NLS-1$
131
132
	public final static String PROBE_LAUNCH_SETOPTION_ATTRIBUTE_PREFIX = "SETOPTION_"; //$NON-NLS-1$
133
134
	public final static String PROBE_LAUNCH_UNIQUE_PROBESPEC_SUFFIX = "PROBEUI"; //$NON-NLS-1$
135
136
	/* Navid Mehregani; Enhancement: 143251 */
118
	/* Navid Mehregani; Enhancement: 143251 */
137
	/* @see org.eclipse.hyades.trace.ui.internal.launcher.IExtendedProfilingType */
119
	/* @see org.eclipse.hyades.trace.ui.internal.launcher.IExtendedProfilingType */
138
	public String getVMArguments(ILaunchConfiguration conf) {
120
	public String getVMArguments(ILaunchConfiguration conf) 
121
	{
139
		
122
		
140
		/* Will hold the final VM argument */
123
		/* Will hold the final VM argument */
141
		String vmArgument = "";
124
		String vmArgument = "";
Lines 170-176 Link Here
170
			String strProbeSpec = (String) activeProbes.get(key);
153
			String strProbeSpec = (String) activeProbes.get(key);
171
			ProbeLaunchConfigString probeConfigDeploy = ProbeLaunchConfigString.fromString(strProbeSpec);
154
			ProbeLaunchConfigString probeConfigDeploy = ProbeLaunchConfigString.fromString(strProbeSpec);
172
			String strProbeID = probeConfigDeploy.getRegistryId();
155
			String strProbeID = probeConfigDeploy.getRegistryId();
173
			ProbeRegistryEntry registryEntry = (ProbeRegistryEntry) _registry.lookupById(strProbeID);
156
			ProbeRegistryEntry registryEntry = (ProbeRegistryEntry) probeUI.getRegistry().lookupById(strProbeID);
174
			IResource probeSource = null;			
157
			IResource probeSource = null;			
175
			
158
			
176
			/* Extract the probe source file */
159
			/* Extract the probe source file */
Lines 386-395 Link Here
386
	/**
369
	/**
387
	 * 
370
	 * 
388
	 */
371
	 */
389
	public ProbekitProfilingType() {
372
	public ProbekitProfilingType() 
373
	{
390
		super();
374
		super();
391
375
		
392
		_registry = ProbeRegistry.getRegistry();
376
		//_registry = ProbeRegistry.getRegistry();
393
377
394
		AbstractUIPlugin plugin = (AbstractUIPlugin) ProbekitLaunchPlugin
378
		AbstractUIPlugin plugin = (AbstractUIPlugin) ProbekitLaunchPlugin
395
				.getDefault();
379
				.getDefault();
Lines 400-412 Link Here
400
			section = workbenchSettings.addNewSection("ProbeLaunchDialog");//$NON-NLS-1$
384
			section = workbenchSettings.addNewSection("ProbeLaunchDialog");//$NON-NLS-1$
401
		}
385
		}
402
		_settings = section;
386
		_settings = section;
403
387
		
404
		_description = ""; //$NON-NLS-1$
388
		probeUI = new ProbekitLaunchUI();
405
406
		_mapProbeFilters = new HashMap();
407
		_filterSetsCopy = new HashMap();
408
409
		_warning = new String(ProbekitLaunchMessages._18); //$NON-NLS-1$
410
	}
389
	}
411
390
412
	/*
391
	/*
Lines 415-561 Link Here
415
	 * @see org.eclipse.hyades.trace.ui.launcher.IProfilingType#createControl(org.eclipse.swt.widgets.Composite,
394
	 * @see org.eclipse.hyades.trace.ui.launcher.IProfilingType#createControl(org.eclipse.swt.widgets.Composite,
416
	 *      org.eclipse.hyades.trace.ui.launcher.ProfilingSetsManagerCopy)
395
	 *      org.eclipse.hyades.trace.ui.launcher.ProfilingSetsManagerCopy)
417
	 */
396
	 */
418
	public Control createControl(Composite parent,
397
	public Control createControl(Composite parent, ProfilingSetsManagerCopy config) 
419
			ProfilingSetsManagerCopy config) {
398
	{
420
		_form = new Composite(parent, SWT.NULL);
399
		return probeUI.CreateControl(parent, config, true);
421
		PlatformUI.getWorkbench().getHelpSystem().setHelp(_form,
422
				ProbekitLaunchPlugin.getPluginId() + "pb_launch1");
423
424
		GridData data = GridUtil.createFill();
425
		_form.setLayoutData(data);
426
427
		GridLayout layout = new GridLayout();
428
		layout.numColumns = 2;
429
		_form.setLayout(layout);
430
431
		_lblTitle = new Text(_form, SWT.LEFT /* | SWT.BORDER */| SWT.READ_ONLY);
432
		GridData gd = new GridData(GridData.FILL_HORIZONTAL);
433
		gd.grabExcessHorizontalSpace = true;
434
		gd.horizontalSpan = 2;
435
		_lblTitle.setLayoutData(gd);
436
437
		Composite childTop = new Composite(_form, SWT.NONE);
438
		data = GridUtil.createVerticalFill();
439
		data.widthHint = 200;
440
		childTop.setLayoutData(data);
441
442
		layout = new GridLayout();
443
		layout.numColumns = 1;
444
		childTop.setLayout(layout);
445
446
		// _lblTitle.setFont(JFaceResources.getBannerFont());
447
		Font font = _lblTitle.getFont();
448
		if (font != null) {
449
			FontData[] fonts = font.getFontData();
450
			if (fonts != null && fonts.length >= 1) {
451
				// Maintain consistency with built-in Hyades profiling type UIs
452
				// while still inheriting system font
453
				_lblTitle.setFont(new Font(Display.getDefault(), fonts[0]
454
						.getName(), fonts[0].getHeight() + 3, SWT.BOLD));
455
			}
456
		}
457
		_lblTitle.setText(ProbekitLaunchMessages._25); //$NON-NLS-1$
458
459
		_tblProbeSets = new Table(childTop, SWT.CHECK | SWT.SINGLE
460
				| SWT.FULL_SELECTION | SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL);
461
		data = GridUtil.createFill();
462
		_tblProbeSets.setLayoutData(data);
463
464
		_refreshData = new Button(childTop, SWT.PUSH);
465
		_refreshData.setText(ProbekitLaunchMessages._1);
466
		_refreshData.addSelectionListener(this);
467
468
		// new Label(childTop, SWT.NULL);
469
470
		TableLayout layoutTable = new TableLayout();
471
		layoutTable.addColumnData(new ColumnPixelData(170, true));
472
		_tblProbeSets.setLayout(layoutTable);
473
		_tblProbeSets.setHeaderVisible(true);
474
475
		// begin adding columns
476
		TableColumn tc1 = new TableColumn(_tblProbeSets, SWT.LEFT);
477
		tc1.setText(ProbekitLaunchMessages._21); //$NON-NLS-1$
478
		// end adding columns
479
480
		this.populateTableFromRegistry();
481
482
		_tblProbeSets.addListener(SWT.Selection, new Listener() {
483
			public void handleEvent(Event event) {
484
				if (event.item instanceof TableItem) {
485
					ProbeRegistryEntry entry = (ProbeRegistryEntry) event.item
486
							.getData();
487
					if (entry != null) {
488
						_propertiesUI.updateWidgetValues(entry);
489
						// commented out for bugzilla_145401
490
						// _filtersUI.updateWidgetValues(entry);
491
492
						int index = _tblProbeSets
493
								.indexOf((TableItem) event.item);
494
						_tblProbeSets.setSelection(index);
495
					}
496
				}
497
			}
498
		});
499
500
		Composite childBottom = new Composite(_form, SWT.NONE);
501
		data = GridUtil.createFill();
502
503
		childBottom.setLayoutData(data);
504
505
		layout = new GridLayout();
506
		layout.numColumns = 1;
507
		layout.marginHeight = 0;
508
		childBottom.setLayout(layout);
509
510
		// _folder = new CTabFolder(childBottom, SWT.BORDER);
511
		_folder = new TabFolder(childBottom, SWT.TOP);
512
		data = GridUtil.createFill();
513
		// bugzilla_145401 required the uncommenting of this code
514
		data.heightHint = 320;
515
		data.grabExcessHorizontalSpace = true;
516
		_folder.setLayoutData(data);
517
518
		TabItem item = new TabItem(_folder, SWT.NONE);
519
		item.setText(ProbekitLaunchMessages._20); //$NON-NLS-1$
520
		_propertiesUI = new ProbePropertiesUI();
521
		item.setControl(_propertiesUI.createControl(_folder));
522
		if (_tblProbeSets.getItemCount() == 0) {
523
			// Display text pointing user to import
524
			_propertiesUI.showHint(true);
525
		}
526
527
		item.setImage(ProbekitLaunchImages.INSTANCE
528
				.getImage(ProbekitLaunchImages.IMG_PROP));
529
530
		_folder.setSelection(0);
531
532
		// commented out for bugzilla_145401
533
		// TabItem item2 = new TabItem(_folder, SWT.NONE);
534
		// item2.setText(ProbekitLaunchMessages._19); //$NON-NLS-1$
535
		// _filtersUI = new ProbeFiltersUI();
536
		// item2.setControl(_propertiesUI.createControl(_folder));
537
		// item2.setImage(ProbekitLaunchImages.INSTANCE.getImage(ProbekitLaunchImages.IMG_FILTER));
538
539
		if (config != null) {
540
			_managerCopy = config;
541
		} else {
542
			_managerCopy = new ProfilingSetsManagerCopy();
543
		}
544
545
		initializeValues(config);
546
547
		int sel = _tblProbeSets.getSelectionIndex();
548
		if (sel != -1) {
549
			ProbeRegistryEntry entry = (ProbeRegistryEntry) _tblProbeSets
550
					.getItem(sel).getData();
551
			if (entry != null) {
552
				_propertiesUI.updateWidgetValues(entry);
553
			}
554
		}
555
556
		_tblProbeSets.setFocus();
557
558
		return _form;
559
	}
400
	}
560
401
561
	/*
402
	/*
Lines 564-569 Link Here
564
	 * @see org.eclipse.hyades.trace.ui.launcher.IProfilingType#getControl(java.lang.String)
405
	 * @see org.eclipse.hyades.trace.ui.launcher.IProfilingType#getControl(java.lang.String)
565
	 */
406
	 */
566
	public Control getControl(String profilingSetName) {
407
	public Control getControl(String profilingSetName) {
408
		Table _tblProbeSets = probeUI.getProbeSets();
567
		if (_tblProbeSets.getItemCount() > 0) {
409
		if (_tblProbeSets.getItemCount() > 0) {
568
			int indexSelection = _tblProbeSets.getSelectionIndex();
410
			int indexSelection = _tblProbeSets.getSelectionIndex();
569
			if (indexSelection < 0) {
411
			if (indexSelection < 0) {
Lines 585-590 Link Here
585
	}
427
	}
586
428
587
	protected void restoreSelections() {
429
	protected void restoreSelections() {
430
		Table _tblProbeSets = probeUI.getProbeSets();
588
		String strSelection = ""; //$NON-NLS-1$
431
		String strSelection = ""; //$NON-NLS-1$
589
		String strTab = ""; //$NON-NLS-1$
432
		String strTab = ""; //$NON-NLS-1$
590
433
Lines 628-678 Link Here
628
		// else defaults to "Properties" in createControl()
471
		// else defaults to "Properties" in createControl()
629
	}
472
	}
630
473
631
	protected void saveSelections() {
474
	
632
		int indexSelection = _tblProbeSets.getSelectionIndex();
633
634
		if (indexSelection >= 0) {
635
			TableItem tableItem = _tblProbeSets.getItem(indexSelection);
636
			if (tableItem != null) {
637
				ProbeRegistryEntry entry = (ProbeRegistryEntry) tableItem
638
						.getData();
639
				if (entry != null) {
640
					String strID = entry.getId();
641
					if (_settings != null) {
642
						// Store table selection
643
						_settings.put("ProbeTableSelection", strID); //$NON-NLS-1$
644
					}
645
				}
646
			}
647
		} else {
648
			if (_settings != null) {
649
				_settings.put("ProbeTableSelection", ""); //$NON-NLS-1$ //$NON-NLS-2$
650
			}
651
		}
652
653
		// CTabItem item = _folder.getSelection();
654
		TabItem[] item = _folder.getSelection();
655
		if (item[0] != null) {
656
			String strName = item[0].getText();
657
			if (_settings != null) {
658
				// Store folder selection
659
				_settings.put("ProbeFolderSelection", strName); //$NON-NLS-1$
660
			}
661
		} else {
662
			_settings.put("ProbeFolderSelection", ""); //$NON-NLS-1$ //$NON-NLS-2$
663
		}
664
	}
665
475
666
	protected void initializeValues(ProfilingSetsManagerCopy config) {
476
	protected void initializeValues(ProfilingSetsManagerCopy config) {
667
		int iNumProbeSets = _tblProbeSets.getItemCount();
477
		int iNumProbeSets = probeUI.getProbeSets().getItemCount();
668
		TableItem[] items = _tblProbeSets.getItems();
478
		TableItem[] items = probeUI.getProbeSets().getItems();
669
479
670
		Map configAttributes = config.getDefaultSet().getAttributes();
480
		Map configAttributes = config.getDefaultSet().getAttributes();
671
		// ProfilingAttribute attribute = (ProfilingAttribute)
481
		// ProfilingAttribute attribute = (ProfilingAttribute)
672
		// configAttributes.get("com.ibm.rational.pd.probekit.PROBEKIT_COUNT");
482
		// configAttributes.get("com.ibm.rational.pd.probekit.PROBEKIT_COUNT");
673
		int index = 0;
483
		int index = 0;
674
		String strName = ProbeLaunchConfigString.LAUNCH_CONFIG_NAME_PREFIX
484
		String strName = ProbeLaunchConfigString.LAUNCH_CONFIG_NAME_PREFIX
675
				+ PROBE_LAUNCH_UNIQUE_PROBESPEC_SUFFIX + index;
485
				+ probeUI.PROBE_LAUNCH_UNIQUE_PROBESPEC_SUFFIX + index;
676
		ProfilingAttribute attribute = (ProfilingAttribute) configAttributes
486
		ProfilingAttribute attribute = (ProfilingAttribute) configAttributes
677
				.get(strName);
487
				.get(strName);
678
		// if (attribute != null)
488
		// if (attribute != null)
Lines 708-714 Link Here
708
			index++;
518
			index++;
709
519
710
			strName = ProbeLaunchConfigString.LAUNCH_CONFIG_NAME_PREFIX
520
			strName = ProbeLaunchConfigString.LAUNCH_CONFIG_NAME_PREFIX
711
					+ PROBE_LAUNCH_UNIQUE_PROBESPEC_SUFFIX + index;
521
					+ probeUI.PROBE_LAUNCH_UNIQUE_PROBESPEC_SUFFIX + index;
712
			attribute = (ProfilingAttribute) configAttributes.get(strName);
522
			attribute = (ProfilingAttribute) configAttributes.get(strName);
713
			// }
523
			// }
714
		}
524
		}
Lines 721-727 Link Here
721
	 */
531
	 */
722
	protected Map getActiveProbes(ILaunchConfiguration launchConfig) {
532
	protected Map getActiveProbes(ILaunchConfiguration launchConfig) {
723
		String strProbeDeployPrefix = ProbeLaunchConfigString.AGENT_CONFIG_NAME_PREFIX
533
		String strProbeDeployPrefix = ProbeLaunchConfigString.AGENT_CONFIG_NAME_PREFIX
724
				+ PROBE_LAUNCH_UNIQUE_PROBESPEC_SUFFIX;
534
				+ probeUI.PROBE_LAUNCH_UNIQUE_PROBESPEC_SUFFIX;
725
		Map map = getOptions(launchConfig, strProbeDeployPrefix);
535
		Map map = getOptions(launchConfig, strProbeDeployPrefix);
726
		return map;
536
		return map;
727
	}
537
	}
Lines 766-775 Link Here
766
	public ProfilingAttribute[] getAttributes() {
576
	public ProfilingAttribute[] getAttributes() {
767
		List config = new ArrayList();
577
		List config = new ArrayList();
768
		int iCheckedCount = 0;
578
		int iCheckedCount = 0;
769
579
		
770
		int iNumProbeSets = _tblProbeSets.getItemCount();
580
		int iNumProbeSets = probeUI.getProbeSets().getItemCount();
771
		if (iNumProbeSets > 0) {
581
		if (iNumProbeSets > 0) {
772
			TableItem[] items = _tblProbeSets.getItems();
582
			TableItem[] items = probeUI.getProbeSets().getItems();
773
			for (int i = 0; i < iNumProbeSets; i++) {
583
			for (int i = 0; i < iNumProbeSets; i++) {
774
				ProbeRegistryEntry entry = (ProbeRegistryEntry) items[i]
584
				ProbeRegistryEntry entry = (ProbeRegistryEntry) items[i]
775
						.getData();
585
						.getData();
Lines 788-794 Link Here
788
						// /if (!entry.hasTargets())
598
						// /if (!entry.hasTargets())
789
						// /{
599
						// /{
790
						boolean bMatchingSetFound = false;
600
						boolean bMatchingSetFound = false;
791
						FilterSetElement set = _managerCopy
601
						FilterSetElement set = probeUI.getManager()
792
								.getDefaultFilterSet();
602
								.getDefaultFilterSet();
793
603
794
						// build filter string
604
						// build filter string
Lines 819-825 Link Here
819
						// /}
629
						// /}
820
630
821
						String strName = ProbeLaunchConfigString.LAUNCH_CONFIG_NAME_PREFIX
631
						String strName = ProbeLaunchConfigString.LAUNCH_CONFIG_NAME_PREFIX
822
								+ PROBE_LAUNCH_UNIQUE_PROBESPEC_SUFFIX
632
								+ probeUI.PROBE_LAUNCH_UNIQUE_PROBESPEC_SUFFIX
823
								+ iCheckedCount;
633
								+ iCheckedCount;
824
						String strValueProbeLaunch = probe.toString();
634
						String strValueProbeLaunch = probe.toString();
825
635
Lines 841-847 Link Here
841
		ProfilingAttribute[] pOptions = new ProfilingAttribute[config.size()];
651
		ProfilingAttribute[] pOptions = new ProfilingAttribute[config.size()];
842
		config.toArray(pOptions);
652
		config.toArray(pOptions);
843
653
844
		saveSelections();
654
		probeUI.saveSelections();
845
655
846
		return pOptions;
656
		return pOptions;
847
	}
657
	}
Lines 851-875 Link Here
851
	 * 
661
	 * 
852
	 * @see org.eclipse.hyades.trace.ui.launcher.IProfilingType#validateConfiguration(org.eclipse.hyades.trace.ui.launcher.ProfilingSetsManagerCopy)
662
	 * @see org.eclipse.hyades.trace.ui.launcher.IProfilingType#validateConfiguration(org.eclipse.hyades.trace.ui.launcher.ProfilingSetsManagerCopy)
853
	 */
663
	 */
854
	public String validateConfiguration(ProfilingSetsManagerCopy managerCopy) {
664
	public String validateConfiguration(ProfilingSetsManagerCopy managerCopy) 
855
		// RATLC00379729 - we should warn, if Probe insertion has no probe
665
	{
856
		// selected or has no probe import.
666
		return probeUI.validateConfiguration(managerCopy);
857
		int iSelectedProbes = 0;
858
		int iAvailableProbes = _tblProbeSets.getItemCount();
859
		if (iAvailableProbes > 0) {
860
			TableItem[] items = _tblProbeSets.getItems();
861
			for (int i = 0; i < iAvailableProbes; i++) {
862
				if (items[i].getChecked()) {
863
					iSelectedProbes++;
864
				}
865
			}
866
		}
867
868
		if (iAvailableProbes == 0 || iSelectedProbes == 0) {
869
			return _warning;
870
		} else {
871
			return null;
872
		}
873
	}
667
	}
874
668
875
	/*
669
	/*
Lines 895-901 Link Here
895
				ProbeLaunchConfigString probeConfigDeploy = ProbeLaunchConfigString
689
				ProbeLaunchConfigString probeConfigDeploy = ProbeLaunchConfigString
896
						.fromString(strProbeSpec);
690
						.fromString(strProbeSpec);
897
				String strProbeID = probeConfigDeploy.getRegistryId();
691
				String strProbeID = probeConfigDeploy.getRegistryId();
898
				ProbeRegistryEntry entry = (ProbeRegistryEntry) _registry
692
				ProbeRegistryEntry entry = (ProbeRegistryEntry) probeUI.getRegistry()
899
						.lookupById(strProbeID);
693
						.lookupById(strProbeID);
900
				if (entry == null) {
694
				if (entry == null) {
901
					strMissingOrInvalidProbes = strMissingOrInvalidProbes
695
					strMissingOrInvalidProbes = strMissingOrInvalidProbes
Lines 911-917 Link Here
911
705
912
						// Silently remove from registry so it will not show up
706
						// Silently remove from registry so it will not show up
913
						// in subsequent lists, etc.
707
						// in subsequent lists, etc.
914
						_registry.remove(entry);
708
						probeUI.getRegistry().remove(entry);
915
					}
709
					}
916
				}
710
				}
917
			}
711
			}
Lines 940-946 Link Here
940
									.getProfilingSets().get(setID);
734
									.getProfilingSets().get(setID);
941
							if (set != null) {
735
							if (set != null) {
942
								String strProbeOptionPrefix = ProbeLaunchConfigString.LAUNCH_CONFIG_NAME_PREFIX
736
								String strProbeOptionPrefix = ProbeLaunchConfigString.LAUNCH_CONFIG_NAME_PREFIX
943
										+ PROBE_LAUNCH_UNIQUE_PROBESPEC_SUFFIX;
737
										+ probeUI.PROBE_LAUNCH_UNIQUE_PROBESPEC_SUFFIX;
944
								boolean bRemovedProbes = false;
738
								boolean bRemovedProbes = false;
945
								Map attributes = set.getAttributes();
739
								Map attributes = set.getAttributes();
946
								Iterator iterKeys = attributes.keySet()
740
								Iterator iterKeys = attributes.keySet()
Lines 987-1069 Link Here
987
		return null;
781
		return null;
988
	}
782
	}
989
783
990
	private void populateTableFromRegistry() {
784
	
991
		_tblProbeSets.removeAll();
992
		_mapProbeFilters.clear();
993
		_registry = null;
994
995
		if (_registry == null) {
996
			_registry = ProbeRegistry.getRegistry();
997
		}
998
999
		if (_registry != null) {
1000
			// Enumeration iter = _registry.contents();
1001
			ProbeRegistryEntry[] probes = getProbesSortedByName();
1002
			// while (iter.hasMoreElements())
1003
			for (int i = 0; i < probes.length; i++) {
1004
				// ProbeRegistryEntry probeEntry = (ProbeRegistryEntry)
1005
				// iter.nextElement();
1006
				ProbeRegistryEntry probeEntry = probes[i];
1007
				TableItem item = new TableItem(_tblProbeSets, SWT.NONE);
1008
1009
				// Name
1010
				item.setText(PROBE_NAME_INDEX, probeEntry.getName());
1011
1012
				// Pre-filtered
1013
				if (probeEntry.hasTargets()) {
1014
					item.setText(PROBE_PREFILTERED_INDEX,
1015
							ProbekitLaunchMessages._7); //$NON-NLS-1$
1016
				} else {
1017
					item.setText(PROBE_PREFILTERED_INDEX,
1018
							ProbekitLaunchMessages._8); //$NON-NLS-1$					
1019
				}
1020
1021
				// /RATLC00379812 - Probekit launch UI needs to be updated to
1022
				// support 2-tier filtering.
1023
				// Build map for tracking filter selection with initial default
1024
				// values
1025
				// (later updated with any saved settings)
1026
				_mapProbeFilters.put(probeEntry.getId(), null);// "D", ""
1027
1028
				// Imported
1029
				if (probeEntry.isAuthored()) {
1030
					item.setText(PROBE_IMPORTED_INDEX,
1031
							ProbekitLaunchMessages._8); //$NON-NLS-1$
1032
				} else {
1033
					item.setText(PROBE_IMPORTED_INDEX,
1034
							ProbekitLaunchMessages._7); //$NON-NLS-1$
1035
				}
1036
1037
				// ID
1038
				item.setText(PROBE_ID_INDEX, probeEntry.getId());
1039
1040
				// Data
1041
				item.setData(probeEntry);
1042
			}
1043
		}
1044
	}
1045
1046
	public ProbeRegistryEntry[] getProbesSortedByName() {
1047
		Collection probes = new ArrayList();
1048
		Iterator iter = _registry.iterator();
1049
		while (iter.hasNext()) {
1050
			ProbeRegistryEntry entry = (ProbeRegistryEntry) iter.next();
1051
			probes.add(entry);
1052
		}
1053
785
1054
		ProbeRegistryEntry[] sortedProbes = new ProbeRegistryEntry[probes
786
	
1055
				.size()];
1056
		probes.toArray(sortedProbes);
1057
		Arrays.sort(sortedProbes, new Comparator() {
1058
			public int compare(Object obj1, Object obj2) {
1059
				ProbeRegistryEntry probe1 = (ProbeRegistryEntry) obj1;
1060
				ProbeRegistryEntry probe2 = (ProbeRegistryEntry) obj2;
1061
				return probe1.getName().compareTo(probe2.getName());
1062
			}
1063
		});
1064
1065
		return sortedProbes;
1066
	}
1067
787
1068
	/*
788
	/*
1069
	 * (non-Javadoc)
789
	 * (non-Javadoc)
Lines 1071-1242 Link Here
1071
	 * @see org.eclipse.hyades.trace.ui.launcher.IProfilingType#getDescription()
791
	 * @see org.eclipse.hyades.trace.ui.launcher.IProfilingType#getDescription()
1072
	 */
792
	 */
1073
	public String getDescription(ProfilingSetsManagerCopy config) {
793
	public String getDescription(ProfilingSetsManagerCopy config) {
1074
		// System.out.println("ProbekitProfilingType.getDescription called");
794
		return probeUI.getDescription(config);
1075
		String strDelim = "\n"; //$NON-NLS-1$
1076
		String strIndent = "    "; //$NON-NLS-1$
1077
1078
		// Empty previous description
1079
		_description = ""; //$NON-NLS-1$
1080
1081
		if (_registry == null) {
1082
			_registry = ProbeRegistry.getRegistry();
1083
		}
1084
1085
		if (config != null && config.getDefaultSet() != null) {
1086
			int index = 0;
1087
			String strName = ProbeLaunchConfigString.LAUNCH_CONFIG_NAME_PREFIX
1088
					+ PROBE_LAUNCH_UNIQUE_PROBESPEC_SUFFIX + index;
1089
1090
			Map configAttributes = config.getDefaultSet().getAttributes();
1091
			ProfilingAttribute attribute = (ProfilingAttribute) configAttributes
1092
					.get(strName);
1093
1094
			while (attribute != null) {
1095
				String strValue = attribute.getValue();
1096
				ProbeLaunchConfigString probeString = ProbeLaunchConfigString
1097
						.fromString(strValue);
1098
1099
				String strProbeID = probeString.getRegistryId();
1100
1101
				if (strProbeID != null && strProbeID.length() > 0) {
1102
					if (_registry != null) {
1103
						ProbeRegistryEntry probeEntry = _registry
1104
								.lookupById(strProbeID);
1105
1106
						if (probeEntry != null) {
1107
							String strProbeName = probeEntry.getName();
1108
1109
							if (strProbeName != null) {
1110
								_description = _description + strIndent
1111
										+ strProbeName + strDelim;
1112
							}
1113
						}
1114
					}
1115
				}
1116
1117
				index++;
1118
				strName = ProbeLaunchConfigString.LAUNCH_CONFIG_NAME_PREFIX
1119
						+ PROBE_LAUNCH_UNIQUE_PROBESPEC_SUFFIX + index;
1120
				attribute = (ProfilingAttribute) configAttributes.get(strName);
1121
			}
1122
		}
1123
1124
		if (_description != null && _description.length() > 0) {
1125
			// Remove extra new-line at end of string
1126
			int iLastNewLineIndex = _description.lastIndexOf(strDelim);
1127
			if (iLastNewLineIndex >= 0) {
1128
				_description = _description.substring(0, iLastNewLineIndex);
1129
			}
1130
		} else {
1131
			// Return null instead of zero-length string to prevent blank line
1132
			// _description = null;
1133
			_description = strIndent + ProbekitLaunchMessages._28; //$NON-NLS-1$
1134
		}
1135
1136
		return _description;
1137
	}
1138
1139
	public void widgetSelected(SelectionEvent e) {
1140
		final ArrayList list = new ArrayList();
1141
		IProject[] projects = ResourcesPlugin.getWorkspace().getRoot()
1142
				.getProjects();
1143
		for (int idx = 0; idx < projects.length; idx++) {
1144
			try {
1145
				IProject project = projects[idx];
1146
				if (project.isOpen() && project.hasNature(JavaCore.NATURE_ID)
1147
						&& !project.hasNature(ProbeNature.NATURE_NAME)) {
1148
					IJavaProject jProject = JavaCore.create(project);
1149
					Object[] resources = jProject.getNonJavaResources();
1150
1151
					boolean hasProbe = false;
1152
					int i = 0;
1153
					while (i < resources.length && !hasProbe) {
1154
						String extension = ((IResource) resources[i])
1155
								.getFileExtension();
1156
						if (extension != null && (extension.equals("probe"))) {
1157
							hasProbe = true;
1158
						}
1159
						i++;
1160
1161
					}
1162
1163
					if (hasProbe) {
1164
						list.add(project);
1165
						continue;
1166
					}
1167
1168
					List sources = JavaUtil.getSourceContainerEntries(jProject);
1169
					i = 0;
1170
					while (i < sources.size() && !hasProbe) {
1171
						IPath path = ((IClasspathEntry) sources.get(i))
1172
								.getPath();
1173
						IFolder folder = ResourcesPlugin.getWorkspace()
1174
								.getRoot().getFolder(path);
1175
						resources = folder.members();
1176
						int j = 0;
1177
						while (!hasProbe && j < resources.length) {
1178
1179
							String extension = ((IResource) resources[j])
1180
									.getFileExtension();
1181
							if (extension != null
1182
									&& (extension.equals("probe") || extension
1183
											.equals("probescript"))) {
1184
								hasProbe = true;
1185
							}
1186
							j++;
1187
						}
1188
1189
						i++;
1190
					}
1191
1192
					if (hasProbe)
1193
						list.add(project);
1194
				}
1195
			} catch (Exception exc) {
1196
			}
1197
1198
		}
1199
1200
		/*
1201
		 * N.M. Need to populate the list before checking for list.size().
1202
		 * bugzilla_140821
1203
		 */
1204
		populateTableFromRegistry();
1205
1206
		if (list.size() == 0)
1207
			return;
1208
1209
		IRunnableWithProgress operation = new WorkspaceModifyOperation() {
1210
			public void execute(IProgressMonitor monitor) {
1211
				try {
1212
					AddProbeNatureOperation addProbeNature = new AddProbeNatureOperation(
1213
							list);
1214
					addProbeNature.run(monitor);
1215
1216
				} catch (CoreException ex) {
1217
					// TODO Auto-generated catch block
1218
					ex.printStackTrace();
1219
				} finally {
1220
					monitor.done();
1221
				}
1222
			}
1223
		};
1224
1225
		try {
1226
			new ProgressMonitorDialog(Display.getCurrent().getActiveShell())
1227
					.run(true, true, operation);
1228
		} catch (InvocationTargetException exec) {
1229
			// TODO Auto-generated catch block
1230
			exec.printStackTrace();
1231
		} catch (InterruptedException exec) {
1232
			// TODO Auto-generated catch block
1233
			exec.printStackTrace();
1234
		}
1235
1236
	}
1237
1238
	public void widgetDefaultSelected(SelectionEvent e) {
1239
1240
	}
795
	}
1241
796
797
	
1242
}
798
}
(-)src/org/eclipse/tptp/platform/probekit/launch/internal/ProbekitLaunchUI.java (+673 lines)
Added Link Here
1
/**********************************************************************
2
 * Copyright (c) 2007 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
6
 * http://www.eclipse.org/legal/epl-v10.html
7
 * 
8
 * Contributors: 
9
 * IBM - Initial API and implementation
10
 * @author ldancy
11
 **********************************************************************/
12
13
package org.eclipse.tptp.platform.probekit.launch.internal;
14
15
import java.util.ArrayList;
16
import java.util.Arrays;
17
import java.util.Collection;
18
import java.util.Comparator;
19
import java.util.HashMap;
20
import java.util.Iterator;
21
import java.util.List;
22
import java.util.Map;
23
24
import org.eclipse.core.resources.IFolder;
25
import org.eclipse.core.resources.IProject;
26
import org.eclipse.core.resources.IResource;
27
import org.eclipse.core.resources.ResourcesPlugin;
28
import org.eclipse.core.runtime.IPath;
29
import org.eclipse.hyades.probekit.editor.internal.core.util.JavaUtil;
30
import org.eclipse.hyades.trace.ui.launcher.ProfilingAttribute;
31
import org.eclipse.hyades.trace.ui.launcher.ProfilingSetsManagerCopy;
32
import org.eclipse.hyades.ui.util.GridUtil;
33
import org.eclipse.jdt.core.IClasspathEntry;
34
import org.eclipse.jdt.core.IJavaProject;
35
import org.eclipse.jdt.core.JavaCore;
36
import org.eclipse.jface.dialogs.IDialogSettings;
37
import org.eclipse.jface.viewers.ColumnPixelData;
38
import org.eclipse.jface.viewers.TableLayout;
39
import org.eclipse.swt.SWT;
40
import org.eclipse.swt.events.SelectionEvent;
41
import org.eclipse.swt.events.SelectionListener;
42
import org.eclipse.swt.graphics.Font;
43
import org.eclipse.swt.graphics.FontData;
44
import org.eclipse.swt.layout.GridData;
45
import org.eclipse.swt.layout.GridLayout;
46
import org.eclipse.swt.widgets.Button;
47
import org.eclipse.swt.widgets.Composite;
48
import org.eclipse.swt.widgets.Display;
49
import org.eclipse.swt.widgets.Event;
50
import org.eclipse.swt.widgets.Listener;
51
import org.eclipse.swt.widgets.TabFolder;
52
import org.eclipse.swt.widgets.TabItem;
53
import org.eclipse.swt.widgets.Table;
54
import org.eclipse.swt.widgets.TableColumn;
55
import org.eclipse.swt.widgets.TableItem;
56
import org.eclipse.swt.widgets.Text;
57
import org.eclipse.tptp.platform.probekit.builder.ProbeNature;
58
import org.eclipse.tptp.platform.probekit.launch.internal.config.ProbePropertiesUI;
59
import org.eclipse.tptp.platform.probekit.launch.internal.config.ProbekitLaunchMessages;
60
import org.eclipse.tptp.platform.probekit.registry.ProbeRegistry;
61
import org.eclipse.tptp.platform.probekit.registry.ProbeRegistryEntry;
62
import org.eclipse.tptp.platform.probekit.util.ProbeLaunchConfigString;
63
import org.eclipse.ui.PlatformUI;
64
import org.eclipse.ui.plugin.AbstractUIPlugin;
65
/**
66
 * A class to isolate the shared UI code for both the JVMPI and JVMTI
67
 * dynamic probekit profiling launch configurations. This was created in TPTP
68
 * 4.4 in order to support the JVMTI launch configuration without duplicating 
69
 * the UI code.
70
 * 
71
 * @author ldancy
72
 *
73
 */
74
public class ProbekitLaunchUI implements SelectionListener
75
{ 
76
	private Composite _form;
77
78
	private  Table _tblProbeSets;
79
80
	private Button _refreshData;
81
 
82
	private ProbePropertiesUI _propertiesUI;
83
84
	private Text _lblTitle;
85
86
	private TabFolder _folder;
87
88
	private ProfilingSetsManagerCopy _managerCopy;
89
90
	private ProbeRegistry _registry  ;
91
92
	private IDialogSettings _settings;
93
94
	private String _warning;
95
	
96
	private String _description = ""; // Non-NLS
97
98
	protected HashMap _mapProbeFilters;
99
100
	protected Map _filterSetsCopy;
101
102
	private final static int PROBE_NAME_INDEX = 0;
103
104
	private final static int PROBE_PREFILTERED_INDEX = 1;
105
106
	private final static int PROBE_IMPORTED_INDEX = 2;
107
108
	private final static int PROBE_ID_INDEX = 3;
109
110
	public final static String PROBE_LAUNCH_SELECTION_ATTRIBUTE_STRING = "org.eclipse.tptp.platform.probekit.launch.internal.PROBEUI"; //$NON-NLS-1$
111
112
	public final static String PROBE_LAUNCH_SETOPTION_ATTRIBUTE_PREFIX = "SETOPTION_"; //$NON-NLS-1$
113
114
	public final String PROBE_LAUNCH_UNIQUE_PROBESPEC_SUFFIX = "PROBEUI"; 
115
	//$NON-NLS-1$
116
	
117
	/**
118
	 * Constructor to create a ProbekitLaunchUI for a JVMTI or JVMPI launch
119
	 * configuration. Added for enahncement 141540
120
	 * Liz Dancy
121
	 */
122
	public ProbekitLaunchUI()
123
	{
124
		_registry = ProbeRegistry.getRegistry();
125
126
		AbstractUIPlugin plugin = (AbstractUIPlugin) ProbekitLaunchPlugin
127
				.getDefault();
128
		IDialogSettings workbenchSettings = plugin.getDialogSettings();
129
		IDialogSettings section = workbenchSettings
130
				.getSection("ProbeLaunchDialog");//$NON-NLS-1$
131
		if (section == null) {
132
			section = workbenchSettings.addNewSection("ProbeLaunchDialog");//$NON-NLS-1$
133
		}
134
		_settings = section;
135
136
137
		_mapProbeFilters = new HashMap();
138
		_filterSetsCopy = new HashMap();
139
140
		_warning = new String(ProbekitLaunchMessages._18); //$NON-NLS-1$
141
	}
142
	
143
	
144
	
145
	public Composite CreateControl(Composite parent, ProfilingSetsManagerCopy config, boolean enabled)
146
	{
147
		
148
		_form = new Composite(parent, SWT.NULL);
149
		GridData data = GridUtil.createFill();
150
		_form.setLayoutData(data);
151
152
		GridLayout layout = new GridLayout();
153
		layout.numColumns = 2;
154
		_form.setLayout(layout);
155
156
		_lblTitle = new Text(_form, SWT.LEFT /* | SWT.BORDER */| SWT.READ_ONLY);
157
		GridData gd = new GridData(GridData.FILL_HORIZONTAL);
158
		gd.grabExcessHorizontalSpace = true;
159
		gd.horizontalSpan = 2;
160
		_lblTitle.setLayoutData(gd);
161
162
		Composite childTop = new Composite(_form, SWT.NONE);
163
		data = GridUtil.createVerticalFill();
164
		data.widthHint = 200;
165
		childTop.setLayoutData(data);
166
167
		layout = new GridLayout();
168
		layout.numColumns = 1;
169
		childTop.setLayout(layout);
170
171
		// _lblTitle.setFont(JFaceResources.getBannerFont());
172
		Font font = _lblTitle.getFont();
173
		if (font != null) 
174
		{
175
			FontData[] fonts = font.getFontData();
176
			if (fonts != null && fonts.length >= 1) 
177
			{
178
				// Maintain consistency with built-in Hyades profiling type UIs
179
				// while still inheriting system font
180
				_lblTitle.setFont(new Font(Display.getDefault(), fonts[0]
181
				    .getName(), fonts[0].getHeight() + 3, SWT.BOLD));
182
			}
183
		}
184
		_lblTitle.setText(ProbekitLaunchMessages._25); //$NON-NLS-1$
185
186
		_tblProbeSets = new Table(childTop, SWT.CHECK | SWT.SINGLE
187
				| SWT.FULL_SELECTION | SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL);
188
		data = GridUtil.createFill();
189
		_tblProbeSets.setLayoutData(data);
190
191
		_refreshData = new Button(childTop, SWT.PUSH);
192
		_refreshData.setText(ProbekitLaunchMessages._1);
193
		_refreshData.addSelectionListener(this);
194
195
		// new Label(childTop, SWT.NULL);
196
197
		TableLayout layoutTable = new TableLayout();
198
		layoutTable.addColumnData(new ColumnPixelData(170, true));
199
		_tblProbeSets.setLayout(layoutTable);
200
		_tblProbeSets.setHeaderVisible(true);
201
202
		// begin adding columns
203
		TableColumn tc1 = new TableColumn(_tblProbeSets, SWT.LEFT);
204
		tc1.setText(ProbekitLaunchMessages._21); //$NON-NLS-1$
205
		// end adding columns
206
207
		populateTableFromRegistry();
208
209
		_tblProbeSets.addListener(SWT.Selection, new Listener() 
210
		{
211
			
212
			public void handleEvent(Event event) 
213
			{
214
				if (event.item instanceof TableItem) 
215
				{
216
					ProbeRegistryEntry entry = (ProbeRegistryEntry) event.item
217
						.getData();
218
					if (entry != null) 
219
					{
220
						_propertiesUI.updateWidgetValues(entry);
221
						// commented out for bugzilla_145401
222
						// _filtersUI.updateWidgetValues(entry);
223
224
						int index = _tblProbeSets
225
							.indexOf((TableItem) event.item);
226
						_tblProbeSets.setSelection(index);
227
					}
228
				}
229
			}
230
		});
231
232
		Composite childBottom = new Composite(_form, SWT.NONE);
233
		data = GridUtil.createFill();
234
235
		childBottom.setLayoutData(data);
236
	
237
		layout = new GridLayout();
238
		layout.numColumns = 1;
239
		layout.marginHeight = 0;
240
		childBottom.setLayout(layout);
241
242
		// _folder = new CTabFolder(childBottom, SWT.BORDER);
243
		_folder = new TabFolder(childBottom, SWT.TOP);
244
		data = GridUtil.createFill();
245
		// bugzilla_145401 required the uncommenting of this code
246
		data.heightHint = 320;
247
		data.grabExcessHorizontalSpace = true;
248
		_folder.setLayoutData(data);
249
	
250
		TabItem item = new TabItem(_folder, SWT.NONE);
251
		item.setText(ProbekitLaunchMessages._20); //$NON-NLS-1$
252
		_propertiesUI = new ProbePropertiesUI();
253
		item.setControl(_propertiesUI.createControl(_folder));
254
		if (_tblProbeSets.getItemCount() == 0) 
255
		{
256
			// Display text pointing user to import
257
			_propertiesUI.showHint(true);
258
		}
259
260
		item.setImage(ProbekitLaunchImages.INSTANCE
261
			.getImage(ProbekitLaunchImages.IMG_PROP));
262
263
		_folder.setSelection(0);
264
	
265
		// commented out for bugzilla_145401
266
		// TabItem item2 = new TabItem(_folder, SWT.NONE);
267
		// item2.setText(ProbekitLaunchMessages._19); //$NON-NLS-1$
268
		// _filtersUI = new ProbeFiltersUI();
269
		// item2.setControl(_propertiesUI.createControl(_folder));
270
		// item2.setImage(ProbekitLaunchImages.INSTANCE.getImage(ProbekitLaunchImages.IMG_FILTER));
271
	
272
		if (config != null) 
273
		{
274
			_managerCopy = config;
275
		} 
276
		else 
277
		{
278
			_managerCopy = new ProfilingSetsManagerCopy();
279
		}
280
		initializeValues(config);
281
	
282
283
		int sel = _tblProbeSets.getSelectionIndex();
284
		if (sel != -1) 
285
		{
286
			ProbeRegistryEntry entry = (ProbeRegistryEntry) _tblProbeSets
287
				.getItem(sel).getData();
288
		if (entry != null) 
289
		{
290
			_propertiesUI.updateWidgetValues(entry);
291
		}
292
		}
293
294
		_tblProbeSets.setFocus();
295
		
296
		return _form;
297
	}
298
299
	protected void initializeValues(ProfilingSetsManagerCopy config) 
300
	{
301
		int iNumProbeSets = _tblProbeSets.getItemCount();
302
		TableItem[] items = _tblProbeSets.getItems();
303
304
		Map configAttributes = config.getDefaultSet().getAttributes();
305
		int index = 0;
306
		String strName = ProbeLaunchConfigString.LAUNCH_CONFIG_NAME_PREFIX
307
				+ PROBE_LAUNCH_UNIQUE_PROBESPEC_SUFFIX + index;
308
		ProfilingAttribute attribute = (ProfilingAttribute) configAttributes
309
				.get(strName);
310
		while (attribute != null) 
311
		{
312
			// String strCheckedCount = attribute.getValue();
313
			// int iCheckedCount = Integer.parseInt(strCheckedCount);
314
			// for (int i = 0; i < iCheckedCount; i++)
315
			// {
316
			// attribute = (ProfilingAttribute)
317
			// configAttributes.get("com.ibm.rational.pd.probekit.PROBEKIT_ID" +
318
			// i);
319
			String strValue = attribute.getValue();
320
			ProbeLaunchConfigString probeConfig = ProbeLaunchConfigString
321
					.fromString(strValue);
322
			// if (attribute != null)
323
			if (probeConfig != null) 
324
			{
325
				// String strProbeKitID = attribute.getValue();
326
				String strProbeKitID = probeConfig.getRegistryId();
327
				for (int j = 0; j < iNumProbeSets; j++) 
328
				{
329
					ProbeRegistryEntry entry = (ProbeRegistryEntry) items[j]
330
							.getData();
331
					if (entry != null) 
332
					{
333
						String strEntryID = entry.getId();
334
						if (strEntryID.equals(strProbeKitID)) 
335
						{
336
							items[j].setChecked(true);
337
338
							break;
339
						}
340
					}
341
				}
342
			}
343
344
			index++;
345
346
			strName = ProbeLaunchConfigString.LAUNCH_CONFIG_NAME_PREFIX
347
					+ PROBE_LAUNCH_UNIQUE_PROBESPEC_SUFFIX + index;
348
			attribute = (ProfilingAttribute) configAttributes.get(strName);
349
			// }
350
		}
351
	}
352
	
353
	public void widgetSelected(SelectionEvent e) 
354
	{
355
		final ArrayList list = new ArrayList();
356
		IProject[] projects = ResourcesPlugin.getWorkspace().getRoot()
357
				.getProjects();
358
		for (int idx = 0; idx < projects.length; idx++) 
359
		{
360
			try {
361
				IProject project = projects[idx];
362
				if (project.isOpen() && project.hasNature(JavaCore.NATURE_ID)
363
						&& !project.hasNature(ProbeNature.NATURE_NAME)) {
364
					IJavaProject jProject = JavaCore.create(project);
365
					Object[] resources = jProject.getNonJavaResources();
366
367
					boolean hasProbe = false;
368
					int i = 0;
369
					while (i < resources.length && !hasProbe) 
370
					{
371
						String extension = ((IResource) resources[i])
372
								.getFileExtension();
373
						if (extension != null && (extension.equals("probe"))) 
374
						{
375
							hasProbe = true;
376
						}
377
						i++;
378
379
					}
380
381
					if (hasProbe) 
382
					{
383
						list.add(project);
384
						continue;
385
					}
386
387
					List sources = JavaUtil.getSourceContainerEntries(jProject);
388
					i = 0;
389
					while (i < sources.size() && !hasProbe) 
390
					{
391
						IPath path = ((IClasspathEntry) sources.get(i))
392
								.getPath();
393
						IFolder folder = ResourcesPlugin.getWorkspace()
394
								.getRoot().getFolder(path);
395
						resources = folder.members();
396
						int j = 0;
397
						while (!hasProbe && j < resources.length) {
398
399
							String extension = ((IResource) resources[j])
400
									.getFileExtension();
401
							if (extension != null
402
									&& (extension.equals("probe") || extension
403
											.equals("probescript"))) 
404
							{
405
								hasProbe = true;
406
							}
407
							j++;
408
						}
409
410
						i++;
411
					}
412
413
					if (hasProbe)
414
						list.add(project);
415
				}
416
			} 
417
			catch (Exception exc) 
418
			{
419
				
420
			}
421
422
		}
423
	}
424
		
425
		public void widgetDefaultSelected(SelectionEvent e) 
426
		{
427
			//Does not need to be implemented
428
		}
429
		
430
		public void populateTableFromRegistry() 
431
		{
432
			_tblProbeSets.removeAll();
433
			_mapProbeFilters.clear();
434
			_registry = null;
435
436
			if (_registry == null) 
437
			{
438
				_registry = ProbeRegistry.getRegistry();
439
			}
440
441
			if (_registry != null) 
442
			{
443
				// Enumeration iter = _registry.contents();
444
				ProbeRegistryEntry[] probes = getProbesSortedByName();
445
				// while (iter.hasMoreElements())
446
				for (int i = 0; i < probes.length; i++) 
447
				{
448
					ProbeRegistryEntry probeEntry = probes[i];
449
					TableItem item = new TableItem(_tblProbeSets, SWT.NONE);
450
451
					// Name
452
					item.setText(PROBE_NAME_INDEX, probeEntry.getName());
453
454
					// Pre-filtered
455
					if (probeEntry.hasTargets()) 
456
					{
457
						item.setText(PROBE_PREFILTERED_INDEX,
458
								ProbekitLaunchMessages._7); //$NON-NLS-1$
459
					} 
460
					else 
461
					{
462
						item.setText(PROBE_PREFILTERED_INDEX,
463
								ProbekitLaunchMessages._8); //$NON-NLS-1$					
464
					}
465
466
					// /RATLC00379812 - Probekit launch UI needs to be updated to
467
					// support 2-tier filtering.
468
					// Build map for tracking filter selection with initial default
469
					// values
470
					// (later updated with any saved settings)
471
					_mapProbeFilters.put(probeEntry.getId(), null);// "D", ""
472
473
					// Imported
474
					if (probeEntry.isAuthored()) 
475
					{
476
						item.setText(PROBE_IMPORTED_INDEX,
477
								ProbekitLaunchMessages._8); //$NON-NLS-1$
478
					} else 
479
					{
480
						item.setText(PROBE_IMPORTED_INDEX,
481
								ProbekitLaunchMessages._7); //$NON-NLS-1$
482
					}
483
					// ID
484
					item.setText(PROBE_ID_INDEX, probeEntry.getId());
485
486
					// Data
487
					item.setData(probeEntry);
488
				}
489
			}
490
		}
491
		/**
492
		 * Returns the set of Probes sorted alphabetically by name
493
		 * These values are taken from the ProbeRegistry
494
		 * @return
495
		 */
496
		public ProbeRegistryEntry[] getProbesSortedByName() 
497
		{
498
			Collection probes = new ArrayList();
499
			Iterator iter = _registry.iterator();
500
			while (iter.hasNext()) 
501
			{
502
				ProbeRegistryEntry entry = (ProbeRegistryEntry) iter.next();
503
				probes.add(entry);
504
			}
505
506
			ProbeRegistryEntry[] sortedProbes = new ProbeRegistryEntry[probes
507
					.size()];
508
			probes.toArray(sortedProbes);
509
			Arrays.sort(sortedProbes, new Comparator() 
510
			{
511
				public int compare(Object obj1, Object obj2) 
512
				{
513
					ProbeRegistryEntry probe1 = (ProbeRegistryEntry) obj1;
514
					ProbeRegistryEntry probe2 = (ProbeRegistryEntry) obj2;
515
					return probe1.getName().compareTo(probe2.getName());
516
				}
517
			});
518
519
			return sortedProbes;
520
		}
521
		
522
		public String validateConfiguration(ProfilingSetsManagerCopy managerCopy) 
523
		{
524
			// RATLC00379729 - we should warn, if Probe insertion has no probe
525
			// selected or has no probe import.
526
			int iSelectedProbes = 0;
527
			int iAvailableProbes = _tblProbeSets.getItemCount();
528
			if (iAvailableProbes > 0) {
529
				TableItem[] items = _tblProbeSets.getItems();
530
				for (int i = 0; i < iAvailableProbes; i++) {
531
					if (items[i].getChecked()) {
532
						iSelectedProbes++;
533
					}
534
				}
535
			}
536
537
			if (iAvailableProbes == 0 || iSelectedProbes == 0) {
538
				return _warning;
539
			} else {
540
				return null;
541
			}
542
		}
543
		
544
		
545
		
546
		public void saveSelections() {
547
		
548
			int indexSelection =_tblProbeSets.getSelectionIndex();
549
550
			if (indexSelection >= 0) {
551
				TableItem tableItem = _tblProbeSets.getItem(indexSelection);
552
				if (tableItem != null) {
553
					ProbeRegistryEntry entry = (ProbeRegistryEntry) tableItem
554
							.getData();
555
					if (entry != null) {
556
						String strID = entry.getId();
557
						if (_settings != null) {
558
							// Store table selection
559
							_settings.put("ProbeTableSelection", strID); //$NON-NLS-1$
560
						}
561
					}
562
				}
563
			} else {
564
				if (_settings != null) {
565
					_settings.put("ProbeTableSelection", ""); //$NON-NLS-1$ //$NON-NLS-2$
566
				}
567
			}
568
569
			
570
			TabItem[] item = _folder.getSelection();
571
			if (item[0] != null) {
572
				String strName = item[0].getText();
573
				if (_settings != null) {
574
					// Store folder selection
575
					_settings.put("ProbeFolderSelection", strName); //$NON-NLS-1$
576
				}
577
			} else {
578
				_settings.put("ProbeFolderSelection", ""); //$NON-NLS-1$ //$NON-NLS-2$
579
			}
580
			
581
		}
582
		
583
		public String getDescription(ProfilingSetsManagerCopy config) {
584
			
585
			String strDelim = "\n"; //$NON-NLS-1$
586
			String strIndent = "    "; //$NON-NLS-1$
587
588
			// Empty previous description
589
			_description = ""; //$NON-NLS-1$
590
591
			if (_registry == null) {
592
				_registry = ProbeRegistry.getRegistry();
593
			}
594
595
			if (config != null && config.getDefaultSet() != null) {
596
				int index = 0;
597
				String strName = ProbeLaunchConfigString.LAUNCH_CONFIG_NAME_PREFIX
598
						+ PROBE_LAUNCH_UNIQUE_PROBESPEC_SUFFIX + index;
599
600
				Map configAttributes = config.getDefaultSet().getAttributes();
601
				ProfilingAttribute attribute = (ProfilingAttribute) configAttributes
602
						.get(strName);
603
604
				while (attribute != null) {
605
					String strValue = attribute.getValue();
606
					ProbeLaunchConfigString probeString = ProbeLaunchConfigString
607
							.fromString(strValue);
608
609
					String strProbeID = probeString.getRegistryId();
610
611
					if (strProbeID != null && strProbeID.length() > 0) {
612
						if (_registry != null) {
613
							ProbeRegistryEntry probeEntry = _registry
614
									.lookupById(strProbeID);
615
616
							if (probeEntry != null) {
617
								String strProbeName = probeEntry.getName();
618
619
								if (strProbeName != null) {
620
									_description = _description + strIndent
621
											+ strProbeName + strDelim;
622
								}
623
							}
624
						}
625
					}
626
627
					index++;
628
					strName = ProbeLaunchConfigString.LAUNCH_CONFIG_NAME_PREFIX
629
							+ PROBE_LAUNCH_UNIQUE_PROBESPEC_SUFFIX + index;
630
					attribute = (ProfilingAttribute) configAttributes.get(strName);
631
				}
632
			}
633
634
			if (_description != null && _description.length() > 0) {
635
				// Remove extra new-line at end of string
636
				int iLastNewLineIndex = _description.lastIndexOf(strDelim);
637
				if (iLastNewLineIndex >= 0) {
638
					_description = _description.substring(0, iLastNewLineIndex);
639
				}
640
			} else {
641
				// Return null instead of zero-length string to prevent blank line
642
				// _description = null;
643
				_description = strIndent + ProbekitLaunchMessages._28; //$NON-NLS-1$
644
			}
645
646
			return _description;
647
		}
648
649
		
650
		/**
651
		 * Accessor and mutator methods for fields in the UI
652
		 * Necssary so that the PI and TI-specific methods can access these fields
653
		 * @return
654
		 */
655
		public Table getProbeSets(){
656
			return _tblProbeSets;
657
		}
658
		public ProfilingSetsManagerCopy getManager(){
659
			return _managerCopy;
660
		}
661
		public ProbeRegistry getRegistry(){
662
			return _registry;
663
		}
664
		
665
		public IDialogSettings getSettings(){
666
			return _settings;
667
		}
668
		
669
		public void setSettings(IDialogSettings givenSettings){
670
			_settings = givenSettings;
671
		}
672
	
673
}
(-)src/org/eclipse/tptp/trace/ui/internal/launcher/core/messages.properties (+2 lines)
Lines 44-49 Link Here
44
ERROR_LOG_DISCOVER_FILTER			= The filter set is invalid.  Make sure that the agent name and visibility columns have valid values and don't contain characters ; or ,
44
ERROR_LOG_DISCOVER_FILTER			= The filter set is invalid.  Make sure that the agent name and visibility columns have valid values and don't contain characters ; or ,
45
ERROR_LOG_DISCOVER_NO_FILTER		= There must at least be one filter entry
45
ERROR_LOG_DISCOVER_NO_FILTER		= There must at least be one filter entry
46
46
47
ERROR_NO_PROBES_SELECTED			=No probes are selected for probe insertion
48
47
WARNING_DCM_UNRESOLVED_DELEGATE		= Could not resolve the launch delegate of the data collector {0}.
49
WARNING_DCM_UNRESOLVED_DELEGATE		= Could not resolve the launch delegate of the data collector {0}.
48
WARNING_DCM_FAILED_DELEGATE			= One of the selected launch delegates has failed.
50
WARNING_DCM_FAILED_DELEGATE			= One of the selected launch delegates has failed.
49
51
(-)src/org/eclipse/tptp/trace/ui/internal/launcher/core/DataCollector.java (+1 lines)
Lines 128-133 Link Here
128
		dataCollector.setDefaultAnalysisTypes(defaultAnalysisTypes);
128
		dataCollector.setDefaultAnalysisTypes(defaultAnalysisTypes);
129
		dataCollector.setIcon(icon);
129
		dataCollector.setIcon(icon);
130
		
130
		
131
		
131
		return dataCollector;
132
		return dataCollector;
132
	}
133
	}
133
134
(-)src/org/eclipse/tptp/trace/ui/internal/launcher/core/LauncherMessages.java (+1 lines)
Lines 51-56 Link Here
51
	public static String ERROR_LOG_DISCOVER_FILTER;
51
	public static String ERROR_LOG_DISCOVER_FILTER;
52
	public static String ERROR_LOG_DISCOVER_NO_FILTER;
52
	public static String ERROR_LOG_DISCOVER_NO_FILTER;
53
	
53
	
54
	public static String ERROR_NO_PROBES_SELECTED;
54
	public static String WARNING_DCM_UNRESOLVED_DELEGATE;
55
	public static String WARNING_DCM_UNRESOLVED_DELEGATE;
55
	public static String WARNING_DCM_FAILED_DELEGATE;
56
	public static String WARNING_DCM_FAILED_DELEGATE;
56
	
57
	
(-)src/org/eclipse/tptp/trace/ui/internal/launcher/core/EditOptionDelegate.java (-3 / +14 lines)
Lines 241-246 Link Here
241
		 * <code>isInputProfilingType</code> must be set for this to have any meaning */
241
		 * <code>isInputProfilingType</code> must be set for this to have any meaning */
242
		private ConfigurationPageWrapper dummyConfigurationPage;
242
		private ConfigurationPageWrapper dummyConfigurationPage;
243
		
243
		
244
		private ConfigurationPageWrapper confPageWrapperLastPage;
244
		/**
245
		/**
245
		 * Constructs this wizard based on the input.
246
		 * Constructs this wizard based on the input.
246
		 * 
247
		 * 
Lines 320-331 Link Here
320
		    	if (confPages == null)
321
		    	if (confPages == null)
321
		    		return;
322
		    		return;
322
		    	
323
		    	
323
		    	for (int i = 0; i < confPages.length; i++)
324
		    	for (int i = 0; i < confPages.length -1; i++)
324
		    	{
325
		    	{
325
		    		confPages[i].reset (launchConfigurationWC);
326
		    		confPages[i].reset (launchConfigurationWC);
326
		    		ConfigurationPageWrapper confPageWrapper = new ConfigurationPageWrapper(confPages[i]);
327
		    		ConfigurationPageWrapper confPageWrapper = new ConfigurationPageWrapper(confPages[i]);
327
		    		super.addPage (confPageWrapper);
328
		    		super.addPage (confPageWrapper);
328
		    	}	    		
329
		    	}
330
		    	confPageWrapperLastPage = new ConfigurationPageWrapper(confPages[confPages.length -1]);
331
		    	super.addPage (confPageWrapperLastPage);
329
	    	}
332
	    	}
330
	    }
333
	    }
331
	    
334
	    
Lines 410-416 Link Here
410
				else					
413
				else					
411
				{
414
				{
412
					status = ((IConfiguration)configurationLoader.getConfigurationClass()).finishConfiguration(launchConfigurationWC);
415
					status = ((IConfiguration)configurationLoader.getConfigurationClass()).finishConfiguration(launchConfigurationWC);
413
					
416
				
417
					if (status == false)
418
					{
419
						
420
						confPageWrapperLastPage.setErrorMessage(LauncherMessages.ERROR_NO_PROBES_SELECTED);
421
						
422
					}
423
						IConfigurationPage currentPage = ((IConfiguration)configurationLoader.getConfigurationClass()).getConfigurationPages()[0];
424
						
414
					/* We have to save our changes if we manually constructed the working copy */
425
					/* We have to save our changes if we manually constructed the working copy */
415
					if (isWorkingCopyConstructed && status)
426
					if (isWorkingCopyConstructed && status)
416
						launchConfigurationWC.doSave();
427
						launchConfigurationWC.doSave();
(-)src/org/eclipse/tptp/trace/ui/internal/launcher/application/AbstractConfiguration.java (-1 / +4 lines)
Lines 66-72 Link Here
66
				confPage = null;
66
				confPage = null;
67
			} 
67
			} 
68
			
68
			
69
			if (confPage != null && confPage instanceof IExtendedConfigurationPage)
69
			if (confPage != null && confPage instanceof IExtendedConfigurationPage )
70
				confPageVec.add(confPage);
70
				confPageVec.add(confPage);
71
		}
71
		}
72
		confPageContainer = new IExtendedConfigurationPage[confPageVec.size()];
72
		confPageContainer = new IExtendedConfigurationPage[confPageVec.size()];
Lines 99-108 Link Here
99
	 */
99
	 */
100
	public boolean finishConfiguration(ILaunchConfigurationWorkingCopy workingCopy)
100
	public boolean finishConfiguration(ILaunchConfigurationWorkingCopy workingCopy)
101
	{
101
	{
102
		
102
		/* Give all pages the chance of storing their own attributes */
103
		/* Give all pages the chance of storing their own attributes */
103
		boolean status = true;
104
		boolean status = true;
104
		for (int i = 0; i < confPageContainer.length; i++)
105
		for (int i = 0; i < confPageContainer.length; i++)
106
		{
105
			status = status && confPageContainer[i].storeAttributes(workingCopy);
107
			status = status && confPageContainer[i].storeAttributes(workingCopy);
108
		}
106
		
109
		
107
		return status;
110
		return status;
108
	}
111
	}
(-)src/org/eclipse/hyades/trace/ui/internal/core/TraceProfileUI.java (-5 / +40 lines)
Lines 1-5 Link Here
1
/**********************************************************************
1
/**********************************************************************
2
 * Copyright (c) 2005, 2006 IBM Corporation and others.
2
 * Copyright (c) 2005, 2007 IBM Corporation and others.
3
 * All rights reserved.   This program and the accompanying materials
3
 * All rights reserved.   This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
Lines 65-70 Link Here
65
import org.eclipse.swt.widgets.TabFolder;
65
import org.eclipse.swt.widgets.TabFolder;
66
import org.eclipse.swt.widgets.TabItem;
66
import org.eclipse.swt.widgets.TabItem;
67
import org.eclipse.swt.widgets.Text;
67
import org.eclipse.swt.widgets.Text;
68
import org.eclipse.swt.widgets.Tree;
69
import org.eclipse.swt.widgets.TreeItem;
68
import org.eclipse.tptp.trace.ui.internal.launcher.core.AnalysisType;
70
import org.eclipse.tptp.trace.ui.internal.launcher.core.AnalysisType;
69
import org.eclipse.tptp.trace.ui.internal.launcher.core.AvailabilityTesterDelegate;
71
import org.eclipse.tptp.trace.ui.internal.launcher.core.AvailabilityTesterDelegate;
70
import org.eclipse.tptp.trace.ui.internal.launcher.core.DataCollector;
72
import org.eclipse.tptp.trace.ui.internal.launcher.core.DataCollector;
Lines 266-271 Link Here
266
		checkBoxTreeViewer.getTree().addKeyListener(this);
268
		checkBoxTreeViewer.getTree().addKeyListener(this);
267
		checkBoxTreeViewer.addDoubleClickListener(this);
269
		checkBoxTreeViewer.addDoubleClickListener(this);
268
		
270
		
271
		
269
		/* Create the control buttons */
272
		/* Create the control buttons */
270
		Composite controlButtonComposite = new Composite(treeComposite, SWT.NONE);
273
		Composite controlButtonComposite = new Composite(treeComposite, SWT.NONE);
271
		controlButtonComposite.setLayout(new GridLayout());
274
		controlButtonComposite.setLayout(new GridLayout());
Lines 289-294 Link Here
289
	
292
	
290
	public void checkStateChanged(CheckStateChangedEvent event)
293
	public void checkStateChanged(CheckStateChangedEvent event)
291
	{
294
	{
295
		
292
		Object checkedElement = event.getElement();
296
		Object checkedElement = event.getElement();
293
		if (checkedElement instanceof DataCollector) 
297
		if (checkedElement instanceof DataCollector) 
294
		{
298
		{
Lines 299-304 Link Here
299
			if (event.getChecked())
303
			if (event.getChecked())
300
			{
304
			{
301
				selectedDatacollector = (DataCollector)checkedElement;
305
				selectedDatacollector = (DataCollector)checkedElement;
306
				
302
				deselectTreeItems(checkedElement, selectedDatacollector.getCoexistanceViolators(), 0);
307
				deselectTreeItems(checkedElement, selectedDatacollector.getCoexistanceViolators(), 0);
303
				deselectIndirectViolators(checkedElement, 0);
308
				deselectIndirectViolators(checkedElement, 0);
304
			}
309
			}
Lines 332-337 Link Here
332
			Object childNode;
337
			Object childNode;
333
			if (event.getChecked() && (childNode = ((ParentChildNode)checkedElement).child) instanceof AnalysisType)
338
			if (event.getChecked() && (childNode = ((ParentChildNode)checkedElement).child) instanceof AnalysisType)
334
			{
339
			{
340
				
335
				deselectTreeItems(checkedElement, ((AnalysisType)childNode).getCoexistanceViolators(), 1);
341
				deselectTreeItems(checkedElement, ((AnalysisType)childNode).getCoexistanceViolators(), 1);
336
				deselectIndirectViolators(checkedElement, 1);
342
				deselectIndirectViolators(checkedElement, 1);
337
			}
343
			}
Lines 538-551 Link Here
538
		checkBoxTreeViewer.setInput(conf);	
544
		checkBoxTreeViewer.setInput(conf);	
539
		getProfilingSetWC().initializeFrom(conf);
545
		getProfilingSetWC().initializeFrom(conf);
540
		
546
		
547
		
548
		
549
		
541
		/* Try to restore the previous selection for the configuration */
550
		/* Try to restore the previous selection for the configuration */
542
		boolean isConfigurationNew = false;
551
		boolean isConfigurationNew = false;
543
		
552
		
544
		checkBoxTreeViewer.setAllChecked(false);
553
		checkBoxTreeViewer.setAllChecked(false);
554
		
555
		
545
		Hashtable entitySelection = LauncherUtility.unserializeSelection(conf);
556
		Hashtable entitySelection = LauncherUtility.unserializeSelection(conf);
546
		if (entitySelection == null)
557
		if (entitySelection == null){
547
			isConfigurationNew = true;
558
			isConfigurationNew = true;
548
		
559
		}
549
		else
560
		else
550
		{
561
		{
551
			/* Walk through each data collector and select its children */
562
			/* Walk through each data collector and select its children */
Lines 566-573 Link Here
566
					for (int i = 0; i < chilrenCount; changeItemCheckedState (new ParentChildNode(currentDataCollector, selectedChildren.get(i++)), true));										
577
					for (int i = 0; i < chilrenCount; changeItemCheckedState (new ParentChildNode(currentDataCollector, selectedChildren.get(i++)), true));										
567
			}
578
			}
568
		}
579
		}
580
		// added for enhancement 141540 preliminary commit of code. Need to grey out this option until the remainder of the code
581
		// is checked in
582
		// Liz Dancy
583
		try
584
		{
585
			DataCollectorAssociation dataCollectorAssociatorGrey = DataCollectorManager.getInstance().getDataCollectorAssociator(conf.getType().getIdentifier());
586
			DataCollector[] dataCollectorsGrey = dataCollectorAssociatorGrey.getDataCollectors();
569
		
587
		
588
			AnalysisType[] defaultAnalysisTypesGrey = dataCollectorsGrey[1].getApplicableAnalysisTypes();
589
			if (defaultAnalysisTypesGrey != null)
590
				{
591
					ParentChildNode JVMTIProbe = new ParentChildNode(dataCollectorsGrey[1], defaultAnalysisTypesGrey[3]);
592
					checkBoxTreeViewer.setGrayed(JVMTIProbe, true);
593
				}
594
		}
570
		
595
		
596
		catch (Exception e){
597
			
598
		}
571
		/* If the configuration is new then make default selections if the configuration doesn't have an associated
599
		/* If the configuration is new then make default selections if the configuration doesn't have an associated
572
		 * profiling set.  If the configuration happens to have a profiling set, then we'll need to support backward compatibility
600
		 * profiling set.  If the configuration happens to have a profiling set, then we'll need to support backward compatibility
573
		 * and select the profiling types under the profiling set. */
601
		 * and select the profiling types under the profiling set. */
Lines 621-626 Link Here
621
				if (conf instanceof ILaunchConfigurationWorkingCopy)
649
				if (conf instanceof ILaunchConfigurationWorkingCopy)
622
					performApply((ILaunchConfigurationWorkingCopy)conf);
650
					performApply((ILaunchConfigurationWorkingCopy)conf);
623
				
651
				
652
			
653
			
654
			
624
			}
655
			}
625
			catch (Exception e)
656
			catch (Exception e)
626
			{
657
			{
Lines 891-899 Link Here
891
				else if (selection[i] instanceof ParentChildNode)
922
				else if (selection[i] instanceof ParentChildNode)
892
				{
923
				{
893
					Object child = ((ParentChildNode)selection[i]).child;
924
					Object child = ((ParentChildNode)selection[i]).child;
894
					if (child instanceof AnalysisType)
925
					if (child instanceof AnalysisType ){
926
						if (((AnalysisType)child).getId().equals("org.eclipse.tptp.analysisType.jvmti.probe"))
927
						{
928
														isValid=false;
929
						}
895
						launchValidator = ((AnalysisType)child).getValidator();				
930
						launchValidator = ((AnalysisType)child).getValidator();				
896
					
931
					}
897
					/* For backward compatibility */
932
					/* For backward compatibility */
898
					else if (child instanceof ProfilingSetType)
933
					else if (child instanceof ProfilingSetType)
899
					{
934
					{

Return to bug 141540