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

(-)plugin.xml (-1 / +6 lines)
Lines 1-7 Link Here
1
<?xml version="1.0" encoding="UTF-8"?>
1
<?xml version="1.0" encoding="UTF-8"?>
2
<!-- 
2
<!-- 
3
/**********************************************************************
3
/**********************************************************************
4
 * Copyright (c) 2007 IBM Corporation.
4
 * Copyright (c) 2007, 2008 IBM Corporation.
5
 * All rights reserved. This content is made available under 
5
 * All rights reserved. This content is made available under 
6
 * the terms of the Eclipse Public License v1.0
6
 * the terms of the Eclipse Public License v1.0
7
 * which accompanies this distribution, and is available at
7
 * which accompanies this distribution, and is available at
Lines 57-62 Link Here
57
            id="org.eclipse.hyades.security.internal.preference.SecurityPreferencePage"
57
            id="org.eclipse.hyades.security.internal.preference.SecurityPreferencePage"
58
            category="org.eclipse.hyades.security.internal.preference.ACPreferencePage"
58
            category="org.eclipse.hyades.security.internal.preference.ACPreferencePage"
59
            name="%_9"/>
59
            name="%_9"/>
60
      <page
61
			class="org.eclipse.hyades.trace.ui.internal.preferences.HostPreferencePage"
62
            id="org.eclipse.hyades.trace.ui.internal.preferences.HostPreferencePage"
63
            category="org.eclipse.hyades.security.internal.preference.ACPreferencePage"
64
            name="%_46" />   
60
   </extension>
65
   </extension>
61
<!-- ==================================================================== -->
66
<!-- ==================================================================== -->
62
<!-- Certificates Import Wizard.                                                   -->
67
<!-- Certificates Import Wizard.                                                   -->
(-)plugin.properties (-1 / +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 53-55 Link Here
53
_43=Profiling and Logging
53
_43=Profiling and Logging
54
_44=Test
54
_44=Test
55
_45= Configure Min Max
55
_45= Configure Min Max
56
_46 = Hosts
(-)src/org/eclipse/hyades/trace/ui/internal/core/TraceOptionsUI.java (-51 / +8 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-129 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);
117
//	Label portdesc = new Label(profilingInfo, SWT.NULL);
122
	portdesc.setText(UIPlugin.getResourceString(TraceMessages.RAC_LHP));
118
//	portdesc.setText(UIPlugin.getResourceString(TraceMessages.RAC_LHP));
123
	_localPort = new Text(profilingInfo, SWT.BORDER);
119
//	_localPort = new Text(profilingInfo, SWT.BORDER);
124
	data = GridUtil.createHorizontalFill();
120
//	data = GridUtil.createHorizontalFill();
125
	_localPort.setLayoutData(data);
121
//	_localPort.setLayoutData(data);
126
	_localPort.addModifyListener(this);
122
//	_localPort.addModifyListener(this);
127
123
128
	_enableInfoMsg = new Button(profilingInfo, SWT.CHECK);
124
	_enableInfoMsg = new Button(profilingInfo, SWT.CHECK);
129
	_enableInfoMsg.setText(UIPlugin.getResourceString(TraceMessages.SP_TIP));
125
	_enableInfoMsg.setText(UIPlugin.getResourceString(TraceMessages.SP_TIP));
Lines 259-268 Link Here
259
	return _projectName.getText().trim();
255
	return _projectName.getText().trim();
260
}
256
}
261
257
262
public String getLocalPortNumber() {
263
	return _localPort.getText().trim();
264
}
265
266
public String getSaveOnExitOption() {
258
public String getSaveOnExitOption() {
267
	if (_always.getSelection()) {
259
	if (_always.getSelection()) {
268
		return MessageDialogWithToggle.ALWAYS;
260
		return MessageDialogWithToggle.ALWAYS;
Lines 295-301 Link Here
295
	IPreferenceStore store = UIPlugin.getDefault().getPreferenceStore();
287
	IPreferenceStore store = UIPlugin.getDefault().getPreferenceStore();
296
288
297
	setProjectName(store.getString(CommonUITraceConstants.TRACE_PROJECT_NAME));		
289
	setProjectName(store.getString(CommonUITraceConstants.TRACE_PROJECT_NAME));		
298
	setLocalHostPort(store.getString(CommonUIConstants.LOCALHOST_PORT));
299
	setInfoMsgOption(store.getBoolean(TraceConstants.PROFILE_TIPS));
290
	setInfoMsgOption(store.getBoolean(TraceConstants.PROFILE_TIPS));
300
	setReloadMsgOption(store.getBoolean(CommonUITraceConstants.RELOAD_INFO));
291
	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 */ 
292
	/* 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);
343
	_projectName.setText(name);
353
}
344
}
354
345
355
public void setLocalHostPort(String portNum)
356
{
357
	_localPort.setText(portNum);
358
}
359
360
public void setSaveOnExitOption(String value) {
346
public void setSaveOnExitOption(String value) {
361
	if (MessageDialogWithToggle.ALWAYS.equals(value)) {
347
	if (MessageDialogWithToggle.ALWAYS.equals(value)) {
362
		_always.setSelection(true);
348
		_always.setSelection(true);
Lines 422-454 Link Here
422
   }
408
   }
423
}
409
}
424
410
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
}
411
}
(-)src/org/eclipse/hyades/trace/ui/internal/preferences/TraceBasePreferencePage.java (-3 / +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 100-106 Link Here
100
	_options.setRefreshType(store.getDefaultInt(TraceConstants.REFRESH_TYPE), store.getDefaultInt(TraceConstants.REFRESH_INTERVAL));
100
	_options.setRefreshType(store.getDefaultInt(TraceConstants.REFRESH_TYPE), store.getDefaultInt(TraceConstants.REFRESH_INTERVAL));
101
101
102
	store = UIPlugin.getDefault().getPreferenceStore();
102
	store = UIPlugin.getDefault().getPreferenceStore();
103
	_options.setLocalHostPort(store.getDefaultString(CommonUIConstants.LOCALHOST_PORT));
103
//	_options.setLocalHostPort(store.getDefaultString(CommonUIConstants.LOCALHOST_PORT));
104
}
104
}
105
/**
105
/**
106
 * Does anything necessary because the default button has been pressed.
106
 * Does anything necessary because the default button has been pressed.
Lines 127-133 Link Here
127
	IPreferenceStore store = getPreferenceStore();
127
	IPreferenceStore store = getPreferenceStore();
128
	
128
	
129
	store.setValue(CommonUITraceConstants.TRACE_PROJECT_NAME, _options.getProjectName());	
129
	store.setValue(CommonUITraceConstants.TRACE_PROJECT_NAME, _options.getProjectName());	
130
	store.setValue(CommonUIConstants.LOCALHOST_PORT, _options.getLocalPortNumber());	
131
	store.setValue(TraceConstants.PROFILE_TIPS, _options.getInfoMsgOption());	
130
	store.setValue(TraceConstants.PROFILE_TIPS, _options.getInfoMsgOption());	
132
	store.setValue(CommonUITraceConstants.RELOAD_INFO, _options.getReloadMsgOption());
131
	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 */
132
	/* Navid Mehregani - bugzilla_158635: The SAVE_ON_EXIT_KEY option should be read and stored in the preference store of CommonUITracePlugin */
(-)plugin.properties (-2 / +1 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 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_NODEP                         = Hosts
19
TRC_LGNW                        = Profiling and Logging
18
TRC_LGNW                        = Profiling and Logging
(-)plugin.xml (-12 / +1 lines)
Lines 23-40 Link Here
23
			name="%TRC_LGNW"
23
			name="%TRC_LGNW"
24
			id="org.eclipse.hyades.trace_log.newWizard">
24
			id="org.eclipse.hyades.trace_log.newWizard">
25
		</category>
25
		</category>
26
	</extension>
26
	</extension> 
27
   
28
	<!-- The host preference page -->
29
	<extension point="org.eclipse.ui.preferencePages">
30
		<page
31
			name="%P_NODEP"
32
            category="org.eclipse.hyades.trace.ui.internal.preferences.TraceBasePreferencePage"
33
            class="org.eclipse.hyades.trace.ui.internal.preferences.HostPreferencePage"
34
            id="org.eclipse.hyades.trace.ui.internal.preferences.HostPreferencePage">
35
		</page>     
36
	</extension>
37
   
38
   
27
   
39
 <extension
28
 <extension
40
       point="org.eclipse.tptp.platform.models.hierarchy.handler">
29
       point="org.eclipse.tptp.platform.models.hierarchy.handler">

Return to bug 199594