Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jdt-core-dev] Fix for Bug 75954



Since this bug is a JDT UI bug, you should post this message on the
jdt-ui-dev mailing list.

Jerome



                                                                           
             Jim Carter                                                    
             <nospam@frigiddog                                             
             .com>                                                      To 
             Sent by:                  jdt-core-dev@xxxxxxxxxxx            
             jdt-core-dev-admi                                          cc 
             n@xxxxxxxxxxx                                                 
                                                                   Subject 
                                       [jdt-core-dev] Fix for Bug 75954    
             10/08/2004 10:20                                              
             PM                                                            
                                                                           
                                                                           
             Please respond to                                             
               jdt-core-dev                                                
                                                                           
                                                                           




Below is the patch output generated by cvs for the changes I made that fix
bug #75954. I also looked up the bug referenced in the code (#65399), and I
believe this code solves both of them.

Basiclly my bug is that our project has test classes in one project that
require
config files in another project so we need to run our test agains that
project
but anytime you change the project in the JUnitMainTab it blows away the
test
method. There are work arounds but they hinder my development and really
bug
me. So I thought I'd try my hand a alittle bug fix.

Anyway, thanks for such a great IDE.

I checked out from HEAD on the pserver dev.eclipse.org. We tested in on
both
WinXP, Win32, Suse 9.1 (32bit). I think we are running eclipse 3.0.1 but we
may
be running 3.0.

I also posted this patch as an attachement to the bug.

Patch:

Index: JUnitMainTab.java
===================================================================
RCS file:
/home/eclipse/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/launcher/JUnitMainTab.java,v

retrieving revision 1.38
diff -u -r1.38 JUnitMainTab.java
--- JUnitMainTab.java          19 Sep 2004 21:10:11 -0000          1.38
+++ JUnitMainTab.java          8 Oct 2004 19:06:58 -0000
@@ -361,18 +361,15 @@

config.setAttribute(IJavaLaunchConfigurationConstants.ATTR_PROJECT_NAME,
fContainerElement.getJavaProject().getElementName());

config.setAttribute(JUnitBaseLaunchConfiguration.LAUNCH_CONTAINER_ATTR,
fContainerElement.getHandleIdentifier());

config.setAttribute(IJavaLaunchConfigurationConstants.ATTR_MAIN_TYPE_NAME,
""); //$NON-NLS-1$
+                                     //workaround for bug 65399
+
config.setAttribute(JUnitBaseLaunchConfiguration.TESTNAME_ATTR, "");
                         } else {

config.setAttribute(IJavaLaunchConfigurationConstants.ATTR_PROJECT_NAME,
fProjText.getText());

config.setAttribute(IJavaLaunchConfigurationConstants.ATTR_MAIN_TYPE_NAME,
fTestText.getText());
-
config.setAttribute(JUnitBaseLaunchConfiguration.LAUNCH_CONTAINER_ATTR,
"");
//$NON-NLS-1$
+
config.setAttribute(JUnitBaseLaunchConfiguration.LAUNCH_CONTAINER_ATTR,
"");
//$NON-NLS-1$
+
config.setAttribute(JUnitBaseLaunchConfiguration.TESTNAME_ATTR,
fOriginalTestMethodName);
                         }

config.setAttribute(JUnitBaseLaunchConfiguration.ATTR_KEEPRUNNING,
fKeepRunning.getSelection());
-
config.setAttribute(JUnitBaseLaunchConfiguration.TESTNAME_ATTR,
fOriginalTestMethodName);
-                        String testMethod=
config.contentsEqual(config.getOriginal()) //workaround
for bug 65399
-                                    ? fOriginalTestMethodName
-                                    : ""; //$NON-NLS-1$
-
config.setAttribute(JUnitBaseLaunchConfiguration.TESTNAME_ATTR,
testMethod);
-                        setTestMethodLabel(testMethod);
             }

             /**


----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.

----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.

_______________________________________________
jdt-core-dev mailing list
jdt-core-dev@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/jdt-core-dev




Back to the top