Unnamed: 0
int64
0
305k
body
stringlengths
7
52.9k
name
stringlengths
1
185
45,600
PaletteGroup () { return myGroup; }
getGroup
45,601
void (ActionEvent e) { KeyboardFocusManager kfm = KeyboardFocusManager.getCurrentKeyboardFocusManager(); Container container = kfm.getCurrentFocusCycleRoot(); IdeFocusManager.getGlobalInstance().doWhenFocusSettlesDown(() -> { FocusTraversalPolicy policy = container.getFocusTraversalPolicy(); if (null == policy) policy ...
actionPerformed
45,602
void (ActionEvent e) { if (expand == isSelected()) return; setSelected(expand); if (myComponentList != null) { myComponentList.setVisible(isSelected()); } }
actionPerformed
45,603
String () { return UIDesignerBundle.message("title.gui.designer"); }
getDisplayName
45,604
String () { return "project.propGUI"; }
getHelpTopic
45,605
JComponent () { if (myGeneralUI == null) { myGeneralUI = new MyGeneralUI(); } return myGeneralUI.myPanel; }
createComponent
45,606
boolean () { final GuiDesignerConfiguration configuration = GuiDesignerConfiguration.getInstance(myProject); if (myGeneralUI == null) { return false; } if (myGeneralUI.myChkCopyFormsRuntime.isSelected() != configuration.COPY_FORMS_RUNTIME_TO_OUTPUT) { return true; } if (myGeneralUI.myChkUseDynamicBundles.isSelected() !...
isModified
45,607
void () { final GuiDesignerConfiguration configuration = GuiDesignerConfiguration.getInstance(myProject); configuration.COPY_FORMS_RUNTIME_TO_OUTPUT = myGeneralUI.myChkCopyFormsRuntime.isSelected(); configuration.DEFAULT_LAYOUT_MANAGER = (String)myGeneralUI.myLayoutManagerCombo.getSelectedItem(); configuration.INSTRUME...
apply
45,608
void () { final GuiDesignerConfiguration configuration = GuiDesignerConfiguration.getInstance(myProject); /*general*/ if (configuration.INSTRUMENT_CLASSES) { myGeneralUI.myRbInstrumentClasses.setSelected(true); } else { myGeneralUI.myRbInstrumentSources.setSelected(true); } myGeneralUI.myChkCopyFormsRuntime.setSelected...
reset
45,609
void () { myGeneralUI = null; }
disposeUIResources
45,610
void () { final PsiShortNamesCache cache = PsiShortNamesCache.getInstance(myProject); final PsiMethod[] methods = cache.getMethodsByName(AsmCodeGenerator.SETUP_METHOD_NAME, GlobalSearchScope.projectScope(myProject)); CodeInsightUtil.preparePsiElementsForWrite(methods); for (int i = 0; i < methods.length; i++) { final P...
vanishGeneratedSources
45,611
void () { CommandProcessor.getInstance().executeCommand(myProject, () -> { PsiDocumentManager.getInstance(myProject).commitAllDocuments(); vanishGeneratedSources(); }, "", null); }
applyImpl
45,612
void () { ProgressManager.getInstance().runProcess(() -> applyImpl(), myProgressWindow); }
run
45,613
String () { return getHelpTopic(); }
getId
45,614
RadContainer () { return myContainer; }
getContainer
45,615
boolean () { return myIsRow; }
isRow
45,616
int[] () { return mySelection; }
getSelection
45,617
int () { return myFocusedIndex; }
getFocusedIndex
45,618
DataFlavor[] () { try { return new DataFlavor[]{ myDataFlavor }; } catch(Exception ex) { LOG.error(ex); return new DataFlavor[0]; } }
getTransferDataFlavors
45,619
boolean (final DataFlavor flavor) { try { return flavor.equals(myDataFlavor); } catch(Exception ex) { LOG.error(ex); return false; } }
isDataFlavorSupported
45,620
void (@NotNull GuiEditor editor, final IRootContainer rootContainer, @Nullable final ProgressIndicator progress) { analyzeErrors(editor.getModule(), editor.getFile(), editor, rootContainer, progress); }
analyzeErrors
45,621
void (@NotNull final Module module, @NotNull final VirtualFile formFile, @Nullable final GuiEditor editor, @NotNull final IRootContainer rootContainer, @Nullable final ProgressIndicator progress) { if (module.isDisposed()) { return; } // 1. Validate class to bind final String classToBind = rootContainer.getClassToBind(...
analyzeErrors
45,622
boolean (final IComponent component) { if (progress != null && progress.isCanceled()) return false; // Reset previous error (if any) component.putClientProperty(CLIENT_PROP_BINDING_ERROR, null); final String binding = component.getBinding(); // a. Check that field exists and field is not static if (psiClass != null && ...
visit
45,623
boolean (final IComponent component) { if (progress != null && progress.isCanceled()) return false; // Clear previous error (if any) component.putClientProperty(CLIENT_PROP_ERROR_ARRAY, null); if (!(component instanceof IContainer container)) { return true; } if (container instanceof IRootContainer rootContainer) { if ...
visit
45,624
boolean (@NotNull IRootContainer rootContainer, @NotNull FormInspectionTool formInspectionTool, String componentId) { String shortName = formInspectionTool.getShortName(); if (rootContainer.isInspectionSuppressed(shortName, componentId)) return true; if (formInspectionTool instanceof LocalInspectionTool) { String alter...
isSuppressed
45,625
boolean (final IComponent component, final String fieldName, final String fieldClassName, final PsiClass psiClass, final GuiEditor editor, final Module module) { final PsiField[] fields = psiClass.getFields(); PsiField field = null; for(int i = fields.length - 1; i >=0 ; i--){ if(fieldName.equals(fields[i].getName())){...
validateFieldInClass
45,626
void (final IComponent component, final ErrorInfo errorInfo) { ArrayList<ErrorInfo> errorList = getErrorInfos(component); if (errorList == null) { errorList = new ArrayList<>(); component.putClientProperty(CLIENT_PROP_ERROR_ARRAY, errorList); } errorList.add(errorInfo); }
putError
45,627
ErrorInfo (@NotNull final IComponent component) { // Check bind to class errors { final ErrorInfo errorInfo = (ErrorInfo)component.getClientProperty(CLIENT_PROP_CLASS_TO_BIND_ERROR); if(errorInfo != null){ return errorInfo; } } // Check binding errors { final ErrorInfo error = (ErrorInfo)component.getClientProperty(CLI...
getErrorForComponent
45,628
ArrayList<ErrorInfo> (final IComponent component) { //noinspection unchecked return (ArrayList<ErrorInfo>)component.getClientProperty(CLIENT_PROP_ERROR_ARRAY); }
getErrorInfos
45,629
HighlightDisplayLevel (final Project project, @NotNull final RadComponent component) { HighlightDisplayLevel displayLevel = null; for(ErrorInfo errInfo: getAllErrorsForComponent(component)) { if (displayLevel == null || SeverityRegistrar.getSeverityRegistrar(project).compare(errInfo.getHighlightDisplayLevel().getSeveri...
getHighlightDisplayLevel
45,630
ActionUpdateThread () { return ActionUpdateThread.EDT; }
getActionUpdateThread
45,631
boolean (@NotNull final DataContext dataContext) { return FormEditingUtil.getSelectedComponents(myEditor).size() > 0 && !myEditor.getInplaceEditingLayer().isEditing(); }
isCopyEnabled
45,632
boolean (@NotNull DataContext dataContext) { return true; }
isCopyVisible
45,633
void (@NotNull final DataContext dataContext) { doCopy(); }
performCopy
45,634
boolean () { final ArrayList<RadComponent> selectedComponents = FormEditingUtil.getSelectedComponents(myEditor); final SerializedComponentData data = new SerializedComponentData(serializeForCopy(myEditor, selectedComponents)); final SimpleTransferable transferable = new SimpleTransferable<>(data, SerializedComponentDat...
doCopy
45,635
boolean (@NotNull final DataContext dataContext) { return isCopyEnabled(dataContext) && FormEditingUtil.canDeleteSelection(myEditor); }
isCutEnabled
45,636
boolean (@NotNull DataContext dataContext) { return true; }
isCutVisible
45,637
void (@NotNull final DataContext dataContext) { if (doCopy() && myEditor.ensureEditable()) { CommandProcessor.getInstance().executeCommand(myEditor.getProject(), () -> FormEditingUtil.deleteSelection(myEditor), UIDesignerBundle.message("command.cut"), null); } }
performCut
45,638
boolean (@NotNull final DataContext dataContext) { return isPasteEnabled(dataContext); }
isPastePossible
45,639
boolean (@NotNull final DataContext dataContext) { return getSerializedComponents() != null && !myEditor.getInplaceEditingLayer().isEditing(); }
isPasteEnabled
45,640
void (@NotNull final DataContext dataContext) { final String serializedComponents = getSerializedComponents(); if (serializedComponents == null) { return; } final ArrayList<RadComponent> componentsToPaste = new ArrayList<>(); final IntList xs=new IntArrayList(); final IntList ys=new IntArrayList(); loadComponentsToPast...
performPaste
45,641
ArrayList<RadComponent> (final GuiEditor editor, final String serializedComponents) { ArrayList<RadComponent> components = new ArrayList<>(); IntList xs=new IntArrayList(); IntList ys=new IntArrayList(); if (!loadComponentsToPaste(editor, serializedComponents, xs, ys, components)) { return null; } return components; }
deserializeComponents
45,642
boolean (final GuiEditor editor, final String serializedComponents, final IntList xs, final IntList ys, final ArrayList<? super RadComponent> componentsToPaste) { final PsiPropertiesProvider provider = new PsiPropertiesProvider(editor.getModule()); try { //noinspection HardCodedStringLiteral final Document document = S...
loadComponentsToPaste
45,643
boolean (final LwComponent c) { if (c.getBinding() != null && FormEditingUtil.findComponentWithBinding(editor.getRootContainer(), c.getBinding()) != null) { c.setBinding(null); } c.setId(FormEditingUtil.generateId(editor.getRootContainer())); return true; }
visit
45,644
String () { try { final Object transferData = CopyPasteManager.getInstance().getContents(ourDataFlavor); if (!(transferData instanceof SerializedComponentData dataProxy)) { return null; } return dataProxy.getSerializedComponents(); } catch (Exception e) { return null; } }
getSerializedComponents
45,645
List<RadComponent> (GuiEditor editor, List<RadComponent> components) { return deserializeComponents(editor, serializeForCopy(editor, components)); }
copyComponents
45,646
String (final GuiEditor editor, final List<RadComponent> components) { final XmlWriter writer = new XmlWriter(); writer.startElement(ELEMENT_SERIALIZED, Utils.FORM_NAMESPACE); for (final RadComponent component : components) { final Point shift; if (component.getParent() != null) { shift = SwingUtilities.convertPoint( c...
serializeForCopy
45,647
void (@NotNull ModuleRootEvent event) { synchronized(myPropertiesFileCache) { myPropertiesFileCache.clear(); } }
rootsChanged
45,648
StringDescriptorManager (Module module) { StringDescriptorManager service = module.getService(StringDescriptorManager.class); if (service != null) { service.myModule = module; } return service; }
getInstance
45,649
IProperty (@NotNull StringDescriptor descriptor, @Nullable Locale locale) { String propFileName = descriptor.getDottedBundleName(); Pair<Locale, String> cacheKey = Pair.create(locale, propFileName); PropertiesFile propertiesFile; synchronized (myPropertiesFileCache) { propertiesFile = myPropertiesFileCache.get(cacheKey...
resolveToProperty
45,650
String () { return myPropertyName; }
getPropertyName
45,651
HighlightDisplayLevel () { return myHighlightDisplayLevel; }
getHighlightDisplayLevel
45,652
String () { return myInspectionId; }
getInspectionId
45,653
void (final String inspectionId) { myInspectionId = inspectionId; }
setInspectionId
45,654
RadComponent () { return myComponent; }
getComponent
45,655
void () { if (myRootContainer != editor.getRootContainer()) { deinstall(myRootContainer); myRootContainer = editor.getRootContainer(); install(myRootContainer); } }
hierarchyChanged
45,656
void () { install(myRootContainer); myEditor.addHierarchyChangeListener(myHierarchyChangeListener); }
setupListeners
45,657
void () { deinstall(myRootContainer); myEditor.removeHierarchyChangeListener(myHierarchyChangeListener); }
dispose
45,658
void (@NotNull final RadComponent component) { component.addPropertyChangeListener(myChangeListener); if(component instanceof RadContainer container){ for(int i = container.getComponentCount() - 1; i>= 0; i--){ install(container.getComponent(i)); } } }
install
45,659
void (@NotNull final RadComponent component) { component.removePropertyChangeListener(myChangeListener); if(component instanceof RadContainer container){ for(int i = container.getComponentCount() - 1; i>= 0; i--){ deinstall(container.getComponent(i)); } } }
deinstall
45,660
void (final PropertyChangeEvent e) { if(RadComponent.PROP_SELECTED.equals(e.getPropertyName())){ final Boolean selected = (Boolean)e.getNewValue(); selectionChanged((RadComponent)e.getSource(), selected.booleanValue()); } else if(RadContainer.PROP_CHILDREN.equals(e.getPropertyName())){ final RadComponent[] oldChildren ...
propertyChange
45,661
void (@NotNull ProgressIndicator progress) { ErrorAnalyzer.analyzeErrors(myEditor, myEditor.getRootContainer(), progress); }
collectInformation
45,662
void () { DesignerToolWindowManager.getInstance(myEditor).refreshErrors(); myEditor.refreshIntentionHint(); }
applyInformationToEditor
45,663
void (final GuiEditor editor) { final ArrayList<RadComponent> selection = FormEditingUtil.getSelectedComponents(editor); if (selection.size() != 1){ return; } if (!(selection.get(0) instanceof RadContainer container)) { return; } if ( container instanceof RadScrollPane || container instanceof RadSplitPane || container ...
breakGrid
45,664
void (final GuiEditor editor) { convertToGridImpl(editor, VERTICAL_GRID); }
convertToVerticalGrid
45,665
void (final GuiEditor editor) { convertToGridImpl(editor, HORIZONTAL_GRID); }
convertToHorizontalGrid
45,666
void (final GuiEditor editor) { convertToGridImpl(editor, GRID); }
convertToGrid
45,667
void (final GuiEditor editor, final int gridType) { final boolean createNewContainer; final RadContainer parent; final RadComponent[] componentsToConvert; { final ArrayList<RadComponent> selection = FormEditingUtil.getSelectedComponents(editor); if (selection.size() == 0) { // root container selected final RadRootConta...
convertToGridImpl
45,668
GridLayoutManager (final RadComponent[] selection, final boolean isVertical) { Arrays.sort( selection, (o1, o2) -> { final Rectangle bounds1 = o1.getBounds(); final Rectangle bounds2 = o2.getBounds(); if (isVertical) { return (bounds1.y + bounds1.height / 2) - (bounds2.y + bounds2.height / 2); } else { return (bounds1....
createOneDimensionGrid
45,669
Couple<Integer> ( final int[] x, final int[] y, final int[] rowSpans, final int[] colSpans ) { LOG.assertTrue(x.length == y.length); LOG.assertTrue(y.length == colSpans.length); LOG.assertTrue(colSpans.length == rowSpans.length); for (int i = 0; i < x.length; i++) { colSpans[i] = Math.max(colSpans[i], 1); rowSpans[i] =...
layoutInGrid
45,670
GridLayoutManager (final RadComponent[] selection) { final int[] x = new int[selection.length]; final int[] y = new int[selection.length]; final int[] colSpans = new int[selection.length]; final int[] rowSpans = new int[selection.length]; for (int i = selection.length - 1; i >= 0; i--) { x[i] = selection[i].getX(); y[i...
createTwoDimensionGrid
45,671
Point (final RadComponent[] components) { LOG.assertTrue(components.length > 0); final Point point = new Point(Integer.MAX_VALUE, Integer.MAX_VALUE); for (final RadComponent component : components) { point.x = Math.min(component.getX(), point.x); point.y = Math.min(component.getY(), point.y); } return point; }
getTopLeftPoint
45,672
Point (final RadComponent[] components) { LOG.assertTrue(components.length > 0); final Point point = new Point(Integer.MIN_VALUE, Integer.MIN_VALUE); for (final RadComponent component : components) { point.x = Math.max(component.getX() + component.getWidth(), point.x); point.y = Math.max(component.getY() + component.ge...
getBottomRightPoint
45,673
LoaderFactory (final Project project) { return project.getService(LoaderFactory.class); }
getInstance
45,674
void (@NotNull final ModuleRootEvent event) { clearClassLoaderCache(); }
rootsChanged
45,675
void () { myConnection.disconnect(); myModule2ClassLoader.clear(); }
dispose
45,676
ClassLoader (@NotNull VirtualFile formFile) { final Module module = ModuleUtilCore.findModuleForFile(formFile, myProject); if (module == null) { return getClass().getClassLoader(); } return getLoader(module); }
getLoader
45,677
ClassLoader (@NotNull Module module) { final ClassLoader cachedLoader = myModule2ClassLoader.get(module); if (cachedLoader != null) { return cachedLoader; } final String runClasspath = OrderEnumerator.orderEntries(module).recursively().getPathsList().getPathsString(); final ClassLoader classLoader = createClassLoader(r...
getLoader
45,678
ClassLoader () { if (myProjectClassLoader == null) { final String runClasspath = OrderEnumerator.orderEntries(myProject).withoutSdk().getPathsList().getPathsString(); myProjectClassLoader = createClassLoader(runClasspath, "<project>"); } return myProjectClassLoader; }
getProjectClassLoader
45,679
ClassLoader (final String runClasspath, final String moduleName) { List<Path> files = new ArrayList<>(); final VirtualFileManager manager = VirtualFileManager.getInstance(); final JarFileSystemImpl fileSystem = (JarFileSystemImpl)JarFileSystem.getInstance(); final StringTokenizer tokenizer = new StringTokenizer(runClas...
createClassLoader
45,680
void () { // clear classes with invalid classloader from UIManager cache final UIDefaults uiDefaults = UIManager.getDefaults(); for (Iterator it = uiDefaults.keySet().iterator(); it.hasNext();) { Object key = it.next(); Object value = uiDefaults.get(key); if (value instanceof Class) { ClassLoader loader = ((Class<?>)va...
clearClassLoaderCache
45,681
String () { return "DesignTimeClassLoader:" + myModuleName; }
toString
45,682
Properties () { return ApplicationManager.getApplication().getService(Properties.class); }
getInstance
45,683
boolean (final Module module, @NotNull final Class aClass, final String propertyName) { for (Class c = aClass; c != null; c = c.getSuperclass()) { final Set<String> properties = myClass2ExpertProperties.get(c.getName()); if (properties != null && properties.contains(propertyName)) { return true; } } return isPropertyDe...
isExpertProperty
45,684
boolean (final Module module, final Class aClass, final String propertyName) { // TODO[yole]: correct module-dependent caching Set<String> deprecated = myClass2DeprecatedProperties.get(aClass.getName()); if (deprecated == null) { deprecated = new HashSet<>(); PsiClass componentClass = JavaPsiFacade.getInstance(module.g...
isPropertyDeprecated
45,685
String (final Class aClass) { for (Class c = aClass; c != null; c = c.getSuperclass()) { final String property = myClass2InplaceProperty.get(c.getName()); if (property != null) { return property; } } return null; }
getInplaceProperty
45,686
void (@NotNull Element state) { for (Element classElement : state.getChildren("class")) { final String className = LwXmlReader.getRequiredString(classElement, "name"); // Read "expert" properties final Element expertPropertiesElement = classElement.getChild("expert-properties"); if (expertPropertiesElement != null) { S...
loadState
45,687
void (final String className, final Element enumPropertyElement) { Map<String, IntEnumEditor.Pair[]> map = new HashMap<>(); for (Element e : enumPropertyElement.getChildren("property")) { final String name = LwXmlReader.getRequiredString(e, Constants.NAME); final List list = e.getChildren("constant"); IntEnumEditor.Pai...
loadEnumProperties
45,688
void (final RadContainer container, final LwContainer lwContainer) { container.setBorderType(lwContainer.getBorderType()); container.setBorderTitle(lwContainer.getBorderTitle()); container.setBorderTitleJustification(lwContainer.getBorderTitleJustification()); container.setBorderTitlePosition(lwContainer.getBorderTitle...
copyBorder
45,689
RadErrorComponent (final ModuleProvider module, final String id, final LwComponent lwComponent, final ClassLoader loader) { final String componentClassName = lwComponent.getComponentClassName(); final @NlsSafe String errorDescription = Utils.validateJComponentClass(loader, componentClassName, true); return RadErrorComp...
createErrorComponent
45,690
int () { return HANDLE_ATOM_HEIGHT*3 + HANDLE_ATOM_SPACE*2; }
getHandleWidth
45,691
int () { return HANDLE_ATOM_WIDTH; }
getHandleHeight
45,692
void (final Graphics g) { final int handleHeight=getHandleHeight(); final int handleWidth=getHandleWidth(); // Paint top handle final int x=(getWidth()-handleWidth)/2; drawHandle(g,x,0); g.setColor(ourColor1); LinePainter2D.paint((Graphics2D)g, x + handleWidth / 2, handleHeight, x + handleWidth / 2, handleHeight + 1); ...
paintComponent
45,693
void (final Graphics g,int x,final int y) { g.setColor(ourColor1); g.drawRect(x,y,HANDLE_ATOM_HEIGHT-1,HANDLE_ATOM_WIDTH-1); LinePainter2D.paint((Graphics2D)g, x + HANDLE_ATOM_HEIGHT, y + HANDLE_ATOM_WIDTH / 2, x + HANDLE_ATOM_HEIGHT + HANDLE_ATOM_SPACE - 1, y + HANDLE_ATOM_WIDTH / 2); x+=HANDLE_ATOM_HEIGHT+HANDLE_ATOM...
drawHandle
45,694
void (final Graphics g,final int x,final int y,final int height) { for(int _y=y;_y<y+height-1;_y+=SPRING_PRERIOD){ drawSpringPeriod(g,x,_y); } }
drawSpring
45,695
void (final Graphics g,final int x,final int y) { g.setColor(ourColor2); LinePainter2D.paint((Graphics2D)g, x + 1, y, x + 2, y); LinePainter2D.paint((Graphics2D)g, x, y + 1, x, y + 1); LinePainter2D.paint((Graphics2D)g, x - 1, y + 2, x - 2, y + 2); g.setColor(ourColor3); LinePainter2D.paint((Graphics2D)g, x, y + 3, x, ...
drawSpringPeriod
45,696
Dimension () { return new Dimension(getHandleWidth(),getHandleHeight()*2+SPRING_PRERIOD); }
getMinimumSize
45,697
String () { return myBuffer.toString(); }
getText
45,698
void (final Dimension dimension, @NonNls final String elementName) { if (dimension.width == -1 && dimension.height == -1) { return; } startElement(elementName); try { addAttribute("width", dimension.width); addAttribute("height", dimension.height); } finally { endElement(); } }
writeDimension
45,699
void (@NonNls final String elementName) { startElement(elementName, null); }
startElement