Package org.sonar.ide.intellij.worker

Examples of org.sonar.ide.intellij.worker.ResourceLookupWorker


        final VirtualFile file = anActionEvent.getData(PlatformDataKeys.VIRTUAL_FILE);
         if(file == null) {
             return;
         }

        ResourceLookupWorker resourceLookupWorker = new ResourceLookupWorker(project, file, new ResourceLookupWorker.ResourceLoadCallback() {
            @Override
            public void resourceLoaded(@Nullable Resource resource) {

                SonarModuleComponent sonarModuleComponent = SonarResourceKeyUtils.getSonarModuleComponent(project, file);
                SonarModuleComponent.SonarModuleState state = sonarModuleComponent.getState();

                String resourceId;
                if (resource == null) {
                    resourceId = state.projectKey;
                } else {
                    resourceId = Integer.toString(resource.getId());
                }

                new SonarNavigator().navigateToDashboard(sonarModuleComponent, resourceId);
            }
        });
        resourceLookupWorker.execute();

    }
View Full Code Here

TOP

Related Classes of org.sonar.ide.intellij.worker.ResourceLookupWorker

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.