Permalink
Browse files

Added missing generic specification for IGenerator

This was caused buy changes upstream.

Might solve bug 1995
  • Loading branch information...
1 parent 4aaf90b commit 221819152fd1fcf32c340351fdfccc023db286fa Arvid Berg committed with Jun 24, 2010
@@ -35,18 +35,18 @@
public class ChoiceGenerator implements IGenerator<IAtomContainer> {
boolean use = false;
- List<IGenerator> generators;
+ List<IGenerator<IAtomContainer>> generators;
public ChoiceGenerator() {
- generators = new ArrayList<IGenerator>();
+ generators = new ArrayList<IGenerator<IAtomContainer>>();
}
- public ChoiceGenerator(IGenerator generator) {
+ public ChoiceGenerator(IGenerator<IAtomContainer> generator) {
this();
generators.add(generator);
}
- private void add(IGenerator generator) {
+ private void add(IGenerator<IAtomContainer> generator) {
generators.add(generator);
}
@@ -65,7 +65,7 @@ public IRenderingElement generate( IAtomContainer ac,
if(use) {
ElementGroup group = new ElementGroup();
- for(IGenerator generator:generators) {
+ for(IGenerator<IAtomContainer> generator:generators) {
group.add( generator.generate( ac, model ));
}
return group;
@@ -78,7 +78,7 @@ public IRenderingElement generate( IAtomContainer ac,
public static ChoiceGenerator getGeneratorsFromExtensionPoint() {
ChoiceGenerator choiceGenerator = new ChoiceGenerator();
- for(IGenerator generator:getGeneratorsFromExtension()) {
+ for(IGenerator<IAtomContainer> generator:getGeneratorsFromExtension()) {
choiceGenerator.add(generator);
}
return choiceGenerator;
@@ -99,7 +99,8 @@ public static ChoiceGenerator getGeneratorsFromExtensionPoint() {
for( IConfigurationElement element
: extension.getConfigurationElements() ) {
try {
- final IGenerator generator = (IGenerator)
+ final IGenerator<IAtomContainer> generator =
+ (IGenerator<IAtomContainer>)
element.createExecutableExtension("class");
choiseGenerator.add( generator);
} catch (CoreException e) {
@@ -121,7 +122,7 @@ public void accept( IRenderingVisitor v ) {
public List<IGeneratorParameter<?>> getParameters() {
List<IGeneratorParameter<?>> params = new ArrayList<IGeneratorParameter<?>>();
- for(IGenerator gen:generators) {
+ for(IGenerator<IAtomContainer> gen:generators) {
params.addAll( gen.getParameters() );
}
return params;

0 comments on commit 2218191

Please sign in to comment.