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 80960 Details for
Bug 121593
All server configurations need timeout options the user can override.
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]
timeout per server enhancement
timeout_patch3.txt (text/plain), 21.16 KB, created by
Angel Vera
on 2007-10-23 10:55:37 EDT
(
hide
)
Description:
timeout per server enhancement
Filename:
MIME Type:
Creator:
Angel Vera
Created:
2007-10-23 10:55:37 EDT
Size:
21.16 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.wst.server.ui >Index: serverui/org/eclipse/wst/server/ui/internal/editor/OverviewEditorPart.java >=================================================================== >RCS file: /cvsroot/webtools/wst/components/server/plugins/org.eclipse.wst.server.ui/serverui/org/eclipse/wst/server/ui/internal/editor/OverviewEditorPart.java,v >retrieving revision 1.47 >diff -u -r1.47 OverviewEditorPart.java >--- serverui/org/eclipse/wst/server/ui/internal/editor/OverviewEditorPart.java 4 Oct 2007 21:55:47 -0000 1.47 >+++ serverui/org/eclipse/wst/server/ui/internal/editor/OverviewEditorPart.java 23 Oct 2007 11:30:40 -0000 >@@ -87,6 +87,8 @@ > protected Button autoPublishDisable; > protected Button autoPublishOverride; > protected Spinner autoPublishTime; >+ protected Spinner startTimeoutSpinner; >+ protected Spinner stopTimeoutSpinner; > > protected boolean updating; > >@@ -238,6 +240,7 @@ > rightColumnComp.setLayoutData(new GridData(GridData.FILL_HORIZONTAL | GridData.VERTICAL_ALIGN_FILL)); > > createAutoPublishSection(rightColumnComp, toolkit); >+ createTimeoutSection(rightColumnComp, toolkit); > > insertSections(rightColumnComp, "org.eclipse.wst.server.editor.overview.right"); > >@@ -643,7 +646,120 @@ > }); > } > } >+ >+ protected void createTimeoutSection(Composite rightColumnComp, FormToolkit toolkit) { >+ Section section = toolkit.createSection(rightColumnComp, ExpandableComposite.TWISTIE | ExpandableComposite.TITLE_BAR | Section.DESCRIPTION | ExpandableComposite.FOCUS_TITLE); >+ section.setText(Messages.serverEditorOverviewTimeoutSection); >+ section.setDescription(Messages.serverEditorOverviewTimeoutDescription); >+ section.setLayoutData(new GridData(GridData.FILL_HORIZONTAL | GridData.VERTICAL_ALIGN_FILL)); >+ >+ Composite composite = toolkit.createComposite(section); >+ GridLayout layout = new GridLayout(); >+ layout.numColumns = 4; >+ layout.marginHeight = 5; >+ layout.marginWidth = 10; >+ layout.verticalSpacing = 5; >+ layout.horizontalSpacing = 15; >+ composite.setLayout(layout); >+ composite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL | GridData.VERTICAL_ALIGN_FILL)); >+ IWorkbenchHelpSystem whs = PlatformUI.getWorkbench().getHelpSystem(); >+ whs.setHelp(composite, ContextIds.EDITOR_OVERVIEW_PAGE); >+ toolkit.paintBordersFor(composite); >+ section.setClient(composite); >+ >+ // Timeout >+ if (server != null) { >+ final Server svr = (Server) server; >+ >+ // StartTimeout Label >+ final Label startTimeoutLabel = toolkit.createLabel(composite, Messages.serverEditorOverviewStartTimeout); >+ GridData data = new GridData(); >+ data.horizontalIndent = 20; >+ startTimeoutLabel.setLayoutData(data); >+ >+ startTimeoutSpinner = new Spinner(composite, SWT.BORDER); >+ startTimeoutSpinner.setEnabled(true); >+ startTimeoutSpinner.setMinimum(0); >+ startTimeoutSpinner.setMaximum(1000*60*30); // 30 minutes >+ startTimeoutSpinner.setSelection(svr.getStartTimeoutSetting()); >+ setSpinnerTooltip(startTimeoutSpinner); >+ data = new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING); >+ data.widthHint = 60; >+ startTimeoutSpinner.setLayoutData(data); >+ >+ // StopTimeout Label >+ final Label stopTimeoutLabel = toolkit.createLabel(composite, Messages.serverEditorOverviewStopTimeout); >+ data = new GridData(); >+ data.horizontalIndent = 20; >+ stopTimeoutLabel.setLayoutData(data); >+ >+ stopTimeoutSpinner = new Spinner(composite, SWT.BORDER); >+ stopTimeoutSpinner.setEnabled(true); >+ stopTimeoutSpinner.setMinimum(0); >+ stopTimeoutSpinner.setMaximum(1000*60*30); // 30 minutes >+ stopTimeoutSpinner.setSelection(svr.getStopTimoutSetting()); >+ setSpinnerTooltip(stopTimeoutSpinner); >+ data = new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING); >+ data.widthHint = 60; >+ stopTimeoutSpinner.setLayoutData(data); >+ >+ startTimeoutSpinner.addModifyListener(new ModifyListener(){ > >+ public void modifyText(ModifyEvent e) { >+ if (updating) >+ return; >+ updating = true; >+ try { >+ setSpinnerTooltip(startTimeoutSpinner); >+ execute(new SetServerStartTimeoutCommand(getServer(), startTimeoutSpinner.getSelection())); >+ } catch (Exception ex) { >+ // ignore >+ } >+ updating = false; >+ validate(); >+ >+ } >+ >+ }); >+ stopTimeoutSpinner.addModifyListener(new ModifyListener(){ >+ public void modifyText(ModifyEvent e) { >+ if (updating) >+ return; >+ updating = true; >+ try { >+ setSpinnerTooltip(stopTimeoutSpinner); >+ execute(new SetServerStopTimeoutCommand(getServer(), stopTimeoutSpinner.getSelection())); >+ } catch (Exception ex) { >+ // ignore >+ } >+ updating = false; >+ validate(); >+ >+ } >+ }); >+ } >+ >+ >+ } >+ >+ >+ protected void setSpinnerTooltip(Spinner spinner){ >+ float miliSeconds = new Float(spinner.getSelection()).floatValue(); >+ float seconds = miliSeconds / 1000f; >+ >+ if ( seconds < 60) { >+ >+ spinner.setToolTipText( seconds +" seconds"); >+ return; >+ } >+ >+ int minutes = new Float(seconds).intValue() / 60; >+ spinner.setToolTipText( minutes +" minutes"); >+ >+ >+ >+ >+ } > protected void editRuntime(IRuntime runtime) { > IRuntimeWorkingCopy runtimeWorkingCopy = runtime.createWorkingCopy(); > if (showWizard(runtimeWorkingCopy) != Window.CANCEL) { >Index: serverui/org/eclipse/wst/server/ui/internal/Messages.java >=================================================================== >RCS file: /cvsroot/webtools/wst/components/server/plugins/org.eclipse.wst.server.ui/serverui/org/eclipse/wst/server/ui/internal/Messages.java,v >retrieving revision 1.47 >diff -u -r1.47 Messages.java >--- serverui/org/eclipse/wst/server/ui/internal/Messages.java 17 Oct 2007 21:59:04 -0000 1.47 >+++ serverui/org/eclipse/wst/server/ui/internal/Messages.java 23 Oct 2007 11:30:40 -0000 >@@ -302,6 +302,16 @@ > public static String serverEditorOverviewServerNameCommand; > public static String serverEditorOverviewRuntimeCommand; > public static String serverEditorOverviewOpenLaunchConfiguration; >+ >+ public static String serverEditorOverviewTimeoutSection; >+ public static String serverEditorOverviewTimeoutDescription; >+ public static String serverEditorOverviewTimeoutCommand; >+ >+ public static String serverEditorOverviewStartTimeout; >+ public static String serverEditorOverviewStopTimeout; >+ >+ >+ > public static String errorMissingConfiguration; > public static String viewStatusStarting4; > public static String viewStatusStarted2; >@@ -359,6 +369,7 @@ > > public static String preferenceInternetDescription; > public static String internalWebBrowserName; >+ > > static { > NLS.initializeMessages(ServerUIPlugin.PLUGIN_ID + ".internal.Messages", Messages.class); >Index: serverui/org/eclipse/wst/server/ui/internal/ServerPreferencePage.java >=================================================================== >RCS file: /cvsroot/webtools/wst/components/server/plugins/org.eclipse.wst.server.ui/serverui/org/eclipse/wst/server/ui/internal/ServerPreferencePage.java,v >retrieving revision 1.26 >diff -u -r1.26 ServerPreferencePage.java >--- serverui/org/eclipse/wst/server/ui/internal/ServerPreferencePage.java 14 Oct 2007 20:48:14 -0000 1.26 >+++ serverui/org/eclipse/wst/server/ui/internal/ServerPreferencePage.java 23 Oct 2007 11:30:40 -0000 >@@ -12,14 +12,12 @@ > > import org.eclipse.jface.dialogs.Dialog; > import org.eclipse.jface.preference.PreferencePage; >-import org.eclipse.wst.server.core.internal.ServerPreferences; > import org.eclipse.swt.SWT; > import org.eclipse.swt.events.SelectionAdapter; > import org.eclipse.swt.events.SelectionEvent; > import org.eclipse.swt.layout.GridData; > import org.eclipse.swt.layout.GridLayout; > import org.eclipse.swt.widgets.Button; >-import org.eclipse.swt.widgets.Combo; > import org.eclipse.swt.widgets.Composite; > import org.eclipse.swt.widgets.Control; > import org.eclipse.swt.widgets.Label; >@@ -28,6 +26,7 @@ > import org.eclipse.ui.IWorkbenchPreferencePage; > import org.eclipse.ui.PlatformUI; > import org.eclipse.ui.help.IWorkbenchHelpSystem; >+import org.eclipse.wst.server.core.internal.ServerPreferences; > /** > * The preference page that holds server properties. > */ >@@ -45,8 +44,6 @@ > protected Button autoPublishRemote; > protected Spinner autoPublishRemoteTime; > >- protected Combo machineSpeedCombo; >- > /** > * ServerPreferencesPage constructor comment. > */ >@@ -169,26 +166,6 @@ > label = new Label(composite, SWT.NONE); > label.setText(Messages.prefMachineSpeed); > >- machineSpeedCombo = new Combo(composite, SWT.READ_ONLY); >- String[] items = new String[] { >- Messages.prefMachineSpeedUnlimited, >- Messages.prefMachineSpeedVerySlow, >- Messages.prefMachineSpeedSlow, >- Messages.prefMachineSpeedAverage, >- Messages.prefMachineSpeedFast, >- Messages.prefMachineSpeedVeryFast >- }; >- machineSpeedCombo.setItems(items); >- int speed = preferences.getMachineSpeed(); >- if (speed < 0) >- machineSpeedCombo.select(0); >- else >- machineSpeedCombo.select((speed - 1) / 2 + 1); >- data = new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING); >- data.horizontalSpan = 2; >- machineSpeedCombo.setLayoutData(data); >- whs.setHelp(machineSpeedCombo, ContextIds.PREF_GENERAL_TIMEOUT_DELAY); >- > Dialog.applyDialogFont(composite); > > return composite; >@@ -215,7 +192,6 @@ > autoPublishRemote.setSelection(preferences.getDefaultAutoPublishRemote()); > autoPublishRemoteTime.setSelection(preferences.getDefaultAutoPublishRemoteTime()); > >- machineSpeedCombo.select((preferences.getDefaultMachineSpeed() - 1) / 2 + 1); > > super.performDefaults(); > } >@@ -232,12 +208,6 @@ > preferences.setAutoPublishRemote(autoPublishRemote.getSelection()); > preferences.setAutoPublishRemoteTime(autoPublishRemoteTime.getSelection()); > >- int speed = machineSpeedCombo.getSelectionIndex(); >- if (speed == 0) >- speed = -1; >- else >- speed = (speed - 1) * 2 + 1; >- preferences.setMachineSpeed(speed); > > return true; > } >Index: serverui/org/eclipse/wst/server/ui/internal/Messages.properties >=================================================================== >RCS file: /cvsroot/webtools/wst/components/server/plugins/org.eclipse.wst.server.ui/serverui/org/eclipse/wst/server/ui/internal/Messages.properties,v >retrieving revision 1.71 >diff -u -r1.71 Messages.properties >--- serverui/org/eclipse/wst/server/ui/internal/Messages.properties 22 Oct 2007 14:44:25 -0000 1.71 >+++ serverui/org/eclipse/wst/server/ui/internal/Messages.properties 23 Oct 2007 11:30:40 -0000 >@@ -444,7 +444,7 @@ > serverEditorOverviewRuntimeCommand=set runtime > > serverEditorOverviewAutoPublishSection=Automatic Publishing >-serverEditorOverviewAutoPublishDescription=Override when the server is automatically published to. >+serverEditorOverviewAutoPublishDescription=Override when the server is automatically published. > serverEditorOverviewAutoPublishDefault=Use default publishing settings > serverEditorOverviewAutoPublishDefaultEdit=Edit > serverEditorOverviewAutoPublishOverride=Override default settings >@@ -454,6 +454,15 @@ > serverEditorOverviewOpenLaunchConfiguration=Open launch configuration > serverEditorOverviewAutoPublishInvalid=The automatic publish setting is invalid. It must be a 1 second or more. > >+serverEditorOverviewTimeoutSection=Timeouts intervals >+serverEditorOverviewTimeoutDescription=Specify the time to wait until the server state is received >+serverEditorOverviewStartTimeout=Start >+serverEditorOverviewStopTimeout=Stop >+serverEditorOverviewTimeoutCommand=modify timeout settings >+ >+ >+ >+ > # Menu items. {0} will be replaced by one of the xxxEditorActionXxx fields > # from below. @Ctrl+Z is the menu mnemonic > editorUndoEnabled=Undo {0}@Ctrl+Z >Index: serverui/org/eclipse/wst/server/ui/internal/command/SetServerStopTimeoutCommand.java >=================================================================== >RCS file: serverui/org/eclipse/wst/server/ui/internal/command/SetServerStopTimeoutCommand.java >diff -N serverui/org/eclipse/wst/server/ui/internal/command/SetServerStopTimeoutCommand.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ serverui/org/eclipse/wst/server/ui/internal/command/SetServerStopTimeoutCommand.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,50 @@ >+/******************************************************************************* >+ * Copyright (c) 2005, 2006 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 >+ * >+ * Contributors: >+ * IBM Corporation - Initial API and implementation >+ *******************************************************************************/ >+package org.eclipse.wst.server.ui.internal.command; >+ >+import org.eclipse.wst.server.core.IServerWorkingCopy; >+import org.eclipse.wst.server.core.internal.ServerWorkingCopy; >+import org.eclipse.wst.server.ui.internal.Messages; >+/** >+ * Command to change the server's auto-publish setting. >+ */ >+public class SetServerStopTimeoutCommand extends ServerCommand { >+ protected int time; >+ protected int oldTime; >+ >+ /** >+ * SetServerAutoPublishDefaultCommand constructor. >+ * >+ * @param server a server >+ * @param time a publish time >+ */ >+ public SetServerStopTimeoutCommand(IServerWorkingCopy server, int time) { >+ super(server, Messages.serverEditorOverviewTimeoutCommand); >+ this.time = time; >+ } >+ >+ /** >+ * Execute the command. >+ */ >+ public void execute() { >+ ServerWorkingCopy swc = (ServerWorkingCopy) server; >+ oldTime = swc.getStopTimoutSetting(); >+ swc.setStopTimeout(time); >+ } >+ >+ /** >+ * Undo the command. >+ */ >+ public void undo() { >+ ServerWorkingCopy swc = (ServerWorkingCopy) server; >+ swc.setStopTimeout(oldTime); >+ } >+} >Index: serverui/org/eclipse/wst/server/ui/internal/command/SetServerStartTimeoutCommand.java >=================================================================== >RCS file: serverui/org/eclipse/wst/server/ui/internal/command/SetServerStartTimeoutCommand.java >diff -N serverui/org/eclipse/wst/server/ui/internal/command/SetServerStartTimeoutCommand.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ serverui/org/eclipse/wst/server/ui/internal/command/SetServerStartTimeoutCommand.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,50 @@ >+/******************************************************************************* >+ * Copyright (c) 2005, 2006 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 >+ * >+ * Contributors: >+ * IBM Corporation - Initial API and implementation >+ *******************************************************************************/ >+package org.eclipse.wst.server.ui.internal.command; >+ >+import org.eclipse.wst.server.core.IServerWorkingCopy; >+import org.eclipse.wst.server.core.internal.ServerWorkingCopy; >+import org.eclipse.wst.server.ui.internal.Messages; >+/** >+ * Command to change the server's auto-publish setting. >+ */ >+public class SetServerStartTimeoutCommand extends ServerCommand { >+ protected int time; >+ protected int oldTime; >+ >+ /** >+ * SetServerAutoPublishDefaultCommand constructor. >+ * >+ * @param server a server >+ * @param time a publish time >+ */ >+ public SetServerStartTimeoutCommand(IServerWorkingCopy server, int time) { >+ super(server, Messages.serverEditorOverviewTimeoutCommand); >+ this.time = time; >+ } >+ >+ /** >+ * Execute the command. >+ */ >+ public void execute() { >+ ServerWorkingCopy swc = (ServerWorkingCopy) server; >+ oldTime = swc.getStartTimeoutSetting(); >+ swc.setStartTimeout(time); >+ } >+ >+ /** >+ * Undo the command. >+ */ >+ public void undo() { >+ ServerWorkingCopy swc = (ServerWorkingCopy) server; >+ swc.setStartTimeout(oldTime); >+ } >+} >#P org.eclipse.wst.server.core >Index: servercore/org/eclipse/wst/server/core/internal/Server.java >=================================================================== >RCS file: /cvsroot/webtools/wst/components/server/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/internal/Server.java,v >retrieving revision 1.122 >diff -u -r1.122 Server.java >--- servercore/org/eclipse/wst/server/core/internal/Server.java 14 Oct 2007 21:12:50 -0000 1.122 >+++ servercore/org/eclipse/wst/server/core/internal/Server.java 23 Oct 2007 11:30:43 -0000 >@@ -70,6 +70,8 @@ > protected static final String PROP_ENABLED_OPTIONAL_TASKS = "enabled-optional-publish-tasks"; > public static final String PROP_AUTO_PUBLISH_TIME = "auto-publish-time"; > public static final String PROP_AUTO_PUBLISH_SETTING = "auto-publish-setting"; >+ public static final String PROP_START_TIMEOUT = "start-timeout"; >+ public static final String PROP_STOP_TIMEOUT = "stop-timeout"; > > protected static final char[] INVALID_CHARS = new char[] {'\\', '/', ':', '*', '?', '"', '<', '>', '|', '\0', '@', '&'}; > >@@ -233,6 +235,8 @@ > this.serverType = serverType; > map.put("server-type-id", serverType.getId()); > map.put(PROP_HOSTNAME, "localhost"); >+ map.put(PROP_START_TIMEOUT, ((ServerType)serverType).getStartTimeout() ); >+ map.put(PROP_STOP_TIMEOUT, ((ServerType)serverType).getStopTimeout() ); > if (runtime != null && runtime.getRuntimeType() != null) { > String name = runtime.getRuntimeType().getName(); > map.put(PROP_NAME, name); >@@ -352,6 +356,15 @@ > public int getAutoPublishSetting() { > return getAttribute(PROP_AUTO_PUBLISH_SETTING, AUTO_PUBLISH_DEFAULT); > } >+ >+ public int getStartTimeoutSetting() { >+ return getAttribute(PROP_START_TIMEOUT, ((ServerType)getServerType()).getStartTimeout()); >+ } >+ >+ public int getStopTimoutSetting() { >+ return getAttribute(PROP_STOP_TIMEOUT, ((ServerType)getServerType()).getStopTimeout()); >+ } >+ > > /** > * Returns a list of id (String) of preferred publish operations that will not be run >@@ -1537,7 +1550,7 @@ > addServerListener(listener); > > // add timeout thread >- final int serverTimeout = ((ServerType) getServerType()).getStartTimeout(); >+ final int serverTimeout = getStartTimeoutSetting(); > if (serverTimeout > 0) { > Thread thread = new Thread("Server start timeout") { > public void run() { >@@ -1846,7 +1859,7 @@ > operation.listener = listener; > addServerListener(listener); > >- final int serverTimeout = ((ServerType) getServerType()).getStopTimeout(); >+ final int serverTimeout = getStopTimoutSetting(); > if (serverTimeout > 0) { > Thread thread = new Thread("Server stop timeout") { > public void run() { >Index: servercore/org/eclipse/wst/server/core/internal/ServerWorkingCopy.java >=================================================================== >RCS file: /cvsroot/webtools/wst/components/server/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/internal/ServerWorkingCopy.java,v >retrieving revision 1.54 >diff -u -r1.54 ServerWorkingCopy.java >--- servercore/org/eclipse/wst/server/core/internal/ServerWorkingCopy.java 23 Oct 2007 00:54:53 -0000 1.54 >+++ servercore/org/eclipse/wst/server/core/internal/ServerWorkingCopy.java 23 Oct 2007 11:30:44 -0000 >@@ -227,6 +227,14 @@ > public void setAutoPublishTime(int p) { > setAttribute(PROP_AUTO_PUBLISH_TIME, p); > } >+ >+ public void setStartTimeout(int p) { >+ setAttribute(PROP_START_TIMEOUT, p); >+ } >+ >+ public void setStopTimeout(int p) { >+ setAttribute(PROP_STOP_TIMEOUT, p); >+ } > > public void setAutoPublishSetting(int s) { > setAttribute(PROP_AUTO_PUBLISH_SETTING, s); >Index: servercore/org/eclipse/wst/server/core/internal/ServerType.java >=================================================================== >RCS file: /cvsroot/webtools/wst/components/server/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/internal/ServerType.java,v >retrieving revision 1.35 >diff -u -r1.35 ServerType.java >--- servercore/org/eclipse/wst/server/core/internal/ServerType.java 29 Aug 2007 14:18:33 -0000 1.35 >+++ servercore/org/eclipse/wst/server/core/internal/ServerType.java 23 Oct 2007 11:30:44 -0000 >@@ -29,8 +29,6 @@ > */ > public class ServerType implements IServerType { > private static final int DEFAULT_TIMEOUT = 1000 * 60 * 4; // 4 minutes >- private static final float[] SERVER_TIMEOUTS = >- new float[] { 4f, 3f, 2f, 1.5f, 1f, 0.75f, 0.5f, 0.35f, 0.25f }; > private IConfigurationElement element; > > /** >@@ -306,10 +304,7 @@ > public int getStartTimeout() { > try { > int i = Integer.parseInt(element.getAttribute("startTimeout")); >- int s = ServerPreferences.getInstance().getMachineSpeed(); >- if (s < 0) >- return -1; >- return (int) (i * SERVER_TIMEOUTS[s-1]); >+ return i; > } catch (NumberFormatException e) { > // ignore > } >@@ -325,10 +320,7 @@ > public int getStopTimeout() { > try { > int i = Integer.parseInt(element.getAttribute("stopTimeout")); >- int s = ServerPreferences.getInstance().getMachineSpeed(); >- if (s < 0) >- return -1; >- return (int) (i * SERVER_TIMEOUTS[s-1]); >+ return i; > } catch (NumberFormatException e) { > // ignore > }
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 121593
: 80960