Unnamed: 0
int64
0
305k
body
stringlengths
7
52.9k
name
stringlengths
1
185
19,500
Language (@NotNull XmlText xmlText, @NotNull MavenDomConfiguration configuration) { // Parameter 'source' of gmaven-plugin can be a peace of groovy code or file path or URL. String text = xmlText.getText(); if (text.indexOf('\n') >= 0) { // URL or file path can not be multiline so it's a groovy code return GroovyLangua...
getLanguage
19,501
Icon () { return RepositoryLibraryLogo; }
getScriptIcon
19,502
GlobalSearchScope (@NotNull GroovyFile file, @NotNull GlobalSearchScope baseScope) { return doPatchResolveScope(file, baseScope); }
patchResolveScope
19,503
GlobalSearchScope (@NotNull GroovyFile file, @NotNull GlobalSearchScope baseScope) { final Module module = ModuleUtilCore.findModuleForPsiElement(file); if (module == null) { return baseScope; } Project project = module.getProject(); GlobalSearchScope result = baseScope; CachedValuesManager cachedValuesManager = Cached...
doPatchResolveScope
19,504
List<VirtualFile> () { VirtualFile jarFile = VfsUtil.findFileByIoFile(getBundledGroovyFile().get(), false); if (jarFile != null) { VirtualFile jarRoot = JarFileSystem.getInstance().getRootByLocal(jarFile); if (jarRoot != null) { return Collections.singletonList(jarRoot); } } return ContainerUtil.emptyList(); }
additionalScopeFiles
19,505
boolean (@NotNull Project project) { Iterator<Library> iterator = LibraryTablesRegistrar.getInstance().getLibraryTable(project).getLibraryIterator(); while (iterator.hasNext()) { Library library = iterator.next(); for (VirtualFile virtualFile : library.getFiles(OrderRootType.CLASSES)) { if (GroovyConfigUtils.GROOVY_JAR...
hasModuleWithGroovyLibrary
19,506
void (@NotNull PsiType qualifierType, @Nullable PsiClass aClass, @NotNull PsiScopeProcessor processor, @NotNull PsiElement place, @NotNull ResolveState state) { if (!(aClass instanceof GroovyScriptClass)) { return; } PsiFile file = aClass.getContainingFile(); if (!"pom.groovy".equals(file.getName())) return; List<Strin...
processDynamicElements
19,507
void (@NotNull Project project, @NotNull MultiMap<String, String> map, @NotNull MultiMap<String, String> leafMap) { String myClassSource = myClassSourceValue.getValue(); if (myClassSource == null) return; for (String path : myPaths) { map.putValue(path, myClassSource); } final PsiMethod[] psiMethods = DynamicMemberUtil...
populate
19,508
List<String> (PsiElement psiElement) { LinkedList<String> methodCallInfo = new LinkedList<>(); for (GrMethodCall current = PsiTreeUtil.getParentOfType(psiElement, GrMethodCall.class); current != null; current = PsiTreeUtil.getParentOfType(current, GrMethodCall.class)) { GrExpression expression = current.getInvokedExpre...
getGroovyMethodCalls
19,509
PsiReference[] (@NotNull PsiElement element, @NotNull MavenDomConfiguration domCfg, @NotNull ProcessingContext context) { return new PsiReference[] { new PsiReferenceBase<>(element, true) { @Override public PsiElement resolve() { return null; } @Override public Object @NotNull [] getVariants() { return MavenCompletionR...
getReferencesByElement
19,510
PsiElement () { return null; }
resolve
19,511
void (Properties modelProperties, @Nullable Collection<? extends MavenPlugin> plugins) { if (plugins == null) return; Map<String, Map<String, Map<String, List<MavenPluginDescriptor>>>> map = MavenPluginDescriptor.getDescriptorsMap(); for (MavenPlugin plugin : plugins) { Map<String, Map<String, List<MavenPluginDescripto...
patch
19,512
void (Properties modelProperties, @Nullable List<MavenPluginDescriptor> descriptors, @Nullable String goal, Element cfgElement, MavenPlugin plugin) { if (descriptors == null) { return; } for (MavenPluginDescriptor descriptor : descriptors) { if (descriptor.properties != null) { for (MavenPluginDescriptor.ModelProperty ...
patch
19,513
boolean (@NotNull XmlText paramValue) { PsiElement prevSibling = paramValue.getPrevSibling(); if (!(prevSibling instanceof LeafPsiElement) || ((LeafPsiElement)prevSibling).getElementType() != XmlTokenType.XML_TAG_END) { return false; } PsiElement nextSibling = paramValue.getNextSibling(); if (!(nextSibling instanceof L...
isSimpleText
19,514
ParamInfoList (@NotNull XmlText paramValue) { XmlTag tag = paramValue.getParentTag(); if (tag == null) return ParamInfoList.EMPTY; return getParamInfoList(tag); }
getParamInfoList
19,515
ParamInfoList (@NotNull XmlTag paramTag) { XmlTag configurationTag = paramTag; DomElement domElement; Map m = getMap().get(paramTag.getName()); while (true) { if (m == null) return ParamInfoList.EMPTY; configurationTag = configurationTag.getParentTag(); if (configurationTag == null) return ParamInfoList.EMPTY; String t...
getParamInfoList
19,516
MavenDomConfiguration () { return domCfg; }
getDomCfg
19,517
Iterator<ParamInfo> () { return paramInfos.iterator(); }
iterator
19,518
void () { if (!myLanguageInitialized) { if (myParam.language != null) { assert myParam.languageProvider == null; myLanguageInstance = Language.findLanguageByID(myParam.language); } else if (myParam.languageProvider != null) { try { myLanguageProvider = (MavenParamLanguageProvider)myClassLoader.loadClass(myParam.languag...
ensureLanguageInit
19,519
Language () { ensureLanguageInit(); return myLanguageInstance; }
getLanguage
19,520
MavenParamLanguageProvider () { ensureLanguageInit(); return myLanguageProvider; }
getLanguageProvider
19,521
String () { return myParam.languageInjectionPrefix; }
getLanguageInjectionPrefix
19,522
String () { return myParam.languageInjectionSuffix; }
getLanguageInjectionSuffix
19,523
MavenParamReferenceProvider () { if (!myProviderInitialized) { MavenParamReferenceProvider res = null; if (myParam.refProvider != null) { assert myParam.values == null : myParam.name; Object instance; try { instance = myClassLoader.loadClass(myParam.refProvider).newInstance(); } catch (Exception e) { throw new RuntimeE...
getProviderInstance
19,524
PsiReference[] (@NotNull PsiElement element, @NotNull MavenDomConfiguration domCfg, @NotNull ProcessingContext context) { return myProvider.getReferencesByElement(element, context); }
getReferencesByElement
19,525
void (boolean soft) { ((MavenSoftAwareReferenceProvider)myProvider).setSoft(soft); }
setSoft
19,526
void (@NotNull PsiReferenceRegistrar registrar) { registrar.registerReferenceProvider( PlatformPatterns.psiElement(XmlTokenType.XML_DATA_CHARACTERS).withParent( XmlPatterns.xmlText().inFile(XmlPatterns.xmlFile()) ), new MavenPluginParamRefProvider()); }
registerReferenceProviders
19,527
PluginDescriptor () { return pluginDescriptor; }
getPluginDescriptor
19,528
void (@NotNull PluginDescriptor pluginDescriptor) { this.pluginDescriptor = pluginDescriptor; }
setPluginDescriptor
19,529
boolean (Processor<? super MavenPluginDescriptor> processor, MavenDomConfiguration cfg) { Map<String, Map<String, Map<String, List<MavenPluginDescriptor>>>> map = getDescriptorsMap(); DomElement parent = cfg.getParent(); MavenDomPlugin plugin = DomUtil.getParentOfType(parent, MavenDomPlugin.class, false); if (plugin ==...
processDescriptors
19,530
void (@NotNull final PsiLanguageInjectionHost host, @NotNull final InjectedLanguagePlaces injectionPlacesRegistrar) { if (!(host instanceof XmlText xmlText)) return; if (!MavenPluginParamInfo.isSimpleText(xmlText)) return; if (host.getContainingFile().getLanguage().is(HTMLLanguage.INSTANCE)) return; MavenPluginParamInf...
getLanguagesToInject
19,531
PsiReference[] (@NotNull PsiElement element, @NotNull MavenDomConfiguration domCfg, @NotNull ProcessingContext context) { TextRange range = ElementManipulators.getValueTextRange(element); String text = range.substring(element.getText()); Matcher matcher = MavenPropertyResolver.PATTERN.matcher(text); if (matcher.find())...
getReferencesByElement
19,532
PsiElement () { if (mySoft) { return null; } if (Arrays.asList(myValues).contains(getValue())) { return getElement(); } return null; }
resolve
19,533
void (boolean soft) { mySoft = soft; }
setSoft
19,534
PsiReference[] (@NotNull PsiElement element, @NotNull MavenDomConfiguration domCfg, @NotNull ProcessingContext context) { return MavenPathReferenceConverter.createReferences(domCfg, element, Conditions.alwaysTrue()); }
getReferencesByElement
19,535
PsiReference[] (@NotNull PsiElement element, @NotNull MavenDomConfiguration domCfg, @NotNull ProcessingContext context) { return MavenPathReferenceConverter.createReferences(domCfg, element, FileReferenceSet.DIRECTORY_FILTER); }
getReferencesByElement
19,536
Object[] (@NotNull PsiReferenceBase reference) { Charset[] charsets = CharsetToolkit.getAvailableCharsets(); LookupElement[] res = new LookupElement[charsets.length]; for (int i = 0; i < charsets.length; i++) { res[i] = LookupElementBuilder.create(charsets[i].name()).withCaseSensitivity(false); } return res; }
getVariants
19,537
Object[] (@NotNull PsiReferenceBase reference) { return MavenUtil.getPhaseVariants(MavenProjectsManager.getInstance(reference.getElement().getProject())).toArray(); }
getVariants
19,538
Object[] (@NotNull PsiReferenceBase reference) { return MavenProjectsManager.getInstance(reference.getElement().getProject()).getAvailableProfiles().toArray(); }
getVariants
19,539
void (@NotNull Properties modelProperties, @Nullable String goal, @NotNull MavenPlugin plugin, @Nullable Element cfgElement) { if (cfgElement == null) return; Element portNames = cfgElement.getChild("portNames"); if (portNames == null) return; List<Element> portName = portNames.getChildren("portName"); for (Element ele...
generate
19,540
Set<MavenCompilerTask> (@NotNull MavenTasksManager.Phase phase) { return switch (phase) { case AFTER_COMPILE -> afterCompileTasks; case BEFORE_COMPILE -> beforeCompileTasks; case AFTER_REBUILD -> afterRebuildTask; case BEFORE_REBUILD -> beforeRebuildTask; }; }
getTasks
19,541
Key<MavenBeforeRunTask> () { return ID; }
getId
19,542
String () { return TasksBundle.message("maven.tasks.before.run.empty"); }
getName
19,543
Icon () { return RepositoryLibraryLogo; }
getIcon
19,544
Icon (MavenBeforeRunTask task) { return RepositoryLibraryLogo; }
getTaskIcon
19,545
String (MavenBeforeRunTask task) { MavenProject mavenProject = getMavenProject(task); if (mavenProject == null) { return TasksBundle.message("maven.tasks.before.run.empty"); } String desc = mavenProject.getDisplayName() + ": " + StringUtil.notNullize(task.getGoal()).trim(); return TasksBundle.message("maven.tasks.befor...
getDescription
19,546
MavenProject (MavenBeforeRunTask task) { String pomXmlPath = task.getProjectPath(); if (StringUtil.isEmpty(pomXmlPath)) return null; VirtualFile file = LocalFileSystem.getInstance().findFileByPath(pomXmlPath); if (file == null) return null; return MavenProjectsManager.getInstance(myProject).findProject(file); }
getMavenProject
19,547
boolean () { return true; }
isConfigurable
19,548
MavenBeforeRunTask (@NotNull RunConfiguration runConfiguration) { return new MavenBeforeRunTask(); }
createTask
19,549
boolean (@NotNull RunConfiguration runConfiguration, @NotNull MavenBeforeRunTask task) { MavenEditGoalDialog dialog = new MavenEditGoalDialog(myProject); dialog.setTitle(TasksBundle.message("maven.tasks.select.goal.title")); if (task.getGoal() == null) { // just created empty task. MavenProjectsManager projectsManager ...
configureTask
19,550
boolean (@NotNull RunConfiguration configuration, @NotNull MavenBeforeRunTask task) { return task.getGoal() != null && task.getProjectPath() != null; }
canExecuteTask
19,551
boolean (@NotNull final DataContext context, @NotNull RunConfiguration configuration, @NotNull ExecutionEnvironment env, @NotNull final MavenBeforeRunTask task) { ApplicationManager.getApplication().invokeAndWait(() -> FileDocumentManager.getInstance().saveAllDocuments()); final Project project = CommonDataKeys.PROJECT...
executeTask
19,552
boolean (Project project, MavenBeforeRunTask task, ExecutionEnvironment env) { final MavenProject mavenProject = getMavenProject(task); if (mavenProject == null) return false; final MavenExplicitProfiles explicitProfiles = MavenProjectsManager.getInstance(project).getExplicitProfiles(); MavenRunnerParameters params = n...
doRunMavenTask
19,553
MavenTasksManager (@NotNull Project project) { return project.getService(MavenTasksManager.class); }
getInstance
19,554
MavenTasksManagerState () { synchronized (myStateLock) { MavenTasksManagerState result = new MavenTasksManagerState(); result.afterCompileTasks = new HashSet<>(myState.afterCompileTasks); result.beforeCompileTasks = new HashSet<>(myState.beforeCompileTasks); result.afterRebuildTask = new HashSet<>(myState.afterRebuildT...
getState
19,555
void (@NotNull MavenTasksManagerState state) { synchronized (myStateLock) { myState = state; } fireTasksChanged(); }
loadState
19,556
boolean (@NotNull CompileContext context) { MavenTasksManager mavenTasksManager = getInstance(context.getProject()); return mavenTasksManager.doExecute(myBefore, context); }
execute
19,557
void () { myListeners.clear(); }
dispose
19,558
boolean (boolean before, CompileContext context) { List<MavenRunnerParameters> parametersList; synchronized (myStateLock) { var tasks = before ? myState.beforeCompileTasks : myState.afterCompileTasks; if (context.isRebuild()) { tasks = Sets.union(before ? myState.beforeRebuildTask : myState.afterRebuildTask, tasks); } ...
doExecute
19,559
record (@NotNull String goal, @NotNull VirtualFile file, MavenProject mavenProject, MavenProject rootProject) { public Pair<String, MavenProject> goalAndRootProject() { return new Pair<>(goal(), rootProject()); } }
MavenTaskInfo
19,560
List<MavenRunnerParameters> (@NotNull List<MavenTaskInfo> taskInfos, MavenExplicitProfiles explicitProfiles) { if (taskInfos.isEmpty()) return List.of(); var enabledProfiles = explicitProfiles.getEnabledProfiles(); var disabledProfiles = explicitProfiles.getDisabledProfiles(); List<MavenRunnerParameters> parametersList...
taskInfosToParametersList
19,561
boolean (CompileContext context, List<MavenRunnerParameters> parametersList) { try { var runner = DefaultJavaProgramRunner.getInstance(); Executor executor = DefaultRunExecutor.getRunExecutorInstance(); long executionId = ExecutionEnvironment.getNextUnusedExecutionId(); int count = 0; for (MavenRunnerParameters params ...
doRunTask
19,562
boolean (@NotNull MavenCompilerTask task, @NotNull Phase phase) { synchronized (myStateLock) { return myState.getTasks(phase).contains(task); } }
isCompileTaskOfPhase
19,563
void (List<MavenCompilerTask> tasks, @NotNull Phase phase) { synchronized (myStateLock) { myState.getTasks(phase).addAll(tasks); } fireTasksChanged(); }
addCompileTasks
19,564
void (List<MavenCompilerTask> tasks, @NotNull Phase phase) { synchronized (myStateLock) { myState.getTasks(phase).removeAll(tasks); } fireTasksChanged(); }
removeCompileTasks
19,565
String (MavenProject project, String goal) { List<String> result = new ArrayList<>(); MavenCompilerTask compilerTask = new MavenCompilerTask(project.getPath(), goal); synchronized (myStateLock) { for (Phase phase : Phase.values()) { if (myState.getTasks(phase).contains(compilerTask)) { result.add(TasksBundle.message(ph...
getDescription
19,566
void (@NotNull Listener l, @NotNull Disposable disposable) { myListeners.add(l, disposable); }
addListener
19,567
void () { for (Listener each : myListeners) { each.compileTasksChanged(); } }
fireTasksChanged
19,568
String () { return myProjectPath; }
getProjectPath
19,569
void (String projectPath) { myProjectPath = projectPath; }
setProjectPath
19,570
String () { return myGoal; }
getGoal
19,571
void (String goal) { myGoal = goal; }
setGoal
19,572
String () { return myProjectPath + ":" + myGoal; }
toString
19,573
int (Object o) { return toString().compareTo(o.toString()); }
compareTo
19,574
boolean (Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; MavenCompilerTask task = (MavenCompilerTask)o; if (myGoal != null ? !myGoal.equals(task.myGoal) : task.myGoal != null) return false; if (myProjectPath != null ? !myProjectPath.equals(task.myProjectPath) : task.my...
equals
19,575
int () { int result; result = (myProjectPath != null ? myProjectPath.hashCode() : 0); result = 31 * result + (myGoal != null ? myGoal.hashCode() : 0); return result; }
hashCode
19,576
String () { return myProjectPath; }
getProjectPath
19,577
void (String projectPath) { myProjectPath = projectPath; }
setProjectPath
19,578
String () { return myGoal; }
getGoal
19,579
void (String goal) { myGoal = goal; }
setGoal
19,580
boolean (MavenProject project, String goal) { if (myProjectPath == null || myGoal == null) return false; return VfsUtilCore.pathEqualsTo(project.getFile(), myProjectPath) && goal.equals(myGoal); }
isFor
19,581
void (@NotNull Element element) { super.writeExternal(element); if (myProjectPath != null) element.setAttribute("file", myProjectPath); if (myGoal != null) element.setAttribute("goal", myGoal); }
writeExternal
19,582
void (@NotNull Element element) { super.readExternal(element); myProjectPath = element.getAttributeValue("file"); myGoal = element.getAttributeValue("goal"); }
readExternal
19,583
boolean (Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; if (!super.equals(o)) return false; MavenBeforeRunTask that = (MavenBeforeRunTask)o; if (myGoal != null ? !myGoal.equals(that.myGoal) : that.myGoal != null) return false; if (myProjectPath != null ? !myProjectPat...
equals
19,584
int () { int result = super.hashCode(); result = 31 * result + (myProjectPath != null ? myProjectPath.hashCode() : 0); result = 31 * result + (myGoal != null ? myGoal.hashCode() : 0); return result; }
hashCode
19,585
MavenShortcutsManager (Project project) { return project.getService(MavenShortcutsManager.class); }
getInstance
19,586
void (@NotNull Project project) { if (isInitialized.getAndSet(true)) return; MyProjectsTreeListener listener = new MyProjectsTreeListener(); MavenProjectsManager mavenProjectManager = MavenProjectsManager.getInstance(project); mavenProjectManager.addManagerListener(listener, this); mavenProjectManager.addProjectsTreeLi...
doInit
19,587
void (Keymap keymap) { fireShortcutsUpdated(); }
activeKeymapChanged
19,588
void (@NotNull Keymap keymap, @NotNull String actionId) { fireShortcutsUpdated(); }
shortcutChanged
19,589
void () { if (!isInitialized.getAndSet(false)) { return; } MavenKeymapExtension.clearActions(myProject); myListeners.clear(); }
dispose
19,590
String (@Nullable String projectPath, @Nullable String goal) { StringBuilder result = new StringBuilder(ACTION_ID_PREFIX); result.append(myProject.getLocationHash()); if (projectPath != null) { String portablePath = FileUtil.toSystemIndependentName(projectPath); result.append(new File(portablePath).getParentFile().getN...
getActionId
19,591
String (MavenProject project, String goal) { Shortcut[] shortcuts = getShortcuts(project, goal); if (shortcuts.length == 0) return ""; return KeymapUtil.getShortcutsText(shortcuts); }
getDescription
19,592
void () { for (Listener listener : myListeners) { listener.shortcutsUpdated(); } }
fireShortcutsUpdated
19,593
void (@NotNull Listener l, @NotNull Disposable disposable) { myListeners.add(l, disposable); }
addListener
19,594
void () { scheduleKeymapUpdate(MavenProjectsManager.getInstance(myProject).getNonIgnoredProjects(), true); }
activated
19,595
void (@NotNull List<MavenProject> ignored, @NotNull List<MavenProject> unignored, boolean fromImport) { scheduleKeymapUpdate(unignored, true); scheduleKeymapUpdate(ignored, false); }
projectsIgnoredStateChanged
19,596
void (@NotNull List<Pair<MavenProject, MavenProjectChanges>> updated, @NotNull List<MavenProject> deleted) { scheduleKeymapUpdate(MavenUtil.collectFirsts(updated), true); scheduleKeymapUpdate(deleted, false); }
projectsUpdated
19,597
void (@NotNull Pair<MavenProject, MavenProjectChanges> projectWithChanges, NativeMavenProjectHolder nativeMavenProject) { scheduleKeymapUpdate(Collections.singletonList(projectWithChanges.first), true); }
projectResolved
19,598
void (@NotNull MavenProject project) { scheduleKeymapUpdate(Collections.singletonList(project), true); }
pluginsResolved
19,599
void (List<? extends MavenProject> mavenProjects, boolean forUpdate) { synchronized (mySheduledProjects) { for (MavenProject each : mavenProjects) { mySheduledProjects.put(each, forUpdate); } } myUpdateQueue.queue(new Update(MavenShortcutsManager.this) { @Override public void run() { List<MavenProject> projectToUpdate;...
scheduleKeymapUpdate