Unnamed: 0
int64
0
305k
body
stringlengths
7
52.9k
name
stringlengths
1
185
45,500
void (CompileContext context, ModuleChunk chunk) { FORMS_REBUILD_FORCED.set(context, null); // clear the flag on per-chunk basis super.chunkBuildFinished(context, chunk); }
chunkBuildFinished
45,501
void (CompileContext context) { final boolean previousValue = FORCE_FORMS_REBUILD_FLAG.get(context, Boolean.FALSE); final JpsUiDesignerConfiguration config = JpsUiDesignerExtensionService.getInstance().getUiDesignerConfiguration(context.getProjectDescriptor().getProject()); final boolean currentRebuildValue = config !=...
buildFinished
45,502
File (CompileContext context) { return new File(context.getProjectDescriptor().dataManager.getDataPaths().getDataStorageRoot(), "forms_rebuild_required"); }
getMarkerFile
45,503
List<String> () { return Collections.singletonList(FORM_EXTENSION); }
getCompilableFileExtensions
45,504
boolean (Set<File> files) { for (File file : files) { try { if (FormsParsing.readBoundClassName(file) != null) { return true; } } catch (IOException | AlienFormFileException ignore) { } } return false; }
containsValidForm
45,505
String (@NotNull JavaSourceRootDescriptor rd, @NotNull String className) { String clsName = className; String prefix = rd.getPackagePrefix(); if (!StringUtil.isEmpty(prefix)) { if (!StringUtil.endsWith(prefix, ".")) { prefix += "."; } if (SystemInfo.isFileSystemCaseSensitive? StringUtil.startsWith(clsName, prefix) : St...
suggestRelativePath
45,506
JpsUiDesignerExtensionService () { return JpsServiceManager.getInstance().getService(JpsUiDesignerExtensionService.class); }
getInstance
45,507
UiDesignerConfigurationState () { return myState; }
getState
45,508
JpsUiDesignerConfigurationImpl () { return new JpsUiDesignerConfigurationImpl(myState); }
createCopy
45,509
boolean () { return myState.COPY_FORMS_RUNTIME_TO_OUTPUT; }
isCopyFormsRuntimeToOutput
45,510
void (boolean value) { if (myState.COPY_FORMS_RUNTIME_TO_OUTPUT != value) { myState.COPY_FORMS_RUNTIME_TO_OUTPUT = value; fireElementChanged(); } }
setCopyFormsRuntimeToOutput
45,511
boolean () { return myState.INSTRUMENT_CLASSES; }
isInstrumentClasses
45,512
void (boolean value) { if (myState.INSTRUMENT_CLASSES != value) { myState.INSTRUMENT_CLASSES = value; fireElementChanged(); } }
setInstrumentClasses
45,513
void (boolean value) { myState.USE_DYNAMIC_BUNDLES = value; }
setUseDynamicBundles
45,514
boolean () { return myState.USE_DYNAMIC_BUNDLES; }
isUseDynamicBundles
45,515
void (@NotNull JpsUiDesignerConfigurationImpl modified) { setCopyFormsRuntimeToOutput(modified.isCopyFormsRuntimeToOutput()); setInstrumentClasses(modified.isInstrumentClasses()); setUseDynamicBundles(modified.isUseDynamicBundles()); }
applyChanges
45,516
JpsUiDesignerConfiguration (@NotNull JpsProject project) { return project.getContainer().getChild(JpsUiDesignerConfigurationImpl.ROLE); }
getUiDesignerConfiguration
45,517
JpsUiDesignerConfiguration (@NotNull JpsProject project) { JpsUiDesignerConfiguration config = project.getContainer().getChild(JpsUiDesignerConfigurationImpl.ROLE); if (config == null) { config = new JpsUiDesignerConfigurationImpl(); setUiDesignerConfiguration(project, config); } return config; }
getOrCreateUiDesignerConfiguration
45,518
void (@NotNull JpsProject project, @NotNull JpsUiDesignerConfiguration configuration) { project.getContainer().setChild(JpsUiDesignerConfigurationImpl.ROLE, configuration); }
setUiDesignerConfiguration
45,519
void (@NotNull JpsProject element, @NotNull Element componentTag) { JpsUiDesignerConfigurationImpl.UiDesignerConfigurationState state = XmlSerializer.deserialize(componentTag, JpsUiDesignerConfigurationImpl.UiDesignerConfigurationState.class); JpsUiDesignerExtensionService.getInstance().setUiDesignerConfiguration(eleme...
loadExtension
45,520
void (@NotNull JpsProject project) { final JpsUiDesignerConfigurationImpl.UiDesignerConfigurationState defaultState = new JpsUiDesignerConfigurationImpl.UiDesignerConfigurationState(); JpsUiDesignerExtensionService.getInstance().setUiDesignerConfiguration(project, new JpsUiDesignerConfigurationImpl(defaultState)); }
loadExtensionWithDefaultSettings
45,521
void () { doTest().assertSuccessful(); }
testSimple
45,522
void () { JpsModule m = addModule("m", copyToProject(SIMPLE_FORM_PATH, "src")); buildAllModules().assertSuccessful(); assertTrue(isRuntimeClassesCopied(m)); assertInstrumented(m, "xxx/MyForm.class"); buildAllModules().assertUpToDate(); }
testSimple
45,523
void () { JpsModule m = addModule("m", copyToProject(SIMPLE_FORM_PATH, "src")); JpsUiDesignerExtensionService.getInstance().getOrCreateUiDesignerConfiguration(myProject).setInstrumentClasses(false); buildAllModules().assertSuccessful(); assertNotInstrumented(m, "xxx/MyForm.class"); buildAllModules().assertUpToDate(); J...
testEnableInstrumenting
45,524
void () { JpsModule m = addModule("m", copyToProject(SIMPLE_FORM_PATH, "src")); buildAllModules().assertSuccessful(); assertInstrumented(m, "xxx/MyForm.class"); JpsUiDesignerExtensionService.getInstance().getOrCreateUiDesignerConfiguration(myProject).setInstrumentClasses(false); rebuildAllModules();//todo perhaps we sh...
testDisableInstrumenting
45,525
void () { JpsModule m = addModule("m", copyToProject(SIMPLE_FORM_PATH, "src")); buildAllModules().assertSuccessful(); assertInstrumented(m, "xxx/MyForm.class"); change(getAbsolutePath("src/xxx/MyForm.java")); buildAllModules().assertSuccessful(); assertCompiled(JavaBuilder.BUILDER_ID, "src/xxx/MyForm.java"); assertComp...
testRecompileFormForChangedClass
45,526
void () { JpsModule m = addModule("m", copyToProject(SIMPLE_FORM_PATH, "src")); buildAllModules().assertSuccessful(); assertInstrumented(m, "xxx/MyForm.class"); change(getAbsolutePath("src/xxx/Constants.java"), "package xxx;\n" + "\n" + "public class Constants {\n" + " public static int CONST = 10;\n" + "}"); buildAllM...
testRecompileFormForChangedClassOnSecondCompilationRound
45,527
void () { JpsModule module = addModule("m", copyToProject("plugins/ui-designer/jps-plugin/testData/build/alienFormFile", "src")); buildAllModules().assertSuccessful(); assertFalse(isRuntimeClassesCopied(module)); }
testDoNotCopyRuntimeClassesIfOnlyAlienFormFilesExist
45,528
boolean (JpsModule module) { File outputDir = JpsPathUtil.urlToFile(JpsJavaExtensionService.getInstance().getOutputUrl(module, false)); return new File(outputDir, AbstractLayout.class.getName().replace('.', '/') + ".class").exists(); }
isRuntimeClassesCopied
45,529
void (JpsModule m, final String classPath) { assertFalse(isInstrumented(m, classPath)); }
assertNotInstrumented
45,530
void (JpsModule m, final String classPath) { assertTrue(isInstrumented(m, classPath)); }
assertInstrumented
45,531
boolean (JpsModule m, final String classPath) { File file = new File(JpsJavaExtensionService.getInstance().getOutputDirectory(m, false), classPath); assertTrue(file.getAbsolutePath() + " not found", file.exists()); final Ref<Boolean> instrumented = Ref.create(false); ClassVisitor visitor = new ClassVisitor(Opcodes.API_...
isInstrumented
45,532
MethodVisitor (int access, String name, String desc, String signature, String[] exceptions) { if (name.equals("$$$setupUI$$$")) { instrumented.set(true); } return null; }
visitMethod
45,533
void () { loadProject("plugins/ui-designer/jps-plugin/testData/uiDesigner"); JpsUiDesignerConfiguration configuration = JpsUiDesignerExtensionService.getInstance().getUiDesignerConfiguration(myProject); assertNotNull(configuration); assertTrue(configuration.isInstrumentClasses()); assertFalse(configuration.isCopyFormsR...
testLoad
45,534
Dimension () { return getPreferredSize(); }
getPreferredScrollableViewportSize
45,535
int (Rectangle visibleRect, int orientation, int direction) { return 20; }
getScrollableUnitIncrement
45,536
int (Rectangle visibleRect, int orientation, int direction) { return 100; }
getScrollableBlockIncrement
45,537
boolean () { return true; }
getScrollableTracksViewportWidth
45,538
boolean () { return false; }
getScrollableTracksViewportHeight
45,539
void (String name, Component comp) { }
addLayoutComponent
45,540
void (Container parent) { int width = parent.getWidth(); int height = 0; for(Component c: parent.getComponents()) { if (c instanceof PaletteGroupHeader groupHeader) { groupHeader.setLocation(0, height); if (groupHeader.isVisible()) { groupHeader.setSize(width, groupHeader.getPreferredSize().height); height += groupHead...
layoutContainer
45,541
Dimension (Container parent) { return JBUI.emptySize(); }
minimumLayoutSize
45,542
Dimension (Container parent) { int height = 0; int width = parent.getWidth(); for(Component c: parent.getComponents()) { if (c instanceof PaletteGroupHeader groupHeader) { height += groupHeader.getHeight(); if (groupHeader.isSelected()) { height += groupHeader.getComponentList().getPreferredHeight(width); } } } return ...
preferredLayoutSize
45,543
void (Component comp) { }
removeLayoutComponent
45,544
int () { return myGroup.getItems().length; }
getSize
45,545
Object (int index) { return myGroup.getItems() [index]; }
getElementAt
45,546
void (final Component comp, final int x, final int y) { requestFocusInWindow(); SwingUtilities.invokeLater(() -> { int index = locationToIndex(new Point(x, y)); PaletteItem[] items = myGroup.getItems(); if (index >= 0 && index < items.length) { if (getSelectedIndex() != index) { addSelectionInterval(index, index); } Pa...
invokePopup
45,547
void (MouseEvent e) { setHoverIndex(locationToIndex(e.getPoint())); }
mouseMoved
45,548
void (KeyEvent e) { myPalette.notifyKeyEvent(e); }
keyPressed
45,549
void (KeyEvent e) { myPalette.notifyKeyEvent(e); }
keyReleased
45,550
void (KeyEvent e) { myPalette.notifyKeyEvent(e); }
keyTyped
45,551
void (final int index) { if (index != myHoverIndex) { if (myHoverIndex >= 0) repaint(getCellBounds(myHoverIndex, myHoverIndex)); myHoverIndex = index; if (myHoverIndex >= 0) repaint(getCellBounds(myHoverIndex, myHoverIndex)); } }
setHoverIndex
45,552
void () { @NonNls ActionMap map = getActionMap(); map.put(ListActions.Up.ID, new MoveFocusAction(map.get(ListActions.Up.ID), false)); map.put(ListActions.Down.ID, new MoveFocusAction(map.get(ListActions.Down.ID), true)); map.put(ListActions.Left.ID, new MoveFocusAction(new ChangeColumnAction(map.get(ListActions.Left.ID...
initActions
45,553
int () { return (myTempWidth == null) ? super.getWidth () : myTempWidth.intValue (); }
getWidth
45,554
int (final int width) { myTempWidth = width; try { return getUI().getPreferredSize(this).height; } finally { myTempWidth = null; } }
getPreferredHeight
45,555
void (PaletteGroupHeader paletteGroup, int indexToSelect) { if (indexToSelect == -1) { //this is not 'our' CategoryButton so we'll assume it's the one below this category list indexToSelect = getModel().getSize() - 1; } else if (getModel().getSize() == 0) { indexToSelect = -1; } IdeFocusManager.getGlobalInstance().doWh...
takeFocusFrom
45,556
void () { if (myListener != null) { removeMouseListener(myListener); } super.uninstallListeners(); }
uninstallListeners
45,557
void (@NotNull JList list, Object value, int index, boolean selected, boolean hasFocus) { PaletteItem paletteItem = (PaletteItem) value; clear(); paletteItem.customizeCellRenderer(this, selected, hasFocus); }
customizeCellRenderer
45,558
void (ActionEvent e) { int selIndexBefore = getSelectedIndex(); defaultAction.actionPerformed(e); int selIndexCurrent = getSelectedIndex(); if (selIndexBefore != selIndexCurrent) return; if (focusNext && 0 == selIndexCurrent) return; KeyboardFocusManager kfm = KeyboardFocusManager.getCurrentKeyboardFocusManager(); Cont...
actionPerformed
45,559
void (ActionEvent e) { int selIndexBefore = getSelectedIndex(); defaultAction.actionPerformed(e); int selIndexCurrent = getSelectedIndex(); if ((selectNext && selIndexBefore < selIndexCurrent) || (!selectNext && selIndexBefore > selIndexCurrent)) return; if (selectNext) { if (selIndexCurrent == selIndexBefore + 1) selI...
actionPerformed
45,560
boolean (DnDEvent aEvent) { setHoverIndex(-1); if (aEvent.getAttachedObject() instanceof PaletteItem) { setDropTargetIndex(locationToTargetIndex(aEvent.getPoint())); aEvent.setDropPossible(true); } else { setDropTargetIndex(-1); aEvent.setDropPossible(false); } return false; }
update
45,561
void (DnDEvent aEvent) { setDropTargetIndex(-1); if (aEvent.getAttachedObject() instanceof PaletteItem) { int index = locationToTargetIndex(aEvent.getPoint()); if (index >= 0) { myGroup.handleDrop(myProject, (PaletteItem) aEvent.getAttachedObject(), index); } } }
drop
45,562
void () { setDropTargetIndex(-1); }
cleanUpOnLeave
45,563
int (Point location) { int row = locationToIndex(location); if (row < 0) { return -1; } Rectangle rc = getCellBounds(row, row); return location.y < rc.getCenterY() ? row : row + 1; }
locationToTargetIndex
45,564
boolean (DnDAction action, @NotNull Point dragOrigin) { int index = locationToIndex(dragOrigin); return index >= 0 && myGroup.getItems() [index].startDragging() != null; }
canStartDragging
45,565
DnDDragStartBean (DnDAction action, @NotNull Point dragOrigin) { int index = locationToIndex(dragOrigin); if (index < 0) return null; return myGroup.getItems() [index].startDragging(); }
startDragging
45,566
void (final int gestureModifiers) { myPalette.notifyDropActionChanged(gestureModifiers); }
dropActionChanged
45,567
void (DragSourceDropEvent event) { Component component = event.getDragSourceContext().getComponent(); if (!event.getDropSuccess() && component instanceof PaletteComponentList && getRootPane() == ((JComponent)component).getRootPane()) { clearActiveItem(); } }
dragDropEnd
45,568
void () { removePaletteProviderListener(); if (!ApplicationManager.getApplication().isHeadlessEnvironment()) { DragSource.getDefaultDragSource().removeDragSourceListener(myDragSourceListener); } }
dispose
45,569
void () { for (PaletteItemProvider provider : myProviders) { provider.addListener(myPropertyChangeListener); } }
addPaletteProviderListener
45,570
void () { for (PaletteItemProvider provider : myProviders) { provider.removeListener(myPropertyChangeListener); } }
removePaletteProviderListener
45,571
void (@Nullable GuiEditor designer) { removePaletteProviderListener(); myDesigner = designer; if (designer != null) { addPaletteProviderListener(); } VirtualFile file = designer == null ? null : designer.getFile(); Set<PaletteGroup> currentGroups = new HashSet<>(collectCurrentGroups(file)); if (!currentGroups.equals(my...
refreshPaletteIfChanged
45,572
void (@Nullable VirtualFile selectedFile) { for (PaletteGroupHeader groupHeader : myGroupHeaders) { groupHeader.getComponentList().removeListSelectionListener(myListSelectionListener); } String[] oldTabNames = collectTabNames(myGroups); myTabbedPane.removeAll(); myGroupHeaders.clear(); myGroups.clear(); final ArrayList...
refreshPalette
45,573
void (PaletteGroup group, JComponent control) { PaletteGroupHeader groupHeader = new PaletteGroupHeader(this, group); myGroupHeaders.add(groupHeader); myGroups.add(group); control.add(groupHeader); PaletteComponentList componentList = new PaletteComponentList(myProject, this, group); control.add(componentList); groupHe...
addGroupToControl
45,574
String[] (final Collection<PaletteGroup> groups) { Set<String> result = new TreeSet<>(); for (PaletteGroup group : groups) { result.add(group.getTabName()); } return ArrayUtilRt.toStringArray(result); }
collectTabNames
45,575
ArrayList<PaletteGroup> (@Nullable VirtualFile selectedFile) { ArrayList<PaletteGroup> result = new ArrayList<>(); if (selectedFile != null) { for (PaletteItemProvider provider : myProviders) { PaletteGroup[] groups = provider.getActiveGroups(selectedFile); Collections.addAll(result, groups); } } return result; }
collectCurrentGroups
45,576
void () { if (getActiveItem() == null) return; for (PaletteGroupHeader group : myGroupHeaders) { group.getComponentList().clearSelection(); } ListSelectionEvent event = new ListSelectionEvent(this, -1, -1, false); notifySelectionChanged(event); }
clearActiveItem
45,577
PaletteItem () { for (PaletteGroupHeader groupHeader : myGroupHeaders) { if (groupHeader.isSelected() && groupHeader.getComponentList().getSelectedValue() != null) { return (PaletteItem)groupHeader.getComponentList().getSelectedValue(); } } return null; }
getActiveItem
45,578
Object (@NotNull String dataId) { if (PlatformCoreDataKeys.HELP_ID.is(dataId)) { return ourHelpID; } if (CommonDataKeys.PROJECT.is(dataId)) { return myProject; } if (PlatformCoreDataKeys.BGT_DATA_PROVIDER.is(dataId)) { PaletteItem item = getActiveItem(); PaletteGroup group = getActiveGroup(); DataProvider provider1 = i...
getData
45,579
Project () { return myProject; }
getProject
45,580
void (ListSelectionEvent e) { PaletteComponentList sourceList = (PaletteComponentList)e.getSource(); for (int i = e.getFirstIndex(); i <= e.getLastIndex(); i++) { if (sourceList.isSelectedIndex(i)) { // selection is being added for (PaletteGroupHeader group : myGroupHeaders) { if (group.getComponentList() != sourceList...
valueChanged
45,581
void (PropertyChangeEvent evt) { refreshPalette(myDesigner.getFile()); }
propertyChange
45,582
void (Component comp, int x, int y) { JScrollPane scrollPane = (JScrollPane)comp; PaletteContentWindow contentWindow = (PaletteContentWindow)scrollPane.getViewport().getView(); if (contentWindow != null) { PaletteGroupHeader groupHeader = contentWindow.getLastGroupHeader(); if (groupHeader != null) { groupHeader.showGr...
invokePopup
45,583
void (@NotNull AnActionEvent e) { clearActiveItem(); }
actionPerformed
45,584
PaletteWindow (GuiEditor designer) { PaletteToolWindowManager manager = getInstance(designer.getProject()); if (manager.isEditorMode()) { return (PaletteWindow)manager.getContent(designer); } if (manager.myToolWindowPanel == null) { manager.initToolWindow(); } return manager.myToolWindowPanel; }
getInstance
45,585
PaletteToolWindowManager (Project project) { return project.getService(PaletteToolWindowManager.class); }
getInstance
45,586
void () { myToolWindowPanel = new PaletteWindow(myProject); Disposer.register(this, () -> myToolWindowPanel.dispose()); myToolWindow = ToolWindowManager.getInstance(myProject) .registerToolWindow(IdeBundle.message("toolwindow.palette"), false, getAnchor(), this, true); myToolWindow.setIcon(AllIcons.Toolwindows.ToolWind...
initToolWindow
45,587
void (@Nullable DesignerEditorPanelFacade designer) { myToolWindowPanel.refreshPaletteIfChanged((GuiEditor)designer); if (designer == null) { myToolWindow.setAvailable(false); } else { myToolWindow.setAvailable(true); myToolWindow.show(null); } }
updateToolWindow
45,588
ToolWindowAnchor () { return ToolWindowAnchor.RIGHT; }
getAnchor
45,589
LightToolWindow (@NotNull DesignerEditorPanelFacade designer) { PaletteWindow palettePanel = new PaletteWindow(myProject); palettePanel.refreshPaletteIfChanged((GuiEditor)designer); return createContent(designer, palettePanel, IdeBundle.message("toolwindow.palette"), AllIcons.Toolwindows.ToolWindowPalette, palettePanel...
createContent
45,590
String () { return "PaletteManager"; }
getComponentName
45,591
void (ActionEvent e) { if (myComponentList != null) { myComponentList.setVisible(isSelected()); } }
actionPerformed
45,592
void (Component comp, int x, int y) { myPaletteWindow.setLastFocusedGroup(PaletteGroupHeader.this); showGroupPopupMenu(comp, x, y); }
invokePopup
45,593
boolean (DnDEvent aEvent) { setBorderPainted(true); aEvent.setDropPossible(aEvent.getAttachedObject() instanceof PaletteItem); return true; }
update
45,594
void (DnDEvent aEvent) { setBorderPainted(false); if (aEvent.getAttachedObject() instanceof PaletteItem) { myGroup.handleDrop(myPaletteWindow.getProject(), (PaletteItem) aEvent.getAttachedObject(), -1); } }
drop
45,595
void () { setBorderPainted(false); }
cleanUpOnLeave
45,596
void (final Component comp, final int x, final int y) { ActionGroup group = myGroup.getPopupActionGroup(); if (group != null) { ActionPopupMenu popupMenu = ActionManager.getInstance().createActionPopupMenu("PaletteGroupHeader", group); popupMenu.getComponent().show(comp, x, y); } }
showGroupPopupMenu
45,597
void () { @NonNls InputMap inputMap = getInputMap(WHEN_FOCUSED); inputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_DOWN, 0, false), "moveFocusDown"); inputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_UP, 0, false), "moveFocusUp"); inputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_LEFT, 0, false), "collapse"); inputMap.put(Ke...
initActions
45,598
void (final PaletteComponentList componentList) { myComponentList = componentList; }
setComponentList
45,599
PaletteComponentList () { return myComponentList; }
getComponentList