当前位置: 首页>>代码示例>>Java>>正文


Java FindBugsWorker类代码示例

本文整理汇总了Java中de.tobject.findbugs.builder.FindBugsWorker的典型用法代码示例。如果您正苦于以下问题:Java FindBugsWorker类的具体用法?Java FindBugsWorker怎么用?Java FindBugsWorker使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


FindBugsWorker类属于de.tobject.findbugs.builder包,在下文中一共展示了FindBugsWorker类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: validate

import de.tobject.findbugs.builder.FindBugsWorker; //导入依赖的package包/类
@Override
protected IStatus validate() {
    DetectorValidator validator = new DetectorValidator();
    IStatus bad = null;
    for (IPathElement path : paths) {
        if(path.isSystem()) {
            continue;
        }
        String pathStr = FindBugsWorker.getFilterPath(path.getPath(), null).toOSString();
        ValidationStatus status = validator.validate(pathStr);
        path.setStatus(status);
        if (!status.isOK() && path.isEnabled()) {
            bad = status;
            path.setEnabled(false);
            break;
        }
    }
    return bad;
}
 
开发者ID:OpenNTF,项目名称:FindBug-for-Domino-Designer,代码行数:20,代码来源:DetectorProvider.java

示例2: pathsToStrings

import de.tobject.findbugs.builder.FindBugsWorker; //导入依赖的package包/类
protected Map<String, Boolean> pathsToStrings() {
    IProject project = propertyPage.getProject();
    Map<String, Boolean> result = new TreeMap<String, Boolean>();
    for (IPathElement path : paths) {
        if(path.isSystem()) {
            if (!path.isEnabled()) {
                // only need to remember *disabled* plugins
                result.put(path.getId(), Boolean.valueOf(false));
            }
            continue;
        }
        IPath filterPath = FindBugsWorker.toFilterPath(path.getPath(), project);
        result.put(filterPath.toPortableString(), Boolean.valueOf(path.isEnabled()));
    }
    return result;
}
 
开发者ID:OpenNTF,项目名称:FindBug-for-Domino-Designer,代码行数:17,代码来源:PathsProvider.java

示例3: scanForBugs

import de.tobject.findbugs.builder.FindBugsWorker; //导入依赖的package包/类
/**
 * Blocks until FindBugs has finished scanning
 * 
 * @param className
 *            file in this project to scan
 * @throws CoreException
 */
private void scanForBugs(String className) throws CoreException {
    IJavaElement element = testProject.findElement(new Path(className));
    if (element == null)
    {
        fail("Could not find java class " + className);
        return;
    }
    final AtomicBoolean isWorking = new AtomicBoolean(true);
    FindBugsWorker worker = new FindBugsWorker(testProject.getProject(), new NullProgressMonitor() {
        @Override
        public void done() {
            isWorking.set(false);
        }
    });

    worker.work(Collections.singletonList(new WorkItem(element)));
    // wait for the findBugsWorker to finish
    // 500ms reduces the chance that the IMarkers haven't loaded yet and the tests will fail unpredictably
    // (see JavaProjectHelper discussion about performDummySearch for more info)
    TestingUtils.waitForUiEvents(800);
    while (isWorking.get()) {
        TestingUtils.waitForUiEvents(100);
    }
}
 
开发者ID:kjlubick,项目名称:fb-contrib-eclipse-quick-fixes,代码行数:32,代码来源:TestHarness.java

示例4: work

import de.tobject.findbugs.builder.FindBugsWorker; //导入依赖的package包/类
/**
 * Run a FindBugs import on the given project, displaying a progress
 * monitor.
 *
 * @param project
 *            The resource to load XMl to.
 */
private void work(final IProject project, final String fileName) {
    FindBugsJob runFindBugs = new FindBugsJob("Loading XML data from " + fileName + "...", project) {
        @Override
        protected void runWithProgress(IProgressMonitor monitor) throws CoreException {
            FindBugsWorker worker = new FindBugsWorker(project, monitor);
            worker.loadXml(fileName);
        }
    };
    runFindBugs.setRule(project);
    runFindBugs.scheduleInteractive();
}
 
开发者ID:OpenNTF,项目名称:FindBug-for-Domino-Designer,代码行数:19,代码来源:LoadXmlAction.java

示例5: getFilterFiles

import de.tobject.findbugs.builder.FindBugsWorker; //导入依赖的package包/类
List<IPathElement> getFilterFiles(UserPreferences prefs) {
    IProject project = propertyPage.getProject();
    final List<IPathElement> newPaths = new ArrayList<IPathElement>();
    Map<String, Boolean> filterPaths = kind.selectedPaths(prefs);
    if (filterPaths != null) {
        for (Entry<String, Boolean> entry : filterPaths.entrySet()) {
            IPath filterPath = FindBugsWorker.getFilterPath(entry.getKey(), project);
            PathElement element = new PathElement(filterPath, Status.OK_STATUS);
            element.setEnabled(entry.getValue().booleanValue());
            newPaths.add(element);
        }
    }
    return newPaths;
}
 
开发者ID:OpenNTF,项目名称:FindBug-for-Domino-Designer,代码行数:15,代码来源:FilterFilesTab.java

示例6: validate

import de.tobject.findbugs.builder.FindBugsWorker; //导入依赖的package包/类
@Override
protected IStatus validate() {
    SelectionValidator validator = new SelectionValidator(kind, propertyPage);
    IStatus bad = null;
    IProject project = propertyPage.getProject();
    for (IPathElement path : paths) {
        String filterPath = FindBugsWorker.toFilterPath(path.getPath(), project).toOSString();
        IStatus status = validator.validate(filterPath);
        path.setStatus(status);
        if (!status.isOK()) {
            bad = status;
        }
    }
    return bad;
}
 
开发者ID:OpenNTF,项目名称:FindBug-for-Domino-Designer,代码行数:16,代码来源:FilterFilesTab.java

示例7: configurePluginDebugOptions

import de.tobject.findbugs.builder.FindBugsWorker; //导入依赖的package包/类
public void configurePluginDebugOptions() {
    if (isDebugging()) {
        // debugging for the plugin itself
        String option = Platform.getDebugOption(PLUGIN_DEBUG);
        FindbugsPlugin.DEBUG = Boolean.valueOf(option).booleanValue();

        // debugging for the builder and friends
        option = Platform.getDebugOption(BUILDER_DEBUG);
        FindBugsBuilder.DEBUG = Boolean.valueOf(option).booleanValue();
        FindBugsWorker.DEBUG = FindBugsBuilder.DEBUG;

        // debugging for the nature
        option = Platform.getDebugOption(NATURE_DEBUG);
        FindBugsNature.DEBUG = Boolean.valueOf(option).booleanValue();

        // debugging for the reporter
        option = Platform.getDebugOption(REPORTER_DEBUG);
        Reporter.DEBUG = Boolean.valueOf(option).booleanValue();

        // debugging for the content provider
        option = Platform.getDebugOption(CONTENT_DEBUG);
        BugContentProvider.DEBUG = Boolean.valueOf(option).booleanValue();

        option = Platform.getDebugOption(PROFILER_DEBUG);
        if (Boolean.valueOf(option).booleanValue()) {
            System.setProperty("profiler.report", "true");
        }
    }
}
 
开发者ID:OpenNTF,项目名称:FindBug-for-Domino-Designer,代码行数:30,代码来源:FindbugsPlugin.java

示例8: runWithProgress

import de.tobject.findbugs.builder.FindBugsWorker; //导入依赖的package包/类
@Override
protected void runWithProgress(IProgressMonitor monitor) throws CoreException {
    FindBugsWorker worker = new FindBugsWorker(resource, monitor);

    worker.work(resources);

    refreshViewer(targetPart, resources);

    checkPerspective();
}
 
开发者ID:OpenNTF,项目名称:FindBug-for-Domino-Designer,代码行数:11,代码来源:FindBugsAction.java


注:本文中的de.tobject.findbugs.builder.FindBugsWorker类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。