Unnamed: 0
int64
0
305k
body
stringlengths
7
52.9k
name
stringlengths
1
185
276,300
void (@NotNull final JTree tree, @NotNull Future<AtomicReference<OutgoingResult>> future, boolean initial) { myFuture = future; myLoading.set(true); }
startLoading
276,301
boolean () { return myRepositoryPanel.isEditable(); }
isEditableNow
276,302
int (@NotNull RepositoryNode repositoryNode) { String name = myRepositoryPanel.getRepositoryName(); RepositoryWithBranchPanel panel = (RepositoryWithBranchPanel)repositoryNode.getUserObject(); return name.compareTo(panel.getRepositoryName()); }
compareTo
276,303
void () { myLoading.set(false); }
stopLoading
276,304
boolean () { return myLoading.get(); }
isLoading
276,305
String () { return getRepositoryName() + " " + getRepositoryPresentationDetails(); }
toString
276,306
String () { PushTarget targetValue = myRepositoryPanel.getTargetPanel().getValue(); return myRepositoryPanel.getSourceName() + (targetValue != null ? myRepositoryPanel.getArrow() + targetValue : ""); }
getRepositoryPresentationDetails
276,307
Object (CheckboxTree.CheckboxTreeCellRenderer renderer, MouseEvent e) { JTree tree = (JTree)e.getSource(); Object tag = null; final TreePath path = tree.getPathForLocation(e.getX(), e.getY()); if (path != null) { final Rectangle rectangle = tree.getPathBounds(path); assert rectangle != null; int dx = e.getX() - rectang...
getTagAtForRenderer
276,308
SimpleTextAttributes (@NotNull SimpleColoredComponent component, @NotNull SimpleTextAttributes baseStyle, boolean isActive) { if (isActive) return baseStyle; Color color = ObjectUtils.chooseNotNull(baseStyle.getFgColor(), component.getForeground()); return new SimpleTextAttributes(baseStyle.getStyle(), ColorUtil.toAlph...
addTransparencyIfNeeded
276,309
void (@NotNull ColoredTreeCellRenderer renderer) { renderer.append(" "); myLinkedText.setSelected(renderer.getTree().isPathSelected(TreeUtil.getPathFromRoot(this))); TreeNode parent = getParent(); if (parent instanceof RepositoryNode) { myLinkedText.setTransparent(!((RepositoryNode)parent).isChecked()); } myLinkedText....
render
276,310
void (@NotNull ActionEvent e) { fireOnSelectionChange(myRepositoryCheckbox.isSelected()); }
actionPerformed
276,311
void (@NotNull JTree tree, Object value, boolean selected, boolean expanded, boolean leaf, int row, boolean hasFocus) { }
customizeCellRenderer
276,312
boolean (JComponent input) { ValidationInfo error = myDestPushTargetPanelComponent.verify(); if (error != null) { //noinspection ConstantConditions PopupUtil.showBalloonForComponent(error.component, error.message, MessageType.WARNING, false, project); } return error == null; }
verify
276,313
void () { add(myRepositoryCheckbox, BorderLayout.WEST); JPanel panel = new NonOpaquePanel(new BorderLayout()); panel.add(myTextRenderer, BorderLayout.WEST); panel.add(myDestPushTargetPanelComponent, BorderLayout.CENTER); add(panel, BorderLayout.CENTER); }
layoutComponents
276,314
String () { return myRepositoryName; }
getRepositoryName
276,315
String () { return mySourceName; }
getSourceName
276,316
String () { return " " + UIUtil.rightArrow() + " "; }
getArrow
276,317
Component (JTree tree, Object value, boolean selected, boolean expanded, boolean leaf, int row, boolean hasFocus) { Rectangle bounds = tree.getPathBounds(tree.getPathForRow(row)); invalidate(); myTextRenderer.getTreeCellRendererComponent(tree, value, selected, expanded, leaf, row, hasFocus); if (!(value instanceof Sing...
getTreeCellEditorComponent
276,318
void (@NotNull RepositoryNodeListener<T> listener) { myListeners.add(listener); myDestPushTargetPanelComponent.addTargetEditorListener(new PushTargetEditorListener() { @Override public void onTargetInEditModeChanged(@NotNull @Nls String value) { for (RepositoryNodeListener listener : myListeners) { listener.onTargetInE...
addRepoNodeListener
276,319
void (@NotNull @Nls String value) { for (RepositoryNodeListener listener : myListeners) { listener.onTargetInEditMode(value); } }
onTargetInEditModeChanged
276,320
void () { myDestPushTargetPanelComponent.fireOnChange(); T target = myDestPushTargetPanelComponent.getValue(); if (target == null) return; for (RepositoryNodeListener<T> listener : myListeners) { listener.onTargetChanged(target); } }
fireOnChange
276,321
void (boolean isSelected) { for (RepositoryNodeListener listener : myListeners) { listener.onSelectionChanged(isSelected); } }
fireOnSelectionChange
276,322
void () { myDestPushTargetPanelComponent.fireOnCancel(); }
fireOnCancel
276,323
PushTargetPanel () { return myDestPushTargetPanelComponent; }
getTargetPanel
276,324
boolean () { return myDestPushTargetPanelComponent.getValue() != null; }
isEditable
276,325
String (@NotNull Project project, @NotNull DvcsRememberedInputs rememberedInputs) { for (ClonePathProvider provider : EP_NAME.getExtensionList()) { String directoryPath = provider.getParentDirectoryPath(project, rememberedInputs); if (StringUtil.isNotEmpty(directoryPath)) { return directoryPath; } } String parentDirect...
defaultParentDirectoryPath
276,326
String (@NotNull Project project, @NotNull String vcsUrl) { for (ClonePathProvider provider : EP_NAME.getExtensionList()) { String directoryPath = provider.getRelativeDirectoryPathForVcsUrl(project, vcsUrl); if (StringUtil.isNotEmpty(directoryPath)) { return directoryPath; } } String encoded = PathUtil.getFileName(vcsU...
relativeDirectoryPathForVcsUrl
276,327
VcsRepositoryManager (@NotNull Project project) { return Objects.requireNonNull(project.getService(VcsRepositoryManager.class)); }
getInstance
276,328
void (@NotNull Project project) { getInstance(project).initManager(); }
runActivity
276,329
int () { return VcsInitObject.OTHER_INITIALIZATION.getOrder(); }
getOrder
276,330
void () { myDisposed = true; disposeAllRepositories(true); }
dispose
276,331
void (boolean disposeExternal) { REPO_LOCK.writeLock().lock(); try { for (Repository repo : myRepositories.values()) { Disposer.dispose(repo); } myRepositories.clear(); if (disposeExternal) { for (Repository repo : myExternalRepositories.values()) { Disposer.dispose(repo); } myExternalRepositories.clear(); } updatePath...
disposeAllRepositories
276,332
void () { if (!myStarted || myDisposed) return; myUpdateAlarm.cancelAllRequests(); myUpdateAlarm.addRequest(() -> checkAndUpdateRepositoryCollection(null), 100); }
scheduleUpdate
276,333
void () { myStarted = true; checkAndUpdateRepositoryCollection(null); }
initManager
276,334
VirtualFile (@Nullable FilePath rootPath) { if (rootPath == null) return null; REPO_LOCK.readLock().lock(); try { return myPathToRootMap.get(rootPath.getPath()); } finally { REPO_LOCK.readLock().unlock(); } }
getVirtualFileForRoot
276,335
void () { myPathToRootMap.clear(); for (VirtualFile root : myRepositories.keySet()) { myPathToRootMap.put(root.getPath(), root); } for (VirtualFile root : myExternalRepositories.keySet()) { myPathToRootMap.put(root.getPath(), root); } }
updatePathToRootMap
276,336
void (@NotNull VirtualFile root, @NotNull Repository repository) { REPO_LOCK.writeLock().lock(); try { myExternalRepositories.put(root, repository); updatePathToRootMap(); } finally { REPO_LOCK.writeLock().unlock(); } }
addExternalRepository
276,337
void (@NotNull VirtualFile root) { REPO_LOCK.writeLock().lock(); try { myExternalRepositories.remove(root); updatePathToRootMap(); } finally { REPO_LOCK.writeLock().unlock(); } }
removeExternalRepository
276,338
boolean (@NotNull Repository repository) { REPO_LOCK.readLock().lock(); try { return !myRepositories.containsValue(repository) && myExternalRepositories.containsValue(repository); } finally { REPO_LOCK.readLock().unlock(); } }
isExternal
276,339
Collection<Repository> () { REPO_LOCK.readLock().lock(); try { return new ArrayList<>(myRepositories.values()); } finally { REPO_LOCK.readLock().unlock(); } }
getRepositories
276,340
void (@Nullable VirtualFile checkedRoot) { if (MODIFY_LOCK.isHeldByCurrentThread()) { LOG.error(new Throwable("Recursive Repository initialization")); return; } MODIFY_LOCK.lock(); try { Map<VirtualFile, Repository> repositories; REPO_LOCK.readLock().lock(); try { repositories = new HashMap<>(myRepositories); } finally...
checkAndUpdateRepositoryCollection
276,341
Collection<VirtualFile> (@NotNull Collection<? extends Repository> repositories) { List<VirtualFile> invalidRepos = new ArrayList<>(); for (Repository repo : repositories) { VcsRoot vcsRoot = myVcsManager.getVcsRootObjectFor(repo.getRoot()); if (vcsRoot == null || !repo.getRoot().equals(vcsRoot.getPath()) || !repo.getV...
findInvalidRoots
276,342
String () { return "RepositoryManager(repositories=" + myRepositories + ')'; // NON-NLS }
toString
276,343
void () { try { myUpdateAlarm.waitForAllExecuted(10, TimeUnit.SECONDS); } catch (Exception e) { LOG.error(e); } }
waitForAsyncTaskCompletion
276,344
VirtualFile () { return myRootDir; }
getRoot
276,345
String () { return getRoot().getPresentableUrl(); }
getPresentableUrl
276,346
String () { return getPresentableUrl(); }
toString
276,347
Project () { return myProject; }
getProject
276,348
boolean () { return getCurrentRevision() == null; }
isFresh
276,349
boolean () { return myDisposed; }
isDisposed
276,350
void () { myDisposed = true; }
dispose
276,351
boolean (Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; Repository that = (Repository)o; if (!getProject().equals(that.getProject())) return false; if (!getRoot().equals(that.getRoot())) return false; return true; }
equals
276,352
int () { int result = getProject().hashCode(); result = 31 * result + (getRoot().hashCode()); return result; }
hashCode
276,353
void () { }
dispose
276,354
void (@NotNull VirtualFile root, @NotNull T repository) { myGlobalRepositoryManager.addExternalRepository(root, repository); }
addExternalRepository
276,355
void (@NotNull VirtualFile root) { myGlobalRepositoryManager.removeExternalRepository(root); }
removeExternalRepository
276,356
boolean (@NotNull T repository) { return myGlobalRepositoryManager.isExternal(repository); }
isExternal
276,357
List<T> (Class<T> type) { return ContainerUtil.findAll(myGlobalRepositoryManager.getRepositories(), type); }
getRepositories
276,358
boolean () { return getRepositories().size() > 1; }
moreThanOneRoot
276,359
void (@Nullable VirtualFile root) { T repo = getRepositoryForRoot(root); if (repo != null) { repo.update(); } }
updateRepository
276,360
void () { ContainerUtil.process(getRepositories(), repo -> { repo.update(); return true; }); }
updateAllRepositories
276,361
AbstractVcs () { AbstractVcs vcs = ProjectLevelVcsManager.getInstance(myProject).findVcsByName(myVcsKey.getName()); return Objects.requireNonNull(vcs); }
getVcs
276,362
boolean () { return !MultiRootBranches.diverged(getRepositories()); }
shouldProposeSyncControl
276,363
Icon (@NotNull String path, int cacheKey, int flags) { return IconManager.getInstance().loadRasterizedIcon(path, DvcsImplIcons.class.getClassLoader(), cacheKey, flags); }
load
276,364
void () { assertEquals("", DvcsUtil.joinWithAnd(Arrays.asList(""), 3)); assertEquals("1", DvcsUtil.joinWithAnd(Arrays.asList("1"), 3)); assertEquals("1 and 2", DvcsUtil.joinWithAnd(Arrays.asList("1", "2"), 3)); assertEquals("1, 2 and 3", DvcsUtil.joinWithAnd(Arrays.asList("1", "2", "3"), 3)); assertEquals("1, 2 and 2 o...
testJoinWithAnd
276,365
VirtualFile () { cd(getProjectRoot()); String externalName = "external"; mkdir(externalName); getProjectRoot().refresh(false, true); final VirtualFile repositoryFile = Objects.requireNonNull(this.getProjectRoot().findChild(externalName)); MockRepositoryImpl externalRepo = new MockRepositoryImpl(myProject, repositoryFil...
createExternalRepository
276,366
VcsRepositoryCreator () { return new VcsRepositoryCreator() { @Override public @NotNull VcsKey getVcsKey() { return myVcs.getKeyInstanceMethod(); } @Override public @Nullable Repository createRepositoryIfValid(@NotNull Project project, @NotNull VirtualFile root, @NotNull Disposable parentDisposable) { READY_TO_READ.cou...
createMockRepositoryCreator
276,367
VcsKey () { return myVcs.getKeyInstanceMethod(); }
getVcsKey
276,368
String () { throw new UnsupportedOperationException(); }
getCurrentBranchName
276,369
AbstractVcs () { throw new UnsupportedOperationException(); }
getVcs
276,370
boolean () { throw new UnsupportedOperationException(); }
isFresh
276,371
State () { throw new UnsupportedOperationException(); }
getState
276,372
String () { throw new UnsupportedOperationException(); }
getCurrentRevision
276,373
void () { }
update
276,374
String () { throw new UnsupportedOperationException(); }
toLogString
276,375
File (@NotNull Class<?> clazz) { return new File(PathUtil.getJarPathForClass(clazz)); }
getJarFileFor
276,376
ScriptGeneratorImpl (@NonNls String... parameters) { ContainerUtil.addAll(myInternalParameters, parameters); return this; }
addParameters
276,377
String (@NotNull Class<? extends ExternalApp> mainClass, boolean useBatchFile) { Set<File> jarPaths = new LinkedHashSet<>(); addClasses(jarPaths, mainClass); addClasses(jarPaths, ExternalApp.class); @NonNls StringBuilder cmd = new StringBuilder(); cmd.append('"'); cmd.append(getJavaExecutablePath()); cmd.append('"'); c...
commandLine
276,378
String () { return String.format("%s/bin/java", System.getProperty("java.home")); }
getJavaExecutablePath
276,379
void (@NotNull Set<? super File> paths, @NotNull Class<?> clazz) { paths.add(ScriptGeneratorUtil.getJarFileFor(clazz)); }
addClasses
276,380
Result (@NotNull String entryPoint, int idePort, @NotNull String handlerId, @Nullable String bodyContent) { try { // allow self-signed certificates of IDE TrustManager[] tm = {new AllowingTrustManager()}; SSLContext sslContext = SSLContext.getInstance("TLS"); sslContext.init(null, tm, null); HttpClient client = HttpCli...
sendIdeRequest
276,381
String (@NotNull String env) { String value = System.getenv(env); if (value == null) { throw new IllegalStateException(env + " environment variable is not defined!"); } return value; }
getEnv
276,382
int (@NotNull String env) { return Integer.parseInt(getEnv(env)); }
getEnvInt
276,383
X509Certificate[] () { return null; }
getAcceptedIssuers
276,384
void (X509Certificate[] chain, String authType, Socket socket) { }
checkClientTrusted
276,385
void (X509Certificate[] chain, String authType, Socket socket) { }
checkServerTrusted
276,386
void (X509Certificate[] chain, String authType, SSLEngine engine) { }
checkClientTrusted
276,387
void (X509Certificate[] chain, String authType, SSLEngine engine) { }
checkServerTrusted
276,388
void (X509Certificate[] chain, String authType) { }
checkClientTrusted
276,389
void (X509Certificate[] chain, String authType) { }
checkServerTrusted
276,390
Result (int statusCode, @Nullable String response) { return new Result(statusCode, response, null, false); }
success
276,391
Result (int statusCode, @Nullable String error) { return new Result(statusCode, null, error, true); }
error
276,392
String () { String msg = "Could not communicate with IDE: " + statusCode; if (error != null && !error.isEmpty()) { msg += " - " + error; } return msg; }
getPresentableError
276,393
void (String[] args) { try { String handlerId = ExternalAppUtil.getEnv(NativeSshAskPassAppHandler.IJ_SSH_ASK_PASS_HANDLER_ENV); int idePort = ExternalAppUtil.getEnvInt(NativeSshAskPassAppHandler.IJ_SSH_ASK_PASS_PORT_ENV); String description = args.length > 0 ? args[0] : null; ExternalAppUtil.Result result = ExternalApp...
main
276,394
void (@NotNull String jar) { classPath.addFile(Paths.get(jar)); }
appendToClassPathForInstrumentation
276,395
ClassPath () { return classPath; }
getClassPath
276,396
List<Path> () { return classPath.getBaseUrls(); }
getBaseUrls
276,397
void (@NotNull ClassLoader parent, @NotNull ClassLoader classLoader) { // without this ToolProvider.getSystemJavaCompiler() does not work in jdk 9+ try { Field f = ClassLoader.class.getDeclaredField("classLoaderValueMap"); f.setAccessible(true); f.set(classLoader, f.get(parent)); } catch (Exception ignored) { } }
registerInClassLoaderValueMap
276,398
void (@NotNull URL url) { classPath.addFile(Paths.get(url.getPath())); }
addURL
276,399
void (@NotNull List<Path> files) { classPath.addFiles(files); }
addFiles