Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 92181 Details for
Bug 199594
Agent Controller preferences are scattered over Profiling and Logging preferences section
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
Patch #2.5
199594patch.txt (text/plain), 37.75 KB, created by
Ritwik Lodhiya
on 2008-03-11 11:49:45 EDT
(
hide
)
Description:
Patch #2.5
Filename:
MIME Type:
Creator:
Ritwik Lodhiya
Created:
2008-03-11 11:49:45 EDT
Size:
37.75 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.tptp.platform.jvmti.client >Index: src/org/eclipse/tptp/platform/jvmti/client/internal/launcher/TIAttachLauncherDelegate.java >=================================================================== >RCS file: /cvsroot/tptp/platform/org.eclipse.tptp.platform.jvmti.client/src/org/eclipse/tptp/platform/jvmti/client/internal/launcher/TIAttachLauncherDelegate.java,v >retrieving revision 1.13 >diff -u -r1.13 TIAttachLauncherDelegate.java >--- src/org/eclipse/tptp/platform/jvmti/client/internal/launcher/TIAttachLauncherDelegate.java 11 Dec 2007 11:39:05 -0000 1.13 >+++ src/org/eclipse/tptp/platform/jvmti/client/internal/launcher/TIAttachLauncherDelegate.java 11 Mar 2008 15:42:59 -0000 >@@ -22,6 +22,7 @@ > import org.eclipse.hyades.trace.ui.UIPlugin; > import org.eclipse.hyades.trace.ui.internal.launcher.IProfileLaunchConfigurationConstants; > import org.eclipse.hyades.trace.ui.internal.launcher.SelectedAgent; >+import org.eclipse.hyades.ui.HyadesUIPlugin; > import org.eclipse.tptp.platform.common.ui.internal.CommonUIConstants; > import org.eclipse.tptp.platform.common.ui.trace.internal.CommonUITraceConstants; > import org.eclipse.tptp.platform.execution.client.agent.IAgent; >@@ -83,7 +84,7 @@ > public void preLaunch(ILaunchConfiguration configuration, String mode, ILaunch launch, IProgressMonitor monitor) throws CoreException > { > String hostName = configuration.getAttribute(IProfileLaunchConfigurationConstants.ATTR_HOSTNAME, CommonUITraceConstants.LOCAL_HOST); >- int port = configuration.getAttribute(IProfileLaunchConfigurationConstants.ATTR_PORT, UIPlugin.getDefault().getPreferenceStore().getDefaultInt(CommonUIConstants.LOCALHOST_PORT)); >+ int port = configuration.getAttribute(IProfileLaunchConfigurationConstants.ATTR_PORT, HyadesUIPlugin.getInstance().getPreferenceStore().getDefaultInt(CommonUIConstants.LOCALHOST_PORT)); > > try > { >Index: src/org/eclipse/tptp/platform/jvmti/client/internal/launcher/AgentAvailibilityTester.java >=================================================================== >RCS file: /cvsroot/tptp/platform/org.eclipse.tptp.platform.jvmti.client/src/org/eclipse/tptp/platform/jvmti/client/internal/launcher/AgentAvailibilityTester.java,v >retrieving revision 1.6 >diff -u -r1.6 AgentAvailibilityTester.java >--- src/org/eclipse/tptp/platform/jvmti/client/internal/launcher/AgentAvailibilityTester.java 24 Apr 2007 18:19:43 -0000 1.6 >+++ src/org/eclipse/tptp/platform/jvmti/client/internal/launcher/AgentAvailibilityTester.java 11 Mar 2008 15:42:59 -0000 >@@ -16,6 +16,7 @@ > import org.eclipse.debug.core.ILaunchConfiguration; > import org.eclipse.hyades.trace.ui.UIPlugin; > import org.eclipse.hyades.trace.ui.internal.launcher.IProfileLaunchConfigurationConstants; >+import org.eclipse.hyades.ui.HyadesUIPlugin; > import org.eclipse.jface.preference.IPreferenceStore; > import org.eclipse.osgi.util.NLS; > import org.eclipse.tptp.platform.common.ui.internal.CommonUIConstants; >@@ -78,7 +79,7 @@ > /* Determine the port number from the preference page if it's not stored as part of the configuration */ > if (port == -1) > { >- IPreferenceStore store = UIPlugin.getDefault().getPreferenceStore(); >+ IPreferenceStore store = HyadesUIPlugin.getInstance().getPreferenceStore(); > port = store.getInt(CommonUIConstants.LOCALHOST_PORT); > } > } catch (CoreException e) >#P org.eclipse.tptp.platform.common.ui.trace >Index: plugin.xml >=================================================================== >RCS file: /cvsroot/tptp/platform/org.eclipse.tptp.platform.common.ui.trace/plugin.xml,v >retrieving revision 1.7 >diff -u -r1.7 plugin.xml >--- plugin.xml 28 Feb 2008 23:13:09 -0000 1.7 >+++ plugin.xml 11 Mar 2008 15:42:59 -0000 >@@ -28,8 +28,12 @@ > <!-- The host preference page --> > <extension point="org.eclipse.ui.preferencePages"> > <page >+ class="org.eclipse.hyades.trace.ui.internal.preferences.ACPreferencePage" >+ id="org.eclipse.hyades.trace.ui.internal.preferences.ACPreferencePage" >+ name="%P_NODE"/> >+ <page > name="%P_NODEP" >- category="org.eclipse.hyades.trace.ui.internal.preferences.TraceBasePreferencePage" >+ category="org.eclipse.hyades.trace.ui.internal.preferences.ACPreferencePage" > class="org.eclipse.hyades.trace.ui.internal.preferences.HostPreferencePage" > id="org.eclipse.hyades.trace.ui.internal.preferences.HostPreferencePage"> > </page> >Index: plugin.properties >=================================================================== >RCS file: /cvsroot/tptp/platform/org.eclipse.tptp.platform.common.ui.trace/plugin.properties,v >retrieving revision 1.4 >diff -u -r1.4 plugin.properties >--- plugin.properties 12 Dec 2007 02:19:29 -0000 1.4 >+++ plugin.properties 11 Mar 2008 15:42:59 -0000 >@@ -15,5 +15,6 @@ > plugin.name=TPTP Common UI Trace Plug-in > plugin.provider=Eclipse.org > >+P_NODE = Agent Controller > P_NODEP = Hosts > TRC_LGNW = Profiling and Logging >\ No newline at end of file >Index: src/org/eclipse/tptp/platform/common/ui/trace/internal/CommonUITracePlugin.java >=================================================================== >RCS file: /cvsroot/tptp/platform/org.eclipse.tptp.platform.common.ui.trace/src/org/eclipse/tptp/platform/common/ui/trace/internal/CommonUITracePlugin.java,v >retrieving revision 1.7 >diff -u -r1.7 CommonUITracePlugin.java >--- src/org/eclipse/tptp/platform/common/ui/trace/internal/CommonUITracePlugin.java 24 Jan 2008 02:30:00 -0000 1.7 >+++ src/org/eclipse/tptp/platform/common/ui/trace/internal/CommonUITracePlugin.java 11 Mar 2008 15:42:59 -0000 >@@ -89,7 +89,7 @@ > { > /* Default hosts */ > store.setDefault(CommonUIConstants.HOST_KEY,"localhost:10002"); >- store.setDefault(CommonUIConstants.LOCALHOST_PORT, "10002"); >+// store.setDefault(CommonUIConstants.LOCALHOST_PORT, "10002"); > > /* Trace options */ > store.setDefault(CommonUITraceConstants.TRACE_PROJECT_NAME, CommonUITraceMessages.TRC_LOCD); >Index: src/org/eclipse/hyades/trace/ui/internal/preferences/messages.properties >=================================================================== >RCS file: src/org/eclipse/hyades/trace/ui/internal/preferences/messages.properties >diff -N src/org/eclipse/hyades/trace/ui/internal/preferences/messages.properties >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/hyades/trace/ui/internal/preferences/messages.properties 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,17 @@ >+############################################################################### >+# Copyright (c) 2008 IBM Corporation and others. >+# 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 >+# http://www.eclipse.org/legal/epl-v10.html >+# $Id: ACMessages.properties,v 1.0 2008/04/04 17:22:31 ritwikl Exp $ >+# >+# Contributors: >+# IBM Corporation - initial API and implementation >+############################################################################### >+ >+_1 = Agent Controller Preferences >+_2 = Agent Controller local port: >+ >+_3 = Agent Controller port cannot be empty >+_4 = Invalid port number for Agent Controller >Index: src/org/eclipse/hyades/trace/ui/internal/preferences/ACPreferencePage.java >=================================================================== >RCS file: src/org/eclipse/hyades/trace/ui/internal/preferences/ACPreferencePage.java >diff -N src/org/eclipse/hyades/trace/ui/internal/preferences/ACPreferencePage.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/hyades/trace/ui/internal/preferences/ACPreferencePage.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,182 @@ >+/********************************************************************** >+ * Copyright (c) 2007, 2008 IBM Corporation and others. >+ * 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 >+ * http://www.eclipse.org/legal/epl-v10.html >+ * $Id: ACPreferencePage.java,v 1.1 2007/04/19 19:35:37 nmehrega Exp $ >+ * >+ * Contributors: >+ * IBM - Initial API and implementation >+ **********************************************************************/ >+ >+package org.eclipse.hyades.trace.ui.internal.preferences; >+ >+import org.eclipse.hyades.ui.util.GridUtil; >+import org.eclipse.jface.dialogs.Dialog; >+import org.eclipse.jface.preference.IPreferenceStore; >+import org.eclipse.jface.preference.PreferencePage; >+import org.eclipse.swt.SWT; >+import org.eclipse.swt.events.ModifyEvent; >+import org.eclipse.swt.events.ModifyListener; >+import org.eclipse.swt.layout.GridData; >+import org.eclipse.swt.layout.GridLayout; >+import org.eclipse.swt.widgets.Composite; >+import org.eclipse.swt.widgets.Control; >+import org.eclipse.swt.widgets.Group; >+import org.eclipse.swt.widgets.Label; >+import org.eclipse.swt.widgets.Text; >+import org.eclipse.tptp.platform.common.ui.internal.CommonUIConstants; >+import org.eclipse.tptp.platform.common.ui.internal.CommonUIPlugin; >+import org.eclipse.ui.IWorkbench; >+import org.eclipse.ui.IWorkbenchPreferencePage; >+import org.eclipse.ui.PlatformUI; >+ >+public class ACPreferencePage extends PreferencePage >+ implements IWorkbenchPreferencePage, ModifyListener { >+ >+ private IPreferenceStore store = CommonUIPlugin.getDefault().getPreferenceStore(); >+ private Text _localPort; >+ >+ >+ public Composite createControls(Composite parent) >+ { >+ GridLayout layout; >+ GridData data; >+ >+ Composite content = new Composite(parent, SWT.NONE); >+ layout = new GridLayout(); >+ layout.numColumns = 1; >+ layout.verticalSpacing = 10; >+ content.setLayout(layout); >+ content.setLayoutData(GridUtil.createFill()); >+ >+ Group profilingInfo = new Group(content, SWT.NULL); >+ profilingInfo.setText(ACPrefMessages._1); >+ layout = new GridLayout(); >+ layout.numColumns = 2; >+ profilingInfo.setLayout(layout); >+ profilingInfo.setLayoutData(GridUtil.createHorizontalFill()); >+ >+ Label portdesc = new Label(profilingInfo, SWT.NULL); >+ portdesc.setText(ACPrefMessages._2); >+ _localPort = new Text(profilingInfo, SWT.BORDER); >+ data = GridUtil.createHorizontalFill(); >+ _localPort.setLayoutData(data); >+ _localPort.addModifyListener(this); >+ >+ initializeValues(); >+ >+ Dialog.applyDialogFont( content ); >+ >+ return content; >+ } >+ >+ private void initializeValues() >+ { >+ store = CommonUIPlugin.getDefault().getPreferenceStore(); >+ setLocalHostPort(store.getString(CommonUIConstants.LOCALHOST_PORT)); >+ } >+ >+ >+ public String getLocalPortNumber() { >+ return _localPort.getText().trim(); >+ } >+ >+ public void setLocalHostPort(String portNum) >+ { >+ _localPort.setText(portNum); >+ } >+ >+ public void modifyText(ModifyEvent e) >+ { >+ if (e.widget == _localPort) >+ { >+ try >+ { >+ if (_localPort.getText().trim() == "") >+ { >+ setErrorMessage(ACPrefMessages._3); >+ return; >+ } >+ >+ int value = Integer.parseInt(_localPort.getText().trim()); >+ if (value<0) >+ { >+ setErrorMessage(ACPrefMessages._4); >+ _localPort.setFocus(); >+ return; >+ } >+ setErrorMessage(null); >+ } >+ catch (NumberFormatException nfe) >+ { >+ if (this != null) >+ setErrorMessage(ACPrefMessages._4); >+ _localPort.setFocus(); >+ } >+ } >+ } >+ >+ /* (non-Javadoc) >+ * @see org.eclipse.ui.IWorkbenchPreferencePage#init(org.eclipse.ui.IWorkbench) >+ */ >+ public void init(IWorkbench workbench) { >+ // Do nothing >+ } >+ >+ public Control createContents(Composite parent) { >+ >+ Composite comp = new Composite( parent, SWT.NONE ); >+ >+ PlatformUI.getWorkbench().getHelpSystem().setHelp( >+ parent, >+ CommonUIPlugin.getID()+".tbpp0000"); >+ >+ GridLayout layout= new GridLayout(); >+ layout.marginWidth= 0; >+ layout.marginHeight= 5; >+ layout.numColumns= 1; >+ comp.setLayout(layout); >+ >+ createControls(comp); >+ >+ Dialog.applyDialogFont( comp ); >+ >+ return comp; >+ } >+ >+ /** >+ * Initializes states of the controls using default values >+ * in the preference store. >+ */ >+ private void initializeDefaults() >+ { >+ setLocalHostPort(store.getDefaultString(CommonUIConstants.LOCALHOST_PORT)); >+ } >+ /** >+ * Does anything necessary because the default button has been pressed. >+ */ >+ protected void performDefaults() { >+ initializeDefaults(); >+ } >+ /** >+ * Do anything necessary because the OK button has been pressed. >+ * >+ * @return whether it is okay to close the preference page >+ */ >+ public boolean performOk() { >+ storeValues(); >+ CommonUIPlugin.getDefault().savePluginPreferences(); >+ return true; >+ } >+ >+ /** >+ * Stores the values of the controls back to the preference store. >+ */ >+ private void storeValues() >+ { >+ store.setValue(CommonUIConstants.LOCALHOST_PORT, this.getLocalPortNumber()); >+ } >+} >+ >Index: src/org/eclipse/hyades/trace/ui/internal/preferences/ACPrefMessages.java >=================================================================== >RCS file: src/org/eclipse/hyades/trace/ui/internal/preferences/ACPrefMessages.java >diff -N src/org/eclipse/hyades/trace/ui/internal/preferences/ACPrefMessages.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/hyades/trace/ui/internal/preferences/ACPrefMessages.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,34 @@ >+/********************************************************************** >+ * Copyright (c) 2008 IBM Corporation and others. >+ * 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 >+ * http://www.eclipse.org/legal/epl-v10.html >+ * $Id: ACPrefMessages.java,v 1.0 2008/04/04 17:20:37 ritwikl Exp $ >+ * >+ * Contributors: >+ * IBM - Initial API and implementation >+ **********************************************************************/ >+ >+package org.eclipse.hyades.trace.ui.internal.preferences; >+ >+import org.eclipse.osgi.util.NLS; >+ >+public class ACPrefMessages extends NLS { >+ protected static final String BUNDLE_NAME = "org.eclipse.hyades.trace.ui.internal.preferences.messages"; //$NON-NLS-1$ >+ >+ protected ACPrefMessages() { >+ } >+ >+ static { >+ // initialize resource bundle >+ NLS.initializeMessages(BUNDLE_NAME, ACPrefMessages.class); >+ } >+ >+ public static String _1; >+ public static String _2; >+ >+ public static String _3; >+ public static String _4; >+ >+} >#P org.eclipse.tptp.platform.common.ui >Index: src-common-internal/org/eclipse/tptp/platform/common/ui/internal/CommonUIPlugin.java >=================================================================== >RCS file: /cvsroot/tptp/platform/org.eclipse.tptp.platform.common.ui/src-common-internal/org/eclipse/tptp/platform/common/ui/internal/CommonUIPlugin.java,v >retrieving revision 1.9 >diff -u -r1.9 CommonUIPlugin.java >--- src-common-internal/org/eclipse/tptp/platform/common/ui/internal/CommonUIPlugin.java 24 Jan 2008 02:29:08 -0000 1.9 >+++ src-common-internal/org/eclipse/tptp/platform/common/ui/internal/CommonUIPlugin.java 11 Mar 2008 15:43:00 -0000 >@@ -255,6 +255,7 @@ > > protected void initializeDefaultPreferences(IPreferenceStore store) { > store.setDefault(HyadesUI.SWITCH_TO_PERSPECTIVE_KEY, MessageDialogWithToggle.PROMPT); >+ store.setDefault(CommonUIConstants.LOCALHOST_PORT, "10002"); > } > > public static void log(Throwable e) { >#P org.eclipse.hyades.trace.ui >Index: src/org/eclipse/hyades/trace/ui/internal/core/TraceProfileUI.java >=================================================================== >RCS file: /cvsroot/tptp/platform/org.eclipse.hyades.trace.ui/src/org/eclipse/hyades/trace/ui/internal/core/TraceProfileUI.java,v >retrieving revision 1.24 >diff -u -r1.24 TraceProfileUI.java >--- src/org/eclipse/hyades/trace/ui/internal/core/TraceProfileUI.java 28 Jan 2008 22:07:21 -0000 1.24 >+++ src/org/eclipse/hyades/trace/ui/internal/core/TraceProfileUI.java 11 Mar 2008 15:43:00 -0000 >@@ -32,6 +32,7 @@ > import org.eclipse.hyades.trace.ui.internal.util.TraceMessages; > import org.eclipse.hyades.trace.ui.launcher.IProfilingSetType; > import org.eclipse.hyades.trace.ui.launcher.ProfilingSetsManagerCopy; >+import org.eclipse.hyades.ui.HyadesUIPlugin; > import org.eclipse.jface.viewers.CheckStateChangedEvent; > import org.eclipse.jface.viewers.CheckboxTreeViewer; > import org.eclipse.jface.viewers.DoubleClickEvent; >@@ -568,7 +569,7 @@ > try > { > String currentHost = conf.getAttribute(IProfileLaunchConfigurationConstants.ATTR_HOSTNAME, CommonUITraceConstants.LOCAL_HOST); >- int currentPort = conf.getAttribute(IProfileLaunchConfigurationConstants.ATTR_PORT, UIPlugin.getDefault().getPreferenceStore().getDefaultInt(CommonUIConstants.LOCALHOST_PORT)); >+ int currentPort = conf.getAttribute(IProfileLaunchConfigurationConstants.ATTR_PORT, HyadesUIPlugin.getInstance().getPreferenceStore().getDefaultInt(CommonUIConstants.LOCALHOST_PORT)); > > > ConnectUtil connect = new ConnectUtil( currentHost, ""+currentPort,null); >Index: src/org/eclipse/hyades/trace/ui/internal/core/TraceOptionsUI.java >=================================================================== >RCS file: /cvsroot/tptp/platform/org.eclipse.hyades.trace.ui/src/org/eclipse/hyades/trace/ui/internal/core/TraceOptionsUI.java,v >retrieving revision 1.16 >diff -u -r1.16 TraceOptionsUI.java >--- src/org/eclipse/hyades/trace/ui/internal/core/TraceOptionsUI.java 5 Apr 2007 04:17:13 -0000 1.16 >+++ src/org/eclipse/hyades/trace/ui/internal/core/TraceOptionsUI.java 11 Mar 2008 15:43:00 -0000 >@@ -1,5 +1,5 @@ > /********************************************************************** >- * Copyright (c) 2005, 2007 IBM Corporation and others. >+ * Copyright (c) 2005, 2008 IBM Corporation and others. > * 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 >@@ -22,8 +22,6 @@ > import org.eclipse.jface.preference.IPreferenceStore; > import org.eclipse.jface.preference.PreferencePage; > import org.eclipse.swt.SWT; >-import org.eclipse.swt.events.ModifyEvent; >-import org.eclipse.swt.events.ModifyListener; > import org.eclipse.swt.events.SelectionEvent; > import org.eclipse.swt.events.SelectionListener; > import org.eclipse.swt.layout.GridData; >@@ -33,7 +31,6 @@ > import org.eclipse.swt.widgets.Group; > import org.eclipse.swt.widgets.Label; > import org.eclipse.swt.widgets.Text; >-import org.eclipse.tptp.platform.common.ui.internal.CommonUIConstants; > import org.eclipse.tptp.platform.common.ui.internal.CommonUIPlugin; > import org.eclipse.tptp.platform.common.ui.trace.internal.CommonUITraceConstants; > import org.eclipse.tptp.platform.common.ui.trace.internal.CommonUITracePlugin; >@@ -57,7 +54,7 @@ > * CONTEXT_ID tbpp0006 for Local IBM Remote Agent port number entry field in Profiling(Trace) preference page > */ > >-public class TraceOptionsUI implements SelectionListener, ModifyListener >+public class TraceOptionsUI implements SelectionListener > { > private Button _enableInfoMsg; > private Button _enableReloadMsg; >@@ -68,7 +65,6 @@ > private Button _neverPersp; > private Button _promptPersp; > private Text _projectName; >- private Text _localPort; > private PreferencePage _preferencePage; > > private Button _manualRefreshBtn; >@@ -118,13 +114,6 @@ > data = GridUtil.createHorizontalFill(); > _projectName.setLayoutData(data); > >- Label portdesc = new Label(profilingInfo, SWT.NULL); >- portdesc.setText(UIPlugin.getResourceString(TraceMessages.RAC_LHP)); >- _localPort = new Text(profilingInfo, SWT.BORDER); >- data = GridUtil.createHorizontalFill(); >- _localPort.setLayoutData(data); >- _localPort.addModifyListener(this); >- > _enableInfoMsg = new Button(profilingInfo, SWT.CHECK); > _enableInfoMsg.setText(UIPlugin.getResourceString(TraceMessages.SP_TIP)); > data = new GridData(); >@@ -259,10 +248,6 @@ > return _projectName.getText().trim(); > } > >-public String getLocalPortNumber() { >- return _localPort.getText().trim(); >-} >- > public String getSaveOnExitOption() { > if (_always.getSelection()) { > return MessageDialogWithToggle.ALWAYS; >@@ -295,7 +280,6 @@ > IPreferenceStore store = UIPlugin.getDefault().getPreferenceStore(); > > setProjectName(store.getString(CommonUITraceConstants.TRACE_PROJECT_NAME)); >- setLocalHostPort(store.getString(CommonUIConstants.LOCALHOST_PORT)); > setInfoMsgOption(store.getBoolean(TraceConstants.PROFILE_TIPS)); > setReloadMsgOption(store.getBoolean(CommonUITraceConstants.RELOAD_INFO)); > /* Navid Mehregani - bugzilla_158635: The SAVE_ON_EXIT_KEY option should be read and stored in the preference store of CommonUITracePlugin */ >@@ -352,11 +336,6 @@ > _projectName.setText(name); > } > >-public void setLocalHostPort(String portNum) >-{ >- _localPort.setText(portNum); >-} >- > public void setSaveOnExitOption(String value) { > if (MessageDialogWithToggle.ALWAYS.equals(value)) { > _always.setSelection(true); >@@ -422,33 +401,4 @@ > } > } > >-public void modifyText(ModifyEvent e) >-{ >- if (e.widget == _localPort) >- { >- try >- { >- if (_localPort.getText().trim() == "") >- { >- _preferencePage.setErrorMessage(UIPlugin.getResourceString(TraceMessages.RAC_EMPTY_PORT)); >- return; >- } >- >- int value = Integer.parseInt(_localPort.getText().trim()); >- if (value<0) >- { >- _preferencePage.setErrorMessage(UIPlugin.getResourceString(TraceMessages.RAC_INV_PRT)); >- _localPort.setFocus(); >- return; >- } >- _preferencePage.setErrorMessage(null); >- } >- catch (NumberFormatException nfe) >- { >- if (_preferencePage != null) >- _preferencePage.setErrorMessage(UIPlugin.getResourceString(TraceMessages.RAC_INV_PRT)); >- _localPort.setFocus(); >- } >- } >-} > } >Index: src/org/eclipse/tptp/trace/ui/internal/launcher/core/LauncherUtility.java >=================================================================== >RCS file: /cvsroot/tptp/platform/org.eclipse.hyades.trace.ui/src/org/eclipse/tptp/trace/ui/internal/launcher/core/LauncherUtility.java,v >retrieving revision 1.26 >diff -u -r1.26 LauncherUtility.java >--- src/org/eclipse/tptp/trace/ui/internal/launcher/core/LauncherUtility.java 24 Aug 2007 13:55:53 -0000 1.26 >+++ src/org/eclipse/tptp/trace/ui/internal/launcher/core/LauncherUtility.java 11 Mar 2008 15:43:00 -0000 >@@ -60,6 +60,7 @@ > import org.eclipse.hyades.trace.ui.launcher.IProfilingSet; > import org.eclipse.hyades.trace.ui.launcher.IProfilingSetType; > import org.eclipse.hyades.trace.ui.launcher.ProfilingAttribute; >+import org.eclipse.hyades.ui.HyadesUIPlugin; > import org.eclipse.jdt.launching.IVMRunner; > import org.eclipse.jdt.launching.VMRunnerConfiguration; > import org.eclipse.jface.dialogs.ErrorDialog; >@@ -825,7 +826,7 @@ > */ > public static int getPort (ILaunchConfiguration conf) throws CoreException > { >- IPreferenceStore store = UIPlugin.getDefault().getPreferenceStore(); >+ IPreferenceStore store = HyadesUIPlugin.getInstance().getPreferenceStore(); > int port = conf.getAttribute(IProfileLaunchConfigurationConstants.ATTR_PORT, store.getInt(CommonUIConstants.LOCALHOST_PORT)); > return port; > } >Index: src/org/eclipse/tptp/trace/ui/internal/launcher/deleg/application/PIDelegateHelper.java >=================================================================== >RCS file: /cvsroot/tptp/platform/org.eclipse.hyades.trace.ui/src/org/eclipse/tptp/trace/ui/internal/launcher/deleg/application/PIDelegateHelper.java,v >retrieving revision 1.17 >diff -u -r1.17 PIDelegateHelper.java >--- src/org/eclipse/tptp/trace/ui/internal/launcher/deleg/application/PIDelegateHelper.java 21 Dec 2007 11:59:07 -0000 1.17 >+++ src/org/eclipse/tptp/trace/ui/internal/launcher/deleg/application/PIDelegateHelper.java 11 Mar 2008 15:43:00 -0000 >@@ -39,6 +39,7 @@ > import org.eclipse.hyades.trace.ui.internal.piclient.PIProcessListener; > import org.eclipse.hyades.trace.ui.internal.util.PDCoreUtil; > import org.eclipse.hyades.trace.ui.launcher.IProfilingType; >+import org.eclipse.hyades.ui.HyadesUIPlugin; > import org.eclipse.tptp.platform.common.internal.CommonPlugin; > import org.eclipse.tptp.platform.common.ui.internal.CommonUIConstants; > import org.eclipse.tptp.platform.common.ui.trace.internal.CommonUITraceConstants; >@@ -419,7 +420,7 @@ > try > { > JVMVersionDetector.this.host = configuration.getAttribute(IProfileLaunchConfigurationConstants.ATTR_HOSTNAME, CommonUITraceConstants.LOCAL_HOST); >- JVMVersionDetector.this.port = configuration.getAttribute(IProfileLaunchConfigurationConstants.ATTR_PORT, UIPlugin.getDefault().getPreferenceStore().getDefaultInt(CommonUIConstants.LOCALHOST_PORT)); >+ JVMVersionDetector.this.port = configuration.getAttribute(IProfileLaunchConfigurationConstants.ATTR_PORT, HyadesUIPlugin.getInstance().getPreferenceStore().getDefaultInt(CommonUIConstants.LOCALHOST_PORT)); > } > catch (CoreException e) > { >Index: src/org/eclipse/hyades/trace/ui/internal/util/AttachConfigurationDetail.java >=================================================================== >RCS file: /cvsroot/tptp/platform/org.eclipse.hyades.trace.ui/src/org/eclipse/hyades/trace/ui/internal/util/AttachConfigurationDetail.java,v >retrieving revision 1.4 >diff -u -r1.4 AttachConfigurationDetail.java >--- src/org/eclipse/hyades/trace/ui/internal/util/AttachConfigurationDetail.java 28 May 2007 19:33:07 -0000 1.4 >+++ src/org/eclipse/hyades/trace/ui/internal/util/AttachConfigurationDetail.java 11 Mar 2008 15:43:00 -0000 >@@ -18,6 +18,7 @@ > import org.eclipse.debug.core.ILaunchConfiguration; > import org.eclipse.hyades.trace.ui.UIPlugin; > import org.eclipse.hyades.trace.ui.internal.launcher.IProfileLaunchConfigurationConstants; >+import org.eclipse.hyades.ui.HyadesUIPlugin; > import org.eclipse.jface.preference.IPreferenceStore; > import org.eclipse.tptp.platform.common.ui.internal.CommonUIConstants; > import org.eclipse.tptp.platform.common.ui.trace.internal.CommonUITraceConstants; >@@ -83,7 +84,7 @@ > { > try > { >- IPreferenceStore store = UIPlugin.getDefault().getPreferenceStore(); >+ IPreferenceStore store = HyadesUIPlugin.getInstance().getPreferenceStore(); > this.hostName = configuration.getAttribute(IProfileLaunchConfigurationConstants.ATTR_HOSTNAME, CommonUITraceConstants.LOCAL_HOST); > this.portNumber = String.valueOf(configuration.getAttribute(IProfileLaunchConfigurationConstants.ATTR_PORT, store.getInt(CommonUIConstants.LOCALHOST_PORT))); > this.project = configuration.getAttribute(IProfileLaunchConfigurationConstants.ATTR_DESTINATION_PROJECT, store.getString(CommonUITraceConstants.TRACE_PROJECT_NAME)); >Index: src/org/eclipse/hyades/trace/ui/internal/preferences/TraceBasePreferencePage.java >=================================================================== >RCS file: /cvsroot/tptp/platform/org.eclipse.hyades.trace.ui/src/org/eclipse/hyades/trace/ui/internal/preferences/TraceBasePreferencePage.java,v >retrieving revision 1.9 >diff -u -r1.9 TraceBasePreferencePage.java >--- src/org/eclipse/hyades/trace/ui/internal/preferences/TraceBasePreferencePage.java 5 Apr 2007 04:17:13 -0000 1.9 >+++ src/org/eclipse/hyades/trace/ui/internal/preferences/TraceBasePreferencePage.java 11 Mar 2008 15:43:00 -0000 >@@ -1,5 +1,5 @@ > /********************************************************************** >- * Copyright (c) 2005, 2007 IBM Corporation and others. >+ * Copyright (c) 2005, 2008 IBM Corporation and others. > * 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 >@@ -23,7 +23,6 @@ > import org.eclipse.swt.layout.GridLayout; > import org.eclipse.swt.widgets.Composite; > import org.eclipse.swt.widgets.Control; >-import org.eclipse.tptp.platform.common.ui.internal.CommonUIConstants; > import org.eclipse.tptp.platform.common.ui.internal.CommonUIPlugin; > import org.eclipse.tptp.platform.common.ui.trace.internal.CommonUITraceConstants; > import org.eclipse.tptp.platform.common.ui.trace.internal.CommonUITracePlugin; >@@ -89,7 +88,7 @@ > */ > private void initializeDefaults() > { >- IPreferenceStore store = getPreferenceStore(); >+ IPreferenceStore store = getPreferenceStore(); > > _options.setInfoMsgOption(store.getDefaultBoolean(TraceConstants.PROFILE_TIPS)); > _options.setReloadMsgOption(store.getDefaultBoolean(CommonUITraceConstants.RELOAD_INFO)); >@@ -99,8 +98,6 @@ > _options.setSwitchPerspOption(CommonUIPlugin.getDefault().getPreferenceStore().getDefaultString(HyadesUI.SWITCH_TO_PERSPECTIVE_KEY)); > _options.setRefreshType(store.getDefaultInt(TraceConstants.REFRESH_TYPE), store.getDefaultInt(TraceConstants.REFRESH_INTERVAL)); > >- store = UIPlugin.getDefault().getPreferenceStore(); >- _options.setLocalHostPort(store.getDefaultString(CommonUIConstants.LOCALHOST_PORT)); > } > /** > * Does anything necessary because the default button has been pressed. >@@ -127,7 +124,6 @@ > IPreferenceStore store = getPreferenceStore(); > > store.setValue(CommonUITraceConstants.TRACE_PROJECT_NAME, _options.getProjectName()); >- store.setValue(CommonUIConstants.LOCALHOST_PORT, _options.getLocalPortNumber()); > store.setValue(TraceConstants.PROFILE_TIPS, _options.getInfoMsgOption()); > store.setValue(CommonUITraceConstants.RELOAD_INFO, _options.getReloadMsgOption()); > /* Navid Mehregani - bugzilla_158635: The SAVE_ON_EXIT_KEY option should be read and stored in the preference store of CommonUITracePlugin */ >#P org.eclipse.hyades.ui >Index: plugin.properties >=================================================================== >RCS file: /cvsroot/tptp/platform/org.eclipse.hyades.ui/plugin.properties,v >retrieving revision 1.47 >diff -u -r1.47 plugin.properties >--- plugin.properties 23 Mar 2007 04:46:19 -0000 1.47 >+++ plugin.properties 11 Mar 2008 15:43:01 -0000 >@@ -29,7 +29,6 @@ > _8 = Sample Wizards > _9 = Security Certificate > _10 = Import a Security Certificate to allow secure connections to agent controller. >-_11 = Agent Controller > _12 = Scroll up the sequence diagram > _14 = Scroll down the sequence diagram > _16 = Scroll left the sequence diagram >Index: plugin.xml >=================================================================== >RCS file: /cvsroot/tptp/platform/org.eclipse.hyades.ui/plugin.xml,v >retrieving revision 1.44 >diff -u -r1.44 plugin.xml >--- plugin.xml 7 Dec 2007 04:17:41 -0000 1.44 >+++ plugin.xml 11 Mar 2008 15:43:01 -0000 >@@ -44,18 +44,14 @@ > </extension> > > <!-- ==================================================================== --> >-<!-- Preferences pages. --> >+<!-- Preferences pages - Agent Controller > Security Preference --> > <!-- ==================================================================== --> > <extension > point="org.eclipse.ui.preferencePages"> > <page >- class="org.eclipse.hyades.security.internal.preference.ACPreferencePage" >- id="org.eclipse.hyades.security.internal.preference.ACPreferencePage" >- name="%_11"/> >- <page > class="org.eclipse.hyades.security.internal.preference.SecurityPreferencePage" > id="org.eclipse.hyades.security.internal.preference.SecurityPreferencePage" >- category="org.eclipse.hyades.security.internal.preference.ACPreferencePage" >+ category="org.eclipse.hyades.trace.ui.internal.preferences.ACPreferencePage" > name="%_9"/> > </extension> > <!-- ==================================================================== --> >Index: src/org/eclipse/hyades/ui/HyadesUIPlugin.java >=================================================================== >RCS file: /cvsroot/tptp/platform/org.eclipse.hyades.ui/src/org/eclipse/hyades/ui/HyadesUIPlugin.java,v >retrieving revision 1.11 >diff -u -r1.11 HyadesUIPlugin.java >--- src/org/eclipse/hyades/ui/HyadesUIPlugin.java 18 Sep 2006 22:12:37 -0000 1.11 >+++ src/org/eclipse/hyades/ui/HyadesUIPlugin.java 11 Mar 2008 15:43:01 -0000 >@@ -1,5 +1,5 @@ > /******************************************************************************* >- * Copyright (c) 2005, 2006 IBM Corporation and others. >+ * Copyright (c) 2005, 2008 IBM Corporation and others. > * 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 >@@ -23,8 +23,10 @@ > import org.eclipse.hyades.ui.internal.logicalfolder.LogicalFolder; > import org.eclipse.hyades.ui.internal.util.ResourceBundleManager; > import org.eclipse.hyades.ui.util.ILogger; >+import org.eclipse.jface.preference.IPreferenceStore; > import org.eclipse.swt.widgets.Display; > import org.eclipse.tptp.platform.common.internal.CommonPlugin; >+import org.eclipse.tptp.platform.common.ui.internal.CommonUIConstants; > import org.eclipse.ui.plugin.AbstractUIPlugin; > import org.osgi.framework.BundleContext; > >@@ -96,6 +98,11 @@ > return instance; > } > >+ protected void initializePreferences() >+ { >+ /* Default host */ >+ IPreferenceStore store = getPreferenceStore(); >+ } > > /** > * @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext) >@@ -131,7 +138,9 @@ > Display.getDefault().asyncExec(operation); > } > >- restoreFilterSelections(); >+ restoreFilterSelections(); >+ >+ initializePreferences(); > } > > /** >Index: src/org/eclipse/hyades/security/internal/preference/ACPreferencePage.java >=================================================================== >RCS file: src/org/eclipse/hyades/security/internal/preference/ACPreferencePage.java >diff -N src/org/eclipse/hyades/security/internal/preference/ACPreferencePage.java >--- src/org/eclipse/hyades/security/internal/preference/ACPreferencePage.java 19 Apr 2007 19:35:37 -0000 1.1 >+++ /dev/null 1 Jan 1970 00:00:00 -0000 >@@ -1,41 +0,0 @@ >-/********************************************************************** >- * Copyright (c) 2007 IBM Corporation and others. >- * 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 >- * http://www.eclipse.org/legal/epl-v10.html >- * $Id: ACPreferencePage.java,v 1.1 2007/04/19 19:35:37 nmehrega Exp $ >- * >- * Contributors: >- * IBM - Initial API and implementation >- **********************************************************************/ >- >-package org.eclipse.hyades.security.internal.preference; >- >-import org.eclipse.jface.dialogs.Dialog; >-import org.eclipse.jface.preference.PreferencePage; >-import org.eclipse.swt.SWT; >-import org.eclipse.swt.widgets.Composite; >-import org.eclipse.swt.widgets.Control; >-import org.eclipse.ui.IWorkbench; >-import org.eclipse.ui.IWorkbenchPreferencePage; >- >-public class ACPreferencePage extends PreferencePage >- implements IWorkbenchPreferencePage { >- >- /* (non-Javadoc) >- * @see org.eclipse.ui.IWorkbenchPreferencePage#init(org.eclipse.ui.IWorkbench) >- */ >- public void init(IWorkbench workbench) { >- // Do nothing >- } >- >- protected Control createContents(Composite parent) { >- Composite comp = new Composite( parent, SWT.NONE ); >- >- Dialog.applyDialogFont( comp ); >- >- return comp; >- } >- >-} >#P org.eclipse.tptp.platform.iac.administrator >Index: plugin.xml >=================================================================== >RCS file: /cvsroot/tptp/platform/org.eclipse.tptp.platform.iac.administrator/plugin.xml,v >retrieving revision 1.3 >diff -u -r1.3 plugin.xml >--- plugin.xml 28 Feb 2008 23:13:08 -0000 1.3 >+++ plugin.xml 11 Mar 2008 15:43:02 -0000 >@@ -19,7 +19,7 @@ > <page > class="org.eclipse.tptp.platform.iac.administrator.internal.preference.IACPreferencePage" > id="org.eclipse.tptp.platform.iac.administrator.internal.preference.IACPreferencePage" >- category="org.eclipse.hyades.security.internal.preference.ACPreferencePage" >+ category="org.eclipse.hyades.trace.ui.internal.preferences.ACPreferencePage" > name="%preference.name"> > </page> > </extension> >#P org.eclipse.tptp.platform.profile.server.core >Index: src/org/eclipse/tptp/platform/profile/server/core/internal/ProfileOnServerAdapter.java >=================================================================== >RCS file: /cvsroot/tptp/platform/org.eclipse.tptp.platform.profile.server.core/src/org/eclipse/tptp/platform/profile/server/core/internal/ProfileOnServerAdapter.java,v >retrieving revision 1.12 >diff -u -r1.12 ProfileOnServerAdapter.java >--- src/org/eclipse/tptp/platform/profile/server/core/internal/ProfileOnServerAdapter.java 16 Jun 2007 13:59:09 -0000 1.12 >+++ src/org/eclipse/tptp/platform/profile/server/core/internal/ProfileOnServerAdapter.java 11 Mar 2008 15:43:02 -0000 >@@ -26,6 +26,7 @@ > import org.eclipse.hyades.trace.ui.internal.launcher.AttachDelegate; > import org.eclipse.hyades.trace.ui.internal.launcher.IProfileLaunchConfigurationConstants; > import org.eclipse.hyades.trace.ui.internal.util.PDCoreUtil; >+import org.eclipse.hyades.ui.HyadesUIPlugin; > import org.eclipse.jface.dialogs.Dialog; > import org.eclipse.jface.wizard.WizardDialog; > import org.eclipse.tptp.platform.common.ui.internal.CommonUIConstants; >@@ -57,7 +58,7 @@ > } > > /* get port number */ >- int port = wc.getAttribute(IProfileLaunchConfigurationConstants.ATTR_PORT, UIPlugin.getDefault().getPreferenceStore().getInt(CommonUIConstants.LOCALHOST_PORT)); >+ int port = wc.getAttribute(IProfileLaunchConfigurationConstants.ATTR_PORT, HyadesUIPlugin.getInstance().getPreferenceStore().getInt(CommonUIConstants.LOCALHOST_PORT)); > > /* set host and port attribute of launch configuration */ > wc.setAttribute(IProfileLaunchConfigurationConstants.ATTR_HOSTNAME, hostname);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 199594
:
91403
|
91581
|
92181
|
92194