zoukankan      html  css  js  c++  java
  • 。。。。

    public class DylanLineMarkerProvider implements LineMarkerProvider { 
      protected final DaemonCodeAnalyzerSettings myDaemonSettings; 
      protected final EditorColorsManager myColorsManager; 
     
      public DylanLineMarkerProvider(DaemonCodeAnalyzerSettings daemonSettings, EditorColorsManager colorsManager) { 
        myDaemonSettings = daemonSettings; 
        myColorsManager = colorsManager; 
      } 
     
      @Override 
      @Nullable 
      public LineMarkerInfo getLineMarkerInfo(@NotNull PsiElement element) { 
        if (myDaemonSettings.SHOW_METHOD_SEPARATORS) { 
          if (element instanceof DylanDefinition) { 
            LineMarkerInfo info = new LineMarkerInfo<PsiElement>(element, element.getTextRange(), null, Pass.UPDATE_ALL, 
                                                                 FunctionUtil.<Object, String>nullConstant(), null, 
                                                                 GutterIconRenderer.Alignment.RIGHT); 
            EditorColorsScheme scheme = myColorsManager.getGlobalScheme(); 
            info.separatorColor = scheme.getColor(CodeInsightColors.METHOD_SEPARATORS_COLOR); 
            info.separatorPlacement = SeparatorPlacement.BOTTOM; 
            return info; 
          } 
        } 
        return null; 
      } 
     
      @Override 
      public void collectSlowLineMarkers(@NotNull List<PsiElement> elements, @NotNull Collection<LineMarkerInfo> result) { 
      } 
    }
    

      

    public class DylanParserDefinition implements ParserDefinition { 
      public static final IFileElementType FILE = new IFileElementType(DylanLanguage.INSTANCE); 
     
      @NotNull 
      @Override 
      public Lexer createLexer(Project project) { 
        return new DylanFlexLexer(); 
      } 
     
      @NotNull 
      public TokenSet getWhitespaceTokens() { 
        return WHITE_SPACES; 
      } 
     
      @NotNull 
      public TokenSet getCommentTokens() { 
        return COMMENTS; 
      } 
     
      @NotNull 
      public TokenSet getStringLiteralElements() { 
        return TokenSet.EMPTY; 
      } 
     
      @NotNull 
      public PsiParser createParser(final Project project) { 
        return new DylanParser(); 
      } 
     
      @Override 
      public IFileElementType getFileNodeType() { 
        return FILE; 
      } 
     
      public PsiFile createFile(FileViewProvider viewProvider) { 
        return new DylanFile(viewProvider); 
      } 
     
      public SpaceRequirements spaceExistanceTypeBetweenTokens(ASTNode left, ASTNode right) { 
        return SpaceRequirements.MAY; 
      } 
     
      @NotNull 
      public PsiElement createElement(ASTNode node) { 
        return DylanTypes.Factory.createElement(node); 
      } 
    }
    

      

    #实例化jenkins对象,连接远程的jenkins master server
    
       server=jenkins.Jenkins(jenkins_server_url, username=user_id, password=api_token)
    
       #构建job名为job_name的job(不带构建参数)
    
       server.build_job(job_name)
    
       #String参数化构建job名为job_name的job, 参数param_dict为字典形式,如:param_dict= {"param1":“value1”, “param2”:“value2”} 
    
       server.build_job(job_name, parameters=param_dict)
    
       #获取job名为job_name的job的相关信息
    
       server.get_job_info(job_name)
    
       #获取job名为job_name的job的最后次构建号
    
       server.get_job_info(job_name)['lastBuild']['number']
    
         #获取job名为job_name的job的某次构建的执行结果状态
    
       server.get_build_info(job_name,build_number)['result']     
    
         #判断job名为job_name的job的某次构建是否还在构建中
    
       server.get_build_info(job_name,build_number)['building']
    

      http://blog.csdn.net/neven7/article/details/52741534

  • 相关阅读:
    数据结构化与保存
    使用正则表达式,取得点击次数,函数抽离
    爬取校园新闻首页的新闻
    网络爬虫基础练习
    综合练习:词频统计
    Hadoop综合大作业
    理解MapReduce
    熟悉常用的Hbase操作
    熟悉的HDFS操作
    爬取晨星网对各公司主要职位的分析
  • 原文地址:https://www.cnblogs.com/liqiking/p/6865628.html
Copyright © 2011-2022 走看看