Ignore:
Timestamp:
10/26/10 11:53:37 (14 years ago)
Author:
zeiss
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/de.ugoe.cs.swe.bnftools.ebnf.ui/src/de/ugoe/cs/swe/bnftools/ui/refactoring/inlinesinglereferencedrules/InlineSingleReferencedRulesRefactoringHandler.java

    r5 r18  
    2222import com.google.inject.Inject; 
    2323 
     24import de.ugoe.cs.swe.bnftools.ebnf.BnfEntry; 
    2425import de.ugoe.cs.swe.bnftools.ebnf.Rule; 
    2526import de.ugoe.cs.swe.bnftools.ui.quickfix.processors.InlineRulesProcessor; 
     
    5253                for (int i=0; i < rootNode.getParserNode().getChildren().size(); i++) { 
    5354                        AbstractNode currentNode = rootNode.getParserNode().getChildren().get(i); 
     55 
     56                        EObject element = currentNode.getElement(); 
     57                        if (!(element instanceof BnfEntry)) 
     58                                continue; 
     59                        BnfEntry bnfEntry = (BnfEntry) element; 
     60                        if (bnfEntry.getRule() == null) 
     61                                continue; 
     62                         
     63                        currentNode = NodeUtil.getNodeAdapter(bnfEntry.getRule()).getParserNode(); 
     64 
    5465                        if (currentNode.getElement() instanceof Rule) { 
    5566                                Rule rule = (Rule) currentNode.getElement(); 
Note: See TracChangeset for help on using the changeset viewer.