Unnamed: 0
int64
0
305k
body
stringlengths
7
52.9k
name
stringlengths
1
185
8,100
String () { return TaskBundle.message("tooltip.whether.this.template.variable.will.be.shown.in.general.tab"); }
getTooltipText
8,101
Boolean (TemplateVariable o) { return o.isHidden(); }
valueOf
8,102
void (TemplateVariable variable, Boolean value) { variable.setHidden(value); setModified(); // value column editor may be changed TemplateVariablesTable.this.refreshValues(); }
setValue
8,103
Class () { return Boolean.class; }
getColumnClass
8,104
boolean (TemplateVariable variable) { return !variable.isReadOnly(); }
isCellEditable
8,105
String () { return TaskBundle.message("tooltip.whether.this.template.variable.will.be.hidden.like.password.field"); }
getTooltipText
8,106
TemplateVariable () { return new TemplateVariable("", ""); }
createElement
8,107
boolean (TemplateVariable element) { return StringUtil.isEmpty(element.getName()) && StringUtil.isEmpty(element.getValue()); }
isEmpty
8,108
TemplateVariable (final TemplateVariable variable) { return variable.clone(); }
cloneElement
8,109
boolean (final TemplateVariable selection) { return true; }
canDeleteElement
8,110
List<TemplateVariable> () { return getElements(); }
getTemplateVariables
8,111
String () { return GenericRepository.this.getUrl(); }
getValue
8,112
String () { return GenericRepository.this.getUsername(); }
getValue
8,113
String () { return GenericRepository.this.getPassword(); }
getValue
8,114
void () { myLoginURL = ""; myTasksListUrl = ""; mySingleTaskUrl = ""; myDownloadTasksInSeparateRequests = false; myLoginMethodType = HTTPMethod.GET; myTasksListMethodType = HTTPMethod.GET; mySingleTaskMethodType = HTTPMethod.GET; myResponseType = ResponseType.JSON; myTemplateVariables = new ArrayList<>(); myResponseHandlersMap = new EnumMap<>(ResponseType.class); myResponseHandlersMap.put(ResponseType.XML, getXmlResponseHandlerDefault()); myResponseHandlersMap.put(ResponseType.JSON, getJsonResponseHandlerDefault()); myResponseHandlersMap.put(ResponseType.TEXT, getTextResponseHandlerDefault()); }
resetToDefaults
8,115
GenericRepository () { return new GenericRepository(this); }
clone
8,116
boolean (final Object o) { if (this == o) return true; if (!(o instanceof GenericRepository that)) return false; if (!super.equals(o)) return false; if (!Objects.equals(getLoginUrl(), that.getLoginUrl())) return false; if (!Objects.equals(getTasksListUrl(), that.getTasksListUrl())) return false; if (!Objects.equals(getSingleTaskUrl(), that.getSingleTaskUrl())) return false; if (!Comparing.equal(getLoginMethodType(), that.getLoginMethodType())) return false; if (!Comparing.equal(getTasksListMethodType(), that.getTasksListMethodType())) return false; if (!Comparing.equal(getSingleTaskMethodType(), that.getSingleTaskMethodType())) return false; if (!Comparing.equal(getResponseType(), that.getResponseType())) return false; if (!Comparing.equal(getTemplateVariables(), that.getTemplateVariables())) return false; if (!Comparing.equal(getResponseHandlers(), that.getResponseHandlers())) return false; if (!Comparing.equal(getDownloadTasksInSeparateRequests(), that.getDownloadTasksInSeparateRequests())) return false; return true; }
equals
8,117
boolean () { if (!super.isConfigured()) return false; for (TemplateVariable variable : getTemplateVariables()) { if (variable.isShownOnFirstTab() && StringUtil.isEmpty(variable.getValue())) { return false; } } return StringUtil.isNotEmpty(myTasksListUrl) && getActiveResponseHandler().isConfigured(); }
isConfigured
8,118
HttpMethod (String requestUrl, HTTPMethod type) { HttpMethod method = type == HTTPMethod.GET ? new GetMethod(requestUrl) : GenericRepositoryUtil.getPostMethodFromURL(requestUrl); configureHttpMethod(method); return method; }
getHttpMethod
8,119
CancellableConnection () { return new CancellableConnection() { @Override protected void doTest() throws Exception { getIssues("", 1, 0); } @Override public void cancel() { } }; }
createCancellableConnection
8,120
void () { }
cancel
8,121
void (final String loginUrl) { myLoginURL = loginUrl; }
setLoginUrl
8,122
void (final String tasksListUrl) { myTasksListUrl = tasksListUrl; }
setTasksListUrl
8,123
void (String singleTaskUrl) { mySingleTaskUrl = singleTaskUrl; }
setSingleTaskUrl
8,124
String () { return myLoginURL; }
getLoginUrl
8,125
String () { return myTasksListUrl; }
getTasksListUrl
8,126
String () { return mySingleTaskUrl; }
getSingleTaskUrl
8,127
void (final HTTPMethod loginMethodType) { myLoginMethodType = loginMethodType; }
setLoginMethodType
8,128
void (final HTTPMethod tasksListMethodType) { myTasksListMethodType = tasksListMethodType; }
setTasksListMethodType
8,129
void (HTTPMethod singleTaskMethodType) { mySingleTaskMethodType = singleTaskMethodType; }
setSingleTaskMethodType
8,130
HTTPMethod () { return myLoginMethodType; }
getLoginMethodType
8,131
HTTPMethod () { return myTasksListMethodType; }
getTasksListMethodType
8,132
HTTPMethod () { return mySingleTaskMethodType; }
getSingleTaskMethodType
8,133
ResponseType () { return myResponseType; }
getResponseType
8,134
void (final ResponseType responseType) { myResponseType = responseType; }
setResponseType
8,135
List<TemplateVariable> () { return myTemplateVariables; }
getTemplateVariables
8,136
List<TemplateVariable> () { return ContainerUtil.concat(myPredefinedTemplateVariables, getTemplateVariables()); }
getAllTemplateVariables
8,137
void (final List<TemplateVariable> templateVariables) { myTemplateVariables = templateVariables; }
setTemplateVariables
8,138
Icon () { if (mySubtypeName == null) { return super.getIcon(); } @SuppressWarnings("unchecked") List<TaskRepositorySubtype> subtypes = getRepositoryType().getAvailableSubtypes(); for (TaskRepositorySubtype s : subtypes) { if (mySubtypeName.equals(s.getName())) { return s.getIcon(); } } throw new AssertionError("Unknown repository subtype"); }
getIcon
8,139
int () { return LOGIN_ANONYMOUSLY | BASIC_HTTP_AUTHORIZATION; }
getFeatures
8,140
ResponseHandler (ResponseType type) { return myResponseHandlersMap.get(type); }
getResponseHandler
8,141
ResponseHandler () { return myResponseHandlersMap.get(myResponseType); }
getActiveResponseHandler
8,142
List<ResponseHandler> () { if (myResponseHandlersMap.isEmpty()) { return Collections.emptyList(); } return Collections.unmodifiableList(new ArrayList<>(myResponseHandlersMap.values())); }
getResponseHandlers
8,143
void (List<ResponseHandler> responseHandlers) { myResponseHandlersMap.clear(); for (ResponseHandler handler : responseHandlers) { myResponseHandlersMap.put(handler.getResponseType(), handler); } // ResponseHandler#repository field is excluded from serialization to prevent // circular dependency so it has to be done manually during serialization process for (ResponseHandler handler : myResponseHandlersMap.values()) { handler.setRepository(this); } }
setResponseHandlers
8,144
ResponseHandler () { return new XPathResponseHandler(this); }
getXmlResponseHandlerDefault
8,145
ResponseHandler () { return new JsonPathResponseHandler(this); }
getJsonResponseHandlerDefault
8,146
ResponseHandler () { return new RegExResponseHandler(this); }
getTextResponseHandlerDefault
8,147
String () { return mySubtypeName; }
getSubtypeName
8,148
void (String subtypeName) { mySubtypeName = subtypeName; }
setSubtypeName
8,149
boolean () { return myDownloadTasksInSeparateRequests; }
getDownloadTasksInSeparateRequests
8,150
void (boolean downloadTasksInSeparateRequests) { myDownloadTasksInSeparateRequests = downloadTasksInSeparateRequests; }
setDownloadTasksInSeparateRequests
8,151
FileType (@NotNull final String name) { FileType fileType = FileTypeManager.getInstance().findFileTypeByName(name); return fileType == null ? PlainTextFileType.INSTANCE : fileType; }
findFileTypePlainDefault
8,152
FileType () { if (LOG == null) { LOG = Logger.getInstance(ResponseType.class); } try { Class<?> xPathClass = Class.forName("org.intellij.lang.xpath.XPathFileType"); LOG.debug("XPathFileType class loaded successfully"); return (FileType)xPathClass.getField("XPATH").get(null); } catch (Exception e) { LOG.debug("XPathFileType class not found. Using PlainText.INSTANCE instead"); return PlainTextFileType.INSTANCE; } }
findXPathFileType
8,153
String () { return myMimeType; }
getMimeType
8,154
FileType () { return myContentFileType; }
getContentFileType
8,155
FileType () { return mySelectorFileType; }
getSelectorFileType
8,156
String () { return myName; }
getName
8,157
String () { return myPath; }
getPath
8,158
void (@NotNull String name) { myName = name; }
setName
8,159
void (@NotNull String path) { myPath = path; }
setPath
8,160
Selector () { return new Selector(this); }
clone
8,161
String () { return String.format("Selector(name='%s', path='%s')", getName(), getPath()); }
toString
8,162
boolean (Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; Selector selector = (Selector)o; if (!myName.equals(selector.myName)) return false; if (!myPath.equals(selector.myPath)) return false; return true; }
equals
8,163
int () { int result = myName.hashCode(); result = (31 * result) + (myPath.hashCode()); return result; }
hashCode
8,164
String (Selector selector) { return selector.getName(); }
valueOf
8,165
String (Selector selector) { return selector.getPath(); }
valueOf
8,166
boolean (Selector selector) { return true; }
isCellEditable
8,167
void (Selector selector, String value) { selector.setPath(value); }
setValue
8,168
TableCellRenderer (Selector selector) { return new EditorTableCellViewer(valueFileType, project); }
getRenderer
8,169
TableCellEditor (Selector o) { return new EditorTableCellViewer(valueFileType, project); }
getEditor
8,170
Object () { return myEditorField.getText(); }
getCellEditorValue
8,171
Component (JTable table, Object value, boolean isSelected, int row, int column) { myEditorField.setText((String)value); return myEditorField; }
getTableCellEditorComponent
8,172
Component (JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) { myEditorField.setText((String)value); return myEditorField; }
getTableCellRendererComponent
8,173
ResponseType () { return ResponseType.XML; }
getResponseType
8,174
List<Selector> () { return new ArrayList<>(mySelectors.values()); }
getSelectors
8,175
void (@NotNull List<? extends Selector> selectors) { mySelectors.clear(); for (Selector selector : selectors) { mySelectors.put(selector.getName(), selector); } }
setSelectors
8,176
Selector (@NotNull String name) { return mySelectors.get(name); }
getSelector
8,177
String (@NotNull String name) { Selector s = getSelector(name); return s.getPath(); }
getSelectorPath
8,178
JComponent (@NotNull Project project) { FileType fileType = getResponseType().getSelectorFileType(); HighlightedSelectorsTable table = new HighlightedSelectorsTable(fileType, project, getSelectors()); return new JBScrollPane(table); }
getConfigurationComponent
8,179
SelectorBasedResponseHandler () { SelectorBasedResponseHandler clone = (SelectorBasedResponseHandler)super.clone(); clone.mySelectors = new LinkedHashMap<>(mySelectors.size()); for (Selector selector : mySelectors.values()) { clone.mySelectors.put(selector.getName(), selector.clone()); } return clone; }
clone
8,180
boolean () { Selector idSelector = getSelector(ID); if (StringUtil.isEmpty(idSelector.getPath())) return false; Selector summarySelector = getSelector(SUMMARY); if (StringUtil.isEmpty(summarySelector.getPath()) && !myRepository.getDownloadTasksInSeparateRequests()) return false; return true; }
isConfigured
8,181
boolean (Object o) { if (this == o) return true; if (!(o instanceof SelectorBasedResponseHandler handler)) return false; if (!mySelectors.equals(handler.mySelectors)) return false; return true; }
equals
8,182
int () { return mySelectors.hashCode(); }
hashCode
8,183
String () { return "Generic"; }
getName
8,184
Icon () { return AllIcons.General.Web; }
getIcon
8,185
TaskRepository () { return new GenericRepository(this); }
createRepository
8,186
Class<GenericRepository> () { return GenericRepository.class; }
getRepositoryClass
8,187
TaskRepositoryEditor (final GenericRepository repository, final Project project, final Consumer<? super GenericRepository> changeListener) { return new GenericRepositoryEditor<>(project, repository, changeListener); }
createEditor
8,188
List<TaskRepositorySubtype> () { return Arrays.asList( this, new AsanaRepository(), new AssemblaRepository(), new SprintlyRepository() ); }
getAvailableSubtypes
8,189
String () { return myName + " [G]"; }
getName
8,190
Icon () { return myIcon; }
getIcon
8,191
TaskRepository () { Element element; try { String configFileName = StringUtil.toLowerCase(myName) + ".xml"; //URL resourceUrl = ResourceUtil.getResource(GenericRepositoryType.class, "connectors", configFileName); URL resourceUrl = GenericRepository.class.getResource("connectors/" + configFileName); if (resourceUrl == null) { throw new AssertionError("Repository configuration file '" + configFileName + "' not found"); } element = JDOMUtil.loadResource(resourceUrl); } catch (Exception e) { throw new AssertionError(e); } GenericRepository repository = XmlSerializer.deserialize(element, GenericRepository.class); repository.setRepositoryType(GenericRepositoryType.this); repository.setSubtypeName(getName()); return repository; }
createRepository
8,192
void (@NotNull GenericRepository repository) { myRepository = repository; }
setRepository
8,193
GenericRepository () { return myRepository; }
getRepository
8,194
ResponseHandler () { try { return (ResponseHandler) super.clone(); } catch (CloneNotSupportedException e) { throw new AssertionError("ResponseHandler#clone() should be supported"); } }
clone
8,195
void (ActionEvent e) { afterTestConnection(TaskManager.getManager(project).testConnection(repository)); }
actionPerformed
8,196
void (final ActionEvent e) { loginUrlEnablingChanged(); }
actionPerformed
8,197
void (final ActionEvent e) { loginUrlEnablingChanged(); }
actionPerformed
8,198
void (final ActionEvent e) { singleTaskUrlEnablingChanged(); doApply(); selectCardByResponseType(); }
actionPerformed
8,199
void (final ActionEvent e) { final ManageTemplateVariablesDialog dialog = new ManageTemplateVariablesDialog(myManageTemplateVariablesButton); dialog.setTemplateVariables(myRepository.getAllTemplateVariables()); if (dialog.showAndGet()) { myRepository.setTemplateVariables(ContainerUtil.filter(dialog.getTemplateVariables(), variable -> !variable.isReadOnly())); myCustomPanel.removeAll(); myCustomPanel.add(createCustomPanel()); //myCustomPanel.repaint(); myTabbedPane.getComponentAt(0).repaint(); //myLoginURLText = createEditorFieldWithPlaceholderCompletion(myRepository.getLoginUrl()); List<String> placeholders = createPlaceholdersList(myRepository); ((TextFieldWithAutoCompletion)myLoginURLText).setVariants(placeholders); ((TextFieldWithAutoCompletion)myTasksListURLText).setVariants(concat(placeholders, "{max}", "{since}")); ((TextFieldWithAutoCompletion)mySingleTaskURLText).setVariants(concat(placeholders, "{id}")); myPanel.repaint(); } }
actionPerformed