Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjmisinco2015-05-18 19:37:40 +0000
committerRyan T. Baldwin2015-05-18 19:37:40 +0000
commit5157486573d7684ef84f2c5937fd8058ac6d738b (patch)
treed953213d712a78ad7263abd4a68e2e5b30d428a1
parentf04e3cf7bcfb23f4dcae2cd5fe43b5a3ddc4bb56 (diff)
downloadorg.eclipse.osee-5157486573d7684ef84f2c5937fd8058ac6d738b.tar.gz
org.eclipse.osee-5157486573d7684ef84f2c5937fd8058ac6d738b.tar.xz
org.eclipse.osee-5157486573d7684ef84f2c5937fd8058ac6d738b.zip
bug[ats_ATS196737]: ObjectId import statement being added to top of script
-rw-r--r--plugins/org.eclipse.osee.define.test/src/org/eclipse/osee/define/traceability/TestUnitAnnotationUtilityTest.java4
-rw-r--r--plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/TestUnitTagger.java6
-rw-r--r--plugins/org.eclipse.osee.support.config/launchConfig/OSEE_Application_Server_https_[HSQLDB].launch4
3 files changed, 8 insertions, 6 deletions
diff --git a/plugins/org.eclipse.osee.define.test/src/org/eclipse/osee/define/traceability/TestUnitAnnotationUtilityTest.java b/plugins/org.eclipse.osee.define.test/src/org/eclipse/osee/define/traceability/TestUnitAnnotationUtilityTest.java
index d4e23399d95..62a1b7ed214 100644
--- a/plugins/org.eclipse.osee.define.test/src/org/eclipse/osee/define/traceability/TestUnitAnnotationUtilityTest.java
+++ b/plugins/org.eclipse.osee.define.test/src/org/eclipse/osee/define/traceability/TestUnitAnnotationUtilityTest.java
@@ -26,12 +26,13 @@ public class TestUnitAnnotationUtilityTest {
sb.append("\n");
sb.append(IMPORT_STRING);
sb.append("\n");
+ sb.append("import org.junit.Assert;\n");
sb.append("public class test {\n");
return CharBuffer.wrap(sb.toString());
}
private CharBuffer getClassNoImportNoAnnotation() {
- return CharBuffer.wrap("public class test {\n");
+ return CharBuffer.wrap("import org.junit.Assert;\n\npublic class test {\n");
}
private CharBuffer getClassWithImportAndAnnotation() {
@@ -39,6 +40,7 @@ public class TestUnitAnnotationUtilityTest {
sb.append("\n");
sb.append(IMPORT_STRING);
sb.append("\n");
+ sb.append("import org.junit.Assert;\n");
sb.append("@ObjectId(\"TEST\")\n");
sb.append("public class test {\n");
return CharBuffer.wrap(sb.toString());
diff --git a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/TestUnitTagger.java b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/TestUnitTagger.java
index 929fac88f49..2f784eb0757 100644
--- a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/TestUnitTagger.java
+++ b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/TestUnitTagger.java
@@ -21,13 +21,13 @@ import org.eclipse.osee.framework.jdk.core.text.change.ChangeSet;
public class TestUnitTagger extends AbstractSourceTagger {
private static final String ANNOTATION_STRING = "@ObjectId(\"%s\")\n";
- private static final String IMPORT_STRING = "import org.eclipse.osee.framework.jdk.core.type.ObjectId;\n";
+ private static final String IMPORT_STRING = "\nimport org.eclipse.osee.framework.jdk.core.type.ObjectId;";
private static final Pattern classPattern = Pattern.compile("public.*?\\s+class\\s+", Pattern.DOTALL);
public static final Pattern ANNOTATION_PATTERN = Pattern.compile("@ObjectId\\s*\\(\"(.*?)\"\\s*\\)");
private static final Pattern importPattern =
Pattern.compile("import org\\.eclipse\\.osee\\.framework\\.jdk\\.core\\.type\\.ObjectId;");
- private static final Pattern importBlockPattern = Pattern.compile("(import\\s.*;\\n)+");
+ private static final Pattern importBlockPattern = Pattern.compile("(\\s*import\\s.*;)+");
private final Matcher classMatcher;
private final Matcher annotationMatcher;
@@ -68,8 +68,8 @@ public class TestUnitTagger extends AbstractSourceTagger {
int position = 0;
if (importBlockMatcher.find()) {
position = importBlockMatcher.end();
+ changeSet.insertBefore(position, IMPORT_STRING);
}
- changeSet.insertBefore(position, IMPORT_STRING);
return CharBuffer.wrap(changeSet.applyChangesToSelf().toString().toCharArray());
}
}
diff --git a/plugins/org.eclipse.osee.support.config/launchConfig/OSEE_Application_Server_https_[HSQLDB].launch b/plugins/org.eclipse.osee.support.config/launchConfig/OSEE_Application_Server_https_[HSQLDB].launch
index 2e2d5c252b8..24653173a32 100644
--- a/plugins/org.eclipse.osee.support.config/launchConfig/OSEE_Application_Server_https_[HSQLDB].launch
+++ b/plugins/org.eclipse.osee.support.config/launchConfig/OSEE_Application_Server_https_[HSQLDB].launch
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<launchConfiguration type="org.eclipse.pde.ui.EquinoxLauncher">
<setAttribute key="additional_plugins">
-<setEntry value="com.google.guava:10.0.1.v201203051515:default:false"/>
<setEntry value="com.google.guava:12.0.0.v201212092141:default:false"/>
+<setEntry value="com.google.guava:15.0.0.v201403281430:default:false"/>
</setAttribute>
<booleanAttribute key="append.args" value="true"/>
<booleanAttribute key="automaticAdd" value="false"/>
@@ -17,7 +17,7 @@
<stringAttribute key="featureDefaultLocation" value="workspace"/>
<stringAttribute key="featurePluginResolution" value="workspace"/>
<booleanAttribute key="includeOptional" value="false"/>
-<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl} -consoleLog -console -clean"/>
<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-XX:MaxPermSize=256m&#13;&#10;-Xmx1024m&#13;&#10;-Declipse.ignoreApp=true &#13;&#10;-Dosgi.noShutdown=true&#13;&#10;-Dosee.log.default=INFO&#13;&#10;-Dosee.authentication.protocol=demo&#13;&#10;-Dorg.eclipse.equinox.http.jetty.https.enabled=true&#13;&#10;-Dorg.eclipse.equinox.http.jetty.ssl.keystore=${project_loc:org.eclipse.osee.support.config}/launchConfig/demo.keystore&#13;&#10;-Dorg.eclipse.equinox.http.jetty.ssl.password=demoPassword&#13;&#10;-Dorg.eclipse.equinox.http.jetty.ssl.keypassword=demoPassword&#13;&#10;-Dorg.osgi.service.http.port.secure=8089&#13;&#10;-Dcm.config.uri=&quot;${project_loc:org.eclipse.osee.support.config}/launchConfig/osee.hsql.json&quot;"/>

Back to the top