Examples of RbConfig


Examples of com.taobao.eclipse.plugin.reviewboard.core.config.RbConfig

                        continue;
                    }
                   
                    String charsetName = GuessStreamEncoding.getFileEncoding(tempDiffFile);

                    RbConfig rbConfig = RbConfigReader.getRbConfig(null);
                    if( null != rbConfig.getCharsetEncoding() && !rbConfig.getCharsetEncoding().trim().equals(CHARSET_AUTO) ){
                        charsetName = rbConfig.getCharsetEncoding();
                    }
                   
                    String diffContentTmp = IOUtils.getContentFromFile( tempDiffFile, charsetName );
                    //diffContentTmp = IOUtils.getContentFromFile( tempDiffFile.getAbsolutePath() );
                    tempDiffFile.delete();
View Full Code Here

Examples of com.taobao.eclipse.plugin.reviewboard.core.config.RbConfig

       
        //String resourceSVNUrl = getSVNUrlForResouce(resource, false);
        String charsetName = GuessStreamEncoding.getFileEncoding(tempDiffFile);
       
        // FIXME 临时编码解决方案。请以方法参数方式提供
        RbConfig rbConfig = RbConfigReader.getRbConfig(null);
        if( null != rbConfig.getCharsetEncoding() && !rbConfig.getCharsetEncoding().trim().equals(CHARSET_AUTO) ){
            charsetName = rbConfig.getCharsetEncoding();
        }
       
        String diffContent = IOUtils.getContentFromFile( tempDiffFile, charsetName );

        if( null != tempDiffFile && tempDiffFile.exists() ){
View Full Code Here

Examples of com.taobao.eclipse.plugin.reviewboard.core.config.RbConfig

            //先计算出有哪些受影响的文件
            String charsetName = GuessStreamEncoding.getFileEncoding(tmpFile);
           
            // FIXME 临时编码解决方案。请以方法参数方式提供
            RbConfig rbConfig = RbConfigReader.getRbConfig(null);
            if( null != rbConfig.getCharsetEncoding() && !rbConfig.getCharsetEncoding().trim().equals(CHARSET_AUTO) ){
                charsetName = rbConfig.getCharsetEncoding();
            }
           
            String diffContent = IOUtils.getContentFromFile( tmpFile, charsetName );
           
            if( null != tmpFile && tmpFile.exists() ){
View Full Code Here

Examples of com.taobao.eclipse.plugin.reviewboard.core.config.RbConfig

                 null == modifiedResources ? null : new StructuredSelection(modifiedResources),
                 unaddedResources, resourcesSelectedByUser, statusMap, reviewboardClient);
        wizardCommitRequestWizard.setWindowTitle(RbSubclipseMessages.getString("PreReviewBoardAction.dialogTitle"));
        wizardCommitRequestWizard.setSelectedResources(getSelectedResources());
        int height = 580;
        RbConfig rbConfig = RbConfigReader.getRbConfig(null);
        if( rbConfig.isAllowCompareVersionForPreCommit() ){
            height += 70;
        }
        if( rbConfig.isAllowOptionBugClosed() ){
            height += 30;
        }
        WizardDialog dialogCommitRequestWizard = new WizardDialogReviewBoardLocation(getShell(),
                wizardCommitRequestWizard, 820, height); //$NON-NLS-1$
        dialogCommitRequestWizard.setMinimumPageSize(350, 500);
View Full Code Here

Examples of com.taobao.eclipse.plugin.reviewboard.core.config.RbConfig

                wizardCommitRequestWizard.setSvnHistoryUrlForBaseUpload(selectedSVNResources[0].getUrl().getParent().toString());
            }
        }
       
        int height = 645;
        RbConfig rbConfig = RbConfigReader.getRbConfig(null);
        if( rbConfig.isAllowOptionBugClosed() ){
            height += 30;
        }
       
        WizardDialog dialogCommitRequestWizard = new WizardDialogReviewBoardLocation(getShell(), wizardCommitRequestWizard, 820, height); //$NON-NLS-1$
        dialogCommitRequestWizard.setMinimumPageSize(350, 500);
View Full Code Here

Examples of com.taobao.eclipse.plugin.reviewboard.core.config.RbConfig

                null == modifiedResources ? null : new StructuredSelection(modifiedResources),
                        resourcesSelectedByUser, statusMap, reviewboardClient);
        wizardCommitRequestWizard.setWindowTitle(RbSubclipseMessages.getString("PostReviewBoardAction.dialogTitle"));
        wizardCommitRequestWizard.setSelectedResources(getSelectedResources());
        int height = 645;
        RbConfig rbConfig = RbConfigReader.getRbConfig(null);
        if( rbConfig.isAllowOptionBugClosed() ){
            height += 30;
        }
        WizardDialog dialogCommitRequestWizard = new WizardDialogReviewBoardLocation(getShell(), wizardCommitRequestWizard, 820, height); //$NON-NLS-1$
        dialogCommitRequestWizard.setMinimumPageSize(350, 500);
        dialogCommitRequestWizard.open();
View Full Code Here

Examples of com.taobao.eclipse.plugin.reviewboard.core.config.RbConfig

     */
    public synchronized IReviewboardClient getClient(boolean refreshForce, IProgressMonitor monitor) {
        if( null == monitor ){
            monitor = new NullProgressMonitor();
        }
        RbConfig rbConfig = RbConfigReader.getServerConfig(null);
        if( null == rbConfig || null == rbConfig.getServer() ){
            return null;
        }
        IReviewboardClient reviewboardClient = this.urlToClientMap.get(rbConfig.getServer());
        boolean isClientDataNull = false;
        ReviewboardClientData clientData = null;
        if (null == reviewboardClient) {
            isClientDataNull = true;
            clientData = new ReviewboardClientData();
            reviewboardClient = new ReviewboardClientImpl(clientData, rbConfig.getServer(),
                    rbConfig.getUserId(), rbConfig.getPassword(), CHARACTER_ENCODING );
        }
        clientData = reviewboardClient.getClientData();
        if( null == clientData ||
                null == clientData.getReviewGroupList() || clientData.getReviewGroupList().isEmpty()
                || null == clientData.getRepositoryList() || clientData.getRepositoryList().isEmpty()
                || null == clientData.getUserList() || clientData.getUserList().isEmpty() ){
            isClientDataNull = true;
        }
        //强制刷新RepositoryData
        if( isClientDataNull || refreshForce ){
            IReviewboardService reviewboardService = new ReviewboardServiceImpl( reviewboardClient );
            boolean loginSuccess = reviewboardService.validCredentials(rbConfig.getUserId(), rbConfig.getPassword(), null);
            if( loginSuccess ){
                reviewboardService.updateRepositoryData(true, monitor);
                this.urlToClientMap.put(rbConfig.getServer(), reviewboardClient);
            }
        }
        return reviewboardClient;
    }
View Full Code Here

Examples of com.taobao.eclipse.plugin.reviewboard.core.config.RbConfig

        }
        return reviewboardClient;
    }
   
    public IReviewboardClient getClientFromUrlToClientMap(){
        RbConfig rbConfig = RbConfigReader.getServerConfig(null);
        if( null == rbConfig || null == rbConfig.getServer()){
            return null;
        }
        IReviewboardClient reviewboardClient = this.urlToClientMap.get(rbConfig.getServer());
        return reviewboardClient;
    }
View Full Code Here

Examples of com.taobao.eclipse.plugin.reviewboard.core.config.RbConfig

        try {
            IReviewboardClient reviewboardClient = getClientFromUrlToClientMap();
            if( null == reviewboardClient ){
                return ;
            }
            RbConfig rbConfig = RbConfigReader.getServerConfig(null);
            if( null == rbConfig || null == rbConfig.getServer()){
                return ;
            }
            //强制刷新RepositoryData
            IReviewboardService reviewboardService = new ReviewboardServiceImpl( reviewboardClient );
            boolean loginSuccess = reviewboardService.validCredentials(rbConfig.getUserId(), rbConfig.getPassword(), null);
            if( loginSuccess ){
                reviewboardService.updateRepositoryData(true, new NullProgressMonitor());
            }
        } catch (Exception e) {
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.