Package org.apache.uima.ruta.ide.core.codeassist

Examples of org.apache.uima.ruta.ide.core.codeassist.RutaReferenceVisitor


        ISourceModule sm = (ISourceModule) input;
        IModelElement modelElement = sm.getModelElement();
        RutaSelectionParser parser = new RutaSelectionParser();
        ModuleDeclaration moduleDeclaration = parser.parse(sm);
        String word = document.get(wordRegion.getOffset(), wordRegion.getLength());
        RutaReferenceVisitor referenceVisitor = new RutaReferenceVisitor(wordRegion.getOffset());
        moduleDeclaration.traverse(referenceVisitor);
        ASTNode node = referenceVisitor.getResult();
        if (node instanceof RutaVariableReference
                && moduleDeclaration instanceof RutaModuleDeclaration) {
          RutaVariableReference vr = (RutaVariableReference) node;
          RutaModuleDeclaration parsed = (RutaModuleDeclaration) moduleDeclaration;
          if (vr.getType() == RutaTypeConstants.RUTA_TYPE_AT) {
View Full Code Here


      caret = extension.widgetOffset2ModelOffset(styledText.getCaretOffset());
    } else {
      int offset = sourceViewer.getVisibleRegion().getOffset();
      caret = offset + styledText.getCaretOffset();
    }
    RutaReferenceVisitor visitor1 = new RutaReferenceVisitor(caret);
    ASTNode node = null;
    try {
      parsed.traverse(visitor1);
    } catch (Exception e) {
    }
    node = visitor1.getResult();
    if (node == null) {
      RutaReferenceDeclarationVisitor visitor2 = new RutaReferenceDeclarationVisitor(caret);
      try {
        parsed.traverse(visitor2);
      } catch (Exception e) {
View Full Code Here

        ISourceModule sm = (ISourceModule) input;
        IModelElement modelElement = sm.getModelElement();
        RutaSelectionParser parser = new RutaSelectionParser();
        ModuleDeclaration moduleDeclaration = parser.parse(sm);
        String word = document.get(wordRegion.getOffset(), wordRegion.getLength());
        RutaReferenceVisitor referenceVisitor = new RutaReferenceVisitor(wordRegion
                .getOffset());
        moduleDeclaration.traverse(referenceVisitor);
        ASTNode node = referenceVisitor.getResult();
        if (node instanceof RutaVariableReference
                && moduleDeclaration instanceof RutaModuleDeclaration) {
          RutaVariableReference vr = (RutaVariableReference) node;
          RutaModuleDeclaration parsed = (RutaModuleDeclaration) moduleDeclaration;
          if (vr.getType() == RutaTypeConstants.RUTA_TYPE_AT) {
View Full Code Here

      caret = extension.widgetOffset2ModelOffset(styledText.getCaretOffset());
    } else {
      int offset = sourceViewer.getVisibleRegion().getOffset();
      caret = offset + styledText.getCaretOffset();
    }
    RutaReferenceVisitor visitor1 = new RutaReferenceVisitor(caret);
    ASTNode node = null;
    try {
      parsed.traverse(visitor1);
    } catch (Exception e) {
    }
    node = visitor1.getResult();
    if (node == null) {
      RutaReferenceDeclarationVisitor visitor2 = new RutaReferenceDeclarationVisitor(
              caret);
      try {
        parsed.traverse(visitor2);
View Full Code Here

TOP

Related Classes of org.apache.uima.ruta.ide.core.codeassist.RutaReferenceVisitor

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.