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 113166
Collapse All | Expand All

(-)plugin.xml (-1 / +55 lines)
Lines 24-29 Link Here
24
      <import plugin="org.eclipse.hyades.trace.ui"/>
24
      <import plugin="org.eclipse.hyades.trace.ui"/>
25
      <import plugin="org.eclipse.hyades.statistical.ui"/>
25
      <import plugin="org.eclipse.hyades.statistical.ui"/>
26
   </requires>
26
   </requires>
27
   <extension-point id="statAgentInterfaceExtensions" name="Statistical Agents Interface Extensions" schema="schema/statAgentInterfaceExtensions.exsd"/>
27
28
28
29
29
    <extension point="org.eclipse.debug.core.launchConfigurationTypes">
30
    <extension point="org.eclipse.debug.core.launchConfigurationTypes">
Lines 95-101 Link Here
95
	         </view>         	         
96
	         </view>         	         
96
    	</perspectiveExtension>
97
    	</perspectiveExtension>
97
	 </extension>
98
	 </extension>
98
	
99
      <extension
100
            point="org.eclipse.hyades.perfmon.statAgentInterfaceExtensions">
101
         <statAgentInterfaceContribution
102
               class="org.eclipse.hyades.perfmon.apache.internal.launchconfig.ApacheTabInterface"
103
               extension="org.eclipse.hyades.perfmon.apache.internal.launchconfig.ApacheTabInterface"
104
               id="org.eclipse.hyades.perfmon.apache.internal.launchconfig.ApacheTabInterface"
105
               name="%APACHE_UI_AGENT_NAME"
106
               icon="icons/full/obj16/server_obj.gif"/>
107
      </extension>  
108
      <extension
109
            point="org.eclipse.hyades.perfmon.statAgentInterfaceExtensions">
110
         <statAgentInterfaceContribution
111
               class="org.eclipse.hyades.perfmon.jboss.internal.launchconfig.JBossTabInterface"
112
               extension="org.eclipse.hyades.perfmon.jboss.internal.launchconfig.JBossTabInterface"
113
               id="org.eclipse.hyades.perfmon.jboss.internal.launchconfig.JBossTabInterface"
114
               name="%JBOSS_UI_AGENT_NAME"
115
               icon="icons/full/obj16/server_obj.gif"/>
116
      </extension> 
117
      <extension
118
            point="org.eclipse.hyades.perfmon.statAgentInterfaceExtensions">
119
         <statAgentInterfaceContribution
120
               class="org.eclipse.hyades.perfmon.jonas.internal.launchconfig.JonasTabInterface"
121
               extension="org.eclipse.hyades.perfmon.jonas.internal.launchconfig.JonasTabInterface"
122
               id="org.eclipse.hyades.perfmon.jonas.internal.launchconfig.JonasTabInterface"
123
               name="%JONAS_UI_AGENT_NAME"
124
               icon="icons/full/obj16/server_obj.gif"/>
125
      </extension>     
126
      <extension
127
            point="org.eclipse.hyades.perfmon.statAgentInterfaceExtensions">
128
         <statAgentInterfaceContribution
129
               class="org.eclipse.hyades.perfmon.linux.internal.launchconfig.LinuxTabInterface"
130
               extension="org.eclipse.hyades.perfmon.linux.internal.launchconfig.LinuxTabInterface"
131
               id="org.eclipse.hyades.perfmon.linux.internal.launchconfig.LinuxTabInterface"
132
               name="%LINUX_UI_AGENT_NAME"
133
               icon="icons/full/obj16/host_obj.gif"/>
134
      </extension>  
135
      <extension
136
            point="org.eclipse.hyades.perfmon.statAgentInterfaceExtensions">
137
         <statAgentInterfaceContribution
138
               class="org.eclipse.hyades.perfmon.mysql.internal.launchconfig.MySQLTabInterface"
139
               extension="org.eclipse.hyades.perfmon.mysql.internal.launchconfig.MySQLTabInterface"
140
               id="org.eclipse.hyades.perfmon.mysql.internal.launchconfig.MySQLTabInterface"
141
               name="%MYSQL_UI_AGENT_NAME"
142
               icon="icons/full/obj16/server_obj.gif"/>
143
      </extension>    
144
      <extension
145
            point="org.eclipse.hyades.perfmon.statAgentInterfaceExtensions">
146
         <statAgentInterfaceContribution
147
               class="org.eclipse.hyades.perfmon.perfmon.internal.launchconfig.PerfmonTabInterface"
148
               extension="org.eclipse.hyades.perfmon.perfmon.internal.launchconfig.PerfmonTabInterface"
149
               id="org.eclipse.hyades.perfmon.perfmon.internal.launchconfig.PerfmonTabInterface"
150
               name="%PERFMON_UI_AGENT_NAME"
151
               icon="icons/full/obj16/host_obj.gif"/>
152
      </extension>     
99
153
100
</plugin>
154
</plugin>
101
155
(-)src/org/eclipse/hyades/perfmon/ImageManager.java (+41 lines)
Lines 12-18 Link Here
12
12
13
package org.eclipse.hyades.perfmon;
13
package org.eclipse.hyades.perfmon;
14
14
15
import java.net.MalformedURLException;
16
import java.net.URL;
17
15
import org.eclipse.hyades.perfmon.utils.internal.BaseImageManager;
18
import org.eclipse.hyades.perfmon.utils.internal.BaseImageManager;
19
import org.eclipse.hyades.ui.HyadesUIPlugin;
20
import org.eclipse.jface.resource.ImageDescriptor;
21
import org.osgi.framework.Bundle;
16
22
17
public class ImageManager extends BaseImageManager 
23
public class ImageManager extends BaseImageManager 
18
{
24
{
Lines 53-57 Link Here
53
        add(FOLDER_PERFMON,IMG_AGENT);
59
        add(FOLDER_PERFMON,IMG_AGENT);
54
        add(FOLDER_PERFMON,IMG_FOLDER);
60
        add(FOLDER_PERFMON,IMG_FOLDER);
55
        add(FOLDER_PERFMON,IMG_OPTIONS);
61
        add(FOLDER_PERFMON,IMG_OPTIONS);
62
	}
63
	
64
	/**
65
	 * Returns an ImageDescriptor whose path relative to the plugin described 
66
	 * by <code>pluginDescriptor</code> is <code>subdirectoryAndFilename</code>.
67
	 * Returns <code>null</code>if no image could be found.
68
	 *
69
	 * <p>This method is convenience and only intended for use by the workbench 
70
	 * because it explicitly uses the workbench's registry for caching/retrieving 
71
	 * images from other extensions -- other plugins must user their own registry. 
72
	 * This convenience method is subject to removal.
73
	 *
74
	 * <p>Note: subdirectoryAndFilename must not have any leading "." or path 
75
	 * separators / or \ ISV's should use icons/mysample.gif and not 
76
	 * ./icons/mysample.gif.
77
	 *
78
	 * <p>Note:  This consults the plugin for extension and obtains its installation 
79
	 * location.  All requested images are assumed to be in a directory below and 
80
	 * relative to that plugins installation directory.
81
	 */
82
	public static ImageDescriptor getImageDescriptorFromPlugin(Bundle pluginBundle, String subdirectoryAndFilename)
83
	{
84
		URL path = pluginBundle.getEntry("/");
85
		URL fullPathString = null;
86
		try
87
		{
88
			fullPathString = new URL(path,subdirectoryAndFilename);
89
			return ImageDescriptor.createFromURL(fullPathString);
90
		}
91
		catch (MalformedURLException e)
92
		{
93
			HyadesUIPlugin.logError(e);
94
		}
95
		
96
		return null;
56
	}	
97
	}	
57
}
98
}
(-)src/org/eclipse/hyades/perfmon/PerfmonPlugin.java (-1 / +57 lines)
Lines 17-23 Link Here
17
import java.util.ResourceBundle;
17
import java.util.ResourceBundle;
18
18
19
import org.eclipse.core.runtime.Platform;
19
import org.eclipse.core.runtime.Platform;
20
import org.eclipse.core.runtime.Status;
20
import org.eclipse.hyades.perfmon.utils.internal.Debugger;
21
import org.eclipse.hyades.perfmon.utils.internal.Debugger;
22
import org.eclipse.hyades.ui.HyadesUIPlugin;
21
import org.eclipse.ui.IWorkbench;
23
import org.eclipse.ui.IWorkbench;
22
import org.eclipse.ui.IWorkbenchPage;
24
import org.eclipse.ui.IWorkbenchPage;
23
import org.eclipse.ui.PlatformUI;
25
import org.eclipse.ui.PlatformUI;
Lines 29-44 Link Here
29
public class PerfmonPlugin extends AbstractUIPlugin 
31
public class PerfmonPlugin extends AbstractUIPlugin 
30
{		
32
{		
31
	public static String DATACOLLECTION_NODE_ID = "org.eclipse.hyades.perfmon.datacollection";
33
	public static String DATACOLLECTION_NODE_ID = "org.eclipse.hyades.perfmon.datacollection";
34
35
	public static final String PLUGIN_ID = "org.eclipse.hyades.perfmon"; //$NON-NLS-1$	
36
	
32
	public static Debugger DBG = new Debugger("org.eclipse.hyades.perfmon");
37
	public static Debugger DBG = new Debugger("org.eclipse.hyades.perfmon");
33
	
38
	
39
	public static String EP_STATISTICAL_AGENTS_GUI = "statAgentInterfaceExtensions";
40
	
34
	//The shared instance.
41
	//The shared instance.
35
	private static PerfmonPlugin plugin;
42
	private static PerfmonPlugin plugin;
36
	//Resource bundle.
43
	//Resource bundle.
37
	private static ResourceBundle resourceBundle;
44
	private static ResourceBundle resourceBundle;
38
	
45
	
39
	public static ImageManager img = new ImageManager();
46
	public static ImageManager img = new ImageManager();
40
47
	
41
	String infopops_id = null;
48
	String infopops_id = null;
49
42
	
50
	
43
	public String getInfopopsId() 
51
	public String getInfopopsId() 
44
	{
52
	{
Lines 171-176 Link Here
171
        }
179
        }
172
        return resourceBundle;
180
        return resourceBundle;
173
    }
181
    }
182
    
183
    
184
	/**
185
	 * Returns the instance of this class created by the eclipse framework.
186
	 * @return PermonPlugin
187
	 */
188
	public static PerfmonPlugin getInstance()
189
	{
190
		return plugin;
191
	}
192
	
193
	/**
194
	 * Logs an error described by a throwable.
195
	 * 
196
	 * <p>This method should be used whenever a class in this plugin
197
	 * has to log an error since it adheres to the global logging
198
	 * strategy.
199
	 * 
200
	 * @param throwable
201
	 */
202
	public static void logError(Throwable throwable)
203
	{
204
		Status status = new Status(1, getID(), 0, throwable.toString(), throwable);
205
		getInstance().getLog().log(status);
206
	}
207
	
208
	/**
209
	 * Logs an error described by a text.
210
	 * 
211
	 * <p>This method should be whenever a class in this plugin
212
	 * has to log an error since it adheres to the global logging
213
	 * strategy.
214
	 * 
215
	 * @param text
216
	 */
217
	public static void logError(String text)
218
	{
219
		logError(new Throwable(text));
220
	}    
174
	
221
	
175
	/**
222
	/**
176
	 * Returns the string value associate to a given key.  The key is passed to
223
	 * Returns the string value associate to a given key.  The key is passed to
Lines 203-206 Link Here
203
			return key;
250
			return key;
204
		}	
251
		}	
205
	}
252
	}
253
	
254
	/**
255
	 * Returns this plugin's id.
256
	 * @return String
257
	 */
258
	public static String getID()
259
	{
260
		return PLUGIN_ID;
261
	}	
206
}
262
}
(-)src/org/eclipse/hyades/perfmon/apache/internal/launchconfig/ApacheTabInterface.java (-10 lines)
Lines 30-45 Link Here
30
    String errorMessage = null;
30
    String errorMessage = null;
31
    
31
    
32
    AgentVariable urlVar = new AgentVariable(PerfmonPlugin.getString("APACHE_UI_URL_NAME"),PerfmonPlugin.getString("APACHE_UI_URL_DESCRIPTION"),PerfmonPlugin.getString("APACHE_UI_URL_DEFAULT"));    
32
    AgentVariable urlVar = new AgentVariable(PerfmonPlugin.getString("APACHE_UI_URL_NAME"),PerfmonPlugin.getString("APACHE_UI_URL_DESCRIPTION"),PerfmonPlugin.getString("APACHE_UI_URL_DEFAULT"));    
33
    
34
    public String getUIAgentName()
35
    {
36
        return PerfmonPlugin.getString("APACHE_UI_AGENT_NAME");
37
    }
38
39
    public Image getUIAgentImage()
40
    {
41
        return PerfmonPlugin.img.getImage(ImageManager.IMG_PERFMON_SERVER);
42
    }
43
33
44
    public String getACAgentName()
34
    public String getACAgentName()
45
    {
35
    {
(-)src/org/eclipse/hyades/perfmon/common/internal/launch/AgentInterface.java (-3 lines)
Lines 14-25 Link Here
14
14
15
import org.eclipse.debug.core.ILaunchConfiguration;
15
import org.eclipse.debug.core.ILaunchConfiguration;
16
import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
16
import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
17
import org.eclipse.swt.graphics.Image;
18
17
19
public interface AgentInterface
18
public interface AgentInterface
20
{    
19
{    
21
    public String getUIAgentName();
22
    public Image getUIAgentImage();    
23
    public String getACAgentName();            
20
    public String getACAgentName();            
24
    public void setDefaults(ILaunchConfigurationWorkingCopy configuration);
21
    public void setDefaults(ILaunchConfigurationWorkingCopy configuration);
25
    public void initializeFrom(ILaunchConfiguration configuration);
22
    public void initializeFrom(ILaunchConfiguration configuration);
(-)src/org/eclipse/hyades/perfmon/common/internal/launch/AgentsTab.java (-21 / +11 lines)
Lines 12-19 Link Here
12
12
13
package org.eclipse.hyades.perfmon.common.internal.launch;
13
package org.eclipse.hyades.perfmon.common.internal.launch;
14
14
15
import java.util.ArrayList;
16
17
import org.eclipse.core.runtime.CoreException;
15
import org.eclipse.core.runtime.CoreException;
18
import org.eclipse.debug.core.ILaunchConfiguration;
16
import org.eclipse.debug.core.ILaunchConfiguration;
19
import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
17
import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
Lines 41-52 Link Here
41
        Table agentTable;
39
        Table agentTable;
42
    
40
    
43
    public static final String AGENT_NAME = "ATTR_AGENT_NAME";
41
    public static final String AGENT_NAME = "ATTR_AGENT_NAME";
42
43
	private StatisticalAgentTabGroup group;
44
    
44
    
45
    ArrayList agentList = new ArrayList();
45
    public AgentsTab(StatisticalAgentTabGroup group)
46
    
47
    public AgentsTab()
48
    {
46
    {
49
        super();
47
        super();
48
        this.group = group;
50
        HostAgentUpdater.INSTANCE.addListener(this);
49
        HostAgentUpdater.INSTANCE.addListener(this);
51
        this.setMessage(null);
50
        this.setMessage(null);
52
    }
51
    }
Lines 59-75 Link Here
59
    
58
    
60
    public Image getImage()
59
    public Image getImage()
61
    {
60
    {
61
    	
62
        return PerfmonPlugin.img.getImage(ImageManager.IMG_AGENT);
62
        return PerfmonPlugin.img.getImage(ImageManager.IMG_AGENT);
63
    }
63
    }
64
    
64
    
65
    private void addAgents()
65
    public void addAgents()
66
    {
66
    {
67
        for (int i=0; i<agentList.size();i++)
67
        for (int i=0; i<group.getAgents().length;i++)
68
        {
68
        {
69
            AgentInterface agent = (AgentInterface) agentList.get(i);
69
            AgentInterface agent = group.getAgents()[i];
70
            TableItem item = new TableItem(agentTable, SWT.NONE);
70
            TableItem item = new TableItem(agentTable, SWT.NONE);
71
            item.setText(agent.getUIAgentName());
71
            item.setText(group.getAgentNames()[i]);
72
            item.setImage(agent.getUIAgentImage());
72
            item.setImage(group.getAgentImage(i));
73
            item.setData(agent);
73
            item.setData(agent);
74
        }
74
        }
75
    }
75
    }
Lines 155-171 Link Here
155
    {
155
    {
156
        return PerfmonPlugin.getString("LAUNCH_CONFIG_AGENT_TAB");
156
        return PerfmonPlugin.getString("LAUNCH_CONFIG_AGENT_TAB");
157
	}
157
	}
158
    
158
159
    public void addAgent(AgentInterface agent)
160
    {
161
        agentList.add(agent);
162
    }
163
    
164
    public void clearAgentList()
165
    {
166
        agentList.clear();
167
    }
168
    
169
    public void widgetSelected(SelectionEvent event)
159
    public void widgetSelected(SelectionEvent event)
170
    {
160
    {
171
        TableItem item = (TableItem) event.item;
161
        TableItem item = (TableItem) event.item;
(-)src/org/eclipse/hyades/perfmon/common/internal/launch/StatisticalAgentTabGroup.java (-26 / +90 lines)
Lines 13-54 Link Here
13
package org.eclipse.hyades.perfmon.common.internal.launch;
13
package org.eclipse.hyades.perfmon.common.internal.launch;
14
14
15
import java.util.ArrayList;
15
import java.util.ArrayList;
16
import java.util.List;
16
17
18
import org.eclipse.core.runtime.IConfigurationElement;
19
import org.eclipse.core.runtime.IExtension;
20
import org.eclipse.core.runtime.Platform;
17
import org.eclipse.debug.ui.AbstractLaunchConfigurationTabGroup;
21
import org.eclipse.debug.ui.AbstractLaunchConfigurationTabGroup;
18
import org.eclipse.debug.ui.CommonTab;
22
import org.eclipse.debug.ui.CommonTab;
19
import org.eclipse.debug.ui.ILaunchConfigurationDialog;
23
import org.eclipse.debug.ui.ILaunchConfigurationDialog;
20
import org.eclipse.debug.ui.ILaunchConfigurationTab;
24
import org.eclipse.debug.ui.ILaunchConfigurationTab;
21
import org.eclipse.hyades.perfmon.apache.internal.launchconfig.ApacheTabInterface;
25
import org.eclipse.hyades.perfmon.ImageManager;
22
import org.eclipse.hyades.perfmon.jboss.internal.launchconfig.JBossTabInterface;
26
import org.eclipse.hyades.perfmon.PerfmonPlugin;
23
import org.eclipse.hyades.perfmon.jonas.internal.launchconfig.JonasTabInterface;
27
import org.eclipse.hyades.ui.internal.util.UIUtil;
24
import org.eclipse.hyades.perfmon.linux.internal.launchconfig.LinuxTabInterface;
28
import org.eclipse.jface.resource.ImageDescriptor;
25
import org.eclipse.hyades.perfmon.mysql.internal.launchconfig.MySQLTabInterface;
29
import org.eclipse.jface.resource.ImageRegistry;
26
import org.eclipse.hyades.perfmon.perfmon.internal.launchconfig.PerfmonTabInterface;
30
import org.eclipse.swt.graphics.Image;
27
31
28
public class StatisticalAgentTabGroup extends AbstractLaunchConfigurationTabGroup 
32
public class StatisticalAgentTabGroup extends AbstractLaunchConfigurationTabGroup 
29
{
33
{
30
    public static ArrayList agentTabList = new ArrayList();
34
	
31
    
35
	public StatisticalAgentTabGroup() {
32
    static
36
		super();
33
    { 
37
		loadStatAgentInterfaceList();
34
        agentTabList.add(new PerfmonTabInterface());
38
	}
35
        agentTabList.add(new LinuxTabInterface());
39
	
36
        agentTabList.add(new JBossTabInterface());        
37
        agentTabList.add(new JonasTabInterface());
38
        agentTabList.add(new ApacheTabInterface());
39
        agentTabList.add(new MySQLTabInterface());        
40
    }
41
    
42
    public static AgentInterface getInterface(String UIName)
40
    public static AgentInterface getInterface(String UIName)
43
    {
41
    {
44
        for (int i=0; i<agentTabList.size(); i++)
42
        for (int i=0; i<agents.length; i++)
45
        {
43
        {
46
            AgentInterface inter = (AgentInterface) agentTabList.get(i);
44
            AgentInterface inter = agents[i];
47
            if (inter.getUIAgentName().equals(UIName))
45
            if (agentNames[i].equals(UIName))
48
                return inter;
46
                return inter;
49
        }
47
        }
50
        return null;
48
        return null;
51
    }
49
    }
50
    
51
    private static AgentInterface[] agents  = null;
52
    private static String[] agentNames  = null;   
53
    private static Image[] agentImages = null;    
54
    
55
    public void loadStatAgentInterfaceList() {  	
56
    		IExtension[] exts = Platform.getExtensionRegistry().getExtensionPoint(PerfmonPlugin.getID(), PerfmonPlugin.EP_STATISTICAL_AGENTS_GUI).getExtensions();
57
    		List agentList = new ArrayList();
58
    		List agentNamesList = new ArrayList();    		
59
    		List agentIconsList = new ArrayList();     		
60
			ImageRegistry reg = PerfmonPlugin.getInstance().getImageRegistry();    		
61
    		for (int i=0;i<exts.length;++i) {
62
    			IConfigurationElement[] elements = exts[i].getConfigurationElements();
63
    			for (int j=0;j<elements.length;++j) {
64
    				if ("statAgentInterfaceContribution".equals(elements[j].getName())) {
65
    					//String id = elements[j].getAttribute("id");
66
    						try {
67
    							String className = elements[j].getAttribute("class");
68
    							String name = elements[j].getAttribute("name");
69
    							String iconKey = elements[j].getAttribute("icon");    							
70
    							Class classObj = Platform.getBundle(exts[i].getNamespace()).loadClass(className);
71
    							agentList.add(classObj.newInstance());
72
    							agentNamesList.add(name);
73
    							Image icon = null;
74
    							if (iconKey == null)
75
    								icon = PerfmonPlugin.img.getImage(ImageManager.IMG_PERFMON_SERVER);
76
    							else {
77
    							icon = reg.get(iconKey);
78
    							if (icon == null){
79
    								ImageDescriptor imageDescriptor = ImageManager.getImageDescriptorFromPlugin(Platform.getBundle(elements[j].getDeclaringExtension().getNamespace()), iconKey);
80
    								if(imageDescriptor != null)
81
    									reg.put(iconKey, imageDescriptor);
82
        							icon = reg.get(iconKey);
83
    								
84
    							}
85
    							}
86
    							
87
    							agentIconsList.add(icon);
88
    						}
89
    						catch (Exception e) {
90
    							PerfmonPlugin.logError(e);
91
    						}
92
    					
93
    				}
94
    			}
95
    		}
96
    		agents = new AgentInterface[agentList.size()];    		
97
    		agentList.toArray(agents);
98
    		agentNames = new String[agentList.size()];
99
    		agentNamesList.toArray(agentNames);
100
    		agentImages = new Image[agentList.size()];
101
    		agentIconsList.toArray(agentImages);
102
    	}   	
103
    
52
                   
104
                   
53
	public void createTabs(ILaunchConfigurationDialog dialog, String mode) 
105
	public void createTabs(ILaunchConfigurationDialog dialog, String mode) 
54
	{
106
	{
Lines 56-67 Link Here
56
        
108
        
57
        tabs.add(new HostTab());        
109
        tabs.add(new HostTab());        
58
        
110
        
59
        AgentsTab agentstab = new AgentsTab();
111
        AgentsTab agentstab = new AgentsTab(this);
60
        AgentInfoTab agentInfoTab = new AgentInfoTab();
112
        AgentInfoTab agentInfoTab = new AgentInfoTab();
61
        for (int i=0; i<agentTabList.size(); i++)
62
        {
63
            agentstab.addAgent((AgentInterface) agentTabList.get(i));
64
        }
65
                
113
                
66
		tabs.add(agentstab);
114
		tabs.add(agentstab);
67
        tabs.add(agentInfoTab);
115
        tabs.add(agentInfoTab);
Lines 77-80 Link Here
77
	public void dispose() 
125
	public void dispose() 
78
    {
126
    {
79
	}
127
	}
128
129
130
	public String[] getAgentNames() {
131
		return agentNames;
132
	}
133
134
135
	public AgentInterface[] getAgents() {
136
		if (agents == null) loadStatAgentInterfaceList();
137
		return agents;
138
	}
139
140
141
	public Image getAgentImage(int i) {
142
		return agentImages[i];
143
	}
80
}
144
}
(-)src/org/eclipse/hyades/perfmon/jboss/internal/launchconfig/JBossTabInterface.java (-10 lines)
Lines 32-47 Link Here
32
    
32
    
33
    AgentVariable hostVar = new AgentVariable(PerfmonPlugin.getString("JBOSS_UI_HOST_NAME"),PerfmonPlugin.getString("JBOSS_UI_HOST_DESCRIPTION"),PerfmonPlugin.getString("JBOSS_UI_HOST_DEFAULT"));
33
    AgentVariable hostVar = new AgentVariable(PerfmonPlugin.getString("JBOSS_UI_HOST_NAME"),PerfmonPlugin.getString("JBOSS_UI_HOST_DESCRIPTION"),PerfmonPlugin.getString("JBOSS_UI_HOST_DEFAULT"));
34
    AgentVariable portVar = new AgentVariable(PerfmonPlugin.getString("JBOSS_UI_PORT_NAME"),PerfmonPlugin.getString("JBOSS_UI_PORT_DESCRIPTION"),new Integer(PerfmonPlugin.getString("JBOSS_UI_PORT_DEFAULT")));    
34
    AgentVariable portVar = new AgentVariable(PerfmonPlugin.getString("JBOSS_UI_PORT_NAME"),PerfmonPlugin.getString("JBOSS_UI_PORT_DESCRIPTION"),new Integer(PerfmonPlugin.getString("JBOSS_UI_PORT_DEFAULT")));    
35
    
36
    public String getUIAgentName()
37
    {
38
        return PerfmonPlugin.getString("JBOSS_UI_AGENT_NAME");
39
    }
40
41
    public Image getUIAgentImage()
42
    {
43
        return PerfmonPlugin.img.getImage(ImageManager.IMG_PERFMON_SERVER);
44
    }
45
35
46
    public String getACAgentName()
36
    public String getACAgentName()
47
    {
37
    {
(-)src/org/eclipse/hyades/perfmon/jonas/internal/launchconfig/JonasTabInterface.java (-10 lines)
Lines 34-49 Link Here
34
    AgentVariable portVar = new AgentVariable(PerfmonPlugin.getString("JONAS_UI_PORT_NAME"),PerfmonPlugin.getString("JONAS_UI_PORT_DESCRIPTION"),new Integer(PerfmonPlugin.getString("JONAS_UI_PORT_DEFAULT")));
34
    AgentVariable portVar = new AgentVariable(PerfmonPlugin.getString("JONAS_UI_PORT_NAME"),PerfmonPlugin.getString("JONAS_UI_PORT_DESCRIPTION"),new Integer(PerfmonPlugin.getString("JONAS_UI_PORT_DEFAULT")));
35
    
35
    
36
    String errorMessage;
36
    String errorMessage;
37
    
38
    public String getUIAgentName()
39
    {
40
        return PerfmonPlugin.getString("JONAS_UI_AGENT_NAME");
41
    }
42
43
    public Image getUIAgentImage()
44
    {
45
        return PerfmonPlugin.img.getImage(ImageManager.IMG_PERFMON_SERVER);
46
    }
47
37
48
    public String getACAgentName()
38
    public String getACAgentName()
49
    {
39
    {
(-)src/org/eclipse/hyades/perfmon/linux/internal/launchconfig/LinuxTabInterface.java (-10 lines)
Lines 24-39 Link Here
24
24
25
public class LinuxTabInterface implements AgentInterface
25
public class LinuxTabInterface implements AgentInterface
26
{   
26
{   
27
    public String getUIAgentName()
28
    {
29
        return PerfmonPlugin.getString("LINUX_UI_AGENT_NAME");
30
    }
31
32
    public Image getUIAgentImage()
33
    {
34
        return PerfmonPlugin.img.getImage(ImageManager.IMG_PERFMON_HOST);
35
    }
36
37
    public String getACAgentName()
27
    public String getACAgentName()
38
    {
28
    {
39
        return LinuxConstants.RAC_AGENT_PREFIX;
29
        return LinuxConstants.RAC_AGENT_PREFIX;
(-)src/org/eclipse/hyades/perfmon/mysql/internal/launchconfig/MySQLTabInterface.java (-10 lines)
Lines 39-54 Link Here
39
    AgentVariable usernameVar = new AgentVariable(PerfmonPlugin.getString("MYSQL_UI_USERNAME_NAME"),PerfmonPlugin.getString("MYSQL_UI_USERNAME_DESCRIPTION"),PerfmonPlugin.getString("MYSQL_UI_USERNAME_DEFAULT"));    
39
    AgentVariable usernameVar = new AgentVariable(PerfmonPlugin.getString("MYSQL_UI_USERNAME_NAME"),PerfmonPlugin.getString("MYSQL_UI_USERNAME_DESCRIPTION"),PerfmonPlugin.getString("MYSQL_UI_USERNAME_DEFAULT"));    
40
    AgentVariable passwordVar = new AgentVariable(PerfmonPlugin.getString("MYSQL_UI_PASSWORD_NAME"),PerfmonPlugin.getString("MYSQL_UI_PASSWORD_DESCRIPTION"),PerfmonPlugin.getString("MYSQL_UI_PASSWORD_DEFAULT"),true);
40
    AgentVariable passwordVar = new AgentVariable(PerfmonPlugin.getString("MYSQL_UI_PASSWORD_NAME"),PerfmonPlugin.getString("MYSQL_UI_PASSWORD_DESCRIPTION"),PerfmonPlugin.getString("MYSQL_UI_PASSWORD_DEFAULT"),true);
41
    AgentVariable jdbcVar = new AgentVariable(PerfmonPlugin.getString("MYSQL_UI_JDBC_NAME"),PerfmonPlugin.getString("MYSQL_UI_JDBC_DESCRIPTION"),PerfmonPlugin.getString("MYSQL_UI_JDBC_DEFAULT"));    
41
    AgentVariable jdbcVar = new AgentVariable(PerfmonPlugin.getString("MYSQL_UI_JDBC_NAME"),PerfmonPlugin.getString("MYSQL_UI_JDBC_DESCRIPTION"),PerfmonPlugin.getString("MYSQL_UI_JDBC_DEFAULT"));    
42
               
43
    public String getUIAgentName()
44
    {
45
        return PerfmonPlugin.getString("MYSQL_UI_AGENT_NAME");
46
    }
47
48
    public Image getUIAgentImage()
49
    {
50
        return PerfmonPlugin.img.getImage(ImageManager.IMG_PERFMON_SERVER);
51
    }
52
42
53
    public String getACAgentName()
43
    public String getACAgentName()
54
    {
44
    {
(-)src/org/eclipse/hyades/perfmon/perfmon/internal/launchconfig/PerfmonTabInterface.java (-10 lines)
Lines 30-45 Link Here
30
    private String errorMessage;
30
    private String errorMessage;
31
    
31
    
32
    AgentVariable remoteHostVar = new AgentVariable(PerfmonPlugin.getString("PERFMON_REMOTE_HOST_LABEL"),PerfmonPlugin.getString("PERFMON_REMOTE_HOST_DESCRIPTION"),PerfmonPlugin.getString("PERFMON_REMOTE_HOST_DEFAULT"));
32
    AgentVariable remoteHostVar = new AgentVariable(PerfmonPlugin.getString("PERFMON_REMOTE_HOST_LABEL"),PerfmonPlugin.getString("PERFMON_REMOTE_HOST_DESCRIPTION"),PerfmonPlugin.getString("PERFMON_REMOTE_HOST_DEFAULT"));
33
    
34
    public String getUIAgentName()
35
    {
36
        return PerfmonPlugin.getString("PERFMON_UI_AGENT_NAME");
37
    }
38
39
    public Image getUIAgentImage()
40
    {
41
        return PerfmonPlugin.img.getImage(ImageManager.IMG_PERFMON_HOST);
42
    }
43
33
44
    public String getACAgentName()
34
    public String getACAgentName()
45
    {
35
    {
(-)schema/statAgentInterfaceExtensions.exsd (+148 lines)
Added Link Here
1
<?xml version='1.0' encoding='UTF-8'?>
2
<!-- Schema file written by PDE -->
3
<schema targetNamespace="org.eclipse.hyades.ui">
4
<annotation>
5
      <appInfo>
6
         <meta.schema plugin="org.eclipse.hyades.ui" id="analyzerExtensions" name="Hyades Analyzer Extensions"/>
7
      </appInfo>
8
      <documentation>
9
         This extension point is used to register TPTP Statistical Agent User Interface extensions.
10
      </documentation>
11
   </annotation>
12
13
   <element name="extension">
14
      <complexType>
15
         <sequence>
16
            <element ref="statAgentInterfaceContribution" minOccurs="0" maxOccurs="unbounded"/>
17
         </sequence>
18
         <attribute name="point" type="string" use="required">
19
            <annotation>
20
               <documentation>
21
                  a fully qualified identifier of the target extension point
22
               </documentation>
23
            </annotation>
24
         </attribute>
25
         <attribute name="name" type="string">
26
            <annotation>
27
               <documentation>
28
                  an optional name of the extension instance
29
               </documentation>
30
            </annotation>
31
         </attribute>
32
         <attribute name="id" type="string">
33
            <annotation>
34
               <documentation>
35
                  an optional identifier of the extension instance
36
               </documentation>
37
            </annotation>
38
         </attribute>
39
      </complexType>
40
   </element>
41
42
   <element name="statAgentInterfaceContribution">
43
      <annotation>
44
         <appInfo>
45
            <meta.element labelAttribute="name"/>
46
         </appInfo>
47
      </annotation>
48
      <complexType>
49
         <attribute name="id" type="string" use="required">
50
            <annotation>
51
               <documentation>
52
                  a unique name that will be used to identify this TPTP Statistical Agent User Interface extension
53
               </documentation>
54
            </annotation>
55
         </attribute>
56
         <attribute name="name" type="string" use="required">
57
            <annotation>
58
               <documentation>
59
                  a translatable name that will be used in the UI for this Hyades analyzer extension
60
               </documentation>
61
            </annotation>
62
         </attribute>
63
         <attribute name="class" type="string" use="required">
64
            <annotation>
65
               <documentation>
66
                  a name of the class that implements &lt;samp&gt;org.eclipse.hyades.perfmon.common.internal.launch.AgentInterface&lt;/samp&gt;.
67
               </documentation>
68
               <appInfo>
69
                  <meta.attribute kind="java" basedOn="org.eclipse.hyades.perfmon.common.internal.launch.AgentInterface"/>
70
               </appInfo>
71
            </annotation>
72
         </attribute>
73
         <attribute name="extension" type="string" use="required">
74
            <annotation>
75
               <documentation>
76
                  identifies the category of objects that this extension point is associated with.  A good example would be the one of the supported Hyades types, such as trace or test.
77
               </documentation>
78
            </annotation>
79
         </attribute>
80
         <attribute name="icon" type="string">
81
            <annotation>
82
               <documentation>
83
                  a relative name of the icon that will be used to describe this TPTP Statistical Agent User Interface extension.
84
               </documentation>
85
               <appInfo>
86
                  <meta.attribute kind="resource"/>
87
               </appInfo>
88
            </annotation>
89
         </attribute>
90
      </complexType>
91
   </element>
92
93
   <annotation>
94
      <appInfo>
95
         <meta.section type="since"/>
96
      </appInfo>
97
      <documentation>
98
         0.0.1
99
      </documentation>
100
   </annotation>
101
102
   <annotation>
103
      <appInfo>
104
         <meta.section type="examples"/>
105
      </appInfo>
106
      <documentation>
107
         &lt;pre&gt;
108
      &lt;extension
109
            point=&quot;org.eclipse.hyades.perfmon.statAgentInterfaceExtensions&quot;&gt;
110
         &lt;statAgentInterfaceContribution
111
class=&quot;org.eclipse.hyades.perfmon.linux.internal.launchconfig.LinuxTabInterface&quot;    extension=&quot;org.eclipse.hyades.perfmon.linux.internal.launchconfig.LinuxTabInterface&quot;
112
id=&quot;org.eclipse.hyades.perfmon.linux.internal.launchconfig.LinuxTabInterface&quot;
113
name=&quot;%LINUX_UI_AGENT_NAME&quot;
114
icon=&quot;icons/full/obj16/host_obj.gif&quot;/&gt;
115
      &lt;/extension&gt;  
116
&lt;/pre&gt;
117
      </documentation>
118
   </annotation>
119
120
   <annotation>
121
      <appInfo>
122
         <meta.section type="apiInfo"/>
123
      </appInfo>
124
      <documentation>
125
         All TPTP Statistical Agent User Interface&apos; classes are instances of &lt;samp&gt;org.eclipse.hyades.perfmon.common.internal.launch.AgentInterface&lt;/samp&gt;.
126
      </documentation>
127
   </annotation>
128
129
   <annotation>
130
      <appInfo>
131
         <meta.section type="implementation"/>
132
      </appInfo>
133
      <documentation>
134
         The TPTP framework itself has a number of pre-defined analyzer extensions. Particular product installs may include additional analyzer extensions as required.
135
      </documentation>
136
   </annotation>
137
138
   <annotation>
139
      <appInfo>
140
         <meta.section type="copyright"/>
141
      </appInfo>
142
      <documentation>
143
         Copyright (c) 2003, 2005 IBM Corporation and others.
144
All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at &lt;a href=&quot;http://www.eclipse.org/legal/epl-v10.html&quot;&gt;http://www.eclipse.org/legal/epl-v10.html&lt;/a&gt;
145
      </documentation>
146
   </annotation>
147
148
</schema>

Return to bug 113166