Skip to content

Commit af0a833

Browse files
committed
Bulk changes.
1 parent daccb6c commit af0a833

File tree

16 files changed

+40
-277
lines changed

16 files changed

+40
-277
lines changed
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
# Properties file for edu.cuny.hunter.streamrefactoring.ui
2-
Bundle-Vendor = New York City College of Technology, City University of New York
3-
Bundle-Name = Eclipse Migrate Skeletal Implementation to Interface Refactoring Core Plugin
2+
Bundle-Vendor = Hunter College, City University of New York
3+
Bundle-Name = Eclipse Optimize Stream Refactoring Core Plugin

edu.cuny.hunter.streamrefactoring.core/build.properties

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,3 @@ bin.includes = META-INF/,\
1010
src.includes = EclipseDefaultExclusions.txt,\
1111
lib/,\
1212
pom.xml,\
13-
plugin.xml,\
14-
logging.properties,\
15-
build.properties,\
16-
META-INF/MANIFEST.MF,\
17-
OSGI-INF/,\
18-
.project,\
19-
.gitignore

edu.cuny.hunter.streamrefactoring.core/plugin.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
<extension
55
point="org.eclipse.ltk.core.refactoring.refactoringContributions">
66
<contribution
7-
class="edu.cuny.hunter.streamrefactoring.core.contributions.ConvertStreamToParallelRefactoringContribution"
8-
id="org.eclipse.migrate.skeletal.implementation.to.interface.contribution">
7+
class="edu.cuny.hunter.streamrefactoring.core.contributions.OptimizeStreamRefactoringContribution"
8+
id="org.eclipse.optimize.stream.contribution">
99
</contribution>
1010
</extension>
1111

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@
99
import org.eclipse.ltk.core.refactoring.RefactoringDescriptor;
1010
import org.eclipse.ltk.core.refactoring.RefactoringStatus;
1111

12-
import edu.cuny.hunter.streamrefactoring.core.descriptors.ConvertStreamToParallelRefactoringDescriptor;
12+
import edu.cuny.hunter.streamrefactoring.core.descriptors.OptimizeStreamRefactoringDescriptor;
1313

1414
@SuppressWarnings("restriction")
15-
public class ConvertStreamToParallelRefactoringContribution extends JavaUIRefactoringContribution {
15+
public class OptimizeStreamRefactoringContribution extends JavaUIRefactoringContribution {
1616

1717
/*
1818
* (non-Javadoc)
@@ -25,7 +25,7 @@ public class ConvertStreamToParallelRefactoringContribution extends JavaUIRefact
2525
@Override
2626
public RefactoringDescriptor createDescriptor(String id, String project, String description, String comment,
2727
@SuppressWarnings("rawtypes") Map arguments, int flags) throws IllegalArgumentException {
28-
return new ConvertStreamToParallelRefactoringDescriptor(id, project, description, comment, arguments, flags);
28+
return new OptimizeStreamRefactoringDescriptor(id, project, description, comment, arguments, flags);
2929
}
3030

3131
@Override
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,20 +11,20 @@
1111
* @author raffi
1212
*
1313
*/
14-
public class ConvertStreamToParallelRefactoringDescriptor extends JavaRefactoringDescriptor {
14+
public class OptimizeStreamRefactoringDescriptor extends JavaRefactoringDescriptor {
1515

16-
public static final String REFACTORING_ID = "edu.cuny.hunter.streamrefactoring.convert.stream.to.parallel"; //$NON-NLS-1$
16+
public static final String REFACTORING_ID = "edu.cuny.hunter.streamrefactoring.optimize.stream"; //$NON-NLS-1$
1717

18-
protected ConvertStreamToParallelRefactoringDescriptor() {
18+
protected OptimizeStreamRefactoringDescriptor() {
1919
super(REFACTORING_ID);
2020
}
2121

22-
public ConvertStreamToParallelRefactoringDescriptor(String project, String description, String comment,
22+
public OptimizeStreamRefactoringDescriptor(String project, String description, String comment,
2323
@SuppressWarnings("rawtypes") Map arguments, int flags) {
2424
this(REFACTORING_ID, project, description, comment, arguments, flags);
2525
}
2626

27-
public ConvertStreamToParallelRefactoringDescriptor(String id, String project, String description, String comment,
27+
public OptimizeStreamRefactoringDescriptor(String id, String project, String description, String comment,
2828
@SuppressWarnings("rawtypes") Map arguments, int flags) {
2929
super(id, project, description, comment, arguments, flags);
3030
}

edu.cuny.hunter.streamrefactoring.core/src/edu/cuny/hunter/streamrefactoring/core/messages/Messages.java

Lines changed: 1 addition & 90 deletions
Original file line numberDiff line numberDiff line change
@@ -6,111 +6,22 @@
66
import org.eclipse.osgi.util.NLS;
77

88
/**
9-
* @author raffi
10-
*
9+
* @author <a href="mailto:[email protected]">Raffi Khatchadourian</a>
1110
*/
1211
public class Messages extends NLS {
13-
public static String AnnotationMismatch;
14-
15-
public static String AnnotationNameMismatch;
16-
public static String AnnotationValueMismatch;
1712
private static final String BUNDLE_NAME = "edu.cuny.hunter.streamrefactoring.core.messages.messages"; //$NON-NLS-1$
18-
public static String CantChangeMethod;
1913
public static String CategoryDescription;
2014
public static String CategoryName;
2115
public static String CheckingPreconditions;
2216
public static String CompilingSource;
2317
public static String CreatingChange;
2418
public static String CUContainsCompileErrors;
25-
26-
public static String DeclaringTypeContainsInvalidSupertype;
27-
public static String DeclaringTypeContainsSubtype;
28-
public static String DeclaringTypeHierarchyContainsInvalidClass;
29-
public static String DeclaringTypeHierarchyContainsInvalidInterface;
30-
public static String DestinationInterfaceDeclaresFields;
31-
public static String DestinationInterfaceDeclaresMemberTypes;
32-
public static String DestinationInterfaceDeclaresTypeParameters;
33-
public static String DestinationInterfaceDoesNotExist;
34-
public static String DestinationInterfaceExtendsInterface;
35-
public static String DestinationInterfaceHasAnnotations;
36-
public static String DestinationInterfaceHasExtendingInterface;
37-
public static String DestinationInterfaceHasInvalidImplementingClass;
38-
public static String DestinationInterfaceHierarchyContainsInvalidClass;
39-
public static String DestinationInterfaceHierarchyContainsInvalidInterfaces;
40-
public static String DestinationInterfaceHierarchyContainsSubtype;
41-
public static String DestinationInterfaceHierarchyContainsSuperInterface;
42-
public static String DestinationInterfaceHierarchyContainsSupertype;
43-
public static String DestinationInterfaceIsDerived;
44-
public static String DestinationInterfaceIsFunctional;
45-
public static String DestinationInterfaceIsMember;
46-
public static String DestinationInterfaceIsNotTopLevel;
47-
public static String DestinationInterfaceIsStrictFP;
48-
public static String DestinationInterfaceMustOnlyDeclareTheMethodToMigrate;
49-
public static String DestinationInterfaceNotWritable;
50-
public static String DestinationProjectIncompatible;
51-
public static String DestinationTypeMustBePureInterface;
52-
public static String ExceptionTypeMismatch;
53-
public static String IncompatibleLanguageConstruct;
54-
public static String IncompatibleMethodReturnTypes;
55-
public static String MethodContainsCallToProtectedObjectMethod;
56-
public static String MethodContainsIncompatibleParameterTypeParameters;
57-
public static String MethodContainsInconsistentParameterAnnotations;
58-
public static String MethodContainsQualifiedThisExpression;
59-
public static String MethodContainsSuperReference;
60-
public static String MethodContainsTypeIncompatibleThisReference;
61-
public static String MethodDoesNotExist;
62-
public static String MethodsOnlyInClasses;
6319
public static String Name;
64-
public static String NoAbstractMethods;
65-
public static String NoAnnotations;
66-
public static String NoConstructors;
67-
public static String NoDestinationInterface;
68-
public static String NoFinalMethods;
69-
public static String NoLambdaMethods;
70-
public static String NoMethodsInAnnotatedTypes;
71-
public static String NoMethodsInAnnotationTypes;
72-
public static String NoMethodsInAnonymousTypes;
73-
public static String NoMethodsInBinaryTypes;
74-
public static String NoMethodsInConcreteTypes;
75-
public static String NoMethodsInEnums;
76-
public static String NoMethodsInInterfaces;
77-
public static String NoMethodsInLambdas;
78-
public static String NoMethodsInLocals;
79-
public static String NoMethodsInMemberTypes;
80-
public static String NoMethodsInReadOnlyTypes;
81-
public static String NoMethodsInStaticTypes;
82-
public static String NoMethodsInTypesThatDontImplementInterfaces;
83-
public static String NoMethodsInTypesThatExtendMultipleInterfaces;
84-
public static String NoMethodsInTypesWithFields;
85-
public static String NoMethodsInTypesWithInitializers;
86-
public static String NoMethodsInTypesWithMoreThanOneMethod;
87-
public static String NoMethodsInTypesWithMultipleCandidateTargetTypes;
88-
public static String NoMethodsInTypesWithNoCandidateTargetTypes;
89-
public static String NoMethodsInTypesWithSuperType;
90-
public static String NoMethodsInTypesWithType;
91-
public static String NoMethodsInTypesWithTypeParameters;
92-
public static String NoMethodsThatThrowExceptions;
93-
public static String NoMethodsWithParameters;
94-
public static String NoMethodsWithStatements;
95-
public static String NoMethodsWithTypeParameters;
96-
public static String NoMoreThanOneMethod;
97-
public static String NoNativeMethods;
98-
public static String NoStaticMethods;
9920
public static String NoStreamsHavePassedThePreconditions;
10021
public static String NoStreamsToConvert;
101-
public static String NoSynchronizedMethods;
10222
public static String PreconditionFailed;
10323
public static String RefactoringNotPossible;
104-
public static String SourceMethodAccessesInstanceField;
105-
public static String SourceMethodHasNoTargetMethod;
106-
public static String SourceMethodImplementsMultipleMethods;
107-
public static String SourceMethodIsDerived;
108-
public static String SourceMethodOverridesMethod;
109-
public static String SourceMethodProvidesImplementationsForMultipleMethods;
11024
public static String StreamsNotSpecified;
111-
public static String TargetMethodHasMultipleSourceMethods;
112-
public static String TargetMethodIsAlreadyDefault;
113-
public static String WrongType;
11425

11526
static {
11627
// initialize resource bundle
Original file line numberDiff line numberDiff line change
@@ -1,99 +1,7 @@
1-
Name=Convert Stream to Parallel
1+
Name=Optimize Stream
22
CategoryName=Stream Changes
33
CategoryDescription=Optimizes Java 8 streams
44
StreamsNotSpecified=No streams to refactor.
55
CheckingPreconditions=Checking preconditions...
66
CompilingSource=Compiling source ...
7-
CreatingChange=Creating change...
8-
CUContainsCompileErrors=Member ''{0}'' has a compilation unit ''{1}'' that contains compilation errors.
9-
MethodDoesNotExist=Method ''{0}'' does not exist.
10-
PreconditionFailed=No streams have passed precondition checking.
11-
RefactoringNotPossible=Method ''{0}'' has been deemed not to be a skeletal implementation and therefore in its current state cannot be refactored by this plugin.
12-
WrongType=Internal error: node ''{0}'' must be of a simple name type, instead its type was ''{1}''
13-
CantChangeMethod=Need access to source code of method ''{0}''.
14-
NoConstructors=Constructors are invalid for this refactoring.
15-
NoAnnotations=At this time, annotated methods are not supported by this refactoring.
16-
NoStaticMethods=Method ''{0}'' is static. Static methods are not skeletal implementors.
17-
NoAbstractMethods=Method ''{0}'' is abstract. Abstract methods don't have definitions to migrate.
18-
NoFinalMethods=Method ''{0}'' is final. Final methods are not allowed in interfaces.
19-
NoSynchronizedMethods=Method ''{0}'' is synchronized. Synchronized methods aren't allowed in interfaces, even if they are default.
20-
NoMethodsInInterfaces=Method ''{0}'' is already in interface ''{1}''.
21-
MethodsOnlyInClasses=Method ''{0}'' is in type ''{1}'' that is not a class.
22-
NoMethodsInAnnotatedTypes=Method ''{0}'' is in annotated type ''{1}''.
23-
NoMethodsInAnnotationTypes=Method ''{0}'' is declared in annotation type ''{1}''.
24-
NoMethodsInTypesWithFields=Method ''{0}'' is in type ''{1}'' that contains fields.
25-
NoMethodsInTypesWithInitializers=Method ''{0}'' is in type ''{1}'' that contains an initializer.
26-
NoMethodsInTypesWithMoreThanOneMethod=Method ''{0}'' is in type ''{1}'' that contains more than one method.
27-
NoMethodsInTypesWithTypeParameters=Method ''{0}'' is in type ''{1}'' that contains type parameters.
28-
NoMethodsInTypesWithType=Method ''{0}'' is type ''{1}'' that contains types.
29-
NoMethodsInTypesWithSuperType=Method ''{0}'' is in type ''{1}'' that has a super type.
30-
NoMethodsInTypesThatDontImplementInterfaces=Method ''{0}'' is in type ''{1}'' that does not implement an interface.
31-
NoMethodsInAnonymousTypes=''{0}'' is in anonymous type ''{1}''.
32-
NoMethodsInEnums=Method ''{0}'' is declared in an enum type {1}.
33-
NoMethodsInLambdas=''{0}'' is in lambda type ''{1}''.
34-
NoMethodsInLocals=''{0}'' is in local type ''{1}''.
35-
NoMethodsInMemberTypes=''{0}'' is in member type ''{1}''.
36-
NoLambdaMethods=Method ''{0}'' is a lambda method. Migrating its definition to an interface would invalidate the interface's status as a functional interface.
37-
NoMethodsInTypesThatExtendMultipleInterfaces=Method ''{0}'' is in type ''{1}'' that implements multiple interfaces.
38-
NoMethodsThatThrowExceptions=Method ''{0}'' throws an exception.
39-
NoMethodsInConcreteTypes=Method ''{0}'' is declared in the concrete type ''{1}''.
40-
NoMethodsInStaticTypes=Method ''{0}'' is in static type ''{1}''.
41-
NoMethodsWithParameters=Method ''{0}'' has parameters.
42-
IncompatibleMethodReturnTypes=Method ''{0}'' has a return type that is incompatible with its target method ''{1}''.
43-
NoMethodsWithTypeParameters=Method ''{0}'' has type parameters.
44-
NoMethodsWithStatements=Method ''{0}'' has statements.
45-
NoMethodsInBinaryTypes=Method ''{0}'' is in binary type ''{1}''.
46-
NoMethodsInReadOnlyTypes=Method ''{0}'' is in read-only type ''{1}''.
47-
NoMethodsInTypesWithNoCandidateTargetTypes=Method ''{0}'' is in type ''{1}'' that does not have super interfaces to which methods could be migrated.
48-
NoMethodsInTypesWithMultipleCandidateTargetTypes=Method ''{0}'' is in type ''{1}'' that has multiple super interfaces to which methods could be migrated.
49-
NoNativeMethods=Method ''{0}'' is native.
50-
NoMoreThanOneMethod=Can't migrate more than one method at a time.
51-
IncompatibleLanguageConstruct=Moving ''{0}'', which contains lambdas, to destination type ''{1}'' will result in compile errors, since the destination is not J2SE 1.8 compatible.
52-
DestinationTypeMustBePureInterface=''{0}'' must be a pure interface.
53-
DestinationInterfaceMustOnlyDeclareTheMethodToMigrate=''{0}'' must only declare the method that will be migrated.
54-
NoDestinationInterface=No destination interface exists for source method ''{0}''.
55-
TargetMethodIsAlreadyDefault=Method ''{0}'' is already a default method.
56-
DestinationInterfaceHasAnnotations=''{0}'' is annotated.
57-
DestinationInterfaceIsNotTopLevel=''{0}'' is not a top-level interface.
58-
DestinationInterfaceDeclaresFields=''{0}'' declares fields.
59-
DestinationInterfaceExtendsInterface=''{0}'' extends interface.
60-
DestinationInterfaceDeclaresTypeParameters=''{0}'' declares type parameters.
61-
DestinationInterfaceDeclaresMemberTypes=''{0}'' declares member types.
62-
DestinationInterfaceDoesNotExist=Destination interface ''{0}'' does not exist.
63-
DestinationInterfaceNotWritable=Need access to source code of destination interface ''{0}''.
64-
DestinationInterfaceIsMember=''{0}'' is a member interface.
65-
DestinationInterfaceIsStrictFP=Interface ''{0}'' is FP-strict but not all methods to migrate are FP-strict.
66-
DestinationInterfaceHierarchyContainsInvalidClass=Destination interface ''{0}'''s hierarchy contains an invalid class.
67-
DestinationInterfaceHierarchyContainsInvalidInterfaces=Destination interface ''{0}'''s hierarchy contains an invalid interface.
68-
DestinationInterfaceHierarchyContainsSubtype=Destination interface ''{0}'''s hierarchy contains a subtype.
69-
DestinationInterfaceHierarchyContainsSuperInterface=Destination interface ''{0}'''s hierarchy contains a super interface.
70-
DestinationInterfaceHierarchyContainsSupertype=Destination interface ''{0}'''s hierarchy contains a super type.
71-
DestinationInterfaceHasExtendingInterface=Destination interface ''{0}'' has extending interfaces.
72-
DestinationInterfaceHasInvalidImplementingClass=Destination interface ''{0}'' has an invalid implementing class.
73-
DeclaringTypeHierarchyContainsInvalidClass=Declaring type ''{0}'''s hierarchy contains an invalid class.
74-
DeclaringTypeHierarchyContainsInvalidInterface=Declaring type ''{0}'''s hierarchy contains an invalid interface.
75-
DeclaringTypeContainsInvalidSupertype=Declaring type ''{0}''' has an invalid super type.
76-
DestinationInterfaceIsFunctional=Destination interface ''{0}'' is functional.
77-
MethodContainsInconsistentParameterAnnotations=Method ''{0}'' has inconsistent parameter annotations with its target method ''{1}''.
78-
MethodContainsIncompatibleParameterTypeParameters=Method ''{0}'' has incompatible parameter type parameters with its target method ''{1}''.
79-
ExceptionTypeMismatch=Thrown exceptions differ between source method ''{0}'' and target method ''{1}''.
80-
AnnotationMismatch=Annotations differ between source method ''{0}'' and target method ''{1}''.
81-
AnnotationNameMismatch=Annotations names differ between source and targets.
82-
AnnotationValueMismatch=Annotations value differ between source annotation ''{0}'' and target annotation ''{1}''.
83-
NoStreamsHavePassedThePreconditions=No streams have passed the preconditions.
84-
NoStreamsToConvert=No streams to convert.
85-
SourceMethodHasNoTargetMethod=Method ''{0}'' has no target method.
86-
SourceMethodAccessesInstanceField=Method ''{0}'' accesses instance field ''{1}''.
87-
DestinationProjectIncompatible=Source method ''{0}'' has a target method ''{1}'' that is in a project what is not complaint with Java 8.
88-
SourceMethodImplementsMultipleMethods=Source method ''{0}'' implements multiple methods. Migrating it would result in a compilation error as either a conflict would be caused or multiple methods would be inherited.
89-
DeclaringTypeContainsSubtype=Declaring type ''{0}'' contains subtypes.
90-
SourceMethodOverridesMethod=Source method ''{0}'' overrides a method, which would result in a "class wins" rule, possibly altering virtual method dispatch semantics.
91-
MethodCannotBeAccessed=Source method ''{0}'' accesses method ''{1}'' that cannot be accessed from ''{2}''.
92-
TargetMethodHasMultipleSourceMethods=Method ''{0}'' has a target method ''{1}'' with multiple source methods.
93-
MethodContainsCallToProtectedObjectMethod=Method ''{0}'' contains a call to protected java.lang.Object method ''{1}''.
94-
MethodContainsSuperReference=Method ''{0}'' contains a reference to super, which isn't allowed in interfaces.
95-
MethodContainsTypeIncompatibleThisReference=Method ''{0}'' contains a reference to this that is not type-compatible with the migration.
96-
SourceMethodProvidesImplementationsForMultipleMethods=Source method ''{0}'' provides an implementation for a method in another interface ''{1}''. Migrating it would result in a compilation error as either a conflict would be caused or multiple methods would be inherited.
97-
MethodContainsQualifiedThisExpression=Method ''{0}'' has a declaring type that is a member and contains a qualified this expression that would not be valid in an interface.
98-
DestinationInterfaceIsDerived=Source method ''{0}'' has a destination interface ''{1}'' that is included in a derived resource.
99-
SourceMethodIsDerived=Source method ''{0}'' is included in a derived resource.
7+
CreatingChange=Creating change...

edu.cuny.hunter.streamrefactoring.core/src/edu/cuny/hunter/streamrefactoring/core/refactorings/ConvertToParallelStreamRefactoringProcessor.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
import edu.cuny.hunter.streamrefactoring.core.analysis.PreconditionFailure;
5757
import edu.cuny.hunter.streamrefactoring.core.analysis.Stream;
5858
import edu.cuny.hunter.streamrefactoring.core.analysis.StreamAnalyzer;
59-
import edu.cuny.hunter.streamrefactoring.core.descriptors.ConvertStreamToParallelRefactoringDescriptor;
59+
import edu.cuny.hunter.streamrefactoring.core.descriptors.OptimizeStreamRefactoringDescriptor;
6060
import edu.cuny.hunter.streamrefactoring.core.messages.Messages;
6161
import edu.cuny.hunter.streamrefactoring.core.utils.TimeCollector;
6262

@@ -359,7 +359,7 @@ public Change createChange(IProgressMonitor pm) throws CoreException, OperationC
359359

360360
// TODO: Fill in description.
361361

362-
ConvertStreamToParallelRefactoringDescriptor descriptor = new ConvertStreamToParallelRefactoringDescriptor(
362+
OptimizeStreamRefactoringDescriptor descriptor = new OptimizeStreamRefactoringDescriptor(
363363
null, "TODO", null, arguments, flags);
364364

365365
return new DynamicValidationRefactoringChange(descriptor, this.getProcessorName(), manager.getAllChanges());
@@ -431,7 +431,7 @@ public TimeCollector getExcludedTimeCollector() {
431431

432432
@Override
433433
public String getIdentifier() {
434-
return ConvertStreamToParallelRefactoringDescriptor.REFACTORING_ID;
434+
return OptimizeStreamRefactoringDescriptor.REFACTORING_ID;
435435
}
436436

437437
protected IJavaProject[] getJavaProjects() {

0 commit comments

Comments
 (0)