Package tool.model

Examples of tool.model.ToolEventHandler



    // $ANTLR start "eventHandlerDeclaration"
    // /Users/peter/Documents/workspace/ToolModel/src/tool/model/grammar/ForteAST.g:472:1: eventHandlerDeclaration returns [ToolEventHandler eventHandler] : ^( EVENT_HANDLER_DECLARATION modifier IDENTIFIER ( formalParameterDecls )? ) ;
    public final ToolEventHandler eventHandlerDeclaration() throws RecognitionException {
        ToolEventHandler eventHandler = null;

        CommonTree IDENTIFIER41=null;

        try {
            // /Users/peter/Documents/workspace/ToolModel/src/tool/model/grammar/ForteAST.g:473:2: ( ^( EVENT_HANDLER_DECLARATION modifier IDENTIFIER ( formalParameterDecls )? ) )
            // /Users/peter/Documents/workspace/ToolModel/src/tool/model/grammar/ForteAST.g:473:4: ^( EVENT_HANDLER_DECLARATION modifier IDENTIFIER ( formalParameterDecls )? )
            {
            match(input,EVENT_HANDLER_DECLARATION,FOLLOW_EVENT_HANDLER_DECLARATION_in_eventHandlerDeclaration1573); if (state.failed) return eventHandler;

            match(input, Token.DOWN, null); if (state.failed) return eventHandler;
            pushFollow(FOLLOW_modifier_in_eventHandlerDeclaration1575);
            modifier();

            state._fsp--;
            if (state.failed) return eventHandler;
            IDENTIFIER41=(CommonTree)match(input,IDENTIFIER,FOLLOW_IDENTIFIER_in_eventHandlerDeclaration1577); if (state.failed) return eventHandler;
            // /Users/peter/Documents/workspace/ToolModel/src/tool/model/grammar/ForteAST.g:473:53: ( formalParameterDecls )?
            int alt44=2;
            int LA44_0 = input.LA(1);

            if ( (LA44_0==PARAMETER) ) {
                alt44=1;
            }
            switch (alt44) {
                case 1 :
                    // /Users/peter/Documents/workspace/ToolModel/src/tool/model/grammar/ForteAST.g:0:0: formalParameterDecls
                    {
                    pushFollow(FOLLOW_formalParameterDecls_in_eventHandlerDeclaration1580);
                    formalParameterDecls();

                    state._fsp--;
                    if (state.failed) return eventHandler;

                    }
                    break;

            }


            match(input, Token.UP, null); if (state.failed) return eventHandler;
            if ( state.backtracking==0 ) {

                eventHandler = new ToolEventHandler(currentType);
                eventHandler.setToolName((IDENTIFIER41!=null?IDENTIFIER41.getText():null));
                if (currentType instanceof ToolClass)
                  ((ToolClass)currentType).add(eventHandler);
               
            }
View Full Code Here



    // $ANTLR start "eventHandlerDeclaration"
    // /Users/peter/Documents/workspace/ToolModel/src/tool/model/grammar/ForteCDFTree.g:172:1: eventHandlerDeclaration returns [ToolEventHandler eventHandler] : ^( EVENT_HANDLER_DECLARATION modifier IDENTIFIER ( formalParameterDecls )? ) ;
    public final ToolEventHandler eventHandlerDeclaration() throws RecognitionException {
        ToolEventHandler eventHandler = null;

        CommonTree IDENTIFIER13=null;

        try {
            // /Users/peter/Documents/workspace/ToolModel/src/tool/model/grammar/ForteCDFTree.g:173:2: ( ^( EVENT_HANDLER_DECLARATION modifier IDENTIFIER ( formalParameterDecls )? ) )
            // /Users/peter/Documents/workspace/ToolModel/src/tool/model/grammar/ForteCDFTree.g:173:4: ^( EVENT_HANDLER_DECLARATION modifier IDENTIFIER ( formalParameterDecls )? )
            {
            match(input,EVENT_HANDLER_DECLARATION,FOLLOW_EVENT_HANDLER_DECLARATION_in_eventHandlerDeclaration575); if (state.failed) return eventHandler;

            match(input, Token.DOWN, null); if (state.failed) return eventHandler;
            pushFollow(FOLLOW_modifier_in_eventHandlerDeclaration577);
            modifier();

            state._fsp--;
            if (state.failed) return eventHandler;
            IDENTIFIER13=(CommonTree)match(input,IDENTIFIER,FOLLOW_IDENTIFIER_in_eventHandlerDeclaration579); if (state.failed) return eventHandler;
            // /Users/peter/Documents/workspace/ToolModel/src/tool/model/grammar/ForteCDFTree.g:173:53: ( formalParameterDecls )?
            int alt21=2;
            int LA21_0 = input.LA(1);

            if ( (LA21_0==PARAMETER) ) {
                alt21=1;
            }
            switch (alt21) {
                case 1 :
                    // /Users/peter/Documents/workspace/ToolModel/src/tool/model/grammar/ForteCDFTree.g:0:0: formalParameterDecls
                    {
                    pushFollow(FOLLOW_formalParameterDecls_in_eventHandlerDeclaration582);
                    formalParameterDecls();

                    state._fsp--;
                    if (state.failed) return eventHandler;

                    }
                    break;

            }


            match(input, Token.UP, null); if (state.failed) return eventHandler;
            if ( state.backtracking==0 ) {

                eventHandler = new ToolEventHandler(((classDeclaration_scope)classDeclaration_stack.peek()).currentClass);
                eventHandler.setToolName((IDENTIFIER13!=null?IDENTIFIER13.getText():null));
                ((classDeclaration_scope)classDeclaration_stack.peek()).currentClass.add(eventHandler);
               
            }

            }
View Full Code Here

          if (data instanceof ToolMethod){
            showMethodEditor((ToolMethod)data);
            return;
         
          } else {
            ToolEventHandler eh = ((ToolEventHandler)data);
            cexFile = eh.getFile()
            searchText = eh.getSignature();
            searchText = "event handler\\s+.+\\." + searchText.trim();
          }
         
          if (cexFile == null)
            return;
View Full Code Here

TOP

Related Classes of tool.model.ToolEventHandler

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.