Unnamed: 0
int64 0
305k
| body
stringlengths 7
52.9k
| name
stringlengths 1
185
|
|---|---|---|
290,700
|
int () { return myDefaultIndex >= 0 ? myDefaultIndex : myIndex; }
|
getDefaultIndex
|
290,701
|
Icon () { return myIcon; }
|
getIcon
|
290,702
|
void (final int index) { myIndex = index; }
|
setIndex
|
290,703
|
void (final int index) { myDefaultIndex = index; }
|
setDefaultIndex
|
290,704
|
void (final String displayName) { myDisplayName = displayName; }
|
setDisplayName
|
290,705
|
float () { return myLeftProportion; }
|
getLeftProportion
|
290,706
|
void (final float leftProportion) { if (leftProportion < 0 || leftProportion > 1.0) return; myLeftProportion = leftProportion; }
|
setLeftProportion
|
290,707
|
float () { return myRightProportion; }
|
getRightProportion
|
290,708
|
void (final float rightProportion) { if (rightProportion < 0 || rightProportion > 1.0) return; myRightProportion = rightProportion; }
|
setRightProportion
|
290,709
|
float () { return myBottomProportion; }
|
getBottomProportion
|
290,710
|
void (final float bottomProportion) { if (bottomProportion < 0 || bottomProportion > 1.0) return; myBottomProportion = bottomProportion; }
|
setBottomProportion
|
290,711
|
boolean () { return myLeftDetached; }
|
isLeftDetached
|
290,712
|
void (final boolean leftDetached) { myLeftDetached = leftDetached; }
|
setLeftDetached
|
290,713
|
boolean () { return myCenterDetached; }
|
isCenterDetached
|
290,714
|
void (final boolean centerDetached) { myCenterDetached = centerDetached; }
|
setCenterDetached
|
290,715
|
boolean () { return myRightDetached; }
|
isRightDetached
|
290,716
|
void (final boolean rightDetached) { myRightDetached = rightDetached; }
|
setRightDetached
|
290,717
|
boolean () { return myBottomDetached; }
|
isBottomDetached
|
290,718
|
void (final boolean bottomDetached) { myBottomDetached = bottomDetached; }
|
setBottomDetached
|
290,719
|
boolean () { return myIndex == 0; }
|
isDefault
|
290,720
|
boolean (PlaceInGrid place) { return switch (place) { case bottom -> isBottomDetached(); case center -> isCenterDetached(); case left -> isLeftDetached(); case right -> isRightDetached(); }; }
|
isDetached
|
290,721
|
void (PlaceInGrid place, boolean detached) { switch (place) { case bottom -> setBottomDetached(detached); case center -> setCenterDetached(detached); case left -> setLeftDetached(detached); case right -> setRightDetached(detached); } }
|
setDetached
|
290,722
|
TabImpl () { final TabImpl tab = new TabImpl(); tab.copyFrom(this); return tab; }
|
createTab
|
290,723
|
int (String contentId) { ViewImpl.Default viewDefault = myDefaultViews.get(contentId); return viewDefault != null ? viewDefault.getTabID() : -1; }
|
getDefaultTabIndex
|
290,724
|
boolean (String contentId) { ViewImpl.Default viewDefault = myDefaultViews.get(contentId); return viewDefault != null && viewDefault.isMinimizedInGrid(); }
|
getDefaultIsMinimized
|
290,725
|
TabImpl (final int index) { if (index < 0) { return createNewTab(); } TabImpl tab = findTab(index); if (tab != null) return tab; tab = createNewTab(index); return tab; }
|
getOrCreateTab
|
290,726
|
TabImpl (final int index) { final TabImpl.Default defaultTab = getOrCreateDefaultTab(index); final TabImpl tab = defaultTab.createTab(); myTabs.add(tab); return tab; }
|
createNewTab
|
290,727
|
TabImpl () { final int index = myTabs.stream().mapToInt(x -> x.getIndex()).max().orElse(-1) + 1; return createNewTab(index); }
|
createNewTab
|
290,728
|
boolean (@NotNull TabImpl tab) { for (ViewImpl each : myViews.values()) { if (each.getTab() == tab) return true; } return false; }
|
isUsed
|
290,729
|
Element () { return write(new Element("layout")); }
|
getState
|
290,730
|
void (@NotNull Element state) { read(state); }
|
loadState
|
290,731
|
Element (@NotNull Element parentNode) { List<Element> tabs = parentNode.getChildren(StringUtil.getShortName(TabImpl.class.getName())); for (Element eachTabElement : tabs) { TabImpl eachTab = XmlSerializer.deserialize(eachTabElement, TabImpl.class); XmlSerializer.deserializeInto(eachTabElement, getOrCreateTab(eachTab.getIndex())); } final List<Element> views = parentNode.getChildren(StringUtil.getShortName(ViewImpl.class.getName())); for (Element content : views) { final ViewImpl view = new ViewImpl(); XmlSerializer.deserializeInto(content, view); view.assignTab(getOrCreateTab(view.getTabIndex())); myViews.put(view.getID(), view); } Element general = parentNode.getChild(StringUtil.getShortName(myGeneral.getClass().getName(), '$')); XmlSerializer.deserializeInto(general == null ? new Element("state") : general, myGeneral); return parentNode; }
|
read
|
290,732
|
Element (@NotNull Element parentNode) { for (ViewImpl eachState : myViews.values()) { if (myLightWeightIds != null && myLightWeightIds.contains(eachState.getID())) { continue; } Element element = XmlSerializer.serialize(eachState); parentNode.addContent(element == null ? new Element("ViewImpl") : element); } for (TabImpl eachTab : myTabs) { if (isUsed(eachTab)) { Element element = XmlSerializer.serialize(eachTab); parentNode.addContent(element == null ? new Element("TabImpl") : element); } } Element generalContent = XmlSerializer.serialize(myGeneral); if (generalContent != null) { parentNode.addContent(generalContent); } return parentNode; }
|
write
|
290,733
|
void () { myViews.clear(); myTabs.clear(); }
|
resetToDefault
|
290,734
|
ViewImpl (@NotNull Content content) { return getOrCreateView(getOrCreateContentId(content)); }
|
getStateFor
|
290,735
|
void (@NotNull Content content) { String id = getOrCreateContentId(content); clearStateForId(id); }
|
clearStateFor
|
290,736
|
void (@NotNull String id) { myDefaultViews.remove(id); final ViewImpl view = myViews.remove(id); if (view != null) { final Tab tab = view.getTab(); if (tab instanceof TabImpl) { myTabs.remove(tab); } } }
|
clearStateForId
|
290,737
|
String (@NotNull Content content) { @NonNls String id = content.getUserData(ViewImpl.ID); if (id == null) { id = "UnknownView-" + content.getDisplayName(); content.putUserData(ViewImpl.ID, id); } return id; }
|
getOrCreateContentId
|
290,738
|
ViewImpl (@NotNull String id) { ViewImpl view = myViews.get(id); if (view == null) { view = getOrCreateDefault(id).createView(this); myViews.put(id, view); } return view; }
|
getOrCreateView
|
290,739
|
PlaceInGrid (@NotNull Content content) { return getOrCreateDefault(getOrCreateContentId(content)).getPlaceInGrid(); }
|
getDefaultGridPlace
|
290,740
|
boolean (final String id, @NotNull String condition) { return Objects.equals(id, getToFocus(condition)); }
|
isToFocus
|
290,741
|
void (final String id, @NotNull String condition) { myGeneral.focusOnCondition.put(condition, id); }
|
setToFocus
|
290,742
|
void (@NotNull String id, @NotNull String condition, final @NotNull LayoutAttractionPolicy policy) { myDefaultFocus.put(condition, Pair.create(id, policy)); }
|
setDefaultToFocus
|
290,743
|
LayoutAttractionPolicy (@NotNull String condition) { final Pair<String, LayoutAttractionPolicy> pair = myDefaultFocus.get(condition); return pair == null ? new LayoutAttractionPolicy.FocusOnce() : pair.getSecond(); }
|
getAttractionPolicy
|
290,744
|
void (Content content) { if (myLightWeightIds == null) { myLightWeightIds = new HashSet<>(); } myLightWeightIds.add(getOrCreateContentId(content)); }
|
setLightWeight
|
290,745
|
boolean () { return myGeneral.isTabLabelsHidden; }
|
isTabLabelsHidden
|
290,746
|
void (boolean tabLabelsHidden) { myGeneral.isTabLabelsHidden = tabLabelsHidden; }
|
setTabLabelsHidden
|
290,747
|
DockContainer (@Nullable DockableContent content) { RunnerContentUi.DockableGrid dockableGrid = (RunnerContentUi.DockableGrid)content; return new RunnerContentUi(dockableGrid.getRunnerUi(), dockableGrid.getOriginalRunnerUi(), dockableGrid.getWindow()); }
|
createContainer
|
290,748
|
void () { super.addNotify(); if (UIUtil.getParentOfType(JBRunnerTabs.class, this) != null) { processAddToUi(true); } }
|
addNotify
|
290,749
|
void () { super.removeNotify(); processRemoveFromUi(); }
|
removeNotify
|
290,750
|
void (boolean restoreProportions) { if (restoreProportions) { for (final GridCellImpl cell : myPlaceInGrid2Cell.values()) { cell.restoreProportions(); } } updateSelection(true); }
|
processAddToUi
|
290,751
|
void () { if (Disposer.isDisposed(this)) return; updateSelection(false); }
|
processRemoveFromUi
|
290,752
|
void (boolean isShowing) { for (GridCellImpl each : myPlaceInGrid2Cell.values()) { each.updateSelection(isShowing); } }
|
updateSelection
|
290,753
|
void (boolean horizontal) { for (final GridCellImpl cell : myPlaceInGrid2Cell.values()) { cell.setToolbarHorizontal(horizontal); } }
|
setToolbarHorizontal
|
290,754
|
void (boolean before) { for (final GridCellImpl cell : myPlaceInGrid2Cell.values()) { cell.setToolbarBefore(before); } }
|
setToolbarBefore
|
290,755
|
GridCellImpl (final Content content) { // check if the content is already in some cell GridCellImpl current = myContent2Cell.get(content); if (current != null) return current; // view may be shared between several contents with the same ID in different cells // (temporary contents like "Dump Stack" or "Console Result") View view = getStateFor(content); final GridCellImpl cell = myPlaceInGrid2Cell.get(view.getPlaceInGrid()); assert cell != null : "Unknown place in grid: " + view.getPlaceInGrid().name(); return cell; }
|
getCellFor
|
290,756
|
boolean () { var isHidden = myViewContext.getLayoutSettings().isTabLabelsHidden(); for (final GridCellImpl cell : myPlaceInGrid2Cell.values()) { if (isHidden) { cell.setHideTabs(cell.getContentCount() == 1); } else { cell.setHideTabs(myContents.size() == 1); } } final Content onlyContent = myContents.get(0); return onlyContent.getSearchComponent() != null; }
|
updateGridUI
|
290,757
|
boolean () { return myContent2Cell.isEmpty(); }
|
isEmpty
|
290,758
|
ActionCallback () { final ActionCallback result = new ActionCallback(myPlaceInGrid2Cell.values().size()); for (final GridCellImpl cell : myPlaceInGrid2Cell.values()) { cell.restoreLastUiState().notifyWhenDone(result); } return result; }
|
restoreLastUiState
|
290,759
|
void () { for (final GridCellImpl cell : myPlaceInGrid2Cell.values()) { cell.saveUiState(); } }
|
saveUiState
|
290,760
|
ActionCallback (final Content content, final boolean requestFocus) { return getCellFor(content).select(content, requestFocus); }
|
select
|
290,761
|
void (final Content content, final boolean activate) { GridCellImpl cell = getCellFor(content); cell.processAlert(content, activate); }
|
processAlert
|
290,762
|
void () { final List<Content> contents = getContents(); for (Content each : contents) { GridCellImpl cell = findCell(each); if (cell != null) { cell.rebuildPopupGroup(); } } }
|
rebuildTabPopup
|
290,763
|
boolean (Content content) { return getCellFor(content).isMinimized(content); }
|
isMinimized
|
290,764
|
Component (Container aContainer) { Component content = getContent(true); if (content != null) { return content; } return super.getDefaultComponent(aContainer); }
|
getDefaultComponent
|
290,765
|
Component (Container aContainer) { Component content = getContent(false); if (content != null) { return content; } return super.getLastComponent(aContainer); }
|
getLastComponent
|
290,766
|
Component (boolean first) { if (myContentProvider != null) { Content[] contents = myContentProvider.getContents(); if (contents != null && contents.length > 0) { Component preferred = contents[first ? 0 : contents.length - 1].getPreferredFocusableComponent(); if (preferred != null && preferred.isShowing() && accept(preferred)) { return preferred; } } } return null; }
|
getContent
|
290,767
|
ActionCallback () { if (myComponent != null) { setContent(myComponent); myComponent = null; } return ActionCallback.DONE; }
|
restoreInGrid
|
290,768
|
void () { }
|
dispose
|
290,769
|
List<Content> () { return new ArrayList<>(getContents()); }
|
getAttachedContents
|
290,770
|
List<Content> () { return myContents; }
|
getContents
|
290,771
|
void (final Content content, final CellTransform.Restore restore) { myViewContext.getCellTransform().minimize(content, new CellTransform.Restore() { @Override public ActionCallback restoreInGrid() { return restore.restoreInGrid(); } }); }
|
minimize
|
290,772
|
ActionCallback () { return restore.restoreInGrid(); }
|
restoreInGrid
|
290,773
|
RunnerLayoutUi (final @NotNull String runnerId, final @NotNull String runnerTitle, final @NotNull String sessionName, final @NotNull Disposable parent) { return new RunnerLayoutUiImpl(myProject, parent, runnerId, runnerTitle, sessionName); }
|
create
|
290,774
|
Tab () { return myTab; }
|
getTab
|
290,775
|
PlaceInGrid () { return myPlaceInGrid; }
|
getPlaceInGrid
|
290,776
|
boolean () { return myMinimizedInGrid; }
|
isMinimizedInGrid
|
290,777
|
void (final String ID) { myID = ID; }
|
setID
|
290,778
|
String () { return myID; }
|
getID
|
290,779
|
void (final boolean minimizedInGrid) { myMinimizedInGrid = minimizedInGrid; }
|
setMinimizedInGrid
|
290,780
|
void (PlaceInGrid placeInGrid) { myPlaceInGrid = placeInGrid; }
|
setPlaceInGrid
|
290,781
|
void (final Tab tab) { myTab = tab; }
|
assignTab
|
290,782
|
int () { return myTab != null ? myTab.getIndex() : myTabIndex; }
|
getTabIndex
|
290,783
|
void (final int tabIndex) { myTabIndex = tabIndex; }
|
setTabIndex
|
290,784
|
int () { return myWindow; }
|
getWindow
|
290,785
|
void (int windowNumber) { myWindow = windowNumber; }
|
setWindow
|
290,786
|
ViewImpl (RunnerLayout settings) { final TabImpl tab = myTabID == Integer.MAX_VALUE ? settings.createNewTab() : settings.getOrCreateTab(myTabID); return new ViewImpl(myID, tab, myPlaceInGrid, myMinimizedInGrid, 0); }
|
createView
|
290,787
|
int () { return myTabID; }
|
getTabID
|
290,788
|
PlaceInGrid () { return myPlaceInGrid; }
|
getPlaceInGrid
|
290,789
|
boolean () { return myMinimizedInGrid; }
|
isMinimizedInGrid
|
290,790
|
LayoutViewOptions (@NotNull ActionGroup actions, @NotNull String place) { myContentUI.setTopLeftActions(actions, place); return this; }
|
setTopLeftToolbar
|
290,791
|
LayoutViewOptions (@NotNull ActionGroup actions, @NotNull String place) { myContentUI.setTopMiddleActions(actions, place); return this; }
|
setTopMiddleToolbar
|
290,792
|
LayoutViewOptions (@NotNull ActionGroup actions, @NotNull String place) { myContentUI.setTopRightActions(actions, place); return this; }
|
setTopRightToolbar
|
290,793
|
LayoutStateDefaults (int id, String text, Icon icon) { getLayout().setDefault(id, text, icon); return this; }
|
initTabDefaults
|
290,794
|
LayoutStateDefaults (@NotNull String contentId, @NotNull String condition, @NotNull LayoutAttractionPolicy policy) { getLayout().setDefaultToFocus(contentId, condition, policy); return this; }
|
initContentAttraction
|
290,795
|
LayoutStateDefaults (@NotNull String condition) { getLayout().cancelDefaultFocusBy(condition); return this; }
|
cancelContentAttraction
|
290,796
|
Content (@NotNull Content content) { return addContent(content, false, -1, PlaceInGrid.center, false); }
|
addContent
|
290,797
|
Content (@NotNull Content content, int defaultTabId, @NotNull PlaceInGrid defaultPlace, boolean defaultIsMinimized) { return addContent(content, true, defaultTabId, defaultPlace, defaultIsMinimized); }
|
addContent
|
290,798
|
Content (@NotNull Content content, boolean applyDefaults, int defaultTabId, @NotNull PlaceInGrid defaultPlace, boolean defaultIsMinimized) { final String id = content.getUserData(CONTENT_TYPE); assert id != null : "Content id is missing, use RunnerLayoutUi to create content instances"; if (applyDefaults) { getLayout().setDefault(id, defaultTabId, defaultPlace, defaultIsMinimized); } getContentManager().addContent(content); return content; }
|
addContent
|
290,799
|
Content (@NotNull String id, @NotNull JComponent component, @NotNull String displayName, @Nullable Icon icon, @Nullable JComponent focusable) { return createContent(id, new ComponentWithActions.Impl(component), displayName, icon, focusable); }
|
createContent
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.