Unnamed: 0 int64 0 305k | body stringlengths 7 52.9k | name stringlengths 1 185 |
|---|---|---|
8,600 | List<String> (PsiElement element, PsiElement originalElement) { if (element instanceof TaskPsiElement) { final String url = ((TaskPsiElement)element).getTask().getIssueUrl(); if (url != null) { return Collections.singletonList(url); } } return null; } | getUrlFor |
8,601 | PsiElement (PsiManager psiManager, Object object, PsiElement element) { return object instanceof Task ? new TaskPsiElement(psiManager, (Task)object): null; } | getDocumentationElementForLookupItem |
8,602 | boolean (PsiElement element, PsiElement originalElement) { return element instanceof TaskPsiElement; } | hasDocumentationFor |
8,603 | boolean (PsiElement element) { return false; } | canPromptToConfigureDocumentation |
8,604 | void (PsiElement element) {} | promptToConfigureDocumentation |
8,605 | MantisProject () { return new MantisProject(0, "-- from all projects --"); } | newUndefined |
8,606 | int () { return myId; } | getId |
8,607 | void (final int id) { this.myId = id; } | setId |
8,608 | String () { return myName; } | getName |
8,609 | void (@NotNull String name) { this.myName = name; } | setName |
8,610 | boolean () { return getId() == UNSPECIFIED_PROJECT_ID; } | isUnspecified |
8,611 | List<MantisFilter> () { return myFilters == null ? Collections.emptyList() : myFilters; } | getFilters |
8,612 | void (@NotNull List<MantisFilter> filters) { myFilters = filters; } | setFilters |
8,613 | boolean (Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; MantisProject project = (MantisProject)o; if (myId != project.myId) return false; return true; } | equals |
8,614 | int () { return myId; } | hashCode |
8,615 | String () { return getName(); } | toString |
8,616 | String () { return data1.getText(); } | getText |
8,617 | String () { return data1.getReporter().getName(); } | getAuthor |
8,618 | Date () { return data1.getDate_submitted().getTime(); } | getDate |
8,619 | String () { return myId; } | getId |
8,620 | String () { return mySummary; } | getSummary |
8,621 | String () { return myDescription; } | getDescription |
8,622 | Icon () { return TasksCoreIcons.Mantis; } | getIcon |
8,623 | TaskType () { return TaskType.OTHER; } | getType |
8,624 | Date () { return myUpdated; } | getUpdated |
8,625 | Date () { return myCreated; } | getCreated |
8,626 | boolean () { return myClosed; } | isClosed |
8,627 | boolean () { return true; } | isIssue |
8,628 | String () { return myRepository.getUrl() + "/view.php?id=" + getId(); } | getIssueUrl |
8,629 | TaskRepository () { return myRepository; } | getRepository |
8,630 | String () { return myProjectName; } | getProject |
8,631 | String () { return getId(); } | getNumber |
8,632 | BaseRepository () { return new MantisRepository(this); } | clone |
8,633 | String (@NotNull String taskName) { Matcher matcher = ID_PATTERN.matcher(taskName); return matcher.find() ? matcher.group() : null; } | extractId |
8,634 | CancellableConnection () { return new CancellableConnection() { @Override protected void doTest() throws Exception { myProjects = null; try { refreshProjects(); } catch (Exception e) { throw handleException(e); } } @Override public void cancel() { } }; } | createCancellableConnection |
8,635 | void () { } | cancel |
8,636 | void () { if (myProjects != null) { for (MantisProject project : myProjects) { if (project.isUnspecified()) { myCurrentProject = project; for (MantisFilter filter : project.getFilters()) { if (filter.isUnspecified()) { myCurrentFilter = filter; break; } } break; } } } else { myCurrentProject = null; myCurrentFilter = null; } } | resetConfiguration |
8,637 | MantisProject () { return myCurrentProject; } | getCurrentProject |
8,638 | void (@Nullable MantisProject currentProject) { myCurrentProject = currentProject; } | setCurrentProject |
8,639 | MantisFilter () { return myCurrentFilter; } | getCurrentFilter |
8,640 | void (@Nullable MantisFilter currentFilter) { myCurrentFilter = currentFilter; } | setCurrentFilter |
8,641 | boolean () { return super.isConfigured() && StringUtil.isNotEmpty(myUsername) && StringUtil.isNotEmpty(myPassword); } | isConfigured |
8,642 | boolean (Object o) { if (!super.equals(o)) return false; MantisRepository repository = (MantisRepository)o; if (!Comparing.equal(getCurrentProject(), repository.getCurrentProject())) return false; if (!Comparing.equal(getCurrentFilter(), repository.getCurrentFilter())) return false; if (!Comparing.equal(myProjects, repository.myProjects)) return false; return myAllProjectsAvailable == repository.myAllProjectsAvailable; } | equals |
8,643 | int () { return super.getFeatures() & ~NATIVE_SEARCH; } | getFeatures |
8,644 | void (ItemEvent e) { if (e.getStateChange() == ItemEvent.SELECTED) { // equality check is needed to prevent resetting of combobox with filters // on initial projects update MantisProject project = (MantisProject)myProjectCombobox.getSelectedItem(); if (project != null) { //noinspection unchecked myFilterCombobox.setModel(new DefaultComboBoxModel(ArrayUtil.toObjectArray(project.getFilters()))); if (!project.equals(myRepository.getCurrentProject())) { // unspecified filter should always be available myFilterCombobox.setSelectedIndex(0); doApply(); } else if (!myInitialized) { // matters only on initialization myFilterCombobox.setSelectedItem(myRepository.getCurrentFilter()); myInitialized = true; } } } } | itemStateChanged |
8,645 | void () { super.apply(); myRepository.setCurrentProject((MantisProject)myProjectCombobox.getSelectedItem()); myRepository.setCurrentFilter((MantisFilter)myFilterCombobox.getSelectedItem()); myTestButton.setEnabled(myRepository.isConfigured()); } | apply |
8,646 | void (final boolean connectionSuccessful) { super.afterTestConnection(connectionSuccessful); if (connectionSuccessful) { new FetchMantisProjects().queue(); } else { myProjectCombobox.removeAllItems(); myFilterCombobox.removeAllItems(); } } | afterTestConnection |
8,647 | void (@Nullable final JComponent anchor) { super.setAnchor(anchor); myProjectLabel.setAnchor(anchor); myFilterLabel.setAnchor(anchor); } | setAnchor |
8,648 | JComponent () { myProjectLabel = new JBLabel(TaskBundle.message("label.project"), SwingConstants.RIGHT); myProjectCombobox = new ComboBox<>(200); myProjectCombobox.setRenderer(SimpleListCellRenderer.create(TaskBundle.message("label.login.first"), MantisProject::getName)); myFilterLabel = new JBLabel(TaskBundle.message("label.filter"), SwingConstants.RIGHT); myFilterCombobox = new ComboBox<>(200); myFilterCombobox.setRenderer(SimpleListCellRenderer.create(TaskBundle.message("label.login.first"), MantisFilter::getName)); return FormBuilder.createFormBuilder() .addLabeledComponent(myProjectLabel, myProjectCombobox) .addLabeledComponent(myFilterLabel, myFilterCombobox) .getPanel(); } | createCustomPanel |
8,649 | MantisProject () { return myRepository.getCurrentProject(); } | getSelectedItem |
8,650 | void () { super.handleError(); myFilterCombobox.removeAllItems(); } | handleError |
8,651 | MantisFilter () { return new MantisFilter(0, "-- all issues --"); } | newUndefined |
8,652 | int () { return myId; } | getId |
8,653 | void (final int id) { this.myId = id; } | setId |
8,654 | String () { return myName; } | getName |
8,655 | void (final String name) { this.myName = name; } | setName |
8,656 | boolean () { return getId() == UNSPECIFIED_FILTER_ID; } | isUnspecified |
8,657 | boolean (Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; return myId == ((MantisFilter)o).myId; } | equals |
8,658 | int () { return myId; } | hashCode |
8,659 | String () { return getName(); } | toString |
8,660 | String () { return "Mantis"; } | getName |
8,661 | Icon () { return TasksCoreIcons.Mantis; } | getIcon |
8,662 | TaskRepository () { return new MantisRepository(this); } | createRepository |
8,663 | Class<MantisRepository> () { return MantisRepository.class; } | getRepositoryClass |
8,664 | TaskRepositoryEditor (final MantisRepository repository, final Project project, final Consumer<? super MantisRepository> changeListener) { return new MantisRepositoryEditor(project, repository, changeListener); } | createEditor |
8,665 | TaskType () { return myType; } | getType |
8,666 | TaskType () { String typeName = getCustomFieldStringValue("Type"); if (typeName != null) { try { return TaskType.valueOf(StringUtil.toUpperCase(typeName)); } catch (IllegalArgumentException ignored) { } } return TaskType.OTHER; } | mapIssueTypeToPredefinedValue |
8,667 | TaskState () { // TODO Make state field name configurable String stateName = getCustomFieldStringValue("State"); if (stateName == null) { return null; } if (stateName.equals("Fixed")) { return TaskState.RESOLVED; } try { return TaskState.valueOf(StringUtil.toUpperCase(stateName)); } catch (IllegalArgumentException ignored) { } return TaskState.OTHER; } | mapIssueStateToPredefinedValue |
8,668 | String (@NotNull String fieldName) { YouTrackIssue.CustomField stateField = ContainerUtil.find(myIssue.getCustomFields(), cf -> cf.getName().equals(fieldName)); if (stateField != null) { JsonElement fieldValueElem = stateField.getValue(); if (fieldValueElem != null && fieldValueElem.isJsonObject()) { JsonElement stateNameElem = fieldValueElem.getAsJsonObject().get("name"); if (stateNameElem != null && stateNameElem.isJsonPrimitive() && stateNameElem.getAsJsonPrimitive().isString()) { return stateNameElem.getAsString(); } } } return null; } | getCustomFieldStringValue |
8,669 | String () { return myIssue.getId(); } | getId |
8,670 | TaskRepository () { return myRepository; } | getRepository |
8,671 | Icon () { return LocalTaskImpl.getIconFromType(getType(), true); } | getIcon |
8,672 | Date () { return new Date(myIssue.getUpdated()); } | getUpdated |
8,673 | Date () { return new Date(myIssue.getCreated()); } | getCreated |
8,674 | boolean () { return myIssue.getResolved() != 0; } | isClosed |
8,675 | boolean () { return true; } | isIssue |
8,676 | String () { return myRepository.getUrl() + "/issue/" + getId(); } | getIssueUrl |
8,677 | void (boolean connectionSuccessful) { super.afterTestConnection(connectionSuccessful); // highlight query if connection was successful if (connectionSuccessful) { DaemonCodeAnalyzer.getInstance(myProject).restart(); } } | afterTestConnection |
8,678 | void () { myRepository.setDefaultSearch(myDefaultSearch.getText()); super.apply(); } | apply |
8,679 | JComponent () { mySearchLabel = new JBLabel(TaskBundle.message("label.search"), SwingConstants.RIGHT); myDefaultSearch = new LanguageTextField(YouTrackLanguage.INSTANCE, myProject, myRepository.getDefaultSearch()); installListener(myDefaultSearch); return FormBuilder.createFormBuilder().addLabeledComponent(mySearchLabel, myDefaultSearch).getPanel(); } | createCustomPanel |
8,680 | void (@Nullable final JComponent anchor) { super.setAnchor(anchor); mySearchLabel.setAnchor(anchor); } | setAnchor |
8,681 | TextAttributes (@NotNull String styleClass) { final TextAttributes attr = TEXT_ATTRIBUTES.get(styleClass); return attr == null ? TEXT.getDefaultAttributes() : attr; } | getAttributeByStyleClass |
8,682 | YouTrackRepository () { return myRepository; } | getRepository |
8,683 | List<HighlightRange> () { return styleRanges; } | getHighlightRanges |
8,684 | List<CompletionItem> () { return suggestions; } | getCompletionItems |
8,685 | String () { return StringUtil.notNullize(style); } | getStyleClass |
8,686 | TextRange () { return TextRange.from(start, length); } | getTextRange |
8,687 | TextAttributes () { return getAttributeByStyleClass(style); } | getTextAttributes |
8,688 | TextRange () { return TextRange.create(matchingStart, matchingEnd); } | getMatchRange |
8,689 | TextRange () { return TextRange.create(completionStart, completionEnd); } | getCompletionRange |
8,690 | String () { return description; } | getDescription |
8,691 | String () { return StringUtil.notNullize(suffix); } | getSuffix |
8,692 | String () { return StringUtil.notNullize(prefix); } | getPrefix |
8,693 | String () { return option; } | getOption |
8,694 | YouTrackPluginAdvertiserService () { return ApplicationManager.getApplication().getService(YouTrackPluginAdvertiserService.class); } | getInstance |
8,695 | Project () { IdeFrame frame = IdeFocusManager.getGlobalInstance().getLastFocusedFrame(); return frame != null ? frame.getProject() : null; } | detectCurrentProject |
8,696 | BaseRepository () { return new YouTrackRepository(this); } | clone |
8,697 | CancellableConnection () { return new HttpTestConnection(new HttpGet()) { @Override protected void test() throws Exception { URI endpoint = new URIBuilder(getRestApiUrl("api", "issues")) .addParameter("query", myDefaultSearch) .addParameter("fields", YouTrackIssue.DEFAULT_FIELDS) .addParameter("$top", String.valueOf(10)) .build(); myCurrentRequest.setURI(endpoint); getHttpClient().execute(myCurrentRequest, JsonResponseHandlerBuilder.fromGson(GSON) .errorHandler(YouTrackRepository.this::parseYouTrackError) .toNothing()); } }; } | createCancellableConnection |
8,698 | String () { return myDefaultSearch; } | getDefaultSearch |
8,699 | void (String defaultSearch) { if (defaultSearch != null) { myDefaultSearch = defaultSearch; } } | setDefaultSearch |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.