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 90992 Details for
Bug 205093
API Recorder's Generate Test Suite dialog does not select a default selection.
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 Version 2
patch205093_V2.txt (text/plain), 11.97 KB, created by
Paul Slauenwhite
on 2008-02-28 08:38:00 EST
(
hide
)
Description:
Patch Version 2
Filename:
MIME Type:
Creator:
Paul Slauenwhite
Created:
2008-02-28 08:38:00 EST
Size:
11.97 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.tptp.test.tools.api >Index: src-ui/org/eclipse/tptp/test/tools/api/internal/ui/recording/APIRecordingLaunchConfigurationPage.java >=================================================================== >RCS file: /cvsroot/tptp/test/org.eclipse.tptp.test.tools.api/src-ui/org/eclipse/tptp/test/tools/api/internal/ui/recording/APIRecordingLaunchConfigurationPage.java,v >retrieving revision 1.6 >diff -u -r1.6 APIRecordingLaunchConfigurationPage.java >--- src-ui/org/eclipse/tptp/test/tools/api/internal/ui/recording/APIRecordingLaunchConfigurationPage.java 19 Apr 2007 18:43:36 -0000 1.6 >+++ src-ui/org/eclipse/tptp/test/tools/api/internal/ui/recording/APIRecordingLaunchConfigurationPage.java 28 Feb 2008 13:36:28 -0000 >@@ -1,5 +1,5 @@ > /********************************************************************** >- * Copyright (c) 2006, 2007 IBM Corporation and others. >+ * Copyright (c) 2006, 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,7 +22,7 @@ > import org.eclipse.swt.widgets.Listener; > import org.eclipse.swt.widgets.Text; > import org.eclipse.tptp.test.tools.api.internal.resources.Messages; >-import org.eclipse.tptp.test.tools.api.internal.ui.test.generation.TPTPJUnitTestSuiteGenerationPane; >+import org.eclipse.tptp.test.tools.api.internal.ui.test.generation.TPTPJUnitTestSuiteOptionalGenerationPane; > import org.eclipse.tptp.test.tools.api.internal.ui.util.APIRecordingConstants; > import org.eclipse.tptp.trace.ui.provisional.launcher.IConfigurationPage; > import org.eclipse.tptp.trace.ui.provisional.launcher.IStatusListener; >@@ -33,19 +33,20 @@ > * > * > * @author Paul E. Slauenwhite >- * @version November 15, 2006 >+ * @author Tony Wang >+ * @version February 28, 2008 > * @since September 6, 2006 > * @provisional > */ > public class APIRecordingLaunchConfigurationPage implements IConfigurationPage { > > private IStatusListener statusListener = null; >- private TPTPJUnitTestSuiteGenerationPane testGenerationPane = null; >+ private TPTPJUnitTestSuiteOptionalGenerationPane testGenerationPane = null; > private ILaunchConfiguration launchConfiguration = null; > > public void createControl(Composite parent) { > >- testGenerationPane = new TPTPJUnitTestSuiteGenerationPane(parent); >+ testGenerationPane = new TPTPJUnitTestSuiteOptionalGenerationPane(parent); > > Listener listener = new Listener(){ > >Index: src-ui/org/eclipse/tptp/test/tools/api/internal/ui/test/generation/TPTPJUnitTestSuiteGenerationPane.java >=================================================================== >RCS file: /cvsroot/tptp/test/org.eclipse.tptp.test.tools.api/src-ui/org/eclipse/tptp/test/tools/api/internal/ui/test/generation/TPTPJUnitTestSuiteGenerationPane.java,v >retrieving revision 1.5 >diff -u -r1.5 TPTPJUnitTestSuiteGenerationPane.java >--- src-ui/org/eclipse/tptp/test/tools/api/internal/ui/test/generation/TPTPJUnitTestSuiteGenerationPane.java 19 Apr 2007 18:43:36 -0000 1.5 >+++ src-ui/org/eclipse/tptp/test/tools/api/internal/ui/test/generation/TPTPJUnitTestSuiteGenerationPane.java 28 Feb 2008 13:36:28 -0000 >@@ -1,5 +1,5 @@ > /********************************************************************** >- * Copyright (c) 2006, 2007 IBM Corporation and others. >+ * Copyright (c) 2006, 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 >@@ -21,7 +21,6 @@ > import org.eclipse.swt.SWT; > import org.eclipse.swt.events.SelectionAdapter; > import org.eclipse.swt.events.SelectionEvent; >-import org.eclipse.swt.graphics.Color; > import org.eclipse.swt.layout.GridData; > import org.eclipse.swt.layout.GridLayout; > import org.eclipse.swt.widgets.Button; >@@ -37,15 +36,16 @@ > * > * > * @author Paul E. Slauenwhite >- * @version November 15, 2006 >+ * @author Tony Wang >+ * @version February 28, 2008 > * @since September 7, 2006 > * @provisional > */ > public class TPTPJUnitTestSuiteGenerationPane extends Composite { > >- private Text testSuiteLocationText = null; >- private Combo testSuiteGeneratorCombo = null; >- private Button testSuiteLocationButton = null; >+ protected Text testSuiteLocationText = null; >+ protected Combo testSuiteGeneratorCombo = null; >+ protected Button testSuiteLocationButton = null; > > public TPTPJUnitTestSuiteGenerationPane(Composite parent){ > this(parent, SWT.SHADOW_NONE); >@@ -66,20 +66,7 @@ > return testSuiteLocationText; > } > >- public void init(){ >- >- testSuiteGeneratorCombo.select(0); >- >- testSuiteLocationText.setEnabled(false); >- testSuiteLocationText.setText(""); >- >- //Work-around: Set the text field's background color to gray since disabled/enabled un-editable text fields have a gray background, by default. >- testSuiteLocationText.setBackground(((Color)(testSuiteGeneratorCombo.getData("Background")))); >- >- testSuiteLocationButton.setEnabled(false); >- } >- >- private void buildPane(){ >+ protected void buildPane(){ > > setLayout(new GridLayout()); > setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); >@@ -99,26 +86,8 @@ > > testSuiteGeneratorCombo = new Combo(testGroup, SWT.READ_ONLY); > testSuiteGeneratorCombo.setLayoutData(GridDataFactory.fillDefaults().span(2, 1).grab(true, false).create()); >- testSuiteGeneratorCombo.add("Do not generate test suite"); > testSuiteGeneratorCombo.add("TPTP JUnit Test Suite Generator"); >- testSuiteGeneratorCombo.addSelectionListener(new SelectionAdapter() { >- >- public void widgetSelected(SelectionEvent e) { >- >- if(testSuiteGeneratorCombo.getSelectionIndex() != 0){ >- >- testSuiteLocationButton.setEnabled(true); >- >- testSuiteLocationText.setEnabled(true); >- >- //Work-around: Set the text field's background color to white since disabled/enabled un-editable text fields have a gray background, by default. >- testSuiteLocationText.setBackground(testSuiteGeneratorCombo.getBackground()); >- } >- else{ >- init(); >- } >- } >- }); >+ testSuiteGeneratorCombo.select(0); > > //TODO: Create extension point for user-defined test suite generators: > // IConfigurationElement[] elements = >@@ -134,9 +103,12 @@ > testSuiteLocationText = new Text(testGroup, SWT.SINGLE | SWT.BORDER); > testSuiteLocationText.setEditable(false); > testSuiteLocationText.setLayoutData(GridDataFactory.fillDefaults().grab(true, false).align(SWT.FILL, SWT.CENTER).create()); >- >- //Work-around: Persist the text field's background original color since disabled/enabled un-editable text fields have a gray background, by default. >- testSuiteLocationText.setData("Background",testSuiteLocationText.getBackground()); >+ >+ //Work-around: Persist the text field's background original color since disabled/enabled un-editable text fields have a gray background, by default. >+ testSuiteLocationText.setData("Background", testSuiteLocationText.getBackground()); >+ >+ //Work-around: Set the text field's background color to white since disabled/enabled un-editable text fields have a gray background, by default. >+ testSuiteLocationText.setBackground(testSuiteGeneratorCombo.getBackground()); > > testSuiteLocationButton = new Button(testGroup, SWT.PUSH); > testSuiteLocationButton.setText("Browse..."); >@@ -180,8 +152,6 @@ > } > }); > >- init(); >- > layout(false,true); > } > } >Index: src-ui/org/eclipse/tptp/test/tools/api/internal/ui/test/generation/wizards/GenerateTPTPJUnitTestSuiteWizardPageOne.java >=================================================================== >RCS file: /cvsroot/tptp/test/org.eclipse.tptp.test.tools.api/src-ui/org/eclipse/tptp/test/tools/api/internal/ui/test/generation/wizards/GenerateTPTPJUnitTestSuiteWizardPageOne.java,v >retrieving revision 1.5 >diff -u -r1.5 GenerateTPTPJUnitTestSuiteWizardPageOne.java >--- src-ui/org/eclipse/tptp/test/tools/api/internal/ui/test/generation/wizards/GenerateTPTPJUnitTestSuiteWizardPageOne.java 19 Apr 2007 18:43:36 -0000 1.5 >+++ src-ui/org/eclipse/tptp/test/tools/api/internal/ui/test/generation/wizards/GenerateTPTPJUnitTestSuiteWizardPageOne.java 28 Feb 2008 13:36:28 -0000 >@@ -91,6 +91,9 @@ > Combo testSuiteGeneratorCombo = testGenerationPane.getTestSuiteGeneratorCombo(); > testSuiteGeneratorCombo.addListener(SWT.Selection, listener); > >+ //Fire the selection event to set the messages in the wizard/dialog: >+ listener.handleEvent(null); >+ > setControl(testGenerationPane); > } > >Index: src-ui/org/eclipse/tptp/test/tools/api/internal/ui/test/generation/TPTPJUnitTestSuiteOptionalGenerationPane.java >=================================================================== >RCS file: src-ui/org/eclipse/tptp/test/tools/api/internal/ui/test/generation/TPTPJUnitTestSuiteOptionalGenerationPane.java >diff -N src-ui/org/eclipse/tptp/test/tools/api/internal/ui/test/generation/TPTPJUnitTestSuiteOptionalGenerationPane.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src-ui/org/eclipse/tptp/test/tools/api/internal/ui/test/generation/TPTPJUnitTestSuiteOptionalGenerationPane.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,77 @@ >+/********************************************************************** >+ * 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$ >+ * >+ * Contributors: >+ * IBM - Initial API and implementation >+ **********************************************************************/ >+package org.eclipse.tptp.test.tools.api.internal.ui.test.generation; >+ >+import org.eclipse.swt.events.SelectionAdapter; >+import org.eclipse.swt.events.SelectionEvent; >+import org.eclipse.swt.graphics.Color; >+import org.eclipse.swt.widgets.Composite; >+ >+/** >+ * TPTP JUnit test suite optional generation pane. >+ * <p> >+ * >+ * >+ * @author Paul E. Slauenwhite >+ * @author Tony Wang >+ * @version February 28, 2008 >+ * @since February 28, 2008 >+ * @provisional >+ */ >+public class TPTPJUnitTestSuiteOptionalGenerationPane extends TPTPJUnitTestSuiteGenerationPane { >+ >+ public TPTPJUnitTestSuiteOptionalGenerationPane(Composite parent){ >+ super(parent); >+ } >+ >+ public TPTPJUnitTestSuiteOptionalGenerationPane(Composite parent, int style){ >+ super(parent, style); >+ } >+ >+ protected void buildPane(){ >+ >+ super.buildPane(); >+ >+ testSuiteGeneratorCombo.add("Do not generate test suite", 0); >+ testSuiteGeneratorCombo.addSelectionListener(new SelectionAdapter() { >+ >+ public void widgetSelected(SelectionEvent e) { >+ >+ if(testSuiteGeneratorCombo.getSelectionIndex() != 0){ >+ >+ testSuiteLocationButton.setEnabled(true); >+ >+ testSuiteLocationText.setEnabled(true); >+ >+ //Work-around: Set the text field's background color to white since disabled/enabled un-editable text fields have a gray background, by default. >+ testSuiteLocationText.setBackground(testSuiteGeneratorCombo.getBackground()); >+ } >+ else{ >+ init(); >+ } >+ } >+ }); >+ >+ init(); >+ } >+ >+ private void init(){ >+ >+ testSuiteLocationText.setText(""); >+ >+ //Work-around: Set the text field's background color to gray, persisted as the text field's background original color since disabled/enabled un-editable text fields have a gray background, by default. >+ testSuiteLocationText.setBackground(((Color)(testSuiteLocationText.getData("Background")))); >+ testSuiteLocationText.setEnabled(false); >+ >+ testSuiteLocationButton.setEnabled(false); >+ } >+}
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 205093
:
90674
|
90773
| 90992