Skip to content

Commit 98a669e

Browse files
author
Tatiana Castro-Vélez
authored
Merge branch 'main' into 139-missing-tffunction-parameters
2 parents c9a3be5 + 019ef09 commit 98a669e

File tree

8 files changed

+428
-386
lines changed

8 files changed

+428
-386
lines changed
Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1-
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
2-
<modelVersion>4.0.0</modelVersion>
3-
<artifactId>edu.cuny.hunter.hybridize.core</artifactId>
4-
<packaging>eclipse-plugin</packaging>
5-
<parent>
6-
<groupId>edu.cuny.hunter.hybridize</groupId>
7-
<artifactId>edu.cuny.hunter.hybridize</artifactId>
8-
<version>1.0.0-SNAPSHOT</version>
9-
<relativePath>..</relativePath>
10-
</parent>
11-
</project>
1+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
2+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
3+
<modelVersion>4.0.0</modelVersion>
4+
<artifactId>edu.cuny.hunter.hybridize.core</artifactId>
5+
<packaging>eclipse-plugin</packaging>
6+
<parent>
7+
<groupId>edu.cuny.hunter.hybridize</groupId>
8+
<artifactId>edu.cuny.hunter.hybridize</artifactId>
9+
<version>1.0.0-SNAPSHOT</version>
10+
<relativePath>..</relativePath>
11+
</parent>
12+
</project>
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
package edu.cuny.hunter.hybridize.core.analysis;
2+
3+
import java.util.Arrays;
4+
5+
public enum PreconditionFailure {
6+
CURRENTLY_NOT_HANDLED(1);
7+
8+
static {
9+
// check that the codes are unique.
10+
if (Arrays.stream(PreconditionFailure.values()).map(PreconditionFailure::getCode).distinct()
11+
.count() != PreconditionFailure.values().length)
12+
throw new IllegalStateException("Codes aren't unique.");
13+
}
14+
15+
public static void main(String[] args) {
16+
System.out.println("code,name");
17+
for (PreconditionFailure failure : PreconditionFailure.values())
18+
System.out.println(failure.getCode() + "," + failure);
19+
}
20+
21+
private int code;
22+
23+
private PreconditionFailure(int code) {
24+
this.code = code;
25+
}
26+
27+
public int getCode() {
28+
return this.code;
29+
}
30+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
package edu.cuny.hunter.hybridize.core.analysis;
2+
3+
public enum PreconditionSuccess {
4+
// P1,
5+
// P2,
6+
// P3,
7+
// P4,
8+
// P5
9+
}
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
package edu.cuny.hunter.hybridize.core.analysis;
22

3-
public enum TransformationAction {
3+
public enum Transformation {
44
CONVERT_TO_EAGER, CONVERT_TO_HYBRID, RECONFIGURE
55
}

edu.cuny.hunter.hybridize.core/src/edu/cuny/hunter/hybridize/core/refactorings/HybridizeFunctionRefactoringProcessor.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ private static RefactoringStatus checkParameters(Function func) {
5353
public HybridizeFunctionRefactoringProcessor() {
5454
}
5555

56-
public HybridizeFunctionRefactoringProcessor(Set<FunctionDefinition> functionDefinitions, IProgressMonitor monitor)
56+
public HybridizeFunctionRefactoringProcessor(Set<FunctionDefinition> functionDefinitionSet, IProgressMonitor monitor)
5757
throws TooManyMatchesException, BadLocationException {
5858
// Force the use of typeshed. It's an experimental feature of PyDev.
5959
InterpreterGeneralPreferences.FORCE_USE_TYPESHED = Boolean.TRUE;
@@ -62,7 +62,7 @@ public HybridizeFunctionRefactoringProcessor(Set<FunctionDefinition> functionDef
6262
if (functions != null) {
6363
Set<Function> functionSet = this.getFunctions();
6464

65-
for (FunctionDefinition fd : functionDefinitions) {
65+
for (FunctionDefinition fd : functionDefinitionSet) {
6666
Function function = new Function(fd, monitor);
6767

6868
// Add the Function to the Function set.
Lines changed: 56 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -1,57 +1,57 @@
1-
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
2-
<modelVersion>4.0.0</modelVersion>
3-
<parent>
4-
<groupId>edu.cuny.hunter.hybridize</groupId>
5-
<artifactId>edu.cuny.hunter.hybridize</artifactId>
6-
<version>1.0.0-SNAPSHOT</version>
7-
<relativePath>..</relativePath>
8-
</parent>
9-
<artifactId>edu.cuny.hunter.hybridize.tests.report</artifactId>
10-
<packaging>pom</packaging>
11-
<profiles>
12-
<profile>
13-
<id>jacoco</id>
14-
<activation>
15-
<activeByDefault>false</activeByDefault>
16-
</activation>
17-
<build>
18-
<plugins>
19-
<plugin>
20-
<groupId>org.jacoco</groupId>
21-
<artifactId>jacoco-maven-plugin</artifactId>
22-
<version>${jacoco-version}</version>
23-
<executions>
24-
<execution>
25-
<phase>verify</phase>
26-
<goals>
27-
<goal>report-aggregate</goal>
28-
</goals>
29-
</execution>
30-
</executions>
31-
</plugin>
32-
</plugins>
33-
</build>
34-
</profile>
35-
</profiles>
36-
<dependencies>
37-
<dependency>
38-
<groupId>edu.cuny.hunter.hybridize</groupId>
39-
<artifactId>edu.cuny.hunter.hybridize.core</artifactId>
40-
<version>1.0.0-SNAPSHOT</version>
41-
<scope>compile</scope>
42-
</dependency>
43-
<dependency>
44-
<groupId>edu.cuny.hunter.hybridize</groupId>
45-
<artifactId>edu.cuny.hunter.hybridize.ui</artifactId>
46-
<version>1.0.0-SNAPSHOT</version>
47-
<scope>compile</scope>
48-
</dependency>
49-
<dependency>
50-
<groupId>edu.cuny.hunter.hybridize</groupId>
51-
<artifactId>edu.cuny.hunter.hybridize.tests</artifactId>
52-
<version>1.0.0-SNAPSHOT</version>
53-
<scope>test</scope>
54-
</dependency>
55-
</dependencies>
1+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
2+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
3+
<modelVersion>4.0.0</modelVersion>
4+
<parent>
5+
<groupId>edu.cuny.hunter.hybridize</groupId>
6+
<artifactId>edu.cuny.hunter.hybridize</artifactId>
7+
<version>1.0.0-SNAPSHOT</version>
8+
<relativePath>..</relativePath>
9+
</parent>
10+
<artifactId>edu.cuny.hunter.hybridize.tests.report</artifactId>
11+
<packaging>pom</packaging>
12+
<profiles>
13+
<profile>
14+
<id>jacoco</id>
15+
<activation>
16+
<activeByDefault>false</activeByDefault>
17+
</activation>
18+
<build>
19+
<plugins>
20+
<plugin>
21+
<groupId>org.jacoco</groupId>
22+
<artifactId>jacoco-maven-plugin</artifactId>
23+
<version>${jacoco-version}</version>
24+
<executions>
25+
<execution>
26+
<phase>verify</phase>
27+
<goals>
28+
<goal>report-aggregate</goal>
29+
</goals>
30+
</execution>
31+
</executions>
32+
</plugin>
33+
</plugins>
34+
</build>
35+
</profile>
36+
</profiles>
37+
<dependencies>
38+
<dependency>
39+
<groupId>edu.cuny.hunter.hybridize</groupId>
40+
<artifactId>edu.cuny.hunter.hybridize.core</artifactId>
41+
<version>1.0.0-SNAPSHOT</version>
42+
<scope>compile</scope>
43+
</dependency>
44+
<dependency>
45+
<groupId>edu.cuny.hunter.hybridize</groupId>
46+
<artifactId>edu.cuny.hunter.hybridize.ui</artifactId>
47+
<version>1.0.0-SNAPSHOT</version>
48+
<scope>compile</scope>
49+
</dependency>
50+
<dependency>
51+
<groupId>edu.cuny.hunter.hybridize</groupId>
52+
<artifactId>edu.cuny.hunter.hybridize.tests</artifactId>
53+
<version>1.0.0-SNAPSHOT</version>
54+
<scope>test</scope>
55+
</dependency>
56+
</dependencies>
5657
</project>
57-
Lines changed: 69 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -1,69 +1,70 @@
1-
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
2-
<modelVersion>4.0.0</modelVersion>
3-
<artifactId>edu.cuny.hunter.hybridize.tests</artifactId>
4-
<packaging>eclipse-test-plugin</packaging>
5-
<parent>
6-
<groupId>edu.cuny.hunter.hybridize</groupId>
7-
<artifactId>edu.cuny.hunter.hybridize</artifactId>
8-
<version>1.0.0-SNAPSHOT</version>
9-
<relativePath>..</relativePath>
10-
</parent>
11-
<scm>
12-
<url>https://github.com/ponder-lab/Hybridize-Functions-Refactoring/tree/main/edu.cuny.hunter.hybridize.tests</url>
13-
</scm>
14-
<profiles>
15-
<profile>
16-
<id>macosx</id>
17-
<activation>
18-
<os>
19-
<name>mac os x</name>
20-
<family>mac</family>
21-
</os>
22-
</activation>
23-
<properties>
24-
<ui.test.vmargs>${tycho.testArgLine} -XstartOnFirstThread -ea -Dosgi.requiredJavaVersion=11 -XX:MaxPermSize=256m -Xms1024m -Xmx8192m</ui.test.vmargs>
25-
<argLine>${ui.test.vmargs}</argLine>
26-
</properties>
27-
</profile>
28-
<profile>
29-
<id>other-os</id>
30-
<activation>
31-
<os>
32-
<name>not-mac</name>
33-
<family>!mac</family>
34-
</os>
35-
</activation>
36-
<properties>
37-
<ui.test.vmargs>${tycho.testArgLine} -ea -Dosgi.requiredJavaVersion=11 -XX:MaxPermSize=256m -Xms1024m -Xmx8192m</ui.test.vmargs>
38-
<argLine>${ui.test.vmargs}</argLine>
39-
</properties>
40-
</profile>
41-
</profiles>
42-
<build>
43-
<plugins>
44-
<plugin>
45-
<groupId>org.eclipse.tycho</groupId>
46-
<artifactId>tycho-surefire-plugin</artifactId>
47-
<version>${tycho-version}</version>
48-
<configuration>
49-
<useUIHarness>true</useUIHarness>
50-
<useUIThread>false</useUIThread>
51-
<failIfNoTests>true</failIfNoTests>
52-
<showEclipseLog>true</showEclipseLog>
53-
<skip>false</skip>
54-
<skipTests>false</skipTests>
55-
<explodedBundles>
56-
<bundle>org.junit</bundle>
57-
</explodedBundles>
58-
<dependencies>
59-
<dependency>
60-
<type>eclipse-plugin</type>
61-
<artifactId>org.eclipse.equinox.event</artifactId>
62-
<version>0.0.0</version>
63-
</dependency>
64-
</dependencies>
65-
</configuration>
66-
</plugin>
67-
</plugins>
68-
</build>
1+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
2+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
3+
<modelVersion>4.0.0</modelVersion>
4+
<artifactId>edu.cuny.hunter.hybridize.tests</artifactId>
5+
<packaging>eclipse-test-plugin</packaging>
6+
<parent>
7+
<groupId>edu.cuny.hunter.hybridize</groupId>
8+
<artifactId>edu.cuny.hunter.hybridize</artifactId>
9+
<version>1.0.0-SNAPSHOT</version>
10+
<relativePath>..</relativePath>
11+
</parent>
12+
<scm>
13+
<url>https://github.com/ponder-lab/Hybridize-Functions-Refactoring/tree/main/edu.cuny.hunter.hybridize.tests</url>
14+
</scm>
15+
<profiles>
16+
<profile>
17+
<id>macosx</id>
18+
<activation>
19+
<os>
20+
<name>mac os x</name>
21+
<family>mac</family>
22+
</os>
23+
</activation>
24+
<properties>
25+
<ui.test.vmargs>${tycho.testArgLine} -XstartOnFirstThread -ea -Dosgi.requiredJavaVersion=11 -XX:MaxPermSize=256m -Xms1024m -Xmx8192m</ui.test.vmargs>
26+
<argLine>${ui.test.vmargs}</argLine>
27+
</properties>
28+
</profile>
29+
<profile>
30+
<id>other-os</id>
31+
<activation>
32+
<os>
33+
<name>not-mac</name>
34+
<family>!mac</family>
35+
</os>
36+
</activation>
37+
<properties>
38+
<ui.test.vmargs>${tycho.testArgLine} -ea -Dosgi.requiredJavaVersion=11 -XX:MaxPermSize=256m -Xms1024m -Xmx8192m</ui.test.vmargs>
39+
<argLine>${ui.test.vmargs}</argLine>
40+
</properties>
41+
</profile>
42+
</profiles>
43+
<build>
44+
<plugins>
45+
<plugin>
46+
<groupId>org.eclipse.tycho</groupId>
47+
<artifactId>tycho-surefire-plugin</artifactId>
48+
<version>${tycho-version}</version>
49+
<configuration>
50+
<useUIHarness>true</useUIHarness>
51+
<useUIThread>false</useUIThread>
52+
<failIfNoTests>true</failIfNoTests>
53+
<showEclipseLog>true</showEclipseLog>
54+
<skip>false</skip>
55+
<skipTests>false</skipTests>
56+
<explodedBundles>
57+
<bundle>org.junit</bundle>
58+
</explodedBundles>
59+
<dependencies>
60+
<dependency>
61+
<type>eclipse-plugin</type>
62+
<artifactId>org.eclipse.equinox.event</artifactId>
63+
<version>0.0.0</version>
64+
</dependency>
65+
</dependencies>
66+
</configuration>
67+
</plugin>
68+
</plugins>
69+
</build>
6970
</project>

0 commit comments

Comments
 (0)