1.1 --- a/testng.ant/src/org/netbeans/modules/contrib/testng/ant/AntTestNGSupport.java Fri Dec 23 21:33:51 2011 +0100
1.2 +++ b/testng.ant/src/org/netbeans/modules/contrib/testng/ant/AntTestNGSupport.java Sat Dec 31 20:22:49 2011 +0100
1.3 @@ -81,6 +81,7 @@
1.4 s.add(Action.CREATE_TEST);
1.5 s.add(Action.RUN_FAILED);
1.6 s.add(Action.RUN_TESTMETHOD);
1.7 + s.add(Action.RUN_TESTSUITE);
1.8 s.add(Action.DEBUG_TEST);
1.9 s.add(Action.DEBUG_TESTMETHOD);
1.10 SUPPORTED_ACTIONS = Collections.unmodifiableSet(s);
1.11 @@ -163,6 +164,9 @@
1.12 FileObject failedTestsConfig = projectHome.getFileObject(failedConfPath);
1.13 props.put("testng.config", FileUtil.getRelativePath(projectHome, failedTestsConfig));
1.14 } else {
1.15 + if (Action.RUN_TESTSUITE.equals(action)) {
1.16 + props.put("testng.config", FileUtil.toFile(config.getTest()).getAbsolutePath());
1.17 + } else {
1.18 File f = XMLSuiteSupport.createSuiteforMethod(
1.19 FileUtil.normalizeFile(new File(System.getProperty("java.io.tmpdir"))), //NOI18N
1.20 ProjectUtils.getInformation(p).getDisplayName(),
1.21 @@ -171,6 +175,7 @@
1.22 config.getMethodName());
1.23 f = FileUtil.normalizeFile(f);
1.24 props.put("testng.config", f.getAbsolutePath());
1.25 + }
1.26 }
1.27 try {
1.28 String target = "run-testng"; //NOI18N
2.1 --- a/testng/nbproject/project.xml Fri Dec 23 21:33:51 2011 +0100
2.2 +++ b/testng/nbproject/project.xml Sat Dec 31 20:22:49 2011 +0100
2.3 @@ -74,6 +74,24 @@
2.4 </run-dependency>
2.5 </dependency>
2.6 <dependency>
2.7 + <code-name-base>org.netbeans.api.xml</code-name-base>
2.8 + <build-prerequisite/>
2.9 + <compile-dependency/>
2.10 + <run-dependency>
2.11 + <release-version>1</release-version>
2.12 + <specification-version>1.29</specification-version>
2.13 + </run-dependency>
2.14 + </dependency>
2.15 + <dependency>
2.16 + <code-name-base>org.netbeans.core.multiview</code-name-base>
2.17 + <build-prerequisite/>
2.18 + <compile-dependency/>
2.19 + <run-dependency>
2.20 + <release-version>1</release-version>
2.21 + <specification-version>1.28</specification-version>
2.22 + </run-dependency>
2.23 + </dependency>
2.24 + <dependency>
2.25 <code-name-base>org.netbeans.libs.javacapi</code-name-base>
2.26 <build-prerequisite/>
2.27 <compile-dependency/>
2.28 @@ -232,6 +250,14 @@
2.29 <specification-version>8.0</specification-version>
2.30 </run-dependency>
2.31 </dependency>
2.32 + <dependency>
2.33 + <code-name-base>org.openide.windows</code-name-base>
2.34 + <build-prerequisite/>
2.35 + <compile-dependency/>
2.36 + <run-dependency>
2.37 + <specification-version>6.49</specification-version>
2.38 + </run-dependency>
2.39 + </dependency>
2.40 </module-dependencies>
2.41 <test-dependencies>
2.42 <test-type>
3.1 --- a/testng/src/org/netbeans/modules/contrib/testng/Bundle.properties Fri Dec 23 21:33:51 2011 +0100
3.2 +++ b/testng/src/org/netbeans/modules/contrib/testng/Bundle.properties Sat Dec 31 20:22:49 2011 +0100
3.3 @@ -42,7 +42,9 @@
3.4 The TestNG Support module allows you to create test classes suitable for the TestNG framework.
3.5 OpenIDE-Module-Name=TestNG Support
3.6 OpenIDE-Module-Short-Description=Support for TestNG framework
3.7 +Services/MIMEResolver/testng-suite-resolver.xml=TestNGSuite Files
3.8 Templates/TestNG=TestNG
3.9 +Templates/TestNG/TestNGTestSuite.xml=TestNG Test Suite
3.10 Templates/TestNG/TestNGTest.java=TestNG Test Case
3.11 TestNG=TestNG 6.0.1
3.12 -NewTestVisualPanel1.jLabel1.text=Add to Suite:
3.13 +Loaders/text/x-testng+xml/Factories/org-netbeans-modules-contrib-testng-TestNGSuiteDataLoader.instance=TestNG Suite Files
4.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
4.2 +++ b/testng/src/org/netbeans/modules/contrib/testng/NewTestSuiteWizardIterator.java Sat Dec 31 20:22:49 2011 +0100
4.3 @@ -0,0 +1,235 @@
4.4 +/*
4.5 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
4.6 + *
4.7 + * Copyright 2011 Oracle and/or its affiliates. All rights reserved.
4.8 + *
4.9 + * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
4.10 + * Other names may be trademarks of their respective owners.
4.11 + *
4.12 + * The contents of this file are subject to the terms of either the GNU
4.13 + * General Public License Version 2 only ("GPL") or the Common
4.14 + * Development and Distribution License("CDDL") (collectively, the
4.15 + * "License"). You may not use this file except in compliance with the
4.16 + * License. You can obtain a copy of the License at
4.17 + * http://www.netbeans.org/cddl-gplv2.html
4.18 + * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
4.19 + * specific language governing permissions and limitations under the
4.20 + * License. When distributing the software, include this License Header
4.21 + * Notice in each file and include the License file at
4.22 + * nbbuild/licenses/CDDL-GPL-2-CP. Oracle designates this
4.23 + * particular file as subject to the "Classpath" exception as provided
4.24 + * by Oracle in the GPL Version 2 section of the License file that
4.25 + * accompanied this code. If applicable, add the following below the
4.26 + * License Header, with the fields enclosed by brackets [] replaced by
4.27 + * your own identifying information:
4.28 + * "Portions Copyrighted [year] [name of copyright owner]"
4.29 + *
4.30 + * If you wish your version of this file to be governed by only the CDDL
4.31 + * or only the GPL Version 2, indicate your decision by adding
4.32 + * "[Contributor] elects to include this software in this distribution
4.33 + * under the [CDDL or GPL Version 2] license." If you do not indicate a
4.34 + * single choice of license, a recipient has the option to distribute
4.35 + * your version of this file under either the CDDL, the GPL Version 2 or
4.36 + * to extend the choice of license to its licensees as provided above.
4.37 + * However, if you add GPL Version 2 code and therefore, elected the GPL
4.38 + * Version 2 license, then the option applies only if the new code is
4.39 + * made subject to such option by the copyright holder.
4.40 + *
4.41 + * Contributor(s):
4.42 + *
4.43 + * Portions Copyrighted 2011 Sun Microsystems, Inc.
4.44 + */
4.45 +package org.netbeans.modules.contrib.testng;
4.46 +
4.47 +import java.awt.Component;
4.48 +import java.io.IOException;
4.49 +import java.util.*;
4.50 +import javax.swing.JComponent;
4.51 +import javax.swing.event.ChangeListener;
4.52 +import org.netbeans.api.java.project.JavaProjectConstants;
4.53 +import org.netbeans.api.project.*;
4.54 +import org.netbeans.api.templates.TemplateRegistration;
4.55 +import org.netbeans.modules.contrib.testng.api.TestNGSupport;
4.56 +import org.netbeans.spi.java.project.support.ui.templates.JavaTemplates;
4.57 +import org.netbeans.spi.project.ui.templates.support.Templates;
4.58 +import org.openide.WizardDescriptor;
4.59 +import org.openide.filesystems.FileObject;
4.60 +import org.openide.filesystems.FileUtil;
4.61 +import org.openide.loaders.DataFolder;
4.62 +import org.openide.loaders.DataObject;
4.63 +
4.64 +@TemplateRegistration(folder = "TestNG", position = 2000,
4.65 + content= "resources/testng-suite.template",
4.66 + displayName = "#Templates/TestNG/TestNGTestSuite.xml",
4.67 + description = "/org/netbeans/modules/contrib/testng/resources/newTestSuite.html",
4.68 + iconBase = "org/netbeans/modules/contrib/testng/resources/testng.gif")
4.69 +public final class NewTestSuiteWizardIterator implements WizardDescriptor.InstantiatingIterator<WizardDescriptor> {
4.70 +
4.71 + private transient int index;
4.72 + private transient WizardDescriptor.Panel[] panels;
4.73 + private transient WizardDescriptor wiz;
4.74 +
4.75 + private WizardDescriptor.Panel[] createPanels(final WizardDescriptor wizardDescriptor) {
4.76 + // Ask for Java folders
4.77 + Project project = Templates.getProject(wizardDescriptor);
4.78 + Sources sources = ProjectUtils.getSources(project);
4.79 + SourceGroup[] groups = getTestRoots(sources);
4.80 + if (groups.length == 0) {
4.81 + if (SourceGroupModifier.createSourceGroup(project, JavaProjectConstants.SOURCES_TYPE_JAVA, JavaProjectConstants.SOURCES_HINT_TEST) != null) {
4.82 + groups = getTestRoots(sources);
4.83 + }
4.84 + }
4.85 + if (groups.length == 0) {
4.86 + groups = sources.getSourceGroups(Sources.TYPE_GENERIC);
4.87 + return new WizardDescriptor.Panel[]{
4.88 + Templates.buildSimpleTargetChooser(project, groups).create()
4.89 + };
4.90 + } else {
4.91 + return new WizardDescriptor.Panel[]{
4.92 + JavaTemplates.createPackageChooser(project, groups)
4.93 + };
4.94 + }
4.95 + }
4.96 +
4.97 + private String[] createSteps(String[] before, WizardDescriptor.Panel[] panels) {
4.98 + assert panels != null;
4.99 + // hack to use the steps set before this panel processed
4.100 + int diff = 0;
4.101 + if (before == null) {
4.102 + before = new String[0];
4.103 + } else if (before.length > 0) {
4.104 + diff = ("...".equals(before[before.length - 1])) ? 1 : 0; // NOI18N
4.105 + }
4.106 + String[] res = new String[(before.length - diff) + panels.length];
4.107 + for (int i = 0; i < res.length; i++) {
4.108 + if (i < (before.length - diff)) {
4.109 + res[i] = before[i];
4.110 + } else {
4.111 + res[i] = panels[i - before.length + diff].getComponent().getName();
4.112 + }
4.113 + }
4.114 + return res;
4.115 + }
4.116 +
4.117 + public Set<FileObject> instantiate() throws IOException {
4.118 + FileObject dir = Templates.getTargetFolder(wiz);
4.119 + String targetName = Templates.getTargetName(wiz);
4.120 +
4.121 + DataFolder df = DataFolder.findFolder(dir);
4.122 + FileObject template = Templates.getTemplate(wiz);
4.123 +
4.124 + DataObject dTemplate = DataObject.find(template);
4.125 + String pkgName = getSelectedPackageName(dir);
4.126 + DataObject dobj;
4.127 + if (pkgName == null) {
4.128 + dobj = dTemplate.createFromTemplate(df, targetName);
4.129 + } else {
4.130 + dobj = dTemplate.createFromTemplate(df, targetName, Collections.singletonMap("name", targetName)); // NOI18N
4.131 + }
4.132 +
4.133 + FileObject createdFile = dobj.getPrimaryFile();
4.134 + TestNGSupport.findTestNGSupport(FileOwnerQuery.getOwner(createdFile)).configureProject(createdFile);
4.135 + return Collections.singleton(createdFile);
4.136 + }
4.137 +
4.138 + public void initialize(WizardDescriptor wiz) {
4.139 + this.wiz = wiz;
4.140 + index = 0;
4.141 + panels = createPanels(wiz);
4.142 + // Make sure list of steps is accurate.
4.143 + String[] beforeSteps = null;
4.144 + Object prop = wiz.getProperty("WizardPanel_contentData"); // NOI18N
4.145 + if (prop != null && prop instanceof String[]) {
4.146 + beforeSteps = (String[]) prop;
4.147 + }
4.148 + String[] steps = createSteps(beforeSteps, panels);
4.149 + for (int i = 0; i < panels.length; i++) {
4.150 + Component c = panels[i].getComponent();
4.151 + if (steps[i] == null) {
4.152 + // Default step name to component name of panel.
4.153 + // Mainly useful for getting the name of the target
4.154 + // chooser to appear in the list of steps.
4.155 + steps[i] = c.getName();
4.156 + }
4.157 + if (c instanceof JComponent) { // assume Swing components
4.158 + JComponent jc = (JComponent) c;
4.159 + // Step #.
4.160 + jc.putClientProperty("WizardPanel_contentSelectedIndex", Integer.valueOf(i)); // NOI18N
4.161 + // Step name (actually the whole list for reference).
4.162 + jc.putClientProperty("WizardPanel_contentData", steps); // NOI18N
4.163 + }
4.164 + }
4.165 + }
4.166 +
4.167 + public void uninitialize(WizardDescriptor wiz) {
4.168 + this.wiz = null;
4.169 + panels = null;
4.170 + }
4.171 +
4.172 + public String name() {
4.173 + return ""; // NOI18N
4.174 + }
4.175 +
4.176 + public boolean hasNext() {
4.177 + return index < panels.length - 1;
4.178 + }
4.179 +
4.180 + public boolean hasPrevious() {
4.181 + return index > 0;
4.182 + }
4.183 +
4.184 + public void nextPanel() {
4.185 + if (!hasNext()) {
4.186 + throw new NoSuchElementException();
4.187 + }
4.188 + index++;
4.189 + }
4.190 +
4.191 + public void previousPanel() {
4.192 + if (!hasPrevious()) {
4.193 + throw new NoSuchElementException();
4.194 + }
4.195 + index--;
4.196 + }
4.197 +
4.198 + public WizardDescriptor.Panel current() {
4.199 + return panels[index];
4.200 + }
4.201 +
4.202 + public final void addChangeListener(ChangeListener l) {
4.203 + }
4.204 +
4.205 + public final void removeChangeListener(ChangeListener l) {
4.206 + }
4.207 +
4.208 + private static String getSelectedPackageName(FileObject targetFolder) {
4.209 + Project project = FileOwnerQuery.getOwner(targetFolder);
4.210 + Sources sources = ProjectUtils.getSources(project);
4.211 + SourceGroup[] groups = sources.getSourceGroups(JavaProjectConstants.SOURCES_TYPE_JAVA);
4.212 + String packageName = null;
4.213 + for (int i = 0; i < groups.length && packageName == null; i++) {
4.214 + packageName = FileUtil.getRelativePath(groups[i].getRootFolder(), targetFolder);
4.215 + }
4.216 + if (packageName != null) {
4.217 + packageName = packageName.replaceAll("/", "."); // NOI18N
4.218 + }
4.219 + return packageName;
4.220 + }
4.221 +
4.222 + private SourceGroup[] getTestRoots(Sources srcs) {
4.223 + SourceGroup[] groups = srcs.getSourceGroups(JavaProjectConstants.SOURCES_TYPE_JAVA);
4.224 + assert groups != null : "Cannot return null from Sources.getSourceGroups: " + srcs;
4.225 +
4.226 + //XXX - have to filter out regular source roots, there should
4.227 + //be better way to do this... (Hint: use UnitTestForSourceQuery)
4.228 + //${test - Ant based projects
4.229 + //2TestSourceRoot - Maven projects
4.230 + List<SourceGroup> result = new ArrayList<SourceGroup>(2);
4.231 + for (SourceGroup sg : groups) {
4.232 + if (sg.getName().startsWith("${test") || "2TestSourceRoot".equals(sg.getName())) { //NOI18N
4.233 + result.add(sg);
4.234 + }
4.235 + }
4.236 + return result.toArray(new SourceGroup[result.size()]);
4.237 + }
4.238 +}
5.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
5.2 +++ b/testng/src/org/netbeans/modules/contrib/testng/TestNGSuiteDataEditor.java Sat Dec 31 20:22:49 2011 +0100
5.3 @@ -0,0 +1,135 @@
5.4 +/*
5.5 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
5.6 + *
5.7 + * Copyright 2011 Oracle and/or its affiliates. All rights reserved.
5.8 + *
5.9 + * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
5.10 + * Other names may be trademarks of their respective owners.
5.11 + *
5.12 + * The contents of this file are subject to the terms of either the GNU
5.13 + * General Public License Version 2 only ("GPL") or the Common
5.14 + * Development and Distribution License("CDDL") (collectively, the
5.15 + * "License"). You may not use this file except in compliance with the
5.16 + * License. You can obtain a copy of the License at
5.17 + * http://www.netbeans.org/cddl-gplv2.html
5.18 + * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
5.19 + * specific language governing permissions and limitations under the
5.20 + * License. When distributing the software, include this License Header
5.21 + * Notice in each file and include the License file at
5.22 + * nbbuild/licenses/CDDL-GPL-2-CP. Oracle designates this
5.23 + * particular file as subject to the "Classpath" exception as provided
5.24 + * by Oracle in the GPL Version 2 section of the License file that
5.25 + * accompanied this code. If applicable, add the following below the
5.26 + * License Header, with the fields enclosed by brackets [] replaced by
5.27 + * your own identifying information:
5.28 + * "Portions Copyrighted [year] [name of copyright owner]"
5.29 + *
5.30 + * If you wish your version of this file to be governed by only the CDDL
5.31 + * or only the GPL Version 2, indicate your decision by adding
5.32 + * "[Contributor] elects to include this software in this distribution
5.33 + * under the [CDDL or GPL Version 2] license." If you do not indicate a
5.34 + * single choice of license, a recipient has the option to distribute
5.35 + * your version of this file under either the CDDL, the GPL Version 2 or
5.36 + * to extend the choice of license to its licensees as provided above.
5.37 + * However, if you add GPL Version 2 code and therefore, elected the GPL
5.38 + * Version 2 license, then the option applies only if the new code is
5.39 + * made subject to such option by the copyright holder.
5.40 + *
5.41 + * Contributor(s):
5.42 + *
5.43 + * Portions Copyrighted 2011 Sun Microsystems, Inc.
5.44 + */
5.45 +package org.netbeans.modules.contrib.testng;
5.46 +
5.47 +import java.io.IOException;
5.48 +import javax.swing.event.ChangeEvent;
5.49 +import javax.swing.event.ChangeListener;
5.50 +import org.netbeans.core.api.multiview.MultiViews;
5.51 +import org.openide.cookies.*;
5.52 +import org.openide.filesystems.FileLock;
5.53 +import org.openide.filesystems.FileObject;
5.54 +import org.openide.nodes.FilterNode;
5.55 +import org.openide.nodes.Node;
5.56 +import org.openide.text.CloneableEditor;
5.57 +import org.openide.text.CloneableEditorSupport;
5.58 +import org.openide.text.DataEditorSupport;
5.59 +import org.openide.windows.CloneableOpenSupport;
5.60 +
5.61 +/**
5.62 + *
5.63 + * @author lukas
5.64 + */
5.65 +final class TestNGSuiteDataEditor extends DataEditorSupport implements OpenCookie, EditCookie, EditorCookie.Observable, PrintCookie, ChangeListener {
5.66 +
5.67 + private boolean addedChangeListener = false;
5.68 +
5.69 + public TestNGSuiteDataEditor(TestNGSuiteDataObject obj) {
5.70 + super(obj, null, new TestNGEnv(obj));
5.71 + setMIMEType(TestNGSuiteDataObject.MIME_TYPE);
5.72 + }
5.73 +
5.74 + @Override
5.75 + protected Pane createPane() {
5.76 + return (CloneableEditorSupport.Pane) MultiViews.createCloneableMultiView(TestNGSuiteDataObject.MIME_TYPE, getDataObject());
5.77 + }
5.78 +
5.79 + @Override
5.80 + protected boolean notifyModified() {
5.81 + if (!super.notifyModified()) {
5.82 + return false;
5.83 + } else {
5.84 + TestNGEnv e = (TestNGEnv) env;
5.85 + e.getTestNGSuiteDataObject().addSaveCookie(e);
5.86 + return true;
5.87 + }
5.88 + }
5.89 +
5.90 + @Override
5.91 + protected void notifyUnmodified() {
5.92 + super.notifyUnmodified();
5.93 + TestNGEnv e = (TestNGEnv) env;
5.94 + e.getTestNGSuiteDataObject().removeSaveCookie(e);
5.95 + }
5.96 +
5.97 + @Override
5.98 + protected boolean asynchronousOpen() {
5.99 + return true;
5.100 + }
5.101 +
5.102 + public void stateChanged(ChangeEvent e) {
5.103 + updateTitles();
5.104 + }
5.105 +
5.106 + private static class TestNGEnv extends DataEditorSupport.Env implements SaveCookie {
5.107 +
5.108 + private static final long serialVersionUID = 6587342954372956374L;
5.109 +
5.110 + public TestNGEnv(TestNGSuiteDataObject obj) {
5.111 + super(obj);
5.112 + }
5.113 +
5.114 + @Override
5.115 + public CloneableOpenSupport findCloneableOpenSupport() {
5.116 + return (CloneableOpenSupport) getDataObject().getLookup().lookup(EditCookie.class);
5.117 + }
5.118 +
5.119 + @Override
5.120 + protected FileObject getFile() {
5.121 + return getDataObject().getPrimaryFile();
5.122 + }
5.123 +
5.124 + @Override
5.125 + protected FileLock takeLock() throws IOException {
5.126 + return ((TestNGSuiteDataObject) getDataObject()).getPrimaryEntry().takeLock();
5.127 + }
5.128 +
5.129 + public void save() throws IOException {
5.130 + ((TestNGSuiteDataEditor) findCloneableOpenSupport()).saveDocument();
5.131 + getDataObject().setModified(false);
5.132 + }
5.133 +
5.134 + TestNGSuiteDataObject getTestNGSuiteDataObject() {
5.135 + return (TestNGSuiteDataObject) getDataObject();
5.136 + }
5.137 + }
5.138 +}
6.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
6.2 +++ b/testng/src/org/netbeans/modules/contrib/testng/TestNGSuiteDataNode.java Sat Dec 31 20:22:49 2011 +0100
6.3 @@ -0,0 +1,73 @@
6.4 +/*
6.5 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
6.6 + *
6.7 + * Copyright 2011 Oracle and/or its affiliates. All rights reserved.
6.8 + *
6.9 + * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
6.10 + * Other names may be trademarks of their respective owners.
6.11 + *
6.12 + * The contents of this file are subject to the terms of either the GNU
6.13 + * General Public License Version 2 only ("GPL") or the Common
6.14 + * Development and Distribution License("CDDL") (collectively, the
6.15 + * "License"). You may not use this file except in compliance with the
6.16 + * License. You can obtain a copy of the License at
6.17 + * http://www.netbeans.org/cddl-gplv2.html
6.18 + * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
6.19 + * specific language governing permissions and limitations under the
6.20 + * License. When distributing the software, include this License Header
6.21 + * Notice in each file and include the License file at
6.22 + * nbbuild/licenses/CDDL-GPL-2-CP. Oracle designates this
6.23 + * particular file as subject to the "Classpath" exception as provided
6.24 + * by Oracle in the GPL Version 2 section of the License file that
6.25 + * accompanied this code. If applicable, add the following below the
6.26 + * License Header, with the fields enclosed by brackets [] replaced by
6.27 + * your own identifying information:
6.28 + * "Portions Copyrighted [year] [name of copyright owner]"
6.29 + *
6.30 + * If you wish your version of this file to be governed by only the CDDL
6.31 + * or only the GPL Version 2, indicate your decision by adding
6.32 + * "[Contributor] elects to include this software in this distribution
6.33 + * under the [CDDL or GPL Version 2] license." If you do not indicate a
6.34 + * single choice of license, a recipient has the option to distribute
6.35 + * your version of this file under either the CDDL, the GPL Version 2 or
6.36 + * to extend the choice of license to its licensees as provided above.
6.37 + * However, if you add GPL Version 2 code and therefore, elected the GPL
6.38 + * Version 2 license, then the option applies only if the new code is
6.39 + * made subject to such option by the copyright holder.
6.40 + *
6.41 + * Contributor(s):
6.42 + *
6.43 + * Portions Copyrighted 2011 Sun Microsystems, Inc.
6.44 + */
6.45 +package org.netbeans.modules.contrib.testng;
6.46 +
6.47 +import org.openide.loaders.DataNode;
6.48 +import org.openide.nodes.Children;
6.49 +import org.openide.util.Lookup;
6.50 +
6.51 +public class TestNGSuiteDataNode extends DataNode {
6.52 +
6.53 + private static final String IMAGE_ICON_BASE = "org/netbeans/modules/contrib/testng/resources/testng.gif";
6.54 +
6.55 + public TestNGSuiteDataNode(TestNGSuiteDataObject obj) {
6.56 + super(obj, Children.LEAF);
6.57 + setIconBaseWithExtension(IMAGE_ICON_BASE);
6.58 + }
6.59 +
6.60 + TestNGSuiteDataNode(TestNGSuiteDataObject obj, Lookup lookup) {
6.61 + super(obj, Children.LEAF, lookup);
6.62 + setIconBaseWithExtension(IMAGE_ICON_BASE);
6.63 + }
6.64 +// /** Creates a property sheet. */
6.65 +// @Override
6.66 +// protected Sheet createSheet() {
6.67 +// Sheet s = super.createSheet();
6.68 +// Sheet.Set ss = s.get(Sheet.PROPERTIES);
6.69 +// if (ss == null) {
6.70 +// ss = Sheet.createPropertiesSet();
6.71 +// s.put(ss);
6.72 +// }
6.73 +// // TODO add some relevant properties: ss.put(...)
6.74 +// return s;
6.75 +// }
6.76 +}
7.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
7.2 +++ b/testng/src/org/netbeans/modules/contrib/testng/TestNGSuiteDataObject.java Sat Dec 31 20:22:49 2011 +0100
7.3 @@ -0,0 +1,108 @@
7.4 +/*
7.5 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
7.6 + *
7.7 + * Copyright 2011 Oracle and/or its affiliates. All rights reserved.
7.8 + *
7.9 + * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
7.10 + * Other names may be trademarks of their respective owners.
7.11 + *
7.12 + * The contents of this file are subject to the terms of either the GNU
7.13 + * General Public License Version 2 only ("GPL") or the Common
7.14 + * Development and Distribution License("CDDL") (collectively, the
7.15 + * "License"). You may not use this file except in compliance with the
7.16 + * License. You can obtain a copy of the License at
7.17 + * http://www.netbeans.org/cddl-gplv2.html
7.18 + * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
7.19 + * specific language governing permissions and limitations under the
7.20 + * License. When distributing the software, include this License Header
7.21 + * Notice in each file and include the License file at
7.22 + * nbbuild/licenses/CDDL-GPL-2-CP. Oracle designates this
7.23 + * particular file as subject to the "Classpath" exception as provided
7.24 + * by Oracle in the GPL Version 2 section of the License file that
7.25 + * accompanied this code. If applicable, add the following below the
7.26 + * License Header, with the fields enclosed by brackets [] replaced by
7.27 + * your own identifying information:
7.28 + * "Portions Copyrighted [year] [name of copyright owner]"
7.29 + *
7.30 + * If you wish your version of this file to be governed by only the CDDL
7.31 + * or only the GPL Version 2, indicate your decision by adding
7.32 + * "[Contributor] elects to include this software in this distribution
7.33 + * under the [CDDL or GPL Version 2] license." If you do not indicate a
7.34 + * single choice of license, a recipient has the option to distribute
7.35 + * your version of this file under either the CDDL, the GPL Version 2 or
7.36 + * to extend the choice of license to its licensees as provided above.
7.37 + * However, if you add GPL Version 2 code and therefore, elected the GPL
7.38 + * Version 2 license, then the option applies only if the new code is
7.39 + * made subject to such option by the copyright holder.
7.40 + *
7.41 + * Contributor(s):
7.42 + *
7.43 + * Portions Copyrighted 2011 Sun Microsystems, Inc.
7.44 + */
7.45 +package org.netbeans.modules.contrib.testng;
7.46 +
7.47 +import java.io.IOException;
7.48 +import org.netbeans.core.spi.multiview.MultiViewElement;
7.49 +import org.netbeans.core.spi.multiview.text.MultiViewEditorElement;
7.50 +import org.netbeans.spi.xml.cookies.CheckXMLSupport;
7.51 +import org.netbeans.spi.xml.cookies.DataObjectAdapters;
7.52 +import org.netbeans.spi.xml.cookies.ValidateXMLSupport;
7.53 +import org.openide.cookies.SaveCookie;
7.54 +import org.openide.filesystems.FileObject;
7.55 +import org.openide.loaders.DataObjectExistsException;
7.56 +import org.openide.loaders.MultiDataObject;
7.57 +import org.openide.loaders.MultiFileLoader;
7.58 +import org.openide.nodes.CookieSet;
7.59 +import org.openide.nodes.Node;
7.60 +import org.openide.util.Lookup;
7.61 +import org.openide.util.NbBundle;
7.62 +import org.openide.windows.TopComponent;
7.63 +
7.64 +public class TestNGSuiteDataObject extends MultiDataObject {
7.65 +
7.66 + public static final String MIME_TYPE = "text/x-testng+xml";
7.67 +
7.68 + public TestNGSuiteDataObject(FileObject pf, MultiFileLoader loader) throws DataObjectExistsException, IOException {
7.69 + super(pf, loader);
7.70 + CookieSet cookies = getCookieSet();
7.71 + cookies.add(new CheckXMLSupport(DataObjectAdapters.inputSource(this)));
7.72 + cookies.add(new ValidateXMLSupport(DataObjectAdapters.inputSource(this)));
7.73 + cookies.add(new TestNGSuiteDataEditor(this));
7.74 + }
7.75 +
7.76 + @Override
7.77 + protected Node createNodeDelegate() {
7.78 + return new TestNGSuiteDataNode(this, getLookup());
7.79 + }
7.80 +
7.81 + @Override
7.82 + public Lookup getLookup() {
7.83 + return getCookieSet().getLookup();
7.84 + }
7.85 +
7.86 + @MultiViewElement.Registration(displayName = "#CTL_SourceTabCaption",
7.87 + iconBase = "org/netbeans/modules/contrib/testng/resources/testng.gif",
7.88 + persistenceType = TopComponent.PERSISTENCE_ONLY_OPENED,
7.89 + preferredID = "testng",
7.90 + mimeType = MIME_TYPE,
7.91 + position = 1
7.92 + )
7.93 + @NbBundle.Messages("CTL_SourceTabCaption=&Source")
7.94 + public static MultiViewEditorElement createMultiViewEditorElement(Lookup context) {
7.95 + return new MultiViewEditorElement(context);
7.96 + }
7.97 +
7.98 + void addSaveCookie(final SaveCookie save) {
7.99 + if (getLookup().lookup(SaveCookie.class) == null) {
7.100 + getCookieSet().add(save);
7.101 + setModified(true);
7.102 + }
7.103 + }
7.104 +
7.105 + void removeSaveCookie(final SaveCookie save) {
7.106 + if (getLookup().lookup(SaveCookie.class) == save) {
7.107 + getCookieSet().remove(save);
7.108 + setModified(false);
7.109 + }
7.110 + }
7.111 +}
8.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
8.2 +++ b/testng/src/org/netbeans/modules/contrib/testng/actions/RunSuiteAction.java Sat Dec 31 20:22:49 2011 +0100
8.3 @@ -0,0 +1,134 @@
8.4 +/*
8.5 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
8.6 + *
8.7 + * Copyright 2011 Oracle and/or its affiliates. All rights reserved.
8.8 + *
8.9 + * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
8.10 + * Other names may be trademarks of their respective owners.
8.11 + *
8.12 + * The contents of this file are subject to the terms of either the GNU
8.13 + * General Public License Version 2 only ("GPL") or the Common
8.14 + * Development and Distribution License("CDDL") (collectively, the
8.15 + * "License"). You may not use this file except in compliance with the
8.16 + * License. You can obtain a copy of the License at
8.17 + * http://www.netbeans.org/cddl-gplv2.html
8.18 + * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
8.19 + * specific language governing permissions and limitations under the
8.20 + * License. When distributing the software, include this License Header
8.21 + * Notice in each file and include the License file at
8.22 + * nbbuild/licenses/CDDL-GPL-2-CP. Oracle designates this
8.23 + * particular file as subject to the "Classpath" exception as provided
8.24 + * by Oracle in the GPL Version 2 section of the License file that
8.25 + * accompanied this code. If applicable, add the following below the
8.26 + * License Header, with the fields enclosed by brackets [] replaced by
8.27 + * your own identifying information:
8.28 + * "Portions Copyrighted [year] [name of copyright owner]"
8.29 + *
8.30 + * If you wish your version of this file to be governed by only the CDDL
8.31 + * or only the GPL Version 2, indicate your decision by adding
8.32 + * "[Contributor] elects to include this software in this distribution
8.33 + * under the [CDDL or GPL Version 2] license." If you do not indicate a
8.34 + * single choice of license, a recipient has the option to distribute
8.35 + * your version of this file under either the CDDL, the GPL Version 2 or
8.36 + * to extend the choice of license to its licensees as provided above.
8.37 + * However, if you add GPL Version 2 code and therefore, elected the GPL
8.38 + * Version 2 license, then the option applies only if the new code is
8.39 + * made subject to such option by the copyright holder.
8.40 + *
8.41 + * Contributor(s):
8.42 + *
8.43 + * Portions Copyrighted 2011 Sun Microsystems, Inc.
8.44 + */
8.45 +package org.netbeans.modules.contrib.testng.actions;
8.46 +
8.47 +import java.io.IOException;
8.48 +import java.util.Arrays;
8.49 +import java.util.logging.Level;
8.50 +import java.util.logging.Logger;
8.51 +import javax.swing.JEditorPane;
8.52 +import org.netbeans.api.java.source.JavaSource;
8.53 +import org.netbeans.api.project.FileOwnerQuery;
8.54 +import org.netbeans.api.project.Project;
8.55 +import org.netbeans.modules.contrib.testng.api.TestNGSupport;
8.56 +import org.netbeans.modules.contrib.testng.spi.TestConfig;
8.57 +import org.netbeans.modules.contrib.testng.spi.TestNGSupportImplementation;
8.58 +import org.netbeans.spi.project.SingleMethod;
8.59 +import org.openide.awt.ActionID;
8.60 +import org.openide.awt.ActionReference;
8.61 +import org.openide.awt.ActionReferences;
8.62 +import org.openide.awt.ActionRegistration;
8.63 +import org.openide.cookies.EditorCookie;
8.64 +import org.openide.filesystems.FileObject;
8.65 +import org.openide.loaders.DataObject;
8.66 +import org.openide.nodes.Node;
8.67 +import org.openide.util.HelpCtx;
8.68 +import org.openide.util.Lookup;
8.69 +import org.openide.util.NbBundle;
8.70 +import org.openide.util.NbBundle.Messages;
8.71 +import org.openide.util.actions.NodeAction;
8.72 +
8.73 +/**
8.74 + *
8.75 + * @author lukas
8.76 + */
8.77 +@ActionID(id = "org.netbeans.modules.contrib.testng.actions.RunSuiteAction", category="Build")
8.78 +@ActionRegistration(displayName = "#CTL_RunSuiteAction")
8.79 +@ActionReferences(value = {
8.80 + @ActionReference(path = "Loaders/text/x-testng+xml/Actions", position = 250)})
8.81 +@Messages("CTL_RunSuiteAction=&Run")
8.82 +public class RunSuiteAction extends NodeAction {
8.83 +
8.84 + private static final Logger LOGGER = Logger.getLogger(RunSuiteAction.class.getName());
8.85 +
8.86 + public RunSuiteAction() {
8.87 + }
8.88 +
8.89 + @Override
8.90 + protected boolean enable(Node[] activatedNodes) {
8.91 + if (activatedNodes.length != 1) {
8.92 + return false;
8.93 + }
8.94 + Lookup l = activatedNodes[0].getLookup();
8.95 + DataObject dataObject = l.lookup(DataObject.class);
8.96 + if (dataObject != null) {
8.97 + Project p = FileOwnerQuery.getOwner(dataObject.getPrimaryFile());
8.98 + return TestNGSupport.isActionSupported(TestNGSupport.Action.RUN_TESTSUITE, p);
8.99 + }
8.100 + SingleMethod sm = l.lookup(SingleMethod.class);
8.101 + if (sm != null) {
8.102 + Project p = FileOwnerQuery.getOwner(sm.getFile());
8.103 + return TestNGSupport.isActionSupported(TestNGSupport.Action.RUN_TESTSUITE, p);
8.104 + }
8.105 + return false;
8.106 + }
8.107 +
8.108 + @Override
8.109 + protected void performAction(Node[] activatedNodes) {
8.110 + Lookup l = activatedNodes[0].getLookup();
8.111 + FileObject fo = l.lookup(FileObject.class);
8.112 + assert fo != null;
8.113 + Project p = FileOwnerQuery.getOwner(fo);
8.114 + TestNGSupportImplementation.TestExecutor exec = TestNGSupport.findTestNGSupport(p).createExecutor(p);
8.115 + TestConfig conf = TestConfigAccessor.getDefault().createTestConfig(fo, false, null, null, null);
8.116 + try {
8.117 + exec.execute(TestNGSupport.Action.RUN_TESTSUITE, conf);
8.118 + } catch (IOException ex) {
8.119 + LOGGER.log(Level.SEVERE, null, ex);
8.120 + }
8.121 + }
8.122 +
8.123 + @Override
8.124 + public String getName() {
8.125 + return NbBundle.getMessage(RunSuiteAction.class, "CTL_RunSuiteAction");
8.126 + }
8.127 +
8.128 + @Override
8.129 + public HelpCtx getHelpCtx() {
8.130 + return HelpCtx.DEFAULT_HELP;
8.131 + }
8.132 +
8.133 + @Override
8.134 + protected boolean asynchronous() {
8.135 + return false;
8.136 + }
8.137 +}
9.1 --- a/testng/src/org/netbeans/modules/contrib/testng/api/TestNGSupport.java Fri Dec 23 21:33:51 2011 +0100
9.2 +++ b/testng/src/org/netbeans/modules/contrib/testng/api/TestNGSupport.java Sat Dec 31 20:22:49 2011 +0100
9.3 @@ -60,6 +60,7 @@
9.4 CREATE_TEST,
9.5 RUN_FAILED,
9.6 RUN_TESTMETHOD,
9.7 + RUN_TESTSUITE,
9.8 DEBUG_TEST,
9.9 DEBUG_TESTMETHOD
9.10 }
10.1 --- a/testng/src/org/netbeans/modules/contrib/testng/resources/layer.xml Fri Dec 23 21:33:51 2011 +0100
10.2 +++ b/testng/src/org/netbeans/modules/contrib/testng/resources/layer.xml Sat Dec 31 20:22:49 2011 +0100
10.3 @@ -53,6 +53,87 @@
10.4 </folder>
10.5 </folder>
10.6 </folder>
10.7 + <folder name="Loaders">
10.8 + <folder name="text">
10.9 + <folder name="x-testng+xml">
10.10 + <folder name="Factories">
10.11 + <file name="org-netbeans-modules-contrib-testng-TestNGSuiteDataLoader.instance">
10.12 + <attr name="displayName" bundlevalue="org.netbeans.modules.contrib.testng.Bundle#Loaders/text/x-testng+xml/Factories/org-netbeans-modules-contrib-testng-TestNGSuiteDataLoader.instance"/>
10.13 + <attr name="dataObjectClass" stringvalue="org.netbeans.modules.contrib.testng.TestNGSuiteDataObject"/>
10.14 + <attr name="instanceCreate" methodvalue="org.openide.loaders.DataLoaderPool.factory"/>
10.15 + <attr name="mimeType" stringvalue="text/x-testng+xml"/>
10.16 + <attr name="iconBase" stringvalue="org/netbeans/modules/contrib/testng/resources/testng.gif"/>
10.17 + </file>
10.18 + </folder>
10.19 + <folder name="Actions">
10.20 + <file name="org-openide-actions-CopyAction.shadow">
10.21 + <attr name="originalFile" stringvalue="Actions/Edit/org-openide-actions-CopyAction.instance"/>
10.22 + <attr name="position" intvalue="400"/>
10.23 + </file>
10.24 + <file name="org-openide-actions-CutAction.shadow">
10.25 + <attr name="originalFile" stringvalue="Actions/Edit/org-openide-actions-CutAction.instance"/>
10.26 + <attr name="position" intvalue="300"/>
10.27 + </file>
10.28 + <file name="org-openide-actions-DeleteAction.shadow">
10.29 + <attr name="originalFile" stringvalue="Actions/Edit/org-openide-actions-DeleteAction.instance"/>
10.30 + <attr name="position" intvalue="600"/>
10.31 + </file>
10.32 + <file name="org-openide-actions-FileSystemAction.shadow">
10.33 + <attr name="originalFile" stringvalue="Actions/System/org-openide-actions-FileSystemAction.instance"/>
10.34 + <attr name="position" intvalue="1100"/>
10.35 + </file>
10.36 + <file name="org-openide-actions-OpenAction.shadow">
10.37 + <attr name="originalFile" stringvalue="Actions/System/org-openide-actions-OpenAction.instance"/>
10.38 + <attr name="position" intvalue="100"/>
10.39 + </file>
10.40 + <file name="org-openide-actions-PropertiesAction.shadow">
10.41 + <attr name="originalFile" stringvalue="Actions/System/org-openide-actions-PropertiesAction.instance"/>
10.42 + <attr name="position" intvalue="1400"/>
10.43 + </file>
10.44 + <file name="org-openide-actions-RenameAction.shadow">
10.45 + <attr name="originalFile" stringvalue="Actions/System/org-openide-actions-RenameAction.instance"/>
10.46 + <attr name="position" intvalue="700"/>
10.47 + </file>
10.48 + <file name="org-openide-actions-SaveAsTemplateAction.shadow">
10.49 + <attr name="originalFile" stringvalue="Actions/System/org-openide-actions-SaveAsTemplateAction.instance"/>
10.50 + <attr name="position" intvalue="900"/>
10.51 + </file>
10.52 + <file name="org-openide-actions-ToolsAction.shadow">
10.53 + <attr name="originalFile" stringvalue="Actions/System/org-openide-actions-ToolsAction.instance"/>
10.54 + <attr name="position" intvalue="1300"/>
10.55 + </file>
10.56 + <file name="sep-1.instance">
10.57 + <attr name="instanceClass" stringvalue="javax.swing.JSeparator"/>
10.58 + <attr name="position" intvalue="200"/>
10.59 + </file>
10.60 + <file name="sep-2.instance">
10.61 + <attr name="instanceClass" stringvalue="javax.swing.JSeparator"/>
10.62 + <attr name="position" intvalue="500"/>
10.63 + </file>
10.64 + <file name="sep-3.instance">
10.65 + <attr name="instanceClass" stringvalue="javax.swing.JSeparator"/>
10.66 + <attr name="position" intvalue="800"/>
10.67 + </file>
10.68 + <file name="sep-4.instance">
10.69 + <attr name="instanceClass" stringvalue="javax.swing.JSeparator"/>
10.70 + <attr name="position" intvalue="1000"/>
10.71 + </file>
10.72 + <file name="sep-5.instance">
10.73 + <attr name="instanceClass" stringvalue="javax.swing.JSeparator"/>
10.74 + <attr name="position" intvalue="1200"/>
10.75 + </file>
10.76 + </folder>
10.77 + </folder>
10.78 + </folder>
10.79 + </folder>
10.80 + <folder name="Services">
10.81 + <folder name="MIMEResolver">
10.82 + <file name="testng-suite-resolver.xml" url="testng-suite-resolver.xml">
10.83 + <attr name="position" intvalue="153"/>
10.84 + <attr name="displayName" bundlevalue="org.netbeans.modules.contrib.testng.Bundle#Services/MIMEResolver/testng-suite-resolver.xml"/>
10.85 + </file>
10.86 + </folder>
10.87 + </folder>
10.88 <folder name="Templates">
10.89 <folder name="TestNG">
10.90 <attr name="displayName" bundlevalue="org.netbeans.modules.contrib.testng.Bundle#Templates/TestNG"/>
11.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
11.2 +++ b/testng/src/org/netbeans/modules/contrib/testng/resources/newTestSuite.html Sat Dec 31 20:22:49 2011 +0100
11.3 @@ -0,0 +1,49 @@
11.4 +<!--
11.5 +DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
11.6 +
11.7 +Copyright 2011 Oracle and/or its affiliates. All rights reserved.
11.8 +
11.9 +Oracle and Java are registered trademarks of Oracle and/or its affiliates.
11.10 +Other names may be trademarks of their respective owners.
11.11 +
11.12 +The contents of this file are subject to the terms of either the GNU
11.13 +General Public License Version 2 only ("GPL") or the Common
11.14 +Development and Distribution License("CDDL") (collectively, the
11.15 +"License"). You may not use this file except in compliance with the
11.16 +License. You can obtain a copy of the License at
11.17 +http://www.netbeans.org/cddl-gplv2.html
11.18 +or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
11.19 +specific language governing permissions and limitations under the
11.20 +License. When distributing the software, include this License Header
11.21 +Notice in each file and include the License file at
11.22 +nbbuild/licenses/CDDL-GPL-2-CP. Oracle designates this
11.23 +particular file as subject to the "Classpath" exception as provided
11.24 +by Oracle in the GPL Version 2 section of the License file that
11.25 +accompanied this code. If applicable, add the following below the
11.26 +License Header, with the fields enclosed by brackets [] replaced by
11.27 +your own identifying information:
11.28 +"Portions Copyrighted [year] [name of copyright owner]"
11.29 +
11.30 +If you wish your version of this file to be governed by only the CDDL
11.31 +or only the GPL Version 2, indicate your decision by adding
11.32 +"[Contributor] elects to include this software in this distribution
11.33 +under the [CDDL or GPL Version 2] license." If you do not indicate a
11.34 +single choice of license, a recipient has the option to distribute
11.35 +your version of this file under either the CDDL, the GPL Version 2 or
11.36 +to extend the choice of license to its licensees as provided above.
11.37 +However, if you add GPL Version 2 code and therefore, elected the GPL
11.38 +Version 2 license, then the option applies only if the new code is
11.39 +made subject to such option by the copyright holder.
11.40 +
11.41 +Contributor(s):
11.42 +
11.43 +Portions Copyrighted 2011 Sun Microsystems, Inc.
11.44 +-->
11.45 +<html>
11.46 + <head>
11.47 + <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
11.48 + </head>
11.49 + <body>
11.50 + Creates an empty TestNG test suite.
11.51 + </body>
11.52 +</html>
12.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
12.2 +++ b/testng/src/org/netbeans/modules/contrib/testng/resources/testng-suite-resolver.xml Sat Dec 31 20:22:49 2011 +0100
12.3 @@ -0,0 +1,18 @@
12.4 +<?xml version="1.0" encoding="UTF-8"?>
12.5 +<!--
12.6 +To change this template, choose Tools | Templates
12.7 +and open the template in the editor.
12.8 +-->
12.9 +<!DOCTYPE MIME-resolver PUBLIC "-//NetBeans//DTD MIME Resolver 1.0//EN" "http://www.netbeans.org/dtds/mime-resolver-1_0.dtd">
12.10 +<MIME-resolver>
12.11 + <file>
12.12 + <ext name="xml"/>
12.13 + <resolver mime="text/x-testng+xml">
12.14 + <xml-rule>
12.15 + <element name="suite">
12.16 + <attr name="name"/>
12.17 + </element>
12.18 + </xml-rule>
12.19 + </resolver>
12.20 + </file>
12.21 +</MIME-resolver>
13.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
13.2 +++ b/testng/src/org/netbeans/modules/contrib/testng/resources/testng-suite.template Sat Dec 31 20:22:49 2011 +0100
13.3 @@ -0,0 +1,23 @@
13.4 +<?xml version='1.0' encoding='UTF-8' ?>
13.5 +<#assign licenseFirst = "<!--">
13.6 +<#assign licensePrefix = "">
13.7 +<#assign licenseLast = "-->">
13.8 +<#include "../Licenses/license-${project.license}.txt">
13.9 +<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd" >
13.10 +<suite name="${name}">
13.11 +
13.12 + <!--
13.13 + <suite-files>
13.14 + <suite-file path="./junit-suite.xml" />
13.15 + </suite-files>
13.16 +
13.17 + <test name="TimeOut">
13.18 + <classes>
13.19 + <class name="test.timeout.TimeOutTest" />
13.20 + <class name="test.timeout.TimeOutFromXmlTest"/>
13.21 + <class name="test.timeout.TimeOutThreadLocalSampleTest"/>
13.22 + </classes>
13.23 + </test>
13.24 + -->
13.25 +
13.26 +</suite>
14.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
14.2 +++ b/testng/test/unit/src/META-INF/services/org.openide.loaders.DataLoader Sat Dec 31 20:22:49 2011 +0100
14.3 @@ -0,0 +1,1 @@
14.4 +org.netbeans.modules.contrib.testng.TestNGSuiteDataLoader