Skip to content

Commit

Permalink
removed other methods
Browse files Browse the repository at this point in the history
  • Loading branch information
LorenzoBettini committed May 22, 2024
1 parent a44b5b1 commit ea192d9
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 42 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -130,36 +130,6 @@ provideEditingDomain''',
'''.parse.module.allGuiceProviderBindingsMethodsInSuperclass.map[simpleName].join("\n"))
}

@Test
def void testGetAllWithExtendsClause() {
assertEqualsStrings(
'''
LabelProviderImpl
FormFeatureCaptionProviderImpl''',
'''
module my.test.mod {
labelProvider {}
bindings {} // this is not a WithExtendsClause
formFeatureCaptionProvider {}
}
'''.parseAndAssertNoError.module.allWithExtendsClause.map[class.simpleName].join("\n"))
}

@Test
def void testGetAllWithExtendsClauseInferredJavaTypes() {
assertEqualsStrings(
'''
ModLabelProvider
ModFormFeatureCaptionProvider''',
'''
module my.test.mod {
labelProvider {}
bindings {} // this is not a WithExtendsClause
formFeatureCaptionProvider {}
}
'''.parseAndAssertNoError.module.allWithExtendsClauseInferredJavaTypes.map[simpleName].join("\n"))
}

@Test
def void testContainsConstructorAcceptingSinglePluginParameter() {
val module = '''
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,12 @@
*/
package org.eclipse.emf.parsley.dsl.util;

import static com.google.common.collect.Iterables.concat;
import static org.eclipse.xtext.xbase.lib.CollectionLiterals.emptyList;
import static org.eclipse.xtext.xbase.lib.IterableExtensions.exists;
import static org.eclipse.xtext.xbase.lib.IterableExtensions.filter;
import static org.eclipse.xtext.xbase.lib.IterableExtensions.head;
import static org.eclipse.xtext.xbase.lib.IterableExtensions.map;

import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.parsley.dsl.model.WithExtendsClause;
import org.eclipse.emf.parsley.dsl.typing.EmfParsleyDslTypeSystem;
import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.eclipse.xtext.common.types.JvmGenericType;
Expand Down Expand Up @@ -68,15 +65,6 @@ public Iterable<JvmOperation> getAllGuiceValueBindingsMethodsInSuperclass(final
return filter(superTypeJvmOperations(type), it -> it.getSimpleName().startsWith("value"));
}

public Iterable<JvmGenericType> getAllWithExtendsClauseInferredJavaTypes(
final org.eclipse.emf.parsley.dsl.model.Module module) {
return concat(map(getAllWithExtendsClause(module), this::getInferredJavaTypes));
}

public Iterable<WithExtendsClause> getAllWithExtendsClause(final org.eclipse.emf.parsley.dsl.model.Module module) {
return filter(module.eContents(), WithExtendsClause.class);
}

public boolean containsConstructorAcceptingPluginParameter(final EObject context, final JvmTypeReference typeRef) {
final JvmType type = typeRef.getType();
if (type instanceof JvmGenericType) {
Expand Down

0 comments on commit ea192d9

Please sign in to comment.