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 199594 | Differences between
and this patch

Collapse All | Expand All

(-)src/org/eclipse/tptp/platform/jvmti/client/internal/launcher/TIAttachLauncherDelegate.java (-2 / +3 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2006, 2007 IBM Corporation and others.
2
 * Copyright (c) 2006, 2008 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 23-28 Link Here
23
import org.eclipse.hyades.trace.ui.internal.launcher.IProfileLaunchConfigurationConstants;
23
import org.eclipse.hyades.trace.ui.internal.launcher.IProfileLaunchConfigurationConstants;
24
import org.eclipse.hyades.trace.ui.internal.launcher.SelectedAgent;
24
import org.eclipse.hyades.trace.ui.internal.launcher.SelectedAgent;
25
import org.eclipse.tptp.platform.common.ui.internal.CommonUIConstants;
25
import org.eclipse.tptp.platform.common.ui.internal.CommonUIConstants;
26
import org.eclipse.tptp.platform.common.ui.internal.CommonUIPlugin;
26
import org.eclipse.tptp.platform.common.ui.trace.internal.CommonUITraceConstants;
27
import org.eclipse.tptp.platform.common.ui.trace.internal.CommonUITraceConstants;
27
import org.eclipse.tptp.platform.execution.client.agent.IAgent;
28
import org.eclipse.tptp.platform.execution.client.agent.IAgent;
28
import org.eclipse.tptp.platform.execution.client.agent.ICollector;
29
import org.eclipse.tptp.platform.execution.client.agent.ICollector;
Lines 83-89 Link Here
83
	public void preLaunch(ILaunchConfiguration configuration, String mode, ILaunch launch, IProgressMonitor monitor) throws CoreException
84
	public void preLaunch(ILaunchConfiguration configuration, String mode, ILaunch launch, IProgressMonitor monitor) throws CoreException
84
	{		
85
	{		
85
		String hostName = configuration.getAttribute(IProfileLaunchConfigurationConstants.ATTR_HOSTNAME, CommonUITraceConstants.LOCAL_HOST);
86
		String hostName = configuration.getAttribute(IProfileLaunchConfigurationConstants.ATTR_HOSTNAME, CommonUITraceConstants.LOCAL_HOST);
86
		int port = configuration.getAttribute(IProfileLaunchConfigurationConstants.ATTR_PORT, UIPlugin.getDefault().getPreferenceStore().getDefaultInt(CommonUIConstants.LOCALHOST_PORT));
87
		int port = configuration.getAttribute(IProfileLaunchConfigurationConstants.ATTR_PORT, CommonUIPlugin.getDefault().getPreferenceStore().getDefaultInt(CommonUIConstants.LOCALHOST_PORT));
87
		
88
		
88
		try
89
		try
89
		{
90
		{
(-)src/org/eclipse/tptp/platform/jvmti/client/internal/launcher/AgentAvailibilityTester.java (-3 / +3 lines)
Lines 1-5 Link Here
1
 /**********************************************************************
1
 /**********************************************************************
2
 * Copyright (c) 2006, 2007 IBM Corporation and others.
2
 * Copyright (c) 2006, 2008 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 14-24 Link Here
14
import org.eclipse.core.runtime.IStatus;
14
import org.eclipse.core.runtime.IStatus;
15
import org.eclipse.core.runtime.Status;
15
import org.eclipse.core.runtime.Status;
16
import org.eclipse.debug.core.ILaunchConfiguration;
16
import org.eclipse.debug.core.ILaunchConfiguration;
17
import org.eclipse.hyades.trace.ui.UIPlugin;
18
import org.eclipse.hyades.trace.ui.internal.launcher.IProfileLaunchConfigurationConstants;
17
import org.eclipse.hyades.trace.ui.internal.launcher.IProfileLaunchConfigurationConstants;
19
import org.eclipse.jface.preference.IPreferenceStore;
18
import org.eclipse.jface.preference.IPreferenceStore;
20
import org.eclipse.osgi.util.NLS;
19
import org.eclipse.osgi.util.NLS;
21
import org.eclipse.tptp.platform.common.ui.internal.CommonUIConstants;
20
import org.eclipse.tptp.platform.common.ui.internal.CommonUIConstants;
21
import org.eclipse.tptp.platform.common.ui.internal.CommonUIPlugin;
22
import org.eclipse.tptp.platform.execution.client.agent.ICollector;
22
import org.eclipse.tptp.platform.execution.client.agent.ICollector;
23
import org.eclipse.tptp.platform.execution.client.core.IAgentController;
23
import org.eclipse.tptp.platform.execution.client.core.IAgentController;
24
import org.eclipse.tptp.platform.execution.client.core.IProcess;
24
import org.eclipse.tptp.platform.execution.client.core.IProcess;
Lines 78-84 Link Here
78
			/* Determine the port number from the preference page if it's not stored as part of the configuration */
78
			/* Determine the port number from the preference page if it's not stored as part of the configuration */
79
			if (port == -1)
79
			if (port == -1)
80
			{
80
			{
81
				IPreferenceStore store = UIPlugin.getDefault().getPreferenceStore();					
81
				IPreferenceStore store = CommonUIPlugin.getDefault().getPreferenceStore();					
82
				port = store.getInt(CommonUIConstants.LOCALHOST_PORT);
82
				port = store.getInt(CommonUIConstants.LOCALHOST_PORT);
83
			}
83
			}
84
		} catch (CoreException e)
84
		} catch (CoreException e)
(-)plugin.xml (-1 / +5 lines)
Lines 28-35 Link Here
28
	<!-- The host preference page -->
28
	<!-- The host preference page -->
29
	<extension point="org.eclipse.ui.preferencePages">
29
	<extension point="org.eclipse.ui.preferencePages">
30
		<page
30
		<page
31
            class="org.eclipse.hyades.trace.ui.internal.preferences.ACPreferencePage"
32
            id="org.eclipse.hyades.trace.ui.internal.preferences.ACPreferencePage"
33
            name="%P_NODE"/>		
34
		<page
31
			name="%P_NODEP"
35
			name="%P_NODEP"
32
            category="org.eclipse.hyades.trace.ui.internal.preferences.TraceBasePreferencePage"
36
            category="org.eclipse.hyades.trace.ui.internal.preferences.ACPreferencePage"
33
            class="org.eclipse.hyades.trace.ui.internal.preferences.HostPreferencePage"
37
            class="org.eclipse.hyades.trace.ui.internal.preferences.HostPreferencePage"
34
            id="org.eclipse.hyades.trace.ui.internal.preferences.HostPreferencePage">
38
            id="org.eclipse.hyades.trace.ui.internal.preferences.HostPreferencePage">
35
		</page>     
39
		</page>     
(-)plugin.properties (+1 lines)
Lines 15-19 Link Here
15
plugin.name=TPTP Common UI Trace Plug-in
15
plugin.name=TPTP Common UI Trace Plug-in
16
plugin.provider=Eclipse.org
16
plugin.provider=Eclipse.org
17
17
18
P_NODE                          = Agent Controller
18
P_NODEP                         = Hosts
19
P_NODEP                         = Hosts
19
TRC_LGNW                        = Profiling and Logging
20
TRC_LGNW                        = Profiling and Logging
(-)src/org/eclipse/tptp/platform/common/ui/trace/internal/CommonUITracePlugin.java (-1 / +1 lines)
Lines 89-95 Link Here
89
	{		
89
	{		
90
		/* Default hosts */
90
		/* Default hosts */
91
		store.setDefault(CommonUIConstants.HOST_KEY,"localhost:10002");
91
		store.setDefault(CommonUIConstants.HOST_KEY,"localhost:10002");
92
		store.setDefault(CommonUIConstants.LOCALHOST_PORT, "10002");
92
//		store.setDefault(CommonUIConstants.LOCALHOST_PORT, "10002");
93
		
93
		
94
		/* Trace options */
94
		/* Trace options */
95
		store.setDefault(CommonUITraceConstants.TRACE_PROJECT_NAME, CommonUITraceMessages.TRC_LOCD);
95
		store.setDefault(CommonUITraceConstants.TRACE_PROJECT_NAME, CommonUITraceMessages.TRC_LOCD);
(-)src/org/eclipse/hyades/trace/ui/internal/preferences/messages.properties (+17 lines)
Added Link Here
1
###############################################################################
2
# Copyright (c) 2008 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
# $Id: ACMessages.properties,v 1.0 2008/04/04 17:22:31 ritwikl Exp $
8
#
9
# Contributors:
10
# IBM Corporation - initial API and implementation
11
###############################################################################
12
13
_1 = Agent Controller Preferences 
14
_2 = Agent Controller local port: 
15
	
16
_3 = Agent Controller port cannot be empty
17
_4 = Invalid port number for Agent Controller
(-)src/org/eclipse/hyades/trace/ui/internal/preferences/ACPreferencePage.java (+182 lines)
Added Link Here
1
/**********************************************************************
2
 * Copyright (c) 2007, 2008 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
 * $Id: ACPreferencePage.java,v 1.1 2007/04/19 19:35:37 nmehrega Exp $
8
 * 
9
 * Contributors: 
10
 * IBM - Initial API and implementation
11
 **********************************************************************/
12
13
package org.eclipse.hyades.trace.ui.internal.preferences;
14
15
import org.eclipse.hyades.ui.util.GridUtil;
16
import org.eclipse.jface.dialogs.Dialog;
17
import org.eclipse.jface.preference.IPreferenceStore;
18
import org.eclipse.jface.preference.PreferencePage;
19
import org.eclipse.swt.SWT;
20
import org.eclipse.swt.events.ModifyEvent;
21
import org.eclipse.swt.events.ModifyListener;
22
import org.eclipse.swt.layout.GridData;
23
import org.eclipse.swt.layout.GridLayout;
24
import org.eclipse.swt.widgets.Composite;
25
import org.eclipse.swt.widgets.Control;
26
import org.eclipse.swt.widgets.Group;
27
import org.eclipse.swt.widgets.Label;
28
import org.eclipse.swt.widgets.Text;
29
import org.eclipse.tptp.platform.common.ui.internal.CommonUIConstants;
30
import org.eclipse.tptp.platform.common.ui.internal.CommonUIPlugin;
31
import org.eclipse.ui.IWorkbench;
32
import org.eclipse.ui.IWorkbenchPreferencePage;
33
import org.eclipse.ui.PlatformUI;
34
35
public class ACPreferencePage extends PreferencePage
36
	implements IWorkbenchPreferencePage, ModifyListener {
37
	
38
	private IPreferenceStore store = CommonUIPlugin.getDefault().getPreferenceStore(); 
39
	private Text _localPort;
40
    
41
    
42
	public Composite createControls(Composite parent)
43
	{
44
		GridLayout layout;
45
		GridData data;
46
		
47
		Composite content = new Composite(parent, SWT.NONE);
48
		layout = new GridLayout();
49
		layout.numColumns = 1;
50
		layout.verticalSpacing = 10;
51
		content.setLayout(layout);
52
		content.setLayoutData(GridUtil.createFill()); 
53
		
54
		Group profilingInfo = new Group(content, SWT.NULL);
55
		profilingInfo.setText(ACPrefMessages._1);	
56
		layout = new GridLayout();
57
		layout.numColumns = 2;
58
		profilingInfo.setLayout(layout);
59
		profilingInfo.setLayoutData(GridUtil.createHorizontalFill());
60
		
61
		Label portdesc = new Label(profilingInfo, SWT.NULL);
62
		portdesc.setText(ACPrefMessages._2);
63
		_localPort = new Text(profilingInfo, SWT.BORDER);
64
		data = GridUtil.createHorizontalFill();
65
		_localPort.setLayoutData(data);
66
		_localPort.addModifyListener(this);
67
		
68
		initializeValues();
69
		
70
		Dialog.applyDialogFont( content );
71
		
72
		return content;  
73
	}
74
	
75
	private void initializeValues()
76
	{
77
		store = CommonUIPlugin.getDefault().getPreferenceStore();
78
		setLocalHostPort(store.getString(CommonUIConstants.LOCALHOST_PORT));
79
	}
80
81
82
	public String getLocalPortNumber() {
83
		return _localPort.getText().trim();
84
	}
85
	
86
	public void setLocalHostPort(String portNum)
87
	{
88
		_localPort.setText(portNum);
89
	}
90
	
91
	public void modifyText(ModifyEvent e)
92
	{
93
		if (e.widget == _localPort)
94
		{
95
			try
96
			{
97
				if (_localPort.getText().trim() == "")
98
				{
99
					setErrorMessage(ACPrefMessages._3);
100
					return;
101
				}
102
				
103
				int value = Integer.parseInt(_localPort.getText().trim());
104
				if (value<0)
105
				{
106
					setErrorMessage(ACPrefMessages._4);
107
					_localPort.setFocus();
108
					return;
109
				}
110
				setErrorMessage(null);
111
			}
112
			catch (NumberFormatException nfe)
113
			{
114
				if (this != null)
115
					setErrorMessage(ACPrefMessages._4);
116
					_localPort.setFocus();
117
			}
118
		}
119
	}
120
121
	/* (non-Javadoc)
122
	 * @see org.eclipse.ui.IWorkbenchPreferencePage#init(org.eclipse.ui.IWorkbench)
123
	 */
124
	public void init(IWorkbench workbench) {
125
        // Do nothing
126
	}
127
128
	public Control createContents(Composite parent) {
129
130
		Composite comp = new Composite( parent, SWT.NONE );
131
		
132
		PlatformUI.getWorkbench().getHelpSystem().setHelp(
133
				parent,
134
				CommonUIPlugin.getID()+".tbpp0000");
135
				
136
		GridLayout layout= new GridLayout();
137
		layout.marginWidth= 0;
138
		layout.marginHeight= 5;	
139
		layout.numColumns= 1;		
140
		comp.setLayout(layout);
141
		
142
		createControls(comp);
143
144
		Dialog.applyDialogFont( comp );
145
		
146
		return comp;
147
	}
148
	
149
	/**
150
	 * Initializes states of the controls using default values
151
	 * in the preference store.
152
	 */
153
	private void initializeDefaults()
154
	{
155
		setLocalHostPort(store.getDefaultString(CommonUIConstants.LOCALHOST_PORT));
156
	}
157
	/**
158
	 * Does anything necessary because the default button has been pressed.
159
	 */
160
	protected void performDefaults() {
161
		initializeDefaults();
162
	}
163
	/**
164
	 * Do anything necessary because the OK button has been pressed.
165
	 *
166
	 * @return whether it is okay to close the preference page
167
	 */
168
	public boolean performOk() {
169
		storeValues();
170
		CommonUIPlugin.getDefault().savePluginPreferences();
171
		return true;
172
	}
173
	
174
	/**
175
	 * Stores the values of the controls back to the preference store.
176
	 */
177
	private void storeValues()
178
	{		
179
		store.setValue(CommonUIConstants.LOCALHOST_PORT, this.getLocalPortNumber());	
180
	}
181
}
182
(-)src/org/eclipse/hyades/trace/ui/internal/preferences/ACPrefMessages.java (+34 lines)
Added Link Here
1
/**********************************************************************
2
 * Copyright (c) 2008 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
 * $Id: ACPrefMessages.java,v 1.0 2008/04/04 17:20:37 ritwikl Exp $
8
 * 
9
 * Contributors: 
10
 * IBM - Initial API and implementation
11
 **********************************************************************/
12
13
package org.eclipse.hyades.trace.ui.internal.preferences;
14
15
import org.eclipse.osgi.util.NLS;
16
17
public class ACPrefMessages extends NLS {
18
	protected static final String BUNDLE_NAME = "org.eclipse.hyades.trace.ui.internal.preferences.messages"; //$NON-NLS-1$
19
	
20
	protected ACPrefMessages() {
21
	}
22
23
	static {
24
		// initialize resource bundle
25
		NLS.initializeMessages(BUNDLE_NAME, ACPrefMessages.class);
26
	}
27
	
28
	public static String _1;
29
	public static String _2;
30
	
31
	public static String _3;
32
	public static String _4;
33
34
}
(-)src/org/eclipse/tptp/platform/profile/server/wst/internal/ApplicationServerListener.java (-1 / +2 lines)
Lines 19-24 Link Here
19
import org.eclipse.jface.dialogs.MessageDialog;
19
import org.eclipse.jface.dialogs.MessageDialog;
20
import org.eclipse.swt.widgets.Display;
20
import org.eclipse.swt.widgets.Display;
21
import org.eclipse.tptp.platform.common.ui.internal.CommonUIConstants;
21
import org.eclipse.tptp.platform.common.ui.internal.CommonUIConstants;
22
import org.eclipse.tptp.platform.common.ui.internal.CommonUIPlugin;
22
import org.eclipse.tptp.platform.profile.server.wst.internal.reflect.EclipseClass;
23
import org.eclipse.tptp.platform.profile.server.wst.internal.reflect.EclipseClass;
23
import org.eclipse.tptp.platform.profile.server.wst.internal.reflect.LinkageException;
24
import org.eclipse.tptp.platform.profile.server.wst.internal.reflect.LinkageException;
24
import org.eclipse.wst.server.core.IServer;
25
import org.eclipse.wst.server.core.IServer;
Lines 60-66 Link Here
60
            String hostname = server.getHost();
61
            String hostname = server.getHost();
61
            
62
            
62
            //213367
63
            //213367
63
            int port = wc.getAttribute(IProfileLaunchConfigurationConstants.ATTR_PORT, UIPlugin.getDefault().getPreferenceStore().getInt(CommonUIConstants.LOCALHOST_PORT));       	    
64
            int port = wc.getAttribute(IProfileLaunchConfigurationConstants.ATTR_PORT, CommonUIPlugin.getDefault().getPreferenceStore().getInt(CommonUIConstants.LOCALHOST_PORT));       	    
64
            Class profileOnServerAdapter = EclipseClass.findClass("org.eclipse.tptp.platform.profile.server.core",
65
            Class profileOnServerAdapter = EclipseClass.findClass("org.eclipse.tptp.platform.profile.server.core",
65
                "org.eclipse.tptp.platform.profile.server.core.internal.ProfileOnServerAdapter");
66
                "org.eclipse.tptp.platform.profile.server.core.internal.ProfileOnServerAdapter");
66
            EclipseClass.invokeStatic(profileOnServerAdapter, "attachToAgents",
67
            EclipseClass.invokeStatic(profileOnServerAdapter, "attachToAgents",
(-)src-common-internal/org/eclipse/tptp/platform/common/ui/internal/CommonUIPlugin.java (+1 lines)
Lines 255-260 Link Here
255
255
256
	protected void initializeDefaultPreferences(IPreferenceStore store) {
256
	protected void initializeDefaultPreferences(IPreferenceStore store) {
257
	 	store.setDefault(HyadesUI.SWITCH_TO_PERSPECTIVE_KEY, MessageDialogWithToggle.PROMPT);		
257
	 	store.setDefault(HyadesUI.SWITCH_TO_PERSPECTIVE_KEY, MessageDialogWithToggle.PROMPT);		
258
		store.setDefault(CommonUIConstants.LOCALHOST_PORT, "10002");
258
	}
259
	}
259
	
260
	
260
	public static void log(Throwable e) {
261
	public static void log(Throwable e) {
(-)src/org/eclipse/hyades/trace/ui/internal/core/TraceProfileUI.java (-1 / +2 lines)
Lines 62-67 Link Here
62
import org.eclipse.swt.widgets.Text;
62
import org.eclipse.swt.widgets.Text;
63
import org.eclipse.swt.widgets.TreeItem;
63
import org.eclipse.swt.widgets.TreeItem;
64
import org.eclipse.tptp.platform.common.ui.internal.CommonUIConstants;
64
import org.eclipse.tptp.platform.common.ui.internal.CommonUIConstants;
65
import org.eclipse.tptp.platform.common.ui.internal.CommonUIPlugin;
65
import org.eclipse.tptp.platform.common.ui.trace.internal.CommonUITraceConstants;
66
import org.eclipse.tptp.platform.common.ui.trace.internal.CommonUITraceConstants;
66
import org.eclipse.tptp.trace.ui.internal.launcher.core.AnalysisType;
67
import org.eclipse.tptp.trace.ui.internal.launcher.core.AnalysisType;
67
import org.eclipse.tptp.trace.ui.internal.launcher.core.AvailabilityTesterDelegate;
68
import org.eclipse.tptp.trace.ui.internal.launcher.core.AvailabilityTesterDelegate;
Lines 568-574 Link Here
568
		try
569
		try
569
		{
570
		{
570
			String currentHost = conf.getAttribute(IProfileLaunchConfigurationConstants.ATTR_HOSTNAME, CommonUITraceConstants.LOCAL_HOST);
571
			String currentHost = conf.getAttribute(IProfileLaunchConfigurationConstants.ATTR_HOSTNAME, CommonUITraceConstants.LOCAL_HOST);
571
			int currentPort = conf.getAttribute(IProfileLaunchConfigurationConstants.ATTR_PORT, UIPlugin.getDefault().getPreferenceStore().getDefaultInt(CommonUIConstants.LOCALHOST_PORT));
572
			int currentPort = conf.getAttribute(IProfileLaunchConfigurationConstants.ATTR_PORT, CommonUIPlugin.getDefault().getPreferenceStore().getDefaultInt(CommonUIConstants.LOCALHOST_PORT));
572
			
573
			
573
			
574
			
574
			ConnectUtil connect = new ConnectUtil( currentHost, ""+currentPort,null);
575
			ConnectUtil connect = new ConnectUtil( currentHost, ""+currentPort,null);
(-)src/org/eclipse/hyades/trace/ui/internal/core/TraceOptionsUI.java (-52 / +2 lines)
Lines 1-5 Link Here
1
/**********************************************************************
1
/**********************************************************************
2
 * Copyright (c) 2005, 2007 IBM Corporation and others.
2
 * Copyright (c) 2005, 2008 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 22-29 Link Here
22
import org.eclipse.jface.preference.IPreferenceStore;
22
import org.eclipse.jface.preference.IPreferenceStore;
23
import org.eclipse.jface.preference.PreferencePage;
23
import org.eclipse.jface.preference.PreferencePage;
24
import org.eclipse.swt.SWT;
24
import org.eclipse.swt.SWT;
25
import org.eclipse.swt.events.ModifyEvent;
26
import org.eclipse.swt.events.ModifyListener;
27
import org.eclipse.swt.events.SelectionEvent;
25
import org.eclipse.swt.events.SelectionEvent;
28
import org.eclipse.swt.events.SelectionListener;
26
import org.eclipse.swt.events.SelectionListener;
29
import org.eclipse.swt.layout.GridData;
27
import org.eclipse.swt.layout.GridData;
Lines 33-39 Link Here
33
import org.eclipse.swt.widgets.Group;
31
import org.eclipse.swt.widgets.Group;
34
import org.eclipse.swt.widgets.Label;
32
import org.eclipse.swt.widgets.Label;
35
import org.eclipse.swt.widgets.Text;
33
import org.eclipse.swt.widgets.Text;
36
import org.eclipse.tptp.platform.common.ui.internal.CommonUIConstants;
37
import org.eclipse.tptp.platform.common.ui.internal.CommonUIPlugin;
34
import org.eclipse.tptp.platform.common.ui.internal.CommonUIPlugin;
38
import org.eclipse.tptp.platform.common.ui.trace.internal.CommonUITraceConstants;
35
import org.eclipse.tptp.platform.common.ui.trace.internal.CommonUITraceConstants;
39
import org.eclipse.tptp.platform.common.ui.trace.internal.CommonUITracePlugin;
36
import org.eclipse.tptp.platform.common.ui.trace.internal.CommonUITracePlugin;
Lines 57-63 Link Here
57
* CONTEXT_ID tbpp0006 for Local IBM Remote Agent port number entry field in Profiling(Trace) preference page
54
* CONTEXT_ID tbpp0006 for Local IBM Remote Agent port number entry field in Profiling(Trace) preference page
58
*/
55
*/
59
56
60
public class TraceOptionsUI implements SelectionListener, ModifyListener
57
public class TraceOptionsUI implements SelectionListener 
61
{
58
{
62
	private Button _enableInfoMsg;
59
	private Button _enableInfoMsg;
63
	private Button _enableReloadMsg;
60
	private Button _enableReloadMsg;
Lines 68-74 Link Here
68
	private Button _neverPersp;
65
	private Button _neverPersp;
69
	private Button _promptPersp;
66
	private Button _promptPersp;
70
	private Text _projectName;
67
	private Text _projectName;
71
	private Text _localPort;
72
    private PreferencePage _preferencePage;
68
    private PreferencePage _preferencePage;
73
    
69
    
74
    private Button _manualRefreshBtn;
70
    private Button _manualRefreshBtn;
Lines 118-130 Link Here
118
	data = GridUtil.createHorizontalFill();
114
	data = GridUtil.createHorizontalFill();
119
	_projectName.setLayoutData(data);
115
	_projectName.setLayoutData(data);
120
116
121
	Label portdesc = new Label(profilingInfo, SWT.NULL);
122
	portdesc.setText(UIPlugin.getResourceString(TraceMessages.RAC_LHP));
123
	_localPort = new Text(profilingInfo, SWT.BORDER);
124
	data = GridUtil.createHorizontalFill();
125
	_localPort.setLayoutData(data);
126
	_localPort.addModifyListener(this);
127
128
	_enableInfoMsg = new Button(profilingInfo, SWT.CHECK);
117
	_enableInfoMsg = new Button(profilingInfo, SWT.CHECK);
129
	_enableInfoMsg.setText(UIPlugin.getResourceString(TraceMessages.SP_TIP));
118
	_enableInfoMsg.setText(UIPlugin.getResourceString(TraceMessages.SP_TIP));
130
	data = new GridData();
119
	data = new GridData();
Lines 259-268 Link Here
259
	return _projectName.getText().trim();
248
	return _projectName.getText().trim();
260
}
249
}
261
250
262
public String getLocalPortNumber() {
263
	return _localPort.getText().trim();
264
}
265
266
public String getSaveOnExitOption() {
251
public String getSaveOnExitOption() {
267
	if (_always.getSelection()) {
252
	if (_always.getSelection()) {
268
		return MessageDialogWithToggle.ALWAYS;
253
		return MessageDialogWithToggle.ALWAYS;
Lines 295-301 Link Here
295
	IPreferenceStore store = UIPlugin.getDefault().getPreferenceStore();
280
	IPreferenceStore store = UIPlugin.getDefault().getPreferenceStore();
296
281
297
	setProjectName(store.getString(CommonUITraceConstants.TRACE_PROJECT_NAME));		
282
	setProjectName(store.getString(CommonUITraceConstants.TRACE_PROJECT_NAME));		
298
	setLocalHostPort(store.getString(CommonUIConstants.LOCALHOST_PORT));
299
	setInfoMsgOption(store.getBoolean(TraceConstants.PROFILE_TIPS));
283
	setInfoMsgOption(store.getBoolean(TraceConstants.PROFILE_TIPS));
300
	setReloadMsgOption(store.getBoolean(CommonUITraceConstants.RELOAD_INFO));
284
	setReloadMsgOption(store.getBoolean(CommonUITraceConstants.RELOAD_INFO));
301
	/* Navid Mehregani - bugzilla_158635: The SAVE_ON_EXIT_KEY option should be read and stored in the preference store of CommonUITracePlugin */ 
285
	/* Navid Mehregani - bugzilla_158635: The SAVE_ON_EXIT_KEY option should be read and stored in the preference store of CommonUITracePlugin */ 
Lines 352-362 Link Here
352
	_projectName.setText(name);
336
	_projectName.setText(name);
353
}
337
}
354
338
355
public void setLocalHostPort(String portNum)
356
{
357
	_localPort.setText(portNum);
358
}
359
360
public void setSaveOnExitOption(String value) {
339
public void setSaveOnExitOption(String value) {
361
	if (MessageDialogWithToggle.ALWAYS.equals(value)) {
340
	if (MessageDialogWithToggle.ALWAYS.equals(value)) {
362
		_always.setSelection(true);
341
		_always.setSelection(true);
Lines 422-454 Link Here
422
   }
401
   }
423
}
402
}
424
403
425
public void modifyText(ModifyEvent e)
426
{
427
	if (e.widget == _localPort)
428
	{
429
		try
430
		{
431
			if (_localPort.getText().trim() == "")
432
			{
433
				_preferencePage.setErrorMessage(UIPlugin.getResourceString(TraceMessages.RAC_EMPTY_PORT));
434
				return;
435
			}
436
			
437
			int value = Integer.parseInt(_localPort.getText().trim());
438
			if (value<0)
439
			{
440
				_preferencePage.setErrorMessage(UIPlugin.getResourceString(TraceMessages.RAC_INV_PRT));
441
				_localPort.setFocus();
442
				return;
443
			}
444
			_preferencePage.setErrorMessage(null);
445
		}
446
		catch (NumberFormatException nfe)
447
		{
448
			if (_preferencePage != null)
449
				_preferencePage.setErrorMessage(UIPlugin.getResourceString(TraceMessages.RAC_INV_PRT));
450
				_localPort.setFocus();
451
		}
452
	}
453
}
454
}
404
}
(-)src/org/eclipse/hyades/trace/ui/internal/launcher/ProfileHostTab.java (-2 / +3 lines)
Lines 1-5 Link Here
1
/**********************************************************************
1
/**********************************************************************
2
 * Copyright (c) 2005, 2007 IBM Corporation and others.
2
 * Copyright (c) 2005, 2008 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 30-35 Link Here
30
import org.eclipse.swt.widgets.Listener;
30
import org.eclipse.swt.widgets.Listener;
31
import org.eclipse.swt.widgets.TableItem;
31
import org.eclipse.swt.widgets.TableItem;
32
import org.eclipse.tptp.platform.common.ui.internal.CommonUIConstants;
32
import org.eclipse.tptp.platform.common.ui.internal.CommonUIConstants;
33
import org.eclipse.tptp.platform.common.ui.internal.CommonUIPlugin;
33
import org.eclipse.tptp.platform.common.ui.trace.internal.CommonUITraceConstants;
34
import org.eclipse.tptp.platform.common.ui.trace.internal.CommonUITraceConstants;
34
35
35
public class ProfileHostTab extends AbstractLaunchConfigurationTab
36
public class ProfileHostTab extends AbstractLaunchConfigurationTab
Lines 78-84 Link Here
78
79
79
	public void setDefaults(ILaunchConfigurationWorkingCopy wc)
80
	public void setDefaults(ILaunchConfigurationWorkingCopy wc)
80
	{
81
	{
81
		IPreferenceStore store = UIPlugin.getDefault().getPreferenceStore();
82
		IPreferenceStore store = CommonUIPlugin.getDefault().getPreferenceStore();
82
		wc.setAttribute(IProfileLaunchConfigurationConstants.ATTR_HOSTNAME, CommonUITraceConstants.LOCAL_HOST);
83
		wc.setAttribute(IProfileLaunchConfigurationConstants.ATTR_HOSTNAME, CommonUITraceConstants.LOCAL_HOST);
83
	
84
	
84
		//if RAC is running , then set defect to RAC. else set to IAC
85
		//if RAC is running , then set defect to RAC. else set to IAC
(-)src/org/eclipse/hyades/trace/ui/internal/launcher/AttachDelegate.java (-2 / +3 lines)
Lines 1-5 Link Here
1
/**********************************************************************
1
/**********************************************************************
2
 * Copyright (c) 2007 IBM Corporation and others.
2
 * Copyright (c) 2007, 2008 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 48-53 Link Here
48
import org.eclipse.swt.widgets.Shell;
48
import org.eclipse.swt.widgets.Shell;
49
import org.eclipse.tptp.platform.common.internal.CommonPlugin;
49
import org.eclipse.tptp.platform.common.internal.CommonPlugin;
50
import org.eclipse.tptp.platform.common.ui.internal.CommonUIConstants;
50
import org.eclipse.tptp.platform.common.ui.internal.CommonUIConstants;
51
import org.eclipse.tptp.platform.common.ui.internal.CommonUIPlugin;
51
import org.eclipse.tptp.platform.common.ui.trace.internal.CommonUITraceConstants;
52
import org.eclipse.tptp.platform.common.ui.trace.internal.CommonUITraceConstants;
52
import org.eclipse.tptp.platform.execution.client.agent.IAgent;
53
import org.eclipse.tptp.platform.execution.client.agent.IAgent;
53
import org.eclipse.tptp.platform.execution.client.core.IAgentController;
54
import org.eclipse.tptp.platform.execution.client.core.IAgentController;
Lines 496-502 Link Here
496
	 */
497
	 */
497
	protected static Map retrieveProcesses (ILaunchConfiguration conf, boolean showErrorMsgs)
498
	protected static Map retrieveProcesses (ILaunchConfiguration conf, boolean showErrorMsgs)
498
	{
499
	{
499
		IPreferenceStore store = UIPlugin.getDefault().getPreferenceStore();
500
		IPreferenceStore store = CommonUIPlugin.getDefault().getPreferenceStore();
500
		Map processes = new Hashtable();
501
		Map processes = new Hashtable();
501
	
502
	
502
		try
503
		try
(-)src/org/eclipse/hyades/trace/ui/internal/launcher/ProfileJavaApplicationDelegate.java (-5 / +5 lines)
Lines 1-5 Link Here
1
/**********************************************************************
1
/**********************************************************************
2
 * Copyright (c) 2005, 2007 IBM Corporation and others.
2
 * Copyright (c) 2005, 2008 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 20-31 Link Here
20
import org.eclipse.core.runtime.IProgressMonitor;
20
import org.eclipse.core.runtime.IProgressMonitor;
21
import org.eclipse.debug.core.ILaunch;
21
import org.eclipse.debug.core.ILaunch;
22
import org.eclipse.debug.core.ILaunchConfiguration;
22
import org.eclipse.debug.core.ILaunchConfiguration;
23
import org.eclipse.hyades.trace.ui.HyadesConstants;
24
import org.eclipse.hyades.trace.ui.UIPlugin;
25
import org.eclipse.hyades.trace.ui.internal.util.PDCoreUtil;
23
import org.eclipse.hyades.trace.ui.internal.util.PDCoreUtil;
26
import org.eclipse.hyades.trace.ui.internal.util.TraceMessages;
24
import org.eclipse.hyades.trace.ui.internal.util.TraceMessages;
27
import org.eclipse.jdt.launching.AbstractJavaLaunchConfigurationDelegate;
25
import org.eclipse.jdt.launching.AbstractJavaLaunchConfigurationDelegate;
28
import org.eclipse.jface.preference.IPreferenceStore;
26
import org.eclipse.jface.preference.IPreferenceStore;
27
import org.eclipse.tptp.platform.common.ui.internal.CommonUIConstants;
28
import org.eclipse.tptp.platform.common.ui.internal.CommonUIPlugin;
29
import org.eclipse.tptp.platform.common.ui.trace.internal.CommonUITraceConstants;
29
import org.eclipse.tptp.platform.common.ui.trace.internal.CommonUITraceConstants;
30
30
31
31
Lines 48-54 Link Here
48
			}
48
			}
49
	
49
	
50
			ProfilingSetsManager manager = ProfilingSetsManager.instance();
50
			ProfilingSetsManager manager = ProfilingSetsManager.instance();
51
			IPreferenceStore store = UIPlugin.getDefault().getPreferenceStore();
51
			IPreferenceStore store = CommonUIPlugin.getDefault().getPreferenceStore();
52
	
52
	
53
			TraceArguments args = new TraceArguments(getMainTypeName(conf));
53
			TraceArguments args = new TraceArguments(getMainTypeName(conf));
54
			args.setClassPath(getClasspathString(conf));
54
			args.setClassPath(getClasspathString(conf));
Lines 69-75 Link Here
69
			monitor.worked(1);
69
			monitor.worked(1);
70
			
70
			
71
			String hostName = conf.getAttribute(IProfileLaunchConfigurationConstants.ATTR_HOSTNAME, CommonUITraceConstants.LOCAL_HOST);			
71
			String hostName = conf.getAttribute(IProfileLaunchConfigurationConstants.ATTR_HOSTNAME, CommonUITraceConstants.LOCAL_HOST);			
72
			int port = conf.getAttribute(IProfileLaunchConfigurationConstants.ATTR_PORT, store.getInt(HyadesConstants.LOCALHOST_PORT));
72
			int port = conf.getAttribute(IProfileLaunchConfigurationConstants.ATTR_PORT, store.getInt(CommonUIConstants.LOCALHOST_PORT));
73
			
73
			
74
			String projectName = conf.getAttribute(IProfileLaunchConfigurationConstants.ATTR_DESTINATION_PROJECT, store.getString(CommonUITraceConstants.TRACE_PROJECT_NAME));
74
			String projectName = conf.getAttribute(IProfileLaunchConfigurationConstants.ATTR_DESTINATION_PROJECT, store.getString(CommonUITraceConstants.TRACE_PROJECT_NAME));
75
			String monitorName = conf.getAttribute(IProfileLaunchConfigurationConstants.ATTR_DESTINATION_MONITOR, store.getString(CommonUITraceConstants.TRACE_MONITOR_NAME));
75
			String monitorName = conf.getAttribute(IProfileLaunchConfigurationConstants.ATTR_DESTINATION_MONITOR, store.getString(CommonUITraceConstants.TRACE_MONITOR_NAME));
(-)src/org/eclipse/tptp/trace/ui/internal/launcher/core/LauncherUtility.java (-2 / +3 lines)
Lines 1-5 Link Here
1
/**********************************************************************
1
/**********************************************************************
2
 * Copyright (c) 2006, 2007 IBM Corporation, Intel Corporation.
2
 * Copyright (c) 2006, 2008 IBM Corporation, Intel Corporation.
3
 * 
3
 * 
4
 * All rights reserved.   This program and the accompanying materials
4
 * All rights reserved.   This program and the accompanying materials
5
 * are made available under the terms of the Eclipse Public License v1.0
5
 * are made available under the terms of the Eclipse Public License v1.0
Lines 84-89 Link Here
84
import org.eclipse.swt.widgets.MenuItem;
84
import org.eclipse.swt.widgets.MenuItem;
85
import org.eclipse.swt.widgets.Shell;
85
import org.eclipse.swt.widgets.Shell;
86
import org.eclipse.tptp.platform.common.ui.internal.CommonUIConstants;
86
import org.eclipse.tptp.platform.common.ui.internal.CommonUIConstants;
87
import org.eclipse.tptp.platform.common.ui.internal.CommonUIPlugin;
87
import org.eclipse.tptp.platform.common.ui.trace.internal.CommonUITraceConstants;
88
import org.eclipse.tptp.platform.common.ui.trace.internal.CommonUITraceConstants;
88
import org.eclipse.tptp.trace.ui.internal.launcher.core.DataCollectorTreeContentProvider.ParentChildNode;
89
import org.eclipse.tptp.trace.ui.internal.launcher.core.DataCollectorTreeContentProvider.ParentChildNode;
89
import org.eclipse.tptp.trace.ui.provisional.launcher.IDataCollectorBaseLauncher;
90
import org.eclipse.tptp.trace.ui.provisional.launcher.IDataCollectorBaseLauncher;
Lines 825-831 Link Here
825
	 */
826
	 */
826
	public static int getPort (ILaunchConfiguration conf) throws CoreException
827
	public static int getPort (ILaunchConfiguration conf) throws CoreException
827
	{
828
	{
828
		IPreferenceStore store = UIPlugin.getDefault().getPreferenceStore();
829
		IPreferenceStore store = CommonUIPlugin.getDefault().getPreferenceStore();
829
		int port = conf.getAttribute(IProfileLaunchConfigurationConstants.ATTR_PORT, store.getInt(CommonUIConstants.LOCALHOST_PORT));
830
		int port = conf.getAttribute(IProfileLaunchConfigurationConstants.ATTR_PORT, store.getInt(CommonUIConstants.LOCALHOST_PORT));
830
		return port;		
831
		return port;		
831
	}
832
	}
(-)src/org/eclipse/hyades/trace/ui/UIPlugin.java (-2 / +1 lines)
Lines 1-5 Link Here
1
/**********************************************************************
1
/**********************************************************************
2
 * Copyright (c) 2005, 2007 IBM Corporation, Intel Corporation.
2
 * Copyright (c) 2005, 2008 IBM Corporation, Intel Corporation.
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 289-295 Link Here
289
		
289
		
290
		//hosts options
290
		//hosts options
291
		store.setDefault(HyadesConstants.HOST_KEY, "localhost:10002");
291
		store.setDefault(HyadesConstants.HOST_KEY, "localhost:10002");
292
		store.setDefault(HyadesConstants.LOCALHOST_PORT, "10002");
293
		
292
		
294
		//trace options
293
		//trace options
295
		store.setDefault(CommonUITraceConstants.TRACE_PROJECT_NAME, UIPlugin.getResourceString(TraceMessages.TRC_LOCD));
294
		store.setDefault(CommonUITraceConstants.TRACE_PROJECT_NAME, UIPlugin.getResourceString(TraceMessages.TRC_LOCD));
(-)src/org/eclipse/tptp/trace/ui/internal/launcher/deleg/application/PIDelegateHelper.java (-2 / +3 lines)
Lines 1-5 Link Here
1
/**********************************************************************
1
/**********************************************************************
2
 * Copyright (c) 2006, 2007 IBM Corporation and others.
2
 * Copyright (c) 2006, 2008 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 41-46 Link Here
41
import org.eclipse.hyades.trace.ui.launcher.IProfilingType;
41
import org.eclipse.hyades.trace.ui.launcher.IProfilingType;
42
import org.eclipse.tptp.platform.common.internal.CommonPlugin;
42
import org.eclipse.tptp.platform.common.internal.CommonPlugin;
43
import org.eclipse.tptp.platform.common.ui.internal.CommonUIConstants;
43
import org.eclipse.tptp.platform.common.ui.internal.CommonUIConstants;
44
import org.eclipse.tptp.platform.common.ui.internal.CommonUIPlugin;
44
import org.eclipse.tptp.platform.common.ui.trace.internal.CommonUITraceConstants;
45
import org.eclipse.tptp.platform.common.ui.trace.internal.CommonUITraceConstants;
45
import org.eclipse.tptp.trace.ui.internal.launcher.core.DataCollector;
46
import org.eclipse.tptp.trace.ui.internal.launcher.core.DataCollector;
46
import org.eclipse.tptp.trace.ui.internal.launcher.core.LauncherConstants;
47
import org.eclipse.tptp.trace.ui.internal.launcher.core.LauncherConstants;
Lines 419-425 Link Here
419
					try
420
					try
420
					{	
421
					{	
421
						JVMVersionDetector.this.host = configuration.getAttribute(IProfileLaunchConfigurationConstants.ATTR_HOSTNAME, CommonUITraceConstants.LOCAL_HOST);
422
						JVMVersionDetector.this.host = configuration.getAttribute(IProfileLaunchConfigurationConstants.ATTR_HOSTNAME, CommonUITraceConstants.LOCAL_HOST);
422
						JVMVersionDetector.this.port = configuration.getAttribute(IProfileLaunchConfigurationConstants.ATTR_PORT, UIPlugin.getDefault().getPreferenceStore().getDefaultInt(CommonUIConstants.LOCALHOST_PORT));		
423
						JVMVersionDetector.this.port = configuration.getAttribute(IProfileLaunchConfigurationConstants.ATTR_PORT, CommonUIPlugin.getDefault().getPreferenceStore().getDefaultInt(CommonUIConstants.LOCALHOST_PORT));		
423
					} 
424
					} 
424
					catch (CoreException e)
425
					catch (CoreException e)
425
					{
426
					{
(-)src/org/eclipse/hyades/trace/ui/internal/util/AttachConfigurationDetail.java (-2 / +3 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2006, 2007 IBM Corporation and others.
2
 * Copyright (c) 2006, 2008 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 20-25 Link Here
20
import org.eclipse.hyades.trace.ui.internal.launcher.IProfileLaunchConfigurationConstants;
20
import org.eclipse.hyades.trace.ui.internal.launcher.IProfileLaunchConfigurationConstants;
21
import org.eclipse.jface.preference.IPreferenceStore;
21
import org.eclipse.jface.preference.IPreferenceStore;
22
import org.eclipse.tptp.platform.common.ui.internal.CommonUIConstants;
22
import org.eclipse.tptp.platform.common.ui.internal.CommonUIConstants;
23
import org.eclipse.tptp.platform.common.ui.internal.CommonUIPlugin;
23
import org.eclipse.tptp.platform.common.ui.trace.internal.CommonUITraceConstants;
24
import org.eclipse.tptp.platform.common.ui.trace.internal.CommonUITraceConstants;
24
25
25
/**
26
/**
Lines 83-89 Link Here
83
	{
84
	{
84
		try
85
		try
85
		{
86
		{
86
			IPreferenceStore store = UIPlugin.getDefault().getPreferenceStore();
87
			IPreferenceStore store = CommonUIPlugin.getDefault().getPreferenceStore();
87
			this.hostName = configuration.getAttribute(IProfileLaunchConfigurationConstants.ATTR_HOSTNAME, CommonUITraceConstants.LOCAL_HOST);
88
			this.hostName = configuration.getAttribute(IProfileLaunchConfigurationConstants.ATTR_HOSTNAME, CommonUITraceConstants.LOCAL_HOST);
88
			this.portNumber = String.valueOf(configuration.getAttribute(IProfileLaunchConfigurationConstants.ATTR_PORT, store.getInt(CommonUIConstants.LOCALHOST_PORT)));
89
			this.portNumber = String.valueOf(configuration.getAttribute(IProfileLaunchConfigurationConstants.ATTR_PORT, store.getInt(CommonUIConstants.LOCALHOST_PORT)));
89
			this.project = configuration.getAttribute(IProfileLaunchConfigurationConstants.ATTR_DESTINATION_PROJECT, store.getString(CommonUITraceConstants.TRACE_PROJECT_NAME));
90
			this.project = configuration.getAttribute(IProfileLaunchConfigurationConstants.ATTR_DESTINATION_PROJECT, store.getString(CommonUITraceConstants.TRACE_PROJECT_NAME));
(-)src/org/eclipse/hyades/trace/ui/internal/preferences/TraceBasePreferencePage.java (-6 / +2 lines)
Lines 1-5 Link Here
1
/**********************************************************************
1
/**********************************************************************
2
 * Copyright (c) 2005, 2007 IBM Corporation and others.
2
 * Copyright (c) 2005, 2008 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 23-29 Link Here
23
import org.eclipse.swt.layout.GridLayout;
23
import org.eclipse.swt.layout.GridLayout;
24
import org.eclipse.swt.widgets.Composite;
24
import org.eclipse.swt.widgets.Composite;
25
import org.eclipse.swt.widgets.Control;
25
import org.eclipse.swt.widgets.Control;
26
import org.eclipse.tptp.platform.common.ui.internal.CommonUIConstants;
27
import org.eclipse.tptp.platform.common.ui.internal.CommonUIPlugin;
26
import org.eclipse.tptp.platform.common.ui.internal.CommonUIPlugin;
28
import org.eclipse.tptp.platform.common.ui.trace.internal.CommonUITraceConstants;
27
import org.eclipse.tptp.platform.common.ui.trace.internal.CommonUITraceConstants;
29
import org.eclipse.tptp.platform.common.ui.trace.internal.CommonUITracePlugin;
28
import org.eclipse.tptp.platform.common.ui.trace.internal.CommonUITracePlugin;
Lines 89-95 Link Here
89
 */
88
 */
90
private void initializeDefaults()
89
private void initializeDefaults()
91
{
90
{
92
	IPreferenceStore store = getPreferenceStore();
91
  	IPreferenceStore store = getPreferenceStore();
93
92
94
	_options.setInfoMsgOption(store.getDefaultBoolean(TraceConstants.PROFILE_TIPS));
93
	_options.setInfoMsgOption(store.getDefaultBoolean(TraceConstants.PROFILE_TIPS));
95
	_options.setReloadMsgOption(store.getDefaultBoolean(CommonUITraceConstants.RELOAD_INFO));
94
	_options.setReloadMsgOption(store.getDefaultBoolean(CommonUITraceConstants.RELOAD_INFO));
Lines 99-106 Link Here
99
	_options.setSwitchPerspOption(CommonUIPlugin.getDefault().getPreferenceStore().getDefaultString(HyadesUI.SWITCH_TO_PERSPECTIVE_KEY));
98
	_options.setSwitchPerspOption(CommonUIPlugin.getDefault().getPreferenceStore().getDefaultString(HyadesUI.SWITCH_TO_PERSPECTIVE_KEY));
100
	_options.setRefreshType(store.getDefaultInt(TraceConstants.REFRESH_TYPE), store.getDefaultInt(TraceConstants.REFRESH_INTERVAL));
99
	_options.setRefreshType(store.getDefaultInt(TraceConstants.REFRESH_TYPE), store.getDefaultInt(TraceConstants.REFRESH_INTERVAL));
101
100
102
	store = UIPlugin.getDefault().getPreferenceStore();
103
	_options.setLocalHostPort(store.getDefaultString(CommonUIConstants.LOCALHOST_PORT));
104
}
101
}
105
/**
102
/**
106
 * Does anything necessary because the default button has been pressed.
103
 * Does anything necessary because the default button has been pressed.
Lines 127-133 Link Here
127
	IPreferenceStore store = getPreferenceStore();
124
	IPreferenceStore store = getPreferenceStore();
128
	
125
	
129
	store.setValue(CommonUITraceConstants.TRACE_PROJECT_NAME, _options.getProjectName());	
126
	store.setValue(CommonUITraceConstants.TRACE_PROJECT_NAME, _options.getProjectName());	
130
	store.setValue(CommonUIConstants.LOCALHOST_PORT, _options.getLocalPortNumber());	
131
	store.setValue(TraceConstants.PROFILE_TIPS, _options.getInfoMsgOption());	
127
	store.setValue(TraceConstants.PROFILE_TIPS, _options.getInfoMsgOption());	
132
	store.setValue(CommonUITraceConstants.RELOAD_INFO, _options.getReloadMsgOption());
128
	store.setValue(CommonUITraceConstants.RELOAD_INFO, _options.getReloadMsgOption());
133
	/* Navid Mehregani - bugzilla_158635: The SAVE_ON_EXIT_KEY option should be read and stored in the preference store of CommonUITracePlugin */
129
	/* Navid Mehregani - bugzilla_158635: The SAVE_ON_EXIT_KEY option should be read and stored in the preference store of CommonUITracePlugin */
(-)plugin.properties (-1 lines)
Lines 29-35 Link Here
29
_8   = Sample Wizards
29
_8   = Sample Wizards
30
_9   = Security Certificate
30
_9   = Security Certificate
31
_10  = Import a Security Certificate to allow secure connections to agent controller.
31
_10  = Import a Security Certificate to allow secure connections to agent controller.
32
_11  = Agent Controller
33
_12  = Scroll up the sequence diagram
32
_12  = Scroll up the sequence diagram
34
_14  = Scroll down the sequence diagram
33
_14  = Scroll down the sequence diagram
35
_16  = Scroll left the sequence diagram
34
_16  = Scroll left the sequence diagram
(-)plugin.xml (-6 / +2 lines)
Lines 44-61 Link Here
44
   </extension>
44
   </extension>
45
45
46
<!-- ==================================================================== -->
46
<!-- ==================================================================== -->
47
<!-- Preferences pages.                                                   -->
47
<!-- Preferences pages - Agent Controller > Security Preference           -->
48
<!-- ==================================================================== -->
48
<!-- ==================================================================== -->
49
   <extension
49
   <extension
50
         point="org.eclipse.ui.preferencePages">
50
         point="org.eclipse.ui.preferencePages">
51
      <page
51
      <page
52
            class="org.eclipse.hyades.security.internal.preference.ACPreferencePage"
53
            id="org.eclipse.hyades.security.internal.preference.ACPreferencePage"
54
            name="%_11"/>
55
      <page
56
            class="org.eclipse.hyades.security.internal.preference.SecurityPreferencePage"
52
            class="org.eclipse.hyades.security.internal.preference.SecurityPreferencePage"
57
            id="org.eclipse.hyades.security.internal.preference.SecurityPreferencePage"
53
            id="org.eclipse.hyades.security.internal.preference.SecurityPreferencePage"
58
            category="org.eclipse.hyades.security.internal.preference.ACPreferencePage"
54
            category="org.eclipse.hyades.trace.ui.internal.preferences.ACPreferencePage"
59
            name="%_9"/>
55
            name="%_9"/>
60
   </extension>
56
   </extension>
61
<!-- ==================================================================== -->
57
<!-- ==================================================================== -->
(-)src/org/eclipse/hyades/ui/HyadesUIPlugin.java (-2 / +11 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2005, 2006 IBM Corporation and others.
2
 * Copyright (c) 2005, 2008 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 23-30 Link Here
23
import org.eclipse.hyades.ui.internal.logicalfolder.LogicalFolder;
23
import org.eclipse.hyades.ui.internal.logicalfolder.LogicalFolder;
24
import org.eclipse.hyades.ui.internal.util.ResourceBundleManager;
24
import org.eclipse.hyades.ui.internal.util.ResourceBundleManager;
25
import org.eclipse.hyades.ui.util.ILogger;
25
import org.eclipse.hyades.ui.util.ILogger;
26
import org.eclipse.jface.preference.IPreferenceStore;
26
import org.eclipse.swt.widgets.Display;
27
import org.eclipse.swt.widgets.Display;
27
import org.eclipse.tptp.platform.common.internal.CommonPlugin;
28
import org.eclipse.tptp.platform.common.internal.CommonPlugin;
29
import org.eclipse.tptp.platform.common.ui.internal.CommonUIConstants;
28
import org.eclipse.ui.plugin.AbstractUIPlugin;
30
import org.eclipse.ui.plugin.AbstractUIPlugin;
29
import org.osgi.framework.BundleContext;
31
import org.osgi.framework.BundleContext;
30
32
Lines 96-101 Link Here
96
		return instance;
98
		return instance;
97
	}
99
	}
98
	
100
	
101
	protected void initializePreferences() 
102
	{		
103
		/* Default host */
104
		IPreferenceStore store = getPreferenceStore(); 
105
	}
99
	
106
	
100
	/**
107
	/**
101
	 * @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext)
108
	 * @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext)
Lines 131-137 Link Here
131
			Display.getDefault().asyncExec(operation);
138
			Display.getDefault().asyncExec(operation);
132
		}
139
		}
133
		
140
		
134
		restoreFilterSelections();		
141
		restoreFilterSelections();	
142
		
143
		initializePreferences(); 
135
	}		
144
	}		
136
	
145
	
137
	/**
146
	/**
(-)src/org/eclipse/hyades/security/internal/preference/ACPreferencePage.java (-41 lines)
Removed 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
 * $Id: ACPreferencePage.java,v 1.1 2007/04/19 19:35:37 nmehrega Exp $
8
 * 
9
 * Contributors: 
10
 * IBM - Initial API and implementation
11
 **********************************************************************/
12
13
package org.eclipse.hyades.security.internal.preference;
14
15
import org.eclipse.jface.dialogs.Dialog;
16
import org.eclipse.jface.preference.PreferencePage;
17
import org.eclipse.swt.SWT;
18
import org.eclipse.swt.widgets.Composite;
19
import org.eclipse.swt.widgets.Control;
20
import org.eclipse.ui.IWorkbench;
21
import org.eclipse.ui.IWorkbenchPreferencePage;
22
23
public class ACPreferencePage extends PreferencePage
24
	implements IWorkbenchPreferencePage {
25
	
26
	/* (non-Javadoc)
27
	 * @see org.eclipse.ui.IWorkbenchPreferencePage#init(org.eclipse.ui.IWorkbench)
28
	 */
29
	public void init(IWorkbench workbench) {
30
        // Do nothing
31
	}
32
33
	protected Control createContents(Composite parent) {
34
		Composite comp = new Composite( parent, SWT.NONE );
35
		
36
		Dialog.applyDialogFont( comp );
37
		
38
		return comp;
39
	}
40
41
}
(-)plugin.xml (-1 / +1 lines)
Lines 19-25 Link Here
19
      <page
19
      <page
20
            class="org.eclipse.tptp.platform.iac.administrator.internal.preference.IACPreferencePage"
20
            class="org.eclipse.tptp.platform.iac.administrator.internal.preference.IACPreferencePage"
21
            id="org.eclipse.tptp.platform.iac.administrator.internal.preference.IACPreferencePage"
21
            id="org.eclipse.tptp.platform.iac.administrator.internal.preference.IACPreferencePage"
22
            category="org.eclipse.hyades.security.internal.preference.ACPreferencePage"
22
            category="org.eclipse.hyades.trace.ui.internal.preferences.ACPreferencePage"
23
            name="%preference.name">
23
            name="%preference.name">
24
      </page>
24
      </page>
25
   </extension>
25
   </extension>
(-)src/org/eclipse/tptp/platform/instrumentation/ui/internal/launcher/deleg/application/TIInstrumentAttachLauncherDelegate.java (-1 / +2 lines)
Lines 25-30 Link Here
25
import org.eclipse.hyades.trace.ui.internal.launcher.IProfileLaunchConfigurationConstants;
25
import org.eclipse.hyades.trace.ui.internal.launcher.IProfileLaunchConfigurationConstants;
26
import org.eclipse.hyades.trace.ui.internal.launcher.SelectedAgent;
26
import org.eclipse.hyades.trace.ui.internal.launcher.SelectedAgent;
27
import org.eclipse.tptp.platform.common.ui.internal.CommonUIConstants;
27
import org.eclipse.tptp.platform.common.ui.internal.CommonUIConstants;
28
import org.eclipse.tptp.platform.common.ui.internal.CommonUIPlugin;
28
import org.eclipse.tptp.platform.common.ui.trace.internal.CommonUITraceConstants;
29
import org.eclipse.tptp.platform.common.ui.trace.internal.CommonUITraceConstants;
29
import org.eclipse.tptp.platform.execution.client.agent.IAgent;
30
import org.eclipse.tptp.platform.execution.client.agent.IAgent;
30
import org.eclipse.tptp.platform.execution.client.agent.ICollector;
31
import org.eclipse.tptp.platform.execution.client.agent.ICollector;
Lines 82-88 Link Here
82
	public void preLaunch(ILaunchConfiguration configuration, String mode, ILaunch launch, IProgressMonitor monitor) throws CoreException
83
	public void preLaunch(ILaunchConfiguration configuration, String mode, ILaunch launch, IProgressMonitor monitor) throws CoreException
83
	{		
84
	{		
84
		String hostName = configuration.getAttribute(IProfileLaunchConfigurationConstants.ATTR_HOSTNAME, CommonUITraceConstants.LOCAL_HOST);
85
		String hostName = configuration.getAttribute(IProfileLaunchConfigurationConstants.ATTR_HOSTNAME, CommonUITraceConstants.LOCAL_HOST);
85
		int port = configuration.getAttribute(IProfileLaunchConfigurationConstants.ATTR_PORT, UIPlugin.getDefault().getPreferenceStore().getDefaultInt(CommonUIConstants.LOCALHOST_PORT));
86
		int port = configuration.getAttribute(IProfileLaunchConfigurationConstants.ATTR_PORT, CommonUIPlugin.getDefault().getPreferenceStore().getDefaultInt(CommonUIConstants.LOCALHOST_PORT));
86
		
87
		
87
		try
88
		try
88
		{
89
		{
(-)src/org/eclipse/tptp/platform/profile/server/core/internal/ProfileOnServerAdapter.java (-2 / +3 lines)
Lines 1-5 Link Here
1
/**********************************************************************
1
/**********************************************************************
2
 * Copyright (c) 2005, 2007 IBM Corporation and others.
2
 * Copyright (c) 2005, 2008 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 29-34 Link Here
29
import org.eclipse.jface.dialogs.Dialog;
29
import org.eclipse.jface.dialogs.Dialog;
30
import org.eclipse.jface.wizard.WizardDialog;
30
import org.eclipse.jface.wizard.WizardDialog;
31
import org.eclipse.tptp.platform.common.ui.internal.CommonUIConstants;
31
import org.eclipse.tptp.platform.common.ui.internal.CommonUIConstants;
32
import org.eclipse.tptp.platform.common.ui.internal.CommonUIPlugin;
32
import org.eclipse.tptp.platform.execution.client.agent.IAgent;
33
import org.eclipse.tptp.platform.execution.client.agent.IAgent;
33
import org.eclipse.tptp.platform.execution.client.core.ConnectionInfo;
34
import org.eclipse.tptp.platform.execution.client.core.ConnectionInfo;
34
import org.eclipse.tptp.platform.execution.client.core.IAgentController;
35
import org.eclipse.tptp.platform.execution.client.core.IAgentController;
Lines 57-63 Link Here
57
        	}
58
        	}
58
        	
59
        	
59
        	/* get port number */
60
        	/* get port number */
60
            int port = wc.getAttribute(IProfileLaunchConfigurationConstants.ATTR_PORT, UIPlugin.getDefault().getPreferenceStore().getInt(CommonUIConstants.LOCALHOST_PORT));
61
            int port = wc.getAttribute(IProfileLaunchConfigurationConstants.ATTR_PORT, CommonUIPlugin.getDefault().getPreferenceStore().getInt(CommonUIConstants.LOCALHOST_PORT));
61
        	
62
        	
62
            /* set host and port attribute of launch configuration */
63
            /* set host and port attribute of launch configuration */
63
            wc.setAttribute(IProfileLaunchConfigurationConstants.ATTR_HOSTNAME, hostname);
64
            wc.setAttribute(IProfileLaunchConfigurationConstants.ATTR_HOSTNAME, hostname);

Return to bug 199594