-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fixes #219: Add "auto-repeat" button to Integrity Test Runner view
- Loading branch information
Showing
2 changed files
with
129 additions
and
8 deletions.
There are no files selected for viewing
62 changes: 62 additions & 0 deletions
62
de.gebit.integrity.eclipse/src/de/gebit/integrity/eclipse/views/ConnectDialog.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
/******************************************************************************* | ||
* Copyright (c) 2013 Rene Schneider, GEBIT Solutions GmbH 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 | ||
*******************************************************************************/ | ||
package de.gebit.integrity.eclipse.views; | ||
|
||
import org.eclipse.jface.dialogs.IDialogConstants; | ||
import org.eclipse.jface.dialogs.IInputValidator; | ||
import org.eclipse.jface.dialogs.InputDialog; | ||
import org.eclipse.swt.widgets.Composite; | ||
import org.eclipse.swt.widgets.Shell; | ||
|
||
/** | ||
* | ||
* | ||
* @author Rene Schneider - initial API and implementation | ||
* | ||
*/ | ||
public class ConnectDialog extends InputDialog { | ||
|
||
/** | ||
* Whether auto-retry was chosen. | ||
*/ | ||
private boolean autoRetryEnabled; | ||
|
||
/** | ||
* @param parentShell | ||
* @param aDialogTitle | ||
* @param aDialogMessage | ||
* @param anInitialValue | ||
* @param aValidator | ||
*/ | ||
public ConnectDialog(Shell aParentShell, String anInitialValue, IInputValidator aValidator) { | ||
super(aParentShell, "Connect to test runner", "Please enter the hostname or IP address to connect to", | ||
anInitialValue, null); | ||
} | ||
|
||
@Override | ||
protected void createButtonsForButtonBar(Composite aParent) { | ||
super.createButtonsForButtonBar(aParent); | ||
|
||
createButton(aParent, IDialogConstants.RETRY_ID, "OK (retry)", false); | ||
} | ||
|
||
@Override | ||
protected void buttonPressed(int aButtonId) { | ||
if (aButtonId == IDialogConstants.RETRY_ID) { | ||
autoRetryEnabled = true; | ||
super.buttonPressed(IDialogConstants.OK_ID); | ||
} else { | ||
super.buttonPressed(aButtonId); | ||
} | ||
} | ||
|
||
public boolean isAutoRetryEnabled() { | ||
return autoRetryEnabled; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters