1.1 --- a/selenium/src/org/netbeans/modules/selenium/Bundle.properties Mon Jan 09 17:29:47 2012 +0100
1.2 +++ b/selenium/src/org/netbeans/modules/selenium/Bundle.properties Mon Jan 09 17:32:36 2012 +0100
1.3 @@ -6,4 +6,6 @@
1.4 Selenium=Selenium
1.5 No_Unit_Tests=There are no unit tests in this project
1.6 No_Selenium_Tests=There are no selenium tests in this project
1.7 -No_Build_XML=build.xml file not found
1.8 \ No newline at end of file
1.9 +No_Build_XML=build.xml file not found
1.10 +
1.11 +lblNoJunitCreatedOrFound=No JUnit library created and found
1.12 \ No newline at end of file
2.1 --- a/selenium/src/org/netbeans/modules/selenium/SeleniumSupport.java Mon Jan 09 17:29:47 2012 +0100
2.2 +++ b/selenium/src/org/netbeans/modules/selenium/SeleniumSupport.java Mon Jan 09 17:32:36 2012 +0100
2.3 @@ -54,6 +54,7 @@
2.4 import org.netbeans.api.project.FileOwnerQuery;
2.5 import org.netbeans.api.project.Project;
2.6 import org.netbeans.api.project.ProjectManager;
2.7 +import org.netbeans.api.project.libraries.LibrariesCustomizer;
2.8 import org.netbeans.api.project.libraries.Library;
2.9 import org.netbeans.api.project.libraries.LibraryManager;
2.10 import org.netbeans.modules.selenium.templates.SeleneseTestWizardOperator;
2.11 @@ -132,6 +133,13 @@
2.12 assert fo != null;
2.13 Project p = FileOwnerQuery.getOwner(fo);
2.14 Library library = LibraryManager.getDefault().getLibrary(libraryName); //NOI18N
2.15 + if (library == null) {
2.16 + library = LibrariesCustomizer.showCreateNewLibraryCustomizer(LibraryManager.getDefault());
2.17 + if (library == null) {
2.18 + DialogDisplayer.getDefault().notify(new NotifyDescriptor.Message(
2.19 + NbBundle.getMessage(SeleniumSupport.class, "lblNoJunitCreatedOrFound"))); //NOI18N
2.20 + }
2.21 + }
2.22 if (!ProjectClassPathModifier.addLibraries(new Library[]{library}, fo, ClassPath.COMPILE)) {
2.23 Logger.getLogger(SeleniumSupport.class.getName()).log(Level.FINE, "''{0}'' library was not added to project {1}", new Object[]{libraryName, p}); //NOI18N
2.24 } else {